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.beanvalidation.v11_fat/fat/src/com/ibm/ws/beanvalidation/fat/basic/BasicValidation_Common.java
BasicValidation_Common.run
protected void run(String war, String servlet, String testMethod) throws Exception { FATServletClient.runTest(getServer(), war + "/" + servlet, testMethod); }
java
protected void run(String war, String servlet, String testMethod) throws Exception { FATServletClient.runTest(getServer(), war + "/" + servlet, testMethod); }
[ "protected", "void", "run", "(", "String", "war", ",", "String", "servlet", ",", "String", "testMethod", ")", "throws", "Exception", "{", "FATServletClient", ".", "runTest", "(", "getServer", "(", ")", ",", "war", "+", "\"/\"", "+", "servlet", ",", "testMe...
Run a test by connecting to a url that is put together with the context-root being the war, the servlet and test method in the web application.
[ "Run", "a", "test", "by", "connecting", "to", "a", "url", "that", "is", "put", "together", "with", "the", "context", "-", "root", "being", "the", "war", "the", "servlet", "and", "test", "method", "in", "the", "web", "application", "." ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.beanvalidation.v11_fat/fat/src/com/ibm/ws/beanvalidation/fat/basic/BasicValidation_Common.java#L62-L64
train
OpenLiberty/open-liberty
dev/com.ibm.ws.kernel.service.location/src/com/ibm/ws/kernel/pseudo/internal/PseudoContext.java
PseudoContext.getURLContext
private Context getURLContext(String name) throws NamingException { int schemeIndex = name.indexOf(":"); if (schemeIndex != -1) { String scheme = name.substring(0, schemeIndex); return NamingManager.getURLContext(scheme, env); } return null; }
java
private Context getURLContext(String name) throws NamingException { int schemeIndex = name.indexOf(":"); if (schemeIndex != -1) { String scheme = name.substring(0, schemeIndex); return NamingManager.getURLContext(scheme, env); } return null; }
[ "private", "Context", "getURLContext", "(", "String", "name", ")", "throws", "NamingException", "{", "int", "schemeIndex", "=", "name", ".", "indexOf", "(", "\":\"", ")", ";", "if", "(", "schemeIndex", "!=", "-", "1", ")", "{", "String", "scheme", "=", "...
Get the URL context given a name based on the scheme of the URL. @param name The name to get the URL context for @return The URL context for the name @throws NamingException
[ "Get", "the", "URL", "context", "given", "a", "name", "based", "on", "the", "scheme", "of", "the", "URL", "." ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.kernel.service.location/src/com/ibm/ws/kernel/pseudo/internal/PseudoContext.java#L80-L88
train
OpenLiberty/open-liberty
dev/com.ibm.ws.jaxrs.2.0.common/src/org/apache/cxf/jaxrs/utils/ThreadLocalProxyCopyOnWriteArrayList.java
ThreadLocalProxyCopyOnWriteArrayList.indexOf
private static int indexOf(Object o, Object[] elements, int index, int fence) { if (o == null) { for (int i = index; i < fence; i++) if (elements[i] == null) return i; } else { for (int i = index; i < fence; i++) ...
java
private static int indexOf(Object o, Object[] elements, int index, int fence) { if (o == null) { for (int i = index; i < fence; i++) if (elements[i] == null) return i; } else { for (int i = index; i < fence; i++) ...
[ "private", "static", "int", "indexOf", "(", "Object", "o", ",", "Object", "[", "]", "elements", ",", "int", "index", ",", "int", "fence", ")", "{", "if", "(", "o", "==", "null", ")", "{", "for", "(", "int", "i", "=", "index", ";", "i", "<", "fe...
static version of indexOf, to allow repeated calls without needing to re-acquire array each time. @param o element to search for @param elements the array @param index first index to search @param fence one past last index to search @return index of element, or -1 if absent
[ "static", "version", "of", "indexOf", "to", "allow", "repeated", "calls", "without", "needing", "to", "re", "-", "acquire", "array", "each", "time", "." ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jaxrs.2.0.common/src/org/apache/cxf/jaxrs/utils/ThreadLocalProxyCopyOnWriteArrayList.java#L120-L132
train
OpenLiberty/open-liberty
dev/com.ibm.ws.jaxrs.2.0.common/src/org/apache/cxf/jaxrs/utils/ThreadLocalProxyCopyOnWriteArrayList.java
ThreadLocalProxyCopyOnWriteArrayList.lastIndexOf
private static int lastIndexOf(Object o, Object[] elements, int index) { if (o == null) { for (int i = index; i >= 0; i--) if (elements[i] == null) return i; } else { for (int i = index; i >= 0; i--) if (o.equals(elements[i])) ...
java
private static int lastIndexOf(Object o, Object[] elements, int index) { if (o == null) { for (int i = index; i >= 0; i--) if (elements[i] == null) return i; } else { for (int i = index; i >= 0; i--) if (o.equals(elements[i])) ...
[ "private", "static", "int", "lastIndexOf", "(", "Object", "o", ",", "Object", "[", "]", "elements", ",", "int", "index", ")", "{", "if", "(", "o", "==", "null", ")", "{", "for", "(", "int", "i", "=", "index", ";", "i", ">=", "0", ";", "i", "--"...
static version of lastIndexOf. @param o element to search for @param elements the array @param index first index to search @return index of element, or -1 if absent
[ "static", "version", "of", "lastIndexOf", "." ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jaxrs.2.0.common/src/org/apache/cxf/jaxrs/utils/ThreadLocalProxyCopyOnWriteArrayList.java#L142-L153
train
OpenLiberty/open-liberty
dev/com.ibm.ws.jaxrs.2.0.common/src/org/apache/cxf/jaxrs/utils/ThreadLocalProxyCopyOnWriteArrayList.java
ThreadLocalProxyCopyOnWriteArrayList.addIfAbsent
public boolean addIfAbsent(E e) { final ReentrantLock lock = this.lock; lock.lock(); try { // Copy while checking if already present. // This wins in the most common case where it is not present Object[] elements = getArray(); int len = elements.le...
java
public boolean addIfAbsent(E e) { final ReentrantLock lock = this.lock; lock.lock(); try { // Copy while checking if already present. // This wins in the most common case where it is not present Object[] elements = getArray(); int len = elements.le...
[ "public", "boolean", "addIfAbsent", "(", "E", "e", ")", "{", "final", "ReentrantLock", "lock", "=", "this", ".", "lock", ";", "lock", ".", "lock", "(", ")", ";", "try", "{", "// Copy while checking if already present.", "// This wins in the most common case where it...
Append the element if not present. @param e element to be added to this list, if absent @return <tt>true</tt> if the element was added
[ "Append", "the", "element", "if", "not", "present", "." ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jaxrs.2.0.common/src/org/apache/cxf/jaxrs/utils/ThreadLocalProxyCopyOnWriteArrayList.java#L527-L548
train
OpenLiberty/open-liberty
dev/com.ibm.ws.jaxrs.2.0.common/src/org/apache/cxf/jaxrs/utils/ThreadLocalProxyCopyOnWriteArrayList.java
ThreadLocalProxyCopyOnWriteArrayList.removeAll
@Override public boolean removeAll(Collection<?> c) { final ReentrantLock lock = this.lock; lock.lock(); try { Object[] elements = getArray(); int len = elements.length; if (len != 0) { // temp array holds those elements we know we want to ...
java
@Override public boolean removeAll(Collection<?> c) { final ReentrantLock lock = this.lock; lock.lock(); try { Object[] elements = getArray(); int len = elements.length; if (len != 0) { // temp array holds those elements we know we want to ...
[ "@", "Override", "public", "boolean", "removeAll", "(", "Collection", "<", "?", ">", "c", ")", "{", "final", "ReentrantLock", "lock", "=", "this", ".", "lock", ";", "lock", ".", "lock", "(", ")", ";", "try", "{", "Object", "[", "]", "elements", "=", ...
Removes from this list all of its elements that are contained in the specified collection. This is a particularly expensive operation in this class because of the need for an internal temporary array. @param c collection containing elements to be removed from this list @return <tt>true</tt> if this list changed as a r...
[ "Removes", "from", "this", "list", "all", "of", "its", "elements", "that", "are", "contained", "in", "the", "specified", "collection", ".", "This", "is", "a", "particularly", "expensive", "operation", "in", "this", "class", "because", "of", "the", "need", "f...
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jaxrs.2.0.common/src/org/apache/cxf/jaxrs/utils/ThreadLocalProxyCopyOnWriteArrayList.java#L587-L612
train
OpenLiberty/open-liberty
dev/com.ibm.ws.jaxrs.2.0.common/src/org/apache/cxf/jaxrs/utils/ThreadLocalProxyCopyOnWriteArrayList.java
ThreadLocalProxyCopyOnWriteArrayList.addAllAbsent
public int addAllAbsent(Collection<? extends E> c) { Object[] cs = c.toArray(); if (cs.length == 0) return 0; Object[] uniq = new Object[cs.length]; final ReentrantLock lock = this.lock; lock.lock(); try { Object[] elements = getArray(); ...
java
public int addAllAbsent(Collection<? extends E> c) { Object[] cs = c.toArray(); if (cs.length == 0) return 0; Object[] uniq = new Object[cs.length]; final ReentrantLock lock = this.lock; lock.lock(); try { Object[] elements = getArray(); ...
[ "public", "int", "addAllAbsent", "(", "Collection", "<", "?", "extends", "E", ">", "c", ")", "{", "Object", "[", "]", "cs", "=", "c", ".", "toArray", "(", ")", ";", "if", "(", "cs", ".", "length", "==", "0", ")", "return", "0", ";", "Object", "...
Appends all of the elements in the specified collection that are not already contained in this list, to the end of this list, in the order that they are returned by the specified collection's iterator. @param c collection containing elements to be added to this list @return the number of elements added @throws NullPoi...
[ "Appends", "all", "of", "the", "elements", "in", "the", "specified", "collection", "that", "are", "not", "already", "contained", "in", "this", "list", "to", "the", "end", "of", "this", "list", "in", "the", "order", "that", "they", "are", "returned", "by", ...
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jaxrs.2.0.common/src/org/apache/cxf/jaxrs/utils/ThreadLocalProxyCopyOnWriteArrayList.java#L668-L694
train
OpenLiberty/open-liberty
dev/com.ibm.ws.jaxrs.2.0.common/src/org/apache/cxf/jaxrs/utils/ThreadLocalProxyCopyOnWriteArrayList.java
ThreadLocalProxyCopyOnWriteArrayList.addAll
@Override public boolean addAll(Collection<? extends E> c) { Object[] cs = c.toArray(); if (cs.length == 0) return false; final ReentrantLock lock = this.lock; lock.lock(); try { Object[] elements = getArray(); int len = elements.length; ...
java
@Override public boolean addAll(Collection<? extends E> c) { Object[] cs = c.toArray(); if (cs.length == 0) return false; final ReentrantLock lock = this.lock; lock.lock(); try { Object[] elements = getArray(); int len = elements.length; ...
[ "@", "Override", "public", "boolean", "addAll", "(", "Collection", "<", "?", "extends", "E", ">", "c", ")", "{", "Object", "[", "]", "cs", "=", "c", ".", "toArray", "(", ")", ";", "if", "(", "cs", ".", "length", "==", "0", ")", "return", "false",...
Appends all of the elements in the specified collection to the end of this list, in the order that they are returned by the specified collection's iterator. @param c collection containing elements to be added to this list @return <tt>true</tt> if this list changed as a result of the call @throws NullPointerException i...
[ "Appends", "all", "of", "the", "elements", "in", "the", "specified", "collection", "to", "the", "end", "of", "this", "list", "in", "the", "order", "that", "they", "are", "returned", "by", "the", "specified", "collection", "s", "iterator", "." ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jaxrs.2.0.common/src/org/apache/cxf/jaxrs/utils/ThreadLocalProxyCopyOnWriteArrayList.java#L721-L738
train
OpenLiberty/open-liberty
dev/com.ibm.ws.transport.http/src/com/ibm/ws/http/internal/VirtualHostImpl.java
VirtualHostImpl.discriminate
public Runnable discriminate(HttpInboundConnectionExtended inboundConnection) { String requestUri = inboundConnection.getRequest().getURI(); Runnable requestHandler = null; // Find the container that can handle this URI. // The first to return a non-null wins for (HttpContaine...
java
public Runnable discriminate(HttpInboundConnectionExtended inboundConnection) { String requestUri = inboundConnection.getRequest().getURI(); Runnable requestHandler = null; // Find the container that can handle this URI. // The first to return a non-null wins for (HttpContaine...
[ "public", "Runnable", "discriminate", "(", "HttpInboundConnectionExtended", "inboundConnection", ")", "{", "String", "requestUri", "=", "inboundConnection", ".", "getRequest", "(", ")", ".", "getURI", "(", ")", ";", "Runnable", "requestHandler", "=", "null", ";", ...
Given a new shiny inbound connection, figure out which HttpContainer will handle the inbound request, and return a Runnable that should be used to dispatch the work. @param inboundConnection @return the Runnable that should be queued for execution to handle the work, or null if it is an unknown/unmatched context root
[ "Given", "a", "new", "shiny", "inbound", "connection", "figure", "out", "which", "HttpContainer", "will", "handle", "the", "inbound", "request", "and", "return", "a", "Runnable", "that", "should", "be", "used", "to", "dispatch", "the", "work", "." ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.transport.http/src/com/ibm/ws/http/internal/VirtualHostImpl.java#L242-L270
train
OpenLiberty/open-liberty
dev/com.ibm.ws.jsp/src/com/ibm/ws/jsp/translator/visitor/generator/GeneratorUtils.java
GeneratorUtils.generateLocalVariables
public static void generateLocalVariables(JavaCodeWriter out, Element jspElement, String pageContextVar) throws JspCoreException { if (hasUseBean(jspElement)) { out.println("HttpSession session = "+pageContextVar+".getSession();"); out.println("ServletContext application = "+pageContextV...
java
public static void generateLocalVariables(JavaCodeWriter out, Element jspElement, String pageContextVar) throws JspCoreException { if (hasUseBean(jspElement)) { out.println("HttpSession session = "+pageContextVar+".getSession();"); out.println("ServletContext application = "+pageContextV...
[ "public", "static", "void", "generateLocalVariables", "(", "JavaCodeWriter", "out", ",", "Element", "jspElement", ",", "String", "pageContextVar", ")", "throws", "JspCoreException", "{", "if", "(", "hasUseBean", "(", "jspElement", ")", ")", "{", "out", ".", "pri...
PK65013 - already know if this isTagFile or not and pageContextVar is set accordingly
[ "PK65013", "-", "already", "know", "if", "this", "isTagFile", "or", "not", "and", "pageContextVar", "is", "set", "accordingly" ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jsp/src/com/ibm/ws/jsp/translator/visitor/generator/GeneratorUtils.java#L161-L172
train
OpenLiberty/open-liberty
dev/com.ibm.ws.jsp/src/com/ibm/ws/jsp/translator/visitor/generator/GeneratorUtils.java
GeneratorUtils.interpreterCall
public static String interpreterCall( boolean isTagFile, String expression, Class expectedType, String fnmapvar, boolean XmlEscape, String pageContextVar) { //PK65013 return JSPExtensionFactory.getGeneratorUtilsExtFactory().getGeneratorUtilsExt().interpreterCall...
java
public static String interpreterCall( boolean isTagFile, String expression, Class expectedType, String fnmapvar, boolean XmlEscape, String pageContextVar) { //PK65013 return JSPExtensionFactory.getGeneratorUtilsExtFactory().getGeneratorUtilsExt().interpreterCall...
[ "public", "static", "String", "interpreterCall", "(", "boolean", "isTagFile", ",", "String", "expression", ",", "Class", "expectedType", ",", "String", "fnmapvar", ",", "boolean", "XmlEscape", ",", "String", "pageContextVar", ")", "{", "//PK65013", "return", "JSPE...
Produces a String representing a call to the EL interpreter. @param expression a String containing zero or more "${}" expressions @param expectedType the expected type of the interpreted result @param defaultPrefix Default prefix, or literal "null" @param fnmapvar Variable pointing to a function map. @param XmlEscape T...
[ "Produces", "a", "String", "representing", "a", "call", "to", "the", "EL", "interpreter", "." ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jsp/src/com/ibm/ws/jsp/translator/visitor/generator/GeneratorUtils.java#L284-L299
train
OpenLiberty/open-liberty
dev/com.ibm.ws.jsp/src/com/ibm/ws/jsp/translator/visitor/generator/GeneratorUtils.java
GeneratorUtils.attributeValue
public static String attributeValue( String valueIn, boolean encode, Class expectedType, JspConfiguration jspConfig, boolean isTagFile, String pageContextVar) { String value = valueIn; value = value.replaceAll("&gt;", ">"); value = value.replaceAll...
java
public static String attributeValue( String valueIn, boolean encode, Class expectedType, JspConfiguration jspConfig, boolean isTagFile, String pageContextVar) { String value = valueIn; value = value.replaceAll("&gt;", ">"); value = value.replaceAll...
[ "public", "static", "String", "attributeValue", "(", "String", "valueIn", ",", "boolean", "encode", ",", "Class", "expectedType", ",", "JspConfiguration", "jspConfig", ",", "boolean", "isTagFile", ",", "String", "pageContextVar", ")", "{", "String", "value", "=", ...
PK65013 add method parameter pageContextVar
[ "PK65013", "add", "method", "parameter", "pageContextVar" ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jsp/src/com/ibm/ws/jsp/translator/visitor/generator/GeneratorUtils.java#L430-L490
train
OpenLiberty/open-liberty
dev/com.ibm.ws.logging.osgi/src/com/ibm/ws/logging/internal/osgi/TrOSGiLogForwarder.java
TrOSGiLogForwarder.getObjects
Object[] getObjects(ExtendedLogEntry logEntry, boolean translatedMsg) { ArrayList<Object> list = new ArrayList<Object>(5); if (translatedMsg && logEntry.getMessage() != null) { list.add(logEntry.getMessage()); } if (!translatedMsg) { String loggerName = logEntry...
java
Object[] getObjects(ExtendedLogEntry logEntry, boolean translatedMsg) { ArrayList<Object> list = new ArrayList<Object>(5); if (translatedMsg && logEntry.getMessage() != null) { list.add(logEntry.getMessage()); } if (!translatedMsg) { String loggerName = logEntry...
[ "Object", "[", "]", "getObjects", "(", "ExtendedLogEntry", "logEntry", ",", "boolean", "translatedMsg", ")", "{", "ArrayList", "<", "Object", ">", "list", "=", "new", "ArrayList", "<", "Object", ">", "(", "5", ")", ";", "if", "(", "translatedMsg", "&&", ...
Analyze available fields from the LogEntry, and make a suitable object array for passing to trace. @param logEntry the log entry @param translatedMsg Include the entry's log message in the list of objects for inclusion in translated/formatted messages @return Object array for trace
[ "Analyze", "available", "fields", "from", "the", "LogEntry", "and", "make", "a", "suitable", "object", "array", "for", "passing", "to", "trace", "." ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.logging.osgi/src/com/ibm/ws/logging/internal/osgi/TrOSGiLogForwarder.java#L181-L221
train
OpenLiberty/open-liberty
dev/com.ibm.ws.webcontainer.security/src/com/ibm/ws/webcontainer/security/AuthenticateApi.java
AuthenticateApi.addToLoggedOutTokenCache
private void addToLoggedOutTokenCache(String tokenString) { String tokenValue = "userName"; LoggedOutTokenCacheImpl.getInstance().addTokenToDistributedMap(tokenString, tokenValue); }
java
private void addToLoggedOutTokenCache(String tokenString) { String tokenValue = "userName"; LoggedOutTokenCacheImpl.getInstance().addTokenToDistributedMap(tokenString, tokenValue); }
[ "private", "void", "addToLoggedOutTokenCache", "(", "String", "tokenString", ")", "{", "String", "tokenValue", "=", "\"userName\"", ";", "LoggedOutTokenCacheImpl", ".", "getInstance", "(", ")", ".", "addTokenToDistributedMap", "(", "tokenString", ",", "tokenValue", ")...
Add the ltpa token string to the logged out token distributed map. @param tokenString
[ "Add", "the", "ltpa", "token", "string", "to", "the", "logged", "out", "token", "distributed", "map", "." ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.webcontainer.security/src/com/ibm/ws/webcontainer/security/AuthenticateApi.java#L310-L313
train
OpenLiberty/open-liberty
dev/com.ibm.ws.webcontainer.security/src/com/ibm/ws/webcontainer/security/AuthenticateApi.java
AuthenticateApi.removeEntryFromAuthCache
private void removeEntryFromAuthCache(HttpServletRequest req, HttpServletResponse res, WebAppSecurityConfig config) { /* * TODO: we need to optimize this method... if the authCacheService.remove() method * return true for successfully removed the entry in the authentication cache, then we ...
java
private void removeEntryFromAuthCache(HttpServletRequest req, HttpServletResponse res, WebAppSecurityConfig config) { /* * TODO: we need to optimize this method... if the authCacheService.remove() method * return true for successfully removed the entry in the authentication cache, then we ...
[ "private", "void", "removeEntryFromAuthCache", "(", "HttpServletRequest", "req", ",", "HttpServletResponse", "res", ",", "WebAppSecurityConfig", "config", ")", "{", "/*\n * TODO: we need to optimize this method... if the authCacheService.remove() method\n * return true fo...
Remove entries in the authentication cache @param req @param res @param config
[ "Remove", "entries", "in", "the", "authentication", "cache" ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.webcontainer.security/src/com/ibm/ws/webcontainer/security/AuthenticateApi.java#L322-L330
train
OpenLiberty/open-liberty
dev/com.ibm.ws.webcontainer.security/src/com/ibm/ws/webcontainer/security/AuthenticateApi.java
AuthenticateApi.removeEntryFromAuthCacheForToken
private void removeEntryFromAuthCacheForToken(HttpServletRequest req, HttpServletResponse res, WebAppSecurityConfig config) { getAuthCacheService(); if (authCacheService == null) { return; } Cookie[] cookies = req.getCookies(); if (cookies != null) { Stri...
java
private void removeEntryFromAuthCacheForToken(HttpServletRequest req, HttpServletResponse res, WebAppSecurityConfig config) { getAuthCacheService(); if (authCacheService == null) { return; } Cookie[] cookies = req.getCookies(); if (cookies != null) { Stri...
[ "private", "void", "removeEntryFromAuthCacheForToken", "(", "HttpServletRequest", "req", ",", "HttpServletResponse", "res", ",", "WebAppSecurityConfig", "config", ")", "{", "getAuthCacheService", "(", ")", ";", "if", "(", "authCacheService", "==", "null", ")", "{", ...
Remove entries in the authentication cache using the ltpaToken as a key @param req @param res @param config
[ "Remove", "entries", "in", "the", "authentication", "cache", "using", "the", "ltpaToken", "as", "a", "key" ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.webcontainer.security/src/com/ibm/ws/webcontainer/security/AuthenticateApi.java#L339-L377
train
OpenLiberty/open-liberty
dev/com.ibm.ws.webcontainer.security/src/com/ibm/ws/webcontainer/security/AuthenticateApi.java
AuthenticateApi.removeEntryFromAuthCacheForUser
private void removeEntryFromAuthCacheForUser(HttpServletRequest req, HttpServletResponse res) { getAuthCacheService(); if (authCacheService == null) { return; } String user = req.getRemoteUser(); if (user == null) { Principal p = req.getUserPrincipal(); ...
java
private void removeEntryFromAuthCacheForUser(HttpServletRequest req, HttpServletResponse res) { getAuthCacheService(); if (authCacheService == null) { return; } String user = req.getRemoteUser(); if (user == null) { Principal p = req.getUserPrincipal(); ...
[ "private", "void", "removeEntryFromAuthCacheForUser", "(", "HttpServletRequest", "req", ",", "HttpServletResponse", "res", ")", "{", "getAuthCacheService", "(", ")", ";", "if", "(", "authCacheService", "==", "null", ")", "{", "return", ";", "}", "String", "user", ...
Remove entries in the authentication cache using the user as a key @param req @param res
[ "Remove", "entries", "in", "the", "authentication", "cache", "using", "the", "user", "as", "a", "key" ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.webcontainer.security/src/com/ibm/ws/webcontainer/security/AuthenticateApi.java#L394-L414
train
OpenLiberty/open-liberty
dev/com.ibm.ws.webcontainer.security/src/com/ibm/ws/webcontainer/security/AuthenticateApi.java
AuthenticateApi.throwExceptionIfAlreadyAuthenticate
public void throwExceptionIfAlreadyAuthenticate(HttpServletRequest req, HttpServletResponse resp, WebAppSecurityConfig config, String username) throws ServletException { Subject callerSubject = subjectManager.getCallerSubject(); if (subjectHelper.isUnauthenticated(callerSubject)) return; ...
java
public void throwExceptionIfAlreadyAuthenticate(HttpServletRequest req, HttpServletResponse resp, WebAppSecurityConfig config, String username) throws ServletException { Subject callerSubject = subjectManager.getCallerSubject(); if (subjectHelper.isUnauthenticated(callerSubject)) return; ...
[ "public", "void", "throwExceptionIfAlreadyAuthenticate", "(", "HttpServletRequest", "req", ",", "HttpServletResponse", "resp", ",", "WebAppSecurityConfig", "config", ",", "String", "username", ")", "throws", "ServletException", "{", "Subject", "callerSubject", "=", "subje...
This method throws an exception if the caller subject is already authenticated and WebAlwaysLogin is false. If the caller subject is already authenticated and WebAlwaysLogin is true, then it will logout the user. @throws IOException @throws ServletException
[ "This", "method", "throws", "an", "exception", "if", "the", "caller", "subject", "is", "already", "authenticated", "and", "WebAlwaysLogin", "is", "false", ".", "If", "the", "caller", "subject", "is", "already", "authenticated", "and", "WebAlwaysLogin", "is", "tr...
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.webcontainer.security/src/com/ibm/ws/webcontainer/security/AuthenticateApi.java#L425-L438
train
OpenLiberty/open-liberty
dev/com.ibm.ws.webcontainer.security/src/com/ibm/ws/webcontainer/security/AuthenticateApi.java
AuthenticateApi.invalidateSession
private void invalidateSession(HttpServletRequest req) { HttpSession session = req.getSession(false); if (session != null) { if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) Tr.debug(tc, "invalidating existing HTTP Session"); session.invalidate(); ...
java
private void invalidateSession(HttpServletRequest req) { HttpSession session = req.getSession(false); if (session != null) { if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) Tr.debug(tc, "invalidating existing HTTP Session"); session.invalidate(); ...
[ "private", "void", "invalidateSession", "(", "HttpServletRequest", "req", ")", "{", "HttpSession", "session", "=", "req", ".", "getSession", "(", "false", ")", ";", "if", "(", "session", "!=", "null", ")", "{", "if", "(", "TraceComponent", ".", "isAnyTracing...
Invalidates the session associated with the request. @param req
[ "Invalidates", "the", "session", "associated", "with", "the", "request", "." ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.webcontainer.security/src/com/ibm/ws/webcontainer/security/AuthenticateApi.java#L445-L455
train
OpenLiberty/open-liberty
dev/com.ibm.ws.webcontainer.security/src/com/ibm/ws/webcontainer/security/AuthenticateApi.java
AuthenticateApi.createSubjectAndPushItOnThreadAsNeeded
private void createSubjectAndPushItOnThreadAsNeeded(HttpServletRequest req, HttpServletResponse res) { // We got a new instance of FormLogoutExtensionProcess every request. logoutSubject = null; Subject subject = subjectManager.getCallerSubject(); if (subject == null || subjectHelper.isU...
java
private void createSubjectAndPushItOnThreadAsNeeded(HttpServletRequest req, HttpServletResponse res) { // We got a new instance of FormLogoutExtensionProcess every request. logoutSubject = null; Subject subject = subjectManager.getCallerSubject(); if (subject == null || subjectHelper.isU...
[ "private", "void", "createSubjectAndPushItOnThreadAsNeeded", "(", "HttpServletRequest", "req", ",", "HttpServletResponse", "res", ")", "{", "// We got a new instance of FormLogoutExtensionProcess every request.", "logoutSubject", "=", "null", ";", "Subject", "subject", "=", "su...
For formLogout, this is a new request and there is no subject on the thread. A previous request handled on this thread may not be from this same client. We have to authenticate using the token and push the subject on thread so webcontainer can use the subject credential to invalidate the session. @param req @param res
[ "For", "formLogout", "this", "is", "a", "new", "request", "and", "there", "is", "no", "subject", "on", "the", "thread", ".", "A", "previous", "request", "handled", "on", "this", "thread", "may", "not", "be", "from", "this", "same", "client", ".", "We", ...
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.webcontainer.security/src/com/ibm/ws/webcontainer/security/AuthenticateApi.java#L534-L551
train
OpenLiberty/open-liberty
dev/com.ibm.ws.webcontainer.security/src/com/ibm/ws/webcontainer/security/AuthenticateApi.java
AuthenticateApi.debugGetAllHttpHdrs
String debugGetAllHttpHdrs(HttpServletRequest req) { if (req == null) return null; StringBuffer sb = new StringBuffer(512); Enumeration<String> headerNames = req.getHeaderNames(); while (headerNames != null && headerNames.hasMoreElements()) { String headerName = h...
java
String debugGetAllHttpHdrs(HttpServletRequest req) { if (req == null) return null; StringBuffer sb = new StringBuffer(512); Enumeration<String> headerNames = req.getHeaderNames(); while (headerNames != null && headerNames.hasMoreElements()) { String headerName = h...
[ "String", "debugGetAllHttpHdrs", "(", "HttpServletRequest", "req", ")", "{", "if", "(", "req", "==", "null", ")", "return", "null", ";", "StringBuffer", "sb", "=", "new", "StringBuffer", "(", "512", ")", ";", "Enumeration", "<", "String", ">", "headerNames",...
Debug method used to collect all the Http header names and values. @param webAppSecurityCollaboratorImpl TODO @param req HttpServletRequest @return Returns a string that contains each parameter and it value(s) in the HttpServletRequest object.
[ "Debug", "method", "used", "to", "collect", "all", "the", "Http", "header", "names", "and", "values", "." ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.webcontainer.security/src/com/ibm/ws/webcontainer/security/AuthenticateApi.java#L561-L572
train
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.msgstore/src/com/ibm/ws/objectManager/utils/FFDC.java
FFDC.processException
public void processException(Class sourceClass, String methodName, Throwable throwable, String probe) { if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled()) trace.entry(cclass, ...
java
public void processException(Class sourceClass, String methodName, Throwable throwable, String probe) { if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled()) trace.entry(cclass, ...
[ "public", "void", "processException", "(", "Class", "sourceClass", ",", "String", "methodName", ",", "Throwable", "throwable", ",", "String", "probe", ")", "{", "if", "(", "Tracing", ".", "isAnyTracingEnabled", "(", ")", "&&", "trace", ".", "isEntryEnabled", "...
Process an exception for a static class. @param sourceClass of the source object. @param methodName where the FFDC is being requested from. @param throwable the cause of the exception. @param probe identifying the source of the exception.
[ "Process", "an", "exception", "for", "a", "static", "class", "." ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.msgstore/src/com/ibm/ws/objectManager/utils/FFDC.java#L50-L73
train
OpenLiberty/open-liberty
dev/com.ibm.ws.install/src/com/ibm/ws/install/RepositoryConfigUtils.java
RepositoryConfigUtils.loadRepoProperties
public static Properties loadRepoProperties() throws InstallException { Properties repoProperties = null; // Retrieves the Repository Properties file File repoPropertiesFile = new File(getRepoPropertiesFileLocation()); //Check if default repository properties file location is overridde...
java
public static Properties loadRepoProperties() throws InstallException { Properties repoProperties = null; // Retrieves the Repository Properties file File repoPropertiesFile = new File(getRepoPropertiesFileLocation()); //Check if default repository properties file location is overridde...
[ "public", "static", "Properties", "loadRepoProperties", "(", ")", "throws", "InstallException", "{", "Properties", "repoProperties", "=", "null", ";", "// Retrieves the Repository Properties file", "File", "repoPropertiesFile", "=", "new", "File", "(", "getRepoPropertiesFil...
Loads the repository properties into a Properties object @return A properties object with the repo properties @throws InstallException
[ "Loads", "the", "repository", "properties", "into", "a", "Properties", "object" ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.install/src/com/ibm/ws/install/RepositoryConfigUtils.java#L76-L104
train
OpenLiberty/open-liberty
dev/com.ibm.ws.install/src/com/ibm/ws/install/RepositoryConfigUtils.java
RepositoryConfigUtils.getRepoPropertiesFileLocation
public static String getRepoPropertiesFileLocation() { String installDirPath = Utils.getInstallDir().getAbsolutePath(); String overrideLocation = System.getProperty(InstallConstants.OVERRIDE_PROPS_LOCATION_ENV_VAR); //Gets the repository properties file path from the default location if ...
java
public static String getRepoPropertiesFileLocation() { String installDirPath = Utils.getInstallDir().getAbsolutePath(); String overrideLocation = System.getProperty(InstallConstants.OVERRIDE_PROPS_LOCATION_ENV_VAR); //Gets the repository properties file path from the default location if ...
[ "public", "static", "String", "getRepoPropertiesFileLocation", "(", ")", "{", "String", "installDirPath", "=", "Utils", ".", "getInstallDir", "(", ")", ".", "getAbsolutePath", "(", ")", ";", "String", "overrideLocation", "=", "System", ".", "getProperty", "(", "...
Finds the repository properties file location @return the location of the repo properties
[ "Finds", "the", "repository", "properties", "file", "location" ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.install/src/com/ibm/ws/install/RepositoryConfigUtils.java#L111-L121
train
OpenLiberty/open-liberty
dev/com.ibm.ws.install/src/com/ibm/ws/install/RepositoryConfigUtils.java
RepositoryConfigUtils.setProxyAuthenticator
public static void setProxyAuthenticator(final String proxyHost, final String proxyPort, final String proxyUser, final String decodedPwd) { if (proxyUser == null || proxyUser.isEmpty() || decodedPwd == null || decodedPwd.isEmpty()) { return; } //Authenticate proxy credentials ...
java
public static void setProxyAuthenticator(final String proxyHost, final String proxyPort, final String proxyUser, final String decodedPwd) { if (proxyUser == null || proxyUser.isEmpty() || decodedPwd == null || decodedPwd.isEmpty()) { return; } //Authenticate proxy credentials ...
[ "public", "static", "void", "setProxyAuthenticator", "(", "final", "String", "proxyHost", ",", "final", "String", "proxyPort", ",", "final", "String", "proxyUser", ",", "final", "String", "decodedPwd", ")", "{", "if", "(", "proxyUser", "==", "null", "||", "pro...
Set Proxy Authenticator Default @param proxyHost The proxy host @param proxyPort The proxy port @param proxyUser the proxy username @param decodedPwd the proxy password decoded
[ "Set", "Proxy", "Authenticator", "Default" ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.install/src/com/ibm/ws/install/RepositoryConfigUtils.java#L131-L147
train
OpenLiberty/open-liberty
dev/com.ibm.ws.install/src/com/ibm/ws/install/RepositoryConfigUtils.java
RepositoryConfigUtils.getProxyPwd
public static String getProxyPwd(Properties repoProperties) { if (repoProperties.getProperty(InstallConstants.REPO_PROPERTIES_PROXY_USERPWD) != null) return repoProperties.getProperty(InstallConstants.REPO_PROPERTIES_PROXY_USERPWD); else if (repoProperties.getProperty(InstallConstants.REPO_P...
java
public static String getProxyPwd(Properties repoProperties) { if (repoProperties.getProperty(InstallConstants.REPO_PROPERTIES_PROXY_USERPWD) != null) return repoProperties.getProperty(InstallConstants.REPO_PROPERTIES_PROXY_USERPWD); else if (repoProperties.getProperty(InstallConstants.REPO_P...
[ "public", "static", "String", "getProxyPwd", "(", "Properties", "repoProperties", ")", "{", "if", "(", "repoProperties", ".", "getProperty", "(", "InstallConstants", ".", "REPO_PROPERTIES_PROXY_USERPWD", ")", "!=", "null", ")", "return", "repoProperties", ".", "getP...
Gets the Proxy user password. @param repoProperties the Repository Properties @return the user password
[ "Gets", "the", "Proxy", "user", "password", "." ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.install/src/com/ibm/ws/install/RepositoryConfigUtils.java#L245-L252
train
OpenLiberty/open-liberty
dev/com.ibm.ws.install/src/com/ibm/ws/install/RepositoryConfigUtils.java
RepositoryConfigUtils.getOrderList
public static List<String> getOrderList(Properties repoProperties) throws InstallException { List<String> orderList = new ArrayList<String>(); List<String> repoList = new ArrayList<String>(); // Retrieves the Repository Properties file File repoPropertiesFile = new File(getRepoProperties...
java
public static List<String> getOrderList(Properties repoProperties) throws InstallException { List<String> orderList = new ArrayList<String>(); List<String> repoList = new ArrayList<String>(); // Retrieves the Repository Properties file File repoPropertiesFile = new File(getRepoProperties...
[ "public", "static", "List", "<", "String", ">", "getOrderList", "(", "Properties", "repoProperties", ")", "throws", "InstallException", "{", "List", "<", "String", ">", "orderList", "=", "new", "ArrayList", "<", "String", ">", "(", ")", ";", "List", "<", "...
Compiles a list of repository names from a repository properties file, removing duplicates and .url suffixes @param repoProperties the Repository Properties @return A list of Strings of repository names @throws InstallException
[ "Compiles", "a", "list", "of", "repository", "names", "from", "a", "repository", "properties", "file", "removing", "duplicates", "and", ".", "url", "suffixes" ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.install/src/com/ibm/ws/install/RepositoryConfigUtils.java#L261-L317
train
OpenLiberty/open-liberty
dev/com.ibm.ws.install/src/com/ibm/ws/install/RepositoryConfigUtils.java
RepositoryConfigUtils.isWlpRepoEnabled
public static boolean isWlpRepoEnabled(Properties repoProperties) { if (!repoPropertiesFileExists() || repoProperties == null) return true; String wlpEnabled = repoProperties.getProperty(USE_WLP_REPO); if (wlpEnabled == null) return true; return !wlpEnabled.trim()...
java
public static boolean isWlpRepoEnabled(Properties repoProperties) { if (!repoPropertiesFileExists() || repoProperties == null) return true; String wlpEnabled = repoProperties.getProperty(USE_WLP_REPO); if (wlpEnabled == null) return true; return !wlpEnabled.trim()...
[ "public", "static", "boolean", "isWlpRepoEnabled", "(", "Properties", "repoProperties", ")", "{", "if", "(", "!", "repoPropertiesFileExists", "(", ")", "||", "repoProperties", "==", "null", ")", "return", "true", ";", "String", "wlpEnabled", "=", "repoProperties",...
Checks if the repository uses the WLP repository @param repoProperties The repository's properties @return True if the repository is using WLP
[ "Checks", "if", "the", "repository", "uses", "the", "WLP", "repository" ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.install/src/com/ibm/ws/install/RepositoryConfigUtils.java#L334-L341
train
OpenLiberty/open-liberty
dev/com.ibm.ws.install/src/com/ibm/ws/install/RepositoryConfigUtils.java
RepositoryConfigUtils.getRepositoryConfigs
public static List<RepositoryConfig> getRepositoryConfigs(Properties repoProperties) throws InstallException { List<String> orderList = getOrderList(repoProperties); List<RepositoryConfig> connections = new ArrayList<RepositoryConfig>(orderList.size()); if (repoProperties == null || repoProperti...
java
public static List<RepositoryConfig> getRepositoryConfigs(Properties repoProperties) throws InstallException { List<String> orderList = getOrderList(repoProperties); List<RepositoryConfig> connections = new ArrayList<RepositoryConfig>(orderList.size()); if (repoProperties == null || repoProperti...
[ "public", "static", "List", "<", "RepositoryConfig", ">", "getRepositoryConfigs", "(", "Properties", "repoProperties", ")", "throws", "InstallException", "{", "List", "<", "String", ">", "orderList", "=", "getOrderList", "(", "repoProperties", ")", ";", "List", "<...
Compiles a list of repository names from a repository properties file. @param repoProperties the Repository Properties @return A list of Strings of repository names @throws InstallException
[ "Compiles", "a", "list", "of", "repository", "names", "from", "a", "repository", "properties", "file", "." ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.install/src/com/ibm/ws/install/RepositoryConfigUtils.java#L350-L397
train
OpenLiberty/open-liberty
dev/com.ibm.ws.install/src/com/ibm/ws/install/RepositoryConfigUtils.java
RepositoryConfigUtils.getRepoName
public static String getRepoName(Properties repoProperties, RepositoryConnection repoConn) throws InstallException { String repoName = null; List<RepositoryConfig> configRepos = RepositoryConfigUtils.getRepositoryConfigs(repoProperties); if (!(repoConn instanceof DirectoryRepositoryConnection |...
java
public static String getRepoName(Properties repoProperties, RepositoryConnection repoConn) throws InstallException { String repoName = null; List<RepositoryConfig> configRepos = RepositoryConfigUtils.getRepositoryConfigs(repoProperties); if (!(repoConn instanceof DirectoryRepositoryConnection |...
[ "public", "static", "String", "getRepoName", "(", "Properties", "repoProperties", ",", "RepositoryConnection", "repoConn", ")", "throws", "InstallException", "{", "String", "repoName", "=", "null", ";", "List", "<", "RepositoryConfig", ">", "configRepos", "=", "Repo...
Gets the name of the repository by connection and properties @param repoProperties The repository properties @param repoConn The repository connection @return The name of the Repository @throws InstallException
[ "Gets", "the", "name", "of", "the", "repository", "by", "connection", "and", "properties" ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.install/src/com/ibm/ws/install/RepositoryConfigUtils.java#L407-L438
train
OpenLiberty/open-liberty
dev/com.ibm.ws.install/src/com/ibm/ws/install/RepositoryConfigUtils.java
RepositoryConfigUtils.isLibertyRepository
public static boolean isLibertyRepository(RestRepositoryConnection lie, Properties repoProperties) throws InstallException { if (isWlpRepoEnabled(repoProperties)) { return lie.getRepositoryLocation().startsWith(InstallConstants.REPOSITORY_LIBERTY_URL); } return false; }
java
public static boolean isLibertyRepository(RestRepositoryConnection lie, Properties repoProperties) throws InstallException { if (isWlpRepoEnabled(repoProperties)) { return lie.getRepositoryLocation().startsWith(InstallConstants.REPOSITORY_LIBERTY_URL); } return false; }
[ "public", "static", "boolean", "isLibertyRepository", "(", "RestRepositoryConnection", "lie", ",", "Properties", "repoProperties", ")", "throws", "InstallException", "{", "if", "(", "isWlpRepoEnabled", "(", "repoProperties", ")", ")", "{", "return", "lie", ".", "get...
Checks if the inputed Repository Connection is a liberty repository @param lie The RestRepositoryConnection connection @param repoProperties The repository properties @return True of the repository location is a liberty location @throws InstallException
[ "Checks", "if", "the", "inputed", "Repository", "Connection", "is", "a", "liberty", "repository" ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.install/src/com/ibm/ws/install/RepositoryConfigUtils.java#L448-L453
train
OpenLiberty/open-liberty
dev/com.ibm.ws.install/src/com/ibm/ws/install/RepositoryConfigUtils.java
RepositoryConfigUtils.isKeySupported
private static boolean isKeySupported(String key) { if (Arrays.asList(SUPPORTED_KEYS).contains(key)) return true; if (key.endsWith(URL_SUFFIX) || key.endsWith(APIKEY_SUFFIX) || key.endsWith(USER_SUFFIX) || key.endsWith(PWD_SUFFIX) || key.endsWith(USERPWD_SUFFIX)) retu...
java
private static boolean isKeySupported(String key) { if (Arrays.asList(SUPPORTED_KEYS).contains(key)) return true; if (key.endsWith(URL_SUFFIX) || key.endsWith(APIKEY_SUFFIX) || key.endsWith(USER_SUFFIX) || key.endsWith(PWD_SUFFIX) || key.endsWith(USERPWD_SUFFIX)) retu...
[ "private", "static", "boolean", "isKeySupported", "(", "String", "key", ")", "{", "if", "(", "Arrays", ".", "asList", "(", "SUPPORTED_KEYS", ")", ".", "contains", "(", "key", ")", ")", "return", "true", ";", "if", "(", "key", ".", "endsWith", "(", "URL...
Checks if the inputed key is a supported property key @param key The Property key @return True if the key is supported
[ "Checks", "if", "the", "inputed", "key", "is", "a", "supported", "property", "key" ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.install/src/com/ibm/ws/install/RepositoryConfigUtils.java#L461-L468
train
OpenLiberty/open-liberty
dev/com.ibm.ws.jsf.2.2/src/org/apache/myfaces/application/ApplicationImpl.java
ApplicationImpl.isFirstRequestProcessed
private boolean isFirstRequestProcessed() { FacesContext context = FacesContext.getCurrentInstance(); //if firstRequestProcessed is not set, check the application map if(!_firstRequestProcessed && context != null && Boolean.TRUE.equals(context.getExternalContext().g...
java
private boolean isFirstRequestProcessed() { FacesContext context = FacesContext.getCurrentInstance(); //if firstRequestProcessed is not set, check the application map if(!_firstRequestProcessed && context != null && Boolean.TRUE.equals(context.getExternalContext().g...
[ "private", "boolean", "isFirstRequestProcessed", "(", ")", "{", "FacesContext", "context", "=", "FacesContext", ".", "getCurrentInstance", "(", ")", ";", "//if firstRequestProcessed is not set, check the application map", "if", "(", "!", "_firstRequestProcessed", "&&", "con...
Method to handle determining if the first request has been handled by the associated LifecycleImpl. @return true if the first request has already been processed, false otherwise
[ "Method", "to", "handle", "determining", "if", "the", "first", "request", "has", "been", "handled", "by", "the", "associated", "LifecycleImpl", "." ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jsf.2.2/src/org/apache/myfaces/application/ApplicationImpl.java#L2728-L2740
train
OpenLiberty/open-liberty
dev/com.ibm.ws.security.jwt/src/com/ibm/ws/security/jwt/utils/JwtUtils.java
JwtUtils.claimFromJsonObject
public static Object claimFromJsonObject(String jsonFormattedString, String claimName) throws JoseException { Object claim = null; // JSONObject jobj = JSONObject.parse(jsonFormattedString); Map<String, Object> jobj = org.jose4j.json.JsonUtil.parseJson(jsonFormattedString); if (jobj != null) { claim = jobj....
java
public static Object claimFromJsonObject(String jsonFormattedString, String claimName) throws JoseException { Object claim = null; // JSONObject jobj = JSONObject.parse(jsonFormattedString); Map<String, Object> jobj = org.jose4j.json.JsonUtil.parseJson(jsonFormattedString); if (jobj != null) { claim = jobj....
[ "public", "static", "Object", "claimFromJsonObject", "(", "String", "jsonFormattedString", ",", "String", "claimName", ")", "throws", "JoseException", "{", "Object", "claim", "=", "null", ";", "// JSONObject jobj = JSONObject.parse(jsonFormattedString);", "Map", "<", "Str...
either from header or payload
[ "either", "from", "header", "or", "payload" ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.security.jwt/src/com/ibm/ws/security/jwt/utils/JwtUtils.java#L194-L204
train
OpenLiberty/open-liberty
dev/com.ibm.ws.security.jwt/src/com/ibm/ws/security/jwt/utils/JwtUtils.java
JwtUtils.claimsFromJsonObject
public static Map claimsFromJsonObject(String jsonFormattedString) throws JoseException { Map claimsMap = new ConcurrentHashMap<String, Object>(); // JSONObject jobj = JSONObject.parse(jsonFormattedString); Map<String, Object> jobj = org.jose4j.json.JsonUtil.parseJson(jsonFormattedString); Set<Entry<String, Ob...
java
public static Map claimsFromJsonObject(String jsonFormattedString) throws JoseException { Map claimsMap = new ConcurrentHashMap<String, Object>(); // JSONObject jobj = JSONObject.parse(jsonFormattedString); Map<String, Object> jobj = org.jose4j.json.JsonUtil.parseJson(jsonFormattedString); Set<Entry<String, Ob...
[ "public", "static", "Map", "claimsFromJsonObject", "(", "String", "jsonFormattedString", ")", "throws", "JoseException", "{", "Map", "claimsMap", "=", "new", "ConcurrentHashMap", "<", "String", ",", "Object", ">", "(", ")", ";", "// JSONObject jobj = JSONObject.parse(...
assuming payload not the whole token string
[ "assuming", "payload", "not", "the", "whole", "token", "string" ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.security.jwt/src/com/ibm/ws/security/jwt/utils/JwtUtils.java#L207-L233
train
OpenLiberty/open-liberty
dev/com.ibm.ws.security.jwt/src/com/ibm/ws/security/jwt/utils/JwtUtils.java
JwtUtils.trimIt
public static List<String> trimIt(String[] strings) { if (strings == null || strings.length == 0) { return null; } List<String> results = new ArrayList<String>(); for (int i = 0; i < strings.length; i++) { String result = trimIt(strings[i]); if (result != null) { results.add(result); } } ...
java
public static List<String> trimIt(String[] strings) { if (strings == null || strings.length == 0) { return null; } List<String> results = new ArrayList<String>(); for (int i = 0; i < strings.length; i++) { String result = trimIt(strings[i]); if (result != null) { results.add(result); } } ...
[ "public", "static", "List", "<", "String", ">", "trimIt", "(", "String", "[", "]", "strings", ")", "{", "if", "(", "strings", "==", "null", "||", "strings", ".", "length", "==", "0", ")", "{", "return", "null", ";", "}", "List", "<", "String", ">",...
Trims each of the strings in the array provided and returns a new list with each string added to it. If the trimmed string is empty, that string will not be added to the final array. If no entries are present in the final array, null is returned. @param strings @return
[ "Trims", "each", "of", "the", "strings", "in", "the", "array", "provided", "and", "returns", "a", "new", "list", "with", "each", "string", "added", "to", "it", ".", "If", "the", "trimmed", "string", "is", "empty", "that", "string", "will", "not", "be", ...
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.security.jwt/src/com/ibm/ws/security/jwt/utils/JwtUtils.java#L328-L347
train
OpenLiberty/open-liberty
dev/com.ibm.jbatch.container/src/com/ibm/jbatch/container/controller/impl/SingleThreadedStepControllerImpl.java
SingleThreadedStepControllerImpl.invokeCollectorIfPresent
protected void invokeCollectorIfPresent() { if (collectorProxy != null) { Serializable data = collectorProxy.collectPartitionData(); logger.finer("Got partition data: " + data + ", from collector: " + collectorProxy); sendCollectorDataPartitionReplyMsg(data); } }
java
protected void invokeCollectorIfPresent() { if (collectorProxy != null) { Serializable data = collectorProxy.collectPartitionData(); logger.finer("Got partition data: " + data + ", from collector: " + collectorProxy); sendCollectorDataPartitionReplyMsg(data); } }
[ "protected", "void", "invokeCollectorIfPresent", "(", ")", "{", "if", "(", "collectorProxy", "!=", "null", ")", "{", "Serializable", "data", "=", "collectorProxy", ".", "collectPartitionData", "(", ")", ";", "logger", ".", "finer", "(", "\"Got partition data: \"",...
Invoke the user-supplied PartitionCollectorProxy and send the data back to the top-level thread.
[ "Invoke", "the", "user", "-", "supplied", "PartitionCollectorProxy", "and", "send", "the", "data", "back", "to", "the", "top", "-", "level", "thread", "." ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.jbatch.container/src/com/ibm/jbatch/container/controller/impl/SingleThreadedStepControllerImpl.java#L127-L133
train
OpenLiberty/open-liberty
dev/com.ibm.jbatch.container/src/com/ibm/jbatch/container/controller/impl/SingleThreadedStepControllerImpl.java
SingleThreadedStepControllerImpl.sendCollectorDataPartitionReplyMsg
protected void sendCollectorDataPartitionReplyMsg(Serializable data) { if (logger.isLoggable(Level.FINE)) { logger.fine("Sending collector partition data: " + data + " to analyzer queue: " + getPartitionReplyQueue()); } PartitionReplyMsg msg = new PartitionReplyMsg( PartitionReplyMsgType.PARTIT...
java
protected void sendCollectorDataPartitionReplyMsg(Serializable data) { if (logger.isLoggable(Level.FINE)) { logger.fine("Sending collector partition data: " + data + " to analyzer queue: " + getPartitionReplyQueue()); } PartitionReplyMsg msg = new PartitionReplyMsg( PartitionReplyMsgType.PARTIT...
[ "protected", "void", "sendCollectorDataPartitionReplyMsg", "(", "Serializable", "data", ")", "{", "if", "(", "logger", ".", "isLoggable", "(", "Level", ".", "FINE", ")", ")", "{", "logger", ".", "fine", "(", "\"Sending collector partition data: \"", "+", "data", ...
Send sub-job partition thread data back to top-level thread via analyzerStatusQueue.
[ "Send", "sub", "-", "job", "partition", "thread", "data", "back", "to", "top", "-", "level", "thread", "via", "analyzerStatusQueue", "." ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.jbatch.container/src/com/ibm/jbatch/container/controller/impl/SingleThreadedStepControllerImpl.java#L138-L149
train
OpenLiberty/open-liberty
dev/com.ibm.jbatch.container/src/com/ibm/jbatch/container/impl/SkipHandler.java
SkipHandler.initialize
private void initialize(Chunk chunk) { final String mName = "initialize"; if(logger.isLoggable(Level.FINER)) logger.entering(className, mName); try { if (chunk.getSkipLimit() != null){ _skipLimit = Integer.parseInt(chunk.getSkipLimit()); ...
java
private void initialize(Chunk chunk) { final String mName = "initialize"; if(logger.isLoggable(Level.FINER)) logger.entering(className, mName); try { if (chunk.getSkipLimit() != null){ _skipLimit = Integer.parseInt(chunk.getSkipLimit()); ...
[ "private", "void", "initialize", "(", "Chunk", "chunk", ")", "{", "final", "String", "mName", "=", "\"initialize\"", ";", "if", "(", "logger", ".", "isLoggable", "(", "Level", ".", "FINER", ")", ")", "logger", ".", "entering", "(", "className", ",", "mNa...
Read the skip exception lists from the BDS props.
[ "Read", "the", "skip", "exception", "lists", "from", "the", "BDS", "props", "." ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.jbatch.container/src/com/ibm/jbatch/container/impl/SkipHandler.java#L101-L169
train
OpenLiberty/open-liberty
dev/com.ibm.ws.kernel.service/src/com/ibm/wsspi/kernel/service/utils/PathUtils.java
PathUtils.getSymbol
@Trivial public static String getSymbol(String s) { String outputSymbol = null; if (s != null) { if (s.length() > 3) { // ${} .. look for $ int pos = s.indexOf('$'); if (pos >= 0) { // look for { after $ ...
java
@Trivial public static String getSymbol(String s) { String outputSymbol = null; if (s != null) { if (s.length() > 3) { // ${} .. look for $ int pos = s.indexOf('$'); if (pos >= 0) { // look for { after $ ...
[ "@", "Trivial", "public", "static", "String", "getSymbol", "(", "String", "s", ")", "{", "String", "outputSymbol", "=", "null", ";", "if", "(", "s", "!=", "null", ")", "{", "if", "(", "s", ".", "length", "(", ")", ">", "3", ")", "{", "// ${} .. loo...
Answer the first symbolic substitution within a path. See {@link #containsSymbol(String)} for a description of a symbolic substitution. Answer null if the path is null or if the path contains no symbolic substitution. For example, for "leading/trailing" answer null. For example, for "leading/\$\{A\}"/trailing" answ...
[ "Answer", "the", "first", "symbolic", "substitution", "within", "a", "path", "." ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.kernel.service/src/com/ibm/wsspi/kernel/service/utils/PathUtils.java#L537-L560
train
OpenLiberty/open-liberty
dev/com.ibm.ws.kernel.service/src/com/ibm/wsspi/kernel/service/utils/PathUtils.java
PathUtils.getChildUnder
public static String getChildUnder(String path, String parentPath) { int start = parentPath.length(); String local = path.substring(start, path.length()); String name = getFirstPathComponent(local); return name; }
java
public static String getChildUnder(String path, String parentPath) { int start = parentPath.length(); String local = path.substring(start, path.length()); String name = getFirstPathComponent(local); return name; }
[ "public", "static", "String", "getChildUnder", "(", "String", "path", ",", "String", "parentPath", ")", "{", "int", "start", "=", "parentPath", ".", "length", "(", ")", ";", "String", "local", "=", "path", ".", "substring", "(", "start", ",", "path", "."...
Answer the first path element of a path which follows a leading sub-path. For example, for path "/grandParent/parent/child/grandChild" and leading sub-path "/grandParent/parent", answer "child". The result is unpredictable if the leading path does not start the target path, and does not reach a separator character in...
[ "Answer", "the", "first", "path", "element", "of", "a", "path", "which", "follows", "a", "leading", "sub", "-", "path", "." ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.kernel.service/src/com/ibm/wsspi/kernel/service/utils/PathUtils.java#L861-L866
train
OpenLiberty/open-liberty
dev/com.ibm.ws.kernel.service/src/com/ibm/wsspi/kernel/service/utils/PathUtils.java
PathUtils.isNormalizedPathAbsolute
public static boolean isNormalizedPathAbsolute(String nPath) { boolean retval = "..".equals(nPath) || nPath.startsWith("../") || nPath.startsWith("/.."); //System.out.println("returning " + retval); return !retval; }
java
public static boolean isNormalizedPathAbsolute(String nPath) { boolean retval = "..".equals(nPath) || nPath.startsWith("../") || nPath.startsWith("/.."); //System.out.println("returning " + retval); return !retval; }
[ "public", "static", "boolean", "isNormalizedPathAbsolute", "(", "String", "nPath", ")", "{", "boolean", "retval", "=", "\"..\"", ".", "equals", "(", "nPath", ")", "||", "nPath", ".", "startsWith", "(", "\"../\"", ")", "||", "nPath", ".", "startsWith", "(", ...
Tell if a path, if applied to a target location, will reach above the target location. The path must use forward slashes and must have all ".." elements resolved. The path reaches above target locations if it is "..", or if it starts with "../" or starts with "/..". @param normalizedPath The path which is to be teste...
[ "Tell", "if", "a", "path", "if", "applied", "to", "a", "target", "location", "will", "reach", "above", "the", "target", "location", ".", "The", "path", "must", "use", "forward", "slashes", "and", "must", "have", "all", "..", "elements", "resolved", "." ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.kernel.service/src/com/ibm/wsspi/kernel/service/utils/PathUtils.java#L906-L910
train
OpenLiberty/open-liberty
dev/com.ibm.ws.kernel.service/src/com/ibm/wsspi/kernel/service/utils/PathUtils.java
PathUtils.checkAndNormalizeRootPath
public static String checkAndNormalizeRootPath(String path) throws IllegalArgumentException { path = PathUtils.normalizeUnixStylePath(path); //check the path is not trying to go upwards. if (!PathUtils.isNormalizedPathAbsolute(path)) { throw new IllegalArgumentException(); }...
java
public static String checkAndNormalizeRootPath(String path) throws IllegalArgumentException { path = PathUtils.normalizeUnixStylePath(path); //check the path is not trying to go upwards. if (!PathUtils.isNormalizedPathAbsolute(path)) { throw new IllegalArgumentException(); }...
[ "public", "static", "String", "checkAndNormalizeRootPath", "(", "String", "path", ")", "throws", "IllegalArgumentException", "{", "path", "=", "PathUtils", ".", "normalizeUnixStylePath", "(", "path", ")", ";", "//check the path is not trying to go upwards.", "if", "(", ...
Resolve all ".." elements of a path. The path must use forward slashes. Verify that the path does not reach above target elements (see {@link #isUnixStylePathAbsolute(String)}. Add a leading slash if the path does not have one. Remove any trailing slash. Verify that the resulting path is neither empty nor a single ...
[ "Resolve", "all", "..", "elements", "of", "a", "path", ".", "The", "path", "must", "use", "forward", "slashes", "." ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.kernel.service/src/com/ibm/wsspi/kernel/service/utils/PathUtils.java#L930-L954
train
OpenLiberty/open-liberty
dev/com.ibm.ws.kernel.service/src/com/ibm/wsspi/kernel/service/utils/PathUtils.java
PathUtils.checkCase
public static boolean checkCase(final File file, String pathToTest) { if (pathToTest == null || pathToTest.isEmpty()) { return true; } if (IS_OS_CASE_SENSITIVE) { // It is assumed that the file exists. Therefore, its case must // match if we know that the f...
java
public static boolean checkCase(final File file, String pathToTest) { if (pathToTest == null || pathToTest.isEmpty()) { return true; } if (IS_OS_CASE_SENSITIVE) { // It is assumed that the file exists. Therefore, its case must // match if we know that the f...
[ "public", "static", "boolean", "checkCase", "(", "final", "File", "file", ",", "String", "pathToTest", ")", "{", "if", "(", "pathToTest", "==", "null", "||", "pathToTest", ".", "isEmpty", "(", ")", ")", "{", "return", "true", ";", "}", "if", "(", "IS_O...
The artifact API is case sensitive even on a file system that is not case sensitive. This method will test that the case of the supplied <em>existing</em> file matches the case in the pathToTest. It is assumed that you already tested that the file exists using the pathToTest. Therefore, on a case sensitive files syste...
[ "The", "artifact", "API", "is", "case", "sensitive", "even", "on", "a", "file", "system", "that", "is", "not", "case", "sensitive", "." ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.kernel.service/src/com/ibm/wsspi/kernel/service/utils/PathUtils.java#L1252-L1279
train
OpenLiberty/open-liberty
dev/com.ibm.ws.kernel.service/src/com/ibm/wsspi/kernel/service/utils/PathUtils.java
PathUtils.checkCaseCanonical
private static boolean checkCaseCanonical(final File file, String pathToTest) throws PrivilegedActionException { // The canonical path returns the actual path on the file system so get this String onDiskCanonicalPath = AccessController.doPrivileged(new PrivilegedExceptionAction<String>() { /...
java
private static boolean checkCaseCanonical(final File file, String pathToTest) throws PrivilegedActionException { // The canonical path returns the actual path on the file system so get this String onDiskCanonicalPath = AccessController.doPrivileged(new PrivilegedExceptionAction<String>() { /...
[ "private", "static", "boolean", "checkCaseCanonical", "(", "final", "File", "file", ",", "String", "pathToTest", ")", "throws", "PrivilegedActionException", "{", "// The canonical path returns the actual path on the file system so get this", "String", "onDiskCanonicalPath", "=", ...
Test that the path to a file matches a specified path. The test does a case sensitive string comparison of the canonical path of the file with the specified path, restricting the form of the path which may be used for the test. Trailing slashes on either the file or the path are ignored. @param file The file which i...
[ "Test", "that", "the", "path", "to", "a", "file", "matches", "a", "specified", "path", "." ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.kernel.service/src/com/ibm/wsspi/kernel/service/utils/PathUtils.java#L1298-L1330
train
OpenLiberty/open-liberty
dev/com.ibm.ws.kernel.service/src/com/ibm/wsspi/kernel/service/utils/PathUtils.java
PathUtils.checkCaseSymlink
private static boolean checkCaseSymlink(File file, String pathToTest) throws PrivilegedActionException { // java.nio.Path.toRealPath(LinkOption.NOFOLLOW_LINKS) in java 7 seems to do what // we are trying to do here //On certain platforms, i.e. iSeries, the path starts with a slash. //Re...
java
private static boolean checkCaseSymlink(File file, String pathToTest) throws PrivilegedActionException { // java.nio.Path.toRealPath(LinkOption.NOFOLLOW_LINKS) in java 7 seems to do what // we are trying to do here //On certain platforms, i.e. iSeries, the path starts with a slash. //Re...
[ "private", "static", "boolean", "checkCaseSymlink", "(", "File", "file", ",", "String", "pathToTest", ")", "throws", "PrivilegedActionException", "{", "// java.nio.Path.toRealPath(LinkOption.NOFOLLOW_LINKS) in java 7 seems to do what", "// we are trying to do here", "//On certain pla...
Test if a file is reached by a path. Handle symbolic links. The test uses the canonical path of the file, and does a case sensitive string comparison. Ignore a leading slash of the path. @param file The file which is to be tested. @param trailingPath The path which is to be tested. @return True or false telling if t...
[ "Test", "if", "a", "file", "is", "reached", "by", "a", "path", ".", "Handle", "symbolic", "links", ".", "The", "test", "uses", "the", "canonical", "path", "of", "the", "file", "and", "does", "a", "case", "sensitive", "string", "comparison", "." ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.kernel.service/src/com/ibm/wsspi/kernel/service/utils/PathUtils.java#L1347-L1380
train
OpenLiberty/open-liberty
dev/com.ibm.ws.kernel.service/src/com/ibm/wsspi/kernel/service/utils/PathUtils.java
PathUtils.isSymbolicLink
private static boolean isSymbolicLink(final File file, File parentFile) throws PrivilegedActionException { File canonicalParentDir = getCanonicalFile(parentFile); File fileInCanonicalParentDir = new File(canonicalParentDir, file.getName()); File canonicalFile = getCanonicalFile(fileInCanonicalPa...
java
private static boolean isSymbolicLink(final File file, File parentFile) throws PrivilegedActionException { File canonicalParentDir = getCanonicalFile(parentFile); File fileInCanonicalParentDir = new File(canonicalParentDir, file.getName()); File canonicalFile = getCanonicalFile(fileInCanonicalPa...
[ "private", "static", "boolean", "isSymbolicLink", "(", "final", "File", "file", ",", "File", "parentFile", ")", "throws", "PrivilegedActionException", "{", "File", "canonicalParentDir", "=", "getCanonicalFile", "(", "parentFile", ")", ";", "File", "fileInCanonicalPare...
Test if a file is a symbolic link. Test only the file. A symbolic link elsewhere in the path to the file is not detected. Gets the canonical form of the parent directory and appends the file name. Then compares that canonical form of the file to the "Absolute" file. If it doesn't match, then it is a symbolic link. @p...
[ "Test", "if", "a", "file", "is", "a", "symbolic", "link", ".", "Test", "only", "the", "file", ".", "A", "symbolic", "link", "elsewhere", "in", "the", "path", "to", "the", "file", "is", "not", "detected", "." ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.kernel.service/src/com/ibm/wsspi/kernel/service/utils/PathUtils.java#L1399-L1405
train
OpenLiberty/open-liberty
dev/com.ibm.ws.jca.1.7/src/com/ibm/ws/jca17/processor/service/AdministeredObjectResourceFactoryBuilder.java
AdministeredObjectResourceFactoryBuilder.setVariableRegistry
protected void setVariableRegistry(ServiceReference<VariableRegistry> ref) { if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) Tr.debug(tc, "setVariableRegistry", ref); variableRegistryRef.setReference(ref); }
java
protected void setVariableRegistry(ServiceReference<VariableRegistry> ref) { if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) Tr.debug(tc, "setVariableRegistry", ref); variableRegistryRef.setReference(ref); }
[ "protected", "void", "setVariableRegistry", "(", "ServiceReference", "<", "VariableRegistry", ">", "ref", ")", "{", "if", "(", "TraceComponent", ".", "isAnyTracingEnabled", "(", ")", "&&", "tc", ".", "isDebugEnabled", "(", ")", ")", "Tr", ".", "debug", "(", ...
Declarative Services method for setting the VariableRegistry service reference. @param ref reference to the service
[ "Declarative", "Services", "method", "for", "setting", "the", "VariableRegistry", "service", "reference", "." ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jca.1.7/src/com/ibm/ws/jca17/processor/service/AdministeredObjectResourceFactoryBuilder.java#L370-L374
train
OpenLiberty/open-liberty
dev/com.ibm.ws.jca.1.7/src/com/ibm/ws/jca17/processor/service/AdministeredObjectResourceFactoryBuilder.java
AdministeredObjectResourceFactoryBuilder.unsetVariableRegistry
protected void unsetVariableRegistry(ServiceReference<VariableRegistry> ref) { if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) Tr.debug(tc, "unsetVariableRegistry", ref); variableRegistryRef.unsetReference(ref); }
java
protected void unsetVariableRegistry(ServiceReference<VariableRegistry> ref) { if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) Tr.debug(tc, "unsetVariableRegistry", ref); variableRegistryRef.unsetReference(ref); }
[ "protected", "void", "unsetVariableRegistry", "(", "ServiceReference", "<", "VariableRegistry", ">", "ref", ")", "{", "if", "(", "TraceComponent", ".", "isAnyTracingEnabled", "(", ")", "&&", "tc", ".", "isDebugEnabled", "(", ")", ")", "Tr", ".", "debug", "(", ...
Declarative Services method for unsetting the VariableRegistry service reference. @param ref reference to the service
[ "Declarative", "Services", "method", "for", "unsetting", "the", "VariableRegistry", "service", "reference", "." ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jca.1.7/src/com/ibm/ws/jca17/processor/service/AdministeredObjectResourceFactoryBuilder.java#L381-L385
train
OpenLiberty/open-liberty
dev/com.ibm.ws.jca.1.7/src/com/ibm/ws/jca17/processor/service/AdministeredObjectResourceFactoryBuilder.java
AdministeredObjectResourceFactoryBuilder.setWsConfigurationHelper
protected void setWsConfigurationHelper(ServiceReference<WSConfigurationHelper> ref) { if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) Tr.debug(tc, "setWSConfigurationHelper", ref); wsConfigurationHelperRef.setReference(ref); }
java
protected void setWsConfigurationHelper(ServiceReference<WSConfigurationHelper> ref) { if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) Tr.debug(tc, "setWSConfigurationHelper", ref); wsConfigurationHelperRef.setReference(ref); }
[ "protected", "void", "setWsConfigurationHelper", "(", "ServiceReference", "<", "WSConfigurationHelper", ">", "ref", ")", "{", "if", "(", "TraceComponent", ".", "isAnyTracingEnabled", "(", ")", "&&", "tc", ".", "isDebugEnabled", "(", ")", ")", "Tr", ".", "debug",...
Declarative Services method for setting the WSConfigurationHelper service reference. @param ref reference to the service
[ "Declarative", "Services", "method", "for", "setting", "the", "WSConfigurationHelper", "service", "reference", "." ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jca.1.7/src/com/ibm/ws/jca17/processor/service/AdministeredObjectResourceFactoryBuilder.java#L392-L396
train
OpenLiberty/open-liberty
dev/com.ibm.ws.jca.1.7/src/com/ibm/ws/jca17/processor/service/AdministeredObjectResourceFactoryBuilder.java
AdministeredObjectResourceFactoryBuilder.unsetWsConfigurationHelper
protected void unsetWsConfigurationHelper(ServiceReference<WSConfigurationHelper> ref) { if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) Tr.debug(tc, "unsetVariableRegistry", ref); wsConfigurationHelperRef.unsetReference(ref); }
java
protected void unsetWsConfigurationHelper(ServiceReference<WSConfigurationHelper> ref) { if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) Tr.debug(tc, "unsetVariableRegistry", ref); wsConfigurationHelperRef.unsetReference(ref); }
[ "protected", "void", "unsetWsConfigurationHelper", "(", "ServiceReference", "<", "WSConfigurationHelper", ">", "ref", ")", "{", "if", "(", "TraceComponent", ".", "isAnyTracingEnabled", "(", ")", "&&", "tc", ".", "isDebugEnabled", "(", ")", ")", "Tr", ".", "debug...
Declarative Services method for unsetting the WSConfigurationHelper service reference. @param ref reference to the service
[ "Declarative", "Services", "method", "for", "unsetting", "the", "WSConfigurationHelper", "service", "reference", "." ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jca.1.7/src/com/ibm/ws/jca17/processor/service/AdministeredObjectResourceFactoryBuilder.java#L403-L407
train
OpenLiberty/open-liberty
dev/com.ibm.ws.jca.1.7/src/com/ibm/ws/jca17/processor/service/AdministeredObjectResourceFactoryBuilder.java
AdministeredObjectResourceFactoryBuilder.setMetaTypeService
protected void setMetaTypeService(ServiceReference<MetaTypeService> ref) { if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) Tr.debug(tc, "setMetaTypeService", ref); metaTypeServiceRef.setReference(ref); }
java
protected void setMetaTypeService(ServiceReference<MetaTypeService> ref) { if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) Tr.debug(tc, "setMetaTypeService", ref); metaTypeServiceRef.setReference(ref); }
[ "protected", "void", "setMetaTypeService", "(", "ServiceReference", "<", "MetaTypeService", ">", "ref", ")", "{", "if", "(", "TraceComponent", ".", "isAnyTracingEnabled", "(", ")", "&&", "tc", ".", "isDebugEnabled", "(", ")", ")", "Tr", ".", "debug", "(", "t...
Declarative Services method for setting the MetaTypeService service reference. @param ref reference to the service
[ "Declarative", "Services", "method", "for", "setting", "the", "MetaTypeService", "service", "reference", "." ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jca.1.7/src/com/ibm/ws/jca17/processor/service/AdministeredObjectResourceFactoryBuilder.java#L414-L418
train
OpenLiberty/open-liberty
dev/com.ibm.ws.jca.1.7/src/com/ibm/ws/jca17/processor/service/AdministeredObjectResourceFactoryBuilder.java
AdministeredObjectResourceFactoryBuilder.unsetMetaTypeService
protected void unsetMetaTypeService(ServiceReference<MetaTypeService> ref) { if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) Tr.debug(tc, "unsetMetaTypeService", ref); metaTypeServiceRef.unsetReference(ref); }
java
protected void unsetMetaTypeService(ServiceReference<MetaTypeService> ref) { if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) Tr.debug(tc, "unsetMetaTypeService", ref); metaTypeServiceRef.unsetReference(ref); }
[ "protected", "void", "unsetMetaTypeService", "(", "ServiceReference", "<", "MetaTypeService", ">", "ref", ")", "{", "if", "(", "TraceComponent", ".", "isAnyTracingEnabled", "(", ")", "&&", "tc", ".", "isDebugEnabled", "(", ")", ")", "Tr", ".", "debug", "(", ...
Declarative Services method for unsetting the MetaTypeService service reference. @param ref reference to the service
[ "Declarative", "Services", "method", "for", "unsetting", "the", "MetaTypeService", "service", "reference", "." ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jca.1.7/src/com/ibm/ws/jca17/processor/service/AdministeredObjectResourceFactoryBuilder.java#L425-L429
train
OpenLiberty/open-liberty
dev/com.ibm.ws.jsf.2.2/src/org/apache/myfaces/cdi/util/BeanProvider.java
BeanProvider.getContextualReference
private static <T> T getContextualReference(Class<T> type, BeanManager beanManager, Set<Bean<?>> beans) { Bean<?> bean = beanManager.resolve(beans); //logWarningIfDependent(bean); CreationalContext<?> creationalContext = beanManager.createCreationalContext(bean); @SuppressWarnings...
java
private static <T> T getContextualReference(Class<T> type, BeanManager beanManager, Set<Bean<?>> beans) { Bean<?> bean = beanManager.resolve(beans); //logWarningIfDependent(bean); CreationalContext<?> creationalContext = beanManager.createCreationalContext(bean); @SuppressWarnings...
[ "private", "static", "<", "T", ">", "T", "getContextualReference", "(", "Class", "<", "T", ">", "type", ",", "BeanManager", "beanManager", ",", "Set", "<", "Bean", "<", "?", ">", ">", "beans", ")", "{", "Bean", "<", "?", ">", "bean", "=", "beanManage...
Internal helper method to resolve the right bean and resolve the contextual reference. @param type the type of the bean in question @param beanManager current bean-manager @param beans beans in question @param <T> target type @return the contextual reference
[ "Internal", "helper", "method", "to", "resolve", "the", "right", "bean", "and", "resolve", "the", "contextual", "reference", "." ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jsf.2.2/src/org/apache/myfaces/cdi/util/BeanProvider.java#L411-L422
train
OpenLiberty/open-liberty
dev/com.ibm.tx.core/src/com/ibm/ws/Transaction/JTA/Util.java
Util.printStatus
public static String printStatus(int status) { switch (status) { case Status.STATUS_ACTIVE: return "Status.STATUS_ACTIVE"; case Status.STATUS_COMMITTED: return "Status.STATUS_COMMITTED"; case Status.STATUS_COMMITTING: return "Status.STATUS_...
java
public static String printStatus(int status) { switch (status) { case Status.STATUS_ACTIVE: return "Status.STATUS_ACTIVE"; case Status.STATUS_COMMITTED: return "Status.STATUS_COMMITTED"; case Status.STATUS_COMMITTING: return "Status.STATUS_...
[ "public", "static", "String", "printStatus", "(", "int", "status", ")", "{", "switch", "(", "status", ")", "{", "case", "Status", ".", "STATUS_ACTIVE", ":", "return", "\"Status.STATUS_ACTIVE\"", ";", "case", "Status", ".", "STATUS_COMMITTED", ":", "return", "\...
Convert JTA transaction status to String representation
[ "Convert", "JTA", "transaction", "status", "to", "String", "representation" ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.tx.core/src/com/ibm/ws/Transaction/JTA/Util.java#L36-L61
train
OpenLiberty/open-liberty
dev/com.ibm.tx.core/src/com/ibm/ws/Transaction/JTA/Util.java
Util.printFlag
public static String printFlag(int flags) { StringBuffer sb = new StringBuffer(); sb.append(Integer.toHexString(flags)); sb.append("="); if (flags == XAResource.TMNOFLAGS) { sb.append("TMNOFLAGS"); } else { if ((flags & XAResou...
java
public static String printFlag(int flags) { StringBuffer sb = new StringBuffer(); sb.append(Integer.toHexString(flags)); sb.append("="); if (flags == XAResource.TMNOFLAGS) { sb.append("TMNOFLAGS"); } else { if ((flags & XAResou...
[ "public", "static", "String", "printFlag", "(", "int", "flags", ")", "{", "StringBuffer", "sb", "=", "new", "StringBuffer", "(", ")", ";", "sb", ".", "append", "(", "Integer", ".", "toHexString", "(", "flags", ")", ")", ";", "sb", ".", "append", "(", ...
Translate flags defined in javax.transaction.xa.XAResource into string representation
[ "Translate", "flags", "defined", "in", "javax", ".", "transaction", ".", "xa", ".", "XAResource", "into", "string", "representation" ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.tx.core/src/com/ibm/ws/Transaction/JTA/Util.java#L68-L92
train
OpenLiberty/open-liberty
dev/com.ibm.tx.core/src/com/ibm/ws/Transaction/JTA/Util.java
Util.identity
public static String identity(java.lang.Object x) { if (x == null) return "" + x; return(x.getClass().getName() + "@" + Integer.toHexString(System.identityHashCode(x))); }
java
public static String identity(java.lang.Object x) { if (x == null) return "" + x; return(x.getClass().getName() + "@" + Integer.toHexString(System.identityHashCode(x))); }
[ "public", "static", "String", "identity", "(", "java", ".", "lang", ".", "Object", "x", ")", "{", "if", "(", "x", "==", "null", ")", "return", "\"\"", "+", "x", ";", "return", "(", "x", ".", "getClass", "(", ")", ".", "getName", "(", ")", "+", ...
toString Helper when object is Corba Ref and we do not want IOR in the trace
[ "toString", "Helper", "when", "object", "is", "Corba", "Ref", "and", "we", "do", "not", "want", "IOR", "in", "the", "trace" ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.tx.core/src/com/ibm/ws/Transaction/JTA/Util.java#L98-L102
train
OpenLiberty/open-liberty
dev/com.ibm.tx.core/src/com/ibm/ws/Transaction/JTA/Util.java
Util.duplicateByteArray
public static byte[] duplicateByteArray(byte[] in, int offset, int length) { if (in == null) return null; byte[] out = new byte[length]; System.arraycopy(in, offset, out, 0, length); return out; }
java
public static byte[] duplicateByteArray(byte[] in, int offset, int length) { if (in == null) return null; byte[] out = new byte[length]; System.arraycopy(in, offset, out, 0, length); return out; }
[ "public", "static", "byte", "[", "]", "duplicateByteArray", "(", "byte", "[", "]", "in", ",", "int", "offset", ",", "int", "length", ")", "{", "if", "(", "in", "==", "null", ")", "return", "null", ";", "byte", "[", "]", "out", "=", "new", "byte", ...
Duplicate a piece of a byte array.
[ "Duplicate", "a", "piece", "of", "a", "byte", "array", "." ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.tx.core/src/com/ibm/ws/Transaction/JTA/Util.java#L119-L127
train
OpenLiberty/open-liberty
dev/com.ibm.tx.core/src/com/ibm/ws/Transaction/JTA/Util.java
Util.setBytesFromInt
public static void setBytesFromInt(byte[] bytes, int offset, int byteCount, int value) { long maxval = ((1L << (8 * byteCount)) - 1); if (value > maxval) { ...
java
public static void setBytesFromInt(byte[] bytes, int offset, int byteCount, int value) { long maxval = ((1L << (8 * byteCount)) - 1); if (value > maxval) { ...
[ "public", "static", "void", "setBytesFromInt", "(", "byte", "[", "]", "bytes", ",", "int", "offset", ",", "int", "byteCount", ",", "int", "value", ")", "{", "long", "maxval", "=", "(", "(", "1L", "<<", "(", "8", "*", "byteCount", ")", ")", "-", "1"...
Utility function to set sequence numbers in big-endian format in a byte array.
[ "Utility", "function", "to", "set", "sequence", "numbers", "in", "big", "-", "endian", "format", "in", "a", "byte", "array", "." ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.tx.core/src/com/ibm/ws/Transaction/JTA/Util.java#L171-L205
train
OpenLiberty/open-liberty
dev/com.ibm.tx.core/src/com/ibm/ws/Transaction/JTA/Util.java
Util.getLongFromBytes
public static long getLongFromBytes(byte[] bytes, int offset) { if (tc.isEntryEnabled()) Tr.entry(tc, "getLongFromBytes: length = " + bytes.length + ", data = " + toHexString(bytes)); long result = -1; if (bytes.length >= offset + 8) ...
java
public static long getLongFromBytes(byte[] bytes, int offset) { if (tc.isEntryEnabled()) Tr.entry(tc, "getLongFromBytes: length = " + bytes.length + ", data = " + toHexString(bytes)); long result = -1; if (bytes.length >= offset + 8) ...
[ "public", "static", "long", "getLongFromBytes", "(", "byte", "[", "]", "bytes", ",", "int", "offset", ")", "{", "if", "(", "tc", ".", "isEntryEnabled", "(", ")", ")", "Tr", ".", "entry", "(", "tc", ",", "\"getLongFromBytes: length = \"", "+", "bytes", "....
Utility function which extracts a long from a byte array representation in big endian format
[ "Utility", "function", "which", "extracts", "a", "long", "from", "a", "byte", "array", "representation", "in", "big", "endian", "format" ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.tx.core/src/com/ibm/ws/Transaction/JTA/Util.java#L210-L230
train
OpenLiberty/open-liberty
dev/com.ibm.tx.core/src/com/ibm/ws/Transaction/JTA/Util.java
Util.longToBytes
public static byte[] longToBytes(long rmid) { return new byte[] { (byte)(rmid>>56), (byte)(rmid>>48), (byte)(rmid>>40), (byte)(rmid>>32), (byte)(rmid>>24), (byte)(rmid>>16), (byte)(rmid>>8), (byte)(rmid)}; }
java
public static byte[] longToBytes(long rmid) { return new byte[] { (byte)(rmid>>56), (byte)(rmid>>48), (byte)(rmid>>40), (byte)(rmid>>32), (byte)(rmid>>24), (byte)(rmid>>16), (byte)(rmid>>8), (byte)(rmid)}; }
[ "public", "static", "byte", "[", "]", "longToBytes", "(", "long", "rmid", ")", "{", "return", "new", "byte", "[", "]", "{", "(", "byte", ")", "(", "rmid", ">>", "56", ")", ",", "(", "byte", ")", "(", "rmid", ">>", "48", ")", ",", "(", "byte", ...
Utility function which transfers a long to a byte array in big endian format.
[ "Utility", "function", "which", "transfers", "a", "long", "to", "a", "byte", "array", "in", "big", "endian", "format", "." ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.tx.core/src/com/ibm/ws/Transaction/JTA/Util.java#L236-L240
train
OpenLiberty/open-liberty
dev/com.ibm.tx.core/src/com/ibm/ws/Transaction/JTA/Util.java
Util.equal
public static boolean equal(byte[] a, byte[] b) { if (a == b) return (true); if ((a == null) || (b == null)) return (false); if (a.length != b.length) return (false); for (int i = 0; i < a.length; i++) if (a[i] != b[i]) return (false); ...
java
public static boolean equal(byte[] a, byte[] b) { if (a == b) return (true); if ((a == null) || (b == null)) return (false); if (a.length != b.length) return (false); for (int i = 0; i < a.length; i++) if (a[i] != b[i]) return (false); ...
[ "public", "static", "boolean", "equal", "(", "byte", "[", "]", "a", ",", "byte", "[", "]", "b", ")", "{", "if", "(", "a", "==", "b", ")", "return", "(", "true", ")", ";", "if", "(", "(", "a", "==", "null", ")", "||", "(", "b", "==", "null",...
Returns true if the byte arrays are identical; false otherwise.
[ "Returns", "true", "if", "the", "byte", "arrays", "are", "identical", ";", "false", "otherwise", "." ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.tx.core/src/com/ibm/ws/Transaction/JTA/Util.java#L269-L280
train
OpenLiberty/open-liberty
dev/com.ibm.tx.core/src/com/ibm/ws/Transaction/JTA/Util.java
Util.byteArrayToString
public static String byteArrayToString(byte[] b) { final int l = b.length/2; if (l*2 != b.length) throw new IllegalArgumentException(); StringBuffer result = new StringBuffer(l); int o = 0; for (int i = 0; i < l; i++) { int i1 = b[o++] & 0xff; int i2 = b[o...
java
public static String byteArrayToString(byte[] b) { final int l = b.length/2; if (l*2 != b.length) throw new IllegalArgumentException(); StringBuffer result = new StringBuffer(l); int o = 0; for (int i = 0; i < l; i++) { int i1 = b[o++] & 0xff; int i2 = b[o...
[ "public", "static", "String", "byteArrayToString", "(", "byte", "[", "]", "b", ")", "{", "final", "int", "l", "=", "b", ".", "length", "/", "2", ";", "if", "(", "l", "*", "2", "!=", "b", ".", "length", ")", "throw", "new", "IllegalArgumentException",...
Converts a double byte array to a string.
[ "Converts", "a", "double", "byte", "array", "to", "a", "string", "." ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.tx.core/src/com/ibm/ws/Transaction/JTA/Util.java#L285-L299
train
OpenLiberty/open-liberty
dev/com.ibm.tx.core/src/com/ibm/ws/Transaction/JTA/Util.java
Util.stackToDebugString
public static String stackToDebugString(Throwable e) { StringWriter sw = new StringWriter(); PrintWriter pw = new PrintWriter(sw); e.printStackTrace(pw); pw.close(); String text = sw.toString(); // Jump past the throwable text = text.substring(text.indexO...
java
public static String stackToDebugString(Throwable e) { StringWriter sw = new StringWriter(); PrintWriter pw = new PrintWriter(sw); e.printStackTrace(pw); pw.close(); String text = sw.toString(); // Jump past the throwable text = text.substring(text.indexO...
[ "public", "static", "String", "stackToDebugString", "(", "Throwable", "e", ")", "{", "StringWriter", "sw", "=", "new", "StringWriter", "(", ")", ";", "PrintWriter", "pw", "=", "new", "PrintWriter", "(", "sw", ")", ";", "e", ".", "printStackTrace", "(", "pw...
Get a string containing the stack of the specified exception @param e @return
[ "Get", "a", "string", "containing", "the", "stack", "of", "the", "specified", "exception" ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.tx.core/src/com/ibm/ws/Transaction/JTA/Util.java#L307-L317
train
OpenLiberty/open-liberty
dev/com.ibm.ws.security/src/com/ibm/ws/security/krb5/Krb5Common.java
Krb5Common.setPropertyAsNeeded
@SuppressWarnings({ "unchecked", "rawtypes" }) public static String setPropertyAsNeeded(final String propName, final String propValue) { String previousPropValue = (String) java.security.AccessController.doPrivileged(new java.security.PrivilegedAction() { @Override public String run...
java
@SuppressWarnings({ "unchecked", "rawtypes" }) public static String setPropertyAsNeeded(final String propName, final String propValue) { String previousPropValue = (String) java.security.AccessController.doPrivileged(new java.security.PrivilegedAction() { @Override public String run...
[ "@", "SuppressWarnings", "(", "{", "\"unchecked\"", ",", "\"rawtypes\"", "}", ")", "public", "static", "String", "setPropertyAsNeeded", "(", "final", "String", "propName", ",", "final", "String", "propValue", ")", "{", "String", "previousPropValue", "=", "(", "S...
This method set the system property if the property is null or property value is not the same with the new value @param propName @param propValue @return
[ "This", "method", "set", "the", "system", "property", "if", "the", "property", "is", "null", "or", "property", "value", "is", "not", "the", "same", "with", "the", "new", "value" ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.security/src/com/ibm/ws/security/krb5/Krb5Common.java#L76-L95
train
OpenLiberty/open-liberty
dev/com.ibm.ws.security/src/com/ibm/ws/security/krb5/Krb5Common.java
Krb5Common.restorePropertyAsNeeded
public static void restorePropertyAsNeeded(final String propName, final String oldPropValue, final String newPropValue) { java.security.AccessController.doPrivileged(new java.security.PrivilegedAction<Object>() { @Override public Object run() { if (oldPropValue == null) {...
java
public static void restorePropertyAsNeeded(final String propName, final String oldPropValue, final String newPropValue) { java.security.AccessController.doPrivileged(new java.security.PrivilegedAction<Object>() { @Override public Object run() { if (oldPropValue == null) {...
[ "public", "static", "void", "restorePropertyAsNeeded", "(", "final", "String", "propName", ",", "final", "String", "oldPropValue", ",", "final", "String", "newPropValue", ")", "{", "java", ".", "security", ".", "AccessController", ".", "doPrivileged", "(", "new", ...
This method restore the property value to the original value. @param propName @param oldPropValue @param newPropValue
[ "This", "method", "restore", "the", "property", "value", "to", "the", "original", "value", "." ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.security/src/com/ibm/ws/security/krb5/Krb5Common.java#L104-L118
train
OpenLiberty/open-liberty
dev/com.ibm.ws.jca.cm/src/com/ibm/ejs/j2c/SharedPool.java
SharedPool.setSharedConnection
protected void setSharedConnection(Object affinity, MCWrapper mcWrapper) { final boolean isTracingEnabled = TraceComponent.isAnyTracingEnabled(); if (isTracingEnabled && tc.isEntryEnabled()) { Tr.entry(this, tc, "setSharedConnection"); } /* * Set the shared pool af...
java
protected void setSharedConnection(Object affinity, MCWrapper mcWrapper) { final boolean isTracingEnabled = TraceComponent.isAnyTracingEnabled(); if (isTracingEnabled && tc.isEntryEnabled()) { Tr.entry(this, tc, "setSharedConnection"); } /* * Set the shared pool af...
[ "protected", "void", "setSharedConnection", "(", "Object", "affinity", ",", "MCWrapper", "mcWrapper", ")", "{", "final", "boolean", "isTracingEnabled", "=", "TraceComponent", ".", "isAnyTracingEnabled", "(", ")", ";", "if", "(", "isTracingEnabled", "&&", "tc", "."...
Adds a shared connection to the list
[ "Adds", "a", "shared", "connection", "to", "the", "list" ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jca.cm/src/com/ibm/ejs/j2c/SharedPool.java#L521-L557
train
OpenLiberty/open-liberty
dev/com.ibm.ws.jca.cm/src/com/ibm/ejs/j2c/SharedPool.java
SharedPool.removeSharedConnection
protected void removeSharedConnection(MCWrapper mcWrapper) throws ResourceException { final boolean isTracingEnabled = TraceComponent.isAnyTracingEnabled(); boolean removedSharedConnection = false; if (isTracingEnabled && tc.isEntryEnabled()) { Tr.entry(this, tc, "removeSharedConn...
java
protected void removeSharedConnection(MCWrapper mcWrapper) throws ResourceException { final boolean isTracingEnabled = TraceComponent.isAnyTracingEnabled(); boolean removedSharedConnection = false; if (isTracingEnabled && tc.isEntryEnabled()) { Tr.entry(this, tc, "removeSharedConn...
[ "protected", "void", "removeSharedConnection", "(", "MCWrapper", "mcWrapper", ")", "throws", "ResourceException", "{", "final", "boolean", "isTracingEnabled", "=", "TraceComponent", ".", "isAnyTracingEnabled", "(", ")", ";", "boolean", "removedSharedConnection", "=", "f...
Remove a shared connection from the list
[ "Remove", "a", "shared", "connection", "from", "the", "list" ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jca.cm/src/com/ibm/ejs/j2c/SharedPool.java#L575-L664
train
OpenLiberty/open-liberty
dev/com.ibm.websphere.security/src/com/ibm/websphere/security/audit/context/AuditManager.java
AuditManager.setDelegatedUsers
public void setDelegatedUsers(ArrayList<String> delegatedUsers) { AuditThreadContext auditThreadContext = getAuditThreadContext(); auditThreadContext.setDelegatedUsers(delegatedUsers); }
java
public void setDelegatedUsers(ArrayList<String> delegatedUsers) { AuditThreadContext auditThreadContext = getAuditThreadContext(); auditThreadContext.setDelegatedUsers(delegatedUsers); }
[ "public", "void", "setDelegatedUsers", "(", "ArrayList", "<", "String", ">", "delegatedUsers", ")", "{", "AuditThreadContext", "auditThreadContext", "=", "getAuditThreadContext", "(", ")", ";", "auditThreadContext", ".", "setDelegatedUsers", "(", "delegatedUsers", ")", ...
Sets the list of users from the initial caller through the last caller in a runAs delegation call
[ "Sets", "the", "list", "of", "users", "from", "the", "initial", "caller", "through", "the", "last", "caller", "in", "a", "runAs", "delegation", "call" ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.websphere.security/src/com/ibm/websphere/security/audit/context/AuditManager.java#L341-L344
train
OpenLiberty/open-liberty
dev/com.ibm.ws.jaxrs.2.0.common/src/org/apache/cxf/jaxrs/model/ProviderInfo.java
ProviderInfo.setProvider
public void setProvider(Object pObj) { if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) { Tr.debug(tc, "setProvider pre: pObj(class)=" + pObj.getClass() + " isProxy=" + Proxy.isProxyClass(pObj.getClass()) + " provider=" + (provider==null?"null":provider.getClass()) + ...
java
public void setProvider(Object pObj) { if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) { Tr.debug(tc, "setProvider pre: pObj(class)=" + pObj.getClass() + " isProxy=" + Proxy.isProxyClass(pObj.getClass()) + " provider=" + (provider==null?"null":provider.getClass()) + ...
[ "public", "void", "setProvider", "(", "Object", "pObj", ")", "{", "if", "(", "TraceComponent", ".", "isAnyTracingEnabled", "(", ")", "&&", "tc", ".", "isDebugEnabled", "(", ")", ")", "{", "Tr", ".", "debug", "(", "tc", ",", "\"setProvider pre: pObj(class)=\"...
we need use this interface to replace the provider object @param pObj
[ "we", "need", "use", "this", "interface", "to", "replace", "the", "provider", "object" ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jaxrs.2.0.common/src/org/apache/cxf/jaxrs/model/ProviderInfo.java#L122-L136
train
OpenLiberty/open-liberty
dev/com.ibm.ws.security.fat.common/src/com/ibm/ws/security/fat/common/expectations/JsonObjectExpectation.java
JsonObjectExpectation.readJsonFromContent
protected JsonObject readJsonFromContent(Object contentToValidate) throws Exception { if (contentToValidate == null) { throw new Exception("Provided content is null so cannot be validated."); } JsonObject obj = null; try { String responseText = WebResponseUtils.ge...
java
protected JsonObject readJsonFromContent(Object contentToValidate) throws Exception { if (contentToValidate == null) { throw new Exception("Provided content is null so cannot be validated."); } JsonObject obj = null; try { String responseText = WebResponseUtils.ge...
[ "protected", "JsonObject", "readJsonFromContent", "(", "Object", "contentToValidate", ")", "throws", "Exception", "{", "if", "(", "contentToValidate", "==", "null", ")", "{", "throw", "new", "Exception", "(", "\"Provided content is null so cannot be validated.\"", ")", ...
Attempts to read the response text in the provided object as a JSON string and convert it to its corresponding JsonObject representation. Extending classes should override this method if they do not expect the content to be a pure JSON string. For example, if the provided object is an instance of WebResponse whose resp...
[ "Attempts", "to", "read", "the", "response", "text", "in", "the", "provided", "object", "as", "a", "JSON", "string", "and", "convert", "it", "to", "its", "corresponding", "JsonObject", "representation", ".", "Extending", "classes", "should", "override", "this", ...
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.security.fat.common/src/com/ibm/ws/security/fat/common/expectations/JsonObjectExpectation.java#L121-L133
train
OpenLiberty/open-liberty
dev/com.ibm.websphere.security/src/com/ibm/websphere/security/WebSphereSecurityPermission.java
WebSphereSecurityPermission.init
private void init(int max) { if ((max != INTERNAL) && (max != PROVIDER) && (max != PRIVILEGED)) throw new IllegalArgumentException("invalid action"); if (max == NONE) throw new IllegalArgumentException("missing action"); if (getName() == null) throw new Null...
java
private void init(int max) { if ((max != INTERNAL) && (max != PROVIDER) && (max != PRIVILEGED)) throw new IllegalArgumentException("invalid action"); if (max == NONE) throw new IllegalArgumentException("missing action"); if (getName() == null) throw new Null...
[ "private", "void", "init", "(", "int", "max", ")", "{", "if", "(", "(", "max", "!=", "INTERNAL", ")", "&&", "(", "max", "!=", "PROVIDER", ")", "&&", "(", "max", "!=", "PRIVILEGED", ")", ")", "throw", "new", "IllegalArgumentException", "(", "\"invalid a...
initialize a WebSphereSecurityPermission object. Common to all constructors. @param max the most privileged permission to use.
[ "initialize", "a", "WebSphereSecurityPermission", "object", ".", "Common", "to", "all", "constructors", "." ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.websphere.security/src/com/ibm/websphere/security/WebSphereSecurityPermission.java#L75-L86
train
OpenLiberty/open-liberty
dev/com.ibm.websphere.security/src/com/ibm/websphere/security/WebSphereSecurityPermission.java
WebSphereSecurityPermission.getMax
private static int getMax(String action) { int max = NONE; if (action == null) { if (tc.isDebugEnabled()) { Tr.debug(tc, "WebSphereSecurityPermission action should not be null"); } return max; } if (INTERNAL_STR.equalsIgnoreCase(acti...
java
private static int getMax(String action) { int max = NONE; if (action == null) { if (tc.isDebugEnabled()) { Tr.debug(tc, "WebSphereSecurityPermission action should not be null"); } return max; } if (INTERNAL_STR.equalsIgnoreCase(acti...
[ "private", "static", "int", "getMax", "(", "String", "action", ")", "{", "int", "max", "=", "NONE", ";", "if", "(", "action", "==", "null", ")", "{", "if", "(", "tc", ".", "isDebugEnabled", "(", ")", ")", "{", "Tr", ".", "debug", "(", "tc", ",", ...
Converts an action String to a permission value. @param action the action string. @return the max permission.
[ "Converts", "an", "action", "String", "to", "a", "permission", "value", "." ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.websphere.security/src/com/ibm/websphere/security/WebSphereSecurityPermission.java#L136-L173
train
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/impl/store/itemstreams/SIMPReferenceStream.java
SIMPReferenceStream.removeAll
public void removeAll(Transaction tran) throws MessageStoreException { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "removeAll", tran); while(this.removeFirstMatching(null, tran) != null); remove(tran, NO_LOCK_ID); if (TraceComponent.isAnyTracingEnabled() &...
java
public void removeAll(Transaction tran) throws MessageStoreException { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "removeAll", tran); while(this.removeFirstMatching(null, tran) != null); remove(tran, NO_LOCK_ID); if (TraceComponent.isAnyTracingEnabled() &...
[ "public", "void", "removeAll", "(", "Transaction", "tran", ")", "throws", "MessageStoreException", "{", "if", "(", "TraceComponent", ".", "isAnyTracingEnabled", "(", ")", "&&", "tc", ".", "isEntryEnabled", "(", ")", ")", "SibTr", ".", "entry", "(", "tc", ","...
Removes all items from this reference stream @param tran - the transaction to perform the removals under @throws MessageStoreException
[ "Removes", "all", "items", "from", "this", "reference", "stream" ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/impl/store/itemstreams/SIMPReferenceStream.java#L106-L117
train
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/impl/store/itemstreams/SIMPReferenceStream.java
SIMPReferenceStream.setStorageStrategy
protected final void setStorageStrategy(int setStrategy) { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "setStorageStrategy", new Integer(setStrategy)); storageStrategy = setStrategy; if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.e...
java
protected final void setStorageStrategy(int setStrategy) { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "setStorageStrategy", new Integer(setStrategy)); storageStrategy = setStrategy; if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.e...
[ "protected", "final", "void", "setStorageStrategy", "(", "int", "setStrategy", ")", "{", "if", "(", "TraceComponent", ".", "isAnyTracingEnabled", "(", ")", "&&", "tc", ".", "isEntryEnabled", "(", ")", ")", "SibTr", ".", "entry", "(", "tc", ",", "\"setStorage...
Set the storage strategy of this stream. Needs to be called before the stream is actually stored. @param setStrategy
[ "Set", "the", "storage", "strategy", "of", "this", "stream", ".", "Needs", "to", "be", "called", "before", "the", "stream", "is", "actually", "stored", "." ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/impl/store/itemstreams/SIMPReferenceStream.java#L138-L147
train
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/impl/store/itemstreams/SIMPReferenceStream.java
SIMPReferenceStream.getPersistentVersion
public int getPersistentVersion() { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) { SibTr.entry(tc, "getPersistentVersion"); SibTr.exit(tc, "getPersistentVersion", new Integer(DEFAULT_PERSISTENT_VERSION)); } return DEFAULT_PERSISTENT_VERSION; }
java
public int getPersistentVersion() { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) { SibTr.entry(tc, "getPersistentVersion"); SibTr.exit(tc, "getPersistentVersion", new Integer(DEFAULT_PERSISTENT_VERSION)); } return DEFAULT_PERSISTENT_VERSION; }
[ "public", "int", "getPersistentVersion", "(", ")", "{", "if", "(", "TraceComponent", ".", "isAnyTracingEnabled", "(", ")", "&&", "tc", ".", "isEntryEnabled", "(", ")", ")", "{", "SibTr", ".", "entry", "(", "tc", ",", "\"getPersistentVersion\"", ")", ";", "...
Return the class version number when the MessageStore wants to persist the object. Each class will have its own version number. Any time the data persisted is changed, this version will have to be incremented so that the restore routine can distinguish between old and new objects and act accordingly.
[ "Return", "the", "class", "version", "number", "when", "the", "MessageStore", "wants", "to", "persist", "the", "object", ".", "Each", "class", "will", "have", "its", "own", "version", "number", ".", "Any", "time", "the", "data", "persisted", "is", "changed",...
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/impl/store/itemstreams/SIMPReferenceStream.java#L156-L165
train
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/impl/store/itemstreams/SIMPReferenceStream.java
SIMPReferenceStream.addUnrestoredMsgId
public void addUnrestoredMsgId(long msgId) { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "addUnrestoredMsgId", new Long(msgId)); unrestoredMsgIds.add(new Long(msgId)); if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(tc, "addUnr...
java
public void addUnrestoredMsgId(long msgId) { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "addUnrestoredMsgId", new Long(msgId)); unrestoredMsgIds.add(new Long(msgId)); if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(tc, "addUnr...
[ "public", "void", "addUnrestoredMsgId", "(", "long", "msgId", ")", "{", "if", "(", "TraceComponent", ".", "isAnyTracingEnabled", "(", ")", "&&", "tc", ".", "isEntryEnabled", "(", ")", ")", "SibTr", ".", "entry", "(", "tc", ",", "\"addUnrestoredMsgId\"", ",",...
Adds a msgId to the list of uninitialised msg references
[ "Adds", "a", "msgId", "to", "the", "list", "of", "uninitialised", "msg", "references" ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/impl/store/itemstreams/SIMPReferenceStream.java#L344-L353
train
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/impl/store/itemstreams/SIMPReferenceStream.java
SIMPReferenceStream.clearUnrestoredMessages
public Collection clearUnrestoredMessages() { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "clearUnrestoredMessages"); Collection returnCollection = unrestoredMsgIds; // bug fix unrestoredMsgIds = new ArrayList(); if (TraceComponent.isAnyTracingEnabled()...
java
public Collection clearUnrestoredMessages() { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "clearUnrestoredMessages"); Collection returnCollection = unrestoredMsgIds; // bug fix unrestoredMsgIds = new ArrayList(); if (TraceComponent.isAnyTracingEnabled()...
[ "public", "Collection", "clearUnrestoredMessages", "(", ")", "{", "if", "(", "TraceComponent", ".", "isAnyTracingEnabled", "(", ")", "&&", "tc", ".", "isEntryEnabled", "(", ")", ")", "SibTr", ".", "entry", "(", "tc", ",", "\"clearUnrestoredMessages\"", ")", ";...
Returns a reference to the list of unrestored messages and nullifies the internal reference for subsequent garbage collection. @return @author tpm
[ "Returns", "a", "reference", "to", "the", "list", "of", "unrestored", "messages", "and", "nullifies", "the", "internal", "reference", "for", "subsequent", "garbage", "collection", "." ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/impl/store/itemstreams/SIMPReferenceStream.java#L361-L373
train
OpenLiberty/open-liberty
dev/com.ibm.websphere.javaee.jsf.2.2/src/javax/faces/webapp/UIComponentTag.java
UIComponentTag.setBinding
public void setBinding(String binding) throws JspException { if (!isValueReference(binding)) { throw new IllegalArgumentException("not a valid binding: " + binding); } _binding = binding; }
java
public void setBinding(String binding) throws JspException { if (!isValueReference(binding)) { throw new IllegalArgumentException("not a valid binding: " + binding); } _binding = binding; }
[ "public", "void", "setBinding", "(", "String", "binding", ")", "throws", "JspException", "{", "if", "(", "!", "isValueReference", "(", "binding", ")", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"not a valid binding: \"", "+", "binding", ")", ";...
Setter for common JSF xml attribute "binding". @throws JspException
[ "Setter", "for", "common", "JSF", "xml", "attribute", "binding", "." ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.websphere.javaee.jsf.2.2/src/javax/faces/webapp/UIComponentTag.java#L68-L75
train
OpenLiberty/open-liberty
dev/com.ibm.websphere.javaee.jsf.2.2/src/javax/faces/webapp/UIComponentTag.java
UIComponentTag.getParentUIComponentTag
public static UIComponentTag getParentUIComponentTag(PageContext pageContext) { UIComponentClassicTagBase parentTag = getParentUIComponentClassicTagBase(pageContext); return parentTag instanceof UIComponentTag ? (UIComponentTag)parentTag : new UIComponentTagWrapper(parentTag); }
java
public static UIComponentTag getParentUIComponentTag(PageContext pageContext) { UIComponentClassicTagBase parentTag = getParentUIComponentClassicTagBase(pageContext); return parentTag instanceof UIComponentTag ? (UIComponentTag)parentTag : new UIComponentTagWrapper(parentTag); }
[ "public", "static", "UIComponentTag", "getParentUIComponentTag", "(", "PageContext", "pageContext", ")", "{", "UIComponentClassicTagBase", "parentTag", "=", "getParentUIComponentClassicTagBase", "(", "pageContext", ")", ";", "return", "parentTag", "instanceof", "UIComponentTa...
Return the nearest JSF tag that encloses this tag. @deprecated
[ "Return", "the", "nearest", "JSF", "tag", "that", "encloses", "this", "tag", "." ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.websphere.javaee.jsf.2.2/src/javax/faces/webapp/UIComponentTag.java#L88-L94
train
OpenLiberty/open-liberty
dev/com.ibm.websphere.javaee.jsf.2.2/src/javax/faces/webapp/UIComponentTag.java
UIComponentTag.createComponent
@Override protected UIComponent createComponent(FacesContext context, String id) { String componentType = getComponentType(); if (componentType == null) { throw new NullPointerException("componentType"); } if (_binding != null) { Applicati...
java
@Override protected UIComponent createComponent(FacesContext context, String id) { String componentType = getComponentType(); if (componentType == null) { throw new NullPointerException("componentType"); } if (_binding != null) { Applicati...
[ "@", "Override", "protected", "UIComponent", "createComponent", "(", "FacesContext", "context", ",", "String", "id", ")", "{", "String", "componentType", "=", "getComponentType", "(", ")", ";", "if", "(", "componentType", "==", "null", ")", "{", "throw", "new"...
Create a UIComponent. Abstract method getComponentType is invoked to determine the actual type name for the component to be created. If this tag has a "binding" attribute, then that is immediately evaluated to store the created component in the specified property.
[ "Create", "a", "UIComponent", ".", "Abstract", "method", "getComponentType", "is", "invoked", "to", "determine", "the", "actual", "type", "name", "for", "the", "component", "to", "be", "created", "." ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.websphere.javaee.jsf.2.2/src/javax/faces/webapp/UIComponentTag.java#L126-L154
train
OpenLiberty/open-liberty
dev/com.ibm.websphere.javaee.jsf.2.2/src/javax/faces/webapp/UIComponentTag.java
UIComponentTag.isSuppressed
protected boolean isSuppressed() { if (_suppressed == null) { // we haven't called this method before, so determine the suppressed // value and cache it for later calls to this method. if (isFacet()) { // facets are always rendered by ...
java
protected boolean isSuppressed() { if (_suppressed == null) { // we haven't called this method before, so determine the suppressed // value and cache it for later calls to this method. if (isFacet()) { // facets are always rendered by ...
[ "protected", "boolean", "isSuppressed", "(", ")", "{", "if", "(", "_suppressed", "==", "null", ")", "{", "// we haven't called this method before, so determine the suppressed", "// value and cache it for later calls to this method.", "if", "(", "isFacet", "(", ")", ")", "{"...
Determine whether this component renders itself. A component is "suppressed" when it is either not rendered, or when it is rendered by its parent component at a time of the parent's choosing.
[ "Determine", "whether", "this", "component", "renders", "itself", ".", "A", "component", "is", "suppressed", "when", "it", "is", "either", "not", "rendered", "or", "when", "it", "is", "rendered", "by", "its", "parent", "component", "at", "a", "time", "of", ...
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.websphere.javaee.jsf.2.2/src/javax/faces/webapp/UIComponentTag.java#L165-L213
train
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.msgstore/src/com/ibm/ws/sib/msgstore/persistence/objectManager/PersistableSlicedData.java
PersistableSlicedData.setData
public void setData(List<DataSlice> dataSlices) { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "setData", "DataSlices="+dataSlices); _dataSlices = dataSlices; _estimatedLength = -1; if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEna...
java
public void setData(List<DataSlice> dataSlices) { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "setData", "DataSlices="+dataSlices); _dataSlices = dataSlices; _estimatedLength = -1; if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEna...
[ "public", "void", "setData", "(", "List", "<", "DataSlice", ">", "dataSlices", ")", "{", "if", "(", "TraceComponent", ".", "isAnyTracingEnabled", "(", ")", "&&", "tc", ".", "isEntryEnabled", "(", ")", ")", "SibTr", ".", "entry", "(", "this", ",", "tc", ...
static initializer.
[ "static", "initializer", "." ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.msgstore/src/com/ibm/ws/sib/msgstore/persistence/objectManager/PersistableSlicedData.java#L73-L82
train
OpenLiberty/open-liberty
dev/com.ibm.websphere.javaee.jsf.2.2/src/javax/faces/convert/NumberConverter.java
NumberConverter.getLocale
@JSFProperty(deferredValueType="java.lang.Object") public Locale getLocale() { if (_locale != null) { return _locale; } FacesContext context = FacesContext.getCurrentInstance(); return context.getViewRoot().getLocale(); }
java
@JSFProperty(deferredValueType="java.lang.Object") public Locale getLocale() { if (_locale != null) { return _locale; } FacesContext context = FacesContext.getCurrentInstance(); return context.getViewRoot().getLocale(); }
[ "@", "JSFProperty", "(", "deferredValueType", "=", "\"java.lang.Object\"", ")", "public", "Locale", "getLocale", "(", ")", "{", "if", "(", "_locale", "!=", "null", ")", "{", "return", "_locale", ";", "}", "FacesContext", "context", "=", "FacesContext", ".", ...
The name of the locale to be used, instead of the default as specified in the faces configuration file.
[ "The", "name", "of", "the", "locale", "to", "be", "used", "instead", "of", "the", "default", "as", "specified", "in", "the", "faces", "configuration", "file", "." ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.websphere.javaee.jsf.2.2/src/javax/faces/convert/NumberConverter.java#L433-L442
train
OpenLiberty/open-liberty
dev/com.ibm.ws.com.meterware.httpunit.1.7/src/com/meterware/httpunit/HttpsProtocolSupport.java
HttpsProtocolSupport.useProvider
public static void useProvider(String className,String handlerName) { _httpsProviderClass = null; JSSE_PROVIDER_CLASS =className; SSL_PROTOCOL_HANDLER =handlerName; }
java
public static void useProvider(String className,String handlerName) { _httpsProviderClass = null; JSSE_PROVIDER_CLASS =className; SSL_PROTOCOL_HANDLER =handlerName; }
[ "public", "static", "void", "useProvider", "(", "String", "className", ",", "String", "handlerName", ")", "{", "_httpsProviderClass", "=", "null", ";", "JSSE_PROVIDER_CLASS", "=", "className", ";", "SSL_PROTOCOL_HANDLER", "=", "handlerName", ";", "}" ]
use the given SSL providers - reset the one used so far @param className @param handlerName
[ "use", "the", "given", "SSL", "providers", "-", "reset", "the", "one", "used", "so", "far" ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.com.meterware.httpunit.1.7/src/com/meterware/httpunit/HttpsProtocolSupport.java#L73-L77
train
OpenLiberty/open-liberty
dev/com.ibm.ws.com.meterware.httpunit.1.7/src/com/meterware/httpunit/HttpsProtocolSupport.java
HttpsProtocolSupport.getHttpsProviderClass
public static Class getHttpsProviderClass() throws ClassNotFoundException { if (_httpsProviderClass == null) { // [ 1520925 ] SSL patch Provider[] sslProviders = Security.getProviders("SSLContext.SSLv3"); // >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> // IBM...
java
public static Class getHttpsProviderClass() throws ClassNotFoundException { if (_httpsProviderClass == null) { // [ 1520925 ] SSL patch Provider[] sslProviders = Security.getProviders("SSLContext.SSLv3"); // >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> // IBM...
[ "public", "static", "Class", "getHttpsProviderClass", "(", ")", "throws", "ClassNotFoundException", "{", "if", "(", "_httpsProviderClass", "==", "null", ")", "{", "// [ 1520925 ] SSL patch", "Provider", "[", "]", "sslProviders", "=", "Security", ".", "getProviders", ...
get the Https Provider Class if it's been set already return it - otherwise check with the Security package and take the first available provider if all fails take the default provider class @return the HttpsProviderClass @throws ClassNotFoundException
[ "get", "the", "Https", "Provider", "Class", "if", "it", "s", "been", "set", "already", "return", "it", "-", "otherwise", "check", "with", "the", "Security", "package", "and", "take", "the", "first", "available", "provider", "if", "all", "fails", "take", "t...
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.com.meterware.httpunit.1.7/src/com/meterware/httpunit/HttpsProtocolSupport.java#L143-L182
train
OpenLiberty/open-liberty
dev/com.ibm.ws.com.meterware.httpunit.1.7/src/com/meterware/httpunit/HttpsProtocolSupport.java
HttpsProtocolSupport.registerSSLProtocolHandler
private static void registerSSLProtocolHandler() { String list = System.getProperty( PROTOCOL_HANDLER_PKGS ); if (list == null || list.length() == 0) { System.setProperty( PROTOCOL_HANDLER_PKGS, SSL_PROTOCOL_HANDLER ); } else if (list.indexOf( SSL_PROTOCOL_HANDLER ) < 0) { /...
java
private static void registerSSLProtocolHandler() { String list = System.getProperty( PROTOCOL_HANDLER_PKGS ); if (list == null || list.length() == 0) { System.setProperty( PROTOCOL_HANDLER_PKGS, SSL_PROTOCOL_HANDLER ); } else if (list.indexOf( SSL_PROTOCOL_HANDLER ) < 0) { /...
[ "private", "static", "void", "registerSSLProtocolHandler", "(", ")", "{", "String", "list", "=", "System", ".", "getProperty", "(", "PROTOCOL_HANDLER_PKGS", ")", ";", "if", "(", "list", "==", "null", "||", "list", ".", "length", "(", ")", "==", "0", ")", ...
register the Secure Socket Layer Protocol Handler
[ "register", "the", "Secure", "Socket", "Layer", "Protocol", "Handler" ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.com.meterware.httpunit.1.7/src/com/meterware/httpunit/HttpsProtocolSupport.java#L225-L233
train
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.msgstore/src/com/ibm/ws/sib/msgstore/persistence/dispatcher/DispatcherBase.java
DispatcherBase.obtainIntConfigParameter
protected static int obtainIntConfigParameter(MessageStoreImpl msi, String parameterName, String defaultValue, int minValue, int maxValue) { int value = Integer.parseInt(defaultValue); if (msi != null) { String strValue = msi.getProperty(parameterName, defaultValue); ...
java
protected static int obtainIntConfigParameter(MessageStoreImpl msi, String parameterName, String defaultValue, int minValue, int maxValue) { int value = Integer.parseInt(defaultValue); if (msi != null) { String strValue = msi.getProperty(parameterName, defaultValue); ...
[ "protected", "static", "int", "obtainIntConfigParameter", "(", "MessageStoreImpl", "msi", ",", "String", "parameterName", ",", "String", "defaultValue", ",", "int", "minValue", ",", "int", "maxValue", ")", "{", "int", "value", "=", "Integer", ".", "parseInt", "(...
Obtains the value of an integer configuration parameter given its name, the default value and 'reasonable' minimum and maximum values. @param msi The Message Store instance to obtain the parameters (may be null) @param parameterName The parameter's name @param defaultValue The default value @param minValue A reasonable...
[ "Obtains", "the", "value", "of", "an", "integer", "configuration", "parameter", "given", "its", "name", "the", "default", "value", "and", "reasonable", "minimum", "and", "maximum", "values", "." ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.msgstore/src/com/ibm/ws/sib/msgstore/persistence/dispatcher/DispatcherBase.java#L38-L70
train
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.msgstore/src/com/ibm/ws/sib/msgstore/persistence/dispatcher/DispatcherBase.java
DispatcherBase.obtainLongConfigParameter
protected static long obtainLongConfigParameter(MessageStoreImpl msi, String parameterName, String defaultValue, long minValue, long maxValue) { long value = Long.parseLong(defaultValue); if (msi != null) { String strValue = msi.getProperty(parameterName, defaultValue); ...
java
protected static long obtainLongConfigParameter(MessageStoreImpl msi, String parameterName, String defaultValue, long minValue, long maxValue) { long value = Long.parseLong(defaultValue); if (msi != null) { String strValue = msi.getProperty(parameterName, defaultValue); ...
[ "protected", "static", "long", "obtainLongConfigParameter", "(", "MessageStoreImpl", "msi", ",", "String", "parameterName", ",", "String", "defaultValue", ",", "long", "minValue", ",", "long", "maxValue", ")", "{", "long", "value", "=", "Long", ".", "parseLong", ...
Obtains the value of a long integer configuration parameter given its name, the default value and 'reasonable' minimum and maximum values. @param msi The Message Store instance to obtain the parameters (may be null) @param parameterName The parameter's name @param defaultValue The default value @param minValue A reason...
[ "Obtains", "the", "value", "of", "a", "long", "integer", "configuration", "parameter", "given", "its", "name", "the", "default", "value", "and", "reasonable", "minimum", "and", "maximum", "values", "." ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.msgstore/src/com/ibm/ws/sib/msgstore/persistence/dispatcher/DispatcherBase.java#L82-L114
train
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/mfp/jmf/impl/JSMessageImpl.java
JSMessageImpl.originalFrame
public int originalFrame() { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) JmfTr.entry(this, tc, "originalFrame"); int result; synchronized (getMessageLockArtefact()) { if ((contents == null) || reallocated) { result = -1; } else { result = length; ...
java
public int originalFrame() { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) JmfTr.entry(this, tc, "originalFrame"); int result; synchronized (getMessageLockArtefact()) { if ((contents == null) || reallocated) { result = -1; } else { result = length; ...
[ "public", "int", "originalFrame", "(", ")", "{", "if", "(", "TraceComponent", ".", "isAnyTracingEnabled", "(", ")", "&&", "tc", ".", "isEntryEnabled", "(", ")", ")", "JmfTr", ".", "entry", "(", "this", ",", "tc", ",", "\"originalFrame\"", ")", ";", "int"...
only called by Unit Tests so it is academic.
[ "only", "called", "by", "Unit", "Tests", "so", "it", "is", "academic", "." ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/mfp/jmf/impl/JSMessageImpl.java#L507-L523
train
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/mfp/jmf/impl/JSMessageImpl.java
JSMessageImpl.isPresent
public boolean isPresent(int accessor) { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) JmfTr.entry(this, tc, "isPresent", new Object[]{Integer.valueOf(accessor)}); boolean result; if (accessor < cacheSize) { result = super.isPresent(accessor); } else if (accessor < firstBo...
java
public boolean isPresent(int accessor) { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) JmfTr.entry(this, tc, "isPresent", new Object[]{Integer.valueOf(accessor)}); boolean result; if (accessor < cacheSize) { result = super.isPresent(accessor); } else if (accessor < firstBo...
[ "public", "boolean", "isPresent", "(", "int", "accessor", ")", "{", "if", "(", "TraceComponent", ".", "isAnyTracingEnabled", "(", ")", "&&", "tc", ".", "isEntryEnabled", "(", ")", ")", "JmfTr", ".", "entry", "(", "this", ",", "tc", ",", "\"isPresent\"", ...
The BoxManager stuff is a black art so we'll lock round it to be safe.
[ "The", "BoxManager", "stuff", "is", "a", "black", "art", "so", "we", "ll", "lock", "round", "it", "to", "be", "safe", "." ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/mfp/jmf/impl/JSMessageImpl.java#L1157-L1184
train
OpenLiberty/open-liberty
dev/com.ibm.ws.logging.hpel/src/com/ibm/ws/logging/hpel/impl/OneLogFileRecordIterator.java
OneLogFileRecordIterator.setPosition
public boolean setPosition(long position) { try { long fileSize = reader.length(); if (fileSize > position) { reader.seek(position); return true; } logger.logp(Level.SEVERE, className, "setPosition", "HPEL_OffsetBeyondFileSize", new Object[]{file, Long.valueOf(position), Long.valueOf(fileSize...
java
public boolean setPosition(long position) { try { long fileSize = reader.length(); if (fileSize > position) { reader.seek(position); return true; } logger.logp(Level.SEVERE, className, "setPosition", "HPEL_OffsetBeyondFileSize", new Object[]{file, Long.valueOf(position), Long.valueOf(fileSize...
[ "public", "boolean", "setPosition", "(", "long", "position", ")", "{", "try", "{", "long", "fileSize", "=", "reader", ".", "length", "(", ")", ";", "if", "(", "fileSize", ">", "position", ")", "{", "reader", ".", "seek", "(", "position", ")", ";", "r...
Positions file stream to the location of a previously read record. @param position position of a previously read log record. @return <code>true</code> if this action succeeded; <code>false</code> otherwise.
[ "Positions", "file", "stream", "to", "the", "location", "of", "a", "previously", "read", "record", "." ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.logging.hpel/src/com/ibm/ws/logging/hpel/impl/OneLogFileRecordIterator.java#L314-L329
train
OpenLiberty/open-liberty
dev/com.ibm.ws.logging.hpel/src/com/ibm/ws/logging/hpel/impl/OneLogFileRecordIterator.java
OneLogFileRecordIterator.getPosition
public long getPosition() { try { return reader.getFilePointer(); } catch (IOException ex) { logger.logp(Level.SEVERE, className, "getPosition", "HPEL_ErrorReadingFileOffset", new Object[]{file, ex.getMessage()}); } return -1L; }
java
public long getPosition() { try { return reader.getFilePointer(); } catch (IOException ex) { logger.logp(Level.SEVERE, className, "getPosition", "HPEL_ErrorReadingFileOffset", new Object[]{file, ex.getMessage()}); } return -1L; }
[ "public", "long", "getPosition", "(", ")", "{", "try", "{", "return", "reader", ".", "getFilePointer", "(", ")", ";", "}", "catch", "(", "IOException", "ex", ")", "{", "logger", ".", "logp", "(", "Level", ".", "SEVERE", ",", "className", ",", "\"getPos...
Retrieves position in the reader's input stream. @return position in the stream or -1L if reading has failed.
[ "Retrieves", "position", "in", "the", "reader", "s", "input", "stream", "." ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.logging.hpel/src/com/ibm/ws/logging/hpel/impl/OneLogFileRecordIterator.java#L335-L342
train
OpenLiberty/open-liberty
dev/com.ibm.ws.logging.hpel/src/com/ibm/ws/logging/hpel/impl/OneLogFileRecordIterator.java
OneLogFileRecordIterator.findNext
public RepositoryLogRecord findNext(long refSequenceNumber) { if (nextRecord == null) { nextRecord = getNext(refSequenceNumber); } if (nextRecord == null || refSequenceNumber >= 0 && refSequenceNumber < nextRecord.getInternalSeqNumber()) { return null; } else { RepositoryLogRecord result = nextRecord; ...
java
public RepositoryLogRecord findNext(long refSequenceNumber) { if (nextRecord == null) { nextRecord = getNext(refSequenceNumber); } if (nextRecord == null || refSequenceNumber >= 0 && refSequenceNumber < nextRecord.getInternalSeqNumber()) { return null; } else { RepositoryLogRecord result = nextRecord; ...
[ "public", "RepositoryLogRecord", "findNext", "(", "long", "refSequenceNumber", ")", "{", "if", "(", "nextRecord", "==", "null", ")", "{", "nextRecord", "=", "getNext", "(", "refSequenceNumber", ")", ";", "}", "if", "(", "nextRecord", "==", "null", "||", "ref...
returns next record from the stream matching required condition. @param refSequenceNumber reference internal sequence number after which we can stop searching for records and return null. it is ignored if value less than zero. @return repository record matching condition.
[ "returns", "next", "record", "from", "the", "stream", "matching", "required", "condition", "." ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.logging.hpel/src/com/ibm/ws/logging/hpel/impl/OneLogFileRecordIterator.java#L431-L442
train
OpenLiberty/open-liberty
dev/com.ibm.ws.logging.hpel/src/com/ibm/ws/logging/hpel/impl/OneLogFileRecordIterator.java
OneLogFileRecordIterator.seekToNextRecord
public long seekToNextRecord(LogRecordSerializer formatter) throws IOException { long fileSize = reader.length(); long position = reader.getFilePointer(); int location; int len = 0; int offset = 0; byte[] buffer = new byte[2048]; do { if (offset > 0) { position += len - offset; // keep the l...
java
public long seekToNextRecord(LogRecordSerializer formatter) throws IOException { long fileSize = reader.length(); long position = reader.getFilePointer(); int location; int len = 0; int offset = 0; byte[] buffer = new byte[2048]; do { if (offset > 0) { position += len - offset; // keep the l...
[ "public", "long", "seekToNextRecord", "(", "LogRecordSerializer", "formatter", ")", "throws", "IOException", "{", "long", "fileSize", "=", "reader", ".", "length", "(", ")", ";", "long", "position", "=", "reader", ".", "getFilePointer", "(", ")", ";", "int", ...
Repositions reader to the location of the next record. This is done by searching next eyeCatcher and then seek 4 bytes before its start. @param formatter @return current position in the file. @throws IOException if no eyeCatcher is found in the rest of the file.
[ "Repositions", "reader", "to", "the", "location", "of", "the", "next", "record", ".", "This", "is", "done", "by", "searching", "next", "eyeCatcher", "and", "then", "seek", "4", "bytes", "before", "its", "start", "." ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.logging.hpel/src/com/ibm/ws/logging/hpel/impl/OneLogFileRecordIterator.java#L624-L657
train
OpenLiberty/open-liberty
dev/com.ibm.ws.logging.hpel/src/com/ibm/ws/logging/hpel/impl/OneLogFileRecordIterator.java
OneLogFileRecordIterator.seekToPrevRecord
public long seekToPrevRecord(LogRecordSerializer formatter) throws IOException { long position = reader.getFilePointer(); byte[] buffer = new byte[2048]; int location; int offset = 0; int len = 0; do { if (position <= formatter.getEyeCatcherSize()+3) { throw new IOException("No eyeCatcher found in th...
java
public long seekToPrevRecord(LogRecordSerializer formatter) throws IOException { long position = reader.getFilePointer(); byte[] buffer = new byte[2048]; int location; int offset = 0; int len = 0; do { if (position <= formatter.getEyeCatcherSize()+3) { throw new IOException("No eyeCatcher found in th...
[ "public", "long", "seekToPrevRecord", "(", "LogRecordSerializer", "formatter", ")", "throws", "IOException", "{", "long", "position", "=", "reader", ".", "getFilePointer", "(", ")", ";", "byte", "[", "]", "buffer", "=", "new", "byte", "[", "2048", "]", ";", ...
Repositions reader to the location of the previous record. This is done by searching prev eyeCatcher and then seek 4 bytes before its start. @param formatter @return current position in the file. @throws IOException if no eyeCatcher is found in region from start of the file to the current position.
[ "Repositions", "reader", "to", "the", "location", "of", "the", "previous", "record", ".", "This", "is", "done", "by", "searching", "prev", "eyeCatcher", "and", "then", "seek", "4", "bytes", "before", "its", "start", "." ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.logging.hpel/src/com/ibm/ws/logging/hpel/impl/OneLogFileRecordIterator.java#L667-L699
train
OpenLiberty/open-liberty
dev/com.ibm.ws.logging.hpel/src/com/ibm/ws/logging/hpel/impl/OneLogFileRecordIterator.java
OneLogFileRecordIterator.createNewReader
protected LogFileReader createNewReader(LogFileReader other) throws IOException { if (other instanceof LogFileReaderImpl) { return new LogFileReaderImpl((LogFileReaderImpl)other); } throw new IOException("Instance of the " + other.getClass().getName() + " is not clonable by " + OneLogFileRecordIterator.class.g...
java
protected LogFileReader createNewReader(LogFileReader other) throws IOException { if (other instanceof LogFileReaderImpl) { return new LogFileReaderImpl((LogFileReaderImpl)other); } throw new IOException("Instance of the " + other.getClass().getName() + " is not clonable by " + OneLogFileRecordIterator.class.g...
[ "protected", "LogFileReader", "createNewReader", "(", "LogFileReader", "other", ")", "throws", "IOException", "{", "if", "(", "other", "instanceof", "LogFileReaderImpl", ")", "{", "return", "new", "LogFileReaderImpl", "(", "(", "LogFileReaderImpl", ")", "other", ")"...
Creates the new instance of a reader to read input data with based on an existing one. @param other the LogFileReader instance to base this reader on. @return LogFileReader instance to use for reading. @throws IOException
[ "Creates", "the", "new", "instance", "of", "a", "reader", "to", "read", "input", "data", "with", "based", "on", "an", "existing", "one", "." ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.logging.hpel/src/com/ibm/ws/logging/hpel/impl/OneLogFileRecordIterator.java#L719-L724
train
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/msgstore/AbstractItem.java
AbstractItem.persistLock
public final void persistLock(final Transaction transaction) throws ProtocolException, TransactionException, SevereMessageStoreException { Membership membership = _getMembership(); if (null == membership) { throw new NotInMessageStore(); } membership.persistLock(t...
java
public final void persistLock(final Transaction transaction) throws ProtocolException, TransactionException, SevereMessageStoreException { Membership membership = _getMembership(); if (null == membership) { throw new NotInMessageStore(); } membership.persistLock(t...
[ "public", "final", "void", "persistLock", "(", "final", "Transaction", "transaction", ")", "throws", "ProtocolException", ",", "TransactionException", ",", "SevereMessageStoreException", "{", "Membership", "membership", "=", "_getMembership", "(", ")", ";", "if", "(",...
Use this method to persist the lock currently active on the item. Item MUST be locked. @param transaction @throws SevereMessageStoreException @throws {@ProtocolException} Thrown if an add is attempted when the transaction cannot allow any further work to be added i.e. after completion of the transaction. @throws {@Tr...
[ "Use", "this", "method", "to", "persist", "the", "lock", "currently", "active", "on", "the", "item", ".", "Item", "MUST", "be", "locked", "." ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/msgstore/AbstractItem.java#L880-L888
train
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/msgstore/AbstractItem.java
AbstractItem.persistRedeliveredCount
public void persistRedeliveredCount(int redeliveredCount) throws SevereMessageStoreException { Membership thisItemLink = _getMembership(); if (null == thisItemLink) { throw new NotInMessageStore(); } thisItemLink.persistRedeliveredCount(redeliveredCount); }
java
public void persistRedeliveredCount(int redeliveredCount) throws SevereMessageStoreException { Membership thisItemLink = _getMembership(); if (null == thisItemLink) { throw new NotInMessageStore(); } thisItemLink.persistRedeliveredCount(redeliveredCount); }
[ "public", "void", "persistRedeliveredCount", "(", "int", "redeliveredCount", ")", "throws", "SevereMessageStoreException", "{", "Membership", "thisItemLink", "=", "_getMembership", "(", ")", ";", "if", "(", "null", "==", "thisItemLink", ")", "{", "throw", "new", "...
Use this method to persist the redelivered count for the item. @param redeliveredCount @throws SevereMessageStoreException
[ "Use", "this", "method", "to", "persist", "the", "redelivered", "count", "for", "the", "item", "." ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/msgstore/AbstractItem.java#L896-L904
train
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/msgstore/AbstractItem.java
AbstractItem.requestUpdate
public final void requestUpdate(Transaction transaction) throws MessageStoreException { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "requestUpdate", transaction); Membership membership = _getMembership(); if (null == membership) ...
java
public final void requestUpdate(Transaction transaction) throws MessageStoreException { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "requestUpdate", transaction); Membership membership = _getMembership(); if (null == membership) ...
[ "public", "final", "void", "requestUpdate", "(", "Transaction", "transaction", ")", "throws", "MessageStoreException", "{", "if", "(", "TraceComponent", ".", "isAnyTracingEnabled", "(", ")", "&&", "tc", ".", "isEntryEnabled", "(", ")", ")", "SibTr", ".", "entry"...
Request an update @param transaction @throws MessageStoreException
[ "Request", "an", "update" ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/msgstore/AbstractItem.java#L958-L975
train