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
129,500
zaproxy/zaproxy
src/org/parosproxy/paros/extension/ExtensionLoader.java
ExtensionLoader.initAllExtension
private void initAllExtension(double progressFactor) { double factorPerc = progressFactor / getExtensionCount(); for (int i = 0; i < getExtensionCount(); i++) { Extension extension = getExtension(i); try { extension.init(); ...
java
private void initAllExtension(double progressFactor) { double factorPerc = progressFactor / getExtensionCount(); for (int i = 0; i < getExtensionCount(); i++) { Extension extension = getExtension(i); try { extension.init(); ...
[ "private", "void", "initAllExtension", "(", "double", "progressFactor", ")", "{", "double", "factorPerc", "=", "progressFactor", "/", "getExtensionCount", "(", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "getExtensionCount", "(", ")", ";", "...
Init all extensions
[ "Init", "all", "extensions" ]
0cbe5121f2ae1ecca222513d182759210c569bec
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/parosproxy/paros/extension/ExtensionLoader.java#L1288-L1304
129,501
zaproxy/zaproxy
src/org/parosproxy/paros/extension/ExtensionLoader.java
ExtensionLoader.initModelAllExtension
private void initModelAllExtension(Model model, double progressFactor) { double factorPerc = progressFactor / getExtensionCount(); for (int i = 0; i < getExtensionCount(); i++) { Extension extension = getExtension(i); try { extension.initModel(model...
java
private void initModelAllExtension(Model model, double progressFactor) { double factorPerc = progressFactor / getExtensionCount(); for (int i = 0; i < getExtensionCount(); i++) { Extension extension = getExtension(i); try { extension.initModel(model...
[ "private", "void", "initModelAllExtension", "(", "Model", "model", ",", "double", "progressFactor", ")", "{", "double", "factorPerc", "=", "progressFactor", "/", "getExtensionCount", "(", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "getExtensi...
Init all extensions with the same Model @param model the model to apply to all extensions
[ "Init", "all", "extensions", "with", "the", "same", "Model" ]
0cbe5121f2ae1ecca222513d182759210c569bec
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/parosproxy/paros/extension/ExtensionLoader.java#L1310-L1325
129,502
zaproxy/zaproxy
src/org/parosproxy/paros/extension/ExtensionLoader.java
ExtensionLoader.initViewAllExtension
private void initViewAllExtension(final View view, double progressFactor) { if (view == null) { return; } final double factorPerc = progressFactor / getExtensionCount(); for (int i = 0; i < getExtensionCount(); i++) { final Extension extension = ...
java
private void initViewAllExtension(final View view, double progressFactor) { if (view == null) { return; } final double factorPerc = progressFactor / getExtensionCount(); for (int i = 0; i < getExtensionCount(); i++) { final Extension extension = ...
[ "private", "void", "initViewAllExtension", "(", "final", "View", "view", ",", "double", "progressFactor", ")", "{", "if", "(", "view", "==", "null", ")", "{", "return", ";", "}", "final", "double", "factorPerc", "=", "progressFactor", "/", "getExtensionCount",...
Init all extensions with the same View @param view the View that need to be applied
[ "Init", "all", "extensions", "with", "the", "same", "View" ]
0cbe5121f2ae1ecca222513d182759210c569bec
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/parosproxy/paros/extension/ExtensionLoader.java#L1331-L1354
129,503
zaproxy/zaproxy
src/org/parosproxy/paros/extension/ExtensionLoader.java
ExtensionLoader.getUnsavedResources
public List<String> getUnsavedResources() { List<String> list = new ArrayList<>(); List<String> l; for (int i = 0; i < getExtensionCount(); i++) { l = getExtension(i).getUnsavedResources(); if (l != null) { list.addAll(l); } }...
java
public List<String> getUnsavedResources() { List<String> list = new ArrayList<>(); List<String> l; for (int i = 0; i < getExtensionCount(); i++) { l = getExtension(i).getUnsavedResources(); if (l != null) { list.addAll(l); } }...
[ "public", "List", "<", "String", ">", "getUnsavedResources", "(", ")", "{", "List", "<", "String", ">", "list", "=", "new", "ArrayList", "<>", "(", ")", ";", "List", "<", "String", ">", "l", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", ...
Gets the names of all unsaved resources of all the extensions. @return a {@code List} containing all the unsaved resources of all add-ons, never {@code null} @see Extension#getActiveActions()
[ "Gets", "the", "names", "of", "all", "unsaved", "resources", "of", "all", "the", "extensions", "." ]
0cbe5121f2ae1ecca222513d182759210c569bec
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/parosproxy/paros/extension/ExtensionLoader.java#L1457-L1469
129,504
zaproxy/zaproxy
src/org/zaproxy/zap/extension/script/ExtensionScript.java
ExtensionScript.addScriptsFromDir
private int addScriptsFromDir(File dir, ScriptType type, String targetEngineName) { int addedScripts = 0; File typeDir = new File(dir, type.getName()); if (typeDir.exists()) { for (File f : typeDir.listFiles()) { String ext = f.getName().substring(f.getName().lastIndexOf(".") + 1); String engineN...
java
private int addScriptsFromDir(File dir, ScriptType type, String targetEngineName) { int addedScripts = 0; File typeDir = new File(dir, type.getName()); if (typeDir.exists()) { for (File f : typeDir.listFiles()) { String ext = f.getName().substring(f.getName().lastIndexOf(".") + 1); String engineN...
[ "private", "int", "addScriptsFromDir", "(", "File", "dir", ",", "ScriptType", "type", ",", "String", "targetEngineName", ")", "{", "int", "addedScripts", "=", "0", ";", "File", "typeDir", "=", "new", "File", "(", "dir", ",", "type", ".", "getName", "(", ...
Adds the scripts from the given directory of the given script type and, optionally, for the engine with the given name. @param dir the directory from where to add the scripts. @param type the script type, must not be {@code null}. @param targetEngineName the engine that the scripts must be of, {@code null} for all eng...
[ "Adds", "the", "scripts", "from", "the", "given", "directory", "of", "the", "given", "script", "type", "and", "optionally", "for", "the", "engine", "with", "the", "given", "name", "." ]
0cbe5121f2ae1ecca222513d182759210c569bec
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/extension/script/ExtensionScript.java#L883-L919
129,505
zaproxy/zaproxy
src/org/zaproxy/zap/extension/script/ExtensionScript.java
ExtensionScript.isSavedInDir
private static boolean isSavedInDir(ScriptWrapper scriptWrapper, File directory) { File file = scriptWrapper.getFile(); if (file == null) { return false; } return file.getParentFile().equals(directory); }
java
private static boolean isSavedInDir(ScriptWrapper scriptWrapper, File directory) { File file = scriptWrapper.getFile(); if (file == null) { return false; } return file.getParentFile().equals(directory); }
[ "private", "static", "boolean", "isSavedInDir", "(", "ScriptWrapper", "scriptWrapper", ",", "File", "directory", ")", "{", "File", "file", "=", "scriptWrapper", ".", "getFile", "(", ")", ";", "if", "(", "file", "==", "null", ")", "{", "return", "false", ";...
Tells whether or not the given script is saved in the given directory. @param scriptWrapper the script to check. @param directory the directory where to check. @return {@code true} if the script is saved in the given directory, {@code false} otherwise.
[ "Tells", "whether", "or", "not", "the", "given", "script", "is", "saved", "in", "the", "given", "directory", "." ]
0cbe5121f2ae1ecca222513d182759210c569bec
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/extension/script/ExtensionScript.java#L968-L974
129,506
zaproxy/zaproxy
src/org/zaproxy/zap/extension/script/ExtensionScript.java
ExtensionScript.getScriptCount
public int getScriptCount(File dir) { int scripts = 0; for (ScriptType type : this.getScriptTypes()) { File locDir = new File(dir, type.getName()); if (locDir.exists()) { for (File f : locDir.listFiles()) { String ext = f.getName().substring(f.getName().lastIndexOf(".") + 1); String e...
java
public int getScriptCount(File dir) { int scripts = 0; for (ScriptType type : this.getScriptTypes()) { File locDir = new File(dir, type.getName()); if (locDir.exists()) { for (File f : locDir.listFiles()) { String ext = f.getName().substring(f.getName().lastIndexOf(".") + 1); String e...
[ "public", "int", "getScriptCount", "(", "File", "dir", ")", "{", "int", "scripts", "=", "0", ";", "for", "(", "ScriptType", "type", ":", "this", ".", "getScriptTypes", "(", ")", ")", "{", "File", "locDir", "=", "new", "File", "(", "dir", ",", "type",...
Gets the numbers of scripts for the given directory for the currently registered script engines and types. @param dir the directory to check. @return the number of scripts. @since 2.4.1
[ "Gets", "the", "numbers", "of", "scripts", "for", "the", "given", "directory", "for", "the", "currently", "registered", "script", "engines", "and", "types", "." ]
0cbe5121f2ae1ecca222513d182759210c569bec
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/extension/script/ExtensionScript.java#L983-L999
129,507
zaproxy/zaproxy
src/org/zaproxy/zap/extension/script/ExtensionScript.java
ExtensionScript.loadScript
public ScriptWrapper loadScript(ScriptWrapper script, Charset charset) throws IOException { if (script == null) { throw new IllegalArgumentException("Parameter script must not be null."); } if (charset == null) { throw new IllegalArgumentException("Parameter charset must not be null."); } script....
java
public ScriptWrapper loadScript(ScriptWrapper script, Charset charset) throws IOException { if (script == null) { throw new IllegalArgumentException("Parameter script must not be null."); } if (charset == null) { throw new IllegalArgumentException("Parameter charset must not be null."); } script....
[ "public", "ScriptWrapper", "loadScript", "(", "ScriptWrapper", "script", ",", "Charset", "charset", ")", "throws", "IOException", "{", "if", "(", "script", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Parameter script must not be null.\"...
Loads the script from the file, using the given charset. @param script the ScriptWrapper to be loaded (read script from file). @param charset the charset to use when reading the script from the file. @return the {@code ScriptWrapper} with the actual script read from the file. @throws IOException if an error occurred w...
[ "Loads", "the", "script", "from", "the", "file", "using", "the", "given", "charset", "." ]
0cbe5121f2ae1ecca222513d182759210c569bec
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/extension/script/ExtensionScript.java#L1155-L1170
129,508
zaproxy/zaproxy
src/org/zaproxy/zap/control/AddOnClassnames.java
AddOnClassnames.isAllowed
public boolean isAllowed(String classname) { Objects.requireNonNull(classname); if (!restrictedClassnames.isEmpty()) { for (String restrictedClassname : restrictedClassnames) { if (classname.startsWith(restrictedClassname)) { return false; ...
java
public boolean isAllowed(String classname) { Objects.requireNonNull(classname); if (!restrictedClassnames.isEmpty()) { for (String restrictedClassname : restrictedClassnames) { if (classname.startsWith(restrictedClassname)) { return false; ...
[ "public", "boolean", "isAllowed", "(", "String", "classname", ")", "{", "Objects", ".", "requireNonNull", "(", "classname", ")", ";", "if", "(", "!", "restrictedClassnames", ".", "isEmpty", "(", ")", ")", "{", "for", "(", "String", "restrictedClassname", ":"...
Tells whether or not the given classname is allowed, thus can be loaded. @param classname the classname to check. @return {@code true} if the given classname is allowed, {@code false} otherwise. @throws NullPointerException if the {@code classname} is {@code null}.
[ "Tells", "whether", "or", "not", "the", "given", "classname", "is", "allowed", "thus", "can", "be", "loaded", "." ]
0cbe5121f2ae1ecca222513d182759210c569bec
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/control/AddOnClassnames.java#L69-L88
129,509
zaproxy/zaproxy
src/org/parosproxy/paros/core/scanner/VariantURLPath.java
VariantURLPath.getEscapedValue
private String getEscapedValue(String value) { if (value != null) { try { return URLEncoder.encode(value, "UTF-8"); } catch ( UnsupportedEncodingException ex) { } } return ""; }
java
private String getEscapedValue(String value) { if (value != null) { try { return URLEncoder.encode(value, "UTF-8"); } catch ( UnsupportedEncodingException ex) { } } return ""; }
[ "private", "String", "getEscapedValue", "(", "String", "value", ")", "{", "if", "(", "value", "!=", "null", ")", "{", "try", "{", "return", "URLEncoder", ".", "encode", "(", "value", ",", "\"UTF-8\"", ")", ";", "}", "catch", "(", "UnsupportedEncodingExcept...
Encode the parameter value for a correct URL introduction @param value the value that need to be encoded @return the Encoded value
[ "Encode", "the", "parameter", "value", "for", "a", "correct", "URL", "introduction" ]
0cbe5121f2ae1ecca222513d182759210c569bec
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/parosproxy/paros/core/scanner/VariantURLPath.java#L116-L125
129,510
zaproxy/zaproxy
src/org/parosproxy/paros/extension/report/ReportGenerator.java
ReportGenerator.entityEncode
public static String entityEncode(String text) { String result = text; if (result == null) { return result; } // The escapeXml function doesn't cope with some 'special' chrs return StringEscapeUtils.escapeXml10(XMLStringUtil.escapeControlChrs(result)); }
java
public static String entityEncode(String text) { String result = text; if (result == null) { return result; } // The escapeXml function doesn't cope with some 'special' chrs return StringEscapeUtils.escapeXml10(XMLStringUtil.escapeControlChrs(result)); }
[ "public", "static", "String", "entityEncode", "(", "String", "text", ")", "{", "String", "result", "=", "text", ";", "if", "(", "result", "==", "null", ")", "{", "return", "result", ";", "}", "// The escapeXml function doesn't cope with some 'special' chrs\r", "re...
Encode entity for HTML or XML output.
[ "Encode", "entity", "for", "HTML", "or", "XML", "output", "." ]
0cbe5121f2ae1ecca222513d182759210c569bec
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/parosproxy/paros/extension/report/ReportGenerator.java#L323-L333
129,511
zaproxy/zaproxy
src/org/parosproxy/paros/core/scanner/PluginFactory.java
PluginFactory.init
static void init(boolean includeAddOns) { loadedPlugins = new ArrayList<>(CoreFunctionality.getBuiltInActiveScanRules()); if (includeAddOns) { loadedPlugins.addAll(ExtensionFactory.getAddOnLoader().getActiveScanRules()); } //sort by the criteria below. Collectio...
java
static void init(boolean includeAddOns) { loadedPlugins = new ArrayList<>(CoreFunctionality.getBuiltInActiveScanRules()); if (includeAddOns) { loadedPlugins.addAll(ExtensionFactory.getAddOnLoader().getActiveScanRules()); } //sort by the criteria below. Collectio...
[ "static", "void", "init", "(", "boolean", "includeAddOns", ")", "{", "loadedPlugins", "=", "new", "ArrayList", "<>", "(", "CoreFunctionality", ".", "getBuiltInActiveScanRules", "(", ")", ")", ";", "if", "(", "includeAddOns", ")", "{", "loadedPlugins", ".", "ad...
Helper method to ease tests.
[ "Helper", "method", "to", "ease", "tests", "." ]
0cbe5121f2ae1ecca222513d182759210c569bec
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/parosproxy/paros/core/scanner/PluginFactory.java#L105-L118
129,512
zaproxy/zaproxy
src/org/parosproxy/paros/core/scanner/PluginFactory.java
PluginFactory.probeNextPlugin
private Plugin probeNextPlugin() { Plugin plugin = null; int i = 0; while (i < listPending.size()) { // ZAP: Removed unnecessary cast. plugin = listPending.get(i); if (isAllDependencyCompleted(plugin)) { return plugin; } ...
java
private Plugin probeNextPlugin() { Plugin plugin = null; int i = 0; while (i < listPending.size()) { // ZAP: Removed unnecessary cast. plugin = listPending.get(i); if (isAllDependencyCompleted(plugin)) { return plugin; } ...
[ "private", "Plugin", "probeNextPlugin", "(", ")", "{", "Plugin", "plugin", "=", "null", ";", "int", "i", "=", "0", ";", "while", "(", "i", "<", "listPending", ".", "size", "(", ")", ")", "{", "// ZAP: Removed unnecessary cast.\r", "plugin", "=", "listPendi...
Get next test ready to be run. Null = none. Test dependendent on others will not be obtained. @return
[ "Get", "next", "test", "ready", "to", "be", "run", ".", "Null", "=", "none", ".", "Test", "dependendent", "on", "others", "will", "not", "be", "obtained", "." ]
0cbe5121f2ae1ecca222513d182759210c569bec
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/parosproxy/paros/core/scanner/PluginFactory.java#L619-L632
129,513
zaproxy/zaproxy
src/org/parosproxy/paros/core/scanner/PluginFactory.java
PluginFactory.nextPlugin
synchronized Plugin nextPlugin() { if (!init) { this.reset(); } Plugin plugin = probeNextPlugin(); if (plugin == null) { return null; } listPending.remove(plugin); plugin.setTimeStarted(); listRunning.add(plugin); ...
java
synchronized Plugin nextPlugin() { if (!init) { this.reset(); } Plugin plugin = probeNextPlugin(); if (plugin == null) { return null; } listPending.remove(plugin); plugin.setTimeStarted(); listRunning.add(plugin); ...
[ "synchronized", "Plugin", "nextPlugin", "(", ")", "{", "if", "(", "!", "init", ")", "{", "this", ".", "reset", "(", ")", ";", "}", "Plugin", "plugin", "=", "probeNextPlugin", "(", ")", ";", "if", "(", "plugin", "==", "null", ")", "{", "return", "nu...
Get next plugin ready to be run without any dependency outstanding. @return new instance of next plugin to be run.
[ "Get", "next", "plugin", "ready", "to", "be", "run", "without", "any", "dependency", "outstanding", "." ]
0cbe5121f2ae1ecca222513d182759210c569bec
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/parosproxy/paros/core/scanner/PluginFactory.java#L639-L654
129,514
zaproxy/zaproxy
src/org/zaproxy/zap/view/ContextStructurePanel.java
ContextStructurePanel.saveToContext
private void saveToContext(Context context, boolean updateSiteStructure) { ParameterParser urlParamParser = context.getUrlParamParser(); ParameterParser formParamParser = context.getPostParamParser(); List<String> structParams = new ArrayList<String>(); List<StructuralNodeModifier> ddns = new ArrayList<Stru...
java
private void saveToContext(Context context, boolean updateSiteStructure) { ParameterParser urlParamParser = context.getUrlParamParser(); ParameterParser formParamParser = context.getPostParamParser(); List<String> structParams = new ArrayList<String>(); List<StructuralNodeModifier> ddns = new ArrayList<Stru...
[ "private", "void", "saveToContext", "(", "Context", "context", ",", "boolean", "updateSiteStructure", ")", "{", "ParameterParser", "urlParamParser", "=", "context", ".", "getUrlParamParser", "(", ")", ";", "ParameterParser", "formParamParser", "=", "context", ".", "...
Save the data from this panel to the provided context. @param context the context @param updateSiteStructure {@code true} if the nodes of the context should be restructured, {@code false} otherwise @see Context#restructureSiteTree()
[ "Save", "the", "data", "from", "this", "panel", "to", "the", "provided", "context", "." ]
0cbe5121f2ae1ecca222513d182759210c569bec
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/view/ContextStructurePanel.java#L226-L263
129,515
zaproxy/zaproxy
src/org/zaproxy/zap/extension/params/ExtensionParams.java
ExtensionParams.getExtensionHttpSessions
protected ExtensionHttpSessions getExtensionHttpSessions() { if(extensionHttpSessions==null){ extensionHttpSessions = Control.getSingleton().getExtensionLoader().getExtension(ExtensionHttpSessions.class); } return extensionHttpSessions; }
java
protected ExtensionHttpSessions getExtensionHttpSessions() { if(extensionHttpSessions==null){ extensionHttpSessions = Control.getSingleton().getExtensionLoader().getExtension(ExtensionHttpSessions.class); } return extensionHttpSessions; }
[ "protected", "ExtensionHttpSessions", "getExtensionHttpSessions", "(", ")", "{", "if", "(", "extensionHttpSessions", "==", "null", ")", "{", "extensionHttpSessions", "=", "Control", ".", "getSingleton", "(", ")", ".", "getExtensionLoader", "(", ")", ".", "getExtensi...
Gets the ExtensionHttpSessions, if it's enabled @return the Http Sessions extension or null, if it's not available
[ "Gets", "the", "ExtensionHttpSessions", "if", "it", "s", "enabled" ]
0cbe5121f2ae1ecca222513d182759210c569bec
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/extension/params/ExtensionParams.java#L217-L223
129,516
zaproxy/zaproxy
src/org/zaproxy/zap/extension/spider/SpiderThread.java
SpiderThread.runScan
private void runScan() { // Do the scan spiderDone = 0; Date start = new Date(); log.info("Starting spidering scan on " + site + " at " + start); startSpider(); this.isAlive = true; }
java
private void runScan() { // Do the scan spiderDone = 0; Date start = new Date(); log.info("Starting spidering scan on " + site + " at " + start); startSpider(); this.isAlive = true; }
[ "private", "void", "runScan", "(", ")", "{", "// Do the scan", "spiderDone", "=", "0", ";", "Date", "start", "=", "new", "Date", "(", ")", ";", "log", ".", "info", "(", "\"Starting spidering scan on \"", "+", "site", "+", "\" at \"", "+", "start", ")", "...
Runs the scan.
[ "Runs", "the", "scan", "." ]
0cbe5121f2ae1ecca222513d182759210c569bec
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/extension/spider/SpiderThread.java#L174-L181
129,517
zaproxy/zaproxy
src/org/zaproxy/zap/extension/spider/SpiderThread.java
SpiderThread.startSpider
private void startSpider() { spider = new Spider(id, extension, spiderParams, extension.getModel().getOptionsParam() .getConnectionParam(), extension.getModel(), this.scanContext); // Register this thread as a Spider Listener, so it gets notified of events and is able // to manipulate the UI accordingly s...
java
private void startSpider() { spider = new Spider(id, extension, spiderParams, extension.getModel().getOptionsParam() .getConnectionParam(), extension.getModel(), this.scanContext); // Register this thread as a Spider Listener, so it gets notified of events and is able // to manipulate the UI accordingly s...
[ "private", "void", "startSpider", "(", ")", "{", "spider", "=", "new", "Spider", "(", "id", ",", "extension", ",", "spiderParams", ",", "extension", ".", "getModel", "(", ")", ".", "getOptionsParam", "(", ")", ".", "getConnectionParam", "(", ")", ",", "e...
Start spider.
[ "Start", "spider", "." ]
0cbe5121f2ae1ecca222513d182759210c569bec
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/extension/spider/SpiderThread.java#L238-L283
129,518
zaproxy/zaproxy
src/org/zaproxy/zap/extension/spider/SpiderThread.java
SpiderThread.addSeed
private void addSeed(SiteNode node) { try { if (!node.isRoot() && node.getHistoryReference() != null) { HttpMessage msg = node.getHistoryReference().getHttpMessage(); if (!msg.getResponseHeader().isImage()) { spider.addSeed(msg); } } } catch (Exception e) { log.error("Error while adding se...
java
private void addSeed(SiteNode node) { try { if (!node.isRoot() && node.getHistoryReference() != null) { HttpMessage msg = node.getHistoryReference().getHttpMessage(); if (!msg.getResponseHeader().isImage()) { spider.addSeed(msg); } } } catch (Exception e) { log.error("Error while adding se...
[ "private", "void", "addSeed", "(", "SiteNode", "node", ")", "{", "try", "{", "if", "(", "!", "node", ".", "isRoot", "(", ")", "&&", "node", ".", "getHistoryReference", "(", ")", "!=", "null", ")", "{", "HttpMessage", "msg", "=", "node", ".", "getHist...
Adds the given node as seed, if the corresponding message is not an image. @param node the node that will be added as seed
[ "Adds", "the", "given", "node", "as", "seed", "if", "the", "corresponding", "message", "is", "not", "an", "image", "." ]
0cbe5121f2ae1ecca222513d182759210c569bec
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/extension/spider/SpiderThread.java#L373-L384
129,519
zaproxy/zaproxy
src/org/zaproxy/zap/extension/spider/SpiderThread.java
SpiderThread.addMessageToSitesTree
private void addMessageToSitesTree(final HistoryReference historyReference, final HttpMessage message) { if (View.isInitialised() && !EventQueue.isDispatchThread()) { EventQueue.invokeLater(new Runnable() { @Override public void run() { addMessageToSitesTree(historyReference, message); } }); ...
java
private void addMessageToSitesTree(final HistoryReference historyReference, final HttpMessage message) { if (View.isInitialised() && !EventQueue.isDispatchThread()) { EventQueue.invokeLater(new Runnable() { @Override public void run() { addMessageToSitesTree(historyReference, message); } }); ...
[ "private", "void", "addMessageToSitesTree", "(", "final", "HistoryReference", "historyReference", ",", "final", "HttpMessage", "message", ")", "{", "if", "(", "View", ".", "isInitialised", "(", ")", "&&", "!", "EventQueue", ".", "isDispatchThread", "(", ")", ")"...
Adds the given message to the sites tree. @param historyReference the history reference of the message, must not be {@code null} @param message the actual message, must not be {@code null}
[ "Adds", "the", "given", "message", "to", "the", "sites", "tree", "." ]
0cbe5121f2ae1ecca222513d182759210c569bec
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/extension/spider/SpiderThread.java#L504-L526
129,520
zaproxy/zaproxy
src/org/zaproxy/zap/extension/spider/SpiderThread.java
SpiderThread.addSpiderListener
public void addSpiderListener(SpiderListener listener) { if (spider != null) { this.spider.addSpiderListener(listener); } else { this.pendingSpiderListeners.add(listener); } }
java
public void addSpiderListener(SpiderListener listener) { if (spider != null) { this.spider.addSpiderListener(listener); } else { this.pendingSpiderListeners.add(listener); } }
[ "public", "void", "addSpiderListener", "(", "SpiderListener", "listener", ")", "{", "if", "(", "spider", "!=", "null", ")", "{", "this", ".", "spider", ".", "addSpiderListener", "(", "listener", ")", ";", "}", "else", "{", "this", ".", "pendingSpiderListener...
Adds a new spider listener. @param listener the listener
[ "Adds", "a", "new", "spider", "listener", "." ]
0cbe5121f2ae1ecca222513d182759210c569bec
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/extension/spider/SpiderThread.java#L569-L575
129,521
zaproxy/zaproxy
src/org/zaproxy/zap/extension/authentication/ExtensionAuthentication.java
ExtensionAuthentication.getPopupFlagLoggedInIndicatorMenu
private PopupContextMenuItemFactory getPopupFlagLoggedInIndicatorMenu() { if (this.popupFlagLoggedInIndicatorMenuFactory == null) { popupFlagLoggedInIndicatorMenuFactory = new PopupContextMenuItemFactory("dd - " + Constant.messages.getString("context.flag.popup")) { private static final long serialVersio...
java
private PopupContextMenuItemFactory getPopupFlagLoggedInIndicatorMenu() { if (this.popupFlagLoggedInIndicatorMenuFactory == null) { popupFlagLoggedInIndicatorMenuFactory = new PopupContextMenuItemFactory("dd - " + Constant.messages.getString("context.flag.popup")) { private static final long serialVersio...
[ "private", "PopupContextMenuItemFactory", "getPopupFlagLoggedInIndicatorMenu", "(", ")", "{", "if", "(", "this", ".", "popupFlagLoggedInIndicatorMenuFactory", "==", "null", ")", "{", "popupFlagLoggedInIndicatorMenuFactory", "=", "new", "PopupContextMenuItemFactory", "(", "\"d...
Gets the popup menu for flagging the "Logged in" pattern. @return the popup menu
[ "Gets", "the", "popup", "menu", "for", "flagging", "the", "Logged", "in", "pattern", "." ]
0cbe5121f2ae1ecca222513d182759210c569bec
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/extension/authentication/ExtensionAuthentication.java#L156-L171
129,522
zaproxy/zaproxy
src/org/zaproxy/zap/extension/authentication/ExtensionAuthentication.java
ExtensionAuthentication.getPopupFlagLoggedOutIndicatorMenu
private PopupContextMenuItemFactory getPopupFlagLoggedOutIndicatorMenu() { if (this.popupFlagLoggedOutIndicatorMenuFactory == null) { popupFlagLoggedOutIndicatorMenuFactory = new PopupContextMenuItemFactory("dd - " + Constant.messages.getString("context.flag.popup")) { private static final long serialVer...
java
private PopupContextMenuItemFactory getPopupFlagLoggedOutIndicatorMenu() { if (this.popupFlagLoggedOutIndicatorMenuFactory == null) { popupFlagLoggedOutIndicatorMenuFactory = new PopupContextMenuItemFactory("dd - " + Constant.messages.getString("context.flag.popup")) { private static final long serialVer...
[ "private", "PopupContextMenuItemFactory", "getPopupFlagLoggedOutIndicatorMenu", "(", ")", "{", "if", "(", "this", ".", "popupFlagLoggedOutIndicatorMenuFactory", "==", "null", ")", "{", "popupFlagLoggedOutIndicatorMenuFactory", "=", "new", "PopupContextMenuItemFactory", "(", "...
Gets the popup menu for flagging the "Logged out" pattern. @return the popup menu
[ "Gets", "the", "popup", "menu", "for", "flagging", "the", "Logged", "out", "pattern", "." ]
0cbe5121f2ae1ecca222513d182759210c569bec
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/extension/authentication/ExtensionAuthentication.java#L178-L193
129,523
zaproxy/zaproxy
src/org/zaproxy/zap/extension/authentication/ExtensionAuthentication.java
ExtensionAuthentication.loadAuthenticationMethodTypes
private void loadAuthenticationMethodTypes(ExtensionHook hook) { this.authenticationMethodTypes = new ArrayList<>(); this.authenticationMethodTypes.add(new FormBasedAuthenticationMethodType()); this.authenticationMethodTypes.add(new HttpAuthenticationMethodType()); this.authenticationMethodTypes.add(new ManualA...
java
private void loadAuthenticationMethodTypes(ExtensionHook hook) { this.authenticationMethodTypes = new ArrayList<>(); this.authenticationMethodTypes.add(new FormBasedAuthenticationMethodType()); this.authenticationMethodTypes.add(new HttpAuthenticationMethodType()); this.authenticationMethodTypes.add(new ManualA...
[ "private", "void", "loadAuthenticationMethodTypes", "(", "ExtensionHook", "hook", ")", "{", "this", ".", "authenticationMethodTypes", "=", "new", "ArrayList", "<>", "(", ")", ";", "this", ".", "authenticationMethodTypes", ".", "add", "(", "new", "FormBasedAuthentica...
Loads the authentication method types and hooks them up. @param hook the extension hook
[ "Loads", "the", "authentication", "method", "types", "and", "hooks", "them", "up", "." ]
0cbe5121f2ae1ecca222513d182759210c569bec
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/extension/authentication/ExtensionAuthentication.java#L200-L215
129,524
zaproxy/zaproxy
src/org/zaproxy/zap/extension/authentication/ExtensionAuthentication.java
ExtensionAuthentication.getAuthenticationMethodTypeForIdentifier
public AuthenticationMethodType getAuthenticationMethodTypeForIdentifier(int id) { for (AuthenticationMethodType t : getAuthenticationMethodTypes()) if (t.getUniqueIdentifier() == id) return t; return null; }
java
public AuthenticationMethodType getAuthenticationMethodTypeForIdentifier(int id) { for (AuthenticationMethodType t : getAuthenticationMethodTypes()) if (t.getUniqueIdentifier() == id) return t; return null; }
[ "public", "AuthenticationMethodType", "getAuthenticationMethodTypeForIdentifier", "(", "int", "id", ")", "{", "for", "(", "AuthenticationMethodType", "t", ":", "getAuthenticationMethodTypes", "(", ")", ")", "if", "(", "t", ".", "getUniqueIdentifier", "(", ")", "==", ...
Gets the authentication method type for a given identifier. @param id the id @return the authentication method type for identifier
[ "Gets", "the", "authentication", "method", "type", "for", "a", "given", "identifier", "." ]
0cbe5121f2ae1ecca222513d182759210c569bec
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/extension/authentication/ExtensionAuthentication.java#L232-L237
129,525
zaproxy/zaproxy
src/org/zaproxy/zap/extension/authentication/ExtensionAuthentication.java
ExtensionAuthentication.getLoginRequestURIForContext
public URI getLoginRequestURIForContext(Context ctx) { if (!(ctx.getAuthenticationMethod() instanceof FormBasedAuthenticationMethod)) return null; FormBasedAuthenticationMethod method = (FormBasedAuthenticationMethod) ctx.getAuthenticationMethod(); try { return new URI(method.getLoginRequestURL(), false); ...
java
public URI getLoginRequestURIForContext(Context ctx) { if (!(ctx.getAuthenticationMethod() instanceof FormBasedAuthenticationMethod)) return null; FormBasedAuthenticationMethod method = (FormBasedAuthenticationMethod) ctx.getAuthenticationMethod(); try { return new URI(method.getLoginRequestURL(), false); ...
[ "public", "URI", "getLoginRequestURIForContext", "(", "Context", "ctx", ")", "{", "if", "(", "!", "(", "ctx", ".", "getAuthenticationMethod", "(", ")", "instanceof", "FormBasedAuthenticationMethod", ")", ")", "return", "null", ";", "FormBasedAuthenticationMethod", "...
Gets the URI for the login request that corresponds to a given context, if any. @param ctx the context @return the login request uri for context, or <code>null</code>, if the context does not have a 'login request' configured
[ "Gets", "the", "URI", "for", "the", "login", "request", "that", "corresponds", "to", "a", "given", "context", "if", "any", "." ]
0cbe5121f2ae1ecca222513d182759210c569bec
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/extension/authentication/ExtensionAuthentication.java#L246-L256
129,526
zaproxy/zaproxy
src/org/zaproxy/zap/utils/LocaleUtils.java
LocaleUtils.getLocalDisplayName
public static String getLocalDisplayName(String locale) { String desc = "" + locale; if (locale != null) { String[] langArray = locale.split("_"); Locale loc = null; if (langArray.length == 1) { loc = new Locale(langArray[0]); } else if (langArray.length == 2) { ...
java
public static String getLocalDisplayName(String locale) { String desc = "" + locale; if (locale != null) { String[] langArray = locale.split("_"); Locale loc = null; if (langArray.length == 1) { loc = new Locale(langArray[0]); } else if (langArray.length == 2) { ...
[ "public", "static", "String", "getLocalDisplayName", "(", "String", "locale", ")", "{", "String", "desc", "=", "\"\"", "+", "locale", ";", "if", "(", "locale", "!=", "null", ")", "{", "String", "[", "]", "langArray", "=", "locale", ".", "split", "(", "...
Gets the name of the language of and for the given locale. @param locale the locale whose language name will be returned @return the name of the language
[ "Gets", "the", "name", "of", "the", "language", "of", "and", "for", "the", "given", "locale", "." ]
0cbe5121f2ae1ecca222513d182759210c569bec
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/utils/LocaleUtils.java#L440-L457
129,527
zaproxy/zaproxy
src/org/zaproxy/zap/extension/pscan/PassiveScanParam.java
PassiveScanParam.setScanFuzzerMessages
public void setScanFuzzerMessages(boolean scanFuzzerMessages) { this.scanFuzzerMessages = scanFuzzerMessages; getConfig().setProperty(SCAN_FUZZER_MESSAGES_KEY, scanFuzzerMessages); setFuzzerOptin(scanFuzzerMessages); }
java
public void setScanFuzzerMessages(boolean scanFuzzerMessages) { this.scanFuzzerMessages = scanFuzzerMessages; getConfig().setProperty(SCAN_FUZZER_MESSAGES_KEY, scanFuzzerMessages); setFuzzerOptin(scanFuzzerMessages); }
[ "public", "void", "setScanFuzzerMessages", "(", "boolean", "scanFuzzerMessages", ")", "{", "this", ".", "scanFuzzerMessages", "=", "scanFuzzerMessages", ";", "getConfig", "(", ")", ".", "setProperty", "(", "SCAN_FUZZER_MESSAGES_KEY", ",", "scanFuzzerMessages", ")", ";...
Sets whether or not the passive scan should be performed on traffic from the fuzzer. @param scanFuzzerMessages {@code true} if the scan should be performed on traffic generated by the fuzzer, {@code false} otherwise. @since TODO Add version @see #isScanFuzzerMessages()
[ "Sets", "whether", "or", "not", "the", "passive", "scan", "should", "be", "performed", "on", "traffic", "from", "the", "fuzzer", "." ]
0cbe5121f2ae1ecca222513d182759210c569bec
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/extension/pscan/PassiveScanParam.java#L188-L192
129,528
zaproxy/zaproxy
src/org/zaproxy/zap/extension/httpsessions/HttpSessionsSite.java
HttpSessionsSite.addHttpSession
public void addHttpSession(HttpSession session) { synchronized (this.sessions) { this.sessions.add(session); } this.model.addHttpSession(session); }
java
public void addHttpSession(HttpSession session) { synchronized (this.sessions) { this.sessions.add(session); } this.model.addHttpSession(session); }
[ "public", "void", "addHttpSession", "(", "HttpSession", "session", ")", "{", "synchronized", "(", "this", ".", "sessions", ")", "{", "this", ".", "sessions", ".", "add", "(", "session", ")", ";", "}", "this", ".", "model", ".", "addHttpSession", "(", "se...
Adds a new http session to this site. @param session the session
[ "Adds", "a", "new", "http", "session", "to", "this", "site", "." ]
0cbe5121f2ae1ecca222513d182759210c569bec
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/extension/httpsessions/HttpSessionsSite.java#L86-L91
129,529
zaproxy/zaproxy
src/org/zaproxy/zap/extension/httpsessions/HttpSessionsSite.java
HttpSessionsSite.removeHttpSession
public void removeHttpSession(HttpSession session) { if (session == activeSession) { activeSession = null; } synchronized (this.sessions) { this.sessions.remove(session); } this.model.removeHttpSession(session); session.invalidate(); }
java
public void removeHttpSession(HttpSession session) { if (session == activeSession) { activeSession = null; } synchronized (this.sessions) { this.sessions.remove(session); } this.model.removeHttpSession(session); session.invalidate(); }
[ "public", "void", "removeHttpSession", "(", "HttpSession", "session", ")", "{", "if", "(", "session", "==", "activeSession", ")", "{", "activeSession", "=", "null", ";", "}", "synchronized", "(", "this", ".", "sessions", ")", "{", "this", ".", "sessions", ...
Removes an existing session. @param session the session
[ "Removes", "an", "existing", "session", "." ]
0cbe5121f2ae1ecca222513d182759210c569bec
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/extension/httpsessions/HttpSessionsSite.java#L98-L107
129,530
zaproxy/zaproxy
src/org/zaproxy/zap/extension/httpsessions/HttpSessionsSite.java
HttpSessionsSite.setActiveSession
public void setActiveSession(HttpSession activeSession) { if (log.isInfoEnabled()) { log.info("Setting new active session for site '" + site + "': " + activeSession); } if (activeSession == null) { throw new IllegalArgumentException( "When settting an active session, a non-null session has to be provid...
java
public void setActiveSession(HttpSession activeSession) { if (log.isInfoEnabled()) { log.info("Setting new active session for site '" + site + "': " + activeSession); } if (activeSession == null) { throw new IllegalArgumentException( "When settting an active session, a non-null session has to be provid...
[ "public", "void", "setActiveSession", "(", "HttpSession", "activeSession", ")", "{", "if", "(", "log", ".", "isInfoEnabled", "(", ")", ")", "{", "log", ".", "info", "(", "\"Setting new active session for site '\"", "+", "site", "+", "\"': \"", "+", "activeSessio...
Sets the active session. @param activeSession the new active session. @see #getActiveSession() @see #unsetActiveSession() @throws IllegalArgumentException If the session provided as parameter is null.
[ "Sets", "the", "active", "session", "." ]
0cbe5121f2ae1ecca222513d182759210c569bec
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/extension/httpsessions/HttpSessionsSite.java#L145-L173
129,531
zaproxy/zaproxy
src/org/zaproxy/zap/extension/httpsessions/HttpSessionsSite.java
HttpSessionsSite.unsetActiveSession
public void unsetActiveSession() { if (log.isInfoEnabled()) { log.info("Setting no active session for site '" + site + "'."); } if (this.activeSession != null) { this.activeSession.setActive(false); // If the active session was one with no tokens, delete it, at it will probably not // match anything ...
java
public void unsetActiveSession() { if (log.isInfoEnabled()) { log.info("Setting no active session for site '" + site + "'."); } if (this.activeSession != null) { this.activeSession.setActive(false); // If the active session was one with no tokens, delete it, at it will probably not // match anything ...
[ "public", "void", "unsetActiveSession", "(", ")", "{", "if", "(", "log", ".", "isInfoEnabled", "(", ")", ")", "{", "log", ".", "info", "(", "\"Setting no active session for site '\"", "+", "site", "+", "\"'.\"", ")", ";", "}", "if", "(", "this", ".", "ac...
Unset any active session for this site. @see #setActiveSession(HttpSession)
[ "Unset", "any", "active", "session", "for", "this", "site", "." ]
0cbe5121f2ae1ecca222513d182759210c569bec
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/extension/httpsessions/HttpSessionsSite.java#L180-L198
129,532
zaproxy/zaproxy
src/org/zaproxy/zap/extension/httpsessions/HttpSessionsSite.java
HttpSessionsSite.processHttpRequestMessage
public void processHttpRequestMessage(HttpMessage message) { // Get the session tokens for this site HttpSessionTokensSet siteTokensSet = extension.getHttpSessionTokensSet(getSite()); // No tokens for this site, so no processing if (siteTokensSet == null) { log.debug("No session tokens for: " + this.getSite...
java
public void processHttpRequestMessage(HttpMessage message) { // Get the session tokens for this site HttpSessionTokensSet siteTokensSet = extension.getHttpSessionTokensSet(getSite()); // No tokens for this site, so no processing if (siteTokensSet == null) { log.debug("No session tokens for: " + this.getSite...
[ "public", "void", "processHttpRequestMessage", "(", "HttpMessage", "message", ")", "{", "// Get the session tokens for this site", "HttpSessionTokensSet", "siteTokensSet", "=", "extension", ".", "getHttpSessionTokensSet", "(", "getSite", "(", ")", ")", ";", "// No tokens fo...
Process the http request message before being sent. @param message the message
[ "Process", "the", "http", "request", "message", "before", "being", "sent", "." ]
0cbe5121f2ae1ecca222513d182759210c569bec
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/extension/httpsessions/HttpSessionsSite.java#L332-L363
129,533
zaproxy/zaproxy
src/org/zaproxy/zap/extension/httpsessions/HttpSessionsSite.java
HttpSessionsSite.getMatchingHttpSession
private HttpSession getMatchingHttpSession(List<HttpCookie> cookies, final HttpSessionTokensSet siteTokens) { Collection<HttpSession> sessionsCopy; synchronized (sessions) { sessionsCopy = new ArrayList<>(sessions); } return CookieBasedSessionManagementHelper.getMatchingHttpSession(sessionsCopy, cookies, sit...
java
private HttpSession getMatchingHttpSession(List<HttpCookie> cookies, final HttpSessionTokensSet siteTokens) { Collection<HttpSession> sessionsCopy; synchronized (sessions) { sessionsCopy = new ArrayList<>(sessions); } return CookieBasedSessionManagementHelper.getMatchingHttpSession(sessionsCopy, cookies, sit...
[ "private", "HttpSession", "getMatchingHttpSession", "(", "List", "<", "HttpCookie", ">", "cookies", ",", "final", "HttpSessionTokensSet", "siteTokens", ")", "{", "Collection", "<", "HttpSession", ">", "sessionsCopy", ";", "synchronized", "(", "sessions", ")", "{", ...
Gets the matching http session for a particular message containing a list of cookies. @param siteTokens the tokens @param cookies the cookies present in the request header of the message @return the matching http session, if any, or null if no existing session was found to match all the tokens
[ "Gets", "the", "matching", "http", "session", "for", "a", "particular", "message", "containing", "a", "list", "of", "cookies", "." ]
0cbe5121f2ae1ecca222513d182759210c569bec
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/extension/httpsessions/HttpSessionsSite.java#L485-L491
129,534
zaproxy/zaproxy
src/org/zaproxy/zap/extension/httpsessions/HttpSessionsSite.java
HttpSessionsSite.cleanupSessionToken
protected void cleanupSessionToken(String token) { // Empty check if (sessions.isEmpty()) { return; } if (log.isDebugEnabled()) { log.debug("Removing duplicates and cleaning up sessions for site - token: " + site + " - " + token); } synchronized (this.sessions) { // If there are no more sess...
java
protected void cleanupSessionToken(String token) { // Empty check if (sessions.isEmpty()) { return; } if (log.isDebugEnabled()) { log.debug("Removing duplicates and cleaning up sessions for site - token: " + site + " - " + token); } synchronized (this.sessions) { // If there are no more sess...
[ "protected", "void", "cleanupSessionToken", "(", "String", "token", ")", "{", "// Empty check", "if", "(", "sessions", ".", "isEmpty", "(", ")", ")", "{", "return", ";", "}", "if", "(", "log", ".", "isDebugEnabled", "(", ")", ")", "{", "log", ".", "deb...
Cleans up the sessions, eliminating the given session token. @param token the session token
[ "Cleans", "up", "the", "sessions", "eliminating", "the", "given", "session", "token", "." ]
0cbe5121f2ae1ecca222513d182759210c569bec
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/extension/httpsessions/HttpSessionsSite.java#L504-L577
129,535
zaproxy/zaproxy
src/org/zaproxy/zap/extension/httpsessions/HttpSessionsSite.java
HttpSessionsSite.renameHttpSession
public boolean renameHttpSession(String oldName, String newName) { // Check new name validity if (newName == null || newName.isEmpty()) { log.warn("Trying to rename session from " + oldName + " illegal name: " + newName); return false; } // Check existing old name HttpSession session = getHttpSession(o...
java
public boolean renameHttpSession(String oldName, String newName) { // Check new name validity if (newName == null || newName.isEmpty()) { log.warn("Trying to rename session from " + oldName + " illegal name: " + newName); return false; } // Check existing old name HttpSession session = getHttpSession(o...
[ "public", "boolean", "renameHttpSession", "(", "String", "oldName", ",", "String", "newName", ")", "{", "// Check new name validity", "if", "(", "newName", "==", "null", "||", "newName", ".", "isEmpty", "(", ")", ")", "{", "log", ".", "warn", "(", "\"Trying ...
Renames a http session, making sure the new name is unique for the site. @param oldName the old name @param newName the new name @return true, if successful
[ "Renames", "a", "http", "session", "making", "sure", "the", "new", "name", "is", "unique", "for", "the", "site", "." ]
0cbe5121f2ae1ecca222513d182759210c569bec
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/extension/httpsessions/HttpSessionsSite.java#L615-L639
129,536
zaproxy/zaproxy
src/org/zaproxy/zap/spider/URLResolver.java
URLResolver.indexOf
private static int indexOf(final String s, final char searchChar, final int beginIndex, final int endIndex) { for (int i = beginIndex; i < endIndex; i++) { if (s.charAt(i) == searchChar) { return i; } } return -1; }
java
private static int indexOf(final String s, final char searchChar, final int beginIndex, final int endIndex) { for (int i = beginIndex; i < endIndex; i++) { if (s.charAt(i) == searchChar) { return i; } } return -1; }
[ "private", "static", "int", "indexOf", "(", "final", "String", "s", ",", "final", "char", "searchChar", ",", "final", "int", "beginIndex", ",", "final", "int", "endIndex", ")", "{", "for", "(", "int", "i", "=", "beginIndex", ";", "i", "<", "endIndex", ...
Returns the index within the specified string of the first occurrence of the specified search character. @param s the string to search @param searchChar the character to search for @param beginIndex the index at which to start the search @param endIndex the index at which to stop the search @return the index of the fi...
[ "Returns", "the", "index", "within", "the", "specified", "string", "of", "the", "first", "occurrence", "of", "the", "specified", "search", "character", "." ]
0cbe5121f2ae1ecca222513d182759210c569bec
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/spider/URLResolver.java#L63-L70
129,537
zaproxy/zaproxy
src/org/zaproxy/zap/extension/ext/ExtensionParam.java
ExtensionParam.setExtensionsState
void setExtensionsState(Map<String, Boolean> extensionsState) { if (extensionsState == null) { throw new IllegalArgumentException("Parameter extensionsState must not be null."); } ((HierarchicalConfiguration) getConfig()).clearTree(ALL_EXTENSIONS_KEY); int enabledCount = 0; ...
java
void setExtensionsState(Map<String, Boolean> extensionsState) { if (extensionsState == null) { throw new IllegalArgumentException("Parameter extensionsState must not be null."); } ((HierarchicalConfiguration) getConfig()).clearTree(ALL_EXTENSIONS_KEY); int enabledCount = 0; ...
[ "void", "setExtensionsState", "(", "Map", "<", "String", ",", "Boolean", ">", "extensionsState", ")", "{", "if", "(", "extensionsState", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Parameter extensionsState must not be null.\"", ")", ...
Sets the extensions' state, to be saved in the configuration file. @param extensionsState the extensions' state
[ "Sets", "the", "extensions", "state", "to", "be", "saved", "in", "the", "configuration", "file", "." ]
0cbe5121f2ae1ecca222513d182759210c569bec
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/extension/ext/ExtensionParam.java#L121-L144
129,538
zaproxy/zaproxy
src/org/parosproxy/paros/view/AbstractFrame.java
AbstractFrame.centerFrame
public void centerFrame() { final Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); final Dimension frameSize = this.getSize(); if (frameSize.height > screenSize.height) { frameSize.height = screenSize.height; } if (frameSize.width > screenSize.width) { frameSize.width = screenS...
java
public void centerFrame() { final Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); final Dimension frameSize = this.getSize(); if (frameSize.height > screenSize.height) { frameSize.height = screenSize.height; } if (frameSize.width > screenSize.width) { frameSize.width = screenS...
[ "public", "void", "centerFrame", "(", ")", "{", "final", "Dimension", "screenSize", "=", "Toolkit", ".", "getDefaultToolkit", "(", ")", ".", "getScreenSize", "(", ")", ";", "final", "Dimension", "frameSize", "=", "this", ".", "getSize", "(", ")", ";", "if"...
Centre this frame.
[ "Centre", "this", "frame", "." ]
0cbe5121f2ae1ecca222513d182759210c569bec
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/parosproxy/paros/view/AbstractFrame.java#L118-L128
129,539
zaproxy/zaproxy
src/org/parosproxy/paros/view/AbstractFrame.java
AbstractFrame.restoreWindowState
private SimpleWindowState restoreWindowState() { SimpleWindowState laststate = null; final String statestr = preferences.get(prefnzPrefix+PREF_WINDOW_STATE, null); if (logger.isDebugEnabled()) logger.debug("Restoring preference "+PREF_WINDOW_STATE+"=" + statestr); if (statestr != null) { SimpleWindowSta...
java
private SimpleWindowState restoreWindowState() { SimpleWindowState laststate = null; final String statestr = preferences.get(prefnzPrefix+PREF_WINDOW_STATE, null); if (logger.isDebugEnabled()) logger.debug("Restoring preference "+PREF_WINDOW_STATE+"=" + statestr); if (statestr != null) { SimpleWindowSta...
[ "private", "SimpleWindowState", "restoreWindowState", "(", ")", "{", "SimpleWindowState", "laststate", "=", "null", ";", "final", "String", "statestr", "=", "preferences", ".", "get", "(", "prefnzPrefix", "+", "PREF_WINDOW_STATE", ",", "null", ")", ";", "if", "(...
Loads and sets the last window state of the frame. Additionally, the last state will be returned. @return last window state OR null
[ "Loads", "and", "sets", "the", "last", "window", "state", "of", "the", "frame", ".", "Additionally", "the", "last", "state", "will", "be", "returned", "." ]
0cbe5121f2ae1ecca222513d182759210c569bec
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/parosproxy/paros/view/AbstractFrame.java#L154-L175
129,540
zaproxy/zaproxy
src/org/parosproxy/paros/view/AbstractFrame.java
AbstractFrame.saveWindowSize
private void saveWindowSize(Dimension size) { if (size != null) { if (getExtendedState() == Frame.NORMAL) { if (logger.isDebugEnabled()) logger.debug("Saving preference " + PREF_WINDOW_SIZE + "=" + size.width + "," + size.height); this.preferences.put(prefnzPrefix+PREF_WINDOW_SIZE, size.width + "," + s...
java
private void saveWindowSize(Dimension size) { if (size != null) { if (getExtendedState() == Frame.NORMAL) { if (logger.isDebugEnabled()) logger.debug("Saving preference " + PREF_WINDOW_SIZE + "=" + size.width + "," + size.height); this.preferences.put(prefnzPrefix+PREF_WINDOW_SIZE, size.width + "," + s...
[ "private", "void", "saveWindowSize", "(", "Dimension", "size", ")", "{", "if", "(", "size", "!=", "null", ")", "{", "if", "(", "getExtendedState", "(", ")", "==", "Frame", ".", "NORMAL", ")", "{", "if", "(", "logger", ".", "isDebugEnabled", "(", ")", ...
Saves the size of this frame, but only, if window state is 'normal'. If window state is iconfied or maximized, the size is not saved! @param size
[ "Saves", "the", "size", "of", "this", "frame", "but", "only", "if", "window", "state", "is", "normal", ".", "If", "window", "state", "is", "iconfied", "or", "maximized", "the", "size", "is", "not", "saved!" ]
0cbe5121f2ae1ecca222513d182759210c569bec
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/parosproxy/paros/view/AbstractFrame.java#L183-L192
129,541
zaproxy/zaproxy
src/org/parosproxy/paros/view/AbstractFrame.java
AbstractFrame.restoreWindowSize
private Dimension restoreWindowSize() { Dimension result = null; final String sizestr = preferences.get(prefnzPrefix+PREF_WINDOW_SIZE, null); if (sizestr != null) { int width = 0; int height = 0; final String[] sizes = sizestr.split("[,]"); try { width = Integer.parseInt(sizes[0].trim()); ...
java
private Dimension restoreWindowSize() { Dimension result = null; final String sizestr = preferences.get(prefnzPrefix+PREF_WINDOW_SIZE, null); if (sizestr != null) { int width = 0; int height = 0; final String[] sizes = sizestr.split("[,]"); try { width = Integer.parseInt(sizes[0].trim()); ...
[ "private", "Dimension", "restoreWindowSize", "(", ")", "{", "Dimension", "result", "=", "null", ";", "final", "String", "sizestr", "=", "preferences", ".", "get", "(", "prefnzPrefix", "+", "PREF_WINDOW_SIZE", ",", "null", ")", ";", "if", "(", "sizestr", "!="...
Loads and set the saved size preferences for this frame. @return the size of the frame OR null, if there wasn't any preference.
[ "Loads", "and", "set", "the", "saved", "size", "preferences", "for", "this", "frame", "." ]
0cbe5121f2ae1ecca222513d182759210c569bec
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/parosproxy/paros/view/AbstractFrame.java#L199-L219
129,542
zaproxy/zaproxy
src/org/parosproxy/paros/view/AbstractFrame.java
AbstractFrame.saveWindowLocation
private void saveWindowLocation(Point point) { if (point != null) { if (getExtendedState() == Frame.NORMAL) { if (logger.isDebugEnabled()) logger.debug("Saving preference " + PREF_WINDOW_POSITION + "=" + point.x + "," + point.y); this.preferences.put(prefnzPrefix+PREF_WINDOW_POSITION, point.x + "," + p...
java
private void saveWindowLocation(Point point) { if (point != null) { if (getExtendedState() == Frame.NORMAL) { if (logger.isDebugEnabled()) logger.debug("Saving preference " + PREF_WINDOW_POSITION + "=" + point.x + "," + point.y); this.preferences.put(prefnzPrefix+PREF_WINDOW_POSITION, point.x + "," + p...
[ "private", "void", "saveWindowLocation", "(", "Point", "point", ")", "{", "if", "(", "point", "!=", "null", ")", "{", "if", "(", "getExtendedState", "(", ")", "==", "Frame", ".", "NORMAL", ")", "{", "if", "(", "logger", ".", "isDebugEnabled", "(", ")",...
Saves the location of this frame, but only, if window state is 'normal'. If window state is iconfied or maximized, the location is not saved! @param point
[ "Saves", "the", "location", "of", "this", "frame", "but", "only", "if", "window", "state", "is", "normal", ".", "If", "window", "state", "is", "iconfied", "or", "maximized", "the", "location", "is", "not", "saved!" ]
0cbe5121f2ae1ecca222513d182759210c569bec
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/parosproxy/paros/view/AbstractFrame.java#L227-L236
129,543
zaproxy/zaproxy
src/org/parosproxy/paros/view/AbstractFrame.java
AbstractFrame.restoreWindowLocation
private Point restoreWindowLocation() { Point result = null; final String sizestr = preferences.get(prefnzPrefix+PREF_WINDOW_POSITION, null); if (sizestr != null) { int x = 0; int y = 0; final String[] sizes = sizestr.split("[,]"); try { x = Integer.parseInt(sizes[0].trim()); y = Inte...
java
private Point restoreWindowLocation() { Point result = null; final String sizestr = preferences.get(prefnzPrefix+PREF_WINDOW_POSITION, null); if (sizestr != null) { int x = 0; int y = 0; final String[] sizes = sizestr.split("[,]"); try { x = Integer.parseInt(sizes[0].trim()); y = Inte...
[ "private", "Point", "restoreWindowLocation", "(", ")", "{", "Point", "result", "=", "null", ";", "final", "String", "sizestr", "=", "preferences", ".", "get", "(", "prefnzPrefix", "+", "PREF_WINDOW_POSITION", ",", "null", ")", ";", "if", "(", "sizestr", "!="...
Loads and set the saved position preferences for this frame. @return the size of the frame OR null, if there wasn't any preference.
[ "Loads", "and", "set", "the", "saved", "position", "preferences", "for", "this", "frame", "." ]
0cbe5121f2ae1ecca222513d182759210c569bec
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/parosproxy/paros/view/AbstractFrame.java#L243-L263
129,544
zaproxy/zaproxy
src/org/zaproxy/zap/model/TechSet.java
TechSet.includesAny
public boolean includesAny(Tech... techs) { if (techs == null || techs.length == 0) { return false; } for (Tech tech : techs) { if (includes(tech)) { return true; } } return false; }
java
public boolean includesAny(Tech... techs) { if (techs == null || techs.length == 0) { return false; } for (Tech tech : techs) { if (includes(tech)) { return true; } } return false; }
[ "public", "boolean", "includesAny", "(", "Tech", "...", "techs", ")", "{", "if", "(", "techs", "==", "null", "||", "techs", ".", "length", "==", "0", ")", "{", "return", "false", ";", "}", "for", "(", "Tech", "tech", ":", "techs", ")", "{", "if", ...
Tells whether or not any of the given technologies is included. @param techs the technologies that will be checked. @return {@code true} if any of the technologies is included, {@code false} otherwise. @since TODO add version @see #includes(Tech)
[ "Tells", "whether", "or", "not", "any", "of", "the", "given", "technologies", "is", "included", "." ]
0cbe5121f2ae1ecca222513d182759210c569bec
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/model/TechSet.java#L87-L97
129,545
zaproxy/zaproxy
src/org/zaproxy/zap/model/TechSet.java
TechSet.print
public void print() { System.out.println("TechSet: " + this.hashCode()); for (Tech tech : includeTech) { System.out.println("\tInclude: " + tech); } for (Tech tech : excludeTech) { System.out.println("\tExclude: " + tech); } }
java
public void print() { System.out.println("TechSet: " + this.hashCode()); for (Tech tech : includeTech) { System.out.println("\tInclude: " + tech); } for (Tech tech : excludeTech) { System.out.println("\tExclude: " + tech); } }
[ "public", "void", "print", "(", ")", "{", "System", ".", "out", ".", "println", "(", "\"TechSet: \"", "+", "this", ".", "hashCode", "(", ")", ")", ";", "for", "(", "Tech", "tech", ":", "includeTech", ")", "{", "System", ".", "out", ".", "println", ...
Useful for debuging ;)
[ "Useful", "for", "debuging", ";", ")" ]
0cbe5121f2ae1ecca222513d182759210c569bec
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/model/TechSet.java#L112-L121
129,546
zaproxy/zaproxy
src/org/parosproxy/paros/core/scanner/Alert.java
Alert.getIcon
public ImageIcon getIcon() { if (confidence == Alert.CONFIDENCE_FALSE_POSITIVE) { // Special case - theres no risk - use the green flag return DisplayUtils.getScaledIcon(Constant.OK_FLAG_IMAGE_URL); } switch (risk) { case Alert.RISK_INFO: retu...
java
public ImageIcon getIcon() { if (confidence == Alert.CONFIDENCE_FALSE_POSITIVE) { // Special case - theres no risk - use the green flag return DisplayUtils.getScaledIcon(Constant.OK_FLAG_IMAGE_URL); } switch (risk) { case Alert.RISK_INFO: retu...
[ "public", "ImageIcon", "getIcon", "(", ")", "{", "if", "(", "confidence", "==", "Alert", ".", "CONFIDENCE_FALSE_POSITIVE", ")", "{", "// Special case - theres no risk - use the green flag\r", "return", "DisplayUtils", ".", "getScaledIcon", "(", "Constant", ".", "OK_FLAG...
Gets the correctly scaled icon for this alert. @return the correctly scaled icon for this alert @since 2.6.0
[ "Gets", "the", "correctly", "scaled", "icon", "for", "this", "alert", "." ]
0cbe5121f2ae1ecca222513d182759210c569bec
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/parosproxy/paros/core/scanner/Alert.java#L694-L711
129,547
zaproxy/zaproxy
src/org/parosproxy/paros/core/proxy/ProxyThread.java
ProxyThread.notifyListenerRequestSend
private boolean notifyListenerRequestSend(HttpMessage httpMessage) { ProxyListener listener = null; List<ProxyListener> listenerList = parentServer.getListenerList(); for (int i=0;i<listenerList.size();i++) { listener = listenerList.get(i); try { if (! listener.onHttpRequestSend(httpMessage)) {...
java
private boolean notifyListenerRequestSend(HttpMessage httpMessage) { ProxyListener listener = null; List<ProxyListener> listenerList = parentServer.getListenerList(); for (int i=0;i<listenerList.size();i++) { listener = listenerList.get(i); try { if (! listener.onHttpRequestSend(httpMessage)) {...
[ "private", "boolean", "notifyListenerRequestSend", "(", "HttpMessage", "httpMessage", ")", "{", "ProxyListener", "listener", "=", "null", ";", "List", "<", "ProxyListener", ">", "listenerList", "=", "parentServer", ".", "getListenerList", "(", ")", ";", "for", "("...
Go through each observers to process a request in each observers. The method can be modified in each observers. @param httpMessage the request that was received from the client and may be forwarded to the server @return {@code true} if the message should be forwarded to the server, {@code false} otherwise
[ "Go", "through", "each", "observers", "to", "process", "a", "request", "in", "each", "observers", ".", "The", "method", "can", "be", "modified", "in", "each", "observers", "." ]
0cbe5121f2ae1ecca222513d182759210c569bec
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/parosproxy/paros/core/proxy/ProxyThread.java#L680-L694
129,548
zaproxy/zaproxy
src/org/zaproxy/zap/model/Context.java
Context.setIncludeInContextRegexs
public void setIncludeInContextRegexs(List<String> includeRegexs) { validateRegexs(includeRegexs); // Check if theyve been changed if (includeInRegexs.size() == includeRegexs.size()) { boolean changed = false; for (int i = 0; i < includeInRegexs.size(); i++) { if (!includeInRegexs.get(i).equals(in...
java
public void setIncludeInContextRegexs(List<String> includeRegexs) { validateRegexs(includeRegexs); // Check if theyve been changed if (includeInRegexs.size() == includeRegexs.size()) { boolean changed = false; for (int i = 0; i < includeInRegexs.size(); i++) { if (!includeInRegexs.get(i).equals(in...
[ "public", "void", "setIncludeInContextRegexs", "(", "List", "<", "String", ">", "includeRegexs", ")", "{", "validateRegexs", "(", "includeRegexs", ")", ";", "// Check if theyve been changed\r", "if", "(", "includeInRegexs", ".", "size", "(", ")", "==", "includeRegex...
Sets the regular expressions used to include a URL in context. @param includeRegexs the regular expressions @throws IllegalArgumentException if one of the regular expressions is {@code null}. @throws PatternSyntaxException if one of the regular expressions is invalid.
[ "Sets", "the", "regular", "expressions", "used", "to", "include", "a", "URL", "in", "context", "." ]
0cbe5121f2ae1ecca222513d182759210c569bec
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/model/Context.java#L363-L389
129,549
zaproxy/zaproxy
src/org/zaproxy/zap/model/Context.java
Context.setExcludeFromContextRegexs
public void setExcludeFromContextRegexs(List<String> excludeRegexs) { validateRegexs(excludeRegexs); // Check if theyve been changed if (excludeFromRegexs.size() == excludeRegexs.size()) { boolean changed = false; for (int i = 0; i < excludeFromRegexs.size(); i++) { if (!excludeFromRegexs.get(i).e...
java
public void setExcludeFromContextRegexs(List<String> excludeRegexs) { validateRegexs(excludeRegexs); // Check if theyve been changed if (excludeFromRegexs.size() == excludeRegexs.size()) { boolean changed = false; for (int i = 0; i < excludeFromRegexs.size(); i++) { if (!excludeFromRegexs.get(i).e...
[ "public", "void", "setExcludeFromContextRegexs", "(", "List", "<", "String", ">", "excludeRegexs", ")", "{", "validateRegexs", "(", "excludeRegexs", ")", ";", "// Check if theyve been changed\r", "if", "(", "excludeFromRegexs", ".", "size", "(", ")", "==", "excludeR...
Sets the regular expressions used to exclude a URL from the context. @param excludeRegexs the regular expressions @throws IllegalArgumentException if one of the regular expressions is {@code null}. @throws PatternSyntaxException if one of the regular expressions is invalid.
[ "Sets", "the", "regular", "expressions", "used", "to", "exclude", "a", "URL", "from", "the", "context", "." ]
0cbe5121f2ae1ecca222513d182759210c569bec
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/model/Context.java#L416-L443
129,550
zaproxy/zaproxy
src/org/zaproxy/zap/model/Context.java
Context.setName
public void setName(String name) { if (name == null || name.isEmpty()) { throw new IllegalContextNameException( IllegalContextNameException.Reason.EMPTY_NAME, "The context name must not be null nor empty."); } this.name = name; }
java
public void setName(String name) { if (name == null || name.isEmpty()) { throw new IllegalContextNameException( IllegalContextNameException.Reason.EMPTY_NAME, "The context name must not be null nor empty."); } this.name = name; }
[ "public", "void", "setName", "(", "String", "name", ")", "{", "if", "(", "name", "==", "null", "||", "name", ".", "isEmpty", "(", ")", ")", "{", "throw", "new", "IllegalContextNameException", "(", "IllegalContextNameException", ".", "Reason", ".", "EMPTY_NAM...
Sets the name of the context. @param name the new name of the context @throws IllegalContextNameException (since 2.6.0) if the given name is {@code null} or empty.
[ "Sets", "the", "name", "of", "the", "context", "." ]
0cbe5121f2ae1ecca222513d182759210c569bec
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/model/Context.java#L478-L486
129,551
zaproxy/zaproxy
src/org/zaproxy/zap/model/Context.java
Context.getChildren
private List<SiteNode> getChildren(SiteNode siteNode) { int childCount = siteNode.getChildCount(); if (childCount == 0) { return Collections.emptyList(); } List<SiteNode> children = new ArrayList<>(childCount); for (int i = 0; i < childCount; i++) { children.add((SiteNode) siteNode.getChildAt(i...
java
private List<SiteNode> getChildren(SiteNode siteNode) { int childCount = siteNode.getChildCount(); if (childCount == 0) { return Collections.emptyList(); } List<SiteNode> children = new ArrayList<>(childCount); for (int i = 0; i < childCount; i++) { children.add((SiteNode) siteNode.getChildAt(i...
[ "private", "List", "<", "SiteNode", ">", "getChildren", "(", "SiteNode", "siteNode", ")", "{", "int", "childCount", "=", "siteNode", ".", "getChildCount", "(", ")", ";", "if", "(", "childCount", "==", "0", ")", "{", "return", "Collections", ".", "emptyList...
Gets the child nodes of the given site node. @param siteNode the site node that will be used, must not be {@code null} @return a {@code List} with the child nodes, never {@code null}
[ "Gets", "the", "child", "nodes", "of", "the", "given", "site", "node", "." ]
0cbe5121f2ae1ecca222513d182759210c569bec
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/model/Context.java#L657-L668
129,552
zaproxy/zaproxy
src/org/zaproxy/zap/model/Context.java
Context.duplicate
public Context duplicate() { Context newContext = new Context(session, getIndex()); newContext.description = this.description; newContext.name = this.name; newContext.includeInRegexs = new ArrayList<>(this.includeInRegexs); newContext.includeInPatterns = new ArrayList<>(this.includeInPatterns); newCon...
java
public Context duplicate() { Context newContext = new Context(session, getIndex()); newContext.description = this.description; newContext.name = this.name; newContext.includeInRegexs = new ArrayList<>(this.includeInRegexs); newContext.includeInPatterns = new ArrayList<>(this.includeInPatterns); newCon...
[ "public", "Context", "duplicate", "(", ")", "{", "Context", "newContext", "=", "new", "Context", "(", "session", ",", "getIndex", "(", ")", ")", ";", "newContext", ".", "description", "=", "this", ".", "description", ";", "newContext", ".", "name", "=", ...
Creates a copy of the Context. The copy is deep, with the exception of the TechSet. @return the context
[ "Creates", "a", "copy", "of", "the", "Context", ".", "The", "copy", "is", "deep", "with", "the", "exception", "of", "the", "TechSet", "." ]
0cbe5121f2ae1ecca222513d182759210c569bec
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/model/Context.java#L736-L753
129,553
zaproxy/zaproxy
src/org/parosproxy/paros/extension/filter/ExtensionFilter.java
ExtensionFilter.getMenuToolsFilter
private ZapMenuItem getMenuToolsFilter() { if (menuToolsFilter == null) { menuToolsFilter = new ZapMenuItem("menu.tools.filter"); menuToolsFilter.addActionListener(new java.awt.event.ActionListener() { @Override public void actionPerformed(java.awt.event.ActionEvent e) { FilterDialog...
java
private ZapMenuItem getMenuToolsFilter() { if (menuToolsFilter == null) { menuToolsFilter = new ZapMenuItem("menu.tools.filter"); menuToolsFilter.addActionListener(new java.awt.event.ActionListener() { @Override public void actionPerformed(java.awt.event.ActionEvent e) { FilterDialog...
[ "private", "ZapMenuItem", "getMenuToolsFilter", "(", ")", "{", "if", "(", "menuToolsFilter", "==", "null", ")", "{", "menuToolsFilter", "=", "new", "ZapMenuItem", "(", "\"menu.tools.filter\"", ")", ";", "menuToolsFilter", ".", "addActionListener", "(", "new", "jav...
This method initializes menuToolsFilter @return javax.swing.JMenuItem
[ "This", "method", "initializes", "menuToolsFilter" ]
0cbe5121f2ae1ecca222513d182759210c569bec
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/parosproxy/paros/extension/filter/ExtensionFilter.java#L132-L166
129,554
zaproxy/zaproxy
src/org/parosproxy/paros/extension/filter/ExtensionFilter.java
ExtensionFilter.destroy
@Override public void destroy() { if (timerFilterThread != null) { timerFilterThread.setStopped(); timerFilterThread = null; } Filter filter = null; for (int i=0; i<filterFactory.getAllFilter().size(); i++) { // ZAP: Removed unnecessary c...
java
@Override public void destroy() { if (timerFilterThread != null) { timerFilterThread.setStopped(); timerFilterThread = null; } Filter filter = null; for (int i=0; i<filterFactory.getAllFilter().size(); i++) { // ZAP: Removed unnecessary c...
[ "@", "Override", "public", "void", "destroy", "(", ")", "{", "if", "(", "timerFilterThread", "!=", "null", ")", "{", "timerFilterThread", ".", "setStopped", "(", ")", ";", "timerFilterThread", "=", "null", ";", "}", "Filter", "filter", "=", "null", ";", ...
Destroy every filter during extension destroy.
[ "Destroy", "every", "filter", "during", "extension", "destroy", "." ]
0cbe5121f2ae1ecca222513d182759210c569bec
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/parosproxy/paros/extension/filter/ExtensionFilter.java#L247-L264
129,555
zaproxy/zaproxy
src/org/zaproxy/zap/control/ExtensionFactory.java
ExtensionFactory.canBeLoaded
static boolean canBeLoaded(Map<Class<? extends Extension>, Extension> extensions, Extension extension) { return canBeLoaded(extensions, extension, new ArrayList<>()); }
java
static boolean canBeLoaded(Map<Class<? extends Extension>, Extension> extensions, Extension extension) { return canBeLoaded(extensions, extension, new ArrayList<>()); }
[ "static", "boolean", "canBeLoaded", "(", "Map", "<", "Class", "<", "?", "extends", "Extension", ">", ",", "Extension", ">", "extensions", ",", "Extension", "extension", ")", "{", "return", "canBeLoaded", "(", "extensions", ",", "extension", ",", "new", "Arra...
Relax visibility to ease the tests.
[ "Relax", "visibility", "to", "ease", "the", "tests", "." ]
0cbe5121f2ae1ecca222513d182759210c569bec
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/control/ExtensionFactory.java#L165-L167
129,556
zaproxy/zaproxy
src/org/zaproxy/zap/extension/httpsessions/HttpSessionsPanel.java
HttpSessionsPanel.getPanelCommand
private javax.swing.JPanel getPanelCommand() { if (panelCommand == null) { panelCommand = new javax.swing.JPanel(); panelCommand.setLayout(new java.awt.GridBagLayout()); panelCommand.setName(Constant.messages.getString("httpsessions.panel.title")); // Add the two components: toolbar and work pane ...
java
private javax.swing.JPanel getPanelCommand() { if (panelCommand == null) { panelCommand = new javax.swing.JPanel(); panelCommand.setLayout(new java.awt.GridBagLayout()); panelCommand.setName(Constant.messages.getString("httpsessions.panel.title")); // Add the two components: toolbar and work pane ...
[ "private", "javax", ".", "swing", ".", "JPanel", "getPanelCommand", "(", ")", "{", "if", "(", "panelCommand", "==", "null", ")", "{", "panelCommand", "=", "new", "javax", ".", "swing", ".", "JPanel", "(", ")", ";", "panelCommand", ".", "setLayout", "(", ...
This method initializes the main panel. @return javax.swing.JPanel
[ "This", "method", "initializes", "the", "main", "panel", "." ]
0cbe5121f2ae1ecca222513d182759210c569bec
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/extension/httpsessions/HttpSessionsPanel.java#L119-L148
129,557
zaproxy/zaproxy
src/org/zaproxy/zap/extension/httpsessions/HttpSessionsPanel.java
HttpSessionsPanel.getNewSessionButton
private JButton getNewSessionButton() { if (newSessionButton == null) { newSessionButton = new JButton(); newSessionButton.setText(Constant.messages.getString("httpsessions.toolbar.newsession.label")); newSessionButton.setIcon(DisplayUtils.getScaledIcon(new ImageIcon(HttpSessionsPanel.class.getResource("...
java
private JButton getNewSessionButton() { if (newSessionButton == null) { newSessionButton = new JButton(); newSessionButton.setText(Constant.messages.getString("httpsessions.toolbar.newsession.label")); newSessionButton.setIcon(DisplayUtils.getScaledIcon(new ImageIcon(HttpSessionsPanel.class.getResource("...
[ "private", "JButton", "getNewSessionButton", "(", ")", "{", "if", "(", "newSessionButton", "==", "null", ")", "{", "newSessionButton", "=", "new", "JButton", "(", ")", ";", "newSessionButton", ".", "setText", "(", "Constant", ".", "messages", ".", "getString",...
Gets the new session button. @return the new session button
[ "Gets", "the", "new", "session", "button", "." ]
0cbe5121f2ae1ecca222513d182759210c569bec
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/extension/httpsessions/HttpSessionsPanel.java#L183-L202
129,558
zaproxy/zaproxy
src/org/zaproxy/zap/extension/httpsessions/HttpSessionsPanel.java
HttpSessionsPanel.getPanelToolbar
private javax.swing.JToolBar getPanelToolbar() { if (panelToolbar == null) { // Initialize the toolbar panelToolbar = new javax.swing.JToolBar(); panelToolbar.setLayout(new java.awt.GridBagLayout()); panelToolbar.setEnabled(true); panelToolbar.setFloatable(false); panelToolbar.setRollover(t...
java
private javax.swing.JToolBar getPanelToolbar() { if (panelToolbar == null) { // Initialize the toolbar panelToolbar = new javax.swing.JToolBar(); panelToolbar.setLayout(new java.awt.GridBagLayout()); panelToolbar.setEnabled(true); panelToolbar.setFloatable(false); panelToolbar.setRollover(t...
[ "private", "javax", ".", "swing", ".", "JToolBar", "getPanelToolbar", "(", ")", "{", "if", "(", "panelToolbar", "==", "null", ")", "{", "// Initialize the toolbar\r", "panelToolbar", "=", "new", "javax", ".", "swing", ".", "JToolBar", "(", ")", ";", "panelTo...
Gets the panel's toolbar. @return the panel toolbar
[ "Gets", "the", "panel", "s", "toolbar", "." ]
0cbe5121f2ae1ecca222513d182759210c569bec
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/extension/httpsessions/HttpSessionsPanel.java#L209-L274
129,559
zaproxy/zaproxy
src/org/zaproxy/zap/extension/httpsessions/HttpSessionsPanel.java
HttpSessionsPanel.getWorkPane
private JScrollPane getWorkPane() { if (jScrollPane == null) { jScrollPane = new JScrollPane(); jScrollPane.setViewportView(getHttpSessionsTable()); } return jScrollPane; }
java
private JScrollPane getWorkPane() { if (jScrollPane == null) { jScrollPane = new JScrollPane(); jScrollPane.setViewportView(getHttpSessionsTable()); } return jScrollPane; }
[ "private", "JScrollPane", "getWorkPane", "(", ")", "{", "if", "(", "jScrollPane", "==", "null", ")", "{", "jScrollPane", "=", "new", "JScrollPane", "(", ")", ";", "jScrollPane", ".", "setViewportView", "(", "getHttpSessionsTable", "(", ")", ")", ";", "}", ...
Gets the work pane where data is shown. @return the work pane
[ "Gets", "the", "work", "pane", "where", "data", "is", "shown", "." ]
0cbe5121f2ae1ecca222513d182759210c569bec
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/extension/httpsessions/HttpSessionsPanel.java#L281-L287
129,560
zaproxy/zaproxy
src/org/zaproxy/zap/extension/httpsessions/HttpSessionsPanel.java
HttpSessionsPanel.setSessionsTableColumnSizes
private void setSessionsTableColumnSizes() { sessionsTable.getColumnModel().getColumn(0).setMinWidth(60); sessionsTable.getColumnModel().getColumn(0).setPreferredWidth(60); // active sessionsTable.getColumnModel().getColumn(1).setMinWidth(120); sessionsTable.getColumnModel().getColumn(1).setPreferredWid...
java
private void setSessionsTableColumnSizes() { sessionsTable.getColumnModel().getColumn(0).setMinWidth(60); sessionsTable.getColumnModel().getColumn(0).setPreferredWidth(60); // active sessionsTable.getColumnModel().getColumn(1).setMinWidth(120); sessionsTable.getColumnModel().getColumn(1).setPreferredWid...
[ "private", "void", "setSessionsTableColumnSizes", "(", ")", "{", "sessionsTable", ".", "getColumnModel", "(", ")", ".", "getColumn", "(", "0", ")", ".", "setMinWidth", "(", "60", ")", ";", "sessionsTable", ".", "getColumnModel", "(", ")", ".", "getColumn", "...
Sets the sessions table column sizes.
[ "Sets", "the", "sessions", "table", "column", "sizes", "." ]
0cbe5121f2ae1ecca222513d182759210c569bec
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/extension/httpsessions/HttpSessionsPanel.java#L292-L302
129,561
zaproxy/zaproxy
src/org/zaproxy/zap/extension/httpsessions/HttpSessionsPanel.java
HttpSessionsPanel.getHttpSessionsTable
private JXTable getHttpSessionsTable() { if (sessionsTable == null) { sessionsTable = new JXTable(sessionsModel); sessionsTable.setColumnSelectionAllowed(false); sessionsTable.setCellSelectionEnabled(false); sessionsTable.setRowSelectionAllowed(true); sessionsTable.setAutoCreateRowSorter(true);...
java
private JXTable getHttpSessionsTable() { if (sessionsTable == null) { sessionsTable = new JXTable(sessionsModel); sessionsTable.setColumnSelectionAllowed(false); sessionsTable.setCellSelectionEnabled(false); sessionsTable.setRowSelectionAllowed(true); sessionsTable.setAutoCreateRowSorter(true);...
[ "private", "JXTable", "getHttpSessionsTable", "(", ")", "{", "if", "(", "sessionsTable", "==", "null", ")", "{", "sessionsTable", "=", "new", "JXTable", "(", "sessionsModel", ")", ";", "sessionsTable", ".", "setColumnSelectionAllowed", "(", "false", ")", ";", ...
Gets the http sessions table. @return the http sessions table
[ "Gets", "the", "http", "sessions", "table", "." ]
0cbe5121f2ae1ecca222513d182759210c569bec
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/extension/httpsessions/HttpSessionsPanel.java#L309-L357
129,562
zaproxy/zaproxy
src/org/zaproxy/zap/extension/httpsessions/HttpSessionsPanel.java
HttpSessionsPanel.getSiteSelect
private JComboBox<String> getSiteSelect() { if (siteSelect == null) { siteSelect = new JComboBox<>(siteModel); siteSelect.addItem(Constant.messages.getString("httpsessions.toolbar.site.select")); siteSelect.setSelectedIndex(0); // Add the item listener for when the site is selected siteSelect.a...
java
private JComboBox<String> getSiteSelect() { if (siteSelect == null) { siteSelect = new JComboBox<>(siteModel); siteSelect.addItem(Constant.messages.getString("httpsessions.toolbar.site.select")); siteSelect.setSelectedIndex(0); // Add the item listener for when the site is selected siteSelect.a...
[ "private", "JComboBox", "<", "String", ">", "getSiteSelect", "(", ")", "{", "if", "(", "siteSelect", "==", "null", ")", "{", "siteSelect", "=", "new", "JComboBox", "<>", "(", "siteModel", ")", ";", "siteSelect", ".", "addItem", "(", "Constant", ".", "mes...
Gets the site select ComboBox. @return the site select
[ "Gets", "the", "site", "select", "ComboBox", "." ]
0cbe5121f2ae1ecca222513d182759210c569bec
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/extension/httpsessions/HttpSessionsPanel.java#L364-L388
129,563
zaproxy/zaproxy
src/org/zaproxy/zap/extension/httpsessions/HttpSessionsPanel.java
HttpSessionsPanel.siteSelected
private void siteSelected(String site) { if (!site.equals(currentSite)) { this.sessionsModel = extension.getHttpSessionsSite(site).getModel(); this.getHttpSessionsTable().setModel(this.sessionsModel); this.setSessionsTableColumnSizes(); currentSite = site; } }
java
private void siteSelected(String site) { if (!site.equals(currentSite)) { this.sessionsModel = extension.getHttpSessionsSite(site).getModel(); this.getHttpSessionsTable().setModel(this.sessionsModel); this.setSessionsTableColumnSizes(); currentSite = site; } }
[ "private", "void", "siteSelected", "(", "String", "site", ")", "{", "if", "(", "!", "site", ".", "equals", "(", "currentSite", ")", ")", "{", "this", ".", "sessionsModel", "=", "extension", ".", "getHttpSessionsSite", "(", "site", ")", ".", "getModel", "...
A new Site was selected. @param site the site
[ "A", "new", "Site", "was", "selected", "." ]
0cbe5121f2ae1ecca222513d182759210c569bec
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/extension/httpsessions/HttpSessionsPanel.java#L436-L445
129,564
zaproxy/zaproxy
src/org/zaproxy/zap/extension/httpsessions/HttpSessionsPanel.java
HttpSessionsPanel.nodeSelected
public void nodeSelected(SiteNode node) { if (node != null) { siteModel.setSelectedItem(ScanPanel.cleanSiteName(node, true)); } }
java
public void nodeSelected(SiteNode node) { if (node != null) { siteModel.setSelectedItem(ScanPanel.cleanSiteName(node, true)); } }
[ "public", "void", "nodeSelected", "(", "SiteNode", "node", ")", "{", "if", "(", "node", "!=", "null", ")", "{", "siteModel", ".", "setSelectedItem", "(", "ScanPanel", ".", "cleanSiteName", "(", "node", ",", "true", ")", ")", ";", "}", "}" ]
Node selected. @param node the node
[ "Node", "selected", "." ]
0cbe5121f2ae1ecca222513d182759210c569bec
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/extension/httpsessions/HttpSessionsPanel.java#L452-L456
129,565
zaproxy/zaproxy
src/org/zaproxy/zap/extension/httpsessions/HttpSessionsPanel.java
HttpSessionsPanel.reset
public void reset() { currentSite = null; siteModel.removeAllElements(); siteModel.addElement(Constant.messages.getString("httpsessions.toolbar.site.select")); sessionsModel = new HttpSessionsTableModel(null); getHttpSessionsTable().setModel(sessionsModel); }
java
public void reset() { currentSite = null; siteModel.removeAllElements(); siteModel.addElement(Constant.messages.getString("httpsessions.toolbar.site.select")); sessionsModel = new HttpSessionsTableModel(null); getHttpSessionsTable().setModel(sessionsModel); }
[ "public", "void", "reset", "(", ")", "{", "currentSite", "=", "null", ";", "siteModel", ".", "removeAllElements", "(", ")", ";", "siteModel", ".", "addElement", "(", "Constant", ".", "messages", ".", "getString", "(", "\"httpsessions.toolbar.site.select\"", ")",...
Reset the panel.
[ "Reset", "the", "panel", "." ]
0cbe5121f2ae1ecca222513d182759210c569bec
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/extension/httpsessions/HttpSessionsPanel.java#L461-L469
129,566
zaproxy/zaproxy
src/org/zaproxy/zap/extension/httpsessions/HttpSessionsPanel.java
HttpSessionsPanel.getSelectedSession
public HttpSession getSelectedSession() { final int selectedRow = this.sessionsTable.getSelectedRow(); if (selectedRow == -1) { // No row selected return null; } final int rowIndex = sessionsTable.convertRowIndexToModel(selectedRow); return this.sessionsModel.getHttpSessionAt(rowIndex); }
java
public HttpSession getSelectedSession() { final int selectedRow = this.sessionsTable.getSelectedRow(); if (selectedRow == -1) { // No row selected return null; } final int rowIndex = sessionsTable.convertRowIndexToModel(selectedRow); return this.sessionsModel.getHttpSessionAt(rowIndex); }
[ "public", "HttpSession", "getSelectedSession", "(", ")", "{", "final", "int", "selectedRow", "=", "this", ".", "sessionsTable", ".", "getSelectedRow", "(", ")", ";", "if", "(", "selectedRow", "==", "-", "1", ")", "{", "// No row selected\r", "return", "null", ...
Gets the selected http session. @return the selected session, or null if nothing is selected
[ "Gets", "the", "selected", "http", "session", "." ]
0cbe5121f2ae1ecca222513d182759210c569bec
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/extension/httpsessions/HttpSessionsPanel.java#L497-L505
129,567
zaproxy/zaproxy
src/org/parosproxy/paros/core/scanner/AbstractPlugin.java
AbstractPlugin.setEnabled
@Override public void setEnabled(boolean enabled) { if (this.enabled != enabled) { this.enabled = enabled; setProperty("enabled", Boolean.toString(enabled)); if (enabled && getAlertThreshold() == AlertThreshold.OFF) { setAlertThreshold(AlertThreshold...
java
@Override public void setEnabled(boolean enabled) { if (this.enabled != enabled) { this.enabled = enabled; setProperty("enabled", Boolean.toString(enabled)); if (enabled && getAlertThreshold() == AlertThreshold.OFF) { setAlertThreshold(AlertThreshold...
[ "@", "Override", "public", "void", "setEnabled", "(", "boolean", "enabled", ")", "{", "if", "(", "this", ".", "enabled", "!=", "enabled", ")", "{", "this", ".", "enabled", "=", "enabled", ";", "setProperty", "(", "\"enabled\"", ",", "Boolean", ".", "toSt...
Enable this test
[ "Enable", "this", "test" ]
0cbe5121f2ae1ecca222513d182759210c569bec
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/parosproxy/paros/core/scanner/AbstractPlugin.java#L529-L538
129,568
zaproxy/zaproxy
src/org/parosproxy/paros/core/scanner/AbstractPlugin.java
AbstractPlugin.compareTo
@Override public int compareTo(Object obj) { int result = -1; if (obj instanceof AbstractPlugin) { AbstractPlugin test = (AbstractPlugin) obj; if (getId() < test.getId()) { result = -1; } else if (getId() > test.getId()) { ...
java
@Override public int compareTo(Object obj) { int result = -1; if (obj instanceof AbstractPlugin) { AbstractPlugin test = (AbstractPlugin) obj; if (getId() < test.getId()) { result = -1; } else if (getId() > test.getId()) { ...
[ "@", "Override", "public", "int", "compareTo", "(", "Object", "obj", ")", "{", "int", "result", "=", "-", "1", ";", "if", "(", "obj", "instanceof", "AbstractPlugin", ")", "{", "AbstractPlugin", "test", "=", "(", "AbstractPlugin", ")", "obj", ";", "if", ...
Compare if 2 plugin is the same.
[ "Compare", "if", "2", "plugin", "is", "the", "same", "." ]
0cbe5121f2ae1ecca222513d182759210c569bec
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/parosproxy/paros/core/scanner/AbstractPlugin.java#L666-L683
129,569
zaproxy/zaproxy
src/org/parosproxy/paros/core/scanner/AbstractPlugin.java
AbstractPlugin.matchHeaderPattern
protected boolean matchHeaderPattern(HttpMessage msg, String header, Pattern pattern) { if (msg.getResponseHeader().isEmpty()) { return false; } String val = msg.getResponseHeader().getHeader(header); if (val == null) { return false; } ...
java
protected boolean matchHeaderPattern(HttpMessage msg, String header, Pattern pattern) { if (msg.getResponseHeader().isEmpty()) { return false; } String val = msg.getResponseHeader().getHeader(header); if (val == null) { return false; } ...
[ "protected", "boolean", "matchHeaderPattern", "(", "HttpMessage", "msg", ",", "String", "header", ",", "Pattern", "pattern", ")", "{", "if", "(", "msg", ".", "getResponseHeader", "(", ")", ".", "isEmpty", "(", ")", ")", "{", "return", "false", ";", "}", ...
Check if the given pattern can be found in the header. @param msg the message that will be checked @param header the name of the header @param pattern the pattern that will be used @return true if the pattern can be found.
[ "Check", "if", "the", "given", "pattern", "can", "be", "found", "in", "the", "header", "." ]
0cbe5121f2ae1ecca222513d182759210c569bec
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/parosproxy/paros/core/scanner/AbstractPlugin.java#L707-L719
129,570
zaproxy/zaproxy
src/org/parosproxy/paros/core/scanner/AbstractPlugin.java
AbstractPlugin.matchBodyPattern
protected boolean matchBodyPattern(HttpMessage msg, Pattern pattern, StringBuilder sb) { // ZAP: Changed the type of the parameter "sb" to StringBuilder. Matcher matcher = pattern.matcher(msg.getResponseBody().toString()); boolean result = matcher.find(); if (result) { if (sb != ...
java
protected boolean matchBodyPattern(HttpMessage msg, Pattern pattern, StringBuilder sb) { // ZAP: Changed the type of the parameter "sb" to StringBuilder. Matcher matcher = pattern.matcher(msg.getResponseBody().toString()); boolean result = matcher.find(); if (result) { if (sb != ...
[ "protected", "boolean", "matchBodyPattern", "(", "HttpMessage", "msg", ",", "Pattern", "pattern", ",", "StringBuilder", "sb", ")", "{", "// ZAP: Changed the type of the parameter \"sb\" to StringBuilder.\r", "Matcher", "matcher", "=", "pattern", ".", "matcher", "(", "msg"...
Check if the given pattern can be found in the msg body. If the supplied StringBuilder is not null, append the result to the StringBuilder. @param msg the message that will be checked @param pattern the pattern that will be used @param sb where the regex match should be appended @return true if the pattern can be foun...
[ "Check", "if", "the", "given", "pattern", "can", "be", "found", "in", "the", "msg", "body", ".", "If", "the", "supplied", "StringBuilder", "is", "not", "null", "append", "the", "result", "to", "the", "StringBuilder", "." ]
0cbe5121f2ae1ecca222513d182759210c569bec
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/parosproxy/paros/core/scanner/AbstractPlugin.java#L730-L739
129,571
zaproxy/zaproxy
src/org/apache/commons/httpclient/HttpConnection.java
HttpConnection.setHost
public void setHost(String host) throws IllegalStateException { if (host == null) { throw new IllegalArgumentException("host parameter is null"); } assertNotOpen(); hostName = host; }
java
public void setHost(String host) throws IllegalStateException { if (host == null) { throw new IllegalArgumentException("host parameter is null"); } assertNotOpen(); hostName = host; }
[ "public", "void", "setHost", "(", "String", "host", ")", "throws", "IllegalStateException", "{", "if", "(", "host", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"host parameter is null\"", ")", ";", "}", "assertNotOpen", "(", ")", ...
Sets the host to connect to. @param host the host to connect to. Parameter value must be non-null. @throws IllegalStateException if the connection is already open
[ "Sets", "the", "host", "to", "connect", "to", "." ]
0cbe5121f2ae1ecca222513d182759210c569bec
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/apache/commons/httpclient/HttpConnection.java#L261-L267
129,572
zaproxy/zaproxy
src/org/apache/commons/httpclient/HttpConnection.java
HttpConnection.isStale
protected boolean isStale() throws IOException { boolean isStale = true; if (isOpen) { // the connection is open, but now we have to see if we can read it // assume the connection is not stale. isStale = false; try { if (inputStream.availab...
java
protected boolean isStale() throws IOException { boolean isStale = true; if (isOpen) { // the connection is open, but now we have to see if we can read it // assume the connection is not stale. isStale = false; try { if (inputStream.availab...
[ "protected", "boolean", "isStale", "(", ")", "throws", "IOException", "{", "boolean", "isStale", "=", "true", ";", "if", "(", "isOpen", ")", "{", "// the connection is open, but now we have to see if we can read it", "// assume the connection is not stale.", "isStale", "=",...
Determines whether this connection is "stale", which is to say that either it is no longer open, or an attempt to read the connection would fail. <p>Unfortunately, due to the limitations of the JREs prior to 1.4, it is not possible to test a connection to see if both the read and write channels are open - except by re...
[ "Determines", "whether", "this", "connection", "is", "stale", "which", "is", "to", "say", "that", "either", "it", "is", "no", "longer", "open", "or", "an", "attempt", "to", "read", "the", "connection", "would", "fail", "." ]
0cbe5121f2ae1ecca222513d182759210c569bec
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/apache/commons/httpclient/HttpConnection.java#L513-L552
129,573
zaproxy/zaproxy
src/org/apache/commons/httpclient/HttpConnection.java
HttpConnection.tunnelCreated
public void tunnelCreated() throws IllegalStateException, IOException { LOG.trace("enter HttpConnection.tunnelCreated()"); if (!isTunnelRequired()) { throw new IllegalStateException( "Connection must be secure " + "and proxied or a tunnel requested to use...
java
public void tunnelCreated() throws IllegalStateException, IOException { LOG.trace("enter HttpConnection.tunnelCreated()"); if (!isTunnelRequired()) { throw new IllegalStateException( "Connection must be secure " + "and proxied or a tunnel requested to use...
[ "public", "void", "tunnelCreated", "(", ")", "throws", "IllegalStateException", ",", "IOException", "{", "LOG", ".", "trace", "(", "\"enter HttpConnection.tunnelCreated()\"", ")", ";", "if", "(", "!", "isTunnelRequired", "(", ")", ")", "{", "throw", "new", "Ille...
Instructs the proxy to establish a secure tunnel to the host. The socket will be switched to the secure socket. Subsequent communication is done via the secure socket. The method can only be called once on a proxied secure connection. @throws IllegalStateException if connection is not secure and proxied or if the sock...
[ "Instructs", "the", "proxy", "to", "establish", "a", "secure", "tunnel", "to", "the", "host", ".", "The", "socket", "will", "be", "switched", "to", "the", "secure", "socket", ".", "Subsequent", "communication", "is", "done", "via", "the", "secure", "socket",...
0cbe5121f2ae1ecca222513d182759210c569bec
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/apache/commons/httpclient/HttpConnection.java#L787-L831
129,574
zaproxy/zaproxy
src/org/apache/commons/httpclient/HttpConnection.java
HttpConnection.isResponseAvailable
public boolean isResponseAvailable(int timeout) throws IOException { LOG.trace("enter HttpConnection.isResponseAvailable(int)"); if (!this.isOpen) { return false; } boolean result = false; if (this.inputStream.available() > 0) { result = true; ...
java
public boolean isResponseAvailable(int timeout) throws IOException { LOG.trace("enter HttpConnection.isResponseAvailable(int)"); if (!this.isOpen) { return false; } boolean result = false; if (this.inputStream.available() > 0) { result = true; ...
[ "public", "boolean", "isResponseAvailable", "(", "int", "timeout", ")", "throws", "IOException", "{", "LOG", ".", "trace", "(", "\"enter HttpConnection.isResponseAvailable(int)\"", ")", ";", "if", "(", "!", "this", ".", "isOpen", ")", "{", "return", "false", ";"...
Tests if input data becomes available within the given period time in milliseconds. @param timeout The number milliseconds to wait for input data to become available @return boolean <tt>true</tt> if input data is availble, <tt>false</tt> otherwise. @throws IOException If an IO problem occurs @throws IllegalStateExcep...
[ "Tests", "if", "input", "data", "becomes", "available", "within", "the", "given", "period", "time", "in", "milliseconds", "." ]
0cbe5121f2ae1ecca222513d182759210c569bec
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/apache/commons/httpclient/HttpConnection.java#L924-L964
129,575
zaproxy/zaproxy
src/org/apache/commons/httpclient/HttpConnection.java
HttpConnection.write
public void write(byte[] data) throws IOException, IllegalStateException { LOG.trace("enter HttpConnection.write(byte[])"); this.write(data, 0, data.length); }
java
public void write(byte[] data) throws IOException, IllegalStateException { LOG.trace("enter HttpConnection.write(byte[])"); this.write(data, 0, data.length); }
[ "public", "void", "write", "(", "byte", "[", "]", "data", ")", "throws", "IOException", ",", "IllegalStateException", "{", "LOG", ".", "trace", "(", "\"enter HttpConnection.write(byte[])\"", ")", ";", "this", ".", "write", "(", "data", ",", "0", ",", "data",...
Writes the specified bytes to the output stream. @param data the data to be written @throws IllegalStateException if not connected @throws IOException if an I/O problem occurs @see #write(byte[],int,int)
[ "Writes", "the", "specified", "bytes", "to", "the", "output", "stream", "." ]
0cbe5121f2ae1ecca222513d182759210c569bec
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/apache/commons/httpclient/HttpConnection.java#L974-L978
129,576
zaproxy/zaproxy
src/org/apache/commons/httpclient/HttpConnection.java
HttpConnection.releaseConnection
public void releaseConnection() { LOG.trace("enter HttpConnection.releaseConnection()"); if (locked) { LOG.debug("Connection is locked. Call to releaseConnection() ignored."); } else if (httpConnectionManager != null) { LOG.debug("Releasing connection back to connection ...
java
public void releaseConnection() { LOG.trace("enter HttpConnection.releaseConnection()"); if (locked) { LOG.debug("Connection is locked. Call to releaseConnection() ignored."); } else if (httpConnectionManager != null) { LOG.debug("Releasing connection back to connection ...
[ "public", "void", "releaseConnection", "(", ")", "{", "LOG", ".", "trace", "(", "\"enter HttpConnection.releaseConnection()\"", ")", ";", "if", "(", "locked", ")", "{", "LOG", ".", "debug", "(", "\"Connection is locked. Call to releaseConnection() ignored.\"", ")", "...
Releases the connection. If the connection is locked or does not have a connection manager associated with it, this method has no effect. Note that it is completely safe to call this method multiple times.
[ "Releases", "the", "connection", ".", "If", "the", "connection", "is", "locked", "or", "does", "not", "have", "a", "connection", "manager", "associated", "with", "it", "this", "method", "has", "no", "effect", ".", "Note", "that", "it", "is", "completely", ...
0cbe5121f2ae1ecca222513d182759210c569bec
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/apache/commons/httpclient/HttpConnection.java#L1204-L1214
129,577
zaproxy/zaproxy
src/org/apache/commons/httpclient/HttpConnection.java
HttpConnection.closeSocketAndStreams
protected void closeSocketAndStreams() { LOG.trace("enter HttpConnection.closeSockedAndStreams()"); isOpen = false; // no longer care about previous responses... lastResponseInputStream = null; if (null != outputStream) { OutputStream temp = outputStream; ...
java
protected void closeSocketAndStreams() { LOG.trace("enter HttpConnection.closeSockedAndStreams()"); isOpen = false; // no longer care about previous responses... lastResponseInputStream = null; if (null != outputStream) { OutputStream temp = outputStream; ...
[ "protected", "void", "closeSocketAndStreams", "(", ")", "{", "LOG", ".", "trace", "(", "\"enter HttpConnection.closeSockedAndStreams()\"", ")", ";", "isOpen", "=", "false", ";", "// no longer care about previous responses...", "lastResponseInputStream", "=", "null", ";", ...
Closes everything out.
[ "Closes", "everything", "out", "." ]
0cbe5121f2ae1ecca222513d182759210c569bec
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/apache/commons/httpclient/HttpConnection.java#L1245-L1288
129,578
zaproxy/zaproxy
src/org/parosproxy/paros/security/SslCertificateServiceImpl.java
SslCertificateServiceImpl.createKeyPair
private KeyPair createKeyPair() throws NoSuchAlgorithmException { final KeyPairGenerator keyGen = KeyPairGenerator.getInstance("RSA"); final SecureRandom random = SecureRandom.getInstance("SHA1PRNG"); random.setSeed(Long.toString(System.currentTimeMillis()).getBytes()); keyGen.initialize(2048, random); ...
java
private KeyPair createKeyPair() throws NoSuchAlgorithmException { final KeyPairGenerator keyGen = KeyPairGenerator.getInstance("RSA"); final SecureRandom random = SecureRandom.getInstance("SHA1PRNG"); random.setSeed(Long.toString(System.currentTimeMillis()).getBytes()); keyGen.initialize(2048, random); ...
[ "private", "KeyPair", "createKeyPair", "(", ")", "throws", "NoSuchAlgorithmException", "{", "final", "KeyPairGenerator", "keyGen", "=", "KeyPairGenerator", ".", "getInstance", "(", "\"RSA\"", ")", ";", "final", "SecureRandom", "random", "=", "SecureRandom", ".", "ge...
Generates a 2048 bit RSA key pair using SHA1PRNG. @return the key pair @throws NoSuchAlgorithmException if no provider supports the used algorithms.
[ "Generates", "a", "2048", "bit", "RSA", "key", "pair", "using", "SHA1PRNG", "." ]
0cbe5121f2ae1ecca222513d182759210c569bec
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/parosproxy/paros/security/SslCertificateServiceImpl.java#L190-L197
129,579
zaproxy/zaproxy
src/org/zaproxy/zap/extension/ascan/ChallengeCallbackAPI.java
ChallengeCallbackAPI.cleanExpiredCallbacks
public void cleanExpiredCallbacks() { long now = System.currentTimeMillis(); // Cuncurrency could be possible for multiple instantiations synchronized(regCallbacks) { Iterator<Map.Entry<String, RegisteredCallback>> it = regCallbacks.entrySet().iterator(); Map...
java
public void cleanExpiredCallbacks() { long now = System.currentTimeMillis(); // Cuncurrency could be possible for multiple instantiations synchronized(regCallbacks) { Iterator<Map.Entry<String, RegisteredCallback>> it = regCallbacks.entrySet().iterator(); Map...
[ "public", "void", "cleanExpiredCallbacks", "(", ")", "{", "long", "now", "=", "System", ".", "currentTimeMillis", "(", ")", ";", "// Cuncurrency could be possible for multiple instantiations", "synchronized", "(", "regCallbacks", ")", "{", "Iterator", "<", "Map", ".",...
Expire callbacks cleaning method. When called it remove from the received callbacks list all the sent challenge which haven't received any answer till now according to an expiring constraint. Currently the cleaning is done for every new inserting and every received callback, but it can be done also with a scheduled cle...
[ "Expire", "callbacks", "cleaning", "method", ".", "When", "called", "it", "remove", "from", "the", "received", "callbacks", "list", "all", "the", "sent", "challenge", "which", "haven", "t", "received", "any", "answer", "till", "now", "according", "to", "an", ...
0cbe5121f2ae1ecca222513d182759210c569bec
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/extension/ascan/ChallengeCallbackAPI.java#L83-L98
129,580
zaproxy/zaproxy
src/org/zaproxy/zap/extension/ascan/ChallengeCallbackAPI.java
ChallengeCallbackAPI.getCallbackUrl
public String getCallbackUrl(String challenge) { return "http://" + Model.getSingleton().getOptionsParam().getProxyParam().getProxyIp() + ":" + Model.getSingleton().getOptionsParam().getProxyParam().getProxyPort() + "/" + getPrefix() + "/" + challe...
java
public String getCallbackUrl(String challenge) { return "http://" + Model.getSingleton().getOptionsParam().getProxyParam().getProxyIp() + ":" + Model.getSingleton().getOptionsParam().getProxyParam().getProxyPort() + "/" + getPrefix() + "/" + challe...
[ "public", "String", "getCallbackUrl", "(", "String", "challenge", ")", "{", "return", "\"http://\"", "+", "Model", ".", "getSingleton", "(", ")", ".", "getOptionsParam", "(", ")", ".", "getProxyParam", "(", ")", ".", "getProxyIp", "(", ")", "+", "\":\"", "...
Gets the ZAP API URL to a challenge endpoint. @param challenge the last segment of the path for the challenge endpoint @return a ZAP API URL to access the the challenge endpoint
[ "Gets", "the", "ZAP", "API", "URL", "to", "a", "challenge", "endpoint", "." ]
0cbe5121f2ae1ecca222513d182759210c569bec
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/extension/ascan/ChallengeCallbackAPI.java#L106-L112
129,581
zaproxy/zaproxy
src/org/zaproxy/zap/extension/ascan/ChallengeCallbackAPI.java
ChallengeCallbackAPI.handleShortcut
@Override public HttpMessage handleShortcut(HttpMessage msg) throws ApiException { // We've to look at the name and verify if the challenge has // been registered by one of the executed plugins // ---------------- // http://<zap_IP>/json/xxe/other/NGFrteu568sgToo100 // -----...
java
@Override public HttpMessage handleShortcut(HttpMessage msg) throws ApiException { // We've to look at the name and verify if the challenge has // been registered by one of the executed plugins // ---------------- // http://<zap_IP>/json/xxe/other/NGFrteu568sgToo100 // -----...
[ "@", "Override", "public", "HttpMessage", "handleShortcut", "(", "HttpMessage", "msg", ")", "throws", "ApiException", "{", "// We've to look at the name and verify if the challenge has", "// been registered by one of the executed plugins ", "// ----------------", "// http://<zap_IP>/js...
Handles the given message, which might contain a challenge request. @param msg the HTTP message of the ZAP API request @return the HTTP message containing the response to the challenge @throws ApiException if an error occurred while handling the challenge request
[ "Handles", "the", "given", "message", "which", "might", "contain", "a", "challenge", "request", "." ]
0cbe5121f2ae1ecca222513d182759210c569bec
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/extension/ascan/ChallengeCallbackAPI.java#L121-L163
129,582
zaproxy/zaproxy
src/org/zaproxy/zap/extension/ascan/ChallengeCallbackAPI.java
ChallengeCallbackAPI.registerCallback
public void registerCallback(String challenge, ChallengeCallbackPlugin plugin, HttpMessage attack) { // Maybe we'va a lot of dirty entries cleanExpiredCallbacks(); // Already synchronized (no need for a monitor) regCallbacks.put(challenge, new RegisteredCallback(plugin, attack))...
java
public void registerCallback(String challenge, ChallengeCallbackPlugin plugin, HttpMessage attack) { // Maybe we'va a lot of dirty entries cleanExpiredCallbacks(); // Already synchronized (no need for a monitor) regCallbacks.put(challenge, new RegisteredCallback(plugin, attack))...
[ "public", "void", "registerCallback", "(", "String", "challenge", ",", "ChallengeCallbackPlugin", "plugin", ",", "HttpMessage", "attack", ")", "{", "// Maybe we'va a lot of dirty entries", "cleanExpiredCallbacks", "(", ")", ";", "// Already synchronized (no need for a monitor)"...
Registers a new ZAP API challenge. @param challenge the challenge @param plugin the plugin that will be notified if the challenge is requested @param attack the message that contains the attack that reproduces the issue
[ "Registers", "a", "new", "ZAP", "API", "challenge", "." ]
0cbe5121f2ae1ecca222513d182759210c569bec
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/extension/ascan/ChallengeCallbackAPI.java#L172-L178
129,583
zaproxy/zaproxy
src/org/zaproxy/zap/extension/brk/BreakpointsParam.java
BreakpointsParam.setConfirmDropMessage
public void setConfirmDropMessage(boolean confirmDrop) { if (confirmDropMessage != confirmDrop) { this.confirmDropMessage = confirmDrop; getConfig().setProperty(PARAM_CONFIRM_DROP_MESSAGE_KEY, confirmDrop); } }
java
public void setConfirmDropMessage(boolean confirmDrop) { if (confirmDropMessage != confirmDrop) { this.confirmDropMessage = confirmDrop; getConfig().setProperty(PARAM_CONFIRM_DROP_MESSAGE_KEY, confirmDrop); } }
[ "public", "void", "setConfirmDropMessage", "(", "boolean", "confirmDrop", ")", "{", "if", "(", "confirmDropMessage", "!=", "confirmDrop", ")", "{", "this", ".", "confirmDropMessage", "=", "confirmDrop", ";", "getConfig", "(", ")", ".", "setProperty", "(", "PARAM...
Sets whether the user should confirm the drop of the trapped message. @param confirmDrop {@code true} if the user should confirm the drop, {@code false} otherwise @see #isConfirmDropMessage() @see org.zaproxy.zap.extension.brk.BreakPanelToolbarFactory#getBtnDrop()
[ "Sets", "whether", "the", "user", "should", "confirm", "the", "drop", "of", "the", "trapped", "message", "." ]
0cbe5121f2ae1ecca222513d182759210c569bec
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/extension/brk/BreakpointsParam.java#L95-L100
129,584
zaproxy/zaproxy
src/org/parosproxy/paros/db/AbstractDatabase.java
AbstractDatabase.notifyListenersDatabaseOpen
protected void notifyListenersDatabaseOpen(Collection<DatabaseListener> listeners, DatabaseServer databaseServer) throws DatabaseException { for (DatabaseListener databaseListener : listeners) { try { databaseListener.databaseOpen(databaseServer); } catch (Dat...
java
protected void notifyListenersDatabaseOpen(Collection<DatabaseListener> listeners, DatabaseServer databaseServer) throws DatabaseException { for (DatabaseListener databaseListener : listeners) { try { databaseListener.databaseOpen(databaseServer); } catch (Dat...
[ "protected", "void", "notifyListenersDatabaseOpen", "(", "Collection", "<", "DatabaseListener", ">", "listeners", ",", "DatabaseServer", "databaseServer", ")", "throws", "DatabaseException", "{", "for", "(", "DatabaseListener", "databaseListener", ":", "listeners", ")", ...
Notifies the given listeners that the given database server was opened. @param listeners the listeners that will be notified @param databaseServer the database server that was opened @throws DatabaseException if an error occurred while notifying the database listeners.
[ "Notifies", "the", "given", "listeners", "that", "the", "given", "database", "server", "was", "opened", "." ]
0cbe5121f2ae1ecca222513d182759210c569bec
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/parosproxy/paros/db/AbstractDatabase.java#L94-L103
129,585
zaproxy/zaproxy
src/org/parosproxy/paros/extension/filter/AllFilterTableRenderer.java
AllFilterTableRenderer.getTableCellRendererComponent
@Override public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int rowIndex, int vColIndex) { // 'value' is value contained in the cell located at // (rowIndex, vColIndex) if (isSelected) { // c...
java
@Override public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int rowIndex, int vColIndex) { // 'value' is value contained in the cell located at // (rowIndex, vColIndex) if (isSelected) { // c...
[ "@", "Override", "public", "Component", "getTableCellRendererComponent", "(", "JTable", "table", ",", "Object", "value", ",", "boolean", "isSelected", ",", "boolean", "hasFocus", ",", "int", "rowIndex", ",", "int", "vColIndex", ")", "{", "// 'value' is value contain...
using this renderer needs to be rendered.
[ "using", "this", "renderer", "needs", "to", "be", "rendered", "." ]
0cbe5121f2ae1ecca222513d182759210c569bec
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/parosproxy/paros/extension/filter/AllFilterTableRenderer.java#L53-L79
129,586
zaproxy/zaproxy
src/org/zaproxy/zap/extension/api/OptionsParamApi.java
OptionsParamApi.isPermittedAddress
public boolean isPermittedAddress(String addr) { if (addr == null || addr.isEmpty()) { return false; } for (DomainMatcher permAddr : permittedAddressesEnabled) { if (permAddr.matches(addr)) { return true; } } return f...
java
public boolean isPermittedAddress(String addr) { if (addr == null || addr.isEmpty()) { return false; } for (DomainMatcher permAddr : permittedAddressesEnabled) { if (permAddr.matches(addr)) { return true; } } return f...
[ "public", "boolean", "isPermittedAddress", "(", "String", "addr", ")", "{", "if", "(", "addr", "==", "null", "||", "addr", ".", "isEmpty", "(", ")", ")", "{", "return", "false", ";", "}", "for", "(", "DomainMatcher", "permAddr", ":", "permittedAddressesEna...
Tells whether or not the given client address is allowed to access the API. @param addr the client address to be checked @return {@code true} if the given client address is allowed to access the API, {@code false} otherwise. @since 2.6.0
[ "Tells", "whether", "or", "not", "the", "given", "client", "address", "is", "allowed", "to", "access", "the", "API", "." ]
0cbe5121f2ae1ecca222513d182759210c569bec
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/extension/api/OptionsParamApi.java#L226-L237
129,587
zaproxy/zaproxy
src/org/zaproxy/zap/extension/api/OptionsParamApi.java
OptionsParamApi.setPermittedAddresses
public void setPermittedAddresses(List<DomainMatcher> addrs) { if (addrs == null || addrs.isEmpty()) { ((HierarchicalConfiguration) getConfig()).clearTree(ADDRESS_KEY); this.permittedAddresses = Collections.emptyList(); this.permittedAddressesEnabled = Collections.empty...
java
public void setPermittedAddresses(List<DomainMatcher> addrs) { if (addrs == null || addrs.isEmpty()) { ((HierarchicalConfiguration) getConfig()).clearTree(ADDRESS_KEY); this.permittedAddresses = Collections.emptyList(); this.permittedAddressesEnabled = Collections.empty...
[ "public", "void", "setPermittedAddresses", "(", "List", "<", "DomainMatcher", ">", "addrs", ")", "{", "if", "(", "addrs", "==", "null", "||", "addrs", ".", "isEmpty", "(", ")", ")", "{", "(", "(", "HierarchicalConfiguration", ")", "getConfig", "(", ")", ...
Sets the client addresses that will be allowed to access the API. @param addrs the client addresses that will be allowed to access the API. @since 2.6.0
[ "Sets", "the", "client", "addresses", "that", "will", "be", "allowed", "to", "access", "the", "API", "." ]
0cbe5121f2ae1ecca222513d182759210c569bec
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/extension/api/OptionsParamApi.java#L267-L297
129,588
zaproxy/zaproxy
src/org/zaproxy/zap/view/panels/AbstractScanToolbarStatusPanel.java
AbstractScanToolbarStatusPanel.pauseScan
protected void pauseScan(Context context) { log.debug("Access Control pause on Context: " + context); threadManager.getScannerThread(context.getIndex()).pauseScan(); }
java
protected void pauseScan(Context context) { log.debug("Access Control pause on Context: " + context); threadManager.getScannerThread(context.getIndex()).pauseScan(); }
[ "protected", "void", "pauseScan", "(", "Context", "context", ")", "{", "log", ".", "debug", "(", "\"Access Control pause on Context: \"", "+", "context", ")", ";", "threadManager", ".", "getScannerThread", "(", "context", ".", "getIndex", "(", ")", ")", ".", "...
Method called when the pause button is pressed. Base implementation forward the calls to the Scanner Thread that corresponds to the provided Context and obtained via the Thread Manager specified in the constructor. @param context the context whose scan should be paused
[ "Method", "called", "when", "the", "pause", "button", "is", "pressed", ".", "Base", "implementation", "forward", "the", "calls", "to", "the", "Scanner", "Thread", "that", "corresponds", "to", "the", "provided", "Context", "and", "obtained", "via", "the", "Thre...
0cbe5121f2ae1ecca222513d182759210c569bec
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/view/panels/AbstractScanToolbarStatusPanel.java#L286-L289
129,589
zaproxy/zaproxy
src/org/zaproxy/zap/view/panels/AbstractScanToolbarStatusPanel.java
AbstractScanToolbarStatusPanel.resumeScan
protected void resumeScan(Context context) { log.debug("Access Control resume on Context: " + context); threadManager.getScannerThread(context.getIndex()).resumeScan(); }
java
protected void resumeScan(Context context) { log.debug("Access Control resume on Context: " + context); threadManager.getScannerThread(context.getIndex()).resumeScan(); }
[ "protected", "void", "resumeScan", "(", "Context", "context", ")", "{", "log", ".", "debug", "(", "\"Access Control resume on Context: \"", "+", "context", ")", ";", "threadManager", ".", "getScannerThread", "(", "context", ".", "getIndex", "(", ")", ")", ".", ...
Method called when the resume button is pressed. Base implementation forward the calls to the Scanner Thread that corresponds to the provided Context and obtained via the Thread Manager specified in the constructor. @param context the context whose scan should be resumed
[ "Method", "called", "when", "the", "resume", "button", "is", "pressed", ".", "Base", "implementation", "forward", "the", "calls", "to", "the", "Scanner", "Thread", "that", "corresponds", "to", "the", "provided", "Context", "and", "obtained", "via", "the", "Thr...
0cbe5121f2ae1ecca222513d182759210c569bec
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/view/panels/AbstractScanToolbarStatusPanel.java#L297-L300
129,590
zaproxy/zaproxy
src/org/zaproxy/zap/view/panels/AbstractScanToolbarStatusPanel.java
AbstractScanToolbarStatusPanel.stopScan
protected void stopScan(Context context) { log.debug("Access Control stop on Context: " + context); threadManager.getScannerThread(context.getIndex()).stopScan(); }
java
protected void stopScan(Context context) { log.debug("Access Control stop on Context: " + context); threadManager.getScannerThread(context.getIndex()).stopScan(); }
[ "protected", "void", "stopScan", "(", "Context", "context", ")", "{", "log", ".", "debug", "(", "\"Access Control stop on Context: \"", "+", "context", ")", ";", "threadManager", ".", "getScannerThread", "(", "context", ".", "getIndex", "(", ")", ")", ".", "st...
Method called when the stop button is pressed. Base implementation forward the calls to the Scanner Thread that corresponds to the provided Context and obtained via the Thread Manager specified in the constructor. @param context the context whose scan should be stopped
[ "Method", "called", "when", "the", "stop", "button", "is", "pressed", ".", "Base", "implementation", "forward", "the", "calls", "to", "the", "Scanner", "Thread", "that", "corresponds", "to", "the", "provided", "Context", "and", "obtained", "via", "the", "Threa...
0cbe5121f2ae1ecca222513d182759210c569bec
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/view/panels/AbstractScanToolbarStatusPanel.java#L308-L311
129,591
zaproxy/zaproxy
src/org/parosproxy/paros/view/AbstractParamContainerPanel.java
AbstractParamContainerPanel.getTreeParam
private JTree getTreeParam() { if (treeParam == null) { treeParam = new JTree(); treeParam.setModel(getTreeModel()); treeParam.setShowsRootHandles(true); treeParam.setRootVisible(true); treeParam.addTreeSelectionListener(new javax.swing.event.Tre...
java
private JTree getTreeParam() { if (treeParam == null) { treeParam = new JTree(); treeParam.setModel(getTreeModel()); treeParam.setShowsRootHandles(true); treeParam.setRootVisible(true); treeParam.addTreeSelectionListener(new javax.swing.event.Tre...
[ "private", "JTree", "getTreeParam", "(", ")", "{", "if", "(", "treeParam", "==", "null", ")", "{", "treeParam", "=", "new", "JTree", "(", ")", ";", "treeParam", ".", "setModel", "(", "getTreeModel", "(", ")", ")", ";", "treeParam", ".", "setShowsRootHand...
This method initializes treeParam @return javax.swing.JTree
[ "This", "method", "initializes", "treeParam" ]
0cbe5121f2ae1ecca222513d182759210c569bec
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/parosproxy/paros/view/AbstractParamContainerPanel.java#L187-L226
129,592
zaproxy/zaproxy
src/org/parosproxy/paros/view/AbstractParamContainerPanel.java
AbstractParamContainerPanel.getTxtHeadline
private ZapTextField getTxtHeadline() { if (txtHeadline == null) { txtHeadline = new ZapTextField(); txtHeadline.setBorder(javax.swing.BorderFactory.createEtchedBorder(javax.swing.border.EtchedBorder.RAISED)); txtHeadline.setEditable(false); txtHeadline.setEn...
java
private ZapTextField getTxtHeadline() { if (txtHeadline == null) { txtHeadline = new ZapTextField(); txtHeadline.setBorder(javax.swing.BorderFactory.createEtchedBorder(javax.swing.border.EtchedBorder.RAISED)); txtHeadline.setEditable(false); txtHeadline.setEn...
[ "private", "ZapTextField", "getTxtHeadline", "(", ")", "{", "if", "(", "txtHeadline", "==", "null", ")", "{", "txtHeadline", "=", "new", "ZapTextField", "(", ")", ";", "txtHeadline", ".", "setBorder", "(", "javax", ".", "swing", ".", "BorderFactory", ".", ...
Gets text field that shows the name of the selected panel. @return the text field that shows the name of the selected panel
[ "Gets", "text", "field", "that", "shows", "the", "name", "of", "the", "selected", "panel", "." ]
0cbe5121f2ae1ecca222513d182759210c569bec
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/parosproxy/paros/view/AbstractParamContainerPanel.java#L288-L299
129,593
zaproxy/zaproxy
src/org/parosproxy/paros/view/AbstractParamContainerPanel.java
AbstractParamContainerPanel.getTreeModel
private DefaultTreeModel getTreeModel() { if (treeModel == null) { treeModel = new DefaultTreeModel(getRootNode()); treeModel.setRoot(getRootNode()); } return treeModel; }
java
private DefaultTreeModel getTreeModel() { if (treeModel == null) { treeModel = new DefaultTreeModel(getRootNode()); treeModel.setRoot(getRootNode()); } return treeModel; }
[ "private", "DefaultTreeModel", "getTreeModel", "(", ")", "{", "if", "(", "treeModel", "==", "null", ")", "{", "treeModel", "=", "new", "DefaultTreeModel", "(", "getRootNode", "(", ")", ")", ";", "treeModel", ".", "setRoot", "(", "getRootNode", "(", ")", ")...
This method initializes treeModel @return javax.swing.tree.DefaultTreeModel
[ "This", "method", "initializes", "treeModel" ]
0cbe5121f2ae1ecca222513d182759210c569bec
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/parosproxy/paros/view/AbstractParamContainerPanel.java#L306-L313
129,594
zaproxy/zaproxy
src/org/parosproxy/paros/view/AbstractParamContainerPanel.java
AbstractParamContainerPanel.removeParamPanel
public void removeParamPanel(AbstractParamPanel panel) { if (currentShownPanel == panel) { currentShownPanel = null; nameLastSelectedPanel = null; if (isShowing()) { if (tablePanel.isEmpty()) { getTxtHeadline().setText(""); ...
java
public void removeParamPanel(AbstractParamPanel panel) { if (currentShownPanel == panel) { currentShownPanel = null; nameLastSelectedPanel = null; if (isShowing()) { if (tablePanel.isEmpty()) { getTxtHeadline().setText(""); ...
[ "public", "void", "removeParamPanel", "(", "AbstractParamPanel", "panel", ")", "{", "if", "(", "currentShownPanel", "==", "panel", ")", "{", "currentShownPanel", "=", "null", ";", "nameLastSelectedPanel", "=", "null", ";", "if", "(", "isShowing", "(", ")", ")"...
Removes the given panel. @param panel the panel that will be removed
[ "Removes", "the", "given", "panel", "." ]
0cbe5121f2ae1ecca222513d182759210c569bec
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/parosproxy/paros/view/AbstractParamContainerPanel.java#L417-L438
129,595
zaproxy/zaproxy
src/org/parosproxy/paros/view/AbstractParamContainerPanel.java
AbstractParamContainerPanel.initParam
public void initParam(Object obj) { paramObject = obj; Enumeration<AbstractParamPanel> en = tablePanel.elements(); AbstractParamPanel panel = null; while (en.hasMoreElements()) { panel = en.nextElement(); panel.initParam(obj); } }
java
public void initParam(Object obj) { paramObject = obj; Enumeration<AbstractParamPanel> en = tablePanel.elements(); AbstractParamPanel panel = null; while (en.hasMoreElements()) { panel = en.nextElement(); panel.initParam(obj); } }
[ "public", "void", "initParam", "(", "Object", "obj", ")", "{", "paramObject", "=", "obj", ";", "Enumeration", "<", "AbstractParamPanel", ">", "en", "=", "tablePanel", ".", "elements", "(", ")", ";", "AbstractParamPanel", "panel", "=", "null", ";", "while", ...
Initialises all panels with the given object. @param obj the object that contains the data to be shown in the panels and save them @see #validateParam() @see #saveParam()
[ "Initialises", "all", "panels", "with", "the", "given", "object", "." ]
0cbe5121f2ae1ecca222513d182759210c569bec
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/parosproxy/paros/view/AbstractParamContainerPanel.java#L545-L553
129,596
zaproxy/zaproxy
src/org/parosproxy/paros/view/AbstractParamContainerPanel.java
AbstractParamContainerPanel.expandParamPanelNode
public void expandParamPanelNode(String panelName) { DefaultMutableTreeNode node = getTreeNodeFromPanelName(panelName); if (node != null) { getTreeParam().expandPath(new TreePath(node.getPath())); } }
java
public void expandParamPanelNode(String panelName) { DefaultMutableTreeNode node = getTreeNodeFromPanelName(panelName); if (node != null) { getTreeParam().expandPath(new TreePath(node.getPath())); } }
[ "public", "void", "expandParamPanelNode", "(", "String", "panelName", ")", "{", "DefaultMutableTreeNode", "node", "=", "getTreeNodeFromPanelName", "(", "panelName", ")", ";", "if", "(", "node", "!=", "null", ")", "{", "getTreeParam", "(", ")", ".", "expandPath",...
Expands the node of the param panel with the given name. @param panelName the name of the panel whose node should be expanded, should not be {@code null}. @since TODO add version
[ "Expands", "the", "node", "of", "the", "param", "panel", "with", "the", "given", "name", "." ]
0cbe5121f2ae1ecca222513d182759210c569bec
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/parosproxy/paros/view/AbstractParamContainerPanel.java#L608-L613
129,597
zaproxy/zaproxy
src/org/parosproxy/paros/view/AbstractParamContainerPanel.java
AbstractParamContainerPanel.isParamPanelSelected
public boolean isParamPanelSelected(String panelName) { DefaultMutableTreeNode node = getTreeNodeFromPanelName(panelName); if (node != null) { return getTreeParam().isPathSelected(new TreePath(node.getPath())); } return false; }
java
public boolean isParamPanelSelected(String panelName) { DefaultMutableTreeNode node = getTreeNodeFromPanelName(panelName); if (node != null) { return getTreeParam().isPathSelected(new TreePath(node.getPath())); } return false; }
[ "public", "boolean", "isParamPanelSelected", "(", "String", "panelName", ")", "{", "DefaultMutableTreeNode", "node", "=", "getTreeNodeFromPanelName", "(", "panelName", ")", ";", "if", "(", "node", "!=", "null", ")", "{", "return", "getTreeParam", "(", ")", ".", ...
Tells whether or not the given param panel is selected. @param panelName the name of the panel to check if it is selected, should not be {@code null}. @return {@code true} if the panel is selected, {@code false} otherwise. @since TODO add version @see #isParamPanelOrChildSelected(String)
[ "Tells", "whether", "or", "not", "the", "given", "param", "panel", "is", "selected", "." ]
0cbe5121f2ae1ecca222513d182759210c569bec
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/parosproxy/paros/view/AbstractParamContainerPanel.java#L623-L629
129,598
zaproxy/zaproxy
src/org/parosproxy/paros/view/AbstractParamContainerPanel.java
AbstractParamContainerPanel.isParamPanelOrChildSelected
public boolean isParamPanelOrChildSelected(String panelName) { DefaultMutableTreeNode node = getTreeNodeFromPanelName(panelName); if (node != null) { TreePath panelPath = new TreePath(node.getPath()); if (getTreeParam().isPathSelected(panelPath)) { return tru...
java
public boolean isParamPanelOrChildSelected(String panelName) { DefaultMutableTreeNode node = getTreeNodeFromPanelName(panelName); if (node != null) { TreePath panelPath = new TreePath(node.getPath()); if (getTreeParam().isPathSelected(panelPath)) { return tru...
[ "public", "boolean", "isParamPanelOrChildSelected", "(", "String", "panelName", ")", "{", "DefaultMutableTreeNode", "node", "=", "getTreeNodeFromPanelName", "(", "panelName", ")", ";", "if", "(", "node", "!=", "null", ")", "{", "TreePath", "panelPath", "=", "new",...
Tells whether or not the given param panel, or one of its child panels, is selected. @param panelName the name of the panel to check, should not be {@code null}. @return {@code true} if the panel or one of its child panels is selected, {@code false} otherwise. @since TODO add version @see #isParamPanelSelected(String)
[ "Tells", "whether", "or", "not", "the", "given", "param", "panel", "or", "one", "of", "its", "child", "panels", "is", "selected", "." ]
0cbe5121f2ae1ecca222513d182759210c569bec
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/parosproxy/paros/view/AbstractParamContainerPanel.java#L639-L650
129,599
zaproxy/zaproxy
src/org/parosproxy/paros/view/AbstractParamContainerPanel.java
AbstractParamContainerPanel.getJScrollPane1
private JScrollPane getJScrollPane1() { if (jScrollPane1 == null) { jScrollPane1 = new JScrollPane(); jScrollPane1.setName("jScrollPane1"); jScrollPane1.setViewportView(getJPanel()); jScrollPane1.setHorizontalScrollBarPolicy(javax.swing.JScrollPane.HORIZONTAL...
java
private JScrollPane getJScrollPane1() { if (jScrollPane1 == null) { jScrollPane1 = new JScrollPane(); jScrollPane1.setName("jScrollPane1"); jScrollPane1.setViewportView(getJPanel()); jScrollPane1.setHorizontalScrollBarPolicy(javax.swing.JScrollPane.HORIZONTAL...
[ "private", "JScrollPane", "getJScrollPane1", "(", ")", "{", "if", "(", "jScrollPane1", "==", "null", ")", "{", "jScrollPane1", "=", "new", "JScrollPane", "(", ")", ";", "jScrollPane1", ".", "setName", "(", "\"jScrollPane1\"", ")", ";", "jScrollPane1", ".", "...
This method initializes jScrollPane1 @return javax.swing.JScrollPane
[ "This", "method", "initializes", "jScrollPane1" ]
0cbe5121f2ae1ecca222513d182759210c569bec
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/parosproxy/paros/view/AbstractParamContainerPanel.java#L809-L819