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
list
docstring
stringlengths
3
16k
docstring_tokens
list
sha
stringlengths
40
40
url
stringlengths
105
339
125,600
jenkinsci/jenkins
core/src/main/java/hudson/model/Computer.java
Computer.doDumpExportTable
public void doDumpExportTable( StaplerRequest req, StaplerResponse rsp ) throws IOException, ServletException, InterruptedException { // this is a debug probe and may expose sensitive information checkPermission(Jenkins.ADMINISTER); rsp.setContentType("text/plain"); try (PrintWriter w =...
java
public void doDumpExportTable( StaplerRequest req, StaplerResponse rsp ) throws IOException, ServletException, InterruptedException { // this is a debug probe and may expose sensitive information checkPermission(Jenkins.ADMINISTER); rsp.setContentType("text/plain"); try (PrintWriter w =...
[ "public", "void", "doDumpExportTable", "(", "StaplerRequest", "req", ",", "StaplerResponse", "rsp", ")", "throws", "IOException", ",", "ServletException", ",", "InterruptedException", "{", "// this is a debug probe and may expose sensitive information", "checkPermission", "(", ...
Dumps the contents of the export table.
[ "Dumps", "the", "contents", "of", "the", "export", "table", "." ]
44c4d3989232082c254d27ae360aa810669f44b7
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/hudson/model/Computer.java#L1415-L1433
125,601
jenkinsci/jenkins
core/src/main/java/hudson/model/Computer.java
Computer.doScript
public void doScript(StaplerRequest req, StaplerResponse rsp) throws IOException, ServletException { _doScript(req, rsp, "_script.jelly"); }
java
public void doScript(StaplerRequest req, StaplerResponse rsp) throws IOException, ServletException { _doScript(req, rsp, "_script.jelly"); }
[ "public", "void", "doScript", "(", "StaplerRequest", "req", ",", "StaplerResponse", "rsp", ")", "throws", "IOException", ",", "ServletException", "{", "_doScript", "(", "req", ",", "rsp", ",", "\"_script.jelly\"", ")", ";", "}" ]
For system diagnostics. Run arbitrary Groovy script.
[ "For", "system", "diagnostics", ".", "Run", "arbitrary", "Groovy", "script", "." ]
44c4d3989232082c254d27ae360aa810669f44b7
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/hudson/model/Computer.java#L1450-L1452
125,602
jenkinsci/jenkins
core/src/main/java/hudson/model/Computer.java
Computer.updateByXml
public void updateByXml(final InputStream source) throws IOException, ServletException { checkPermission(CONFIGURE); Node result = (Node)Jenkins.XSTREAM2.fromXML(source); Jenkins.getInstance().getNodesObject().replaceNode(this.getNode(), result); }
java
public void updateByXml(final InputStream source) throws IOException, ServletException { checkPermission(CONFIGURE); Node result = (Node)Jenkins.XSTREAM2.fromXML(source); Jenkins.getInstance().getNodesObject().replaceNode(this.getNode(), result); }
[ "public", "void", "updateByXml", "(", "final", "InputStream", "source", ")", "throws", "IOException", ",", "ServletException", "{", "checkPermission", "(", "CONFIGURE", ")", ";", "Node", "result", "=", "(", "Node", ")", "Jenkins", ".", "XSTREAM2", ".", "fromXM...
Updates Job by its XML definition. @since 1.526
[ "Updates", "Job", "by", "its", "XML", "definition", "." ]
44c4d3989232082c254d27ae360aa810669f44b7
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/hudson/model/Computer.java#L1530-L1534
125,603
jenkinsci/jenkins
core/src/main/java/hudson/model/Computer.java
Computer.doDoDelete
@RequirePOST public HttpResponse doDoDelete() throws IOException { checkPermission(DELETE); Node node = getNode(); if (node != null) { Jenkins.getInstance().removeNode(node); } else { AbstractCIBase app = Jenkins.getInstance(); app.removeComputer(t...
java
@RequirePOST public HttpResponse doDoDelete() throws IOException { checkPermission(DELETE); Node node = getNode(); if (node != null) { Jenkins.getInstance().removeNode(node); } else { AbstractCIBase app = Jenkins.getInstance(); app.removeComputer(t...
[ "@", "RequirePOST", "public", "HttpResponse", "doDoDelete", "(", ")", "throws", "IOException", "{", "checkPermission", "(", "DELETE", ")", ";", "Node", "node", "=", "getNode", "(", ")", ";", "if", "(", "node", "!=", "null", ")", "{", "Jenkins", ".", "get...
Really deletes the agent.
[ "Really", "deletes", "the", "agent", "." ]
44c4d3989232082c254d27ae360aa810669f44b7
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/hudson/model/Computer.java#L1539-L1550
125,604
jenkinsci/jenkins
core/src/main/java/hudson/model/Computer.java
Computer.doProgressiveLog
public void doProgressiveLog( StaplerRequest req, StaplerResponse rsp) throws IOException { getLogText().doProgressText(req, rsp); }
java
public void doProgressiveLog( StaplerRequest req, StaplerResponse rsp) throws IOException { getLogText().doProgressText(req, rsp); }
[ "public", "void", "doProgressiveLog", "(", "StaplerRequest", "req", ",", "StaplerResponse", "rsp", ")", "throws", "IOException", "{", "getLogText", "(", ")", ".", "doProgressText", "(", "req", ",", "rsp", ")", ";", "}" ]
Handles incremental log.
[ "Handles", "incremental", "log", "." ]
44c4d3989232082c254d27ae360aa810669f44b7
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/hudson/model/Computer.java#L1572-L1574
125,605
jenkinsci/jenkins
core/src/main/java/hudson/PermalinkList.java
PermalinkList.findNearest
public Permalink findNearest(String id) { List<String> ids = new ArrayList<>(); for (Permalink p : this) ids.add(p.getId()); String nearest = EditDistance.findNearest(id, ids); if(nearest==null) return null; return get(nearest); }
java
public Permalink findNearest(String id) { List<String> ids = new ArrayList<>(); for (Permalink p : this) ids.add(p.getId()); String nearest = EditDistance.findNearest(id, ids); if(nearest==null) return null; return get(nearest); }
[ "public", "Permalink", "findNearest", "(", "String", "id", ")", "{", "List", "<", "String", ">", "ids", "=", "new", "ArrayList", "<>", "(", ")", ";", "for", "(", "Permalink", "p", ":", "this", ")", "ids", ".", "(", "p", ".", "getId", "(", ")", ")...
Finds the closest name match by its ID.
[ "Finds", "the", "closest", "name", "match", "by", "its", "ID", "." ]
44c4d3989232082c254d27ae360aa810669f44b7
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/hudson/PermalinkList.java#L62-L69
125,606
jenkinsci/jenkins
core/src/main/java/hudson/Util.java
Util.isRelativePath
public static boolean isRelativePath(String path) { if (path.startsWith("/")) return false; if (path.startsWith("\\\\") && path.length() > 3 && path.indexOf('\\', 3) != -1) return false; // a UNC path which is the most absolute you can get on windows if (path.length() >= ...
java
public static boolean isRelativePath(String path) { if (path.startsWith("/")) return false; if (path.startsWith("\\\\") && path.length() > 3 && path.indexOf('\\', 3) != -1) return false; // a UNC path which is the most absolute you can get on windows if (path.length() >= ...
[ "public", "static", "boolean", "isRelativePath", "(", "String", "path", ")", "{", "if", "(", "path", ".", "startsWith", "(", "\"/\"", ")", ")", "return", "false", ";", "if", "(", "path", ".", "startsWith", "(", "\"\\\\\\\\\"", ")", "&&", "path", ".", "...
A mostly accurate check of whether a path is a relative path or not. This is designed to take a path against an unknown operating system so may give invalid results. @param path the path. @return {@code true} if the path looks relative. @since 1.606
[ "A", "mostly", "accurate", "check", "of", "whether", "a", "path", "is", "a", "relative", "path", "or", "not", ".", "This", "is", "designed", "to", "take", "a", "path", "against", "an", "unknown", "operating", "system", "so", "may", "give", "invalid", "re...
44c4d3989232082c254d27ae360aa810669f44b7
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/hudson/Util.java#L350-L364
125,607
jenkinsci/jenkins
core/src/main/java/hudson/Util.java
Util.isDescendant
public static boolean isDescendant(File forParent, File potentialChild) throws IOException { Path child = fileToPath(potentialChild.getAbsoluteFile()).normalize(); Path parent = fileToPath(forParent.getAbsoluteFile()).normalize(); return child.startsWith(parent); }
java
public static boolean isDescendant(File forParent, File potentialChild) throws IOException { Path child = fileToPath(potentialChild.getAbsoluteFile()).normalize(); Path parent = fileToPath(forParent.getAbsoluteFile()).normalize(); return child.startsWith(parent); }
[ "public", "static", "boolean", "isDescendant", "(", "File", "forParent", ",", "File", "potentialChild", ")", "throws", "IOException", "{", "Path", "child", "=", "fileToPath", "(", "potentialChild", ".", "getAbsoluteFile", "(", ")", ")", ".", "normalize", "(", ...
A check if a file path is a descendant of a parent path @param forParent the parent the child should be a descendant of @param potentialChild the path to check @return true if so @throws IOException for invalid paths @since 2.80 @see InvalidPathException
[ "A", "check", "if", "a", "file", "path", "is", "a", "descendant", "of", "a", "parent", "path" ]
44c4d3989232082c254d27ae360aa810669f44b7
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/hudson/Util.java#L375-L379
125,608
jenkinsci/jenkins
core/src/main/java/hudson/Util.java
Util.createTempDir
public static File createTempDir() throws IOException { // The previously used approach of creating a temporary file, deleting // it, and making a new directory having the same name in its place is // potentially problematic: // https://stackoverflow.com/questions/617414/how-to-create-a...
java
public static File createTempDir() throws IOException { // The previously used approach of creating a temporary file, deleting // it, and making a new directory having the same name in its place is // potentially problematic: // https://stackoverflow.com/questions/617414/how-to-create-a...
[ "public", "static", "File", "createTempDir", "(", ")", "throws", "IOException", "{", "// The previously used approach of creating a temporary file, deleting", "// it, and making a new directory having the same name in its place is", "// potentially problematic:", "// https://stackoverflow.c...
Creates a new temporary directory.
[ "Creates", "a", "new", "temporary", "directory", "." ]
44c4d3989232082c254d27ae360aa810669f44b7
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/hudson/Util.java#L384-L405
125,609
jenkinsci/jenkins
core/src/main/java/hudson/Util.java
Util.getWin32ErrorMessage
@CheckForNull public static String getWin32ErrorMessage(int n) { try { ResourceBundle rb = ResourceBundle.getBundle("/hudson/win32errors"); return rb.getString("error"+n); } catch (MissingResourceException e) { LOGGER.log(Level.WARNING,"Failed to find resource bun...
java
@CheckForNull public static String getWin32ErrorMessage(int n) { try { ResourceBundle rb = ResourceBundle.getBundle("/hudson/win32errors"); return rb.getString("error"+n); } catch (MissingResourceException e) { LOGGER.log(Level.WARNING,"Failed to find resource bun...
[ "@", "CheckForNull", "public", "static", "String", "getWin32ErrorMessage", "(", "int", "n", ")", "{", "try", "{", "ResourceBundle", "rb", "=", "ResourceBundle", ".", "getBundle", "(", "\"/hudson/win32errors\"", ")", ";", "return", "rb", ".", "getString", "(", ...
Gets a human readable message for the given Win32 error code. @return null if no such message is available.
[ "Gets", "a", "human", "readable", "message", "for", "the", "given", "Win32", "error", "code", "." ]
44c4d3989232082c254d27ae360aa810669f44b7
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/hudson/Util.java#L456-L465
125,610
jenkinsci/jenkins
core/src/main/java/hudson/Util.java
Util.encodeRFC2396
@Deprecated public static String encodeRFC2396(String url) { try { return new URI(null,url,null).toASCIIString(); } catch (URISyntaxException e) { LOGGER.log(Level.WARNING, "Failed to encode {0}", url); // could this ever happen? return url; } }
java
@Deprecated public static String encodeRFC2396(String url) { try { return new URI(null,url,null).toASCIIString(); } catch (URISyntaxException e) { LOGGER.log(Level.WARNING, "Failed to encode {0}", url); // could this ever happen? return url; } }
[ "@", "Deprecated", "public", "static", "String", "encodeRFC2396", "(", "String", "url", ")", "{", "try", "{", "return", "new", "URI", "(", "null", ",", "url", ",", "null", ")", ".", "toASCIIString", "(", ")", ";", "}", "catch", "(", "URISyntaxException",...
Encodes the URL by RFC 2396. I thought there's another spec that refers to UTF-8 as the encoding, but don't remember it right now. @since 1.204 @deprecated since 2008-05-13. This method is broken (see ISSUE#1666). It should probably be removed but I'm not sure if it is considered part of the public API that needs to ...
[ "Encodes", "the", "URL", "by", "RFC", "2396", "." ]
44c4d3989232082c254d27ae360aa810669f44b7
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/hudson/Util.java#L1292-L1300
125,611
jenkinsci/jenkins
core/src/main/java/jenkins/util/DirectedGraph.java
DirectedGraph.getStronglyConnectedComponents
public List<SCC<N>> getStronglyConnectedComponents() { final Map<N, Node> nodes = new HashMap<>(); for (N n : nodes()) { nodes.put(n,new Node(n)); } final List<SCC<N>> sccs = new ArrayList<>(); class Tarjan { int index = 0; int sccIndex = 0; ...
java
public List<SCC<N>> getStronglyConnectedComponents() { final Map<N, Node> nodes = new HashMap<>(); for (N n : nodes()) { nodes.put(n,new Node(n)); } final List<SCC<N>> sccs = new ArrayList<>(); class Tarjan { int index = 0; int sccIndex = 0; ...
[ "public", "List", "<", "SCC", "<", "N", ">", ">", "getStronglyConnectedComponents", "(", ")", "{", "final", "Map", "<", "N", ",", "Node", ">", "nodes", "=", "new", "HashMap", "<>", "(", ")", ";", "for", "(", "N", "n", ":", "nodes", "(", ")", ")",...
Performs the Tarjan's algorithm and computes strongly-connected components from the sink to source order. See http://en.wikipedia.org/wiki/Tarjan's_strongly_connected_components_algorithm
[ "Performs", "the", "Tarjan", "s", "algorithm", "and", "computes", "strongly", "-", "connected", "components", "from", "the", "sink", "to", "source", "order", "." ]
44c4d3989232082c254d27ae360aa810669f44b7
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/jenkins/util/DirectedGraph.java#L96-L154
125,612
jenkinsci/jenkins
core/src/main/java/jenkins/model/Nodes.java
Nodes.setNodes
public void setNodes(final @Nonnull Collection<? extends Node> nodes) throws IOException { Queue.withLock(new Runnable() { @Override public void run() { Set<String> toRemove = new HashSet<>(Nodes.this.nodes.keySet()); for (Node n : nodes) { ...
java
public void setNodes(final @Nonnull Collection<? extends Node> nodes) throws IOException { Queue.withLock(new Runnable() { @Override public void run() { Set<String> toRemove = new HashSet<>(Nodes.this.nodes.keySet()); for (Node n : nodes) { ...
[ "public", "void", "setNodes", "(", "final", "@", "Nonnull", "Collection", "<", "?", "extends", "Node", ">", "nodes", ")", "throws", "IOException", "{", "Queue", ".", "withLock", "(", "new", "Runnable", "(", ")", "{", "@", "Override", "public", "void", "r...
Sets the list of nodes. @param nodes the new list of nodes. @throws IOException if the new list of nodes could not be persisted.
[ "Sets", "the", "list", "of", "nodes", "." ]
44c4d3989232082c254d27ae360aa810669f44b7
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/jenkins/model/Nodes.java#L105-L121
125,613
jenkinsci/jenkins
core/src/main/java/jenkins/model/Nodes.java
Nodes.addNode
public void addNode(final @Nonnull Node node) throws IOException { Node oldNode = nodes.get(node.getNodeName()); if (node != oldNode) { // TODO we should not need to lock the queue for adding nodes but until we have a way to update the // computer list for just the new node ...
java
public void addNode(final @Nonnull Node node) throws IOException { Node oldNode = nodes.get(node.getNodeName()); if (node != oldNode) { // TODO we should not need to lock the queue for adding nodes but until we have a way to update the // computer list for just the new node ...
[ "public", "void", "addNode", "(", "final", "@", "Nonnull", "Node", "node", ")", "throws", "IOException", "{", "Node", "oldNode", "=", "nodes", ".", "get", "(", "node", ".", "getNodeName", "(", ")", ")", ";", "if", "(", "node", "!=", "oldNode", ")", "...
Adds a node. If a node of the same name already exists then that node will be replaced. @param node the new node. @throws IOException if the list of nodes could not be persisted.
[ "Adds", "a", "node", ".", "If", "a", "node", "of", "the", "same", "name", "already", "exists", "then", "that", "node", "will", "be", "replaced", "." ]
44c4d3989232082c254d27ae360aa810669f44b7
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/jenkins/model/Nodes.java#L129-L160
125,614
jenkinsci/jenkins
core/src/main/java/jenkins/model/Nodes.java
Nodes.persistNode
private void persistNode(final @Nonnull Node node) throws IOException { // no need for a full save() so we just do the minimum if (node instanceof EphemeralNode) { Util.deleteRecursive(new File(getNodesDir(), node.getNodeName())); } else { XmlFile xmlFile = new XmlFile(J...
java
private void persistNode(final @Nonnull Node node) throws IOException { // no need for a full save() so we just do the minimum if (node instanceof EphemeralNode) { Util.deleteRecursive(new File(getNodesDir(), node.getNodeName())); } else { XmlFile xmlFile = new XmlFile(J...
[ "private", "void", "persistNode", "(", "final", "@", "Nonnull", "Node", "node", ")", "throws", "IOException", "{", "// no need for a full save() so we just do the minimum", "if", "(", "node", "instanceof", "EphemeralNode", ")", "{", "Util", ".", "deleteRecursive", "("...
Actually persists a node on disk. @param node the node to be persisted. @throws IOException if the node could not be persisted.
[ "Actually", "persists", "a", "node", "on", "disk", "." ]
44c4d3989232082c254d27ae360aa810669f44b7
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/jenkins/model/Nodes.java#L168-L179
125,615
jenkinsci/jenkins
core/src/main/java/jenkins/model/Nodes.java
Nodes.replaceNode
public boolean replaceNode(final Node oldOne, final @Nonnull Node newOne) throws IOException { if (oldOne == nodes.get(oldOne.getNodeName())) { // use the queue lock until Nodes has a way of directly modifying a single node. Queue.withLock(new Runnable() { public void run...
java
public boolean replaceNode(final Node oldOne, final @Nonnull Node newOne) throws IOException { if (oldOne == nodes.get(oldOne.getNodeName())) { // use the queue lock until Nodes has a way of directly modifying a single node. Queue.withLock(new Runnable() { public void run...
[ "public", "boolean", "replaceNode", "(", "final", "Node", "oldOne", ",", "final", "@", "Nonnull", "Node", "newOne", ")", "throws", "IOException", "{", "if", "(", "oldOne", "==", "nodes", ".", "get", "(", "oldOne", ".", "getNodeName", "(", ")", ")", ")", ...
Replace node of given name. @return {@code true} if node was replaced. @since 2.8
[ "Replace", "node", "of", "given", "name", "." ]
44c4d3989232082c254d27ae360aa810669f44b7
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/jenkins/model/Nodes.java#L224-L245
125,616
jenkinsci/jenkins
core/src/main/java/jenkins/model/Nodes.java
Nodes.getNode
@CheckForNull public Node getNode(String name) { return name == null ? null : nodes.get(name); }
java
@CheckForNull public Node getNode(String name) { return name == null ? null : nodes.get(name); }
[ "@", "CheckForNull", "public", "Node", "getNode", "(", "String", "name", ")", "{", "return", "name", "==", "null", "?", "null", ":", "nodes", ".", "get", "(", "name", ")", ";", "}" ]
Returns the named node. @param name the {@link Node#getNodeName()} of the node to retrieve. @return the {@link Node} or {@code null} if the node could not be found.
[ "Returns", "the", "named", "node", "." ]
44c4d3989232082c254d27ae360aa810669f44b7
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/jenkins/model/Nodes.java#L312-L315
125,617
jenkinsci/jenkins
core/src/main/java/jenkins/model/Nodes.java
Nodes.load
public void load() throws IOException { final File nodesDir = getNodesDir(); final File[] subdirs = nodesDir.listFiles(new FileFilter() { public boolean accept(File child) { return child.isDirectory(); } }); final Map<String, Node> newNodes = new T...
java
public void load() throws IOException { final File nodesDir = getNodesDir(); final File[] subdirs = nodesDir.listFiles(new FileFilter() { public boolean accept(File child) { return child.isDirectory(); } }); final Map<String, Node> newNodes = new T...
[ "public", "void", "load", "(", ")", "throws", "IOException", "{", "final", "File", "nodesDir", "=", "getNodesDir", "(", ")", ";", "final", "File", "[", "]", "subdirs", "=", "nodesDir", ".", "listFiles", "(", "new", "FileFilter", "(", ")", "{", "public", ...
Loads the nodes from disk. @throws IOException if the nodes could not be deserialized.
[ "Loads", "the", "nodes", "from", "disk", "." ]
44c4d3989232082c254d27ae360aa810669f44b7
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/jenkins/model/Nodes.java#L322-L352
125,618
jenkinsci/jenkins
core/src/main/java/jenkins/model/Nodes.java
Nodes.getNodesDir
private File getNodesDir() throws IOException { final File nodesDir = new File(jenkins.getRootDir(), "nodes"); if (!nodesDir.isDirectory() && !nodesDir.mkdirs()) { throw new IOException(String.format("Could not mkdirs %s", nodesDir)); } return nodesDir; }
java
private File getNodesDir() throws IOException { final File nodesDir = new File(jenkins.getRootDir(), "nodes"); if (!nodesDir.isDirectory() && !nodesDir.mkdirs()) { throw new IOException(String.format("Could not mkdirs %s", nodesDir)); } return nodesDir; }
[ "private", "File", "getNodesDir", "(", ")", "throws", "IOException", "{", "final", "File", "nodesDir", "=", "new", "File", "(", "jenkins", ".", "getRootDir", "(", ")", ",", "\"nodes\"", ")", ";", "if", "(", "!", "nodesDir", ".", "isDirectory", "(", ")", ...
Returns the directory that the nodes are stored in. @return the directory that the nodes are stored in. @throws IOException
[ "Returns", "the", "directory", "that", "the", "nodes", "are", "stored", "in", "." ]
44c4d3989232082c254d27ae360aa810669f44b7
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/jenkins/model/Nodes.java#L360-L366
125,619
jenkinsci/jenkins
core/src/main/java/hudson/model/ParameterDefinition.java
ParameterDefinition.getFormattedDescription
public String getFormattedDescription() { try { return Jenkins.getInstance().getMarkupFormatter().translate(description); } catch (IOException e) { LOGGER.warning("failed to translate description using configured markup formatter"); return ""; } }
java
public String getFormattedDescription() { try { return Jenkins.getInstance().getMarkupFormatter().translate(description); } catch (IOException e) { LOGGER.warning("failed to translate description using configured markup formatter"); return ""; } }
[ "public", "String", "getFormattedDescription", "(", ")", "{", "try", "{", "return", "Jenkins", ".", "getInstance", "(", ")", ".", "getMarkupFormatter", "(", ")", ".", "translate", "(", "description", ")", ";", "}", "catch", "(", "IOException", "e", ")", "{...
return parameter description, applying the configured MarkupFormatter for jenkins instance. @since 1.521
[ "return", "parameter", "description", "applying", "the", "configured", "MarkupFormatter", "for", "jenkins", "instance", "." ]
44c4d3989232082c254d27ae360aa810669f44b7
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/hudson/model/ParameterDefinition.java#L145-L152
125,620
jenkinsci/jenkins
core/src/main/java/hudson/model/ParameterDefinition.java
ParameterDefinition.createValue
@CheckForNull public ParameterValue createValue(CLICommand command, String value) throws IOException, InterruptedException { throw new AbortException("CLI parameter submission is not supported for the "+getClass()+" type. Please file a bug report for this"); }
java
@CheckForNull public ParameterValue createValue(CLICommand command, String value) throws IOException, InterruptedException { throw new AbortException("CLI parameter submission is not supported for the "+getClass()+" type. Please file a bug report for this"); }
[ "@", "CheckForNull", "public", "ParameterValue", "createValue", "(", "CLICommand", "command", ",", "String", "value", ")", "throws", "IOException", ",", "InterruptedException", "{", "throw", "new", "AbortException", "(", "\"CLI parameter submission is not supported for the ...
Create a parameter value from the string given in the CLI. @param command This is the command that got the parameter. @throws AbortException If the CLI processing should be aborted. Hudson will report the error message without stack trace, and then exits this command. Useful for graceful termination. @throws RuntimeEx...
[ "Create", "a", "parameter", "value", "from", "the", "string", "given", "in", "the", "CLI", "." ]
44c4d3989232082c254d27ae360aa810669f44b7
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/hudson/model/ParameterDefinition.java#L205-L208
125,621
jenkinsci/jenkins
core/src/main/java/hudson/model/Items.java
Items.toNameList
public static String toNameList(Collection<? extends Item> items) { StringBuilder buf = new StringBuilder(); for (Item item : items) { if(buf.length()>0) buf.append(", "); buf.append(item.getFullName()); } return buf.toString(); }
java
public static String toNameList(Collection<? extends Item> items) { StringBuilder buf = new StringBuilder(); for (Item item : items) { if(buf.length()>0) buf.append(", "); buf.append(item.getFullName()); } return buf.toString(); }
[ "public", "static", "String", "toNameList", "(", "Collection", "<", "?", "extends", "Item", ">", "items", ")", "{", "StringBuilder", "buf", "=", "new", "StringBuilder", "(", ")", ";", "for", "(", "Item", "item", ":", "items", ")", "{", "if", "(", "buf"...
Converts a list of items into a comma-separated list of full names.
[ "Converts", "a", "list", "of", "items", "into", "a", "comma", "-", "separated", "list", "of", "full", "names", "." ]
44c4d3989232082c254d27ae360aa810669f44b7
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/hudson/model/Items.java#L202-L210
125,622
jenkinsci/jenkins
core/src/main/java/hudson/util/ReflectionUtils.java
ReflectionUtils.getPublicMethodNamed
public static Method getPublicMethodNamed(Class c, String methodName) { for( Method m : c.getMethods() ) if(m.getName().equals(methodName)) return m; return null; }
java
public static Method getPublicMethodNamed(Class c, String methodName) { for( Method m : c.getMethods() ) if(m.getName().equals(methodName)) return m; return null; }
[ "public", "static", "Method", "getPublicMethodNamed", "(", "Class", "c", ",", "String", "methodName", ")", "{", "for", "(", "Method", "m", ":", "c", ".", "getMethods", "(", ")", ")", "if", "(", "m", ".", "getName", "(", ")", ".", "equals", "(", "meth...
Finds a public method of the given name, regardless of its parameter definitions,
[ "Finds", "a", "public", "method", "of", "the", "given", "name", "regardless", "of", "its", "parameter", "definitions" ]
44c4d3989232082c254d27ae360aa810669f44b7
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/hudson/util/ReflectionUtils.java#L52-L57
125,623
jenkinsci/jenkins
core/src/main/java/hudson/model/JDK.java
JDK.isDefaultJDKValid
public static boolean isDefaultJDKValid(Node n) { try { TaskListener listener = new StreamTaskListener(new NullStream()); Launcher launcher = n.createLauncher(listener); return launcher.launch().cmds("java","-fullversion").stdout(listener).join()==0; } catch (IOExcept...
java
public static boolean isDefaultJDKValid(Node n) { try { TaskListener listener = new StreamTaskListener(new NullStream()); Launcher launcher = n.createLauncher(listener); return launcher.launch().cmds("java","-fullversion").stdout(listener).join()==0; } catch (IOExcept...
[ "public", "static", "boolean", "isDefaultJDKValid", "(", "Node", "n", ")", "{", "try", "{", "TaskListener", "listener", "=", "new", "StreamTaskListener", "(", "new", "NullStream", "(", ")", ")", ";", "Launcher", "launcher", "=", "n", ".", "createLauncher", "...
Checks if "java" is in PATH on the given node. <p> If it's not, then the user must specify a configured JDK, so this is often useful for form field validation.
[ "Checks", "if", "java", "is", "in", "PATH", "on", "the", "given", "node", "." ]
44c4d3989232082c254d27ae360aa810669f44b7
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/hudson/model/JDK.java#L161-L169
125,624
jenkinsci/jenkins
core/src/main/java/hudson/AbstractMarkupText.java
AbstractMarkupText.findToken
public MarkupText.SubText findToken(Pattern pattern) { String text = getText(); Matcher m = pattern.matcher(text); if(m.find()) return createSubText(m); return null; }
java
public MarkupText.SubText findToken(Pattern pattern) { String text = getText(); Matcher m = pattern.matcher(text); if(m.find()) return createSubText(m); return null; }
[ "public", "MarkupText", ".", "SubText", "findToken", "(", "Pattern", "pattern", ")", "{", "String", "text", "=", "getText", "(", ")", ";", "Matcher", "m", "=", "pattern", ".", "matcher", "(", "text", ")", ";", "if", "(", "m", ".", "find", "(", ")", ...
Find the first occurrence of the given pattern in this text, or null. @since 1.349
[ "Find", "the", "first", "occurrence", "of", "the", "given", "pattern", "in", "this", "text", "or", "null", "." ]
44c4d3989232082c254d27ae360aa810669f44b7
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/hudson/AbstractMarkupText.java#L118-L126
125,625
jenkinsci/jenkins
core/src/main/java/hudson/AbstractMarkupText.java
AbstractMarkupText.findTokens
public List<MarkupText.SubText> findTokens(Pattern pattern) { String text = getText(); Matcher m = pattern.matcher(text); List<SubText> r = new ArrayList<>(); while(m.find()) { int idx = m.start(); if(idx>0) { char ch = text.charAt(idx-1); ...
java
public List<MarkupText.SubText> findTokens(Pattern pattern) { String text = getText(); Matcher m = pattern.matcher(text); List<SubText> r = new ArrayList<>(); while(m.find()) { int idx = m.start(); if(idx>0) { char ch = text.charAt(idx-1); ...
[ "public", "List", "<", "MarkupText", ".", "SubText", ">", "findTokens", "(", "Pattern", "pattern", ")", "{", "String", "text", "=", "getText", "(", ")", ";", "Matcher", "m", "=", "pattern", ".", "matcher", "(", "text", ")", ";", "List", "<", "SubText",...
Find all "tokens" that match the given pattern in this text. <p> A token is like a substring, except that it's aware of word boundaries. For example, while "bc" is a string of "abc", calling {@code findTokens} with "bc" as a pattern on string "abc" won't match anything. <p> This method is convenient for finding keywo...
[ "Find", "all", "tokens", "that", "match", "the", "given", "pattern", "in", "this", "text", "." ]
44c4d3989232082c254d27ae360aa810669f44b7
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/hudson/AbstractMarkupText.java#L141-L163
125,626
jenkinsci/jenkins
core/src/main/java/hudson/util/jna/Kernel32Utils.java
Kernel32Utils.waitForExitProcess
public static int waitForExitProcess(Pointer hProcess) throws InterruptedException { while (true) { if (Thread.interrupted()) throw new InterruptedException(); Kernel32.INSTANCE.WaitForSingleObject(hProcess,1000); IntByReference exitCode = new IntByReference(...
java
public static int waitForExitProcess(Pointer hProcess) throws InterruptedException { while (true) { if (Thread.interrupted()) throw new InterruptedException(); Kernel32.INSTANCE.WaitForSingleObject(hProcess,1000); IntByReference exitCode = new IntByReference(...
[ "public", "static", "int", "waitForExitProcess", "(", "Pointer", "hProcess", ")", "throws", "InterruptedException", "{", "while", "(", "true", ")", "{", "if", "(", "Thread", ".", "interrupted", "(", ")", ")", "throw", "new", "InterruptedException", "(", ")", ...
Given the process handle, waits for its completion and returns the exit code.
[ "Given", "the", "process", "handle", "waits", "for", "its", "completion", "and", "returns", "the", "exit", "code", "." ]
44c4d3989232082c254d27ae360aa810669f44b7
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/hudson/util/jna/Kernel32Utils.java#L46-L61
125,627
jenkinsci/jenkins
core/src/main/java/jenkins/install/SetupWizard.java
SetupWizard.doCreateAdminUser
@RequirePOST @Restricted(NoExternalUse.class) public HttpResponse doCreateAdminUser(StaplerRequest req, StaplerResponse rsp) throws IOException { Jenkins j = Jenkins.getInstance(); j.checkPermission(Jenkins.ADMINISTER); // This will be set up by default. if not, something changed, ok t...
java
@RequirePOST @Restricted(NoExternalUse.class) public HttpResponse doCreateAdminUser(StaplerRequest req, StaplerResponse rsp) throws IOException { Jenkins j = Jenkins.getInstance(); j.checkPermission(Jenkins.ADMINISTER); // This will be set up by default. if not, something changed, ok t...
[ "@", "RequirePOST", "@", "Restricted", "(", "NoExternalUse", ".", "class", ")", "public", "HttpResponse", "doCreateAdminUser", "(", "StaplerRequest", "req", ",", "StaplerResponse", "rsp", ")", "throws", "IOException", "{", "Jenkins", "j", "=", "Jenkins", ".", "g...
Called during the initial setup to create an admin user
[ "Called", "during", "the", "initial", "setup", "to", "create", "an", "admin", "user" ]
44c4d3989232082c254d27ae360aa810669f44b7
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/jenkins/install/SetupWizard.java#L237-L303
125,628
jenkinsci/jenkins
core/src/main/java/jenkins/install/SetupWizard.java
SetupWizard.doPlatformPluginList
@Restricted(DoNotUse.class) // WebOnly public HttpResponse doPlatformPluginList() throws IOException { SetupWizard setupWizard = Jenkins.get().getSetupWizard(); if (setupWizard != null) { if (InstallState.UPGRADE.equals(Jenkins.get().getInstallState())) { JSONArray initia...
java
@Restricted(DoNotUse.class) // WebOnly public HttpResponse doPlatformPluginList() throws IOException { SetupWizard setupWizard = Jenkins.get().getSetupWizard(); if (setupWizard != null) { if (InstallState.UPGRADE.equals(Jenkins.get().getInstallState())) { JSONArray initia...
[ "@", "Restricted", "(", "DoNotUse", ".", "class", ")", "// WebOnly", "public", "HttpResponse", "doPlatformPluginList", "(", ")", "throws", "IOException", "{", "SetupWizard", "setupWizard", "=", "Jenkins", ".", "get", "(", ")", ".", "getSetupWizard", "(", ")", ...
Returns the initial plugin list in JSON format
[ "Returns", "the", "initial", "plugin", "list", "in", "JSON", "format" ]
44c4d3989232082c254d27ae360aa810669f44b7
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/jenkins/install/SetupWizard.java#L387-L404
125,629
jenkinsci/jenkins
core/src/main/java/jenkins/install/SetupWizard.java
SetupWizard.getPlatformPluginUpdates
@CheckForNull public JSONArray getPlatformPluginUpdates() { final VersionNumber version = getCurrentLevel(); if (version == null) { return null; } return getPlatformPluginsForUpdate(version, Jenkins.getVersion()); }
java
@CheckForNull public JSONArray getPlatformPluginUpdates() { final VersionNumber version = getCurrentLevel(); if (version == null) { return null; } return getPlatformPluginsForUpdate(version, Jenkins.getVersion()); }
[ "@", "CheckForNull", "public", "JSONArray", "getPlatformPluginUpdates", "(", ")", "{", "final", "VersionNumber", "version", "=", "getCurrentLevel", "(", ")", ";", "if", "(", "version", "==", "null", ")", "{", "return", "null", ";", "}", "return", "getPlatformP...
Provides the list of platform plugin updates from the last time the upgrade was run. @return {@code null} if the version range cannot be retrieved.
[ "Provides", "the", "list", "of", "platform", "plugin", "updates", "from", "the", "last", "time", "the", "upgrade", "was", "run", "." ]
44c4d3989232082c254d27ae360aa810669f44b7
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/jenkins/install/SetupWizard.java#L424-L431
125,630
jenkinsci/jenkins
core/src/main/java/jenkins/install/SetupWizard.java
SetupWizard.getInstallState
public InstallState getInstallState(String name) { if (name == null) { return null; } return InstallState.valueOf(name); }
java
public InstallState getInstallState(String name) { if (name == null) { return null; } return InstallState.valueOf(name); }
[ "public", "InstallState", "getInstallState", "(", "String", "name", ")", "{", "if", "(", "name", "==", "null", ")", "{", "return", "null", ";", "}", "return", "InstallState", ".", "valueOf", "(", "name", ")", ";", "}" ]
Returns an installState by name
[ "Returns", "an", "installState", "by", "name" ]
44c4d3989232082c254d27ae360aa810669f44b7
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/jenkins/install/SetupWizard.java#L571-L576
125,631
jenkinsci/jenkins
core/src/main/java/jenkins/InitReactorRunner.java
InitReactorRunner.buildReactorListener
private ReactorListener buildReactorListener() throws IOException { List<ReactorListener> r = Lists.newArrayList(ServiceLoader.load(InitReactorListener.class, Thread.currentThread().getContextClassLoader())); r.add(new ReactorListener() { final Level level = Level.parse( Configuration.getStr...
java
private ReactorListener buildReactorListener() throws IOException { List<ReactorListener> r = Lists.newArrayList(ServiceLoader.load(InitReactorListener.class, Thread.currentThread().getContextClassLoader())); r.add(new ReactorListener() { final Level level = Level.parse( Configuration.getStr...
[ "private", "ReactorListener", "buildReactorListener", "(", ")", "throws", "IOException", "{", "List", "<", "ReactorListener", ">", "r", "=", "Lists", ".", "newArrayList", "(", "ServiceLoader", ".", "load", "(", "InitReactorListener", ".", "class", ",", "Thread", ...
Aggregates all the listeners into one and returns it. <p> At this point plugins are not loaded yet, so we fall back to the META-INF/services look up to discover implementations. As such there's no way for plugins to participate into this process.
[ "Aggregates", "all", "the", "listeners", "into", "one", "and", "returns", "it", "." ]
44c4d3989232082c254d27ae360aa810669f44b7
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/jenkins/InitReactorRunner.java#L62-L90
125,632
jenkinsci/jenkins
core/src/main/java/hudson/util/Protector.java
Protector.unprotect
public static String unprotect(String data) { if(data==null) return null; try { Cipher cipher = Secret.getCipher(ALGORITHM); cipher.init(Cipher.DECRYPT_MODE, DES_KEY); String plainText = new String(cipher.doFinal(Base64.getDecoder().decode(data.getBytes(StandardC...
java
public static String unprotect(String data) { if(data==null) return null; try { Cipher cipher = Secret.getCipher(ALGORITHM); cipher.init(Cipher.DECRYPT_MODE, DES_KEY); String plainText = new String(cipher.doFinal(Base64.getDecoder().decode(data.getBytes(StandardC...
[ "public", "static", "String", "unprotect", "(", "String", "data", ")", "{", "if", "(", "data", "==", "null", ")", "return", "null", ";", "try", "{", "Cipher", "cipher", "=", "Secret", ".", "getCipher", "(", "ALGORITHM", ")", ";", "cipher", ".", "init",...
Returns null if fails to decrypt properly.
[ "Returns", "null", "if", "fails", "to", "decrypt", "properly", "." ]
44c4d3989232082c254d27ae360aa810669f44b7
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/hudson/util/Protector.java#L60-L72
125,633
jenkinsci/jenkins
core/src/main/java/jenkins/org/apache/commons/validator/routines/DomainValidator.java
DomainValidator.clearTLDOverrides
static synchronized void clearTLDOverrides() { inUse = false; countryCodeTLDsPlus = MemoryReductionUtil.EMPTY_STRING_ARRAY; countryCodeTLDsMinus = MemoryReductionUtil.EMPTY_STRING_ARRAY; genericTLDsPlus = MemoryReductionUtil.EMPTY_STRING_ARRAY; genericTLDsMinus = MemoryReductionU...
java
static synchronized void clearTLDOverrides() { inUse = false; countryCodeTLDsPlus = MemoryReductionUtil.EMPTY_STRING_ARRAY; countryCodeTLDsMinus = MemoryReductionUtil.EMPTY_STRING_ARRAY; genericTLDsPlus = MemoryReductionUtil.EMPTY_STRING_ARRAY; genericTLDsMinus = MemoryReductionU...
[ "static", "synchronized", "void", "clearTLDOverrides", "(", ")", "{", "inUse", "=", "false", ";", "countryCodeTLDsPlus", "=", "MemoryReductionUtil", ".", "EMPTY_STRING_ARRAY", ";", "countryCodeTLDsMinus", "=", "MemoryReductionUtil", ".", "EMPTY_STRING_ARRAY", ";", "gene...
For use by unit test code only
[ "For", "use", "by", "unit", "test", "code", "only" ]
44c4d3989232082c254d27ae360aa810669f44b7
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/jenkins/org/apache/commons/validator/routines/DomainValidator.java#L1892-L1898
125,634
jenkinsci/jenkins
core/src/main/java/jenkins/org/apache/commons/validator/routines/DomainValidator.java
DomainValidator.getTLDEntries
public static String [] getTLDEntries(DomainValidator.ArrayType table) { final String[] array; switch(table) { case COUNTRY_CODE_MINUS: array = countryCodeTLDsMinus; break; case COUNTRY_CODE_PLUS: array = countryCodeTLDsPlus; ...
java
public static String [] getTLDEntries(DomainValidator.ArrayType table) { final String[] array; switch(table) { case COUNTRY_CODE_MINUS: array = countryCodeTLDsMinus; break; case COUNTRY_CODE_PLUS: array = countryCodeTLDsPlus; ...
[ "public", "static", "String", "[", "]", "getTLDEntries", "(", "DomainValidator", ".", "ArrayType", "table", ")", "{", "final", "String", "[", "]", "array", ";", "switch", "(", "table", ")", "{", "case", "COUNTRY_CODE_MINUS", ":", "array", "=", "countryCodeTL...
Get a copy of the internal array. @param table the array type (any of the enum values) @return a copy of the array @throws IllegalArgumentException if the table type is unexpected (should not happen) @since 1.5.1
[ "Get", "a", "copy", "of", "the", "internal", "array", "." ]
44c4d3989232082c254d27ae360aa810669f44b7
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/jenkins/org/apache/commons/validator/routines/DomainValidator.java#L1962-L1993
125,635
jenkinsci/jenkins
core/src/main/java/hudson/model/TaskAction.java
TaskAction.obtainLog
public AnnotatedLargeText obtainLog() { WeakReference<AnnotatedLargeText> l = log; if(l==null) return null; return l.get(); }
java
public AnnotatedLargeText obtainLog() { WeakReference<AnnotatedLargeText> l = log; if(l==null) return null; return l.get(); }
[ "public", "AnnotatedLargeText", "obtainLog", "(", ")", "{", "WeakReference", "<", "AnnotatedLargeText", ">", "l", "=", "log", ";", "if", "(", "l", "==", "null", ")", "return", "null", ";", "return", "l", ".", "get", "(", ")", ";", "}" ]
Obtains the log file. <p> The default implementation get this from {@link #workerThread}, so when it's complete, the log could be gone any time. <p> Derived classes that persist the text should override this method so that it fetches the file from disk.
[ "Obtains", "the", "log", "file", "." ]
44c4d3989232082c254d27ae360aa810669f44b7
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/hudson/model/TaskAction.java#L100-L104
125,636
jenkinsci/jenkins
core/src/main/java/hudson/model/TaskAction.java
TaskAction.doProgressiveLog
public void doProgressiveLog( StaplerRequest req, StaplerResponse rsp) throws IOException { AnnotatedLargeText text = obtainLog(); if(text!=null) { text.doProgressText(req,rsp); return; } rsp.setStatus(HttpServletResponse.SC_OK); }
java
public void doProgressiveLog( StaplerRequest req, StaplerResponse rsp) throws IOException { AnnotatedLargeText text = obtainLog(); if(text!=null) { text.doProgressText(req,rsp); return; } rsp.setStatus(HttpServletResponse.SC_OK); }
[ "public", "void", "doProgressiveLog", "(", "StaplerRequest", "req", ",", "StaplerResponse", "rsp", ")", "throws", "IOException", "{", "AnnotatedLargeText", "text", "=", "obtainLog", "(", ")", ";", "if", "(", "text", "!=", "null", ")", "{", "text", ".", "doPr...
Handles incremental log output.
[ "Handles", "incremental", "log", "output", "." ]
44c4d3989232082c254d27ae360aa810669f44b7
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/hudson/model/TaskAction.java#L117-L124
125,637
jenkinsci/jenkins
core/src/main/java/hudson/model/TaskAction.java
TaskAction.doClearError
@RequirePOST public synchronized void doClearError(StaplerRequest req, StaplerResponse rsp) throws IOException, ServletException { getACL().checkPermission(getPermission()); if(workerThread!=null && !workerThread.isRunning()) workerThread = null; rsp.sendRedirect("."); }
java
@RequirePOST public synchronized void doClearError(StaplerRequest req, StaplerResponse rsp) throws IOException, ServletException { getACL().checkPermission(getPermission()); if(workerThread!=null && !workerThread.isRunning()) workerThread = null; rsp.sendRedirect("."); }
[ "@", "RequirePOST", "public", "synchronized", "void", "doClearError", "(", "StaplerRequest", "req", ",", "StaplerResponse", "rsp", ")", "throws", "IOException", ",", "ServletException", "{", "getACL", "(", ")", ".", "checkPermission", "(", "getPermission", "(", ")...
Clears the error status.
[ "Clears", "the", "error", "status", "." ]
44c4d3989232082c254d27ae360aa810669f44b7
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/hudson/model/TaskAction.java#L141-L148
125,638
jenkinsci/jenkins
core/src/main/java/hudson/console/ConsoleAnnotatorFactory.java
ConsoleAnnotatorFactory.type
public Class<?> type() { Type type = Types.getBaseClass(getClass(), ConsoleAnnotatorFactory.class); if (type instanceof ParameterizedType) return Types.erasure(Types.getTypeArgument(type,0)); else return Object.class; }
java
public Class<?> type() { Type type = Types.getBaseClass(getClass(), ConsoleAnnotatorFactory.class); if (type instanceof ParameterizedType) return Types.erasure(Types.getTypeArgument(type,0)); else return Object.class; }
[ "public", "Class", "<", "?", ">", "type", "(", ")", "{", "Type", "type", "=", "Types", ".", "getBaseClass", "(", "getClass", "(", ")", ",", "ConsoleAnnotatorFactory", ".", "class", ")", ";", "if", "(", "type", "instanceof", "ParameterizedType", ")", "ret...
For which context type does this annotator work?
[ "For", "which", "context", "type", "does", "this", "annotator", "work?" ]
44c4d3989232082c254d27ae360aa810669f44b7
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/hudson/console/ConsoleAnnotatorFactory.java#L88-L94
125,639
jenkinsci/jenkins
core/src/main/java/jenkins/ExtensionComponentSet.java
ExtensionComponentSet.union
public static ExtensionComponentSet union(final Collection<? extends ExtensionComponentSet> base) { return new ExtensionComponentSet() { @Override public <T> Collection<ExtensionComponent<T>> find(Class<T> type) { List<ExtensionComponent<T>> r = Lists.newArrayList(); ...
java
public static ExtensionComponentSet union(final Collection<? extends ExtensionComponentSet> base) { return new ExtensionComponentSet() { @Override public <T> Collection<ExtensionComponent<T>> find(Class<T> type) { List<ExtensionComponent<T>> r = Lists.newArrayList(); ...
[ "public", "static", "ExtensionComponentSet", "union", "(", "final", "Collection", "<", "?", "extends", "ExtensionComponentSet", ">", "base", ")", "{", "return", "new", "ExtensionComponentSet", "(", ")", "{", "@", "Override", "public", "<", "T", ">", "Collection"...
Computes the union of all the given delta.
[ "Computes", "the", "union", "of", "all", "the", "given", "delta", "." ]
44c4d3989232082c254d27ae360aa810669f44b7
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/jenkins/ExtensionComponentSet.java#L92-L102
125,640
jenkinsci/jenkins
core/src/main/java/hudson/model/RunMap.java
RunMap.iterator
public Iterator<R> iterator() { return new Iterator<R>() { R last = null; R next = newestBuild(); public boolean hasNext() { return next!=null; } public R next() { last = next; if (last!=null) ...
java
public Iterator<R> iterator() { return new Iterator<R>() { R last = null; R next = newestBuild(); public boolean hasNext() { return next!=null; } public R next() { last = next; if (last!=null) ...
[ "public", "Iterator", "<", "R", ">", "iterator", "(", ")", "{", "return", "new", "Iterator", "<", "R", ">", "(", ")", "{", "R", "last", "=", "null", ";", "R", "next", "=", "newestBuild", "(", ")", ";", "public", "boolean", "hasNext", "(", ")", "{...
Walks through builds, newer ones first.
[ "Walks", "through", "builds", "newer", "ones", "first", "." ]
44c4d3989232082c254d27ae360aa810669f44b7
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/hudson/model/RunMap.java#L98-L122
125,641
jenkinsci/jenkins
core/src/main/java/jenkins/org/apache/commons/validator/routines/UrlValidator.java
UrlValidator.isValidQuery
protected boolean isValidQuery(String query) { if (query == null) { return true; } return QUERY_PATTERN.matcher(query).matches(); }
java
protected boolean isValidQuery(String query) { if (query == null) { return true; } return QUERY_PATTERN.matcher(query).matches(); }
[ "protected", "boolean", "isValidQuery", "(", "String", "query", ")", "{", "if", "(", "query", "==", "null", ")", "{", "return", "true", ";", "}", "return", "QUERY_PATTERN", ".", "matcher", "(", "query", ")", ".", "matches", "(", ")", ";", "}" ]
Returns true if the query is null or it's a properly formatted query string. @param query Query value to validate. @return true if query is valid.
[ "Returns", "true", "if", "the", "query", "is", "null", "or", "it", "s", "a", "properly", "formatted", "query", "string", "." ]
44c4d3989232082c254d27ae360aa810669f44b7
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/jenkins/org/apache/commons/validator/routines/UrlValidator.java#L483-L489
125,642
jenkinsci/jenkins
core/src/main/java/hudson/os/SU.java
SU.execute
public static <V,T extends Throwable> V execute(TaskListener listener, String rootUsername, String rootPassword, final Callable<V, T> closure) throws T, IOException, InterruptedException { VirtualChannel ch = start(listener, rootUsername, rootPassword); try { return ch.call(closure); ...
java
public static <V,T extends Throwable> V execute(TaskListener listener, String rootUsername, String rootPassword, final Callable<V, T> closure) throws T, IOException, InterruptedException { VirtualChannel ch = start(listener, rootUsername, rootPassword); try { return ch.call(closure); ...
[ "public", "static", "<", "V", ",", "T", "extends", "Throwable", ">", "V", "execute", "(", "TaskListener", "listener", ",", "String", "rootUsername", ",", "String", "rootPassword", ",", "final", "Callable", "<", "V", ",", "T", ">", "closure", ")", "throws",...
Starts a new privilege-escalated environment, execute a closure, and shut it down.
[ "Starts", "a", "new", "privilege", "-", "escalated", "environment", "execute", "a", "closure", "and", "shut", "it", "down", "." ]
44c4d3989232082c254d27ae360aa810669f44b7
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/hudson/os/SU.java#L127-L135
125,643
jenkinsci/jenkins
core/src/main/java/jenkins/util/FullDuplexHttpService.java
FullDuplexHttpService.download
public synchronized void download(StaplerRequest req, StaplerResponse rsp) throws InterruptedException, IOException { rsp.setStatus(HttpServletResponse.SC_OK); // server->client channel. // this is created first, and this controls the lifespan of the channel rsp.addHeader("Transfer-Enco...
java
public synchronized void download(StaplerRequest req, StaplerResponse rsp) throws InterruptedException, IOException { rsp.setStatus(HttpServletResponse.SC_OK); // server->client channel. // this is created first, and this controls the lifespan of the channel rsp.addHeader("Transfer-Enco...
[ "public", "synchronized", "void", "download", "(", "StaplerRequest", "req", ",", "StaplerResponse", "rsp", ")", "throws", "InterruptedException", ",", "IOException", "{", "rsp", ".", "setStatus", "(", "HttpServletResponse", ".", "SC_OK", ")", ";", "// server->client...
This is where we send the data to the client. <p> If this connection is lost, we'll abort the channel.
[ "This", "is", "where", "we", "send", "the", "data", "to", "the", "client", "." ]
44c4d3989232082c254d27ae360aa810669f44b7
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/jenkins/util/FullDuplexHttpService.java#L85-L121
125,644
jenkinsci/jenkins
core/src/main/java/jenkins/util/FullDuplexHttpService.java
FullDuplexHttpService.upload
public synchronized void upload(StaplerRequest req, StaplerResponse rsp) throws InterruptedException, IOException { rsp.setStatus(HttpServletResponse.SC_OK); InputStream in = req.getInputStream(); if (DIY_CHUNKING) { in = new ChunkedInputStream(in); } // publish the ...
java
public synchronized void upload(StaplerRequest req, StaplerResponse rsp) throws InterruptedException, IOException { rsp.setStatus(HttpServletResponse.SC_OK); InputStream in = req.getInputStream(); if (DIY_CHUNKING) { in = new ChunkedInputStream(in); } // publish the ...
[ "public", "synchronized", "void", "upload", "(", "StaplerRequest", "req", ",", "StaplerResponse", "rsp", ")", "throws", "InterruptedException", ",", "IOException", "{", "rsp", ".", "setStatus", "(", "HttpServletResponse", ".", "SC_OK", ")", ";", "InputStream", "in...
This is where we receive inputs from the client.
[ "This", "is", "where", "we", "receive", "inputs", "from", "the", "client", "." ]
44c4d3989232082c254d27ae360aa810669f44b7
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/jenkins/util/FullDuplexHttpService.java#L128-L144
125,645
jenkinsci/jenkins
core/src/main/java/jenkins/security/ClassFilterImpl.java
ClassFilterImpl.register
public static void register() { if (Main.isUnitTest && JENKINS_LOC == null) { mockOff(); return; } ClassFilter.setDefault(new ClassFilterImpl()); if (SUPPRESS_ALL) { LOGGER.warning("All class filtering suppressed. Your Jenkins installation is at risk f...
java
public static void register() { if (Main.isUnitTest && JENKINS_LOC == null) { mockOff(); return; } ClassFilter.setDefault(new ClassFilterImpl()); if (SUPPRESS_ALL) { LOGGER.warning("All class filtering suppressed. Your Jenkins installation is at risk f...
[ "public", "static", "void", "register", "(", ")", "{", "if", "(", "Main", ".", "isUnitTest", "&&", "JENKINS_LOC", "==", "null", ")", "{", "mockOff", "(", ")", ";", "return", ";", "}", "ClassFilter", ".", "setDefault", "(", "new", "ClassFilterImpl", "(", ...
Register this implementation as the default in the system.
[ "Register", "this", "implementation", "as", "the", "default", "in", "the", "system", "." ]
44c4d3989232082c254d27ae360aa810669f44b7
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/jenkins/security/ClassFilterImpl.java#L84-L95
125,646
jenkinsci/jenkins
core/src/main/java/jenkins/org/apache/commons/validator/routines/InetAddressValidator.java
InetAddressValidator.isValidInet4Address
public boolean isValidInet4Address(String inet4Address) { // verify that address conforms to generic IPv4 format String[] groups = ipv4Validator.match(inet4Address); if (groups == null) { return false; } // verify that address subgroups are legal for (String...
java
public boolean isValidInet4Address(String inet4Address) { // verify that address conforms to generic IPv4 format String[] groups = ipv4Validator.match(inet4Address); if (groups == null) { return false; } // verify that address subgroups are legal for (String...
[ "public", "boolean", "isValidInet4Address", "(", "String", "inet4Address", ")", "{", "// verify that address conforms to generic IPv4 format", "String", "[", "]", "groups", "=", "ipv4Validator", ".", "match", "(", "inet4Address", ")", ";", "if", "(", "groups", "==", ...
Validates an IPv4 address. Returns true if valid. @param inet4Address the IPv4 address to validate @return true if the argument contains a valid IPv4 address
[ "Validates", "an", "IPv4", "address", ".", "Returns", "true", "if", "valid", "." ]
44c4d3989232082c254d27ae360aa810669f44b7
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/jenkins/org/apache/commons/validator/routines/InetAddressValidator.java#L92-L125
125,647
jenkinsci/jenkins
core/src/main/java/hudson/diagnosis/OldDataMonitor.java
OldDataMonitor.report
public static void report(Saveable obj, String version) { OldDataMonitor odm = get(Jenkins.getInstance()); try { SaveableReference ref = referTo(obj); while (true) { VersionRange vr = odm.data.get(ref); if (vr != null && odm.data.replace(ref, vr, n...
java
public static void report(Saveable obj, String version) { OldDataMonitor odm = get(Jenkins.getInstance()); try { SaveableReference ref = referTo(obj); while (true) { VersionRange vr = odm.data.get(ref); if (vr != null && odm.data.replace(ref, vr, n...
[ "public", "static", "void", "report", "(", "Saveable", "obj", ",", "String", "version", ")", "{", "OldDataMonitor", "odm", "=", "get", "(", "Jenkins", ".", "getInstance", "(", ")", ")", ";", "try", "{", "SaveableReference", "ref", "=", "referTo", "(", "o...
Inform monitor that some data in a deprecated format has been loaded, and converted in-memory to a new structure. @param obj Saveable object; calling save() on this object will persist the data in its new format to disk. @param version Hudson release when the data structure changed.
[ "Inform", "monitor", "that", "some", "data", "in", "a", "deprecated", "format", "has", "been", "loaded", "and", "converted", "in", "-", "memory", "to", "a", "new", "structure", "." ]
44c4d3989232082c254d27ae360aa810669f44b7
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/hudson/diagnosis/OldDataMonitor.java#L168-L183
125,648
jenkinsci/jenkins
core/src/main/java/hudson/diagnosis/OldDataMonitor.java
OldDataMonitor.report
public static void report(UnmarshallingContext context, String version) { RobustReflectionConverter.addErrorInContext(context, new ReportException(version)); }
java
public static void report(UnmarshallingContext context, String version) { RobustReflectionConverter.addErrorInContext(context, new ReportException(version)); }
[ "public", "static", "void", "report", "(", "UnmarshallingContext", "context", ",", "String", "version", ")", "{", "RobustReflectionConverter", ".", "addErrorInContext", "(", "context", ",", "new", "ReportException", "(", "version", ")", ")", ";", "}" ]
Inform monitor that some data in a deprecated format has been loaded, during XStream unmarshalling when the Saveable containing this object is not available. @param context XStream unmarshalling context @param version Hudson release when the data structure changed.
[ "Inform", "monitor", "that", "some", "data", "in", "a", "deprecated", "format", "has", "been", "loaded", "during", "XStream", "unmarshalling", "when", "the", "Saveable", "containing", "this", "object", "is", "not", "available", "." ]
44c4d3989232082c254d27ae360aa810669f44b7
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/hudson/diagnosis/OldDataMonitor.java#L191-L193
125,649
jenkinsci/jenkins
core/src/main/java/hudson/diagnosis/OldDataMonitor.java
OldDataMonitor.report
public static void report(Saveable obj, Collection<Throwable> errors) { StringBuilder buf = new StringBuilder(); int i = 0; for (Throwable e : errors) { if (e instanceof ReportException) { report(obj, ((ReportException)e).version); } else { ...
java
public static void report(Saveable obj, Collection<Throwable> errors) { StringBuilder buf = new StringBuilder(); int i = 0; for (Throwable e : errors) { if (e instanceof ReportException) { report(obj, ((ReportException)e).version); } else { ...
[ "public", "static", "void", "report", "(", "Saveable", "obj", ",", "Collection", "<", "Throwable", ">", "errors", ")", "{", "StringBuilder", "buf", "=", "new", "StringBuilder", "(", ")", ";", "int", "i", "=", "0", ";", "for", "(", "Throwable", "e", ":"...
Inform monitor that some unreadable data was found while loading. @param obj Saveable object; calling save() on this object will discard the unreadable data. @param errors Exception(s) thrown while loading, regarding the unreadable classes/fields.
[ "Inform", "monitor", "that", "some", "unreadable", "data", "was", "found", "while", "loading", "." ]
44c4d3989232082c254d27ae360aa810669f44b7
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/hudson/diagnosis/OldDataMonitor.java#L207-L237
125,650
jenkinsci/jenkins
core/src/main/java/hudson/diagnosis/OldDataMonitor.java
OldDataMonitor.getVersionList
@Restricted(NoExternalUse.class) public Iterator<VersionNumber> getVersionList() { TreeSet<VersionNumber> set = new TreeSet<VersionNumber>(); for (VersionRange vr : data.values()) { if (vr.max != null) { set.add(vr.max); } } return set.iterator...
java
@Restricted(NoExternalUse.class) public Iterator<VersionNumber> getVersionList() { TreeSet<VersionNumber> set = new TreeSet<VersionNumber>(); for (VersionRange vr : data.values()) { if (vr.max != null) { set.add(vr.max); } } return set.iterator...
[ "@", "Restricted", "(", "NoExternalUse", ".", "class", ")", "public", "Iterator", "<", "VersionNumber", ">", "getVersionList", "(", ")", "{", "TreeSet", "<", "VersionNumber", ">", "set", "=", "new", "TreeSet", "<", "VersionNumber", ">", "(", ")", ";", "for...
Sorted list of unique max-versions in the data set. For select list in jelly.
[ "Sorted", "list", "of", "unique", "max", "-", "versions", "in", "the", "data", "set", ".", "For", "select", "list", "in", "jelly", "." ]
44c4d3989232082c254d27ae360aa810669f44b7
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/hudson/diagnosis/OldDataMonitor.java#L295-L304
125,651
jenkinsci/jenkins
core/src/main/java/hudson/diagnosis/OldDataMonitor.java
OldDataMonitor.doUpgrade
@RequirePOST public HttpResponse doUpgrade(StaplerRequest req, StaplerResponse rsp) { final String thruVerParam = req.getParameter("thruVer"); final VersionNumber thruVer = thruVerParam.equals("all") ? null : new VersionNumber(thruVerParam); saveAndRemoveEntries(new Predicate<Map.Entry<Save...
java
@RequirePOST public HttpResponse doUpgrade(StaplerRequest req, StaplerResponse rsp) { final String thruVerParam = req.getParameter("thruVer"); final VersionNumber thruVer = thruVerParam.equals("all") ? null : new VersionNumber(thruVerParam); saveAndRemoveEntries(new Predicate<Map.Entry<Save...
[ "@", "RequirePOST", "public", "HttpResponse", "doUpgrade", "(", "StaplerRequest", "req", ",", "StaplerResponse", "rsp", ")", "{", "final", "String", "thruVerParam", "=", "req", ".", "getParameter", "(", "\"thruVer\"", ")", ";", "final", "VersionNumber", "thruVer",...
Save all or some of the files to persist data in the new forms. Remove those items from the data map.
[ "Save", "all", "or", "some", "of", "the", "files", "to", "persist", "data", "in", "the", "new", "forms", ".", "Remove", "those", "items", "from", "the", "data", "map", "." ]
44c4d3989232082c254d27ae360aa810669f44b7
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/hudson/diagnosis/OldDataMonitor.java#L323-L337
125,652
jenkinsci/jenkins
core/src/main/java/hudson/security/SecurityRealm.java
SecurityRealm.doLogout
public void doLogout(StaplerRequest req, StaplerResponse rsp) throws IOException, ServletException { HttpSession session = req.getSession(false); if(session!=null) session.invalidate(); Authentication auth = SecurityContextHolder.getContext().getAuthentication(); SecurityCont...
java
public void doLogout(StaplerRequest req, StaplerResponse rsp) throws IOException, ServletException { HttpSession session = req.getSession(false); if(session!=null) session.invalidate(); Authentication auth = SecurityContextHolder.getContext().getAuthentication(); SecurityCont...
[ "public", "void", "doLogout", "(", "StaplerRequest", "req", ",", "StaplerResponse", "rsp", ")", "throws", "IOException", ",", "ServletException", "{", "HttpSession", "session", "=", "req", ".", "getSession", "(", "false", ")", ";", "if", "(", "session", "!=", ...
Handles the logout processing. <p> The default implementation erases the session and do a few other clean up, then redirect the user to the URL specified by {@link #getPostLogOutUrl(StaplerRequest, Authentication)}. @since 1.314
[ "Handles", "the", "logout", "processing", "." ]
44c4d3989232082c254d27ae360aa810669f44b7
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/hudson/security/SecurityRealm.java#L286-L302
125,653
jenkinsci/jenkins
core/src/main/java/hudson/security/SecurityRealm.java
SecurityRealm.doCaptcha
public final void doCaptcha(StaplerRequest req, StaplerResponse rsp) throws IOException { if (captchaSupport != null) { String id = req.getSession().getId(); rsp.setContentType("image/png"); // source: https://stackoverflow.com/a/3414217 rsp.setHeader("Cache-Contr...
java
public final void doCaptcha(StaplerRequest req, StaplerResponse rsp) throws IOException { if (captchaSupport != null) { String id = req.getSession().getId(); rsp.setContentType("image/png"); // source: https://stackoverflow.com/a/3414217 rsp.setHeader("Cache-Contr...
[ "public", "final", "void", "doCaptcha", "(", "StaplerRequest", "req", ",", "StaplerResponse", "rsp", ")", "throws", "IOException", "{", "if", "(", "captchaSupport", "!=", "null", ")", "{", "String", "id", "=", "req", ".", "getSession", "(", ")", ".", "getI...
Generates a captcha image.
[ "Generates", "a", "captcha", "image", "." ]
44c4d3989232082c254d27ae360aa810669f44b7
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/hudson/security/SecurityRealm.java#L392-L402
125,654
jenkinsci/jenkins
core/src/main/java/hudson/security/SecurityRealm.java
SecurityRealm.validateCaptcha
protected final boolean validateCaptcha(String text) { if (captchaSupport != null) { String id = Stapler.getCurrentRequest().getSession().getId(); return captchaSupport.validateCaptcha(id, text); } // If no Captcha Support then bogus validation always returns true ...
java
protected final boolean validateCaptcha(String text) { if (captchaSupport != null) { String id = Stapler.getCurrentRequest().getSession().getId(); return captchaSupport.validateCaptcha(id, text); } // If no Captcha Support then bogus validation always returns true ...
[ "protected", "final", "boolean", "validateCaptcha", "(", "String", "text", ")", "{", "if", "(", "captchaSupport", "!=", "null", ")", "{", "String", "id", "=", "Stapler", ".", "getCurrentRequest", "(", ")", ".", "getSession", "(", ")", ".", "getId", "(", ...
Validates the captcha.
[ "Validates", "the", "captcha", "." ]
44c4d3989232082c254d27ae360aa810669f44b7
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/hudson/security/SecurityRealm.java#L407-L415
125,655
jenkinsci/jenkins
core/src/main/java/hudson/security/SecurityRealm.java
SecurityRealm.getFrom
@Restricted(DoNotUse.class) public static String getFrom() { String from = null, returnValue = null; final StaplerRequest request = Stapler.getCurrentRequest(); // Try to obtain a return point either from the Session // or from the QueryParameter in this order if (request !=...
java
@Restricted(DoNotUse.class) public static String getFrom() { String from = null, returnValue = null; final StaplerRequest request = Stapler.getCurrentRequest(); // Try to obtain a return point either from the Session // or from the QueryParameter in this order if (request !=...
[ "@", "Restricted", "(", "DoNotUse", ".", "class", ")", "public", "static", "String", "getFrom", "(", ")", "{", "String", "from", "=", "null", ",", "returnValue", "=", "null", ";", "final", "StaplerRequest", "request", "=", "Stapler", ".", "getCurrentRequest"...
Perform a calculation where we should go back after successful login @return Encoded URI where we should go back after successful login or "/" if no way back or an issue occurred @since 2.4
[ "Perform", "a", "calculation", "where", "we", "should", "go", "back", "after", "successful", "login" ]
44c4d3989232082c254d27ae360aa810669f44b7
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/hudson/security/SecurityRealm.java#L494-L531
125,656
jenkinsci/jenkins
core/src/main/java/hudson/util/FormApply.java
FormApply.success
public static HttpResponseException success(final String destination) { return new HttpResponseException() { public void generateResponse(StaplerRequest req, StaplerResponse rsp, Object node) throws IOException, ServletException { if (isApply(req)) { // if the sub...
java
public static HttpResponseException success(final String destination) { return new HttpResponseException() { public void generateResponse(StaplerRequest req, StaplerResponse rsp, Object node) throws IOException, ServletException { if (isApply(req)) { // if the sub...
[ "public", "static", "HttpResponseException", "success", "(", "final", "String", "destination", ")", "{", "return", "new", "HttpResponseException", "(", ")", "{", "public", "void", "generateResponse", "(", "StaplerRequest", "req", ",", "StaplerResponse", "rsp", ",", ...
Generates the response for the form submission in such a way that it handles the "apply" button correctly. @param destination The page that the user will be taken to upon a successful submission (in case this is not via the "apply" button.)
[ "Generates", "the", "response", "for", "the", "form", "submission", "in", "such", "a", "way", "that", "it", "handles", "the", "apply", "button", "correctly", "." ]
44c4d3989232082c254d27ae360aa810669f44b7
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/hudson/util/FormApply.java#L47-L59
125,657
jenkinsci/jenkins
core/src/main/java/hudson/security/PermissionScope.java
PermissionScope.isContainedBy
public boolean isContainedBy(PermissionScope s) { if (this==s) return true; for (PermissionScope c : containers) { if (c.isContainedBy(s)) return true; } return false; }
java
public boolean isContainedBy(PermissionScope s) { if (this==s) return true; for (PermissionScope c : containers) { if (c.isContainedBy(s)) return true; } return false; }
[ "public", "boolean", "isContainedBy", "(", "PermissionScope", "s", ")", "{", "if", "(", "this", "==", "s", ")", "return", "true", ";", "for", "(", "PermissionScope", "c", ":", "containers", ")", "{", "if", "(", "c", ".", "isContainedBy", "(", "s", ")",...
Returns true if this scope is directly or indirectly contained by the given scope. <p> A scope always contains itself.
[ "Returns", "true", "if", "this", "scope", "is", "directly", "or", "indirectly", "contained", "by", "the", "given", "scope", "." ]
44c4d3989232082c254d27ae360aa810669f44b7
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/hudson/security/PermissionScope.java#L81-L88
125,658
jenkinsci/jenkins
core/src/main/java/hudson/org/apache/tools/tar/TarInputStream.java
TarInputStream.available
public int available() throws IOException { if (this.entrySize - this.entryOffset > Integer.MAX_VALUE) { return Integer.MAX_VALUE; } return (int) (this.entrySize - this.entryOffset); }
java
public int available() throws IOException { if (this.entrySize - this.entryOffset > Integer.MAX_VALUE) { return Integer.MAX_VALUE; } return (int) (this.entrySize - this.entryOffset); }
[ "public", "int", "available", "(", ")", "throws", "IOException", "{", "if", "(", "this", ".", "entrySize", "-", "this", ".", "entryOffset", ">", "Integer", ".", "MAX_VALUE", ")", "{", "return", "Integer", ".", "MAX_VALUE", ";", "}", "return", "(", "int",...
Get the available data that can be read from the current entry in the archive. This does not indicate how much data is left in the entire archive, only in the current entry. This value is determined from the entry's size header field and the amount of data already read from the current entry. Integer.MAX_VALUE is retur...
[ "Get", "the", "available", "data", "that", "can", "be", "read", "from", "the", "current", "entry", "in", "the", "archive", ".", "This", "does", "not", "indicate", "how", "much", "data", "is", "left", "in", "the", "entire", "archive", "only", "in", "the",...
44c4d3989232082c254d27ae360aa810669f44b7
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/hudson/org/apache/tools/tar/TarInputStream.java#L135-L140
125,659
jenkinsci/jenkins
core/src/main/java/hudson/org/apache/tools/tar/TarInputStream.java
TarInputStream.read
public int read(byte[] buf, int offset, int numToRead) throws IOException { int totalRead = 0; if (this.entryOffset >= this.entrySize) { return -1; } if ((numToRead + this.entryOffset) > this.entrySize) { numToRead = (int) (this.entrySize - this.entryOffset); ...
java
public int read(byte[] buf, int offset, int numToRead) throws IOException { int totalRead = 0; if (this.entryOffset >= this.entrySize) { return -1; } if ((numToRead + this.entryOffset) > this.entrySize) { numToRead = (int) (this.entrySize - this.entryOffset); ...
[ "public", "int", "read", "(", "byte", "[", "]", "buf", ",", "int", "offset", ",", "int", "numToRead", ")", "throws", "IOException", "{", "int", "totalRead", "=", "0", ";", "if", "(", "this", ".", "entryOffset", ">=", "this", ".", "entrySize", ")", "{...
Reads bytes from the current tar archive entry. This method is aware of the boundaries of the current entry in the archive and will deal with them as if they were this stream's start and EOF. @param buf The buffer into which to place bytes read. @param offset The offset at which to place bytes read. @param numToRead ...
[ "Reads", "bytes", "from", "the", "current", "tar", "archive", "entry", "." ]
44c4d3989232082c254d27ae360aa810669f44b7
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/hudson/org/apache/tools/tar/TarInputStream.java#L312-L377
125,660
jenkinsci/jenkins
core/src/main/java/hudson/org/apache/tools/tar/TarInputStream.java
TarInputStream.copyEntryContents
public void copyEntryContents(OutputStream out) throws IOException { byte[] buf = new byte[32 * 1024]; while (true) { int numRead = this.read(buf, 0, buf.length); if (numRead == -1) { break; } out.write(buf, 0, numRead); } }
java
public void copyEntryContents(OutputStream out) throws IOException { byte[] buf = new byte[32 * 1024]; while (true) { int numRead = this.read(buf, 0, buf.length); if (numRead == -1) { break; } out.write(buf, 0, numRead); } }
[ "public", "void", "copyEntryContents", "(", "OutputStream", "out", ")", "throws", "IOException", "{", "byte", "[", "]", "buf", "=", "new", "byte", "[", "32", "*", "1024", "]", ";", "while", "(", "true", ")", "{", "int", "numRead", "=", "this", ".", "...
Copies the contents of the current tar archive entry directly into an output stream. @param out The OutputStream into which to write the entry's data. @throws IOException on error
[ "Copies", "the", "contents", "of", "the", "current", "tar", "archive", "entry", "directly", "into", "an", "output", "stream", "." ]
44c4d3989232082c254d27ae360aa810669f44b7
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/hudson/org/apache/tools/tar/TarInputStream.java#L386-L398
125,661
jenkinsci/jenkins
core/src/main/java/hudson/util/DoubleLaunchChecker.java
DoubleLaunchChecker.getId
public String getId() { Jenkins h = Jenkins.getInstance(); // in servlet 2.5, we can get the context path String contextPath=""; try { Method m = ServletContext.class.getMethod("getContextPath"); contextPath=" contextPath=\""+m.invoke(h.servletContext)+"\""; ...
java
public String getId() { Jenkins h = Jenkins.getInstance(); // in servlet 2.5, we can get the context path String contextPath=""; try { Method m = ServletContext.class.getMethod("getContextPath"); contextPath=" contextPath=\""+m.invoke(h.servletContext)+"\""; ...
[ "public", "String", "getId", "(", ")", "{", "Jenkins", "h", "=", "Jenkins", ".", "getInstance", "(", ")", ";", "// in servlet 2.5, we can get the context path", "String", "contextPath", "=", "\"\"", ";", "try", "{", "Method", "m", "=", "ServletContext", ".", "...
Figures out a string that identifies this instance of Hudson.
[ "Figures", "out", "a", "string", "that", "identifies", "this", "instance", "of", "Hudson", "." ]
44c4d3989232082c254d27ae360aa810669f44b7
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/hudson/util/DoubleLaunchChecker.java#L128-L141
125,662
jenkinsci/jenkins
core/src/main/java/hudson/util/DoubleLaunchChecker.java
DoubleLaunchChecker.schedule
public void schedule() { // randomize the scheduling so that multiple Hudson instances will write at the file at different time long MINUTE = 1000*60; Timer.get() .schedule(new SafeTimerTask() { protected void doRun() { execute(); ...
java
public void schedule() { // randomize the scheduling so that multiple Hudson instances will write at the file at different time long MINUTE = 1000*60; Timer.get() .schedule(new SafeTimerTask() { protected void doRun() { execute(); ...
[ "public", "void", "schedule", "(", ")", "{", "// randomize the scheduling so that multiple Hudson instances will write at the file at different time", "long", "MINUTE", "=", "1000", "*", "60", ";", "Timer", ".", "get", "(", ")", ".", "schedule", "(", "new", "SafeTimerTa...
Schedules the next execution.
[ "Schedules", "the", "next", "execution", "." ]
44c4d3989232082c254d27ae360aa810669f44b7
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/hudson/util/DoubleLaunchChecker.java#L150-L160
125,663
jenkinsci/jenkins
core/src/main/java/hudson/util/DoubleLaunchChecker.java
DoubleLaunchChecker.doDynamic
public void doDynamic(StaplerRequest req, StaplerResponse rsp) throws IOException, ServletException { rsp.setStatus(SC_INTERNAL_SERVER_ERROR); req.getView(this,"index.jelly").forward(req,rsp); }
java
public void doDynamic(StaplerRequest req, StaplerResponse rsp) throws IOException, ServletException { rsp.setStatus(SC_INTERNAL_SERVER_ERROR); req.getView(this,"index.jelly").forward(req,rsp); }
[ "public", "void", "doDynamic", "(", "StaplerRequest", "req", ",", "StaplerResponse", "rsp", ")", "throws", "IOException", ",", "ServletException", "{", "rsp", ".", "setStatus", "(", "SC_INTERNAL_SERVER_ERROR", ")", ";", "req", ".", "getView", "(", "this", ",", ...
Serve all URLs with the index view.
[ "Serve", "all", "URLs", "with", "the", "index", "view", "." ]
44c4d3989232082c254d27ae360aa810669f44b7
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/hudson/util/DoubleLaunchChecker.java#L170-L173
125,664
jenkinsci/jenkins
core/src/main/java/hudson/util/DoubleLaunchChecker.java
DoubleLaunchChecker.doIgnore
@RequirePOST public void doIgnore(StaplerRequest req, StaplerResponse rsp) throws IOException { ignore = true; Jenkins.getInstance().servletContext.setAttribute("app", Jenkins.getInstance()); rsp.sendRedirect2(req.getContextPath()+'/'); }
java
@RequirePOST public void doIgnore(StaplerRequest req, StaplerResponse rsp) throws IOException { ignore = true; Jenkins.getInstance().servletContext.setAttribute("app", Jenkins.getInstance()); rsp.sendRedirect2(req.getContextPath()+'/'); }
[ "@", "RequirePOST", "public", "void", "doIgnore", "(", "StaplerRequest", "req", ",", "StaplerResponse", "rsp", ")", "throws", "IOException", "{", "ignore", "=", "true", ";", "Jenkins", ".", "getInstance", "(", ")", ".", "servletContext", ".", "setAttribute", "...
Ignore the problem and go back to using Hudson.
[ "Ignore", "the", "problem", "and", "go", "back", "to", "using", "Hudson", "." ]
44c4d3989232082c254d27ae360aa810669f44b7
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/hudson/util/DoubleLaunchChecker.java#L178-L183
125,665
jenkinsci/jenkins
core/src/main/java/hudson/model/HealthReport.java
HealthReport.getIconUrl
public String getIconUrl(String size) { if (iconUrl == null) { return Jenkins.RESOURCE_PATH + "/images/" + size + "/" + HEALTH_UNKNOWN_IMG; } if (iconUrl.startsWith("/")) { return iconUrl.replace("/32x32/", "/" + size + "/"); } return Jenkins.RESOURCE_PATH...
java
public String getIconUrl(String size) { if (iconUrl == null) { return Jenkins.RESOURCE_PATH + "/images/" + size + "/" + HEALTH_UNKNOWN_IMG; } if (iconUrl.startsWith("/")) { return iconUrl.replace("/32x32/", "/" + size + "/"); } return Jenkins.RESOURCE_PATH...
[ "public", "String", "getIconUrl", "(", "String", "size", ")", "{", "if", "(", "iconUrl", "==", "null", ")", "{", "return", "Jenkins", ".", "RESOURCE_PATH", "+", "\"/images/\"", "+", "size", "+", "\"/\"", "+", "HEALTH_UNKNOWN_IMG", ";", "}", "if", "(", "i...
Get's the iconUrl relative to the hudson root url, for the correct size. @param size The size, e.g. 32x32, 24x24 or 16x16. @return The url relative to hudson's root url.
[ "Get", "s", "the", "iconUrl", "relative", "to", "the", "hudson", "root", "url", "for", "the", "correct", "size", "." ]
44c4d3989232082c254d27ae360aa810669f44b7
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/hudson/model/HealthReport.java#L251-L259
125,666
jenkinsci/jenkins
core/src/main/java/hudson/model/HealthReport.java
HealthReport.min
public static HealthReport min(HealthReport a, HealthReport b) { if (a == null && b == null) return null; if (a == null) return b; if (b == null) return a; if (a.compareTo(b) <= 0) return a; return b; }
java
public static HealthReport min(HealthReport a, HealthReport b) { if (a == null && b == null) return null; if (a == null) return b; if (b == null) return a; if (a.compareTo(b) <= 0) return a; return b; }
[ "public", "static", "HealthReport", "min", "(", "HealthReport", "a", ",", "HealthReport", "b", ")", "{", "if", "(", "a", "==", "null", "&&", "b", "==", "null", ")", "return", "null", ";", "if", "(", "a", "==", "null", ")", "return", "b", ";", "if",...
Utility method to find the report with the lowest health.
[ "Utility", "method", "to", "find", "the", "report", "with", "the", "lowest", "health", "." ]
44c4d3989232082c254d27ae360aa810669f44b7
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/hudson/model/HealthReport.java#L336-L342
125,667
jenkinsci/jenkins
core/src/main/java/hudson/model/HealthReport.java
HealthReport.max
public static HealthReport max(HealthReport a, HealthReport b) { if (a == null && b == null) return null; if (a == null) return b; if (b == null) return a; if (a.compareTo(b) >= 0) return a; return b; }
java
public static HealthReport max(HealthReport a, HealthReport b) { if (a == null && b == null) return null; if (a == null) return b; if (b == null) return a; if (a.compareTo(b) >= 0) return a; return b; }
[ "public", "static", "HealthReport", "max", "(", "HealthReport", "a", ",", "HealthReport", "b", ")", "{", "if", "(", "a", "==", "null", "&&", "b", "==", "null", ")", "return", "null", ";", "if", "(", "a", "==", "null", ")", "return", "b", ";", "if",...
Utility method to find the report with the highest health.
[ "Utility", "method", "to", "find", "the", "report", "with", "the", "highest", "health", "." ]
44c4d3989232082c254d27ae360aa810669f44b7
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/hudson/model/HealthReport.java#L347-L353
125,668
jenkinsci/jenkins
core/src/main/java/hudson/logging/LogRecorderManager.java
LogRecorderManager.load
public void load() throws IOException { logRecorders.clear(); File dir = configDir(); File[] files = dir.listFiles((FileFilter)new WildcardFileFilter("*.xml")); if(files==null) return; for (File child : files) { String name = child.getName(); name = na...
java
public void load() throws IOException { logRecorders.clear(); File dir = configDir(); File[] files = dir.listFiles((FileFilter)new WildcardFileFilter("*.xml")); if(files==null) return; for (File child : files) { String name = child.getName(); name = na...
[ "public", "void", "load", "(", ")", "throws", "IOException", "{", "logRecorders", ".", "clear", "(", ")", ";", "File", "dir", "=", "configDir", "(", ")", ";", "File", "[", "]", "files", "=", "dir", ".", "listFiles", "(", "(", "FileFilter", ")", "new"...
Loads the configuration from disk.
[ "Loads", "the", "configuration", "from", "disk", "." ]
44c4d3989232082c254d27ae360aa810669f44b7
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/hudson/logging/LogRecorderManager.java#L96-L108
125,669
jenkinsci/jenkins
core/src/main/java/hudson/model/DependencyGraph.java
DependencyGraph.putComputationalData
public <T> void putComputationalData(Class<T> key, T value) { this.computationalData.put(key, value); }
java
public <T> void putComputationalData(Class<T> key, T value) { this.computationalData.put(key, value); }
[ "public", "<", "T", ">", "void", "putComputationalData", "(", "Class", "<", "T", ">", "key", ",", "T", "value", ")", "{", "this", ".", "computationalData", ".", "put", "(", "key", ",", "value", ")", ";", "}" ]
Adds data which is useful for the time when the dependency graph is built up. All this data will be cleaned once the dependency graph creation has finished.
[ "Adds", "data", "which", "is", "useful", "for", "the", "time", "when", "the", "dependency", "graph", "is", "built", "up", ".", "All", "this", "data", "will", "be", "cleaned", "once", "the", "dependency", "graph", "creation", "has", "finished", "." ]
44c4d3989232082c254d27ae360aa810669f44b7
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/hudson/model/DependencyGraph.java#L163-L165
125,670
jenkinsci/jenkins
core/src/main/java/hudson/model/DependencyGraph.java
DependencyGraph.getComputationalData
public <T> T getComputationalData(Class<T> key) { @SuppressWarnings("unchecked") T result = (T) this.computationalData.get(key); return result; }
java
public <T> T getComputationalData(Class<T> key) { @SuppressWarnings("unchecked") T result = (T) this.computationalData.get(key); return result; }
[ "public", "<", "T", ">", "T", "getComputationalData", "(", "Class", "<", "T", ">", "key", ")", "{", "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "T", "result", "=", "(", "T", ")", "this", ".", "computationalData", ".", "get", "(", "key", ")", ...
Gets temporary data which is needed for building up the dependency graph.
[ "Gets", "temporary", "data", "which", "is", "needed", "for", "building", "up", "the", "dependency", "graph", "." ]
44c4d3989232082c254d27ae360aa810669f44b7
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/hudson/model/DependencyGraph.java#L170-L174
125,671
jenkinsci/jenkins
core/src/main/java/hudson/widgets/HistoryWidget.java
HistoryWidget.getRenderList
public Iterable<HistoryPageEntry<T>> getRenderList() { if(trimmed) { List<HistoryPageEntry<T>> pageEntries = toPageEntries(baseList); if(pageEntries.size() > THRESHOLD) { return updateFirstTransientBuildKey(pageEntries.subList(0,THRESHOLD)); } else { ...
java
public Iterable<HistoryPageEntry<T>> getRenderList() { if(trimmed) { List<HistoryPageEntry<T>> pageEntries = toPageEntries(baseList); if(pageEntries.size() > THRESHOLD) { return updateFirstTransientBuildKey(pageEntries.subList(0,THRESHOLD)); } else { ...
[ "public", "Iterable", "<", "HistoryPageEntry", "<", "T", ">", ">", "getRenderList", "(", ")", "{", "if", "(", "trimmed", ")", "{", "List", "<", "HistoryPageEntry", "<", "T", ">>", "pageEntries", "=", "toPageEntries", "(", "baseList", ")", ";", "if", "(",...
The records to be rendered this time.
[ "The", "records", "to", "be", "rendered", "this", "time", "." ]
44c4d3989232082c254d27ae360aa810669f44b7
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/hudson/widgets/HistoryWidget.java#L145-L158
125,672
jenkinsci/jenkins
core/src/main/java/hudson/widgets/HistoryWidget.java
HistoryWidget.doAjax
public void doAjax( StaplerRequest req, StaplerResponse rsp, @Header("n") String n ) throws IOException, ServletException { rsp.setContentType("text/html;charset=UTF-8"); // pick up builds to send back List<T> items = new ArrayList<>(); if (n != null) { String nn=null;...
java
public void doAjax( StaplerRequest req, StaplerResponse rsp, @Header("n") String n ) throws IOException, ServletException { rsp.setContentType("text/html;charset=UTF-8"); // pick up builds to send back List<T> items = new ArrayList<>(); if (n != null) { String nn=null;...
[ "public", "void", "doAjax", "(", "StaplerRequest", "req", ",", "StaplerResponse", "rsp", ",", "@", "Header", "(", "\"n\"", ")", "String", "n", ")", "throws", "IOException", ",", "ServletException", "{", "rsp", ".", "setContentType", "(", "\"text/html;charset=UTF...
Handles AJAX requests from browsers to update build history. @param n The build 'number' to fetch. This is string because various variants uses non-numbers as the build key.
[ "Handles", "AJAX", "requests", "from", "browsers", "to", "update", "build", "history", "." ]
44c4d3989232082c254d27ae360aa810669f44b7
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/hudson/widgets/HistoryWidget.java#L217-L256
125,673
jenkinsci/jenkins
core/src/main/java/hudson/WebAppMain.java
WebAppMain.recordBootAttempt
private void recordBootAttempt(File home) { try (OutputStream o=Files.newOutputStream(BootFailure.getBootFailureFile(home).toPath(), StandardOpenOption.CREATE, StandardOpenOption.APPEND)) { o.write((new Date().toString() + System.getProperty("line.separator", "\n")).toString().getBytes()); }...
java
private void recordBootAttempt(File home) { try (OutputStream o=Files.newOutputStream(BootFailure.getBootFailureFile(home).toPath(), StandardOpenOption.CREATE, StandardOpenOption.APPEND)) { o.write((new Date().toString() + System.getProperty("line.separator", "\n")).toString().getBytes()); }...
[ "private", "void", "recordBootAttempt", "(", "File", "home", ")", "{", "try", "(", "OutputStream", "o", "=", "Files", ".", "newOutputStream", "(", "BootFailure", ".", "getBootFailureFile", "(", "home", ")", ".", "toPath", "(", ")", ",", "StandardOpenOption", ...
To assist boot failure script, record the number of boot attempts. This file gets deleted in case of successful boot. @see BootFailure
[ "To", "assist", "boot", "failure", "script", "record", "the", "number", "of", "boot", "attempts", ".", "This", "file", "gets", "deleted", "in", "case", "of", "successful", "boot", "." ]
44c4d3989232082c254d27ae360aa810669f44b7
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/hudson/WebAppMain.java#L277-L283
125,674
jenkinsci/jenkins
core/src/main/java/hudson/WebAppMain.java
WebAppMain.installLogger
@edu.umd.cs.findbugs.annotations.SuppressFBWarnings("LG_LOST_LOGGER_DUE_TO_WEAK_REFERENCE") private void installLogger() { Jenkins.logRecords = handler.getView(); Logger.getLogger("").addHandler(handler); }
java
@edu.umd.cs.findbugs.annotations.SuppressFBWarnings("LG_LOST_LOGGER_DUE_TO_WEAK_REFERENCE") private void installLogger() { Jenkins.logRecords = handler.getView(); Logger.getLogger("").addHandler(handler); }
[ "@", "edu", ".", "umd", ".", "cs", ".", "findbugs", ".", "annotations", ".", "SuppressFBWarnings", "(", "\"LG_LOST_LOGGER_DUE_TO_WEAK_REFERENCE\"", ")", "private", "void", "installLogger", "(", ")", "{", "Jenkins", ".", "logRecords", "=", "handler", ".", "getVie...
Installs log handler to monitor all Hudson logs.
[ "Installs", "log", "handler", "to", "monitor", "all", "Hudson", "logs", "." ]
44c4d3989232082c254d27ae360aa810669f44b7
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/hudson/WebAppMain.java#L292-L296
125,675
jenkinsci/jenkins
core/src/main/java/hudson/WebAppMain.java
WebAppMain.getHomeDir
public FileAndDescription getHomeDir(ServletContextEvent event) { // check JNDI for the home directory first for (String name : HOME_NAMES) { try { InitialContext iniCtxt = new InitialContext(); Context env = (Context) iniCtxt.lookup("java:comp/env"); ...
java
public FileAndDescription getHomeDir(ServletContextEvent event) { // check JNDI for the home directory first for (String name : HOME_NAMES) { try { InitialContext iniCtxt = new InitialContext(); Context env = (Context) iniCtxt.lookup("java:comp/env"); ...
[ "public", "FileAndDescription", "getHomeDir", "(", "ServletContextEvent", "event", ")", "{", "// check JNDI for the home directory first", "for", "(", "String", "name", ":", "HOME_NAMES", ")", "{", "try", "{", "InitialContext", "iniCtxt", "=", "new", "InitialContext", ...
Determines the home directory for Jenkins. <p> We look for a setting that affects the smallest scope first, then bigger ones later. <p> People makes configuration mistakes, so we are trying to be nice with those by doing {@link String#trim()}. <p> @return the File alongside with some description to help the user tro...
[ "Determines", "the", "home", "directory", "for", "Jenkins", "." ]
44c4d3989232082c254d27ae360aa810669f44b7
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/hudson/WebAppMain.java#L321-L372
125,676
jenkinsci/jenkins
core/src/main/java/hudson/model/ParametersAction.java
ParametersAction.substitute
public String substitute(AbstractBuild<?,?> build, String text) { return Util.replaceMacro(text,createVariableResolver(build)); }
java
public String substitute(AbstractBuild<?,?> build, String text) { return Util.replaceMacro(text,createVariableResolver(build)); }
[ "public", "String", "substitute", "(", "AbstractBuild", "<", "?", ",", "?", ">", "build", ",", "String", "text", ")", "{", "return", "Util", ".", "replaceMacro", "(", "text", ",", "createVariableResolver", "(", "build", ")", ")", ";", "}" ]
Performs a variable substitution to the given text and return it.
[ "Performs", "a", "variable", "substitution", "to", "the", "given", "text", "and", "return", "it", "." ]
44c4d3989232082c254d27ae360aa810669f44b7
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/hudson/model/ParametersAction.java#L154-L156
125,677
jenkinsci/jenkins
core/src/main/java/hudson/model/ParametersAction.java
ParametersAction.shouldSchedule
public boolean shouldSchedule(List<Action> actions) { List<ParametersAction> others = Util.filter(actions, ParametersAction.class); if (others.isEmpty()) { return !parameters.isEmpty(); } else { // I don't think we need multiple ParametersActions, but let's be defensive ...
java
public boolean shouldSchedule(List<Action> actions) { List<ParametersAction> others = Util.filter(actions, ParametersAction.class); if (others.isEmpty()) { return !parameters.isEmpty(); } else { // I don't think we need multiple ParametersActions, but let's be defensive ...
[ "public", "boolean", "shouldSchedule", "(", "List", "<", "Action", ">", "actions", ")", "{", "List", "<", "ParametersAction", ">", "others", "=", "Util", ".", "filter", "(", "actions", ",", "ParametersAction", ".", "class", ")", ";", "if", "(", "others", ...
Allow an other build of the same project to be scheduled, if it has other parameters.
[ "Allow", "an", "other", "build", "of", "the", "same", "project", "to", "be", "scheduled", "if", "it", "has", "other", "parameters", "." ]
44c4d3989232082c254d27ae360aa810669f44b7
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/hudson/model/ParametersAction.java#L219-L231
125,678
jenkinsci/jenkins
core/src/main/java/hudson/FilePath.java
FilePath.isUnix
boolean isUnix() { // if the path represents a local path, there' no need to guess. if(!isRemote()) return File.pathSeparatorChar!=';'; // note that we can't use the usual File.pathSeparator and etc., as the OS of // the machine where this code runs and the OS th...
java
boolean isUnix() { // if the path represents a local path, there' no need to guess. if(!isRemote()) return File.pathSeparatorChar!=';'; // note that we can't use the usual File.pathSeparator and etc., as the OS of // the machine where this code runs and the OS th...
[ "boolean", "isUnix", "(", ")", "{", "// if the path represents a local path, there' no need to guess.", "if", "(", "!", "isRemote", "(", ")", ")", "return", "File", ".", "pathSeparatorChar", "!=", "'", "'", ";", "// note that we can't use the usual File.pathSeparator and et...
Checks if the remote path is Unix.
[ "Checks", "if", "the", "remote", "path", "is", "Unix", "." ]
44c4d3989232082c254d27ae360aa810669f44b7
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/hudson/FilePath.java#L377-L391
125,679
jenkinsci/jenkins
core/src/main/java/hudson/FilePath.java
FilePath.zip
public void zip(OutputStream os, FileFilter filter) throws IOException, InterruptedException { archive(ArchiverFactory.ZIP,os,filter); }
java
public void zip(OutputStream os, FileFilter filter) throws IOException, InterruptedException { archive(ArchiverFactory.ZIP,os,filter); }
[ "public", "void", "zip", "(", "OutputStream", "os", ",", "FileFilter", "filter", ")", "throws", "IOException", ",", "InterruptedException", "{", "archive", "(", "ArchiverFactory", ".", "ZIP", ",", "os", ",", "filter", ")", ";", "}" ]
Creates a zip file from this directory by using the specified filter, and sends the result to the given output stream. @param filter Must be serializable since it may be executed remotely. Can be null to add all files. @since 1.315
[ "Creates", "a", "zip", "file", "from", "this", "directory", "by", "using", "the", "specified", "filter", "and", "sends", "the", "result", "to", "the", "given", "output", "stream", "." ]
44c4d3989232082c254d27ae360aa810669f44b7
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/hudson/FilePath.java#L433-L435
125,680
jenkinsci/jenkins
core/src/main/java/hudson/FilePath.java
FilePath.zip
public int zip(OutputStream out, DirScanner scanner) throws IOException, InterruptedException { return archive(ArchiverFactory.ZIP, out, scanner); }
java
public int zip(OutputStream out, DirScanner scanner) throws IOException, InterruptedException { return archive(ArchiverFactory.ZIP, out, scanner); }
[ "public", "int", "zip", "(", "OutputStream", "out", ",", "DirScanner", "scanner", ")", "throws", "IOException", ",", "InterruptedException", "{", "return", "archive", "(", "ArchiverFactory", ".", "ZIP", ",", "out", ",", "scanner", ")", ";", "}" ]
Uses the given scanner on 'this' directory to list up files and then archive it to a zip stream.
[ "Uses", "the", "given", "scanner", "on", "this", "directory", "to", "list", "up", "files", "and", "then", "archive", "it", "to", "a", "zip", "stream", "." ]
44c4d3989232082c254d27ae360aa810669f44b7
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/hudson/FilePath.java#L469-L471
125,681
jenkinsci/jenkins
core/src/main/java/hudson/FilePath.java
FilePath.unzipFrom
public void unzipFrom(InputStream _in) throws IOException, InterruptedException { final InputStream in = new RemoteInputStream(_in, Flag.GREEDY); act(new UnzipFrom(in)); }
java
public void unzipFrom(InputStream _in) throws IOException, InterruptedException { final InputStream in = new RemoteInputStream(_in, Flag.GREEDY); act(new UnzipFrom(in)); }
[ "public", "void", "unzipFrom", "(", "InputStream", "_in", ")", "throws", "IOException", ",", "InterruptedException", "{", "final", "InputStream", "in", "=", "new", "RemoteInputStream", "(", "_in", ",", "Flag", ".", "GREEDY", ")", ";", "act", "(", "new", "Unz...
Reads the given InputStream as a zip file and extracts it into this directory. @param _in The stream will be closed by this method after it's fully read. @since 1.283 @see #unzip(FilePath)
[ "Reads", "the", "given", "InputStream", "as", "a", "zip", "file", "and", "extracts", "it", "into", "this", "directory", "." ]
44c4d3989232082c254d27ae360aa810669f44b7
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/hudson/FilePath.java#L609-L612
125,682
jenkinsci/jenkins
core/src/main/java/hudson/FilePath.java
FilePath.symlinkTo
public void symlinkTo(final String target, final TaskListener listener) throws IOException, InterruptedException { act(new SymlinkTo(target, listener)); }
java
public void symlinkTo(final String target, final TaskListener listener) throws IOException, InterruptedException { act(new SymlinkTo(target, listener)); }
[ "public", "void", "symlinkTo", "(", "final", "String", "target", ",", "final", "TaskListener", "listener", ")", "throws", "IOException", ",", "InterruptedException", "{", "act", "(", "new", "SymlinkTo", "(", "target", ",", "listener", ")", ")", ";", "}" ]
Creates a symlink to the specified target. @param target The file that the symlink should point to. @param listener If symlink creation requires a help of an external process, the error will be reported here. @since 1.456
[ "Creates", "a", "symlink", "to", "the", "specified", "target", "." ]
44c4d3989232082c254d27ae360aa810669f44b7
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/hudson/FilePath.java#L699-L701
125,683
jenkinsci/jenkins
core/src/main/java/hudson/FilePath.java
FilePath.untarFrom
public void untarFrom(InputStream _in, final TarCompression compression) throws IOException, InterruptedException { try { final InputStream in = new RemoteInputStream(_in, Flag.GREEDY); act(new UntarFrom(compression, in)); } finally { _in.close(); } }
java
public void untarFrom(InputStream _in, final TarCompression compression) throws IOException, InterruptedException { try { final InputStream in = new RemoteInputStream(_in, Flag.GREEDY); act(new UntarFrom(compression, in)); } finally { _in.close(); } }
[ "public", "void", "untarFrom", "(", "InputStream", "_in", ",", "final", "TarCompression", "compression", ")", "throws", "IOException", ",", "InterruptedException", "{", "try", "{", "final", "InputStream", "in", "=", "new", "RemoteInputStream", "(", "_in", ",", "...
Reads the given InputStream as a tar file and extracts it into this directory. @param _in The stream will be closed by this method after it's fully read. @param compression The compression method in use. @since 1.292
[ "Reads", "the", "given", "InputStream", "as", "a", "tar", "file", "and", "extracts", "it", "into", "this", "directory", "." ]
44c4d3989232082c254d27ae360aa810669f44b7
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/hudson/FilePath.java#L794-L801
125,684
jenkinsci/jenkins
core/src/main/java/hudson/FilePath.java
FilePath.getBaseName
public String getBaseName() { String n = getName(); int idx = n.lastIndexOf('.'); if (idx<0) return n; return n.substring(0,idx); }
java
public String getBaseName() { String n = getName(); int idx = n.lastIndexOf('.'); if (idx<0) return n; return n.substring(0,idx); }
[ "public", "String", "getBaseName", "(", ")", "{", "String", "n", "=", "getName", "(", ")", ";", "int", "idx", "=", "n", ".", "lastIndexOf", "(", "'", "'", ")", ";", "if", "(", "idx", "<", "0", ")", "return", "n", ";", "return", "n", ".", "subst...
Gets the file name portion except the extension. For example, "foo" for "foo.txt" and "foo.tar" for "foo.tar.gz".
[ "Gets", "the", "file", "name", "portion", "except", "the", "extension", "." ]
44c4d3989232082c254d27ae360aa810669f44b7
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/hudson/FilePath.java#L1296-L1301
125,685
jenkinsci/jenkins
core/src/main/java/hudson/FilePath.java
FilePath.getName
public String getName() { String r = remote; if(r.endsWith("\\") || r.endsWith("/")) r = r.substring(0,r.length()-1); int len = r.length()-1; while(len>=0) { char ch = r.charAt(len); if(ch=='\\' || ch=='/') break; len--; ...
java
public String getName() { String r = remote; if(r.endsWith("\\") || r.endsWith("/")) r = r.substring(0,r.length()-1); int len = r.length()-1; while(len>=0) { char ch = r.charAt(len); if(ch=='\\' || ch=='/') break; len--; ...
[ "public", "String", "getName", "(", ")", "{", "String", "r", "=", "remote", ";", "if", "(", "r", ".", "endsWith", "(", "\"\\\\\"", ")", "||", "r", ".", "endsWith", "(", "\"/\"", ")", ")", "r", "=", "r", ".", "substring", "(", "0", ",", "r", "."...
Gets just the file name portion without directories. For example, "foo.txt" for "../abc/foo.txt"
[ "Gets", "just", "the", "file", "name", "portion", "without", "directories", "." ]
44c4d3989232082c254d27ae360aa810669f44b7
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/hudson/FilePath.java#L1307-L1321
125,686
jenkinsci/jenkins
core/src/main/java/hudson/FilePath.java
FilePath.getParent
public FilePath getParent() { int i = remote.length() - 2; for (; i >= 0; i--) { char ch = remote.charAt(i); if(ch=='\\' || ch=='/') break; } return i >= 0 ? new FilePath( channel, remote.substring(0,i+1) ) : null; }
java
public FilePath getParent() { int i = remote.length() - 2; for (; i >= 0; i--) { char ch = remote.charAt(i); if(ch=='\\' || ch=='/') break; } return i >= 0 ? new FilePath( channel, remote.substring(0,i+1) ) : null; }
[ "public", "FilePath", "getParent", "(", ")", "{", "int", "i", "=", "remote", ".", "length", "(", ")", "-", "2", ";", "for", "(", ";", "i", ">=", "0", ";", "i", "--", ")", "{", "char", "ch", "=", "remote", ".", "charAt", "(", "i", ")", ";", ...
Gets the parent file. @return parent FilePath or null if there is no parent
[ "Gets", "the", "parent", "file", "." ]
44c4d3989232082c254d27ae360aa810669f44b7
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/hudson/FilePath.java#L1350-L1359
125,687
jenkinsci/jenkins
core/src/main/java/hudson/FilePath.java
FilePath.createTempDir
public FilePath createTempDir(final String prefix, final String suffix) throws IOException, InterruptedException { try { String[] s; if (StringUtils.isBlank(suffix)) { s = new String[]{prefix, "tmp"}; // see File.createTempFile - tmp is used if suffix is null ...
java
public FilePath createTempDir(final String prefix, final String suffix) throws IOException, InterruptedException { try { String[] s; if (StringUtils.isBlank(suffix)) { s = new String[]{prefix, "tmp"}; // see File.createTempFile - tmp is used if suffix is null ...
[ "public", "FilePath", "createTempDir", "(", "final", "String", "prefix", ",", "final", "String", "suffix", ")", "throws", "IOException", ",", "InterruptedException", "{", "try", "{", "String", "[", "]", "s", ";", "if", "(", "StringUtils", ".", "isBlank", "("...
Creates a temporary directory inside the directory represented by 'this' @param prefix The prefix string to be used in generating the directory's name; must be at least three characters long @param suffix The suffix string to be used in generating the directory's name; may be null, in which case the suffix ".tmp" will...
[ "Creates", "a", "temporary", "directory", "inside", "the", "directory", "represented", "by", "this" ]
44c4d3989232082c254d27ae360aa810669f44b7
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/hudson/FilePath.java#L1493-L1506
125,688
jenkinsci/jenkins
core/src/main/java/hudson/FilePath.java
FilePath._chmod
private static void _chmod(File f, int mask) throws IOException { // TODO WindowsPosix actually does something here (WindowsLibC._wchmod); should we let it? // Anyway the existing calls already skip this method if on Windows. if (File.pathSeparatorChar==';') return; // noop if (Util.NA...
java
private static void _chmod(File f, int mask) throws IOException { // TODO WindowsPosix actually does something here (WindowsLibC._wchmod); should we let it? // Anyway the existing calls already skip this method if on Windows. if (File.pathSeparatorChar==';') return; // noop if (Util.NA...
[ "private", "static", "void", "_chmod", "(", "File", "f", ",", "int", "mask", ")", "throws", "IOException", "{", "// TODO WindowsPosix actually does something here (WindowsLibC._wchmod); should we let it?", "// Anyway the existing calls already skip this method if on Windows.", "if", ...
Change permissions via NIO.
[ "Change", "permissions", "via", "NIO", "." ]
44c4d3989232082c254d27ae360aa810669f44b7
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/hudson/FilePath.java#L1752-L1762
125,689
jenkinsci/jenkins
core/src/main/java/hudson/model/Job.java
Job.updateNextBuildNumber
public synchronized void updateNextBuildNumber(int next) throws IOException { RunT lb = getLastBuild(); if (lb!=null ? next>lb.getNumber() : next>0) { this.nextBuildNumber = next; saveNextBuildNumber(); } }
java
public synchronized void updateNextBuildNumber(int next) throws IOException { RunT lb = getLastBuild(); if (lb!=null ? next>lb.getNumber() : next>0) { this.nextBuildNumber = next; saveNextBuildNumber(); } }
[ "public", "synchronized", "void", "updateNextBuildNumber", "(", "int", "next", ")", "throws", "IOException", "{", "RunT", "lb", "=", "getLastBuild", "(", ")", ";", "if", "(", "lb", "!=", "null", "?", "next", ">", "lb", ".", "getNumber", "(", ")", ":", ...
Programatically updates the next build number. <p> Much of Hudson assumes that the build number is unique and monotonic, so this method can only accept a new value that's bigger than {@link #getLastBuild()} returns. Otherwise it'll be no-op. @since 1.199 (before that, this method was package private.)
[ "Programatically", "updates", "the", "next", "build", "number", "." ]
44c4d3989232082c254d27ae360aa810669f44b7
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/hudson/model/Job.java#L412-L418
125,690
jenkinsci/jenkins
core/src/main/java/hudson/model/Job.java
Job.logRotate
public void logRotate() throws IOException, InterruptedException { BuildDiscarder bd = getBuildDiscarder(); if (bd != null) bd.perform(this); }
java
public void logRotate() throws IOException, InterruptedException { BuildDiscarder bd = getBuildDiscarder(); if (bd != null) bd.perform(this); }
[ "public", "void", "logRotate", "(", ")", "throws", "IOException", ",", "InterruptedException", "{", "BuildDiscarder", "bd", "=", "getBuildDiscarder", "(", ")", ";", "if", "(", "bd", "!=", "null", ")", "bd", ".", "perform", "(", "this", ")", ";", "}" ]
Perform log rotation.
[ "Perform", "log", "rotation", "." ]
44c4d3989232082c254d27ae360aa810669f44b7
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/hudson/model/Job.java#L463-L467
125,691
jenkinsci/jenkins
core/src/main/java/hudson/model/Job.java
Job.removeProperty
public <T extends JobProperty> T removeProperty(Class<T> clazz) throws IOException { for (JobProperty<? super JobT> p : properties) { if (clazz.isInstance(p)) { removeProperty(p); return clazz.cast(p); } } return null; }
java
public <T extends JobProperty> T removeProperty(Class<T> clazz) throws IOException { for (JobProperty<? super JobT> p : properties) { if (clazz.isInstance(p)) { removeProperty(p); return clazz.cast(p); } } return null; }
[ "public", "<", "T", "extends", "JobProperty", ">", "T", "removeProperty", "(", "Class", "<", "T", ">", "clazz", ")", "throws", "IOException", "{", "for", "(", "JobProperty", "<", "?", "super", "JobT", ">", "p", ":", "properties", ")", "{", "if", "(", ...
Removes the property of the given type. @return The property that was just removed. @since 1.279
[ "Removes", "the", "property", "of", "the", "given", "type", "." ]
44c4d3989232082c254d27ae360aa810669f44b7
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/hudson/model/Job.java#L531-L539
125,692
jenkinsci/jenkins
core/src/main/java/hudson/model/Job.java
Job.getProperties
@SuppressWarnings({"unchecked", "rawtypes"}) public Map<JobPropertyDescriptor, JobProperty<? super JobT>> getProperties() { Map result = Descriptor.toMap((Iterable) properties); if (logRotator != null) { result.put(Jenkins.getActiveInstance().getDescriptorByType(BuildDiscarderProperty.De...
java
@SuppressWarnings({"unchecked", "rawtypes"}) public Map<JobPropertyDescriptor, JobProperty<? super JobT>> getProperties() { Map result = Descriptor.toMap((Iterable) properties); if (logRotator != null) { result.put(Jenkins.getActiveInstance().getDescriptorByType(BuildDiscarderProperty.De...
[ "@", "SuppressWarnings", "(", "{", "\"unchecked\"", ",", "\"rawtypes\"", "}", ")", "public", "Map", "<", "JobPropertyDescriptor", ",", "JobProperty", "<", "?", "super", "JobT", ">", ">", "getProperties", "(", ")", "{", "Map", "result", "=", "Descriptor", "."...
Gets all the job properties configured for this job.
[ "Gets", "all", "the", "job", "properties", "configured", "for", "this", "job", "." ]
44c4d3989232082c254d27ae360aa810669f44b7
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/hudson/model/Job.java#L544-L551
125,693
jenkinsci/jenkins
core/src/main/java/hudson/model/Job.java
Job.getProperty
public <T extends JobProperty> T getProperty(Class<T> clazz) { if (clazz == BuildDiscarderProperty.class && logRotator != null) { return clazz.cast(new BuildDiscarderProperty(logRotator)); } return _getProperty(clazz); }
java
public <T extends JobProperty> T getProperty(Class<T> clazz) { if (clazz == BuildDiscarderProperty.class && logRotator != null) { return clazz.cast(new BuildDiscarderProperty(logRotator)); } return _getProperty(clazz); }
[ "public", "<", "T", "extends", "JobProperty", ">", "T", "getProperty", "(", "Class", "<", "T", ">", "clazz", ")", "{", "if", "(", "clazz", "==", "BuildDiscarderProperty", ".", "class", "&&", "logRotator", "!=", "null", ")", "{", "return", "clazz", ".", ...
Gets the specific property, or null if the property is not configured for this job.
[ "Gets", "the", "specific", "property", "or", "null", "if", "the", "property", "is", "not", "configured", "for", "this", "job", "." ]
44c4d3989232082c254d27ae360aa810669f44b7
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/hudson/model/Job.java#L566-L571
125,694
jenkinsci/jenkins
core/src/main/java/hudson/model/Job.java
Job.getOverrides
public Collection<?> getOverrides() { List<Object> r = new ArrayList<>(); for (JobProperty<? super JobT> p : properties) r.addAll(p.getJobOverrides()); return r; }
java
public Collection<?> getOverrides() { List<Object> r = new ArrayList<>(); for (JobProperty<? super JobT> p : properties) r.addAll(p.getJobOverrides()); return r; }
[ "public", "Collection", "<", "?", ">", "getOverrides", "(", ")", "{", "List", "<", "Object", ">", "r", "=", "new", "ArrayList", "<>", "(", ")", ";", "for", "(", "JobProperty", "<", "?", "super", "JobT", ">", "p", ":", "properties", ")", "r", ".", ...
Overrides from job properties. @see JobProperty#getJobOverrides
[ "Overrides", "from", "job", "properties", "." ]
44c4d3989232082c254d27ae360aa810669f44b7
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/hudson/model/Job.java#L597-L602
125,695
jenkinsci/jenkins
core/src/main/java/hudson/model/Job.java
Job.renameTo
@Override public void renameTo(String newName) throws IOException { File oldBuildDir = getBuildDir(); super.renameTo(newName); File newBuildDir = getBuildDir(); if (oldBuildDir.isDirectory() && !newBuildDir.isDirectory()) { if (!newBuildDir.getParentFile().isDirectory()) ...
java
@Override public void renameTo(String newName) throws IOException { File oldBuildDir = getBuildDir(); super.renameTo(newName); File newBuildDir = getBuildDir(); if (oldBuildDir.isDirectory() && !newBuildDir.isDirectory()) { if (!newBuildDir.getParentFile().isDirectory()) ...
[ "@", "Override", "public", "void", "renameTo", "(", "String", "newName", ")", "throws", "IOException", "{", "File", "oldBuildDir", "=", "getBuildDir", "(", ")", ";", "super", ".", "renameTo", "(", "newName", ")", ";", "File", "newBuildDir", "=", "getBuildDir...
Renames a job.
[ "Renames", "a", "job", "." ]
44c4d3989232082c254d27ae360aa810669f44b7
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/hudson/model/Job.java#L648-L661
125,696
jenkinsci/jenkins
core/src/main/java/hudson/model/Job.java
Job.getBuilds
@Exported(name="allBuilds",visibility=-2) @WithBridgeMethods(List.class) public RunList<RunT> getBuilds() { return RunList.<RunT>fromRuns(_getRuns().values()); }
java
@Exported(name="allBuilds",visibility=-2) @WithBridgeMethods(List.class) public RunList<RunT> getBuilds() { return RunList.<RunT>fromRuns(_getRuns().values()); }
[ "@", "Exported", "(", "name", "=", "\"allBuilds\"", ",", "visibility", "=", "-", "2", ")", "@", "WithBridgeMethods", "(", "List", ".", "class", ")", "public", "RunList", "<", "RunT", ">", "getBuilds", "(", ")", "{", "return", "RunList", ".", "<", "RunT...
Gets the read-only view of all the builds. @return never null. The first entry is the latest build.
[ "Gets", "the", "read", "-", "only", "view", "of", "all", "the", "builds", "." ]
44c4d3989232082c254d27ae360aa810669f44b7
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/hudson/model/Job.java#L724-L728
125,697
jenkinsci/jenkins
core/src/main/java/hudson/model/Job.java
Job.getBuild
public RunT getBuild(String id) { for (RunT r : _getRuns().values()) { if (r.getId().equals(id)) return r; } return null; }
java
public RunT getBuild(String id) { for (RunT r : _getRuns().values()) { if (r.getId().equals(id)) return r; } return null; }
[ "public", "RunT", "getBuild", "(", "String", "id", ")", "{", "for", "(", "RunT", "r", ":", "_getRuns", "(", ")", ".", "values", "(", ")", ")", "{", "if", "(", "r", ".", "getId", "(", ")", ".", "equals", "(", "id", ")", ")", "return", "r", ";"...
Looks up a build by its ID. @see LazyBuildMixIn#getBuild
[ "Looks", "up", "a", "build", "by", "its", "ID", "." ]
44c4d3989232082c254d27ae360aa810669f44b7
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/hudson/model/Job.java#L766-L772
125,698
jenkinsci/jenkins
core/src/main/java/hudson/model/Job.java
Job.getBuildsByTimestamp
@WithBridgeMethods(List.class) @Deprecated public RunList<RunT> getBuildsByTimestamp(long start, long end) { return getBuilds().byTimestamp(start,end); }
java
@WithBridgeMethods(List.class) @Deprecated public RunList<RunT> getBuildsByTimestamp(long start, long end) { return getBuilds().byTimestamp(start,end); }
[ "@", "WithBridgeMethods", "(", "List", ".", "class", ")", "@", "Deprecated", "public", "RunList", "<", "RunT", ">", "getBuildsByTimestamp", "(", "long", "start", ",", "long", "end", ")", "{", "return", "getBuilds", "(", ")", ".", "byTimestamp", "(", "start...
Obtains a list of builds, in the descending order, that are within the specified time range [start,end). @return can be empty but never null. @deprecated as of 1.372. Should just do {@code getBuilds().byTimestamp(s,e)} to avoid code bloat in {@link Job}.
[ "Obtains", "a", "list", "of", "builds", "in", "the", "descending", "order", "that", "are", "within", "the", "specified", "time", "range", "[", "start", "end", ")", "." ]
44c4d3989232082c254d27ae360aa810669f44b7
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/hudson/model/Job.java#L792-L796
125,699
jenkinsci/jenkins
core/src/main/java/hudson/model/Job.java
Job.getLastCompletedBuild
@Exported @QuickSilver public RunT getLastCompletedBuild() { RunT r = getLastBuild(); while (r != null && r.isBuilding()) r = r.getPreviousBuild(); return r; }
java
@Exported @QuickSilver public RunT getLastCompletedBuild() { RunT r = getLastBuild(); while (r != null && r.isBuilding()) r = r.getPreviousBuild(); return r; }
[ "@", "Exported", "@", "QuickSilver", "public", "RunT", "getLastCompletedBuild", "(", ")", "{", "RunT", "r", "=", "getLastBuild", "(", ")", ";", "while", "(", "r", "!=", "null", "&&", "r", ".", "isBuilding", "(", ")", ")", "r", "=", "r", ".", "getPrev...
Returns the last completed build, if any. Otherwise null.
[ "Returns", "the", "last", "completed", "build", "if", "any", ".", "Otherwise", "null", "." ]
44c4d3989232082c254d27ae360aa810669f44b7
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/hudson/model/Job.java#L983-L990