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,300 | zaproxy/zaproxy | src/org/zaproxy/zap/utils/FontUtils.java | FontUtils.getFont | public static Font getFont (Font font, Size size) {
float s;
switch (size) {
case smallest: s = (float) (font.getSize() * 0.5); break;
case much_smaller: s = (float) (font.getSize() * 0.7); break;
case smaller: s = (float) (font.getSize() * 0.8); break;
case standard: s = (float) font.getSize(); break;
... | java | public static Font getFont (Font font, Size size) {
float s;
switch (size) {
case smallest: s = (float) (font.getSize() * 0.5); break;
case much_smaller: s = (float) (font.getSize() * 0.7); break;
case smaller: s = (float) (font.getSize() * 0.8); break;
case standard: s = (float) font.getSize(); break;
... | [
"public",
"static",
"Font",
"getFont",
"(",
"Font",
"font",
",",
"Size",
"size",
")",
"{",
"float",
"s",
";",
"switch",
"(",
"size",
")",
"{",
"case",
"smallest",
":",
"s",
"=",
"(",
"float",
")",
"(",
"font",
".",
"getSize",
"(",
")",
"*",
"0.5"... | Gets the specified font with the specified size, correctly scaled
@param font
@param size
@since 2.7.0
@return the specified font with the specified size, correctly scaled | [
"Gets",
"the",
"specified",
"font",
"with",
"the",
"specified",
"size",
"correctly",
"scaled"
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/utils/FontUtils.java#L210-L223 |
129,301 | zaproxy/zaproxy | src/org/zaproxy/zap/view/HistoryReferenceTableModel.java | HistoryReferenceTableModel.getValueAt | @Override
public Object getValueAt(int row, int col) {
// Get the href and the required field
HistoryReference href = hrefList.get(row);
try {
switch (this.columns[col]) {
case HREF_ID: return href.getHistoryId();
case TYPE_FLAG: return this.getHrefTypeIcon(href);
case METHOD: return href.getMetho... | java | @Override
public Object getValueAt(int row, int col) {
// Get the href and the required field
HistoryReference href = hrefList.get(row);
try {
switch (this.columns[col]) {
case HREF_ID: return href.getHistoryId();
case TYPE_FLAG: return this.getHrefTypeIcon(href);
case METHOD: return href.getMetho... | [
"@",
"Override",
"public",
"Object",
"getValueAt",
"(",
"int",
"row",
",",
"int",
"col",
")",
"{",
"// Get the href and the required field",
"HistoryReference",
"href",
"=",
"hrefList",
".",
"get",
"(",
"row",
")",
";",
"try",
"{",
"switch",
"(",
"this",
"."... | This should be overriden for any custom columns | [
"This",
"should",
"be",
"overriden",
"for",
"any",
"custom",
"columns"
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/view/HistoryReferenceTableModel.java#L108-L131 |
129,302 | zaproxy/zaproxy | src/org/zaproxy/zap/view/HistoryReferenceTableModel.java | HistoryReferenceTableModel.add | public void add(HistoryReference href) {
synchronized (hrefList) {
hrefList.add(href);
fireTableRowsInserted(hrefList.size() - 1, hrefList.size() - 1);
}
} | java | public void add(HistoryReference href) {
synchronized (hrefList) {
hrefList.add(href);
fireTableRowsInserted(hrefList.size() - 1, hrefList.size() - 1);
}
} | [
"public",
"void",
"add",
"(",
"HistoryReference",
"href",
")",
"{",
"synchronized",
"(",
"hrefList",
")",
"{",
"hrefList",
".",
"add",
"(",
"href",
")",
";",
"fireTableRowsInserted",
"(",
"hrefList",
".",
"size",
"(",
")",
"-",
"1",
",",
"hrefList",
".",... | Adds a href. Method is synchronized internally.
@param href the HistoryReference | [
"Adds",
"a",
"href",
".",
"Method",
"is",
"synchronized",
"internally",
"."
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/view/HistoryReferenceTableModel.java#L189-L194 |
129,303 | zaproxy/zaproxy | src/org/zaproxy/zap/view/HistoryReferenceTableModel.java | HistoryReferenceTableModel.getColumnClass | @Override
public Class<?> getColumnClass(int columnIndex) {
switch (this.columns[columnIndex]) {
case HREF_ID: return Integer.class;
case TYPE_FLAG: return ImageIcon.class;
case METHOD: return String.class;
case URL: return String.class;
case CODE: return Integer.class;
case REASON: return String... | java | @Override
public Class<?> getColumnClass(int columnIndex) {
switch (this.columns[columnIndex]) {
case HREF_ID: return Integer.class;
case TYPE_FLAG: return ImageIcon.class;
case METHOD: return String.class;
case URL: return String.class;
case CODE: return Integer.class;
case REASON: return String... | [
"@",
"Override",
"public",
"Class",
"<",
"?",
">",
"getColumnClass",
"(",
"int",
"columnIndex",
")",
"{",
"switch",
"(",
"this",
".",
"columns",
"[",
"columnIndex",
"]",
")",
"{",
"case",
"HREF_ID",
":",
"return",
"Integer",
".",
"class",
";",
"case",
... | Returns the type of column for given column index.
This should be overriden for any custom columns
@param columnIndex the column index
@return the column class | [
"Returns",
"the",
"type",
"of",
"column",
"for",
"given",
"column",
"index",
".",
"This",
"should",
"be",
"overriden",
"for",
"any",
"custom",
"columns"
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/view/HistoryReferenceTableModel.java#L218-L234 |
129,304 | zaproxy/zaproxy | src/org/zaproxy/zap/extension/httpsessions/HttpSessionsTableModel.java | HttpSessionsTableModel.removeAllElements | public void removeAllElements() {
if (View.isInitialised() && !EventQueue.isDispatchThread()) {
EventQueue.invokeLater(new Runnable() {
@Override
public void run() {
removeAllElements();
}
});
return;
}
sessions.clear();
sessions.trimToSize();
fireTableDataChanged();
} | java | public void removeAllElements() {
if (View.isInitialised() && !EventQueue.isDispatchThread()) {
EventQueue.invokeLater(new Runnable() {
@Override
public void run() {
removeAllElements();
}
});
return;
}
sessions.clear();
sessions.trimToSize();
fireTableDataChanged();
} | [
"public",
"void",
"removeAllElements",
"(",
")",
"{",
"if",
"(",
"View",
".",
"isInitialised",
"(",
")",
"&&",
"!",
"EventQueue",
".",
"isDispatchThread",
"(",
")",
")",
"{",
"EventQueue",
".",
"invokeLater",
"(",
"new",
"Runnable",
"(",
")",
"{",
"@",
... | Removes all the elements. | [
"Removes",
"all",
"the",
"elements",
"."
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/extension/httpsessions/HttpSessionsTableModel.java#L101-L117 |
129,305 | zaproxy/zaproxy | src/org/zaproxy/zap/extension/httpsessions/HttpSessionsTableModel.java | HttpSessionsTableModel.addHttpSession | public void addHttpSession(final HttpSession session) {
if (View.isInitialised() && !EventQueue.isDispatchThread()) {
EventQueue.invokeLater(new Runnable() {
@Override
public void run() {
addHttpSession(session);
}
});
return;
}
if (sessions.contains(session))
return;
sessions.ad... | java | public void addHttpSession(final HttpSession session) {
if (View.isInitialised() && !EventQueue.isDispatchThread()) {
EventQueue.invokeLater(new Runnable() {
@Override
public void run() {
addHttpSession(session);
}
});
return;
}
if (sessions.contains(session))
return;
sessions.ad... | [
"public",
"void",
"addHttpSession",
"(",
"final",
"HttpSession",
"session",
")",
"{",
"if",
"(",
"View",
".",
"isInitialised",
"(",
")",
"&&",
"!",
"EventQueue",
".",
"isDispatchThread",
"(",
")",
")",
"{",
"EventQueue",
".",
"invokeLater",
"(",
"new",
"Ru... | Adds a new http session to the model.
@param session the session | [
"Adds",
"a",
"new",
"http",
"session",
"to",
"the",
"model",
"."
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/extension/httpsessions/HttpSessionsTableModel.java#L124-L142 |
129,306 | zaproxy/zaproxy | src/org/zaproxy/zap/extension/httpsessions/HttpSessionsTableModel.java | HttpSessionsTableModel.getColumnClass | @Override
public Class<?> getColumnClass(int columnIndex) {
switch (columnIndex) {
case 0:
return Boolean.class;
case 1:
return String.class;
case 2:
return String.class;
case 3:
return Integer.class;
}
return null;
} | java | @Override
public Class<?> getColumnClass(int columnIndex) {
switch (columnIndex) {
case 0:
return Boolean.class;
case 1:
return String.class;
case 2:
return String.class;
case 3:
return Integer.class;
}
return null;
} | [
"@",
"Override",
"public",
"Class",
"<",
"?",
">",
"getColumnClass",
"(",
"int",
"columnIndex",
")",
"{",
"switch",
"(",
"columnIndex",
")",
"{",
"case",
"0",
":",
"return",
"Boolean",
".",
"class",
";",
"case",
"1",
":",
"return",
"String",
".",
"clas... | Returns the type of column for given column index.
@param columnIndex the column index
@return the column class | [
"Returns",
"the",
"type",
"of",
"column",
"for",
"given",
"column",
"index",
"."
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/extension/httpsessions/HttpSessionsTableModel.java#L173-L186 |
129,307 | zaproxy/zaproxy | src/org/zaproxy/zap/extension/httpsessions/HttpSessionsTableModel.java | HttpSessionsTableModel.getHttpSessionAt | protected HttpSession getHttpSessionAt(int rowIndex) {
if (rowIndex < 0 || rowIndex >= sessions.size())
return null;
return sessions.get(rowIndex);
} | java | protected HttpSession getHttpSessionAt(int rowIndex) {
if (rowIndex < 0 || rowIndex >= sessions.size())
return null;
return sessions.get(rowIndex);
} | [
"protected",
"HttpSession",
"getHttpSessionAt",
"(",
"int",
"rowIndex",
")",
"{",
"if",
"(",
"rowIndex",
"<",
"0",
"||",
"rowIndex",
">=",
"sessions",
".",
"size",
"(",
")",
")",
"return",
"null",
";",
"return",
"sessions",
".",
"get",
"(",
"rowIndex",
"... | Gets the http session at a particular row index.
@param rowIndex the row index
@return the http session at the given index, or null | [
"Gets",
"the",
"http",
"session",
"at",
"a",
"particular",
"row",
"index",
"."
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/extension/httpsessions/HttpSessionsTableModel.java#L194-L198 |
129,308 | zaproxy/zaproxy | src/org/zaproxy/zap/extension/httpsessions/HttpSessionsTableModel.java | HttpSessionsTableModel.removeHttpSession | public void removeHttpSession(final HttpSession session) {
if (View.isInitialised() && !EventQueue.isDispatchThread()) {
EventQueue.invokeLater(new Runnable() {
@Override
public void run() {
removeHttpSession(session);
}
});
return;
}
int index = sessions.indexOf(session);
sessions.... | java | public void removeHttpSession(final HttpSession session) {
if (View.isInitialised() && !EventQueue.isDispatchThread()) {
EventQueue.invokeLater(new Runnable() {
@Override
public void run() {
removeHttpSession(session);
}
});
return;
}
int index = sessions.indexOf(session);
sessions.... | [
"public",
"void",
"removeHttpSession",
"(",
"final",
"HttpSession",
"session",
")",
"{",
"if",
"(",
"View",
".",
"isInitialised",
"(",
")",
"&&",
"!",
"EventQueue",
".",
"isDispatchThread",
"(",
")",
")",
"{",
"EventQueue",
".",
"invokeLater",
"(",
"new",
... | Removes the http session.
@param session the session | [
"Removes",
"the",
"http",
"session",
"."
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/extension/httpsessions/HttpSessionsTableModel.java#L205-L221 |
129,309 | zaproxy/zaproxy | src/org/zaproxy/zap/extension/httpsessions/HttpSessionsTableModel.java | HttpSessionsTableModel.fireHttpSessionUpdated | public void fireHttpSessionUpdated(final HttpSession session) {
if (View.isInitialised() && !EventQueue.isDispatchThread()) {
EventQueue.invokeLater(new Runnable() {
@Override
public void run() {
fireHttpSessionUpdated(session);
}
});
return;
}
int index = sessions.indexOf(session);
... | java | public void fireHttpSessionUpdated(final HttpSession session) {
if (View.isInitialised() && !EventQueue.isDispatchThread()) {
EventQueue.invokeLater(new Runnable() {
@Override
public void run() {
fireHttpSessionUpdated(session);
}
});
return;
}
int index = sessions.indexOf(session);
... | [
"public",
"void",
"fireHttpSessionUpdated",
"(",
"final",
"HttpSession",
"session",
")",
"{",
"if",
"(",
"View",
".",
"isInitialised",
"(",
")",
"&&",
"!",
"EventQueue",
".",
"isDispatchThread",
"(",
")",
")",
"{",
"EventQueue",
".",
"invokeLater",
"(",
"new... | Notifies the model that a http session has been updated.
@param session the session | [
"Notifies",
"the",
"model",
"that",
"a",
"http",
"session",
"has",
"been",
"updated",
"."
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/extension/httpsessions/HttpSessionsTableModel.java#L228-L243 |
129,310 | zaproxy/zaproxy | src/org/zaproxy/zap/extension/autoupdate/UninstallationProgressDialogue.java | UninstallationProgressDialogue.update | public void update(List<UninstallationProgressEvent> events) {
if (!isVisible()) {
if ((System.currentTimeMillis() - startTime) >= MS_TO_WAIT_BEFORE_SHOW) {
if (!done && !setVisibleInvoked) {
setVisibleInvoked = true;
EventQueue.invokeLater(new... | java | public void update(List<UninstallationProgressEvent> events) {
if (!isVisible()) {
if ((System.currentTimeMillis() - startTime) >= MS_TO_WAIT_BEFORE_SHOW) {
if (!done && !setVisibleInvoked) {
setVisibleInvoked = true;
EventQueue.invokeLater(new... | [
"public",
"void",
"update",
"(",
"List",
"<",
"UninstallationProgressEvent",
">",
"events",
")",
"{",
"if",
"(",
"!",
"isVisible",
"(",
")",
")",
"{",
"if",
"(",
"(",
"System",
".",
"currentTimeMillis",
"(",
")",
"-",
"startTime",
")",
">=",
"MS_TO_WAIT_... | Updates the progress with the given events.
@param events the events generated during uninstallation | [
"Updates",
"the",
"progress",
"with",
"the",
"given",
"events",
"."
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/extension/autoupdate/UninstallationProgressDialogue.java#L214-L293 |
129,311 | zaproxy/zaproxy | src/org/zaproxy/zap/extension/script/ScriptVars.java | ScriptVars.validateKey | private static void validateKey(String key) {
if (key == null || key.length() > MAX_KEY_SIZE) {
throw new IllegalArgumentException("Invalid key - must be non null and have a length less than " + MAX_KEY_SIZE);
}
} | java | private static void validateKey(String key) {
if (key == null || key.length() > MAX_KEY_SIZE) {
throw new IllegalArgumentException("Invalid key - must be non null and have a length less than " + MAX_KEY_SIZE);
}
} | [
"private",
"static",
"void",
"validateKey",
"(",
"String",
"key",
")",
"{",
"if",
"(",
"key",
"==",
"null",
"||",
"key",
".",
"length",
"(",
")",
">",
"MAX_KEY_SIZE",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"Invalid key - must be non null ... | Validates the given key.
@param key the key to validate.
@throws IllegalArgumentException if the {@code key} is {@code null} or its length is higher than the maximum allowed
({@value #MAX_KEY_SIZE}). | [
"Validates",
"the",
"given",
"key",
"."
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/extension/script/ScriptVars.java#L100-L104 |
129,312 | zaproxy/zaproxy | src/org/zaproxy/zap/extension/script/ScriptVars.java | ScriptVars.getScriptName | private static String getScriptName(ScriptContext context) {
if (context == null) {
throw new IllegalArgumentException("Invalid context - must be non null");
}
Object scriptName = context.getAttribute(ExtensionScript.SCRIPT_NAME_ATT);
if (scriptName == null) {
throw new IllegalArgumentException("Failed to... | java | private static String getScriptName(ScriptContext context) {
if (context == null) {
throw new IllegalArgumentException("Invalid context - must be non null");
}
Object scriptName = context.getAttribute(ExtensionScript.SCRIPT_NAME_ATT);
if (scriptName == null) {
throw new IllegalArgumentException("Failed to... | [
"private",
"static",
"String",
"getScriptName",
"(",
"ScriptContext",
"context",
")",
"{",
"if",
"(",
"context",
"==",
"null",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"Invalid context - must be non null\"",
")",
";",
"}",
"Object",
"scriptName",... | Gets the script name from the given context.
@param context the context of the script.
@return the name of the script, never {@code null}.
@throws IllegalArgumentException if the {@code context} is {@code null} or it does not contain the name of the script. | [
"Gets",
"the",
"script",
"name",
"from",
"the",
"given",
"context",
"."
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/extension/script/ScriptVars.java#L168-L180 |
129,313 | zaproxy/zaproxy | src/org/zaproxy/zap/extension/script/ScriptVars.java | ScriptVars.setScriptVarImpl | private static void setScriptVarImpl(String scriptName, String key, String value) {
validateKey(key);
Map<String, String> scVars = scriptVars
.computeIfAbsent(scriptName, k -> Collections.synchronizedMap(new HashMap<String, String>()));
if (value == null) {
scVars.remove(key);
} else {
validate... | java | private static void setScriptVarImpl(String scriptName, String key, String value) {
validateKey(key);
Map<String, String> scVars = scriptVars
.computeIfAbsent(scriptName, k -> Collections.synchronizedMap(new HashMap<String, String>()));
if (value == null) {
scVars.remove(key);
} else {
validate... | [
"private",
"static",
"void",
"setScriptVarImpl",
"(",
"String",
"scriptName",
",",
"String",
"key",
",",
"String",
"value",
")",
"{",
"validateKey",
"(",
"key",
")",
";",
"Map",
"<",
"String",
",",
"String",
">",
"scVars",
"=",
"scriptVars",
".",
"computeI... | Internal method that sets a variable without validating the script name.
@param scriptName the name of the script.
@param key the key of the variable.
@param value the value of the variable. | [
"Internal",
"method",
"that",
"sets",
"a",
"variable",
"without",
"validating",
"the",
"script",
"name",
"."
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/extension/script/ScriptVars.java#L212-L227 |
129,314 | zaproxy/zaproxy | src/org/zaproxy/zap/extension/script/ScriptVars.java | ScriptVars.getScriptVar | public static String getScriptVar(ScriptContext context, String key) {
return getScriptVarImpl(getScriptName(context), key);
} | java | public static String getScriptVar(ScriptContext context, String key) {
return getScriptVarImpl(getScriptName(context), key);
} | [
"public",
"static",
"String",
"getScriptVar",
"(",
"ScriptContext",
"context",
",",
"String",
"key",
")",
"{",
"return",
"getScriptVarImpl",
"(",
"getScriptName",
"(",
"context",
")",
",",
"key",
")",
";",
"}"
] | Gets a script variable.
@param context the context of the script.
@param key the key of the variable.
@return the value of the variable, might be {@code null} if no value was previously set.
@throws IllegalArgumentException if the {@code context} is {@code null} or it does not contain the name of the script. | [
"Gets",
"a",
"script",
"variable",
"."
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/extension/script/ScriptVars.java#L249-L251 |
129,315 | zaproxy/zaproxy | src/org/zaproxy/zap/extension/script/ScriptVars.java | ScriptVars.getScriptVar | public static String getScriptVar(String scriptName, String key) {
validateScriptName(scriptName);
return getScriptVarImpl(scriptName, key);
} | java | public static String getScriptVar(String scriptName, String key) {
validateScriptName(scriptName);
return getScriptVarImpl(scriptName, key);
} | [
"public",
"static",
"String",
"getScriptVar",
"(",
"String",
"scriptName",
",",
"String",
"key",
")",
"{",
"validateScriptName",
"(",
"scriptName",
")",
";",
"return",
"getScriptVarImpl",
"(",
"scriptName",
",",
"key",
")",
";",
"}"
] | Gets a variable from the script with the given name.
@param scriptName the name of the script.
@param key the key of the variable.
@return the value of the variable, might be {@code null} if no value was previously set.
@throws IllegalArgumentException if the {@code scriptName} is {@code null}.
@since TODO add version | [
"Gets",
"a",
"variable",
"from",
"the",
"script",
"with",
"the",
"given",
"name",
"."
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/extension/script/ScriptVars.java#L262-L265 |
129,316 | zaproxy/zaproxy | src/org/zaproxy/zap/extension/script/ScriptVars.java | ScriptVars.getScriptVarImpl | private static String getScriptVarImpl(String scriptName, String key) {
Map<String, String> scVars = scriptVars.get(scriptName);
if (scVars == null) {
// No vars have been associated with this script
return null;
}
return scVars.get(key);
} | java | private static String getScriptVarImpl(String scriptName, String key) {
Map<String, String> scVars = scriptVars.get(scriptName);
if (scVars == null) {
// No vars have been associated with this script
return null;
}
return scVars.get(key);
} | [
"private",
"static",
"String",
"getScriptVarImpl",
"(",
"String",
"scriptName",
",",
"String",
"key",
")",
"{",
"Map",
"<",
"String",
",",
"String",
">",
"scVars",
"=",
"scriptVars",
".",
"get",
"(",
"scriptName",
")",
";",
"if",
"(",
"scVars",
"==",
"nu... | Internal method that gets a variable without validating the script name.
@param scriptName the name of the script.
@param key the key of the variable.
@return the value of the variable, might be {@code null} if no value was previously set. | [
"Internal",
"method",
"that",
"gets",
"a",
"variable",
"without",
"validating",
"the",
"script",
"name",
"."
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/extension/script/ScriptVars.java#L274-L282 |
129,317 | zaproxy/zaproxy | src/org/parosproxy/paros/network/HttpMethodHelper.java | HttpMethodHelper.createRequestMethodNew | public HttpMethod createRequestMethodNew(HttpRequestHeader header, HttpBody body) throws URIException {
HttpMethod httpMethod = null;
String method = header.getMethod();
URI uri = header.getURI();
String version = header.getVersion();
httpMethod = new GenericMethod(method);
httpMethod.setURI... | java | public HttpMethod createRequestMethodNew(HttpRequestHeader header, HttpBody body) throws URIException {
HttpMethod httpMethod = null;
String method = header.getMethod();
URI uri = header.getURI();
String version = header.getVersion();
httpMethod = new GenericMethod(method);
httpMethod.setURI... | [
"public",
"HttpMethod",
"createRequestMethodNew",
"(",
"HttpRequestHeader",
"header",
",",
"HttpBody",
"body",
")",
"throws",
"URIException",
"{",
"HttpMethod",
"httpMethod",
"=",
"null",
";",
"String",
"method",
"=",
"header",
".",
"getMethod",
"(",
")",
";",
"... | Not used - all abstract using Generic method but GET cannot be used. | [
"Not",
"used",
"-",
"all",
"abstract",
"using",
"Generic",
"method",
"but",
"GET",
"cannot",
"be",
"used",
"."
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/parosproxy/paros/network/HttpMethodHelper.java#L71-L132 |
129,318 | zaproxy/zaproxy | src/org/parosproxy/paros/network/HttpMethodHelper.java | HttpMethodHelper.createRequestMethod | public HttpMethod createRequestMethod(HttpRequestHeader header, HttpBody body) throws URIException {
return createRequestMethod(header, body, null);
} | java | public HttpMethod createRequestMethod(HttpRequestHeader header, HttpBody body) throws URIException {
return createRequestMethod(header, body, null);
} | [
"public",
"HttpMethod",
"createRequestMethod",
"(",
"HttpRequestHeader",
"header",
",",
"HttpBody",
"body",
")",
"throws",
"URIException",
"{",
"return",
"createRequestMethod",
"(",
"header",
",",
"body",
",",
"null",
")",
";",
"}"
] | may be replaced by the New method - however the New method is not yet fully tested so this is stil used. | [
"may",
"be",
"replaced",
"by",
"the",
"New",
"method",
"-",
"however",
"the",
"New",
"method",
"is",
"not",
"yet",
"fully",
"tested",
"so",
"this",
"is",
"stil",
"used",
"."
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/parosproxy/paros/network/HttpMethodHelper.java#L136-L138 |
129,319 | zaproxy/zaproxy | src/org/parosproxy/paros/view/MainFrame.java | MainFrame.getPaneContent | private JPanel getPaneContent() {
if (paneContent == null) {
paneContent = new JPanel();
paneContent.setLayout(new BoxLayout(getPaneContent(), BoxLayout.Y_AXIS));
paneContent.setEnabled(true);
paneContent.add(getMainToolbarPanel(), null);
paneContent.add(getPaneDisplay(), null);
paneCon... | java | private JPanel getPaneContent() {
if (paneContent == null) {
paneContent = new JPanel();
paneContent.setLayout(new BoxLayout(getPaneContent(), BoxLayout.Y_AXIS));
paneContent.setEnabled(true);
paneContent.add(getMainToolbarPanel(), null);
paneContent.add(getPaneDisplay(), null);
paneCon... | [
"private",
"JPanel",
"getPaneContent",
"(",
")",
"{",
"if",
"(",
"paneContent",
"==",
"null",
")",
"{",
"paneContent",
"=",
"new",
"JPanel",
"(",
")",
";",
"paneContent",
".",
"setLayout",
"(",
"new",
"BoxLayout",
"(",
"getPaneContent",
"(",
")",
",",
"B... | This method initializes paneContent
@return JPanel | [
"This",
"method",
"initializes",
"paneContent"
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/parosproxy/paros/view/MainFrame.java#L263-L277 |
129,320 | zaproxy/zaproxy | src/org/parosproxy/paros/view/MainFrame.java | MainFrame.getMainMenuBar | public org.parosproxy.paros.view.MainMenuBar getMainMenuBar() {
if (mainMenuBar == null) {
mainMenuBar = new org.parosproxy.paros.view.MainMenuBar();
}
return mainMenuBar;
} | java | public org.parosproxy.paros.view.MainMenuBar getMainMenuBar() {
if (mainMenuBar == null) {
mainMenuBar = new org.parosproxy.paros.view.MainMenuBar();
}
return mainMenuBar;
} | [
"public",
"org",
".",
"parosproxy",
".",
"paros",
".",
"view",
".",
"MainMenuBar",
"getMainMenuBar",
"(",
")",
"{",
"if",
"(",
"mainMenuBar",
"==",
"null",
")",
"{",
"mainMenuBar",
"=",
"new",
"org",
".",
"parosproxy",
".",
"paros",
".",
"view",
".",
"... | This method initializes mainMenuBar
@return org.parosproxy.paros.view.MenuDisplay | [
"This",
"method",
"initializes",
"mainMenuBar"
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/parosproxy/paros/view/MainFrame.java#L294-L299 |
129,321 | zaproxy/zaproxy | src/org/parosproxy/paros/view/MainFrame.java | MainFrame.getPaneDisplay | public JPanel getPaneDisplay() {
if (paneDisplay == null) {
paneDisplay = new JPanel();
paneDisplay.setLayout(new CardLayout());
paneDisplay.setName("paneDisplay");
paneDisplay.add(getWorkbench(), getWorkbench().getName());
}
return paneDisplay;
} | java | public JPanel getPaneDisplay() {
if (paneDisplay == null) {
paneDisplay = new JPanel();
paneDisplay.setLayout(new CardLayout());
paneDisplay.setName("paneDisplay");
paneDisplay.add(getWorkbench(), getWorkbench().getName());
}
return paneDisplay;
} | [
"public",
"JPanel",
"getPaneDisplay",
"(",
")",
"{",
"if",
"(",
"paneDisplay",
"==",
"null",
")",
"{",
"paneDisplay",
"=",
"new",
"JPanel",
"(",
")",
";",
"paneDisplay",
".",
"setLayout",
"(",
"new",
"CardLayout",
"(",
")",
")",
";",
"paneDisplay",
".",
... | This method initializes paneDisplay
@return JPanel | [
"This",
"method",
"initializes",
"paneDisplay"
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/parosproxy/paros/view/MainFrame.java#L311-L319 |
129,322 | zaproxy/zaproxy | src/org/parosproxy/paros/extension/edit/ExtensionEdit.java | ExtensionEdit.getMenuFind | private ZapMenuItem getMenuFind() {
if (menuFind == null) {
menuFind = new ZapMenuItem("menu.edit.find", getFindDefaultKeyStroke());
menuFind.addActionListener(new java.awt.event.ActionListener() {
@Override
public void actionPerformed(java.awt.even... | java | private ZapMenuItem getMenuFind() {
if (menuFind == null) {
menuFind = new ZapMenuItem("menu.edit.find", getFindDefaultKeyStroke());
menuFind.addActionListener(new java.awt.event.ActionListener() {
@Override
public void actionPerformed(java.awt.even... | [
"private",
"ZapMenuItem",
"getMenuFind",
"(",
")",
"{",
"if",
"(",
"menuFind",
"==",
"null",
")",
"{",
"menuFind",
"=",
"new",
"ZapMenuItem",
"(",
"\"menu.edit.find\"",
",",
"getFindDefaultKeyStroke",
"(",
")",
")",
";",
"menuFind",
".",
"addActionListener",
"... | This method initializes menuFind
@return javax.swing.JMenuItem | [
"This",
"method",
"initializes",
"menuFind"
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/parosproxy/paros/extension/edit/ExtensionEdit.java#L99-L111 |
129,323 | zaproxy/zaproxy | src/org/parosproxy/paros/extension/edit/ExtensionEdit.java | ExtensionEdit.getPopupMenuFind | private PopupFindMenu getPopupMenuFind() {
if (popupFindMenu== null) {
popupFindMenu = new PopupFindMenu();
popupFindMenu.setText(Constant.messages.getString("edit.find.popup")); // ZAP: i18n
popupFindMenu.addActionListener(new java.awt.event.ActionListener() {
... | java | private PopupFindMenu getPopupMenuFind() {
if (popupFindMenu== null) {
popupFindMenu = new PopupFindMenu();
popupFindMenu.setText(Constant.messages.getString("edit.find.popup")); // ZAP: i18n
popupFindMenu.addActionListener(new java.awt.event.ActionListener() {
... | [
"private",
"PopupFindMenu",
"getPopupMenuFind",
"(",
")",
"{",
"if",
"(",
"popupFindMenu",
"==",
"null",
")",
"{",
"popupFindMenu",
"=",
"new",
"PopupFindMenu",
"(",
")",
";",
"popupFindMenu",
".",
"setText",
"(",
"Constant",
".",
"messages",
".",
"getString",... | This method initializes popupMenuFind
@return org.parosproxy.paros.extension.ExtensionPopupMenu | [
"This",
"method",
"initializes",
"popupMenuFind"
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/parosproxy/paros/extension/edit/ExtensionEdit.java#L133-L149 |
129,324 | zaproxy/zaproxy | src/org/zaproxy/zap/utils/DisplayUtils.java | DisplayUtils.getScaledIcon | public static ImageIcon getScaledIcon(URL url) {
if (url == null) {
return null;
}
return getScaledIcon(new ImageIcon(url));
} | java | public static ImageIcon getScaledIcon(URL url) {
if (url == null) {
return null;
}
return getScaledIcon(new ImageIcon(url));
} | [
"public",
"static",
"ImageIcon",
"getScaledIcon",
"(",
"URL",
"url",
")",
"{",
"if",
"(",
"url",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"return",
"getScaledIcon",
"(",
"new",
"ImageIcon",
"(",
"url",
")",
")",
";",
"}"
] | Gets a correctly scaled icon from the specified url
@param url
@return
@since 2.6.0 | [
"Gets",
"a",
"correctly",
"scaled",
"icon",
"from",
"the",
"specified",
"url"
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/utils/DisplayUtils.java#L60-L65 |
129,325 | zaproxy/zaproxy | src/org/zaproxy/zap/utils/DisplayUtils.java | DisplayUtils.getScaledInsets | public static Insets getScaledInsets(int top, int left, int bottom, int right) {
if (FontUtils.getScale() == 1) {
// don't need to scale
return new Insets(top, left, bottom, right);
}
return new Insets(
(int)(top * FontUtils.getScale()), (int)(left * FontUtils.getScale()),
(int)(bottom * FontUtils.... | java | public static Insets getScaledInsets(int top, int left, int bottom, int right) {
if (FontUtils.getScale() == 1) {
// don't need to scale
return new Insets(top, left, bottom, right);
}
return new Insets(
(int)(top * FontUtils.getScale()), (int)(left * FontUtils.getScale()),
(int)(bottom * FontUtils.... | [
"public",
"static",
"Insets",
"getScaledInsets",
"(",
"int",
"top",
",",
"int",
"left",
",",
"int",
"bottom",
",",
"int",
"right",
")",
"{",
"if",
"(",
"FontUtils",
".",
"getScale",
"(",
")",
"==",
"1",
")",
"{",
"// don't need to scale",
"return",
"new"... | Gets correctly scaled Insets
@since 2.7.0 | [
"Gets",
"correctly",
"scaled",
"Insets"
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/utils/DisplayUtils.java#L170-L178 |
129,326 | zaproxy/zaproxy | src/org/zaproxy/zap/extension/spider/OptionsSpiderPanel.java | OptionsSpiderPanel.initialize | private void initialize() {
this.setLayout(new CardLayout());
this.setName(Constant.messages.getString("spider.options.title"));
if (Model.getSingleton().getOptionsParam().getViewParam().getWmUiHandlingOption() == 0) {
this.setSize(314, 245);
}
this.add(getPanelSpider(), getPanelSpider().getName());
... | java | private void initialize() {
this.setLayout(new CardLayout());
this.setName(Constant.messages.getString("spider.options.title"));
if (Model.getSingleton().getOptionsParam().getViewParam().getWmUiHandlingOption() == 0) {
this.setSize(314, 245);
}
this.add(getPanelSpider(), getPanelSpider().getName());
... | [
"private",
"void",
"initialize",
"(",
")",
"{",
"this",
".",
"setLayout",
"(",
"new",
"CardLayout",
"(",
")",
")",
";",
"this",
".",
"setName",
"(",
"Constant",
".",
"messages",
".",
"getString",
"(",
"\"spider.options.title\"",
")",
")",
";",
"if",
"(",... | This method initializes this options Panel. | [
"This",
"method",
"initializes",
"this",
"options",
"Panel",
"."
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/extension/spider/OptionsSpiderPanel.java#L106-L113 |
129,327 | zaproxy/zaproxy | src/org/zaproxy/zap/extension/spider/OptionsSpiderPanel.java | OptionsSpiderPanel.getSliderMaxDepth | private JSlider getSliderMaxDepth() {
if (sliderMaxDepth == null) {
sliderMaxDepth = new JSlider();
sliderMaxDepth.setMaximum(19);
sliderMaxDepth.setMinimum(0);
sliderMaxDepth.setMinorTickSpacing(1);
sliderMaxDepth.setPaintTicks(true);
sliderMaxDepth.setPaintLabels(true);
sliderMaxDepth.s... | java | private JSlider getSliderMaxDepth() {
if (sliderMaxDepth == null) {
sliderMaxDepth = new JSlider();
sliderMaxDepth.setMaximum(19);
sliderMaxDepth.setMinimum(0);
sliderMaxDepth.setMinorTickSpacing(1);
sliderMaxDepth.setPaintTicks(true);
sliderMaxDepth.setPaintLabels(true);
sliderMaxDepth.s... | [
"private",
"JSlider",
"getSliderMaxDepth",
"(",
")",
"{",
"if",
"(",
"sliderMaxDepth",
"==",
"null",
")",
"{",
"sliderMaxDepth",
"=",
"new",
"JSlider",
"(",
")",
";",
"sliderMaxDepth",
".",
"setMaximum",
"(",
"19",
")",
";",
"sliderMaxDepth",
".",
"setMinimu... | This method initializes the slider for MaxDepth.
@return the slider for max depth | [
"This",
"method",
"initializes",
"the",
"slider",
"for",
"MaxDepth",
"."
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/extension/spider/OptionsSpiderPanel.java#L259-L273 |
129,328 | zaproxy/zaproxy | src/org/zaproxy/zap/extension/spider/OptionsSpiderPanel.java | OptionsSpiderPanel.getChkPostForm | private JCheckBox getChkPostForm() {
if (chkPostForm == null) {
chkPostForm = new JCheckBox();
chkPostForm.setText(Constant.messages.getString("spider.options.label.post"));
if (!getChkProcessForm().isSelected()){
chkPostForm.setEnabled(false);
}
}
return chkPostForm;
} | java | private JCheckBox getChkPostForm() {
if (chkPostForm == null) {
chkPostForm = new JCheckBox();
chkPostForm.setText(Constant.messages.getString("spider.options.label.post"));
if (!getChkProcessForm().isSelected()){
chkPostForm.setEnabled(false);
}
}
return chkPostForm;
} | [
"private",
"JCheckBox",
"getChkPostForm",
"(",
")",
"{",
"if",
"(",
"chkPostForm",
"==",
"null",
")",
"{",
"chkPostForm",
"=",
"new",
"JCheckBox",
"(",
")",
";",
"chkPostForm",
".",
"setText",
"(",
"Constant",
".",
"messages",
".",
"getString",
"(",
"\"spi... | This method initializes the checkbox for POST form option. This option should not be enabled if the
forms are not processed at all.
@return javax.swing.JCheckBox | [
"This",
"method",
"initializes",
"the",
"checkbox",
"for",
"POST",
"form",
"option",
".",
"This",
"option",
"should",
"not",
"be",
"enabled",
"if",
"the",
"forms",
"are",
"not",
"processed",
"at",
"all",
"."
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/extension/spider/OptionsSpiderPanel.java#L328-L338 |
129,329 | zaproxy/zaproxy | src/org/zaproxy/zap/extension/spider/OptionsSpiderPanel.java | OptionsSpiderPanel.getChkProcessForm | private JCheckBox getChkProcessForm() {
if (chkProcessForm == null) {
chkProcessForm = new JCheckBox();
chkProcessForm.setText(Constant.messages.getString("spider.options.label.processform"));
// Code for controlling the status of the chkPostForm
chkProcessForm.addChangeListener(new ChangeListener(... | java | private JCheckBox getChkProcessForm() {
if (chkProcessForm == null) {
chkProcessForm = new JCheckBox();
chkProcessForm.setText(Constant.messages.getString("spider.options.label.processform"));
// Code for controlling the status of the chkPostForm
chkProcessForm.addChangeListener(new ChangeListener(... | [
"private",
"JCheckBox",
"getChkProcessForm",
"(",
")",
"{",
"if",
"(",
"chkProcessForm",
"==",
"null",
")",
"{",
"chkProcessForm",
"=",
"new",
"JCheckBox",
"(",
")",
";",
"chkProcessForm",
".",
"setText",
"(",
"Constant",
".",
"messages",
".",
"getString",
"... | This method initializes the checkbox for process form option.
@return javax.swing.JCheckBox | [
"This",
"method",
"initializes",
"the",
"checkbox",
"for",
"process",
"form",
"option",
"."
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/extension/spider/OptionsSpiderPanel.java#L345-L363 |
129,330 | zaproxy/zaproxy | src/org/zaproxy/zap/extension/spider/OptionsSpiderPanel.java | OptionsSpiderPanel.getChkParseComments | private JCheckBox getChkParseComments() {
if (parseComments == null) {
parseComments = new JCheckBox();
parseComments.setText(Constant.messages.getString("spider.options.label.comments"));
}
return parseComments;
} | java | private JCheckBox getChkParseComments() {
if (parseComments == null) {
parseComments = new JCheckBox();
parseComments.setText(Constant.messages.getString("spider.options.label.comments"));
}
return parseComments;
} | [
"private",
"JCheckBox",
"getChkParseComments",
"(",
")",
"{",
"if",
"(",
"parseComments",
"==",
"null",
")",
"{",
"parseComments",
"=",
"new",
"JCheckBox",
"(",
")",
";",
"parseComments",
".",
"setText",
"(",
"Constant",
".",
"messages",
".",
"getString",
"(... | This method initializes the Parse Comments checkbox.
@return javax.swing.JCheckBox | [
"This",
"method",
"initializes",
"the",
"Parse",
"Comments",
"checkbox",
"."
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/extension/spider/OptionsSpiderPanel.java#L370-L376 |
129,331 | zaproxy/zaproxy | src/org/zaproxy/zap/extension/spider/OptionsSpiderPanel.java | OptionsSpiderPanel.getChkParseRobotsTxt | private JCheckBox getChkParseRobotsTxt() {
if (parseRobotsTxt == null) {
parseRobotsTxt = new JCheckBox();
parseRobotsTxt.setText(Constant.messages.getString("spider.options.label.robotstxt"));
}
return parseRobotsTxt;
} | java | private JCheckBox getChkParseRobotsTxt() {
if (parseRobotsTxt == null) {
parseRobotsTxt = new JCheckBox();
parseRobotsTxt.setText(Constant.messages.getString("spider.options.label.robotstxt"));
}
return parseRobotsTxt;
} | [
"private",
"JCheckBox",
"getChkParseRobotsTxt",
"(",
")",
"{",
"if",
"(",
"parseRobotsTxt",
"==",
"null",
")",
"{",
"parseRobotsTxt",
"=",
"new",
"JCheckBox",
"(",
")",
";",
"parseRobotsTxt",
".",
"setText",
"(",
"Constant",
".",
"messages",
".",
"getString",
... | This method initializes the Parse robots.txt checkbox.
@return javax.swing.JCheckBox | [
"This",
"method",
"initializes",
"the",
"Parse",
"robots",
".",
"txt",
"checkbox",
"."
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/extension/spider/OptionsSpiderPanel.java#L383-L389 |
129,332 | zaproxy/zaproxy | src/org/zaproxy/zap/extension/spider/OptionsSpiderPanel.java | OptionsSpiderPanel.getChkParseSitemapXml | private JCheckBox getChkParseSitemapXml() {
if (parseSitemapXml == null) {
parseSitemapXml = new JCheckBox();
parseSitemapXml.setText(Constant.messages.getString("spider.options.label.sitemapxml"));
}
return parseSitemapXml;
} | java | private JCheckBox getChkParseSitemapXml() {
if (parseSitemapXml == null) {
parseSitemapXml = new JCheckBox();
parseSitemapXml.setText(Constant.messages.getString("spider.options.label.sitemapxml"));
}
return parseSitemapXml;
} | [
"private",
"JCheckBox",
"getChkParseSitemapXml",
"(",
")",
"{",
"if",
"(",
"parseSitemapXml",
"==",
"null",
")",
"{",
"parseSitemapXml",
"=",
"new",
"JCheckBox",
"(",
")",
";",
"parseSitemapXml",
".",
"setText",
"(",
"Constant",
".",
"messages",
".",
"getStrin... | This method initializes the Parse sitemap.xml checkbox.
@return javax.swing.JCheckBox | [
"This",
"method",
"initializes",
"the",
"Parse",
"sitemap",
".",
"xml",
"checkbox",
"."
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/extension/spider/OptionsSpiderPanel.java#L396-L402 |
129,333 | zaproxy/zaproxy | src/org/zaproxy/zap/extension/spider/OptionsSpiderPanel.java | OptionsSpiderPanel.getChkParseSVNEntries | private JCheckBox getChkParseSVNEntries() {
if (parseSVNEntries == null) {
parseSVNEntries = new JCheckBox();
parseSVNEntries.setText(Constant.messages.getString("spider.options.label.svnentries"));
}
return parseSVNEntries;
} | java | private JCheckBox getChkParseSVNEntries() {
if (parseSVNEntries == null) {
parseSVNEntries = new JCheckBox();
parseSVNEntries.setText(Constant.messages.getString("spider.options.label.svnentries"));
}
return parseSVNEntries;
} | [
"private",
"JCheckBox",
"getChkParseSVNEntries",
"(",
")",
"{",
"if",
"(",
"parseSVNEntries",
"==",
"null",
")",
"{",
"parseSVNEntries",
"=",
"new",
"JCheckBox",
"(",
")",
";",
"parseSVNEntries",
".",
"setText",
"(",
"Constant",
".",
"messages",
".",
"getStrin... | This method initializes the Parse "SVN Entries" checkbox.
@return javax.swing.JCheckBox | [
"This",
"method",
"initializes",
"the",
"Parse",
"SVN",
"Entries",
"checkbox",
"."
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/extension/spider/OptionsSpiderPanel.java#L409-L415 |
129,334 | zaproxy/zaproxy | src/org/zaproxy/zap/extension/spider/OptionsSpiderPanel.java | OptionsSpiderPanel.getChkParseGit | private JCheckBox getChkParseGit() {
if (parseGit == null) {
parseGit = new JCheckBox();
parseGit.setText(Constant.messages.getString("spider.options.label.git"));
}
return parseGit;
} | java | private JCheckBox getChkParseGit() {
if (parseGit == null) {
parseGit = new JCheckBox();
parseGit.setText(Constant.messages.getString("spider.options.label.git"));
}
return parseGit;
} | [
"private",
"JCheckBox",
"getChkParseGit",
"(",
")",
"{",
"if",
"(",
"parseGit",
"==",
"null",
")",
"{",
"parseGit",
"=",
"new",
"JCheckBox",
"(",
")",
";",
"parseGit",
".",
"setText",
"(",
"Constant",
".",
"messages",
".",
"getString",
"(",
"\"spider.optio... | This method initializes the Parse "Git" checkbox.
@return javax.swing.JCheckBox | [
"This",
"method",
"initializes",
"the",
"Parse",
"Git",
"checkbox",
"."
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/extension/spider/OptionsSpiderPanel.java#L422-L428 |
129,335 | zaproxy/zaproxy | src/org/zaproxy/zap/extension/spider/OptionsSpiderPanel.java | OptionsSpiderPanel.getHandleODataSpecificParameters | private JCheckBox getHandleODataSpecificParameters() {
if (handleODataSpecificParameters == null) {
handleODataSpecificParameters = new JCheckBox();
handleODataSpecificParameters.setText(Constant.messages.getString("spider.options.label.handlehodataparameters"));
}
return handleODataSpecificParameters;... | java | private JCheckBox getHandleODataSpecificParameters() {
if (handleODataSpecificParameters == null) {
handleODataSpecificParameters = new JCheckBox();
handleODataSpecificParameters.setText(Constant.messages.getString("spider.options.label.handlehodataparameters"));
}
return handleODataSpecificParameters;... | [
"private",
"JCheckBox",
"getHandleODataSpecificParameters",
"(",
")",
"{",
"if",
"(",
"handleODataSpecificParameters",
"==",
"null",
")",
"{",
"handleODataSpecificParameters",
"=",
"new",
"JCheckBox",
"(",
")",
";",
"handleODataSpecificParameters",
".",
"setText",
"(",
... | This method initializes the Handle OData-specific parameters checkbox.
@return javax.swing.JCheckBox | [
"This",
"method",
"initializes",
"the",
"Handle",
"OData",
"-",
"specific",
"parameters",
"checkbox",
"."
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/extension/spider/OptionsSpiderPanel.java#L435-L441 |
129,336 | zaproxy/zaproxy | src/org/zaproxy/zap/extension/spider/OptionsSpiderPanel.java | OptionsSpiderPanel.getComboHandleParameters | @SuppressWarnings("unchecked")
private JComboBox<HandleParametersOption> getComboHandleParameters() {
if (handleParameters == null) {
handleParameters = new JComboBox<>(new HandleParametersOption[] {
HandleParametersOption.USE_ALL, HandleParametersOption.IGNORE_VALUE,
HandleParametersOption.IGNORE_... | java | @SuppressWarnings("unchecked")
private JComboBox<HandleParametersOption> getComboHandleParameters() {
if (handleParameters == null) {
handleParameters = new JComboBox<>(new HandleParametersOption[] {
HandleParametersOption.USE_ALL, HandleParametersOption.IGNORE_VALUE,
HandleParametersOption.IGNORE_... | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"private",
"JComboBox",
"<",
"HandleParametersOption",
">",
"getComboHandleParameters",
"(",
")",
"{",
"if",
"(",
"handleParameters",
"==",
"null",
")",
"{",
"handleParameters",
"=",
"new",
"JComboBox",
"<>",
"("... | This method initializes the combobox for HandleParameters option.
@return the combo handle parameters | [
"This",
"method",
"initializes",
"the",
"combobox",
"for",
"HandleParameters",
"option",
"."
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/extension/spider/OptionsSpiderPanel.java#L449-L458 |
129,337 | zaproxy/zaproxy | src/org/zaproxy/zap/extension/script/ScriptWrapper.java | ScriptWrapper.loadScript | void loadScript(Charset charset) throws IOException {
this.charset = charset;
StringBuilder sb = new StringBuilder();
try (BufferedReader br = Files.newBufferedReader(file.toPath(), charset)) {
int len;
char[] buf = new char[1024];
while ((len = br.read(buf)) != -1) {
sb.append(buf, 0, len);
}
}... | java | void loadScript(Charset charset) throws IOException {
this.charset = charset;
StringBuilder sb = new StringBuilder();
try (BufferedReader br = Files.newBufferedReader(file.toPath(), charset)) {
int len;
char[] buf = new char[1024];
while ((len = br.read(buf)) != -1) {
sb.append(buf, 0, len);
}
}... | [
"void",
"loadScript",
"(",
"Charset",
"charset",
")",
"throws",
"IOException",
"{",
"this",
".",
"charset",
"=",
"charset",
";",
"StringBuilder",
"sb",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"try",
"(",
"BufferedReader",
"br",
"=",
"Files",
".",
"newB... | Loads the script from the configured file.
@param charset
@throws IOException
@since TODO add version | [
"Loads",
"the",
"script",
"from",
"the",
"configured",
"file",
"."
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/extension/script/ScriptWrapper.java#L320-L333 |
129,338 | zaproxy/zaproxy | src/org/zaproxy/zap/extension/script/ScriptWrapper.java | ScriptWrapper.saveScript | void saveScript() throws IOException {
// We'll always try to read it in with the default next time its loaded
this.charset = ExtensionScript.DEFAULT_CHARSET;
try ( BufferedWriter bw = Files.newBufferedWriter(file.toPath(), charset)) {
bw.append(getContents());
}
this.lastModified = file.lastModified();
} | java | void saveScript() throws IOException {
// We'll always try to read it in with the default next time its loaded
this.charset = ExtensionScript.DEFAULT_CHARSET;
try ( BufferedWriter bw = Files.newBufferedWriter(file.toPath(), charset)) {
bw.append(getContents());
}
this.lastModified = file.lastModified();
} | [
"void",
"saveScript",
"(",
")",
"throws",
"IOException",
"{",
"// We'll always try to read it in with the default next time its loaded",
"this",
".",
"charset",
"=",
"ExtensionScript",
".",
"DEFAULT_CHARSET",
";",
"try",
"(",
"BufferedWriter",
"bw",
"=",
"Files",
".",
"... | Saves the latest contents into the configured file
@throws IOException
@since TODO add version | [
"Saves",
"the",
"latest",
"contents",
"into",
"the",
"configured",
"file"
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/extension/script/ScriptWrapper.java#L340-L347 |
129,339 | zaproxy/zaproxy | src/org/zaproxy/zap/utils/TableColumnManager.java | TableColumnManager.reset | public void reset() {
table.getColumnModel().removeColumnModelListener(this);
columnModel = table.getColumnModel();
columnModel.addColumnModelListener(this);
// Keep a duplicate TableColumns for managing hidden TableColumns
int count = columnModel.getColumnCount();
allColumns = new ArrayList<>(cou... | java | public void reset() {
table.getColumnModel().removeColumnModelListener(this);
columnModel = table.getColumnModel();
columnModel.addColumnModelListener(this);
// Keep a duplicate TableColumns for managing hidden TableColumns
int count = columnModel.getColumnCount();
allColumns = new ArrayList<>(cou... | [
"public",
"void",
"reset",
"(",
")",
"{",
"table",
".",
"getColumnModel",
"(",
")",
".",
"removeColumnModelListener",
"(",
"this",
")",
";",
"columnModel",
"=",
"table",
".",
"getColumnModel",
"(",
")",
";",
"columnModel",
".",
"addColumnModelListener",
"(",
... | Reset the TableColumnManager to only manage the TableColumns that are
currently visible in the table.
Generally this method should only be invoked by the TableColumnManager
when the TableModel of the table is changed. | [
"Reset",
"the",
"TableColumnManager",
"to",
"only",
"manage",
"the",
"TableColumns",
"that",
"are",
"currently",
"visible",
"in",
"the",
"table",
"."
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/utils/TableColumnManager.java#L83-L96 |
129,340 | zaproxy/zaproxy | src/org/zaproxy/zap/utils/TableColumnManager.java | TableColumnManager.showColumn | private void showColumn(TableColumn column) {
// Ignore changes to the TableColumnModel made by the TableColumnManager
columnModel.removeColumnModelListener(this);
// Add the column to the end of the table
columnModel.addColumn(column);
// Move the column to its position before it was hidden.
... | java | private void showColumn(TableColumn column) {
// Ignore changes to the TableColumnModel made by the TableColumnManager
columnModel.removeColumnModelListener(this);
// Add the column to the end of the table
columnModel.addColumn(column);
// Move the column to its position before it was hidden.
... | [
"private",
"void",
"showColumn",
"(",
"TableColumn",
"column",
")",
"{",
"// Ignore changes to the TableColumnModel made by the TableColumnManager\r",
"columnModel",
".",
"removeColumnModelListener",
"(",
"this",
")",
";",
"// Add the column to the end of the table\r",
"columnModel... | Show a hidden column in the table. The column will be positioned at its
proper place in the view of the table.
@param column
the TableColumn to be shown. | [
"Show",
"a",
"hidden",
"column",
"in",
"the",
"table",
".",
"The",
"column",
"will",
"be",
"positioned",
"at",
"its",
"proper",
"place",
"in",
"the",
"view",
"of",
"the",
"table",
"."
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/utils/TableColumnManager.java#L218-L248 |
129,341 | zaproxy/zaproxy | src/org/zaproxy/zap/utils/HarUtils.java | HarUtils.createMessageHarCustomFields | public static HarCustomFields createMessageHarCustomFields(int historyId, int historyType, String messageNote) {
HarCustomFields customFields = new HarCustomFields();
customFields.addCustomField(MESSAGE_ID_CUSTOM_FIELD, Integer.toString(historyId));
customFields.addCustomField(MESSAGE_TYPE_CUSTO... | java | public static HarCustomFields createMessageHarCustomFields(int historyId, int historyType, String messageNote) {
HarCustomFields customFields = new HarCustomFields();
customFields.addCustomField(MESSAGE_ID_CUSTOM_FIELD, Integer.toString(historyId));
customFields.addCustomField(MESSAGE_TYPE_CUSTO... | [
"public",
"static",
"HarCustomFields",
"createMessageHarCustomFields",
"(",
"int",
"historyId",
",",
"int",
"historyType",
",",
"String",
"messageNote",
")",
"{",
"HarCustomFields",
"customFields",
"=",
"new",
"HarCustomFields",
"(",
")",
";",
"customFields",
".",
"... | Creates custom fields for the given data.
@param historyId the history ID of the HTTP message.
@param historyType the history type of the HTTP message.
@param messageNote the note of the HTTP message.
@return the {@code HarCustomFields}, never {@code null}.
@since TODO add version
@see #createHarEntry(int, int, HttpMe... | [
"Creates",
"custom",
"fields",
"for",
"the",
"given",
"data",
"."
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/utils/HarUtils.java#L215-L221 |
129,342 | zaproxy/zaproxy | src/org/parosproxy/paros/network/HttpHeader.java | HttpHeader.setMessage | public void setMessage(String data) throws HttpMalformedHeaderException {
clear();
try {
if (!this.parse(data)) {
mMalformedHeader = true;
}
} catch (Exception e) {
mMalformedHeader = true;
}
if (mMalformedHeader) {
... | java | public void setMessage(String data) throws HttpMalformedHeaderException {
clear();
try {
if (!this.parse(data)) {
mMalformedHeader = true;
}
} catch (Exception e) {
mMalformedHeader = true;
}
if (mMalformedHeader) {
... | [
"public",
"void",
"setMessage",
"(",
"String",
"data",
")",
"throws",
"HttpMalformedHeaderException",
"{",
"clear",
"(",
")",
";",
"try",
"{",
"if",
"(",
"!",
"this",
".",
"parse",
"(",
"data",
")",
")",
"{",
"mMalformedHeader",
"=",
"true",
";",
"}",
... | Set and parse this HTTP header with the string given.
@param data
@throws HttpMalformedHeaderException | [
"Set",
"and",
"parse",
"this",
"HTTP",
"header",
"with",
"the",
"string",
"given",
"."
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/parosproxy/paros/network/HttpHeader.java#L172-L186 |
129,343 | zaproxy/zaproxy | src/org/parosproxy/paros/network/HttpHeader.java | HttpHeader.getHeader | public String getHeader(String name) {
Vector<String> v = getHeaders(name);
if (v == null) {
return null;
}
return v.firstElement();
} | java | public String getHeader(String name) {
Vector<String> v = getHeaders(name);
if (v == null) {
return null;
}
return v.firstElement();
} | [
"public",
"String",
"getHeader",
"(",
"String",
"name",
")",
"{",
"Vector",
"<",
"String",
">",
"v",
"=",
"getHeaders",
"(",
"name",
")",
";",
"if",
"(",
"v",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"return",
"v",
".",
"firstElement",
"... | Get the first header value using the name given. If there are multiple
occurrence, only the first one will be returned as String.
@param name
@return the header value. null if not found. | [
"Get",
"the",
"first",
"header",
"value",
"using",
"the",
"name",
"given",
".",
"If",
"there",
"are",
"multiple",
"occurrence",
"only",
"the",
"first",
"one",
"will",
"be",
"returned",
"as",
"String",
"."
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/parosproxy/paros/network/HttpHeader.java#L199-L206 |
129,344 | zaproxy/zaproxy | src/org/parosproxy/paros/network/HttpHeader.java | HttpHeader.addHeader | public void addHeader(String name, String val) {
mMsgHeader = mMsgHeader + name + ": " + val + mLineDelimiter;
addInternalHeaderFields(name, val);
} | java | public void addHeader(String name, String val) {
mMsgHeader = mMsgHeader + name + ": " + val + mLineDelimiter;
addInternalHeaderFields(name, val);
} | [
"public",
"void",
"addHeader",
"(",
"String",
"name",
",",
"String",
"val",
")",
"{",
"mMsgHeader",
"=",
"mMsgHeader",
"+",
"name",
"+",
"\": \"",
"+",
"val",
"+",
"mLineDelimiter",
";",
"addInternalHeaderFields",
"(",
"name",
",",
"val",
")",
";",
"}"
] | Add a header with the name and value given. It will be appended to the
header string.
@param name
@param val | [
"Add",
"a",
"header",
"with",
"the",
"name",
"and",
"value",
"given",
".",
"It",
"will",
"be",
"appended",
"to",
"the",
"header",
"string",
"."
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/parosproxy/paros/network/HttpHeader.java#L238-L241 |
129,345 | zaproxy/zaproxy | src/org/parosproxy/paros/network/HttpHeader.java | HttpHeader.setHeader | public void setHeader(String name, String value) {
// int pos = 0;
// int crlfpos = 0;
Pattern pattern = null;
if (getHeaders(name) == null && value != null) {
// header value not found, append to end
addHeader(name, value);
} else {
pattern = getH... | java | public void setHeader(String name, String value) {
// int pos = 0;
// int crlfpos = 0;
Pattern pattern = null;
if (getHeaders(name) == null && value != null) {
// header value not found, append to end
addHeader(name, value);
} else {
pattern = getH... | [
"public",
"void",
"setHeader",
"(",
"String",
"name",
",",
"String",
"value",
")",
"{",
"//\t\tint pos = 0;\r",
"//\t\tint crlfpos = 0;\r",
"Pattern",
"pattern",
"=",
"null",
";",
"if",
"(",
"getHeaders",
"(",
"name",
")",
"==",
"null",
"&&",
"value",
"!=",
... | Set a header name and value. If the name is not found, it will be added.
If the value is null, the header will be removed.
@param name
@param value | [
"Set",
"a",
"header",
"name",
"and",
"value",
".",
"If",
"the",
"name",
"is",
"not",
"found",
"it",
"will",
"be",
"added",
".",
"If",
"the",
"value",
"is",
"null",
"the",
"header",
"will",
"be",
"removed",
"."
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/parosproxy/paros/network/HttpHeader.java#L250-L273 |
129,346 | zaproxy/zaproxy | src/org/parosproxy/paros/network/HttpHeader.java | HttpHeader.setContentLength | public void setContentLength(int len) {
if (mContentLength != len) {
setHeader(CONTENT_LENGTH, Integer.toString(len));
mContentLength = len;
}
} | java | public void setContentLength(int len) {
if (mContentLength != len) {
setHeader(CONTENT_LENGTH, Integer.toString(len));
mContentLength = len;
}
} | [
"public",
"void",
"setContentLength",
"(",
"int",
"len",
")",
"{",
"if",
"(",
"mContentLength",
"!=",
"len",
")",
"{",
"setHeader",
"(",
"CONTENT_LENGTH",
",",
"Integer",
".",
"toString",
"(",
"len",
")",
")",
";",
"mContentLength",
"=",
"len",
";",
"}",... | Set the content length of this header.
@param len | [
"Set",
"the",
"content",
"length",
"of",
"this",
"header",
"."
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/parosproxy/paros/network/HttpHeader.java#L310-L315 |
129,347 | zaproxy/zaproxy | src/org/parosproxy/paros/network/HttpHeader.java | HttpHeader.isTransferEncodingChunked | public boolean isTransferEncodingChunked() {
String transferEncoding = getHeader(TRANSFER_ENCODING);
if (transferEncoding != null && transferEncoding.equalsIgnoreCase(_CHUNKED)) {
return true;
}
return false;
} | java | public boolean isTransferEncodingChunked() {
String transferEncoding = getHeader(TRANSFER_ENCODING);
if (transferEncoding != null && transferEncoding.equalsIgnoreCase(_CHUNKED)) {
return true;
}
return false;
} | [
"public",
"boolean",
"isTransferEncodingChunked",
"(",
")",
"{",
"String",
"transferEncoding",
"=",
"getHeader",
"(",
"TRANSFER_ENCODING",
")",
";",
"if",
"(",
"transferEncoding",
"!=",
"null",
"&&",
"transferEncoding",
".",
"equalsIgnoreCase",
"(",
"_CHUNKED",
")",... | Check if Transfer Encoding Chunked is set in this header.
@return true if transfer encoding chunked is set. | [
"Check",
"if",
"Transfer",
"Encoding",
"Chunked",
"is",
"set",
"in",
"this",
"header",
"."
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/parosproxy/paros/network/HttpHeader.java#L383-L389 |
129,348 | zaproxy/zaproxy | src/org/parosproxy/paros/network/HttpHeader.java | HttpHeader.parse | protected boolean parse(String data) throws Exception {
if (data == null || data.isEmpty()) {
return true;
}
// ZAP: Replace all "\n" with "\r\n" to parse correctly
String newData = data.replaceAll("(?<!\r)\n", CRLF);
// ZAP: always use CRLF to comply with HTT... | java | protected boolean parse(String data) throws Exception {
if (data == null || data.isEmpty()) {
return true;
}
// ZAP: Replace all "\n" with "\r\n" to parse correctly
String newData = data.replaceAll("(?<!\r)\n", CRLF);
// ZAP: always use CRLF to comply with HTT... | [
"protected",
"boolean",
"parse",
"(",
"String",
"data",
")",
"throws",
"Exception",
"{",
"if",
"(",
"data",
"==",
"null",
"||",
"data",
".",
"isEmpty",
"(",
")",
")",
"{",
"return",
"true",
";",
"}",
"// ZAP: Replace all \"\\n\" with \"\\r\\n\" to parse correctl... | Parse this Http header using the String given.
@param data String to be parsed to form this header.
@return
@throws Exception | [
"Parse",
"this",
"Http",
"header",
"using",
"the",
"String",
"given",
"."
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/parosproxy/paros/network/HttpHeader.java#L398-L453 |
129,349 | zaproxy/zaproxy | src/org/parosproxy/paros/network/HttpHeader.java | HttpHeader.addInternalHeaderFields | private void addInternalHeaderFields(String name, String value) {
String key = normalisedHeaderName(name);
Vector<String> v = getHeaders(key);
if (v == null) {
v = new Vector<>();
mHeaderFields.put(key, v);
}
if (value != null) {
v.ad... | java | private void addInternalHeaderFields(String name, String value) {
String key = normalisedHeaderName(name);
Vector<String> v = getHeaders(key);
if (v == null) {
v = new Vector<>();
mHeaderFields.put(key, v);
}
if (value != null) {
v.ad... | [
"private",
"void",
"addInternalHeaderFields",
"(",
"String",
"name",
",",
"String",
"value",
")",
"{",
"String",
"key",
"=",
"normalisedHeaderName",
"(",
"name",
")",
";",
"Vector",
"<",
"String",
">",
"v",
"=",
"getHeaders",
"(",
"key",
")",
";",
"if",
... | Add the header stored in internal hashtable
@param name
@param value | [
"Add",
"the",
"header",
"stored",
"in",
"internal",
"hashtable"
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/parosproxy/paros/network/HttpHeader.java#L483-L496 |
129,350 | zaproxy/zaproxy | src/org/zaproxy/zap/spider/filters/HttpPrefixFetchFilter.java | HttpPrefixFetchFilter.checkFilter | @Override
public FetchStatus checkFilter(URI uri) {
if (uri == null) {
return FetchStatus.OUT_OF_SCOPE;
}
String otherScheme = normalisedScheme(uri.getRawScheme());
if (port != normalisedPort(otherScheme, uri.getPort())) {
return FetchStatus.OUT_OF_SCOPE;
... | java | @Override
public FetchStatus checkFilter(URI uri) {
if (uri == null) {
return FetchStatus.OUT_OF_SCOPE;
}
String otherScheme = normalisedScheme(uri.getRawScheme());
if (port != normalisedPort(otherScheme, uri.getPort())) {
return FetchStatus.OUT_OF_SCOPE;
... | [
"@",
"Override",
"public",
"FetchStatus",
"checkFilter",
"(",
"URI",
"uri",
")",
"{",
"if",
"(",
"uri",
"==",
"null",
")",
"{",
"return",
"FetchStatus",
".",
"OUT_OF_SCOPE",
";",
"}",
"String",
"otherScheme",
"=",
"normalisedScheme",
"(",
"uri",
".",
"getR... | Filters any URI that does not start with the defined prefix.
@return {@code FetchStatus.VALID} if the {@code uri} starts with the {@code prefix}, {@code FetchStatus.OUT_OF_SCOPE}
otherwise | [
"Filters",
"any",
"URI",
"that",
"does",
"not",
"start",
"with",
"the",
"defined",
"prefix",
"."
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/spider/filters/HttpPrefixFetchFilter.java#L246-L270 |
129,351 | zaproxy/zaproxy | src/org/zaproxy/zap/extension/ascan/ScanProgressTableModel.java | ScanProgressTableModel.getElapsedTimeLabel | private String getElapsedTimeLabel(long elapsed) {
return (elapsed >= 0) ?
String.format("%02d:%02d.%03d", elapsed / 60000, (elapsed % 60000) / 1000, (elapsed % 1000)) :
null;
} | java | private String getElapsedTimeLabel(long elapsed) {
return (elapsed >= 0) ?
String.format("%02d:%02d.%03d", elapsed / 60000, (elapsed % 60000) / 1000, (elapsed % 1000)) :
null;
} | [
"private",
"String",
"getElapsedTimeLabel",
"(",
"long",
"elapsed",
")",
"{",
"return",
"(",
"elapsed",
">=",
"0",
")",
"?",
"String",
".",
"format",
"(",
"\"%02d:%02d.%03d\"",
",",
"elapsed",
"/",
"60000",
",",
"(",
"elapsed",
"%",
"60000",
")",
"/",
"1... | Inner method for elapsed time label formatting
@param elapsed the time in milliseconds
@return the label with the elapsed time in readable format | [
"Inner",
"method",
"for",
"elapsed",
"time",
"label",
"formatting"
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/extension/ascan/ScanProgressTableModel.java#L290-L294 |
129,352 | zaproxy/zaproxy | src/org/parosproxy/paros/model/Session.java | Session.save | protected void save(final String fileName, final SessionListener callback) {
Thread t = new Thread(new Runnable() {
@Override
public void run() {
Exception thrownException = null;
try {
save(fileName);
} catch (Ex... | java | protected void save(final String fileName, final SessionListener callback) {
Thread t = new Thread(new Runnable() {
@Override
public void run() {
Exception thrownException = null;
try {
save(fileName);
} catch (Ex... | [
"protected",
"void",
"save",
"(",
"final",
"String",
"fileName",
",",
"final",
"SessionListener",
"callback",
")",
"{",
"Thread",
"t",
"=",
"new",
"Thread",
"(",
"new",
"Runnable",
"(",
")",
"{",
"@",
"Override",
"public",
"void",
"run",
"(",
")",
"{",
... | Asynchronous call to save a session.
@param fileName
@param callback | [
"Asynchronous",
"call",
"to",
"save",
"a",
"session",
"."
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/parosproxy/paros/model/Session.java#L527-L546 |
129,353 | zaproxy/zaproxy | src/org/parosproxy/paros/model/Session.java | Session.save | protected void save(String fileName) throws Exception {
configuration.save(new File(fileName));
if (isNewState()) {
model.moveSessionDb(fileName);
} else {
if (!this.fileName.equals(fileName)) {
// copy file to new fileName
model.copySessionDb(this.fileName, fileName);
... | java | protected void save(String fileName) throws Exception {
configuration.save(new File(fileName));
if (isNewState()) {
model.moveSessionDb(fileName);
} else {
if (!this.fileName.equals(fileName)) {
// copy file to new fileName
model.copySessionDb(this.fileName, fileName);
... | [
"protected",
"void",
"save",
"(",
"String",
"fileName",
")",
"throws",
"Exception",
"{",
"configuration",
".",
"save",
"(",
"new",
"File",
"(",
"fileName",
")",
")",
";",
"if",
"(",
"isNewState",
"(",
")",
")",
"{",
"model",
".",
"moveSessionDb",
"(",
... | Synchronous call to save a session.
@param fileName
@throws Exception | [
"Synchronous",
"call",
"to",
"save",
"a",
"session",
"."
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/parosproxy/paros/model/Session.java#L553-L572 |
129,354 | zaproxy/zaproxy | src/org/parosproxy/paros/model/Session.java | Session.snapshot | protected void snapshot(String fileName) throws Exception {
configuration.save(new File(fileName));
model.snapshotSessionDb(this.fileName, fileName);
} | java | protected void snapshot(String fileName) throws Exception {
configuration.save(new File(fileName));
model.snapshotSessionDb(this.fileName, fileName);
} | [
"protected",
"void",
"snapshot",
"(",
"String",
"fileName",
")",
"throws",
"Exception",
"{",
"configuration",
".",
"save",
"(",
"new",
"File",
"(",
"fileName",
")",
")",
";",
"model",
".",
"snapshotSessionDb",
"(",
"this",
".",
"fileName",
",",
"fileName",
... | Synchronous call to snapshot a session.
@param fileName
@throws Exception | [
"Synchronous",
"call",
"to",
"snapshot",
"a",
"session",
"."
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/parosproxy/paros/model/Session.java#L626-L629 |
129,355 | zaproxy/zaproxy | src/org/parosproxy/paros/model/Session.java | Session.getTopNodesInScopeFromSiteTree | public List<SiteNode> getTopNodesInScopeFromSiteTree() {
List<SiteNode> nodes = new LinkedList<>();
SiteNode rootNode = getSiteTree().getRoot();
@SuppressWarnings("unchecked")
Enumeration<TreeNode> en = rootNode.children();
while (en.hasMoreElements()) {
SiteNode sn = (SiteNode) en.nextElement();
... | java | public List<SiteNode> getTopNodesInScopeFromSiteTree() {
List<SiteNode> nodes = new LinkedList<>();
SiteNode rootNode = getSiteTree().getRoot();
@SuppressWarnings("unchecked")
Enumeration<TreeNode> en = rootNode.children();
while (en.hasMoreElements()) {
SiteNode sn = (SiteNode) en.nextElement();
... | [
"public",
"List",
"<",
"SiteNode",
">",
"getTopNodesInScopeFromSiteTree",
"(",
")",
"{",
"List",
"<",
"SiteNode",
">",
"nodes",
"=",
"new",
"LinkedList",
"<>",
"(",
")",
";",
"SiteNode",
"rootNode",
"=",
"getSiteTree",
"(",
")",
".",
"getRoot",
"(",
")",
... | Gets the top nodes from the site tree which contain nodes that are "In Scope".
Searches recursively starting from the root node.
Should be used with care, as it is time-consuming, querying the database for
every node in the Site Tree.
@return the nodes in scope from site tree | [
"Gets",
"the",
"top",
"nodes",
"from",
"the",
"site",
"tree",
"which",
"contain",
"nodes",
"that",
"are",
"In",
"Scope",
".",
"Searches",
"recursively",
"starting",
"from",
"the",
"root",
"node",
".",
"Should",
"be",
"used",
"with",
"care",
"as",
"it",
"... | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/parosproxy/paros/model/Session.java#L865-L877 |
129,356 | zaproxy/zaproxy | src/org/parosproxy/paros/model/Session.java | Session.getNodesInContextFromSiteTree | public List<SiteNode> getNodesInContextFromSiteTree(Context context) {
List<SiteNode> nodes = new LinkedList<>();
SiteNode rootNode = getSiteTree().getRoot();
fillNodesInContext(rootNode, nodes, context);
return nodes;
} | java | public List<SiteNode> getNodesInContextFromSiteTree(Context context) {
List<SiteNode> nodes = new LinkedList<>();
SiteNode rootNode = getSiteTree().getRoot();
fillNodesInContext(rootNode, nodes, context);
return nodes;
} | [
"public",
"List",
"<",
"SiteNode",
">",
"getNodesInContextFromSiteTree",
"(",
"Context",
"context",
")",
"{",
"List",
"<",
"SiteNode",
">",
"nodes",
"=",
"new",
"LinkedList",
"<>",
"(",
")",
";",
"SiteNode",
"rootNode",
"=",
"getSiteTree",
"(",
")",
".",
"... | Gets the nodes from the site tree which are "In Scope" in a given context. Searches recursively
starting from the root node. Should be used with care, as it is time-consuming, querying the database
for every node in the Site Tree.
@param context the context
@return the nodes in scope from site tree | [
"Gets",
"the",
"nodes",
"from",
"the",
"site",
"tree",
"which",
"are",
"In",
"Scope",
"in",
"a",
"given",
"context",
".",
"Searches",
"recursively",
"starting",
"from",
"the",
"root",
"node",
".",
"Should",
"be",
"used",
"with",
"care",
"as",
"it",
"is",... | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/parosproxy/paros/model/Session.java#L919-L924 |
129,357 | zaproxy/zaproxy | src/org/parosproxy/paros/model/Session.java | Session.createContext | private Context createContext(String name) {
Context context = new Context(this, this.nextContextIndex++);
context.setName(name);
return context;
} | java | private Context createContext(String name) {
Context context = new Context(this, this.nextContextIndex++);
context.setName(name);
return context;
} | [
"private",
"Context",
"createContext",
"(",
"String",
"name",
")",
"{",
"Context",
"context",
"=",
"new",
"Context",
"(",
"this",
",",
"this",
".",
"nextContextIndex",
"++",
")",
";",
"context",
".",
"setName",
"(",
"name",
")",
";",
"return",
"context",
... | Creates a new context with the given name.
@param name the name of the context
@return the new {@code Context}.
@see #getNewContext(String) | [
"Creates",
"a",
"new",
"context",
"with",
"the",
"given",
"name",
"."
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/parosproxy/paros/model/Session.java#L1216-L1220 |
129,358 | zaproxy/zaproxy | src/org/parosproxy/paros/model/Session.java | Session.addContext | public void addContext(Context c) {
if (c == null) {
throw new IllegalArgumentException("The context must not be null. ");
}
validateContextName(c.getName());
this.contexts.add(c);
this.model.loadContext(c);
for (OnContextsChangedListener l : contextsChangedListeners) {
l.contextAdded(c);
... | java | public void addContext(Context c) {
if (c == null) {
throw new IllegalArgumentException("The context must not be null. ");
}
validateContextName(c.getName());
this.contexts.add(c);
this.model.loadContext(c);
for (OnContextsChangedListener l : contextsChangedListeners) {
l.contextAdded(c);
... | [
"public",
"void",
"addContext",
"(",
"Context",
"c",
")",
"{",
"if",
"(",
"c",
"==",
"null",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"The context must not be null. \"",
")",
";",
"}",
"validateContextName",
"(",
"c",
".",
"getName",
"(",
... | Adds the given context.
@param c the context to be added
@throws IllegalArgumentException (since 2.6.0) if the given context is {@code null}.
@throws IllegalContextNameException (since 2.6.0) if context's name is {@code null} or empty or if a context
with the same name already exists. | [
"Adds",
"the",
"given",
"context",
"."
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/parosproxy/paros/model/Session.java#L1251-L1267 |
129,359 | zaproxy/zaproxy | src/org/parosproxy/paros/model/Session.java | Session.exportContext | public void exportContext (Context c, File file) throws ConfigurationException {
ZapXmlConfiguration config = new ZapXmlConfiguration();
config.setProperty(Context.CONTEXT_CONFIG_NAME, c.getName());
config.setProperty(Context.CONTEXT_CONFIG_DESC, c.getDescription());
config.setProperty(Context.CONTEXT_CON... | java | public void exportContext (Context c, File file) throws ConfigurationException {
ZapXmlConfiguration config = new ZapXmlConfiguration();
config.setProperty(Context.CONTEXT_CONFIG_NAME, c.getName());
config.setProperty(Context.CONTEXT_CONFIG_DESC, c.getDescription());
config.setProperty(Context.CONTEXT_CON... | [
"public",
"void",
"exportContext",
"(",
"Context",
"c",
",",
"File",
"file",
")",
"throws",
"ConfigurationException",
"{",
"ZapXmlConfiguration",
"config",
"=",
"new",
"ZapXmlConfiguration",
"(",
")",
";",
"config",
".",
"setProperty",
"(",
"Context",
".",
"CONT... | Export the specified context to a file
@param c
@param file
@throws ConfigurationException | [
"Export",
"the",
"specified",
"context",
"to",
"a",
"file"
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/parosproxy/paros/model/Session.java#L1346-L1366 |
129,360 | zaproxy/zaproxy | src/org/parosproxy/paros/model/Session.java | Session.getUrlParamParser | public ParameterParser getUrlParamParser(String url) {
List<Context> contexts = getContextsForUrl(url);
if (contexts.size() > 0) {
return contexts.get(0).getUrlParamParser();
}
return this.defaultParamParser;
} | java | public ParameterParser getUrlParamParser(String url) {
List<Context> contexts = getContextsForUrl(url);
if (contexts.size() > 0) {
return contexts.get(0).getUrlParamParser();
}
return this.defaultParamParser;
} | [
"public",
"ParameterParser",
"getUrlParamParser",
"(",
"String",
"url",
")",
"{",
"List",
"<",
"Context",
">",
"contexts",
"=",
"getContextsForUrl",
"(",
"url",
")",
";",
"if",
"(",
"contexts",
".",
"size",
"(",
")",
">",
"0",
")",
"{",
"return",
"contex... | Returns the url parameter parser associated with the first context found that includes the URL,
or the default parser if it is not
in a context
@param url
@return | [
"Returns",
"the",
"url",
"parameter",
"parser",
"associated",
"with",
"the",
"first",
"context",
"found",
"that",
"includes",
"the",
"URL",
"or",
"the",
"default",
"parser",
"if",
"it",
"is",
"not",
"in",
"a",
"context"
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/parosproxy/paros/model/Session.java#L1461-L1467 |
129,361 | zaproxy/zaproxy | src/org/parosproxy/paros/model/Session.java | Session.getFormParamParser | public ParameterParser getFormParamParser(String url) {
List<Context> contexts = getContextsForUrl(url);
if (contexts.size() > 0) {
return contexts.get(0).getPostParamParser();
}
return this.defaultParamParser;
} | java | public ParameterParser getFormParamParser(String url) {
List<Context> contexts = getContextsForUrl(url);
if (contexts.size() > 0) {
return contexts.get(0).getPostParamParser();
}
return this.defaultParamParser;
} | [
"public",
"ParameterParser",
"getFormParamParser",
"(",
"String",
"url",
")",
"{",
"List",
"<",
"Context",
">",
"contexts",
"=",
"getContextsForUrl",
"(",
"url",
")",
";",
"if",
"(",
"contexts",
".",
"size",
"(",
")",
">",
"0",
")",
"{",
"return",
"conte... | Returns the form parameter parser associated with the first context found that includes the URL,
or the default parser if it is not
in a context
@param url
@return | [
"Returns",
"the",
"form",
"parameter",
"parser",
"associated",
"with",
"the",
"first",
"context",
"found",
"that",
"includes",
"the",
"URL",
"or",
"the",
"default",
"parser",
"if",
"it",
"is",
"not",
"in",
"a",
"context"
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/parosproxy/paros/model/Session.java#L1476-L1482 |
129,362 | zaproxy/zaproxy | src/org/parosproxy/paros/model/Session.java | Session.getParams | public Map<String, String> getParams(HttpMessage msg, HtmlParameter.Type type) {
switch (type) {
case form: return this.getFormParamParser(msg.getRequestHeader().getURI().toString()).getParams(msg, type);
case url: return this.getUrlParamParser(msg.getRequestHeader().getURI().toString()).getParams(msg, type);
... | java | public Map<String, String> getParams(HttpMessage msg, HtmlParameter.Type type) {
switch (type) {
case form: return this.getFormParamParser(msg.getRequestHeader().getURI().toString()).getParams(msg, type);
case url: return this.getUrlParamParser(msg.getRequestHeader().getURI().toString()).getParams(msg, type);
... | [
"public",
"Map",
"<",
"String",
",",
"String",
">",
"getParams",
"(",
"HttpMessage",
"msg",
",",
"HtmlParameter",
".",
"Type",
"type",
")",
"{",
"switch",
"(",
"type",
")",
"{",
"case",
"form",
":",
"return",
"this",
".",
"getFormParamParser",
"(",
"msg"... | Returns the specified parameters for the given message based on the parser associated with the
first context found that includes the URL for the message, or the default parser if it is not
in a context
@param msg
@param type
@return | [
"Returns",
"the",
"specified",
"parameters",
"for",
"the",
"given",
"message",
"based",
"on",
"the",
"parser",
"associated",
"with",
"the",
"first",
"context",
"found",
"that",
"includes",
"the",
"URL",
"for",
"the",
"message",
"or",
"the",
"default",
"parser"... | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/parosproxy/paros/model/Session.java#L1492-L1499 |
129,363 | zaproxy/zaproxy | src/org/parosproxy/paros/model/Session.java | Session.getUrlParams | public Map<String, String> getUrlParams(URI uri) throws URIException {
Map<String, String> map = new HashMap<>();
for (NameValuePair parameter : getUrlParamParser(uri.toString()).parseParameters(uri.getEscapedQuery())) {
String value = parameter.getValue();
if (value == null) {
value = "";
}
... | java | public Map<String, String> getUrlParams(URI uri) throws URIException {
Map<String, String> map = new HashMap<>();
for (NameValuePair parameter : getUrlParamParser(uri.toString()).parseParameters(uri.getEscapedQuery())) {
String value = parameter.getValue();
if (value == null) {
value = "";
}
... | [
"public",
"Map",
"<",
"String",
",",
"String",
">",
"getUrlParams",
"(",
"URI",
"uri",
")",
"throws",
"URIException",
"{",
"Map",
"<",
"String",
",",
"String",
">",
"map",
"=",
"new",
"HashMap",
"<>",
"(",
")",
";",
"for",
"(",
"NameValuePair",
"parame... | Returns the URL parameters for the given URL based on the parser associated with the
first context found that includes the URL, or the default parser if it is not
in a context
@param uri
@return
@throws URIException | [
"Returns",
"the",
"URL",
"parameters",
"for",
"the",
"given",
"URL",
"based",
"on",
"the",
"parser",
"associated",
"with",
"the",
"first",
"context",
"found",
"that",
"includes",
"the",
"URL",
"or",
"the",
"default",
"parser",
"if",
"it",
"is",
"not",
"in"... | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/parosproxy/paros/model/Session.java#L1541-L1551 |
129,364 | zaproxy/zaproxy | src/org/parosproxy/paros/model/Session.java | Session.getFormParams | public Map<String, String> getFormParams(URI uri, String formData) throws URIException {
return this.getFormParamParser(uri.toString()).parse(formData);
} | java | public Map<String, String> getFormParams(URI uri, String formData) throws URIException {
return this.getFormParamParser(uri.toString()).parse(formData);
} | [
"public",
"Map",
"<",
"String",
",",
"String",
">",
"getFormParams",
"(",
"URI",
"uri",
",",
"String",
"formData",
")",
"throws",
"URIException",
"{",
"return",
"this",
".",
"getFormParamParser",
"(",
"uri",
".",
"toString",
"(",
")",
")",
".",
"parse",
... | Returns the FORM parameters for the given URL based on the parser associated with the
first context found that includes the URL, or the default parser if it is not
in a context
@param uri
@param formData
@return
@throws URIException | [
"Returns",
"the",
"FORM",
"parameters",
"for",
"the",
"given",
"URL",
"based",
"on",
"the",
"parser",
"associated",
"with",
"the",
"first",
"context",
"found",
"that",
"includes",
"the",
"URL",
"or",
"the",
"default",
"parser",
"if",
"it",
"is",
"not",
"in... | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/parosproxy/paros/model/Session.java#L1562-L1564 |
129,365 | zaproxy/zaproxy | src/org/zaproxy/zap/ZapGetMethod.java | ZapGetMethod.readResponse | @Override
protected void readResponse(HttpState state, HttpConnection conn)
throws IOException, HttpException {
LOG.trace("enter HttpMethodBase.readResponse(HttpState, HttpConnection)");
boolean isUpgrade = false;
while (getStatusLine() == null) {
readStatusLine(s... | java | @Override
protected void readResponse(HttpState state, HttpConnection conn)
throws IOException, HttpException {
LOG.trace("enter HttpMethodBase.readResponse(HttpState, HttpConnection)");
boolean isUpgrade = false;
while (getStatusLine() == null) {
readStatusLine(s... | [
"@",
"Override",
"protected",
"void",
"readResponse",
"(",
"HttpState",
"state",
",",
"HttpConnection",
"conn",
")",
"throws",
"IOException",
",",
"HttpException",
"{",
"LOG",
".",
"trace",
"(",
"\"enter HttpMethodBase.readResponse(HttpState, HttpConnection)\"",
")",
";... | Allow response code 101, that is Switching Protocols.
@see GetMethod#readResponse(HttpState, HttpConnection) | [
"Allow",
"response",
"code",
"101",
"that",
"is",
"Switching",
"Protocols",
"."
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/ZapGetMethod.java#L108-L155 |
129,366 | zaproxy/zaproxy | src/org/zaproxy/zap/ZapGetMethod.java | ZapGetMethod.releaseConnection | @Override
public void releaseConnection() {
Header header = getResponseHeader("content-type");
if (header != null) {
String contentTypeHeader = header.getValue();
if (contentTypeHeader != null && contentTypeHeader.toLowerCase(Locale.ROOT).contains("text/event-stream")) {
return;
}
}
super.relea... | java | @Override
public void releaseConnection() {
Header header = getResponseHeader("content-type");
if (header != null) {
String contentTypeHeader = header.getValue();
if (contentTypeHeader != null && contentTypeHeader.toLowerCase(Locale.ROOT).contains("text/event-stream")) {
return;
}
}
super.relea... | [
"@",
"Override",
"public",
"void",
"releaseConnection",
"(",
")",
"{",
"Header",
"header",
"=",
"getResponseHeader",
"(",
"\"content-type\"",
")",
";",
"if",
"(",
"header",
"!=",
"null",
")",
"{",
"String",
"contentTypeHeader",
"=",
"header",
".",
"getValue",
... | Avoid releasing connection on event stream that is used in Server-Sent
Events. | [
"Avoid",
"releasing",
"connection",
"on",
"event",
"stream",
"that",
"is",
"used",
"in",
"Server",
"-",
"Sent",
"Events",
"."
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/ZapGetMethod.java#L201-L212 |
129,367 | zaproxy/zaproxy | src/org/zaproxy/zap/extension/httppanel/view/util/HttpTextViewUtils.java | HttpTextViewUtils.isValidStartEndForLength | private static boolean isValidStartEndForLength(int start, int end, int length) {
if (start > length || end > length) {
return false;
}
return true;
} | java | private static boolean isValidStartEndForLength(int start, int end, int length) {
if (start > length || end > length) {
return false;
}
return true;
} | [
"private",
"static",
"boolean",
"isValidStartEndForLength",
"(",
"int",
"start",
",",
"int",
"end",
",",
"int",
"length",
")",
"{",
"if",
"(",
"start",
">",
"length",
"||",
"end",
">",
"length",
")",
"{",
"return",
"false",
";",
"}",
"return",
"true",
... | Tells whether or not the given start and end are valid for the given length, that is both start and end are lower that
the length.
@param start the start position to be validated
@param end the end position to be validated
@param length the length of the contents
@return {@code true} if the start and end positions are... | [
"Tells",
"whether",
"or",
"not",
"the",
"given",
"start",
"and",
"end",
"are",
"valid",
"for",
"the",
"given",
"length",
"that",
"is",
"both",
"start",
"and",
"end",
"are",
"lower",
"that",
"the",
"length",
"."
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/extension/httppanel/view/util/HttpTextViewUtils.java#L166-L171 |
129,368 | zaproxy/zaproxy | src/org/zaproxy/zap/control/AddOnLoader.java | AddOnLoader.parseClassDir | private List<ClassNameWrapper> parseClassDir(ClassLoader cl, File file, String packageName, FileFilter fileFilter) {
List<ClassNameWrapper> classNames = new ArrayList<> ();
File[] listFile = file.listFiles(fileFilter);
for (int i=0; i<listFile.length; i++) {
File entry = l... | java | private List<ClassNameWrapper> parseClassDir(ClassLoader cl, File file, String packageName, FileFilter fileFilter) {
List<ClassNameWrapper> classNames = new ArrayList<> ();
File[] listFile = file.listFiles(fileFilter);
for (int i=0; i<listFile.length; i++) {
File entry = l... | [
"private",
"List",
"<",
"ClassNameWrapper",
">",
"parseClassDir",
"(",
"ClassLoader",
"cl",
",",
"File",
"file",
",",
"String",
"packageName",
",",
"FileFilter",
"fileFilter",
")",
"{",
"List",
"<",
"ClassNameWrapper",
">",
"classNames",
"=",
"new",
"ArrayList",... | passed with the dots replaced. | [
"passed",
"with",
"the",
"dots",
"replaced",
"."
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/control/AddOnLoader.java#L964-L982 |
129,369 | zaproxy/zaproxy | src/org/zaproxy/zap/extension/users/ContextUserAuthManager.java | ContextUserAuthManager.setUsers | public void setUsers(List<User> users) {
users.forEach(u -> validateNonNull(u));
this.users = new ArrayList<>(users);
} | java | public void setUsers(List<User> users) {
users.forEach(u -> validateNonNull(u));
this.users = new ArrayList<>(users);
} | [
"public",
"void",
"setUsers",
"(",
"List",
"<",
"User",
">",
"users",
")",
"{",
"users",
".",
"forEach",
"(",
"u",
"->",
"validateNonNull",
"(",
"u",
")",
")",
";",
"this",
".",
"users",
"=",
"new",
"ArrayList",
"<>",
"(",
"users",
")",
";",
"}"
] | Sets a new list of users for this context. An internal copy of the provided list is stored.
@param users the users
@throws IllegalArgumentException (since TODO add version) if any of the given users is {@code null}. | [
"Sets",
"a",
"new",
"list",
"of",
"users",
"for",
"this",
"context",
".",
"An",
"internal",
"copy",
"of",
"the",
"provided",
"list",
"is",
"stored",
"."
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/extension/users/ContextUserAuthManager.java#L81-L84 |
129,370 | zaproxy/zaproxy | src/org/zaproxy/zap/extension/users/ContextUserAuthManager.java | ContextUserAuthManager.getUserById | public User getUserById(int id) {
for (User u : users)
if (u.getId() == id)
return u;
return null;
} | java | public User getUserById(int id) {
for (User u : users)
if (u.getId() == id)
return u;
return null;
} | [
"public",
"User",
"getUserById",
"(",
"int",
"id",
")",
"{",
"for",
"(",
"User",
"u",
":",
"users",
")",
"if",
"(",
"u",
".",
"getId",
"(",
")",
"==",
"id",
")",
"return",
"u",
";",
"return",
"null",
";",
"}"
] | Gets the user with a given id.
@param id the id
@return the user by id | [
"Gets",
"the",
"user",
"with",
"a",
"given",
"id",
"."
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/extension/users/ContextUserAuthManager.java#L126-L131 |
129,371 | zaproxy/zaproxy | src/org/zaproxy/zap/extension/users/ContextUserAuthManager.java | ContextUserAuthManager.removeUserById | public boolean removeUserById(int id) {
Iterator<User> it = users.iterator();
while (it.hasNext())
if (it.next().getId() == id) {
it.remove();
return true;
}
return false;
} | java | public boolean removeUserById(int id) {
Iterator<User> it = users.iterator();
while (it.hasNext())
if (it.next().getId() == id) {
it.remove();
return true;
}
return false;
} | [
"public",
"boolean",
"removeUserById",
"(",
"int",
"id",
")",
"{",
"Iterator",
"<",
"User",
">",
"it",
"=",
"users",
".",
"iterator",
"(",
")",
";",
"while",
"(",
"it",
".",
"hasNext",
"(",
")",
")",
"if",
"(",
"it",
".",
"next",
"(",
")",
".",
... | Removes the user with a given id.
@param id the id
@return true, if successful | [
"Removes",
"the",
"user",
"with",
"a",
"given",
"id",
"."
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/extension/users/ContextUserAuthManager.java#L139-L147 |
129,372 | zaproxy/zaproxy | src/org/zaproxy/zap/extension/httpsessions/HttpSessionsParam.java | HttpSessionsParam.setDefaultTokens | public void setDefaultTokens(final List<HttpSessionToken> tokens) {
this.defaultTokens = tokens;
saveDefaultTokens();
this.defaultTokensEnabled = defaultTokens.stream()
.filter(HttpSessionToken::isEnabled)
.map(HttpSessionToken::getName)
.collect(Collectors.toList());
} | java | public void setDefaultTokens(final List<HttpSessionToken> tokens) {
this.defaultTokens = tokens;
saveDefaultTokens();
this.defaultTokensEnabled = defaultTokens.stream()
.filter(HttpSessionToken::isEnabled)
.map(HttpSessionToken::getName)
.collect(Collectors.toList());
} | [
"public",
"void",
"setDefaultTokens",
"(",
"final",
"List",
"<",
"HttpSessionToken",
">",
"tokens",
")",
"{",
"this",
".",
"defaultTokens",
"=",
"tokens",
";",
"saveDefaultTokens",
"(",
")",
";",
"this",
".",
"defaultTokensEnabled",
"=",
"defaultTokens",
".",
... | Sets the default tokens.
@param tokens the new default tokens | [
"Sets",
"the",
"default",
"tokens",
"."
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/extension/httpsessions/HttpSessionsParam.java#L147-L155 |
129,373 | zaproxy/zaproxy | src/org/zaproxy/zap/extension/httpsessions/HttpSessionsParam.java | HttpSessionsParam.addDefaultToken | public boolean addDefaultToken(String name, boolean enabled) {
String normalisedName = getNormalisedSessionTokenName(name);
if (!getDefaultToken(normalisedName).isPresent()) {
defaultTokens.add(new HttpSessionToken(normalisedName, enabled));
if (enabled) {
defaultTokensEnabled.add(normalisedName);
... | java | public boolean addDefaultToken(String name, boolean enabled) {
String normalisedName = getNormalisedSessionTokenName(name);
if (!getDefaultToken(normalisedName).isPresent()) {
defaultTokens.add(new HttpSessionToken(normalisedName, enabled));
if (enabled) {
defaultTokensEnabled.add(normalisedName);
... | [
"public",
"boolean",
"addDefaultToken",
"(",
"String",
"name",
",",
"boolean",
"enabled",
")",
"{",
"String",
"normalisedName",
"=",
"getNormalisedSessionTokenName",
"(",
"name",
")",
";",
"if",
"(",
"!",
"getDefaultToken",
"(",
"normalisedName",
")",
".",
"isPr... | Adds the default session token with the given name and enabled state.
@param name the name of the session token.
@param enabled {@code true} if should be enabled, {@code false} otherwise.
@return {@code true} if the token did not exist, {@code false} otherwise.
@since TODO add version | [
"Adds",
"the",
"default",
"session",
"token",
"with",
"the",
"given",
"name",
"and",
"enabled",
"state",
"."
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/extension/httpsessions/HttpSessionsParam.java#L180-L191 |
129,374 | zaproxy/zaproxy | src/org/zaproxy/zap/extension/httpsessions/HttpSessionsParam.java | HttpSessionsParam.getDefaultToken | private Optional<HttpSessionToken> getDefaultToken(String name) {
return defaultTokens.stream().filter(e -> name.equalsIgnoreCase(e.getName())).findFirst();
} | java | private Optional<HttpSessionToken> getDefaultToken(String name) {
return defaultTokens.stream().filter(e -> name.equalsIgnoreCase(e.getName())).findFirst();
} | [
"private",
"Optional",
"<",
"HttpSessionToken",
">",
"getDefaultToken",
"(",
"String",
"name",
")",
"{",
"return",
"defaultTokens",
".",
"stream",
"(",
")",
".",
"filter",
"(",
"e",
"->",
"name",
".",
"equalsIgnoreCase",
"(",
"e",
".",
"getName",
"(",
")",... | Gets the default session token with the given name.
@param name the name of the session token.
@return a container with the {@code HttpSessionToken}, or empty if not found.
@see #defaultTokens | [
"Gets",
"the",
"default",
"session",
"token",
"with",
"the",
"given",
"name",
"."
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/extension/httpsessions/HttpSessionsParam.java#L200-L202 |
129,375 | zaproxy/zaproxy | src/org/zaproxy/zap/extension/httpsessions/HttpSessionsParam.java | HttpSessionsParam.setDefaultTokenEnabled | public boolean setDefaultTokenEnabled(String name, boolean enabled) {
Optional<HttpSessionToken> maybeToken = getDefaultToken(getNormalisedSessionTokenName(name));
if (maybeToken.isPresent()) {
HttpSessionToken token = maybeToken.get();
if (token.isEnabled() == enabled) {
return true;
}
if (t... | java | public boolean setDefaultTokenEnabled(String name, boolean enabled) {
Optional<HttpSessionToken> maybeToken = getDefaultToken(getNormalisedSessionTokenName(name));
if (maybeToken.isPresent()) {
HttpSessionToken token = maybeToken.get();
if (token.isEnabled() == enabled) {
return true;
}
if (t... | [
"public",
"boolean",
"setDefaultTokenEnabled",
"(",
"String",
"name",
",",
"boolean",
"enabled",
")",
"{",
"Optional",
"<",
"HttpSessionToken",
">",
"maybeToken",
"=",
"getDefaultToken",
"(",
"getNormalisedSessionTokenName",
"(",
"name",
")",
")",
";",
"if",
"(",
... | Sets whether or not the default session token with the given name is enabled.
@param name the name of the session token.
@param enabled {@code true} if should be enabled, {@code false} otherwise.
@return {@code true} if the token's enabled state changed, {@code false} otherwise.
@since TODO add version | [
"Sets",
"whether",
"or",
"not",
"the",
"default",
"session",
"token",
"with",
"the",
"given",
"name",
"is",
"enabled",
"."
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/extension/httpsessions/HttpSessionsParam.java#L212-L229 |
129,376 | zaproxy/zaproxy | src/org/zaproxy/zap/extension/httpsessions/HttpSessionsParam.java | HttpSessionsParam.removeDefaultToken | public boolean removeDefaultToken(String name) {
String normalisedName = getNormalisedSessionTokenName(name);
Optional<HttpSessionToken> maybeToken = getDefaultToken(normalisedName);
if (maybeToken.isPresent()) {
defaultTokens.remove(maybeToken.get());
defaultTokensEnabled.remove(normalisedName);
s... | java | public boolean removeDefaultToken(String name) {
String normalisedName = getNormalisedSessionTokenName(name);
Optional<HttpSessionToken> maybeToken = getDefaultToken(normalisedName);
if (maybeToken.isPresent()) {
defaultTokens.remove(maybeToken.get());
defaultTokensEnabled.remove(normalisedName);
s... | [
"public",
"boolean",
"removeDefaultToken",
"(",
"String",
"name",
")",
"{",
"String",
"normalisedName",
"=",
"getNormalisedSessionTokenName",
"(",
"name",
")",
";",
"Optional",
"<",
"HttpSessionToken",
">",
"maybeToken",
"=",
"getDefaultToken",
"(",
"normalisedName",
... | Removes the default session token with the given name.
@param name the name of the session token.
@return {@code true} if the token existed, {@code false} otherwise.
@since TODO add version | [
"Removes",
"the",
"default",
"session",
"token",
"with",
"the",
"given",
"name",
"."
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/extension/httpsessions/HttpSessionsParam.java#L250-L260 |
129,377 | zaproxy/zaproxy | src/org/zaproxy/zap/utils/HirshbergMatcher.java | HirshbergMatcher.reverseString | private static String reverseString(String in) {
StringBuilder out = new StringBuilder(in).reverse();
return out.toString();
} | java | private static String reverseString(String in) {
StringBuilder out = new StringBuilder(in).reverse();
return out.toString();
} | [
"private",
"static",
"String",
"reverseString",
"(",
"String",
"in",
")",
"{",
"StringBuilder",
"out",
"=",
"new",
"StringBuilder",
"(",
"in",
")",
".",
"reverse",
"(",
")",
";",
"return",
"out",
".",
"toString",
"(",
")",
";",
"}"
] | This method takes a string as input reverses it and returns the result
@param in the string to be reversed
@return the reversed string | [
"This",
"method",
"takes",
"a",
"string",
"as",
"input",
"reverses",
"it",
"and",
"returns",
"the",
"result"
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/utils/HirshbergMatcher.java#L110-L113 |
129,378 | zaproxy/zaproxy | src/org/zaproxy/zap/utils/HirshbergMatcher.java | HirshbergMatcher.getLCS | public String getLCS(String strA, String strB) {
if ("".equals(strA)) {
return "";
}
StringBuilder sb = new StringBuilder();
algC(sb, strA.length(), strB.length(), strA, strB);
return sb.toString();
} | java | public String getLCS(String strA, String strB) {
if ("".equals(strA)) {
return "";
}
StringBuilder sb = new StringBuilder();
algC(sb, strA.length(), strB.length(), strA, strB);
return sb.toString();
} | [
"public",
"String",
"getLCS",
"(",
"String",
"strA",
",",
"String",
"strB",
")",
"{",
"if",
"(",
"\"\"",
".",
"equals",
"(",
"strA",
")",
")",
"{",
"return",
"\"\"",
";",
"}",
"StringBuilder",
"sb",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"algC",... | Gets the Longest Common Subsequence of two strings, using Dynamic
programming techniques, and minimal memory
@param strA the first String
@param strB the second String
@return the Longest Common Subsequence of strA and strB | [
"Gets",
"the",
"Longest",
"Common",
"Subsequence",
"of",
"two",
"strings",
"using",
"Dynamic",
"programming",
"techniques",
"and",
"minimal",
"memory"
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/utils/HirshbergMatcher.java#L137-L145 |
129,379 | zaproxy/zaproxy | src/org/zaproxy/zap/utils/HirshbergMatcher.java | HirshbergMatcher.getMatchRatio | public double getMatchRatio(String strA, String strB) {
if (strA == null && strB == null) {
return MAX_RATIO;
} else if (strA == null || strB == null) {
return MIN_RATIO;
}
if (strA.isEmpty() && strB.isEmpty()) {
return MAX_RATIO;... | java | public double getMatchRatio(String strA, String strB) {
if (strA == null && strB == null) {
return MAX_RATIO;
} else if (strA == null || strB == null) {
return MIN_RATIO;
}
if (strA.isEmpty() && strB.isEmpty()) {
return MAX_RATIO;... | [
"public",
"double",
"getMatchRatio",
"(",
"String",
"strA",
",",
"String",
"strB",
")",
"{",
"if",
"(",
"strA",
"==",
"null",
"&&",
"strB",
"==",
"null",
")",
"{",
"return",
"MAX_RATIO",
";",
"}",
"else",
"if",
"(",
"strA",
"==",
"null",
"||",
"strB"... | Calculate the ratio of similarity between 2 strings using LCS
@param strA the first String
@param strB the second String
@return the percentage double number | [
"Calculate",
"the",
"ratio",
"of",
"similarity",
"between",
"2",
"strings",
"using",
"LCS"
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/utils/HirshbergMatcher.java#L154-L171 |
129,380 | zaproxy/zaproxy | src/org/zaproxy/zap/utils/TimeStampUtils.java | TimeStampUtils.currentDefaultFormattedTimeStamp | public static String currentDefaultFormattedTimeStamp() {
try {
SimpleDateFormat sdf = new SimpleDateFormat(DEFAULT_TIME_STAMP_FORMAT);
return sdf.format(new Date());
} catch (IllegalArgumentException e) {
SimpleDateFormat sdf = new SimpleDateFormat(SAFE_TIME_STAMP_FORMAT);
return sdf.format(new D... | java | public static String currentDefaultFormattedTimeStamp() {
try {
SimpleDateFormat sdf = new SimpleDateFormat(DEFAULT_TIME_STAMP_FORMAT);
return sdf.format(new Date());
} catch (IllegalArgumentException e) {
SimpleDateFormat sdf = new SimpleDateFormat(SAFE_TIME_STAMP_FORMAT);
return sdf.format(new D... | [
"public",
"static",
"String",
"currentDefaultFormattedTimeStamp",
"(",
")",
"{",
"try",
"{",
"SimpleDateFormat",
"sdf",
"=",
"new",
"SimpleDateFormat",
"(",
"DEFAULT_TIME_STAMP_FORMAT",
")",
";",
"return",
"sdf",
".",
"format",
"(",
"new",
"Date",
"(",
")",
")",... | Gets the current time stamp based on the DEFAULT format.
The DEFAULT format is defined in Messages.properties.
@return current formatted time stamp as {@code String} | [
"Gets",
"the",
"current",
"time",
"stamp",
"based",
"on",
"the",
"DEFAULT",
"format",
".",
"The",
"DEFAULT",
"format",
"is",
"defined",
"in",
"Messages",
".",
"properties",
"."
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/utils/TimeStampUtils.java#L51-L59 |
129,381 | zaproxy/zaproxy | src/org/zaproxy/zap/extension/dynssl/DynamicSSLPanel.java | DynamicSSLPanel.doImport | private void doImport() {
if (checkExistingCertificate()) {
// prevent overwriting
return;
}
final JFileChooser fc = new JFileChooser(System.getProperty("user.home"));
fc.setFileSelectionMode(JFileChooser.FILES_ONLY);
fc.setMultiSelectionEnabled(false);
fc.setSelectedFile(new File(CONFIGURATIO... | java | private void doImport() {
if (checkExistingCertificate()) {
// prevent overwriting
return;
}
final JFileChooser fc = new JFileChooser(System.getProperty("user.home"));
fc.setFileSelectionMode(JFileChooser.FILES_ONLY);
fc.setMultiSelectionEnabled(false);
fc.setSelectedFile(new File(CONFIGURATIO... | [
"private",
"void",
"doImport",
"(",
")",
"{",
"if",
"(",
"checkExistingCertificate",
"(",
")",
")",
"{",
"// prevent overwriting\r",
"return",
";",
"}",
"final",
"JFileChooser",
"fc",
"=",
"new",
"JFileChooser",
"(",
"System",
".",
"getProperty",
"(",
"\"user.... | Import Root CA certificate from other ZAP configuration files. | [
"Import",
"Root",
"CA",
"certificate",
"from",
"other",
"ZAP",
"configuration",
"files",
"."
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/extension/dynssl/DynamicSSLPanel.java#L273-L331 |
129,382 | zaproxy/zaproxy | src/org/zaproxy/zap/extension/dynssl/DynamicSSLPanel.java | DynamicSSLPanel.doSave | private void doSave() {
if (txt_PubCert.getDocument().getLength() < MIN_CERT_LENGTH) {
logger.error("Illegal state! There seems to be no certificate available.");
bt_save.setEnabled(false);
}
final JFileChooser fc = new JFileChooser(System.getProperty("user.home"));
fc.setFileSelectionMode(JFileChoo... | java | private void doSave() {
if (txt_PubCert.getDocument().getLength() < MIN_CERT_LENGTH) {
logger.error("Illegal state! There seems to be no certificate available.");
bt_save.setEnabled(false);
}
final JFileChooser fc = new JFileChooser(System.getProperty("user.home"));
fc.setFileSelectionMode(JFileChoo... | [
"private",
"void",
"doSave",
"(",
")",
"{",
"if",
"(",
"txt_PubCert",
".",
"getDocument",
"(",
")",
".",
"getLength",
"(",
")",
"<",
"MIN_CERT_LENGTH",
")",
"{",
"logger",
".",
"error",
"(",
"\"Illegal state! There seems to be no certificate available.\"",
")",
... | Saving Root CA certificate to disk. | [
"Saving",
"Root",
"CA",
"certificate",
"to",
"disk",
"."
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/extension/dynssl/DynamicSSLPanel.java#L417-L437 |
129,383 | zaproxy/zaproxy | src/org/zaproxy/zap/extension/dynssl/DynamicSSLPanel.java | DynamicSSLPanel.doGenerate | private void doGenerate() {
if (checkExistingCertificate()) {
// prevent overwriting
return;
}
try {
final KeyStore newrootca = SslCertificateUtils.createRootCA();
setRootca(newrootca);
} catch (final Exception e) {
logger.error("Error while generating Root CA certificate", e);
}
} | java | private void doGenerate() {
if (checkExistingCertificate()) {
// prevent overwriting
return;
}
try {
final KeyStore newrootca = SslCertificateUtils.createRootCA();
setRootca(newrootca);
} catch (final Exception e) {
logger.error("Error while generating Root CA certificate", e);
}
} | [
"private",
"void",
"doGenerate",
"(",
")",
"{",
"if",
"(",
"checkExistingCertificate",
"(",
")",
")",
"{",
"// prevent overwriting\r",
"return",
";",
"}",
"try",
"{",
"final",
"KeyStore",
"newrootca",
"=",
"SslCertificateUtils",
".",
"createRootCA",
"(",
")",
... | Generates a new Root CA certificate ... | [
"Generates",
"a",
"new",
"Root",
"CA",
"certificate",
"..."
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/extension/dynssl/DynamicSSLPanel.java#L448-L459 |
129,384 | zaproxy/zaproxy | src/org/zaproxy/zap/extension/dynssl/DynamicSSLPanel.java | DynamicSSLPanel.checkExistingCertificate | private boolean checkExistingCertificate() {
boolean alreadyexists = txt_PubCert.getDocument().getLength() > MIN_CERT_LENGTH;
if (alreadyexists) {
final int result = JOptionPane.showConfirmDialog(this,
Constant.messages.getString("dynssl.message2.caalreadyexists")
+ "\n"
+ Constant.messages.... | java | private boolean checkExistingCertificate() {
boolean alreadyexists = txt_PubCert.getDocument().getLength() > MIN_CERT_LENGTH;
if (alreadyexists) {
final int result = JOptionPane.showConfirmDialog(this,
Constant.messages.getString("dynssl.message2.caalreadyexists")
+ "\n"
+ Constant.messages.... | [
"private",
"boolean",
"checkExistingCertificate",
"(",
")",
"{",
"boolean",
"alreadyexists",
"=",
"txt_PubCert",
".",
"getDocument",
"(",
")",
".",
"getLength",
"(",
")",
">",
"MIN_CERT_LENGTH",
";",
"if",
"(",
"alreadyexists",
")",
"{",
"final",
"int",
"resul... | Check if certificate already exists. It will ask the user to overwrite.
@return True, if certificate exists OR it should be overwritten. | [
"Check",
"if",
"certificate",
"already",
"exists",
".",
"It",
"will",
"ask",
"the",
"user",
"to",
"overwrite",
"."
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/extension/dynssl/DynamicSSLPanel.java#L465-L479 |
129,385 | zaproxy/zaproxy | src/org/parosproxy/paros/control/Control.java | Control.shutdown | @Override
public void shutdown(boolean compact) {
try {
if (view != null) {
view.getRequestPanel().saveConfig(model.getOptionsParam().getConfig());
view.getResponsePanel().saveConfig(model.getOptionsParam().getConfig());
}
getProxy... | java | @Override
public void shutdown(boolean compact) {
try {
if (view != null) {
view.getRequestPanel().saveConfig(model.getOptionsParam().getConfig());
view.getResponsePanel().saveConfig(model.getOptionsParam().getConfig());
}
getProxy... | [
"@",
"Override",
"public",
"void",
"shutdown",
"(",
"boolean",
"compact",
")",
"{",
"try",
"{",
"if",
"(",
"view",
"!=",
"null",
")",
"{",
"view",
".",
"getRequestPanel",
"(",
")",
".",
"saveConfig",
"(",
"model",
".",
"getOptionsParam",
"(",
")",
".",... | Override inherited shutdown to add stopping proxy servers. | [
"Override",
"inherited",
"shutdown",
"to",
"add",
"stopping",
"proxy",
"servers",
"."
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/parosproxy/paros/control/Control.java#L185-L199 |
129,386 | zaproxy/zaproxy | src/org/parosproxy/paros/control/Control.java | Control.closeSessionAndCreateAndOpenUntitledDb | private void closeSessionAndCreateAndOpenUntitledDb() throws Exception {
getExtensionLoader().sessionAboutToChangeAllPlugin(null);
model.closeSession();
log.info("Create and Open Untitled Db");
model.createAndOpenUntitledDb();
} | java | private void closeSessionAndCreateAndOpenUntitledDb() throws Exception {
getExtensionLoader().sessionAboutToChangeAllPlugin(null);
model.closeSession();
log.info("Create and Open Untitled Db");
model.createAndOpenUntitledDb();
} | [
"private",
"void",
"closeSessionAndCreateAndOpenUntitledDb",
"(",
")",
"throws",
"Exception",
"{",
"getExtensionLoader",
"(",
")",
".",
"sessionAboutToChangeAllPlugin",
"(",
"null",
")",
";",
"model",
".",
"closeSession",
"(",
")",
";",
"log",
".",
"info",
"(",
... | Closes the old session and creates and opens an untitled database.
@throws Exception if an error occurred while creating or opening the database. | [
"Closes",
"the",
"old",
"session",
"and",
"creates",
"and",
"opens",
"an",
"untitled",
"database",
"."
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/parosproxy/paros/control/Control.java#L442-L447 |
129,387 | zaproxy/zaproxy | src/org/zaproxy/zap/view/TechnologyTreePanel.java | TechnologyTreePanel.setTechSet | public void setTechSet(TechSet techSet) {
Set<Tech> includedTech = techSet.getIncludeTech();
Iterator<Entry<Tech, DefaultMutableTreeNode>> iter = techToNodeMap.entrySet().iterator();
while (iter.hasNext()) {
Entry<Tech, DefaultMutableTreeNode> node = iter.next();
TreePath... | java | public void setTechSet(TechSet techSet) {
Set<Tech> includedTech = techSet.getIncludeTech();
Iterator<Entry<Tech, DefaultMutableTreeNode>> iter = techToNodeMap.entrySet().iterator();
while (iter.hasNext()) {
Entry<Tech, DefaultMutableTreeNode> node = iter.next();
TreePath... | [
"public",
"void",
"setTechSet",
"(",
"TechSet",
"techSet",
")",
"{",
"Set",
"<",
"Tech",
">",
"includedTech",
"=",
"techSet",
".",
"getIncludeTech",
"(",
")",
";",
"Iterator",
"<",
"Entry",
"<",
"Tech",
",",
"DefaultMutableTreeNode",
">",
">",
"iter",
"=",... | Sets the technologies that should be selected, if included, and not if excluded.
@param techSet the technologies that will be selected, if included, and not if excluded.
@see TechSet#includes(Tech) | [
"Sets",
"the",
"technologies",
"that",
"should",
"be",
"selected",
"if",
"included",
"and",
"not",
"if",
"excluded",
"."
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/view/TechnologyTreePanel.java#L116-L129 |
129,388 | zaproxy/zaproxy | src/org/parosproxy/paros/core/scanner/AbstractAppParamPlugin.java | AbstractAppParamPlugin.scanVariant | private void scanVariant() {
for (int i = 0; i < variant.getParamList().size() && !isStop(); i++) {
// ZAP: Removed unnecessary cast.
originalPair = variant.getParamList().get(i);
if (!isToExclude(originalPair)) {
// We nee... | java | private void scanVariant() {
for (int i = 0; i < variant.getParamList().size() && !isStop(); i++) {
// ZAP: Removed unnecessary cast.
originalPair = variant.getParamList().get(i);
if (!isToExclude(originalPair)) {
// We nee... | [
"private",
"void",
"scanVariant",
"(",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"variant",
".",
"getParamList",
"(",
")",
".",
"size",
"(",
")",
"&&",
"!",
"isStop",
"(",
")",
";",
"i",
"++",
")",
"{",
"// ZAP: Removed unnecessary... | Scan the current message using the current Variant | [
"Scan",
"the",
"current",
"message",
"using",
"the",
"current",
"Variant"
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/parosproxy/paros/core/scanner/AbstractAppParamPlugin.java#L188-L207 |
129,389 | zaproxy/zaproxy | src/org/parosproxy/paros/core/scanner/AbstractAppParamPlugin.java | AbstractAppParamPlugin.isToExclude | private boolean isToExclude(NameValuePair param) {
List<ScannerParamFilter> excludedParameters = getParameterExclusionFilters(param);
// We can use the base one, we don't do anything with it
HttpMessage msg = getBaseMsg();
for (ScannerParamFilter filter : excluded... | java | private boolean isToExclude(NameValuePair param) {
List<ScannerParamFilter> excludedParameters = getParameterExclusionFilters(param);
// We can use the base one, we don't do anything with it
HttpMessage msg = getBaseMsg();
for (ScannerParamFilter filter : excluded... | [
"private",
"boolean",
"isToExclude",
"(",
"NameValuePair",
"param",
")",
"{",
"List",
"<",
"ScannerParamFilter",
">",
"excludedParameters",
"=",
"getParameterExclusionFilters",
"(",
"param",
")",
";",
"// We can use the base one, we don't do anything with it\r",
"HttpMessage"... | Inner method to check if the current parameter should be excluded
@param param the param object
@return true if it need to be excluded | [
"Inner",
"method",
"to",
"check",
"if",
"the",
"current",
"parameter",
"should",
"be",
"excluded"
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/parosproxy/paros/core/scanner/AbstractAppParamPlugin.java#L214-L227 |
129,390 | zaproxy/zaproxy | src/org/zaproxy/zap/extension/pscan/PluginPassiveScanner.java | PluginPassiveScanner.setConfig | public void setConfig(Configuration config) {
if (config == null) {
throw new IllegalArgumentException("Parameter config must not be null.");
}
this.config = config;
this.loadFrom(config);
} | java | public void setConfig(Configuration config) {
if (config == null) {
throw new IllegalArgumentException("Parameter config must not be null.");
}
this.config = config;
this.loadFrom(config);
} | [
"public",
"void",
"setConfig",
"(",
"Configuration",
"config",
")",
"{",
"if",
"(",
"config",
"==",
"null",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"Parameter config must not be null.\"",
")",
";",
"}",
"this",
".",
"config",
"=",
"config",
... | Sets the current configuration of the passive scanner.
@param config the configuration of the scanner
@throws IllegalArgumentException if the given parameter is {@code null}.
@since 1.4.0
@see #getConfig() | [
"Sets",
"the",
"current",
"configuration",
"of",
"the",
"passive",
"scanner",
"."
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/extension/pscan/PluginPassiveScanner.java#L95-L101 |
129,391 | zaproxy/zaproxy | src/org/zaproxy/zap/extension/pscan/PluginPassiveScanner.java | PluginPassiveScanner.isPluginConfiguration | private boolean isPluginConfiguration(Configuration configuration) {
return (configuration.containsKey(ID_KEY) && getPluginId() == configuration.getInt(ID_KEY))
// To keep backwards compatibility check also the classname
|| getClass().getCanonicalName().equals(configuration.getString(CLASSNAME_KEY, ""));
... | java | private boolean isPluginConfiguration(Configuration configuration) {
return (configuration.containsKey(ID_KEY) && getPluginId() == configuration.getInt(ID_KEY))
// To keep backwards compatibility check also the classname
|| getClass().getCanonicalName().equals(configuration.getString(CLASSNAME_KEY, ""));
... | [
"private",
"boolean",
"isPluginConfiguration",
"(",
"Configuration",
"configuration",
")",
"{",
"return",
"(",
"configuration",
".",
"containsKey",
"(",
"ID_KEY",
")",
"&&",
"getPluginId",
"(",
")",
"==",
"configuration",
".",
"getInt",
"(",
"ID_KEY",
")",
")",
... | Tells whether or not the given configuration belongs to this passive scanner.
@param configuration the configuration to check
@return {@code true} if the configuration belongs to this passive scanner, {@code false} otherwise | [
"Tells",
"whether",
"or",
"not",
"the",
"given",
"configuration",
"belongs",
"to",
"this",
"passive",
"scanner",
"."
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/extension/pscan/PluginPassiveScanner.java#L125-L129 |
129,392 | zaproxy/zaproxy | src/org/zaproxy/zap/view/renderer/DateFormatStringValue.java | DateFormatStringValue.getString | @Override
public String getString(Object value) {
try {
return DATE_TIME_FORMAT.format(value);
} catch (IllegalArgumentException ignore) {
// There's not much that can be done.
}
return StringValues.TO_STRING.getString(value);
} | java | @Override
public String getString(Object value) {
try {
return DATE_TIME_FORMAT.format(value);
} catch (IllegalArgumentException ignore) {
// There's not much that can be done.
}
return StringValues.TO_STRING.getString(value);
} | [
"@",
"Override",
"public",
"String",
"getString",
"(",
"Object",
"value",
")",
"{",
"try",
"{",
"return",
"DATE_TIME_FORMAT",
".",
"format",
"(",
"value",
")",
";",
"}",
"catch",
"(",
"IllegalArgumentException",
"ignore",
")",
"{",
"// There's not much that can ... | This method is not threadsafe and should therefore only be called from the EDT | [
"This",
"method",
"is",
"not",
"threadsafe",
"and",
"should",
"therefore",
"only",
"be",
"called",
"from",
"the",
"EDT"
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/view/renderer/DateFormatStringValue.java#L40-L48 |
129,393 | zaproxy/zaproxy | src/org/zaproxy/zap/extension/api/ContextAPI.java | ContextAPI.buildResponseFromContext | private ApiResponse buildResponseFromContext(Context c) {
Map<String, String> fields = new HashMap<>();
fields.put("name", c.getName());
fields.put("id", Integer.toString(c.getIndex()));
fields.put("description", c.getDescription());
fields.put("inScope", Boolean.toString(c.isInScope()));
fields.put("... | java | private ApiResponse buildResponseFromContext(Context c) {
Map<String, String> fields = new HashMap<>();
fields.put("name", c.getName());
fields.put("id", Integer.toString(c.getIndex()));
fields.put("description", c.getDescription());
fields.put("inScope", Boolean.toString(c.isInScope()));
fields.put("... | [
"private",
"ApiResponse",
"buildResponseFromContext",
"(",
"Context",
"c",
")",
"{",
"Map",
"<",
"String",
",",
"String",
">",
"fields",
"=",
"new",
"HashMap",
"<>",
"(",
")",
";",
"fields",
".",
"put",
"(",
"\"name\"",
",",
"c",
".",
"getName",
"(",
"... | Builds the response describing an Context.
@param c the context
@return the api response | [
"Builds",
"the",
"response",
"describing",
"an",
"Context",
"."
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/extension/api/ContextAPI.java#L376-L406 |
129,394 | zaproxy/zaproxy | src/org/zaproxy/zap/extension/api/ContextAPI.java | ContextAPI.getTech | private Tech getTech(String techName) throws ApiException {
String trimmedTechName = techName.trim();
for(Tech tech : Tech.builtInTech) {
if (tech.toString().equalsIgnoreCase(trimmedTechName))
return tech;
}
throw new ApiException(Type.ILLEGAL_PARAMETER,
"The tech '" + trimmedTechName + "' do... | java | private Tech getTech(String techName) throws ApiException {
String trimmedTechName = techName.trim();
for(Tech tech : Tech.builtInTech) {
if (tech.toString().equalsIgnoreCase(trimmedTechName))
return tech;
}
throw new ApiException(Type.ILLEGAL_PARAMETER,
"The tech '" + trimmedTechName + "' do... | [
"private",
"Tech",
"getTech",
"(",
"String",
"techName",
")",
"throws",
"ApiException",
"{",
"String",
"trimmedTechName",
"=",
"techName",
".",
"trim",
"(",
")",
";",
"for",
"(",
"Tech",
"tech",
":",
"Tech",
".",
"builtInTech",
")",
"{",
"if",
"(",
"tech... | Gets the tech that matches the techName
or throws an exception if no tech matches
@param techName the name of the tech
@return the matching tech
@throws ApiException the api exception | [
"Gets",
"the",
"tech",
"that",
"matches",
"the",
"techName",
"or",
"throws",
"an",
"exception",
"if",
"no",
"tech",
"matches"
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/extension/api/ContextAPI.java#L424-L432 |
129,395 | zaproxy/zaproxy | src/org/zaproxy/zap/view/PersistSessionDialog.java | PersistSessionDialog.getStartSessionButton | private JButton getStartSessionButton() {
if (startSessionButton == null) {
startSessionButton = new JButton();
startSessionButton.setText(Constant.messages.getString("database.newsession.button.start"));
startSessionButton.setEnabled(false);
startSessionButton.addActionListener(new java.awt.event.Ac... | java | private JButton getStartSessionButton() {
if (startSessionButton == null) {
startSessionButton = new JButton();
startSessionButton.setText(Constant.messages.getString("database.newsession.button.start"));
startSessionButton.setEnabled(false);
startSessionButton.addActionListener(new java.awt.event.Ac... | [
"private",
"JButton",
"getStartSessionButton",
"(",
")",
"{",
"if",
"(",
"startSessionButton",
"==",
"null",
")",
"{",
"startSessionButton",
"=",
"new",
"JButton",
"(",
")",
";",
"startSessionButton",
".",
"setText",
"(",
"Constant",
".",
"messages",
".",
"get... | This method initializes startSessionButton
@return javax.swing.JButton | [
"This",
"method",
"initializes",
"startSessionButton"
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/view/PersistSessionDialog.java#L190-L204 |
129,396 | zaproxy/zaproxy | src/org/parosproxy/paros/model/SiteMap.java | SiteMap.pollPath | public synchronized HttpMessage pollPath(HttpMessage msg) {
SiteNode resultNode = null;
URI uri = msg.getRequestHeader().getURI();
SiteNode parent = getRoot();
String folder;
try {
String host = getHostName(uri);
//... | java | public synchronized HttpMessage pollPath(HttpMessage msg) {
SiteNode resultNode = null;
URI uri = msg.getRequestHeader().getURI();
SiteNode parent = getRoot();
String folder;
try {
String host = getHostName(uri);
//... | [
"public",
"synchronized",
"HttpMessage",
"pollPath",
"(",
"HttpMessage",
"msg",
")",
"{",
"SiteNode",
"resultNode",
"=",
"null",
";",
"URI",
"uri",
"=",
"msg",
".",
"getRequestHeader",
"(",
")",
".",
"getURI",
"(",
")",
";",
"SiteNode",
"parent",
"=",
"get... | Return the a HttpMessage of the same type under the tree path.
@param msg
@return null = not found | [
"Return",
"the",
"a",
"HttpMessage",
"of",
"the",
"same",
"type",
"under",
"the",
"tree",
"path",
"."
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/parosproxy/paros/model/SiteMap.java#L129-L180 |
129,397 | zaproxy/zaproxy | src/org/parosproxy/paros/model/SiteMap.java | SiteMap.addPath | public synchronized SiteNode addPath(HistoryReference ref) {
if (Constant.isLowMemoryOptionSet()) {
throw new InvalidParameterException("SiteMap should not be accessed when the low memory option is set");
}
HttpMessage msg = null;
try {
msg = ref.getHttpMessage();
... | java | public synchronized SiteNode addPath(HistoryReference ref) {
if (Constant.isLowMemoryOptionSet()) {
throw new InvalidParameterException("SiteMap should not be accessed when the low memory option is set");
}
HttpMessage msg = null;
try {
msg = ref.getHttpMessage();
... | [
"public",
"synchronized",
"SiteNode",
"addPath",
"(",
"HistoryReference",
"ref",
")",
"{",
"if",
"(",
"Constant",
".",
"isLowMemoryOptionSet",
"(",
")",
")",
"{",
"throw",
"new",
"InvalidParameterException",
"(",
"\"SiteMap should not be accessed when the low memory optio... | Add the HistoryReference into the SiteMap.
This method will rely on reading message from the History table.
Note that this method must only be called on the EventDispatchThread
@param ref | [
"Add",
"the",
"HistoryReference",
"into",
"the",
"SiteMap",
".",
"This",
"method",
"will",
"rely",
"on",
"reading",
"message",
"from",
"the",
"History",
"table",
".",
"Note",
"that",
"this",
"method",
"must",
"only",
"be",
"called",
"on",
"the",
"EventDispat... | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/parosproxy/paros/model/SiteMap.java#L347-L362 |
129,398 | zaproxy/zaproxy | src/org/parosproxy/paros/model/SiteMap.java | SiteMap.setFilter | public void setFilter (SiteTreeFilter filter) {
this.filter = filter;
SiteNode root = getRoot();
setFilter(filter, root);
// Never filter the root node
root.setFiltered(false);
} | java | public void setFilter (SiteTreeFilter filter) {
this.filter = filter;
SiteNode root = getRoot();
setFilter(filter, root);
// Never filter the root node
root.setFiltered(false);
} | [
"public",
"void",
"setFilter",
"(",
"SiteTreeFilter",
"filter",
")",
"{",
"this",
".",
"filter",
"=",
"filter",
";",
"SiteNode",
"root",
"=",
"getRoot",
"(",
")",
";",
"setFilter",
"(",
"filter",
",",
"root",
")",
";",
"// Never filter the root node\r",
"roo... | Set the filter for the sites tree
@param filter | [
"Set",
"the",
"filter",
"for",
"the",
"sites",
"tree"
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/parosproxy/paros/model/SiteMap.java#L731-L737 |
129,399 | zaproxy/zaproxy | src/org/parosproxy/paros/model/SiteMap.java | SiteMap.clearParentFilter | private void clearParentFilter (SiteNode parent) {
if (parent != null) {
parent.setFiltered(false);
clearParentFilter(parent.getParent());
}
} | java | private void clearParentFilter (SiteNode parent) {
if (parent != null) {
parent.setFiltered(false);
clearParentFilter(parent.getParent());
}
} | [
"private",
"void",
"clearParentFilter",
"(",
"SiteNode",
"parent",
")",
"{",
"if",
"(",
"parent",
"!=",
"null",
")",
"{",
"parent",
".",
"setFiltered",
"(",
"false",
")",
";",
"clearParentFilter",
"(",
"parent",
".",
"getParent",
"(",
")",
")",
";",
"}",... | Recurse up the tree setting all of the parent nodes to unfiltered
@param parent | [
"Recurse",
"up",
"the",
"tree",
"setting",
"all",
"of",
"the",
"parent",
"nodes",
"to",
"unfiltered"
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/parosproxy/paros/model/SiteMap.java#L788-L793 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.