Dataset Viewer
Auto-converted to Parquet Duplicate
id
int32
0
165k
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
sequence
docstring
stringlengths
3
16k
docstring_tokens
sequence
sha
stringlengths
40
40
url
stringlengths
105
339
0
teatrove/teatrove
teaapps/src/main/java/org/teatrove/teaapps/apps/CookieApplication.java
CookieApplication.createContext
public Object createContext(ApplicationRequest request, ApplicationResponse response) { return new CookieContext( request, response, mDomain, mPath, mIsSecure); }
java
public Object createContext(ApplicationRequest request, ApplicationResponse response) { return new CookieContext( request, response, mDomain, mPath, mIsSecure); }
[ "public", "Object", "createContext", "(", "ApplicationRequest", "request", ",", "ApplicationResponse", "response", ")", "{", "return", "new", "CookieContext", "(", "request", ",", "response", ",", "mDomain", ",", "mPath", ",", "mIsSecure", ")", ";", "}" ]
Creates a context for the templates. @param request The user's http request @param response The user's http response @return the context for the templates
[ "Creates", "a", "context", "for", "the", "templates", "." ]
7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea
https://github.com/teatrove/teatrove/blob/7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea/teaapps/src/main/java/org/teatrove/teaapps/apps/CookieApplication.java#L101-L106
1
teatrove/teatrove
examples/directory-browser/src/main/java/org/teatrove/examples/directorybrowser/DirectoryBrowserContext.java
DirectoryBrowserContext.getFiles
public File[] getFiles() { String path = mRequest.getParameter("path"); if (path == null) { path = mApp.getInitParameter("defaultPath"); } if (path == null) { path = "/"; } File activefile = new File(path); if( activefile.isDirectory()) {...
java
public File[] getFiles() { String path = mRequest.getParameter("path"); if (path == null) { path = mApp.getInitParameter("defaultPath"); } if (path == null) { path = "/"; } File activefile = new File(path); if( activefile.isDirectory()) {...
[ "public", "File", "[", "]", "getFiles", "(", ")", "{", "String", "path", "=", "mRequest", ".", "getParameter", "(", "\"path\"", ")", ";", "if", "(", "path", "==", "null", ")", "{", "path", "=", "mApp", ".", "getInitParameter", "(", "\"defaultPath\"", "...
Gets an array of files in the directory specified by the "path" query parameter.
[ "Gets", "an", "array", "of", "files", "in", "the", "directory", "specified", "by", "the", "path", "query", "parameter", "." ]
7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea
https://github.com/teatrove/teatrove/blob/7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea/examples/directory-browser/src/main/java/org/teatrove/examples/directorybrowser/DirectoryBrowserContext.java#L31-L47
2
teatrove/teatrove
trove/src/main/java/org/teatrove/trove/util/ConcurrentLinkedList.java
ConcurrentLinkedList.clear
public void clear() { mPutLock.lock(); mPollLock.lock(); try { mSize.set(0); mHead = new Node(null); mTail = new Node(null); mHead.mNext = mTail; } finally { mPollLock.unlock(); mPutLock.unlock(); } ...
java
public void clear() { mPutLock.lock(); mPollLock.lock(); try { mSize.set(0); mHead = new Node(null); mTail = new Node(null); mHead.mNext = mTail; } finally { mPollLock.unlock(); mPutLock.unlock(); } ...
[ "public", "void", "clear", "(", ")", "{", "mPutLock", ".", "lock", "(", ")", ";", "mPollLock", ".", "lock", "(", ")", ";", "try", "{", "mSize", ".", "set", "(", "0", ")", ";", "mHead", "=", "new", "Node", "(", "null", ")", ";", "mTail", "=", ...
Clears the contents of the queue. This is a blocking operation.
[ "Clears", "the", "contents", "of", "the", "queue", ".", "This", "is", "a", "blocking", "operation", "." ]
7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea
https://github.com/teatrove/teatrove/blob/7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea/trove/src/main/java/org/teatrove/trove/util/ConcurrentLinkedList.java#L101-L114
3
teatrove/teatrove
trove/src/main/java/org/teatrove/trove/util/ConcurrentLinkedList.java
ConcurrentLinkedList.remove
public boolean remove(Node<E> e) { mPutLock.lock(); mPollLock.lock(); try { if (e == null) return false; if (e.mRemoved) return false; if (mSize.get() == 0) return false; if (e == mTail) {...
java
public boolean remove(Node<E> e) { mPutLock.lock(); mPollLock.lock(); try { if (e == null) return false; if (e.mRemoved) return false; if (mSize.get() == 0) return false; if (e == mTail) {...
[ "public", "boolean", "remove", "(", "Node", "<", "E", ">", "e", ")", "{", "mPutLock", ".", "lock", "(", ")", ";", "mPollLock", ".", "lock", "(", ")", ";", "try", "{", "if", "(", "e", "==", "null", ")", "return", "false", ";", "if", "(", "e", ...
Removes a given Node handle. This is a blocking operation that runs in constant time.
[ "Removes", "a", "given", "Node", "handle", ".", "This", "is", "a", "blocking", "operation", "that", "runs", "in", "constant", "time", "." ]
7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea
https://github.com/teatrove/teatrove/blob/7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea/trove/src/main/java/org/teatrove/trove/util/ConcurrentLinkedList.java#L169-L208
4
teatrove/teatrove
build-tools/teacompiler/teacompiler-maven-plugin/src/main/java/org/teatrove/maven/plugins/teacompiler/contextclassbuilder/DefaultContextClassBuilderHelper.java
DefaultContextClassBuilderHelper.getComponent
public Object getComponent(String role, String roleHint) throws ComponentLookupException { return container.lookup(role, roleHint); }
java
public Object getComponent(String role, String roleHint) throws ComponentLookupException { return container.lookup(role, roleHint); }
[ "public", "Object", "getComponent", "(", "String", "role", ",", "String", "roleHint", ")", "throws", "ComponentLookupException", "{", "return", "container", ".", "lookup", "(", "role", ",", "roleHint", ")", ";", "}" ]
Gets the component. @param role the role @param roleHint the role hint @return the component @throws org.codehaus.plexus.component.repository.exception.ComponentLookupException the component lookup exception
[ "Gets", "the", "component", "." ]
7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea
https://github.com/teatrove/teatrove/blob/7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea/build-tools/teacompiler/teacompiler-maven-plugin/src/main/java/org/teatrove/maven/plugins/teacompiler/contextclassbuilder/DefaultContextClassBuilderHelper.java#L157-L159
5
teatrove/teatrove
trove/src/main/java/org/teatrove/trove/net/LazySocket.java
LazySocket.setTcpNoDelay
public void setTcpNoDelay(boolean on) throws SocketException { if (mSocket != null) { mSocket.setTcpNoDelay(on); } else { setOption(0, on ? Boolean.TRUE : Boolean.FALSE); } }
java
public void setTcpNoDelay(boolean on) throws SocketException { if (mSocket != null) { mSocket.setTcpNoDelay(on); } else { setOption(0, on ? Boolean.TRUE : Boolean.FALSE); } }
[ "public", "void", "setTcpNoDelay", "(", "boolean", "on", ")", "throws", "SocketException", "{", "if", "(", "mSocket", "!=", "null", ")", "{", "mSocket", ".", "setTcpNoDelay", "(", "on", ")", ";", "}", "else", "{", "setOption", "(", "0", ",", "on", "?",...
Option 0.
[ "Option", "0", "." ]
7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea
https://github.com/teatrove/teatrove/blob/7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea/trove/src/main/java/org/teatrove/trove/net/LazySocket.java#L123-L130
6
teatrove/teatrove
trove/src/main/java/org/teatrove/trove/net/LazySocket.java
LazySocket.setSoLinger
public void setSoLinger(boolean on, int linger) throws SocketException { if (mSocket != null) { mSocket.setSoLinger(on, linger); } else { Object value; if (on) { value = new Integer(linger); } else { valu...
java
public void setSoLinger(boolean on, int linger) throws SocketException { if (mSocket != null) { mSocket.setSoLinger(on, linger); } else { Object value; if (on) { value = new Integer(linger); } else { valu...
[ "public", "void", "setSoLinger", "(", "boolean", "on", ",", "int", "linger", ")", "throws", "SocketException", "{", "if", "(", "mSocket", "!=", "null", ")", "{", "mSocket", ".", "setSoLinger", "(", "on", ",", "linger", ")", ";", "}", "else", "{", "Obje...
Option 1.
[ "Option", "1", "." ]
7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea
https://github.com/teatrove/teatrove/blob/7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea/trove/src/main/java/org/teatrove/trove/net/LazySocket.java#L137-L151
7
teatrove/teatrove
trove/src/main/java/org/teatrove/trove/net/LazySocket.java
LazySocket.setSoTimeout
public void setSoTimeout(int timeout) throws SocketException { if (mSocket != null) { mSocket.setSoTimeout(timeout); } else { setOption(2, new Integer(timeout)); } }
java
public void setSoTimeout(int timeout) throws SocketException { if (mSocket != null) { mSocket.setSoTimeout(timeout); } else { setOption(2, new Integer(timeout)); } }
[ "public", "void", "setSoTimeout", "(", "int", "timeout", ")", "throws", "SocketException", "{", "if", "(", "mSocket", "!=", "null", ")", "{", "mSocket", ".", "setSoTimeout", "(", "timeout", ")", ";", "}", "else", "{", "setOption", "(", "2", ",", "new", ...
Option 2.
[ "Option", "2", "." ]
7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea
https://github.com/teatrove/teatrove/blob/7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea/trove/src/main/java/org/teatrove/trove/net/LazySocket.java#L158-L165
8
teatrove/teatrove
trove/src/main/java/org/teatrove/trove/net/LazySocket.java
LazySocket.setSendBufferSize
public void setSendBufferSize(int size) throws SocketException { if (mSocket != null) { mSocket.setSendBufferSize(size); } else { setOption(3, new Integer(size)); } }
java
public void setSendBufferSize(int size) throws SocketException { if (mSocket != null) { mSocket.setSendBufferSize(size); } else { setOption(3, new Integer(size)); } }
[ "public", "void", "setSendBufferSize", "(", "int", "size", ")", "throws", "SocketException", "{", "if", "(", "mSocket", "!=", "null", ")", "{", "mSocket", ".", "setSendBufferSize", "(", "size", ")", ";", "}", "else", "{", "setOption", "(", "3", ",", "new...
Option 3.
[ "Option", "3", "." ]
7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea
https://github.com/teatrove/teatrove/blob/7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea/trove/src/main/java/org/teatrove/trove/net/LazySocket.java#L172-L179
9
teatrove/teatrove
trove/src/main/java/org/teatrove/trove/net/LazySocket.java
LazySocket.setReceiveBufferSize
public void setReceiveBufferSize(int size) throws SocketException { if (mSocket != null) { mSocket.setReceiveBufferSize(size); } else { setOption(4, new Integer(size)); } }
java
public void setReceiveBufferSize(int size) throws SocketException { if (mSocket != null) { mSocket.setReceiveBufferSize(size); } else { setOption(4, new Integer(size)); } }
[ "public", "void", "setReceiveBufferSize", "(", "int", "size", ")", "throws", "SocketException", "{", "if", "(", "mSocket", "!=", "null", ")", "{", "mSocket", ".", "setReceiveBufferSize", "(", "size", ")", ";", "}", "else", "{", "setOption", "(", "4", ",", ...
Option 4.
[ "Option", "4", "." ]
7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea
https://github.com/teatrove/teatrove/blob/7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea/trove/src/main/java/org/teatrove/trove/net/LazySocket.java#L186-L193
10
teatrove/teatrove
trove/src/main/java/org/teatrove/trove/net/LazySocket.java
LazySocket.recycle
CheckedSocket recycle() { CheckedSocket s; if (mClosed) { s = null; } else { s = mSocket; mSocket = null; mClosed = true; } return s; }
java
CheckedSocket recycle() { CheckedSocket s; if (mClosed) { s = null; } else { s = mSocket; mSocket = null; mClosed = true; } return s; }
[ "CheckedSocket", "recycle", "(", ")", "{", "CheckedSocket", "s", ";", "if", "(", "mClosed", ")", "{", "s", "=", "null", ";", "}", "else", "{", "s", "=", "mSocket", ";", "mSocket", "=", "null", ";", "mClosed", "=", "true", ";", "}", "return", "s", ...
Returns the internal wrapped socket or null if not connected. After calling recycle, this LazySocket instance is closed.
[ "Returns", "the", "internal", "wrapped", "socket", "or", "null", "if", "not", "connected", ".", "After", "calling", "recycle", "this", "LazySocket", "instance", "is", "closed", "." ]
7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea
https://github.com/teatrove/teatrove/blob/7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea/trove/src/main/java/org/teatrove/trove/net/LazySocket.java#L242-L253
11
teatrove/teatrove
teaservlet/src/main/java/org/teatrove/teaservlet/AdminApplication.java
AdminApplication.getAdminLinks
public AppAdminLinks getAdminLinks() { AppAdminLinks links = new AppAdminLinks(mConfig.getName()); //links.addAdminLink("Instrumentation","/system/console?page=instrumentation"); //links.addAdminLink("Dashboard","/system/console?page=dashboard"); //links.addAdminLink("Janitor","/system/...
java
public AppAdminLinks getAdminLinks() { AppAdminLinks links = new AppAdminLinks(mConfig.getName()); //links.addAdminLink("Instrumentation","/system/console?page=instrumentation"); //links.addAdminLink("Dashboard","/system/console?page=dashboard"); //links.addAdminLink("Janitor","/system/...
[ "public", "AppAdminLinks", "getAdminLinks", "(", ")", "{", "AppAdminLinks", "links", "=", "new", "AppAdminLinks", "(", "mConfig", ".", "getName", "(", ")", ")", ";", "//links.addAdminLink(\"Instrumentation\",\"/system/console?page=instrumentation\");", "//links.addAdminLink(\...
This implementation uses hard coded link information, but other applications can dynamically determine their admin links.
[ "This", "implementation", "uses", "hard", "coded", "link", "information", "but", "other", "applications", "can", "dynamically", "determine", "their", "admin", "links", "." ]
7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea
https://github.com/teatrove/teatrove/blob/7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea/teaservlet/src/main/java/org/teatrove/teaservlet/AdminApplication.java#L343-L365
12
teatrove/teatrove
teaservlet/src/main/java/org/teatrove/teaservlet/TeaServlet.java
TeaServlet.init
public void init(ServletConfig config) throws ServletException { super.init(config); mServletConfig = config; config.getServletContext().log("Initializing TeaServlet..."); String ver = System.getProperty("java.version"); if (ver.startsWith("0.") || ver.startsWit...
java
public void init(ServletConfig config) throws ServletException { super.init(config); mServletConfig = config; config.getServletContext().log("Initializing TeaServlet..."); String ver = System.getProperty("java.version"); if (ver.startsWith("0.") || ver.startsWit...
[ "public", "void", "init", "(", "ServletConfig", "config", ")", "throws", "ServletException", "{", "super", ".", "init", "(", "config", ")", ";", "mServletConfig", "=", "config", ";", "config", ".", "getServletContext", "(", ")", ".", "log", "(", "\"Initializ...
Initializes the TeaServlet. Creates the logger and loads the user's application. @param config the servlet config
[ "Initializes", "the", "TeaServlet", ".", "Creates", "the", "logger", "and", "loads", "the", "user", "s", "application", "." ]
7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea
https://github.com/teatrove/teatrove/blob/7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea/teaservlet/src/main/java/org/teatrove/teaservlet/TeaServlet.java#L154-L208
13
teatrove/teatrove
teaservlet/src/main/java/org/teatrove/teaservlet/TeaServlet.java
TeaServlet.doGet
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { if (processStatus(request, response)) { return; } if (!isRunning()) { int errorCode = mProperties.getInt("st...
java
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { if (processStatus(request, response)) { return; } if (!isRunning()) { int errorCode = mProperties.getInt("st...
[ "protected", "void", "doGet", "(", "HttpServletRequest", "request", ",", "HttpServletResponse", "response", ")", "throws", "ServletException", ",", "IOException", "{", "if", "(", "processStatus", "(", "request", ",", "response", ")", ")", "{", "return", ";", "}"...
Process the user's http get request. Process the template that maps to the URI that was hit. @param request the user's http request @param response the user's http response
[ "Process", "the", "user", "s", "http", "get", "request", ".", "Process", "the", "template", "that", "maps", "to", "the", "URI", "that", "was", "hit", "." ]
7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea
https://github.com/teatrove/teatrove/blob/7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea/teaservlet/src/main/java/org/teatrove/teaservlet/TeaServlet.java#L458-L493
14
teatrove/teatrove
teaservlet/src/main/java/org/teatrove/teaservlet/TeaServlet.java
TeaServlet.processResource
private boolean processResource(ApplicationRequest appRequest, ApplicationResponse appResponse) throws IOException { // get the associated system path String requestURI = null; if ((requestURI = appRequest.getPathInfo()) == null) { ...
java
private boolean processResource(ApplicationRequest appRequest, ApplicationResponse appResponse) throws IOException { // get the associated system path String requestURI = null; if ((requestURI = appRequest.getPathInfo()) == null) { ...
[ "private", "boolean", "processResource", "(", "ApplicationRequest", "appRequest", ",", "ApplicationResponse", "appResponse", ")", "throws", "IOException", "{", "// get the associated system path", "String", "requestURI", "=", "null", ";", "if", "(", "(", "requestURI", "...
Inserts a plugin to expose parts of the teaservlet via the EngineAccess interface. private void createEngineAccessPlugin(PluginContext context) { Plugin engineAccess = new EngineAccessPlugin(this); context.addPlugin(engineAccess); context.addPluginListener(engineAccess); }
[ "Inserts", "a", "plugin", "to", "expose", "parts", "of", "the", "teaservlet", "via", "the", "EngineAccess", "interface", "." ]
7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea
https://github.com/teatrove/teatrove/blob/7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea/teaservlet/src/main/java/org/teatrove/teaservlet/TeaServlet.java#L862-L900
15
teatrove/teatrove
teaservlet/src/main/java/org/teatrove/teaservlet/TeaServlet.java
TeaServlet.convertParameter
protected Object convertParameter(String value, Class<?> toType) { if (toType == Boolean.class) { return ! "".equals(value) ? new Boolean("true".equals(value)) : null; } if (toType == Integer.class) { try { return new Integer(value); ...
java
protected Object convertParameter(String value, Class<?> toType) { if (toType == Boolean.class) { return ! "".equals(value) ? new Boolean("true".equals(value)) : null; } if (toType == Integer.class) { try { return new Integer(value); ...
[ "protected", "Object", "convertParameter", "(", "String", "value", ",", "Class", "<", "?", ">", "toType", ")", "{", "if", "(", "toType", "==", "Boolean", ".", "class", ")", "{", "return", "!", "\"\"", ".", "equals", "(", "value", ")", "?", "new", "Bo...
Converts the given HTTP parameter value to the requested type so that it can be passed directly as a template parameter. This method is called if the template that is directly requested accepts non-String parameters, and the request provides non-null values for those parameters. The template may request an array of val...
[ "Converts", "the", "given", "HTTP", "parameter", "value", "to", "the", "requested", "type", "so", "that", "it", "can", "be", "passed", "directly", "as", "a", "template", "parameter", ".", "This", "method", "is", "called", "if", "the", "template", "that", "...
7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea
https://github.com/teatrove/teatrove/blob/7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea/teaservlet/src/main/java/org/teatrove/teaservlet/TeaServlet.java#L1164-L1222
16
teatrove/teatrove
trove/src/main/java/org/teatrove/trove/util/StringReplacer.java
StringReplacer.replace
public static String replace(String source, String pattern, String replacement) { return replace(source, pattern, replacement, 0); }
java
public static String replace(String source, String pattern, String replacement) { return replace(source, pattern, replacement, 0); }
[ "public", "static", "String", "replace", "(", "String", "source", ",", "String", "pattern", ",", "String", "replacement", ")", "{", "return", "replace", "(", "source", ",", "pattern", ",", "replacement", ",", "0", ")", ";", "}" ]
Replaces all exact matches of the given pattern in the source string with the provided replacement. @param source the source string @param pattern the simple string pattern to search for @param replacement the string to use for replacing matched patterns. @return the string with any replacements applied.
[ "Replaces", "all", "exact", "matches", "of", "the", "given", "pattern", "in", "the", "source", "string", "with", "the", "provided", "replacement", "." ]
7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea
https://github.com/teatrove/teatrove/blob/7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea/trove/src/main/java/org/teatrove/trove/util/StringReplacer.java#L40-L43
17
teatrove/teatrove
build-tools/toolbox/src/main/java/org/teatrove/toolbox/beandoc/BeanDocContext.java
BeanDocContext.print
public void print(Object obj) throws IOException { if (mOut != null) { // static Tea! mOut.write(toString(obj)); } }
java
public void print(Object obj) throws IOException { if (mOut != null) { // static Tea! mOut.write(toString(obj)); } }
[ "public", "void", "print", "(", "Object", "obj", ")", "throws", "IOException", "{", "if", "(", "mOut", "!=", "null", ")", "{", "// static Tea!", "mOut", ".", "write", "(", "toString", "(", "obj", ")", ")", ";", "}", "}" ]
The standard context method, implemented to write to the file.
[ "The", "standard", "context", "method", "implemented", "to", "write", "to", "the", "file", "." ]
7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea
https://github.com/teatrove/teatrove/blob/7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea/build-tools/toolbox/src/main/java/org/teatrove/toolbox/beandoc/BeanDocContext.java#L83-L89
18
teatrove/teatrove
tea/src/main/java/org/teatrove/tea/parsetree/Expression.java
Expression.setType
public void setType(Type type) { Type actual = Type.preserveType(this.getType(), type); mConversions.clear(); mExceptionPossible = false; if (actual != null) { // Prefer cast for initial type for correct operation of // setInitialType if a conversion needs to be ...
java
public void setType(Type type) { Type actual = Type.preserveType(this.getType(), type); mConversions.clear(); mExceptionPossible = false; if (actual != null) { // Prefer cast for initial type for correct operation of // setInitialType if a conversion needs to be ...
[ "public", "void", "setType", "(", "Type", "type", ")", "{", "Type", "actual", "=", "Type", ".", "preserveType", "(", "this", ".", "getType", "(", ")", ",", "type", ")", ";", "mConversions", ".", "clear", "(", ")", ";", "mExceptionPossible", "=", "false...
Sets the type of this expression, clearing the conversion chain.
[ "Sets", "the", "type", "of", "this", "expression", "clearing", "the", "conversion", "chain", "." ]
7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea
https://github.com/teatrove/teatrove/blob/7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea/tea/src/main/java/org/teatrove/tea/parsetree/Expression.java#L314-L325
19
teatrove/teatrove
tea/src/main/java/org/teatrove/tea/parsetree/Expression.java
Expression.setInitialType
public void setInitialType(Type type) { Type initial = getInitialType(); Type actual = Type.preserveType(initial, type); if (actual != null && !actual.equals(initial)) { if (initial == null) { setType(actual); } else { Iterator<...
java
public void setInitialType(Type type) { Type initial = getInitialType(); Type actual = Type.preserveType(initial, type); if (actual != null && !actual.equals(initial)) { if (initial == null) { setType(actual); } else { Iterator<...
[ "public", "void", "setInitialType", "(", "Type", "type", ")", "{", "Type", "initial", "=", "getInitialType", "(", ")", ";", "Type", "actual", "=", "Type", ".", "preserveType", "(", "initial", ",", "type", ")", ";", "if", "(", "actual", "!=", "null", "&...
Sets the intial type in the conversion chain, but does not clear the conversions.
[ "Sets", "the", "intial", "type", "in", "the", "conversion", "chain", "but", "does", "not", "clear", "the", "conversions", "." ]
7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea
https://github.com/teatrove/teatrove/blob/7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea/tea/src/main/java/org/teatrove/tea/parsetree/Expression.java#L331-L351
20
teatrove/teatrove
tea/src/main/java/org/teatrove/tea/compiler/Scanner.java
Scanner.peekToken
public synchronized Token peekToken() throws IOException { if (mLookahead.empty()) { return mLookahead.push(scanToken()); } else { return mLookahead.peek(); } }
java
public synchronized Token peekToken() throws IOException { if (mLookahead.empty()) { return mLookahead.push(scanToken()); } else { return mLookahead.peek(); } }
[ "public", "synchronized", "Token", "peekToken", "(", ")", "throws", "IOException", "{", "if", "(", "mLookahead", ".", "empty", "(", ")", ")", "{", "return", "mLookahead", ".", "push", "(", "scanToken", "(", ")", ")", ";", "}", "else", "{", "return", "m...
Returns EOF as the last token.
[ "Returns", "EOF", "as", "the", "last", "token", "." ]
7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea
https://github.com/teatrove/teatrove/blob/7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea/tea/src/main/java/org/teatrove/tea/compiler/Scanner.java#L115-L122
21
teatrove/teatrove
tea/src/main/java/org/teatrove/tea/compiler/Scanner.java
Scanner.scanText
private Token scanText(int c) throws IOException { // Read first character in text so that source info does not include // tags. c = mSource.read(); int startLine = mSource.getLineNumber(); int startPos = mSource.getStartPosition(); int endPos = mSource.getEndPosition();...
java
private Token scanText(int c) throws IOException { // Read first character in text so that source info does not include // tags. c = mSource.read(); int startLine = mSource.getLineNumber(); int startPos = mSource.getStartPosition(); int endPos = mSource.getEndPosition();...
[ "private", "Token", "scanText", "(", "int", "c", ")", "throws", "IOException", "{", "// Read first character in text so that source info does not include", "// tags.", "c", "=", "mSource", ".", "read", "(", ")", ";", "int", "startLine", "=", "mSource", ".", "getLine...
The ENTER_TEXT code has already been scanned when this is called.
[ "The", "ENTER_TEXT", "code", "has", "already", "been", "scanned", "when", "this", "is", "called", "." ]
7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea
https://github.com/teatrove/teatrove/blob/7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea/tea/src/main/java/org/teatrove/tea/compiler/Scanner.java#L400-L451
22
teatrove/teatrove
trove/src/main/java/org/teatrove/trove/util/CompleteIntrospector.java
CompleteIntrospector.main
public static void main(String[] args) throws Exception { Map map = getAllProperties(Class.forName(args[0])); Iterator keys = map.keySet().iterator(); while (keys.hasNext()) { String key = (String)keys.next(); PropertyDescriptor desc = (PropertyDescriptor)map.get(key); ...
java
public static void main(String[] args) throws Exception { Map map = getAllProperties(Class.forName(args[0])); Iterator keys = map.keySet().iterator(); while (keys.hasNext()) { String key = (String)keys.next(); PropertyDescriptor desc = (PropertyDescriptor)map.get(key); ...
[ "public", "static", "void", "main", "(", "String", "[", "]", "args", ")", "throws", "Exception", "{", "Map", "map", "=", "getAllProperties", "(", "Class", ".", "forName", "(", "args", "[", "0", "]", ")", ")", ";", "Iterator", "keys", "=", "map", ".",...
Test program.
[ "Test", "program", "." ]
7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea
https://github.com/teatrove/teatrove/blob/7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea/trove/src/main/java/org/teatrove/trove/util/CompleteIntrospector.java#L48-L56
23
teatrove/teatrove
trove/src/main/java/org/teatrove/trove/util/CompleteIntrospector.java
CompleteIntrospector.getAllProperties
public static Map getAllProperties(Class clazz) throws IntrospectionException { synchronized (cPropertiesCache) { Map properties; Reference ref = (Reference)cPropertiesCache.get(clazz); if (ref != null) { properties = (Map)ref.get(); ...
java
public static Map getAllProperties(Class clazz) throws IntrospectionException { synchronized (cPropertiesCache) { Map properties; Reference ref = (Reference)cPropertiesCache.get(clazz); if (ref != null) { properties = (Map)ref.get(); ...
[ "public", "static", "Map", "getAllProperties", "(", "Class", "clazz", ")", "throws", "IntrospectionException", "{", "synchronized", "(", "cPropertiesCache", ")", "{", "Map", "properties", ";", "Reference", "ref", "=", "(", "Reference", ")", "cPropertiesCache", "."...
A function that returns a Map of all the available properties on a given class including write-only properties. The properties returned is mostly a superset of those returned from the standard JavaBeans Introspector except more properties are made available to interfaces. @return an unmodifiable mapping of property na...
[ "A", "function", "that", "returns", "a", "Map", "of", "all", "the", "available", "properties", "on", "a", "given", "class", "including", "write", "-", "only", "properties", ".", "The", "properties", "returned", "is", "mostly", "a", "superset", "of", "those",...
7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea
https://github.com/teatrove/teatrove/blob/7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea/trove/src/main/java/org/teatrove/trove/util/CompleteIntrospector.java#L68-L90
24
teatrove/teatrove
trove/src/main/java/org/teatrove/trove/classfile/ConstantLongInfo.java
ConstantLongInfo.make
static ConstantLongInfo make(ConstantPool cp, long value) { ConstantInfo ci = new ConstantLongInfo(value); return (ConstantLongInfo)cp.addConstant(ci); }
java
static ConstantLongInfo make(ConstantPool cp, long value) { ConstantInfo ci = new ConstantLongInfo(value); return (ConstantLongInfo)cp.addConstant(ci); }
[ "static", "ConstantLongInfo", "make", "(", "ConstantPool", "cp", ",", "long", "value", ")", "{", "ConstantInfo", "ci", "=", "new", "ConstantLongInfo", "(", "value", ")", ";", "return", "(", "ConstantLongInfo", ")", "cp", ".", "addConstant", "(", "ci", ")", ...
Will return either a new ConstantLongInfo object or one already in the constant pool. If it is a new ConstantLongInfo, it will be inserted into the pool.
[ "Will", "return", "either", "a", "new", "ConstantLongInfo", "object", "or", "one", "already", "in", "the", "constant", "pool", ".", "If", "it", "is", "a", "new", "ConstantLongInfo", "it", "will", "be", "inserted", "into", "the", "pool", "." ]
7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea
https://github.com/teatrove/teatrove/blob/7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea/trove/src/main/java/org/teatrove/trove/classfile/ConstantLongInfo.java#L35-L38
25
teatrove/teatrove
tea/src/main/java/org/teatrove/tea/compiler/Parser.java
Parser.parse
public Template parse() throws IOException { Template t = parseTemplate(); if (t != null) { return t; } return new Template(new SourceInfo(0, 0, 0), null, null, false, null, null); }
java
public Template parse() throws IOException { Template t = parseTemplate(); if (t != null) { return t; } return new Template(new SourceInfo(0, 0, 0), null, null, false, null, null); }
[ "public", "Template", "parse", "(", ")", "throws", "IOException", "{", "Template", "t", "=", "parseTemplate", "(", ")", ";", "if", "(", "t", "!=", "null", ")", "{", "return", "t", ";", "}", "return", "new", "Template", "(", "new", "SourceInfo", "(", ...
Returns a parse tree by its root node. The parse tree is generated from tokens read from the scanner. Any errors encountered while parsing are delivered by dispatching an event. Add a compile listener in order to capture parse errors. @return Non-null template node, even if there were errors during parsing. @see Parse...
[ "Returns", "a", "parse", "tree", "by", "its", "root", "node", ".", "The", "parse", "tree", "is", "generated", "from", "tokens", "read", "from", "the", "scanner", ".", "Any", "errors", "encountered", "while", "parsing", "are", "delivered", "by", "dispatching"...
7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea
https://github.com/teatrove/teatrove/blob/7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea/tea/src/main/java/org/teatrove/tea/compiler/Parser.java#L166-L174
26
teatrove/teatrove
tea/src/main/java/org/teatrove/tea/compiler/Parser.java
Parser.parseIfStatement
private IfStatement parseIfStatement(Token token) throws IOException { SourceInfo info = token.getSourceInfo(); Expression condition = parseExpression(); if (!(condition instanceof ParenExpression)) { error("if.condition", condition.getSourceInfo()); } Block thenPa...
java
private IfStatement parseIfStatement(Token token) throws IOException { SourceInfo info = token.getSourceInfo(); Expression condition = parseExpression(); if (!(condition instanceof ParenExpression)) { error("if.condition", condition.getSourceInfo()); } Block thenPa...
[ "private", "IfStatement", "parseIfStatement", "(", "Token", "token", ")", "throws", "IOException", "{", "SourceInfo", "info", "=", "token", ".", "getSourceInfo", "(", ")", ";", "Expression", "condition", "=", "parseExpression", "(", ")", ";", "if", "(", "!", ...
When this is called, the keyword "if" has already been read.
[ "When", "this", "is", "called", "the", "keyword", "if", "has", "already", "been", "read", "." ]
7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea
https://github.com/teatrove/teatrove/blob/7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea/tea/src/main/java/org/teatrove/tea/compiler/Parser.java#L624-L654
27
teatrove/teatrove
tea/src/main/java/org/teatrove/tea/compiler/Parser.java
Parser.parseForeachStatement
private ForeachStatement parseForeachStatement(Token token) throws IOException { SourceInfo info = token.getSourceInfo(); token = peek(); if (token.getID() == Token.LPAREN) { read(); } else { error("foreach.lparen.expected", token); } ...
java
private ForeachStatement parseForeachStatement(Token token) throws IOException { SourceInfo info = token.getSourceInfo(); token = peek(); if (token.getID() == Token.LPAREN) { read(); } else { error("foreach.lparen.expected", token); } ...
[ "private", "ForeachStatement", "parseForeachStatement", "(", "Token", "token", ")", "throws", "IOException", "{", "SourceInfo", "info", "=", "token", ".", "getSourceInfo", "(", ")", ";", "token", "=", "peek", "(", ")", ";", "if", "(", "token", ".", "getID", ...
When this is called, the keyword "foreach" has already been read.
[ "When", "this", "is", "called", "the", "keyword", "foreach", "has", "already", "been", "read", "." ]
7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea
https://github.com/teatrove/teatrove/blob/7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea/tea/src/main/java/org/teatrove/tea/compiler/Parser.java#L657-L725
28
teatrove/teatrove
tea/src/main/java/org/teatrove/tea/compiler/Parser.java
Parser.parseAssignmentStatement
private AssignmentStatement parseAssignmentStatement(Token token) throws IOException { // TODO: allow lvalue to support dot notations // ie: field = x (store local variable) // obj.field = x (obj.setField) // obj.field.field = x (obj.getField().setField) // a...
java
private AssignmentStatement parseAssignmentStatement(Token token) throws IOException { // TODO: allow lvalue to support dot notations // ie: field = x (store local variable) // obj.field = x (obj.setField) // obj.field.field = x (obj.getField().setField) // a...
[ "private", "AssignmentStatement", "parseAssignmentStatement", "(", "Token", "token", ")", "throws", "IOException", "{", "// TODO: allow lvalue to support dot notations", "// ie: field = x (store local variable)", "// obj.field = x (obj.setField)", "// obj.field.field = x (obj.getFi...
When this is called, the identifier token has already been read.
[ "When", "this", "is", "called", "the", "identifier", "token", "has", "already", "been", "read", "." ]
7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea
https://github.com/teatrove/teatrove/blob/7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea/tea/src/main/java/org/teatrove/tea/compiler/Parser.java#L728-L763
29
teatrove/teatrove
tea/src/main/java/org/teatrove/tea/compiler/Parser.java
Parser.parseFunctionCallExpression
private FunctionCallExpression parseFunctionCallExpression(Token token) throws IOException { Token next = peek(); if (next.getID() != Token.LPAREN) { return null; } SourceInfo info = token.getSourceInfo(); Name target = new Name(info, token.getStringValue()); //...
java
private FunctionCallExpression parseFunctionCallExpression(Token token) throws IOException { Token next = peek(); if (next.getID() != Token.LPAREN) { return null; } SourceInfo info = token.getSourceInfo(); Name target = new Name(info, token.getStringValue()); //...
[ "private", "FunctionCallExpression", "parseFunctionCallExpression", "(", "Token", "token", ")", "throws", "IOException", "{", "Token", "next", "=", "peek", "(", ")", ";", "if", "(", "next", ".", "getID", "(", ")", "!=", "Token", ".", "LPAREN", ")", "{", "r...
a FunctionCallExpression. Token passed in must be an identifier.
[ "a", "FunctionCallExpression", ".", "Token", "passed", "in", "must", "be", "an", "identifier", "." ]
7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea
https://github.com/teatrove/teatrove/blob/7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea/tea/src/main/java/org/teatrove/tea/compiler/Parser.java#L1424-L1438
30
teatrove/teatrove
trove/src/main/java/org/teatrove/trove/classfile/ConstantPool.java
ConstantPool.getConstant
public ConstantInfo getConstant(int index) { if (mIndexedConstants == null) { throw new ArrayIndexOutOfBoundsException ("Constant pool indexes have not been assigned"); } return (ConstantInfo)mIndexedConstants.get(index); }
java
public ConstantInfo getConstant(int index) { if (mIndexedConstants == null) { throw new ArrayIndexOutOfBoundsException ("Constant pool indexes have not been assigned"); } return (ConstantInfo)mIndexedConstants.get(index); }
[ "public", "ConstantInfo", "getConstant", "(", "int", "index", ")", "{", "if", "(", "mIndexedConstants", "==", "null", ")", "{", "throw", "new", "ArrayIndexOutOfBoundsException", "(", "\"Constant pool indexes have not been assigned\"", ")", ";", "}", "return", "(", "...
Returns a constant from the pool by index, or throws an exception if not found. If this constant pool has not yet been written or was not created by the read method, indexes are not assigned. @throws ArrayIndexOutOfBoundsException if index is out of range.
[ "Returns", "a", "constant", "from", "the", "pool", "by", "index", "or", "throws", "an", "exception", "if", "not", "found", ".", "If", "this", "constant", "pool", "has", "not", "yet", "been", "written", "or", "was", "not", "created", "by", "the", "read", ...
7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea
https://github.com/teatrove/teatrove/blob/7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea/trove/src/main/java/org/teatrove/trove/classfile/ConstantPool.java#L72-L79
31
teatrove/teatrove
trove/src/main/java/org/teatrove/trove/classfile/ConstantPool.java
ConstantPool.addConstantConstructor
public ConstantMethodInfo addConstantConstructor(String className, TypeDesc[] params) { return addConstantMethod(className, "<init>", null, params); }
java
public ConstantMethodInfo addConstantConstructor(String className, TypeDesc[] params) { return addConstantMethod(className, "<init>", null, params); }
[ "public", "ConstantMethodInfo", "addConstantConstructor", "(", "String", "className", ",", "TypeDesc", "[", "]", "params", ")", "{", "return", "addConstantMethod", "(", "className", ",", "\"<init>\"", ",", "null", ",", "params", ")", ";", "}" ]
Get or create a constant from the constant pool representing a constructor in any class.
[ "Get", "or", "create", "a", "constant", "from", "the", "constant", "pool", "representing", "a", "constructor", "in", "any", "class", "." ]
7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea
https://github.com/teatrove/teatrove/blob/7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea/trove/src/main/java/org/teatrove/trove/classfile/ConstantPool.java#L171-L174
32
teatrove/teatrove
trove/src/main/java/org/teatrove/trove/classfile/ConstantPool.java
ConstantPool.addConstant
public ConstantInfo addConstant(ConstantInfo constant) { ConstantInfo info = (ConstantInfo)mConstants.get(constant); if (info != null) { return info; } int entryCount = constant.getEntryCount(); if (mIndexedConstants != null && mPreserveOrder) { ...
java
public ConstantInfo addConstant(ConstantInfo constant) { ConstantInfo info = (ConstantInfo)mConstants.get(constant); if (info != null) { return info; } int entryCount = constant.getEntryCount(); if (mIndexedConstants != null && mPreserveOrder) { ...
[ "public", "ConstantInfo", "addConstant", "(", "ConstantInfo", "constant", ")", "{", "ConstantInfo", "info", "=", "(", "ConstantInfo", ")", "mConstants", ".", "get", "(", "constant", ")", ";", "if", "(", "info", "!=", "null", ")", "{", "return", "info", ";"...
Will only insert into the pool if the constant is not already in the pool. @return The actual constant in the pool.
[ "Will", "only", "insert", "into", "the", "pool", "if", "the", "constant", "is", "not", "already", "in", "the", "pool", "." ]
7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea
https://github.com/teatrove/teatrove/blob/7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea/trove/src/main/java/org/teatrove/trove/classfile/ConstantPool.java#L232-L250
33
teatrove/teatrove
teaapps/src/main/java/org/teatrove/teaapps/contexts/HttpContext.java
HttpContext.doGet
public String doGet(String host, String path, int port, Map<String, String> headers, int timeout) throws UnknownHostException, ConnectException, IOException { return doHttpCall(host, path, null, port, headers, timeout, false); }
java
public String doGet(String host, String path, int port, Map<String, String> headers, int timeout) throws UnknownHostException, ConnectException, IOException { return doHttpCall(host, path, null, port, headers, timeout, false); }
[ "public", "String", "doGet", "(", "String", "host", ",", "String", "path", ",", "int", "port", ",", "Map", "<", "String", ",", "String", ">", "headers", ",", "int", "timeout", ")", "throws", "UnknownHostException", ",", "ConnectException", ",", "IOException"...
Perform an HTTP GET at the given path returning the results of the response. @param host The hostname of the request @param path The path of the request @param port The port of the request @param headers The headers to pass in the request @param timeout The timeout of the request in milliseconds @return The data of t...
[ "Perform", "an", "HTTP", "GET", "at", "the", "given", "path", "returning", "the", "results", "of", "the", "response", "." ]
7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea
https://github.com/teatrove/teatrove/blob/7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea/teaapps/src/main/java/org/teatrove/teaapps/contexts/HttpContext.java#L60-L65
34
teatrove/teatrove
teaapps/src/main/java/org/teatrove/teaapps/contexts/HttpContext.java
HttpContext.doSecureGet
public String doSecureGet(String host, String path, int port, Map<String, String> headers, int timeout) throws UnknownHostException, ConnectException, IOException { return doHttpCall(host, path, null, port, headers, timeout, true); ...
java
public String doSecureGet(String host, String path, int port, Map<String, String> headers, int timeout) throws UnknownHostException, ConnectException, IOException { return doHttpCall(host, path, null, port, headers, timeout, true); ...
[ "public", "String", "doSecureGet", "(", "String", "host", ",", "String", "path", ",", "int", "port", ",", "Map", "<", "String", ",", "String", ">", "headers", ",", "int", "timeout", ")", "throws", "UnknownHostException", ",", "ConnectException", ",", "IOExce...
Perform a secure HTTPS GET at the given path returning the results of the response. @param host The hostname of the request @param path The path of the request @param port The port of the request @param headers The headers to pass in the request @param timeout The timeout of the request in milliseconds @return The da...
[ "Perform", "a", "secure", "HTTPS", "GET", "at", "the", "given", "path", "returning", "the", "results", "of", "the", "response", "." ]
7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea
https://github.com/teatrove/teatrove/blob/7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea/teaapps/src/main/java/org/teatrove/teaapps/contexts/HttpContext.java#L83-L89
35
teatrove/teatrove
teaapps/src/main/java/org/teatrove/teaapps/contexts/HttpContext.java
HttpContext.doPost
public String doPost(String host, String path, String postData, int port, Map<String, String> headers, int timeout) throws UnknownHostException, ConnectException, IOException { return doHttpCall(host, path, postData, port, headers, timeout, false); }
java
public String doPost(String host, String path, String postData, int port, Map<String, String> headers, int timeout) throws UnknownHostException, ConnectException, IOException { return doHttpCall(host, path, postData, port, headers, timeout, false); }
[ "public", "String", "doPost", "(", "String", "host", ",", "String", "path", ",", "String", "postData", ",", "int", "port", ",", "Map", "<", "String", ",", "String", ">", "headers", ",", "int", "timeout", ")", "throws", "UnknownHostException", ",", "Connect...
Perform an HTTP POST at the given path sending in the given post data returning the results of the response. @param host The hostname of the request @param path The path of the request @param postData The POST data to send in the request @param port The port of the request @param headers The headers to pass in the req...
[ "Perform", "an", "HTTP", "POST", "at", "the", "given", "path", "sending", "in", "the", "given", "post", "data", "returning", "the", "results", "of", "the", "response", "." ]
7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea
https://github.com/teatrove/teatrove/blob/7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea/teaapps/src/main/java/org/teatrove/teaapps/contexts/HttpContext.java#L108-L113
36
teatrove/teatrove
teaapps/src/main/java/org/teatrove/teaapps/contexts/HttpContext.java
HttpContext.doSecurePost
public String doSecurePost(String host, String path, String postData, int port, Map<String, String> headers, int timeout) throws UnknownHostException, ConnectException, IOException { return doHttpCall(host, path, postData, port, hea...
java
public String doSecurePost(String host, String path, String postData, int port, Map<String, String> headers, int timeout) throws UnknownHostException, ConnectException, IOException { return doHttpCall(host, path, postData, port, hea...
[ "public", "String", "doSecurePost", "(", "String", "host", ",", "String", "path", ",", "String", "postData", ",", "int", "port", ",", "Map", "<", "String", ",", "String", ">", "headers", ",", "int", "timeout", ")", "throws", "UnknownHostException", ",", "C...
Perform a secure HTTPS POST at the given path sending in the given post data returning the results of the response. @param host The hostname of the request @param path The path of the request @param postData The POST data to send in the request @param port The port of the request @param headers The headers to pass in ...
[ "Perform", "a", "secure", "HTTPS", "POST", "at", "the", "given", "path", "sending", "in", "the", "given", "post", "data", "returning", "the", "results", "of", "the", "response", "." ]
7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea
https://github.com/teatrove/teatrove/blob/7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea/teaapps/src/main/java/org/teatrove/teaapps/contexts/HttpContext.java#L132-L138
37
teatrove/teatrove
teaservlet/src/main/java/org/teatrove/teatools/TypeDescription.java
TypeDescription.getArrayType
public TypeDescription getArrayType() { Class<?> c = getTeaToolsUtils().getArrayType(mType); if (mType == c) { return this; } return getTeaToolsUtils().createTypeDescription(c); }
java
public TypeDescription getArrayType() { Class<?> c = getTeaToolsUtils().getArrayType(mType); if (mType == c) { return this; } return getTeaToolsUtils().createTypeDescription(c); }
[ "public", "TypeDescription", "getArrayType", "(", ")", "{", "Class", "<", "?", ">", "c", "=", "getTeaToolsUtils", "(", ")", ".", "getArrayType", "(", "mType", ")", ";", "if", "(", "mType", "==", "c", ")", "{", "return", "this", ";", "}", "return", "g...
Returns the array type. Returns this if it is not an array type.
[ "Returns", "the", "array", "type", ".", "Returns", "this", "if", "it", "is", "not", "an", "array", "type", "." ]
7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea
https://github.com/teatrove/teatrove/blob/7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea/teaservlet/src/main/java/org/teatrove/teatools/TypeDescription.java#L129-L137
38
teatrove/teatrove
teaservlet/src/main/java/org/teatrove/teatools/TypeDescription.java
TypeDescription.getBeanInfo
public BeanInfo getBeanInfo() { if (mBeanInfo == null) { try { mBeanInfo = getTeaToolsUtils().getBeanInfo(mType); } catch (Exception e) { return null; } } return mBeanInfo; }
java
public BeanInfo getBeanInfo() { if (mBeanInfo == null) { try { mBeanInfo = getTeaToolsUtils().getBeanInfo(mType); } catch (Exception e) { return null; } } return mBeanInfo; }
[ "public", "BeanInfo", "getBeanInfo", "(", ")", "{", "if", "(", "mBeanInfo", "==", "null", ")", "{", "try", "{", "mBeanInfo", "=", "getTeaToolsUtils", "(", ")", ".", "getBeanInfo", "(", "mType", ")", ";", "}", "catch", "(", "Exception", "e", ")", "{", ...
Introspects a Java bean to learn about all its properties, exposed methods, and events. Returns null if the BeanInfo could not be created.
[ "Introspects", "a", "Java", "bean", "to", "learn", "about", "all", "its", "properties", "exposed", "methods", "and", "events", ".", "Returns", "null", "if", "the", "BeanInfo", "could", "not", "be", "created", "." ]
7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea
https://github.com/teatrove/teatrove/blob/7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea/teaservlet/src/main/java/org/teatrove/teatools/TypeDescription.java#L161-L172
39
teatrove/teatrove
teaservlet/src/main/java/org/teatrove/teatools/TypeDescription.java
TypeDescription.getPropertyDescriptors
public PropertyDescriptor[] getPropertyDescriptors() { BeanInfo info = getBeanInfo(); if (info == null) { return null; } PropertyDescriptor[] pds = info.getPropertyDescriptors(); getTeaToolsUtils().sortPropertyDescriptors(pds); return pds; }
java
public PropertyDescriptor[] getPropertyDescriptors() { BeanInfo info = getBeanInfo(); if (info == null) { return null; } PropertyDescriptor[] pds = info.getPropertyDescriptors(); getTeaToolsUtils().sortPropertyDescriptors(pds); return pds; }
[ "public", "PropertyDescriptor", "[", "]", "getPropertyDescriptors", "(", ")", "{", "BeanInfo", "info", "=", "getBeanInfo", "(", ")", ";", "if", "(", "info", "==", "null", ")", "{", "return", "null", ";", "}", "PropertyDescriptor", "[", "]", "pds", "=", "...
Returns the type's PropertyDescriptors.
[ "Returns", "the", "type", "s", "PropertyDescriptors", "." ]
7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea
https://github.com/teatrove/teatrove/blob/7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea/teaservlet/src/main/java/org/teatrove/teatools/TypeDescription.java#L191-L200
40
teatrove/teatrove
teaservlet/src/main/java/org/teatrove/teatools/TypeDescription.java
TypeDescription.getMethodDescriptors
public MethodDescriptor[] getMethodDescriptors() { BeanInfo info = getBeanInfo(); if (info == null) { return null; } MethodDescriptor[] mds = info.getMethodDescriptors(); getTeaToolsUtils().sortMethodDescriptors(mds); return mds; }
java
public MethodDescriptor[] getMethodDescriptors() { BeanInfo info = getBeanInfo(); if (info == null) { return null; } MethodDescriptor[] mds = info.getMethodDescriptors(); getTeaToolsUtils().sortMethodDescriptors(mds); return mds; }
[ "public", "MethodDescriptor", "[", "]", "getMethodDescriptors", "(", ")", "{", "BeanInfo", "info", "=", "getBeanInfo", "(", ")", ";", "if", "(", "info", "==", "null", ")", "{", "return", "null", ";", "}", "MethodDescriptor", "[", "]", "mds", "=", "info",...
Returns the type's MethodDescriptors.
[ "Returns", "the", "type", "s", "MethodDescriptors", "." ]
7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea
https://github.com/teatrove/teatrove/blob/7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea/teaservlet/src/main/java/org/teatrove/teatools/TypeDescription.java#L229-L238
41
teatrove/teatrove
trove/src/main/java/org/teatrove/trove/classfile/Opcode.java
Opcode.reverseIfOpcode
public final static byte reverseIfOpcode(byte opcode) { // Actually, because the numbers assigned to the "if" opcodes // were so cleverly chosen, all I really need to do is toggle // bit 0. I'm not going to do that because I still need to check if // an invalid opcode was passed in. ...
java
public final static byte reverseIfOpcode(byte opcode) { // Actually, because the numbers assigned to the "if" opcodes // were so cleverly chosen, all I really need to do is toggle // bit 0. I'm not going to do that because I still need to check if // an invalid opcode was passed in. ...
[ "public", "final", "static", "byte", "reverseIfOpcode", "(", "byte", "opcode", ")", "{", "// Actually, because the numbers assigned to the \"if\" opcodes", "// were so cleverly chosen, all I really need to do is toggle", "// bit 0. I'm not going to do that because I still need to check if ",...
Reverses the condition for an "if" opcode. i.e. IFEQ is changed to IFNE.
[ "Reverses", "the", "condition", "for", "an", "if", "opcode", ".", "i", ".", "e", ".", "IFEQ", "is", "changed", "to", "IFNE", "." ]
7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea
https://github.com/teatrove/teatrove/blob/7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea/trove/src/main/java/org/teatrove/trove/classfile/Opcode.java#L250-L293
42
teatrove/teatrove
teaservlet/src/main/java/org/teatrove/teaservlet/TeaServletAdmin.java
TeaServletAdmin.getFunctions
public FunctionInfo[] getFunctions() { // TODO: make this a little more useful by showing more function // details. ApplicationInfo[] AppInf = getApplications(); FunctionInfo[] funcArray = null; try { MethodDescriptor[] methods = Introspector .getBe...
java
public FunctionInfo[] getFunctions() { // TODO: make this a little more useful by showing more function // details. ApplicationInfo[] AppInf = getApplications(); FunctionInfo[] funcArray = null; try { MethodDescriptor[] methods = Introspector .getBe...
[ "public", "FunctionInfo", "[", "]", "getFunctions", "(", ")", "{", "// TODO: make this a little more useful by showing more function", "// details.", "ApplicationInfo", "[", "]", "AppInf", "=", "getApplications", "(", ")", ";", "FunctionInfo", "[", "]", "funcArray", "="...
Returns information about all functions available to the templates.
[ "Returns", "information", "about", "all", "functions", "available", "to", "the", "templates", "." ]
7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea
https://github.com/teatrove/teatrove/blob/7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea/teaservlet/src/main/java/org/teatrove/teaservlet/TeaServletAdmin.java#L240-L280
43
teatrove/teatrove
teaservlet/src/main/java/org/teatrove/teaservlet/TeaServletAdmin.java
TeaServletAdmin.getKnownTemplates
@SuppressWarnings("unchecked") public TemplateWrapper[] getKnownTemplates() { if (mTemplateOrdering == null) { setTemplateOrdering("name"); } Comparator<TemplateWrapper> comparator = BeanComparator.forClass(TemplateWrapper.class).orderBy("name"); Set<Templat...
java
@SuppressWarnings("unchecked") public TemplateWrapper[] getKnownTemplates() { if (mTemplateOrdering == null) { setTemplateOrdering("name"); } Comparator<TemplateWrapper> comparator = BeanComparator.forClass(TemplateWrapper.class).orderBy("name"); Set<Templat...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "TemplateWrapper", "[", "]", "getKnownTemplates", "(", ")", "{", "if", "(", "mTemplateOrdering", "==", "null", ")", "{", "setTemplateOrdering", "(", "\"name\"", ")", ";", "}", "Comparator", "<", "Te...
Provides an ordered array of available templates using a handy wrapper class.
[ "Provides", "an", "ordered", "array", "of", "available", "templates", "using", "a", "handy", "wrapper", "class", "." ]
7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea
https://github.com/teatrove/teatrove/blob/7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea/teaservlet/src/main/java/org/teatrove/teaservlet/TeaServletAdmin.java#L337-L389
44
teatrove/teatrove
teaservlet/src/main/java/org/teatrove/teaservlet/TeaServletAdmin.java
TeaServletAdmin.getTemplateServerClient
private HttpClient getTemplateServerClient(String remoteSource) throws IOException { // TODO: this was copied from the RemoteCompiler class. This needs // to be moved into a location where both can access it! int port = 80; String host = remoteSource.substring(RemoteCompilationProvider.TEMPLATE_LOAD_PRO...
java
private HttpClient getTemplateServerClient(String remoteSource) throws IOException { // TODO: this was copied from the RemoteCompiler class. This needs // to be moved into a location where both can access it! int port = 80; String host = remoteSource.substring(RemoteCompilationProvider.TEMPLATE_LOAD_PRO...
[ "private", "HttpClient", "getTemplateServerClient", "(", "String", "remoteSource", ")", "throws", "IOException", "{", "// TODO: this was copied from the RemoteCompiler class. This needs", "// to be moved into a location where both can access it!", "int", "port", "=", "80", ";"...
returns a socket connected to a host running the TemplateServerServlet
[ "returns", "a", "socket", "connected", "to", "a", "host", "running", "the", "TemplateServerServlet" ]
7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea
https://github.com/teatrove/teatrove/blob/7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea/teaservlet/src/main/java/org/teatrove/teaservlet/TeaServletAdmin.java#L491-L518
45
teatrove/teatrove
trove/src/main/java/org/teatrove/trove/net/LocalNetResolver.java
LocalNetResolver.getAllLocalInetAddresses
private static InetAddress[] getAllLocalInetAddresses(final Log log) throws SocketException { final List addresses = new ArrayList(); // get the network adapters final Enumeration netInterfaces = NetworkInterface.getNetworkInterfaces(); while (netInterfaces.hasMoreElements...
java
private static InetAddress[] getAllLocalInetAddresses(final Log log) throws SocketException { final List addresses = new ArrayList(); // get the network adapters final Enumeration netInterfaces = NetworkInterface.getNetworkInterfaces(); while (netInterfaces.hasMoreElements...
[ "private", "static", "InetAddress", "[", "]", "getAllLocalInetAddresses", "(", "final", "Log", "log", ")", "throws", "SocketException", "{", "final", "List", "addresses", "=", "new", "ArrayList", "(", ")", ";", "// get the network adapters", "final", "Enumeration", ...
calling getHostName returns the IP. how do we get the host?
[ "calling", "getHostName", "returns", "the", "IP", ".", "how", "do", "we", "get", "the", "host?" ]
7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea
https://github.com/teatrove/teatrove/blob/7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea/trove/src/main/java/org/teatrove/trove/net/LocalNetResolver.java#L157-L190
46
teatrove/teatrove
teaservlet/src/main/java/org/teatrove/teaservlet/TeaServletEngineImpl.java
TeaServletEngineImpl.getLogEvents
public LogEvent[] getLogEvents() { if (mLogEvents == null) { return new LogEvent[0]; } else { LogEvent[] events = new LogEvent[mLogEvents.size()]; return (LogEvent[])mLogEvents.toArray(events); } }
java
public LogEvent[] getLogEvents() { if (mLogEvents == null) { return new LogEvent[0]; } else { LogEvent[] events = new LogEvent[mLogEvents.size()]; return (LogEvent[])mLogEvents.toArray(events); } }
[ "public", "LogEvent", "[", "]", "getLogEvents", "(", ")", "{", "if", "(", "mLogEvents", "==", "null", ")", "{", "return", "new", "LogEvent", "[", "0", "]", ";", "}", "else", "{", "LogEvent", "[", "]", "events", "=", "new", "LogEvent", "[", "mLogEvent...
Returns the lines that have been written to the log file. This is used by the admin functions.
[ "Returns", "the", "lines", "that", "have", "been", "written", "to", "the", "log", "file", ".", "This", "is", "used", "by", "the", "admin", "functions", "." ]
7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea
https://github.com/teatrove/teatrove/blob/7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea/teaservlet/src/main/java/org/teatrove/teaservlet/TeaServletEngineImpl.java#L427-L435
47
teatrove/teatrove
teaservlet/src/main/java/org/teatrove/teaservlet/TeaServletEngineImpl.java
TeaServletEngineImpl.findTemplate
public Template findTemplate(String uri, HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { return findTemplate(uri, request, response, getTemplateSource()); }
java
public Template findTemplate(String uri, HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { return findTemplate(uri, request, response, getTemplateSource()); }
[ "public", "Template", "findTemplate", "(", "String", "uri", ",", "HttpServletRequest", "request", ",", "HttpServletResponse", "response", ")", "throws", "ServletException", ",", "IOException", "{", "return", "findTemplate", "(", "uri", ",", "request", ",", "response...
Finds a template based on the given URI. If path ends in a slash, revert to loading default template. If default not found or not specified, return null. @param uri the URI of the template to find @return the template that maps to the URI or null if no template maps to the URI
[ "Finds", "a", "template", "based", "on", "the", "given", "URI", ".", "If", "path", "ends", "in", "a", "slash", "revert", "to", "loading", "default", "template", ".", "If", "default", "not", "found", "or", "not", "specified", "return", "null", "." ]
7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea
https://github.com/teatrove/teatrove/blob/7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea/teaservlet/src/main/java/org/teatrove/teaservlet/TeaServletEngineImpl.java#L463-L469
48
teatrove/teatrove
teaservlet/src/main/java/org/teatrove/teaservlet/TeaServletEngineImpl.java
TeaServletEngineImpl.createHttpContext
public HttpContext createHttpContext(ApplicationRequest req, ApplicationResponse resp) throws Exception { Template template = (Template) req.getTemplate(); return createHttpContext(req, resp, template.getTemplateSource()...
java
public HttpContext createHttpContext(ApplicationRequest req, ApplicationResponse resp) throws Exception { Template template = (Template) req.getTemplate(); return createHttpContext(req, resp, template.getTemplateSource()...
[ "public", "HttpContext", "createHttpContext", "(", "ApplicationRequest", "req", ",", "ApplicationResponse", "resp", ")", "throws", "Exception", "{", "Template", "template", "=", "(", "Template", ")", "req", ".", "getTemplate", "(", ")", ";", "return", "createHttpC...
Lets external classes use the HttpContext for their own, possibly malicious purposes.
[ "Lets", "external", "classes", "use", "the", "HttpContext", "for", "their", "own", "possibly", "malicious", "purposes", "." ]
7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea
https://github.com/teatrove/teatrove/blob/7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea/teaservlet/src/main/java/org/teatrove/teaservlet/TeaServletEngineImpl.java#L572-L580
49
teatrove/teatrove
teaservlet/src/main/java/org/teatrove/teaservlet/TeaServletEngineImpl.java
TeaServletEngineImpl.createTemplateSource
private TeaServletTemplateSource createTemplateSource( ContextSource contextSource) { return TeaServletTemplateSource.createTemplateSource( getServletContext(), (TeaServletContextSource) contextSource, getProperties().subMap("template"...
java
private TeaServletTemplateSource createTemplateSource( ContextSource contextSource) { return TeaServletTemplateSource.createTemplateSource( getServletContext(), (TeaServletContextSource) contextSource, getProperties().subMap("template"...
[ "private", "TeaServletTemplateSource", "createTemplateSource", "(", "ContextSource", "contextSource", ")", "{", "return", "TeaServletTemplateSource", ".", "createTemplateSource", "(", "getServletContext", "(", ")", ",", "(", "TeaServletContextSource", ")", "contextSource", ...
Create a template source using the composite context passed to the method. @param contextSource The composite context source for all the applications in the ApplicationDepot. @return A newly created template source.
[ "Create", "a", "template", "source", "using", "the", "composite", "context", "passed", "to", "the", "method", "." ]
7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea
https://github.com/teatrove/teatrove/blob/7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea/teaservlet/src/main/java/org/teatrove/teaservlet/TeaServletEngineImpl.java#L600-L607
50
teatrove/teatrove
trove/src/main/java/org/teatrove/trove/util/FlyweightSet.java
FlyweightSet.put
public synchronized Object put(Object obj) { // This implementation is based on the IdentityMap.put method. if (obj == null) { return null; } Entry tab[] = mTable; int hash = hashCode(obj); int index = (hash & 0x7FFFFFFF) % tab.length; ...
java
public synchronized Object put(Object obj) { // This implementation is based on the IdentityMap.put method. if (obj == null) { return null; } Entry tab[] = mTable; int hash = hashCode(obj); int index = (hash & 0x7FFFFFFF) % tab.length; ...
[ "public", "synchronized", "Object", "put", "(", "Object", "obj", ")", "{", "// This implementation is based on the IdentityMap.put method.", "if", "(", "obj", "==", "null", ")", "{", "return", "null", ";", "}", "Entry", "tab", "[", "]", "=", "mTable", ";", "in...
Pass in a candidate flyweight object and get a unique instance from this set. The returned object will always be of the same type as that passed in. If the object passed in does not equal any object currently in the set, it will be added to the set, becoming a flyweight. @param obj candidate flyweight; null is also ac...
[ "Pass", "in", "a", "candidate", "flyweight", "object", "and", "get", "a", "unique", "instance", "from", "this", "set", ".", "The", "returned", "object", "will", "always", "be", "of", "the", "same", "type", "as", "that", "passed", "in", ".", "If", "the", ...
7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea
https://github.com/teatrove/teatrove/blob/7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea/trove/src/main/java/org/teatrove/trove/util/FlyweightSet.java#L61-L111
51
teatrove/teatrove
tea/src/main/java/org/teatrove/tea/log/TeaLog.java
TeaLog.printTeaStackTraceLines
private String printTeaStackTraceLines(TeaStackTraceLine[] lines) { String result = ""; for (int line = 0; line < lines.length; line++) { if (line > 0) { result += '\n'; } result += lines[line].toString(); } return result; }
java
private String printTeaStackTraceLines(TeaStackTraceLine[] lines) { String result = ""; for (int line = 0; line < lines.length; line++) { if (line > 0) { result += '\n'; } result += lines[line].toString(); } return result; }
[ "private", "String", "printTeaStackTraceLines", "(", "TeaStackTraceLine", "[", "]", "lines", ")", "{", "String", "result", "=", "\"\"", ";", "for", "(", "int", "line", "=", "0", ";", "line", "<", "lines", ".", "length", ";", "line", "++", ")", "{", "if...
Prints the stack trace lines to a String. @param lines @return the output of the stack trace lines as a string
[ "Prints", "the", "stack", "trace", "lines", "to", "a", "String", "." ]
7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea
https://github.com/teatrove/teatrove/blob/7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea/tea/src/main/java/org/teatrove/tea/log/TeaLog.java#L160-L171
52
teatrove/teatrove
tea/src/main/java/org/teatrove/tea/log/TeaLog.java
TeaLog.getTeaStackTraceLines
private TeaStackTraceLine[] getTeaStackTraceLines(Throwable t) { // grab the existing stack trace StringWriter stackTraceGrabber = new StringWriter(); t.printStackTrace(new PrintWriter(stackTraceGrabber)); String stackTrace = stackTraceGrabber.toString(); int extensionIndex = st...
java
private TeaStackTraceLine[] getTeaStackTraceLines(Throwable t) { // grab the existing stack trace StringWriter stackTraceGrabber = new StringWriter(); t.printStackTrace(new PrintWriter(stackTraceGrabber)); String stackTrace = stackTraceGrabber.toString(); int extensionIndex = st...
[ "private", "TeaStackTraceLine", "[", "]", "getTeaStackTraceLines", "(", "Throwable", "t", ")", "{", "// grab the existing stack trace", "StringWriter", "stackTraceGrabber", "=", "new", "StringWriter", "(", ")", ";", "t", ".", "printStackTrace", "(", "new", "PrintWrite...
Splits the stack trace into separate lines and extracts the template name and line number. @param t @return the separated stack trace lines
[ "Splits", "the", "stack", "trace", "into", "separate", "lines", "and", "extracts", "the", "template", "name", "and", "line", "number", "." ]
7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea
https://github.com/teatrove/teatrove/blob/7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea/tea/src/main/java/org/teatrove/tea/log/TeaLog.java#L180-L251
53
teatrove/teatrove
build-tools/teatools/src/main/java/org/teatrove/teatools/ParameterDescription.java
ParameterDescription.getName
public String getName() { String name = super.getName(); if (name != null) { if (name.equals(getParameterDescriptor().getDisplayName()) || name.length() == 0) { name = null; } } return name; }
java
public String getName() { String name = super.getName(); if (name != null) { if (name.equals(getParameterDescriptor().getDisplayName()) || name.length() == 0) { name = null; } } return name; }
[ "public", "String", "getName", "(", ")", "{", "String", "name", "=", "super", ".", "getName", "(", ")", ";", "if", "(", "name", "!=", "null", ")", "{", "if", "(", "name", ".", "equals", "(", "getParameterDescriptor", "(", ")", ".", "getDisplayName", ...
Returns the formal param name, or null if the formal name is not available.
[ "Returns", "the", "formal", "param", "name", "or", "null", "if", "the", "formal", "name", "is", "not", "available", "." ]
7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea
https://github.com/teatrove/teatrove/blob/7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea/build-tools/teatools/src/main/java/org/teatrove/teatools/ParameterDescription.java#L61-L71
54
teatrove/teatrove
trove/src/main/java/org/teatrove/trove/classfile/ConstantNameAndTypeInfo.java
ConstantNameAndTypeInfo.make
static ConstantNameAndTypeInfo make(ConstantPool cp, String name, Descriptor type) { ConstantInfo ci = new ConstantNameAndTypeInfo(cp, name, type); return (ConstantNameAndTypeInfo)cp.addConstant(ci); }
java
static ConstantNameAndTypeInfo make(ConstantPool cp, String name, Descriptor type) { ConstantInfo ci = new ConstantNameAndTypeInfo(cp, name, type); return (ConstantNameAndTypeInfo)cp.addConstant(ci); }
[ "static", "ConstantNameAndTypeInfo", "make", "(", "ConstantPool", "cp", ",", "String", "name", ",", "Descriptor", "type", ")", "{", "ConstantInfo", "ci", "=", "new", "ConstantNameAndTypeInfo", "(", "cp", ",", "name", ",", "type", ")", ";", "return", "(", "Co...
Will return either a new ConstantNameAndTypeInfo object or one already in the constant pool. If it is a new ConstantNameAndTypeInfo, it will be inserted into the pool.
[ "Will", "return", "either", "a", "new", "ConstantNameAndTypeInfo", "object", "or", "one", "already", "in", "the", "constant", "pool", ".", "If", "it", "is", "a", "new", "ConstantNameAndTypeInfo", "it", "will", "be", "inserted", "into", "the", "pool", "." ]
7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea
https://github.com/teatrove/teatrove/blob/7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea/trove/src/main/java/org/teatrove/trove/classfile/ConstantNameAndTypeInfo.java#L40-L45
55
teatrove/teatrove
teaservlet/src/main/java/org/teatrove/teatools/MethodDescription.java
MethodDescription.getReturnType
public TypeDescription getReturnType() { if (mReturnType == null) { mReturnType = getTeaToolsUtils().createTypeDescription( getMethod().getReturnType()); } return mReturnType; }
java
public TypeDescription getReturnType() { if (mReturnType == null) { mReturnType = getTeaToolsUtils().createTypeDescription( getMethod().getReturnType()); } return mReturnType; }
[ "public", "TypeDescription", "getReturnType", "(", ")", "{", "if", "(", "mReturnType", "==", "null", ")", "{", "mReturnType", "=", "getTeaToolsUtils", "(", ")", ".", "createTypeDescription", "(", "getMethod", "(", ")", ".", "getReturnType", "(", ")", ")", ";...
Returns the method's return type
[ "Returns", "the", "method", "s", "return", "type" ]
7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea
https://github.com/teatrove/teatrove/blob/7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea/teaservlet/src/main/java/org/teatrove/teatools/MethodDescription.java#L81-L89
56
teatrove/teatrove
teaapps/src/main/java/org/teatrove/teaapps/contexts/ListContext.java
ListContext.add
public <T> void add(List<T> list, int index, T value) { list.add(index, value); }
java
public <T> void add(List<T> list, int index, T value) { list.add(index, value); }
[ "public", "<", "T", ">", "void", "add", "(", "List", "<", "T", ">", "list", ",", "int", "index", ",", "T", "value", ")", "{", "list", ".", "add", "(", "index", ",", "value", ")", ";", "}" ]
Insert the given value to the given list at the given index. This will insert the value at the index shifting the elements accordingly. @param <T> The component type of the list @param list The list to add to @param index The index to add at @param value The value to add @see List#add(int, Object)
[ "Insert", "the", "given", "value", "to", "the", "given", "list", "at", "the", "given", "index", ".", "This", "will", "insert", "the", "value", "at", "the", "index", "shifting", "the", "elements", "accordingly", "." ]
7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea
https://github.com/teatrove/teatrove/blob/7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea/teaapps/src/main/java/org/teatrove/teaapps/contexts/ListContext.java#L61-L63
57
teatrove/teatrove
teaapps/src/main/java/org/teatrove/teaapps/contexts/ListContext.java
ListContext.addAll
public <T> boolean addAll(List<T> listToAddTo, Collection<? extends T> collectionToAdd) { return listToAddTo.addAll(collectionToAdd); }
java
public <T> boolean addAll(List<T> listToAddTo, Collection<? extends T> collectionToAdd) { return listToAddTo.addAll(collectionToAdd); }
[ "public", "<", "T", ">", "boolean", "addAll", "(", "List", "<", "T", ">", "listToAddTo", ",", "Collection", "<", "?", "extends", "T", ">", "collectionToAdd", ")", "{", "return", "listToAddTo", ".", "addAll", "(", "collectionToAdd", ")", ";", "}" ]
Add all items of the given collection to the given list. @param <T> The component type of the list @param listToAddTo The list to add to @param collectionToAdd The elements to add to the list @return <code>true</code> if all items were added, <code>false</code> otherwise @see List#addAll(Collection)
[ "Add", "all", "items", "of", "the", "given", "collection", "to", "the", "given", "list", "." ]
7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea
https://github.com/teatrove/teatrove/blob/7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea/teaapps/src/main/java/org/teatrove/teaapps/contexts/ListContext.java#L78-L81
58
teatrove/teatrove
teaapps/src/main/java/org/teatrove/teaapps/contexts/ListContext.java
ListContext.set
public <T> T set(List<T> list, int index, T obj) { return list.set(index, obj); }
java
public <T> T set(List<T> list, int index, T obj) { return list.set(index, obj); }
[ "public", "<", "T", ">", "T", "set", "(", "List", "<", "T", ">", "list", ",", "int", "index", ",", "T", "obj", ")", "{", "return", "list", ".", "set", "(", "index", ",", "obj", ")", ";", "}" ]
Set the value at the given index in the given list. If the value is properly set, the previous value will be returned. @param list The list of set in @param index The index within the list to set at @param obj The object to set in the list @return The previously set value @see List#set(int, Object)
[ "Set", "the", "value", "at", "the", "given", "index", "in", "the", "given", "list", ".", "If", "the", "value", "is", "properly", "set", "the", "previous", "value", "will", "be", "returned", "." ]
7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea
https://github.com/teatrove/teatrove/blob/7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea/teaapps/src/main/java/org/teatrove/teaapps/contexts/ListContext.java#L242-L244
59
teatrove/teatrove
teaapps/src/main/java/org/teatrove/teaapps/contexts/ListContext.java
ListContext.subList
public <T> List<T> subList(List<T> list, int fromIndex, int toIndex) { return list.subList(fromIndex, toIndex); }
java
public <T> List<T> subList(List<T> list, int fromIndex, int toIndex) { return list.subList(fromIndex, toIndex); }
[ "public", "<", "T", ">", "List", "<", "T", ">", "subList", "(", "List", "<", "T", ">", "list", ",", "int", "fromIndex", ",", "int", "toIndex", ")", "{", "return", "list", ".", "subList", "(", "fromIndex", ",", "toIndex", ")", ";", "}" ]
Get a portion of the given list as a new list. @param list The list to retrieve a portion of @param fromIndex The first index, inclusive, to start from @param toIndex The last index, inclusive, to end at @return A new list containing the given portion of the list @see List#subList(int, int)
[ "Get", "a", "portion", "of", "the", "given", "list", "as", "a", "new", "list", "." ]
7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea
https://github.com/teatrove/teatrove/blob/7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea/teaapps/src/main/java/org/teatrove/teaapps/contexts/ListContext.java#L270-L272
60
teatrove/teatrove
teaapps/src/main/java/org/teatrove/teaapps/contexts/ListContext.java
ListContext.toArray
public Object[] toArray(List<?> list, Class<?> arrayType) { int[] dims = findArrayDimensions(list, arrayType); Object[] typedArray = (Object[]) Array.newInstance(arrayType, dims); return list.toArray(typedArray); }
java
public Object[] toArray(List<?> list, Class<?> arrayType) { int[] dims = findArrayDimensions(list, arrayType); Object[] typedArray = (Object[]) Array.newInstance(arrayType, dims); return list.toArray(typedArray); }
[ "public", "Object", "[", "]", "toArray", "(", "List", "<", "?", ">", "list", ",", "Class", "<", "?", ">", "arrayType", ")", "{", "int", "[", "]", "dims", "=", "findArrayDimensions", "(", "list", ",", "arrayType", ")", ";", "Object", "[", "]", "type...
Convert the given list to an array of the given array type. @param list The list to convert @param arrayType The type of array to create @return The array of elements in the list
[ "Convert", "the", "given", "list", "to", "an", "array", "of", "the", "given", "array", "type", "." ]
7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea
https://github.com/teatrove/teatrove/blob/7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea/teaapps/src/main/java/org/teatrove/teaapps/contexts/ListContext.java#L282-L286
61
teatrove/teatrove
trove/src/main/java/org/teatrove/trove/util/plugin/PluginContext.java
PluginContext.addPlugin
public void addPlugin(Plugin plugin) { if (!mPluginMap.containsKey(plugin.getName())) { mPluginMap.put(plugin.getName(), plugin); PluginEvent event = new PluginEvent(this, plugin); firePluginAddedEvent(event); } }
java
public void addPlugin(Plugin plugin) { if (!mPluginMap.containsKey(plugin.getName())) { mPluginMap.put(plugin.getName(), plugin); PluginEvent event = new PluginEvent(this, plugin); firePluginAddedEvent(event); } }
[ "public", "void", "addPlugin", "(", "Plugin", "plugin", ")", "{", "if", "(", "!", "mPluginMap", ".", "containsKey", "(", "plugin", ".", "getName", "(", ")", ")", ")", "{", "mPluginMap", ".", "put", "(", "plugin", ".", "getName", "(", ")", ",", "plugi...
Adds a Plugin to the PluginContext. Plugins that want to make themselves available to other Plugins should add themselves to the PluginContext through this method. All PluginListeners will be notified of the new addition. @param plugin the Plugin to be added.
[ "Adds", "a", "Plugin", "to", "the", "PluginContext", ".", "Plugins", "that", "want", "to", "make", "themselves", "available", "to", "other", "Plugins", "should", "add", "themselves", "to", "the", "PluginContext", "through", "this", "method", ".", "All", "Plugi...
7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea
https://github.com/teatrove/teatrove/blob/7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea/trove/src/main/java/org/teatrove/trove/util/plugin/PluginContext.java#L86-L92
62
teatrove/teatrove
tea/src/main/java/org/teatrove/tea/compiler/Token.java
Token.findReservedWordID
public static int findReservedWordID(StringBuilder word) { char c = word.charAt(0); switch (c) { case 'a': if (matches(word, "and")) return AND; if (matches(word, "as")) return AS; break; case 'b': if(matches(word, "break")) return BREAK; ...
java
public static int findReservedWordID(StringBuilder word) { char c = word.charAt(0); switch (c) { case 'a': if (matches(word, "and")) return AND; if (matches(word, "as")) return AS; break; case 'b': if(matches(word, "break")) return BREAK; ...
[ "public", "static", "int", "findReservedWordID", "(", "StringBuilder", "word", ")", "{", "char", "c", "=", "word", ".", "charAt", "(", "0", ")", ";", "switch", "(", "c", ")", "{", "case", "'", "'", ":", "if", "(", "matches", "(", "word", ",", "\"an...
If the given StringBuilder starts with a valid token type, its ID is returned. Otherwise, the token ID UNKNOWN is returned.
[ "If", "the", "given", "StringBuilder", "starts", "with", "a", "valid", "token", "type", "its", "ID", "is", "returned", ".", "Otherwise", "the", "token", "ID", "UNKNOWN", "is", "returned", "." ]
7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea
https://github.com/teatrove/teatrove/blob/7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea/tea/src/main/java/org/teatrove/tea/compiler/Token.java#L296-L345
63
teatrove/teatrove
tea/src/main/java/org/teatrove/tea/compiler/Token.java
Token.matches
private static boolean matches(StringBuilder word, String val) { int len = word.length(); if (len != val.length()) return false; // Start at index 1, assuming that the first characters have already // been checked to match. for (int index = 1; index < len; index++) { ...
java
private static boolean matches(StringBuilder word, String val) { int len = word.length(); if (len != val.length()) return false; // Start at index 1, assuming that the first characters have already // been checked to match. for (int index = 1; index < len; index++) { ...
[ "private", "static", "boolean", "matches", "(", "StringBuilder", "word", ",", "String", "val", ")", "{", "int", "len", "=", "word", ".", "length", "(", ")", ";", "if", "(", "len", "!=", "val", ".", "length", "(", ")", ")", "return", "false", ";", "...
Case sensitive match test. @param val must be lowercase
[ "Case", "sensitive", "match", "test", "." ]
7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea
https://github.com/teatrove/teatrove/blob/7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea/tea/src/main/java/org/teatrove/tea/compiler/Token.java#L351-L367
64
teatrove/teatrove
tea/src/main/java/org/teatrove/tea/compiler/Token.java
Token.dump
public final void dump(PrintStream out) { out.println("Token [Code: " + getCode() + "] [Image: " + getImage() + "] [Value: " + getStringValue() + "] [Id: " + getID() + "] [start: " + mInfo.getStartPosition() + "] [end " + mInfo.getE...
java
public final void dump(PrintStream out) { out.println("Token [Code: " + getCode() + "] [Image: " + getImage() + "] [Value: " + getStringValue() + "] [Id: " + getID() + "] [start: " + mInfo.getStartPosition() + "] [end " + mInfo.getE...
[ "public", "final", "void", "dump", "(", "PrintStream", "out", ")", "{", "out", ".", "println", "(", "\"Token [Code: \"", "+", "getCode", "(", ")", "+", "\"] [Image: \"", "+", "getImage", "(", ")", "+", "\"] [Value: \"", "+", "getStringValue", "(", ")", "+"...
Dumps the contents of this Token. @param out The PrintStream to write to.
[ "Dumps", "the", "contents", "of", "this", "Token", "." ]
7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea
https://github.com/teatrove/teatrove/blob/7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea/tea/src/main/java/org/teatrove/tea/compiler/Token.java#L380-L386
65
teatrove/teatrove
teaapps/src/main/java/org/teatrove/teaapps/contexts/CryptoContext.java
CryptoContext.digest
public byte[] digest(String algorithm, byte[] bytes) { try { MessageDigest md = MessageDigest.getInstance(algorithm); return md.digest(bytes); } catch (NoSuchAlgorithmException exception) { throw new IllegalStateException( "unable to access MD5...
java
public byte[] digest(String algorithm, byte[] bytes) { try { MessageDigest md = MessageDigest.getInstance(algorithm); return md.digest(bytes); } catch (NoSuchAlgorithmException exception) { throw new IllegalStateException( "unable to access MD5...
[ "public", "byte", "[", "]", "digest", "(", "String", "algorithm", ",", "byte", "[", "]", "bytes", ")", "{", "try", "{", "MessageDigest", "md", "=", "MessageDigest", ".", "getInstance", "(", "algorithm", ")", ";", "return", "md", ".", "digest", "(", "by...
Generates a digest based on the given algorithm. @param algorithm The algorithm to use (MD5, SHA, etc) @param bytes The bytes to digest @return The associated digest @see MessageDigest
[ "Generates", "a", "digest", "based", "on", "the", "given", "algorithm", "." ]
7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea
https://github.com/teatrove/teatrove/blob/7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea/teaapps/src/main/java/org/teatrove/teaapps/contexts/CryptoContext.java#L49-L59
66
teatrove/teatrove
teaapps/src/main/java/org/teatrove/teaapps/contexts/CryptoContext.java
CryptoContext.md5HexDigest
public String md5HexDigest(String signature) { byte[] bytes = md5Digest(signature.getBytes()); return new String(Hex.encodeHex(bytes)); }
java
public String md5HexDigest(String signature) { byte[] bytes = md5Digest(signature.getBytes()); return new String(Hex.encodeHex(bytes)); }
[ "public", "String", "md5HexDigest", "(", "String", "signature", ")", "{", "byte", "[", "]", "bytes", "=", "md5Digest", "(", "signature", ".", "getBytes", "(", ")", ")", ";", "return", "new", "String", "(", "Hex", ".", "encodeHex", "(", "bytes", ")", ")...
Creates a MD5 digest of the given signature and returns the result as a hex-encoded string. @param signature The signature to digest @return The MD5 digest of the signature in hex format
[ "Creates", "a", "MD5", "digest", "of", "the", "given", "signature", "and", "returns", "the", "result", "as", "a", "hex", "-", "encoded", "string", "." ]
7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea
https://github.com/teatrove/teatrove/blob/7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea/teaapps/src/main/java/org/teatrove/teaapps/contexts/CryptoContext.java#L131-L134
67
teatrove/teatrove
teaapps/src/main/java/org/teatrove/teaapps/contexts/CryptoContext.java
CryptoContext.md5Base64Digest
public String md5Base64Digest(String signature) { byte[] bytes = md5Digest(signature.getBytes()); return new String(Base64.encodeBase64(bytes)); }
java
public String md5Base64Digest(String signature) { byte[] bytes = md5Digest(signature.getBytes()); return new String(Base64.encodeBase64(bytes)); }
[ "public", "String", "md5Base64Digest", "(", "String", "signature", ")", "{", "byte", "[", "]", "bytes", "=", "md5Digest", "(", "signature", ".", "getBytes", "(", ")", ")", ";", "return", "new", "String", "(", "Base64", ".", "encodeBase64", "(", "bytes", ...
Creates a MD5 digest of the given signature and returns the result as a Base64-encoded string. @param signature The signature to digest @return The MD5 digest of the signature in Base64 format
[ "Creates", "a", "MD5", "digest", "of", "the", "given", "signature", "and", "returns", "the", "result", "as", "a", "Base64", "-", "encoded", "string", "." ]
7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea
https://github.com/teatrove/teatrove/blob/7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea/teaapps/src/main/java/org/teatrove/teaapps/contexts/CryptoContext.java#L164-L167
68
teatrove/teatrove
trove/src/main/java/org/teatrove/trove/classfile/ConstantInterfaceMethodInfo.java
ConstantInterfaceMethodInfo.make
static ConstantInterfaceMethodInfo make (ConstantPool cp, ConstantClassInfo parentClass, ConstantNameAndTypeInfo nameAndType) { ConstantInfo ci = new ConstantInterfaceMethodInfo(parentClass, nameAndType); return (ConstantInterfaceMethodInfo)cp.addConstant(...
java
static ConstantInterfaceMethodInfo make (ConstantPool cp, ConstantClassInfo parentClass, ConstantNameAndTypeInfo nameAndType) { ConstantInfo ci = new ConstantInterfaceMethodInfo(parentClass, nameAndType); return (ConstantInterfaceMethodInfo)cp.addConstant(...
[ "static", "ConstantInterfaceMethodInfo", "make", "(", "ConstantPool", "cp", ",", "ConstantClassInfo", "parentClass", ",", "ConstantNameAndTypeInfo", "nameAndType", ")", "{", "ConstantInfo", "ci", "=", "new", "ConstantInterfaceMethodInfo", "(", "parentClass", ",", "nameAnd...
Will return either a new ConstantInterfaceMethodInfo object or one already in the constant pool. If it is a new ConstantInterfaceMethodInfo, it will be inserted into the pool.
[ "Will", "return", "either", "a", "new", "ConstantInterfaceMethodInfo", "object", "or", "one", "already", "in", "the", "constant", "pool", ".", "If", "it", "is", "a", "new", "ConstantInterfaceMethodInfo", "it", "will", "be", "inserted", "into", "the", "pool", "...
7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea
https://github.com/teatrove/teatrove/blob/7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea/trove/src/main/java/org/teatrove/trove/classfile/ConstantInterfaceMethodInfo.java#L37-L45
69
teatrove/teatrove
trove/src/main/java/org/teatrove/trove/classfile/ConstantStringInfo.java
ConstantStringInfo.make
static ConstantStringInfo make(ConstantPool cp, String str) { ConstantInfo ci = new ConstantStringInfo(cp, str); return (ConstantStringInfo)cp.addConstant(ci); }
java
static ConstantStringInfo make(ConstantPool cp, String str) { ConstantInfo ci = new ConstantStringInfo(cp, str); return (ConstantStringInfo)cp.addConstant(ci); }
[ "static", "ConstantStringInfo", "make", "(", "ConstantPool", "cp", ",", "String", "str", ")", "{", "ConstantInfo", "ci", "=", "new", "ConstantStringInfo", "(", "cp", ",", "str", ")", ";", "return", "(", "ConstantStringInfo", ")", "cp", ".", "addConstant", "(...
Will return either a new ConstantStringInfo object or one already in the constant pool. If it is a new ConstantStringInfo, it will be inserted into the pool.
[ "Will", "return", "either", "a", "new", "ConstantStringInfo", "object", "or", "one", "already", "in", "the", "constant", "pool", ".", "If", "it", "is", "a", "new", "ConstantStringInfo", "it", "will", "be", "inserted", "into", "the", "pool", "." ]
7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea
https://github.com/teatrove/teatrove/blob/7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea/trove/src/main/java/org/teatrove/trove/classfile/ConstantStringInfo.java#L37-L40
70
teatrove/teatrove
trove/src/main/java/org/teatrove/trove/classfile/Modifiers.java
Modifiers.setPublic
public static int setPublic(int modifier, boolean b) { if (b) { return (modifier | PUBLIC) & (~PROTECTED & ~PRIVATE); } else { return modifier & ~PUBLIC; } }
java
public static int setPublic(int modifier, boolean b) { if (b) { return (modifier | PUBLIC) & (~PROTECTED & ~PRIVATE); } else { return modifier & ~PUBLIC; } }
[ "public", "static", "int", "setPublic", "(", "int", "modifier", ",", "boolean", "b", ")", "{", "if", "(", "b", ")", "{", "return", "(", "modifier", "|", "PUBLIC", ")", "&", "(", "~", "PROTECTED", "&", "~", "PRIVATE", ")", ";", "}", "else", "{", "...
When set public, the modifier is cleared from being private or protected.
[ "When", "set", "public", "the", "modifier", "is", "cleared", "from", "being", "private", "or", "protected", "." ]
7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea
https://github.com/teatrove/teatrove/blob/7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea/trove/src/main/java/org/teatrove/trove/classfile/Modifiers.java#L34-L41
71
teatrove/teatrove
trove/src/main/java/org/teatrove/trove/classfile/Modifiers.java
Modifiers.setPrivate
public static int setPrivate(int modifier, boolean b) { if (b) { return (modifier | PRIVATE) & (~PUBLIC & ~PROTECTED); } else { return modifier & ~PRIVATE; } }
java
public static int setPrivate(int modifier, boolean b) { if (b) { return (modifier | PRIVATE) & (~PUBLIC & ~PROTECTED); } else { return modifier & ~PRIVATE; } }
[ "public", "static", "int", "setPrivate", "(", "int", "modifier", ",", "boolean", "b", ")", "{", "if", "(", "b", ")", "{", "return", "(", "modifier", "|", "PRIVATE", ")", "&", "(", "~", "PUBLIC", "&", "~", "PROTECTED", ")", ";", "}", "else", "{", ...
When set private, the modifier is cleared from being public or protected.
[ "When", "set", "private", "the", "modifier", "is", "cleared", "from", "being", "public", "or", "protected", "." ]
7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea
https://github.com/teatrove/teatrove/blob/7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea/trove/src/main/java/org/teatrove/trove/classfile/Modifiers.java#L47-L54
End of preview. Expand in Data Studio

Dataset Card for "codexglue_code2text_java"

More Information needed

Downloads last month
1,918

Models trained or fine-tuned on CM/codexglue_code2text_java