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,200 | zaproxy/zaproxy | src/org/zaproxy/zap/view/popup/PopupMenuUtils.java | PopupMenuUtils.addSeparatorIfNeeded | public static boolean addSeparatorIfNeeded(JPopupMenu popupMenu) {
final int menuComponentCount = popupMenu.getComponentCount();
if (menuComponentCount == 0) {
return false;
}
final Component lastMenuComponent = popupMenu.getComponent(menuComponentCount - 1);
if (isPo... | java | public static boolean addSeparatorIfNeeded(JPopupMenu popupMenu) {
final int menuComponentCount = popupMenu.getComponentCount();
if (menuComponentCount == 0) {
return false;
}
final Component lastMenuComponent = popupMenu.getComponent(menuComponentCount - 1);
if (isPo... | [
"public",
"static",
"boolean",
"addSeparatorIfNeeded",
"(",
"JPopupMenu",
"popupMenu",
")",
"{",
"final",
"int",
"menuComponentCount",
"=",
"popupMenu",
".",
"getComponentCount",
"(",
")",
";",
"if",
"(",
"menuComponentCount",
"==",
"0",
")",
"{",
"return",
"fal... | Appends a separator to the end of the menu if it exists at least one non separator menu component immediately before and
if there isn't, already, a separator at the end of the menu.
@param popupMenu the pop up menu that will be processed
@return {@code true} if the separator was added, {@code false} otherwise.
@see ja... | [
"Appends",
"a",
"separator",
"to",
"the",
"end",
"of",
"the",
"menu",
"if",
"it",
"exists",
"at",
"least",
"one",
"non",
"separator",
"menu",
"component",
"immediately",
"before",
"and",
"if",
"there",
"isn",
"t",
"already",
"a",
"separator",
"at",
"the",
... | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/view/popup/PopupMenuUtils.java#L342-L353 |
129,201 | zaproxy/zaproxy | src/org/parosproxy/paros/db/paros/ParosTableHistory.java | ParosTableHistory.getHistoryIdsOfHistType | @Override
public List<Integer> getHistoryIdsOfHistType(long sessionId, int... histTypes) throws DatabaseException {
return getHistoryIdsByParams(sessionId, 0, true, histTypes);
} | java | @Override
public List<Integer> getHistoryIdsOfHistType(long sessionId, int... histTypes) throws DatabaseException {
return getHistoryIdsByParams(sessionId, 0, true, histTypes);
} | [
"@",
"Override",
"public",
"List",
"<",
"Integer",
">",
"getHistoryIdsOfHistType",
"(",
"long",
"sessionId",
",",
"int",
"...",
"histTypes",
")",
"throws",
"DatabaseException",
"{",
"return",
"getHistoryIdsByParams",
"(",
"sessionId",
",",
"0",
",",
"true",
",",... | Gets all the history record IDs of the given session and with the given history types.
@param sessionId the ID of session of the history records
@param histTypes the history types of the history records that should be returned
@return a {@code List} with all the history IDs of the given session and history types, neve... | [
"Gets",
"all",
"the",
"history",
"record",
"IDs",
"of",
"the",
"given",
"session",
"and",
"with",
"the",
"given",
"history",
"types",
"."
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/parosproxy/paros/db/paros/ParosTableHistory.java#L436-L439 |
129,202 | zaproxy/zaproxy | src/org/zaproxy/zap/users/User.java | User.getContext | public Context getContext() {
if (context == null) {
context = Model.getSingleton().getSession().getContext(this.contextId);
}
return context;
} | java | public Context getContext() {
if (context == null) {
context = Model.getSingleton().getSession().getContext(this.contextId);
}
return context;
} | [
"public",
"Context",
"getContext",
"(",
")",
"{",
"if",
"(",
"context",
"==",
"null",
")",
"{",
"context",
"=",
"Model",
".",
"getSingleton",
"(",
")",
".",
"getSession",
"(",
")",
".",
"getContext",
"(",
"this",
".",
"contextId",
")",
";",
"}",
"ret... | Lazy loader for getting the context to which this user corresponds.
@return the context | [
"Lazy",
"loader",
"for",
"getting",
"the",
"context",
"to",
"which",
"this",
"user",
"corresponds",
"."
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/users/User.java#L145-L150 |
129,203 | zaproxy/zaproxy | src/org/zaproxy/zap/users/User.java | User.authenticate | public void authenticate() {
log.info("Authenticating user: " + this.name);
WebSession result = null;
try {
result = getContext().getAuthenticationMethod().authenticate(
getContext().getSessionManagementMethod(), this.authenticationCredentials, this);
} catch (UnsupportedAuthenticationCredentialsExceptio... | java | public void authenticate() {
log.info("Authenticating user: " + this.name);
WebSession result = null;
try {
result = getContext().getAuthenticationMethod().authenticate(
getContext().getSessionManagementMethod(), this.authenticationCredentials, this);
} catch (UnsupportedAuthenticationCredentialsExceptio... | [
"public",
"void",
"authenticate",
"(",
")",
"{",
"log",
".",
"info",
"(",
"\"Authenticating user: \"",
"+",
"this",
".",
"name",
")",
";",
"WebSession",
"result",
"=",
"null",
";",
"try",
"{",
"result",
"=",
"getContext",
"(",
")",
".",
"getAuthenticationM... | Authenticates the user, using its authentication credentials and the authentication method
corresponding to its Context.
@see SessionManagementMethod
@see AuthenticationMethod
@see Context | [
"Authenticates",
"the",
"user",
"using",
"its",
"authentication",
"credentials",
"and",
"the",
"authentication",
"method",
"corresponding",
"to",
"its",
"Context",
"."
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/users/User.java#L254-L268 |
129,204 | zaproxy/zaproxy | src/org/zaproxy/zap/users/User.java | User.getAuthenticationExtension | private static ExtensionAuthentication getAuthenticationExtension() {
if (extensionAuth == null) {
extensionAuth = Control.getSingleton().getExtensionLoader().getExtension(ExtensionAuthentication.class);
}
return extensionAuth;
} | java | private static ExtensionAuthentication getAuthenticationExtension() {
if (extensionAuth == null) {
extensionAuth = Control.getSingleton().getExtensionLoader().getExtension(ExtensionAuthentication.class);
}
return extensionAuth;
} | [
"private",
"static",
"ExtensionAuthentication",
"getAuthenticationExtension",
"(",
")",
"{",
"if",
"(",
"extensionAuth",
"==",
"null",
")",
"{",
"extensionAuth",
"=",
"Control",
".",
"getSingleton",
"(",
")",
".",
"getExtensionLoader",
"(",
")",
".",
"getExtension... | Gets a reference to the authentication extension.
@return the authentication extension | [
"Gets",
"a",
"reference",
"to",
"the",
"authentication",
"extension",
"."
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/users/User.java#L275-L280 |
129,205 | zaproxy/zaproxy | src/org/zaproxy/zap/users/User.java | User.encode | public static String encode(User user) {
StringBuilder out = new StringBuilder();
out.append(user.id).append(FIELD_SEPARATOR);
out.append(user.isEnabled()).append(FIELD_SEPARATOR);
out.append(Base64.encodeBase64String(user.name.getBytes())).append(FIELD_SEPARATOR);
out.append(user.getContext().getAuthenticati... | java | public static String encode(User user) {
StringBuilder out = new StringBuilder();
out.append(user.id).append(FIELD_SEPARATOR);
out.append(user.isEnabled()).append(FIELD_SEPARATOR);
out.append(Base64.encodeBase64String(user.name.getBytes())).append(FIELD_SEPARATOR);
out.append(user.getContext().getAuthenticati... | [
"public",
"static",
"String",
"encode",
"(",
"User",
"user",
")",
"{",
"StringBuilder",
"out",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"out",
".",
"append",
"(",
"user",
".",
"id",
")",
".",
"append",
"(",
"FIELD_SEPARATOR",
")",
";",
"out",
".",
... | Encodes the User in a String. Fields that contain strings are Base64 encoded.
@param user the user
@return the string | [
"Encodes",
"the",
"User",
"in",
"a",
"String",
".",
"Fields",
"that",
"contain",
"strings",
"are",
"Base64",
"encoded",
"."
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/users/User.java#L288-L299 |
129,206 | zaproxy/zaproxy | src/org/parosproxy/paros/view/SessionDialog.java | SessionDialog.initContextPanel | private void initContextPanel(AbstractContextPropertiesPanel contextPanel) {
Context ctx = uiContexts.get(contextPanel.getContextIndex());
if (ctx != null) {
contextPanel.initContextData(session, ctx);
}
} | java | private void initContextPanel(AbstractContextPropertiesPanel contextPanel) {
Context ctx = uiContexts.get(contextPanel.getContextIndex());
if (ctx != null) {
contextPanel.initContextData(session, ctx);
}
} | [
"private",
"void",
"initContextPanel",
"(",
"AbstractContextPropertiesPanel",
"contextPanel",
")",
"{",
"Context",
"ctx",
"=",
"uiContexts",
".",
"get",
"(",
"contextPanel",
".",
"getContextIndex",
"(",
")",
")",
";",
"if",
"(",
"ctx",
"!=",
"null",
")",
"{",
... | Initialises the given panel with the current session and the corresponding UI shared context.
@param contextPanel the context panel to initialise
@see AbstractContextPropertiesPanel#initContextData(Session, Context) | [
"Initialises",
"the",
"given",
"panel",
"with",
"the",
"current",
"session",
"and",
"the",
"corresponding",
"UI",
"shared",
"context",
"."
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/parosproxy/paros/view/SessionDialog.java#L122-L127 |
129,207 | zaproxy/zaproxy | src/org/parosproxy/paros/view/SessionDialog.java | SessionDialog.recreateUISharedContexts | public void recreateUISharedContexts(Session session) {
uiContexts.clear();
for (Context context : session.getContexts()) {
Context uiContext = context.duplicate();
uiContexts.put(context.getIndex(), uiContext);
}
} | java | public void recreateUISharedContexts(Session session) {
uiContexts.clear();
for (Context context : session.getContexts()) {
Context uiContext = context.duplicate();
uiContexts.put(context.getIndex(), uiContext);
}
} | [
"public",
"void",
"recreateUISharedContexts",
"(",
"Session",
"session",
")",
"{",
"uiContexts",
".",
"clear",
"(",
")",
";",
"for",
"(",
"Context",
"context",
":",
"session",
".",
"getContexts",
"(",
")",
")",
"{",
"Context",
"uiContext",
"=",
"context",
... | Reset the UI shared Context copies. The effect is that previous copies are discarded and new
copies are created.
@param session the session | [
"Reset",
"the",
"UI",
"shared",
"Context",
"copies",
".",
"The",
"effect",
"is",
"that",
"previous",
"copies",
"are",
"discarded",
"and",
"new",
"copies",
"are",
"created",
"."
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/parosproxy/paros/view/SessionDialog.java#L151-L157 |
129,208 | zaproxy/zaproxy | src/org/zaproxy/zap/extension/keyboard/ExtensionKeyboard.java | ExtensionKeyboard.hasSameDefaultAccelerator | private static boolean hasSameDefaultAccelerator(KeyboardMapping km, KeyStroke ks) {
KeyStroke kmKs = km.getDefaultKeyStroke();
if (kmKs == null) {
return false;
}
return kmKs.getKeyCode() == ks.getKeyCode() && kmKs.getModifiers() == ks.getModifiers();
} | java | private static boolean hasSameDefaultAccelerator(KeyboardMapping km, KeyStroke ks) {
KeyStroke kmKs = km.getDefaultKeyStroke();
if (kmKs == null) {
return false;
}
return kmKs.getKeyCode() == ks.getKeyCode() && kmKs.getModifiers() == ks.getModifiers();
} | [
"private",
"static",
"boolean",
"hasSameDefaultAccelerator",
"(",
"KeyboardMapping",
"km",
",",
"KeyStroke",
"ks",
")",
"{",
"KeyStroke",
"kmKs",
"=",
"km",
".",
"getDefaultKeyStroke",
"(",
")",
";",
"if",
"(",
"kmKs",
"==",
"null",
")",
"{",
"return",
"fals... | Tells whether or not the given keyboard mapping has the given default accelerator.
@param km the keyboard mapping to check.
@param ks the accelerator.
@return {@code true} if the keyboard mapping has the given default accelerator, {@code false} otherwise. | [
"Tells",
"whether",
"or",
"not",
"the",
"given",
"keyboard",
"mapping",
"has",
"the",
"given",
"default",
"accelerator",
"."
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/extension/keyboard/ExtensionKeyboard.java#L163-L169 |
129,209 | zaproxy/zaproxy | src/org/zaproxy/zap/extension/keyboard/ExtensionKeyboard.java | ExtensionKeyboard.getDefaultAccelerator | private KeyStroke getDefaultAccelerator(ZapMenuItem menuItem) {
if (isIdentifierWithDuplicatedAccelerator(menuItem.getIdentifier())) {
return null;
}
return menuItem.getDefaultAccelerator();
} | java | private KeyStroke getDefaultAccelerator(ZapMenuItem menuItem) {
if (isIdentifierWithDuplicatedAccelerator(menuItem.getIdentifier())) {
return null;
}
return menuItem.getDefaultAccelerator();
} | [
"private",
"KeyStroke",
"getDefaultAccelerator",
"(",
"ZapMenuItem",
"menuItem",
")",
"{",
"if",
"(",
"isIdentifierWithDuplicatedAccelerator",
"(",
"menuItem",
".",
"getIdentifier",
"(",
")",
")",
")",
"{",
"return",
"null",
";",
"}",
"return",
"menuItem",
".",
... | Gets the default accelerator of the given menu, taken into account duplicated default accelerators.
@param menuItem the menu item to return the default accelerator
@return the KeyStroke or {@code null} if duplicated or does not have a default. | [
"Gets",
"the",
"default",
"accelerator",
"of",
"the",
"given",
"menu",
"taken",
"into",
"account",
"duplicated",
"default",
"accelerators",
"."
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/extension/keyboard/ExtensionKeyboard.java#L266-L271 |
129,210 | zaproxy/zaproxy | src/org/zaproxy/zap/extension/httpsessions/HttpSession.java | HttpSession.setTokenValue | public void setTokenValue(String tokenName, Cookie value) {
if (value == null) {
tokenValues.remove(tokenName);
} else {
tokenValues.put(tokenName, value);
}
} | java | public void setTokenValue(String tokenName, Cookie value) {
if (value == null) {
tokenValues.remove(tokenName);
} else {
tokenValues.put(tokenName, value);
}
} | [
"public",
"void",
"setTokenValue",
"(",
"String",
"tokenName",
",",
"Cookie",
"value",
")",
"{",
"if",
"(",
"value",
"==",
"null",
")",
"{",
"tokenValues",
".",
"remove",
"(",
"tokenName",
")",
";",
"}",
"else",
"{",
"tokenValues",
".",
"put",
"(",
"to... | Sets a particular value for a session token. If the value is null, that token is deleted from
the session.
@param tokenName the token name
@param value the new value of the token, or null, if the token has to be deleted | [
"Sets",
"a",
"particular",
"value",
"for",
"a",
"session",
"token",
".",
"If",
"the",
"value",
"is",
"null",
"that",
"token",
"is",
"deleted",
"from",
"the",
"session",
"."
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/extension/httpsessions/HttpSession.java#L116-L122 |
129,211 | zaproxy/zaproxy | src/org/zaproxy/zap/extension/httpsessions/HttpSession.java | HttpSession.getTokenValue | public String getTokenValue(String tokenName) {
Cookie ck = tokenValues.get(tokenName);
if (ck != null) {
return ck.getValue();
}
return null;
} | java | public String getTokenValue(String tokenName) {
Cookie ck = tokenValues.get(tokenName);
if (ck != null) {
return ck.getValue();
}
return null;
} | [
"public",
"String",
"getTokenValue",
"(",
"String",
"tokenName",
")",
"{",
"Cookie",
"ck",
"=",
"tokenValues",
".",
"get",
"(",
"tokenName",
")",
";",
"if",
"(",
"ck",
"!=",
"null",
")",
"{",
"return",
"ck",
".",
"getValue",
"(",
")",
";",
"}",
"retu... | Gets the token value.
@param tokenName the token name
@return the token value | [
"Gets",
"the",
"token",
"value",
"."
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/extension/httpsessions/HttpSession.java#L130-L136 |
129,212 | zaproxy/zaproxy | src/org/zaproxy/zap/extension/httpsessions/HttpSession.java | HttpSession.getTokenValuesString | public String getTokenValuesString() {
if (tokenValues.isEmpty()) {
return "";
}
StringBuilder buf = new StringBuilder();
for (Map.Entry<String, Cookie> entry : tokenValues.entrySet()) {
buf.append(entry.getKey()).append('=').append(entry.getValue().getValue()).append(';');
}
buf.deleteCharAt(buf.len... | java | public String getTokenValuesString() {
if (tokenValues.isEmpty()) {
return "";
}
StringBuilder buf = new StringBuilder();
for (Map.Entry<String, Cookie> entry : tokenValues.entrySet()) {
buf.append(entry.getKey()).append('=').append(entry.getValue().getValue()).append(';');
}
buf.deleteCharAt(buf.len... | [
"public",
"String",
"getTokenValuesString",
"(",
")",
"{",
"if",
"(",
"tokenValues",
".",
"isEmpty",
"(",
")",
")",
"{",
"return",
"\"\"",
";",
"}",
"StringBuilder",
"buf",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"for",
"(",
"Map",
".",
"Entry",
"<... | Gets the token values string representation.
@return the token values string | [
"Gets",
"the",
"token",
"values",
"string",
"representation",
"."
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/extension/httpsessions/HttpSession.java#L180-L193 |
129,213 | zaproxy/zaproxy | src/org/zaproxy/zap/view/BackgroundImagePanel.java | BackgroundImagePanel.setBackgroundImage | public final void setBackgroundImage(URL imageUrl) {
if (imageUrl != null) {
try {
img = ImageIO.read(imageUrl);
} catch (IOException ioe) {
// do nothing
}
}
} | java | public final void setBackgroundImage(URL imageUrl) {
if (imageUrl != null) {
try {
img = ImageIO.read(imageUrl);
} catch (IOException ioe) {
// do nothing
}
}
} | [
"public",
"final",
"void",
"setBackgroundImage",
"(",
"URL",
"imageUrl",
")",
"{",
"if",
"(",
"imageUrl",
"!=",
"null",
")",
"{",
"try",
"{",
"img",
"=",
"ImageIO",
".",
"read",
"(",
"imageUrl",
")",
";",
"}",
"catch",
"(",
"IOException",
"ioe",
")",
... | set the current Background image
@param imageUrl the url of the image that need to be set | [
"set",
"the",
"current",
"Background",
"image"
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/view/BackgroundImagePanel.java#L65-L74 |
129,214 | zaproxy/zaproxy | src/org/zaproxy/zap/view/BackgroundImagePanel.java | BackgroundImagePanel.paintComponent | @Override
protected void paintComponent(Graphics g) {
if (img != null) {
setOpaque(false);
Map<RenderingHints.Key, Object> hints = new HashMap<RenderingHints.Key, Object>();
hints.put(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BICUBIC);
... | java | @Override
protected void paintComponent(Graphics g) {
if (img != null) {
setOpaque(false);
Map<RenderingHints.Key, Object> hints = new HashMap<RenderingHints.Key, Object>();
hints.put(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BICUBIC);
... | [
"@",
"Override",
"protected",
"void",
"paintComponent",
"(",
"Graphics",
"g",
")",
"{",
"if",
"(",
"img",
"!=",
"null",
")",
"{",
"setOpaque",
"(",
"false",
")",
";",
"Map",
"<",
"RenderingHints",
".",
"Key",
",",
"Object",
">",
"hints",
"=",
"new",
... | Overridden method to paint a background before the rest
@param g the Graphics context | [
"Overridden",
"method",
"to",
"paint",
"a",
"background",
"before",
"the",
"rest"
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/view/BackgroundImagePanel.java#L91-L106 |
129,215 | zaproxy/zaproxy | src/org/zaproxy/zap/HeadlessBootstrap.java | HeadlessBootstrap.handleCmdLineSessionArgsSynchronously | protected boolean handleCmdLineSessionArgsSynchronously(Control control) {
if (getArgs().isEnabled(CommandLine.SESSION) && getArgs().isEnabled(CommandLine.NEW_SESSION)) {
System.err.println(
"Error: Invalid command line options: option '" + CommandLine.SESSION + "' not allowed wi... | java | protected boolean handleCmdLineSessionArgsSynchronously(Control control) {
if (getArgs().isEnabled(CommandLine.SESSION) && getArgs().isEnabled(CommandLine.NEW_SESSION)) {
System.err.println(
"Error: Invalid command line options: option '" + CommandLine.SESSION + "' not allowed wi... | [
"protected",
"boolean",
"handleCmdLineSessionArgsSynchronously",
"(",
"Control",
"control",
")",
"{",
"if",
"(",
"getArgs",
"(",
")",
".",
"isEnabled",
"(",
"CommandLine",
".",
"SESSION",
")",
"&&",
"getArgs",
"(",
")",
".",
"isEnabled",
"(",
"CommandLine",
".... | Handles command line session related arguments, synchronously.
@param control the {@code Control} singleton
@return {@code true} if the arguments were handled successfully, {@code false} otherwise. | [
"Handles",
"command",
"line",
"session",
"related",
"arguments",
"synchronously",
"."
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/HeadlessBootstrap.java#L75-L119 |
129,216 | zaproxy/zaproxy | src/org/zaproxy/zap/HeadlessBootstrap.java | HeadlessBootstrap.warnAddOnsAndExtensionsNoLongerRunnable | protected void warnAddOnsAndExtensionsNoLongerRunnable() {
final AddOnLoader addOnLoader = ExtensionFactory.getAddOnLoader();
List<String> idsAddOnsNoLongerRunning = addOnLoader.getIdsAddOnsWithRunningIssuesSinceLastRun();
if (idsAddOnsNoLongerRunning.isEmpty()) {
return;
}
... | java | protected void warnAddOnsAndExtensionsNoLongerRunnable() {
final AddOnLoader addOnLoader = ExtensionFactory.getAddOnLoader();
List<String> idsAddOnsNoLongerRunning = addOnLoader.getIdsAddOnsWithRunningIssuesSinceLastRun();
if (idsAddOnsNoLongerRunning.isEmpty()) {
return;
}
... | [
"protected",
"void",
"warnAddOnsAndExtensionsNoLongerRunnable",
"(",
")",
"{",
"final",
"AddOnLoader",
"addOnLoader",
"=",
"ExtensionFactory",
".",
"getAddOnLoader",
"(",
")",
";",
"List",
"<",
"String",
">",
"idsAddOnsNoLongerRunning",
"=",
"addOnLoader",
".",
"getId... | Warns, through logging, about add-ons and extensions that are no longer runnable because of changes in its dependencies. | [
"Warns",
"through",
"logging",
"about",
"add",
"-",
"ons",
"and",
"extensions",
"that",
"are",
"no",
"longer",
"runnable",
"because",
"of",
"changes",
"in",
"its",
"dependencies",
"."
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/HeadlessBootstrap.java#L124-L148 |
129,217 | zaproxy/zaproxy | src/org/zaproxy/zap/extension/dynssl/ExtensionDynSSL.java | ExtensionDynSSL.isCertExpired | private boolean isCertExpired(X509Certificate cert) {
if (cert != null && cert.getNotAfter().before(new Date())) {
return true;
}
return false;
} | java | private boolean isCertExpired(X509Certificate cert) {
if (cert != null && cert.getNotAfter().before(new Date())) {
return true;
}
return false;
} | [
"private",
"boolean",
"isCertExpired",
"(",
"X509Certificate",
"cert",
")",
"{",
"if",
"(",
"cert",
"!=",
"null",
"&&",
"cert",
".",
"getNotAfter",
"(",
")",
".",
"before",
"(",
"new",
"Date",
"(",
")",
")",
")",
"{",
"return",
"true",
";",
"}",
"ret... | Returns true if the certificate expired before the current date, otherwise false.
@param cert the X.509 certificate for which expiration should be checked.
@return true if the certificate has expired, otherwise false. | [
"Returns",
"true",
"if",
"the",
"certificate",
"expired",
"before",
"the",
"current",
"date",
"otherwise",
"false",
"."
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/extension/dynssl/ExtensionDynSSL.java#L183-L188 |
129,218 | zaproxy/zaproxy | src/org/zaproxy/zap/extension/dynssl/ExtensionDynSSL.java | ExtensionDynSSL.warnRooCaCertExpired | private void warnRooCaCertExpired() {
X509Certificate cert = getRootCaCertificate();
if (cert == null) {
return;
}
String warnMsg = Constant.messages.getString("dynssl.warn.cert.expired", cert.getNotAfter().toString(),
new Date().toString());
if (View.isInitialised()) {
getView().showWarning... | java | private void warnRooCaCertExpired() {
X509Certificate cert = getRootCaCertificate();
if (cert == null) {
return;
}
String warnMsg = Constant.messages.getString("dynssl.warn.cert.expired", cert.getNotAfter().toString(),
new Date().toString());
if (View.isInitialised()) {
getView().showWarning... | [
"private",
"void",
"warnRooCaCertExpired",
"(",
")",
"{",
"X509Certificate",
"cert",
"=",
"getRootCaCertificate",
"(",
")",
";",
"if",
"(",
"cert",
"==",
"null",
")",
"{",
"return",
";",
"}",
"String",
"warnMsg",
"=",
"Constant",
".",
"messages",
".",
"get... | Displays a warning dialog, and logs a warning message if ZAPs Root CA certificate has expired.
@see #isCertExpired(X509Certificate) | [
"Displays",
"a",
"warning",
"dialog",
"and",
"logs",
"a",
"warning",
"message",
"if",
"ZAPs",
"Root",
"CA",
"certificate",
"has",
"expired",
"."
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/extension/dynssl/ExtensionDynSSL.java#L195-L206 |
129,219 | zaproxy/zaproxy | src/org/zaproxy/zap/extension/authentication/ContextAuthenticationPanel.java | ContextAuthenticationPanel.getAuthenticationMethodsComboBox | protected JComboBox<AuthenticationMethodType> getAuthenticationMethodsComboBox() {
if (authenticationMethodsComboBox == null) {
Vector<AuthenticationMethodType> methods = new Vector<>(extension.getAuthenticationMethodTypes());
authenticationMethodsComboBox = new JComboBox<>(methods);
authenticationMethodsCom... | java | protected JComboBox<AuthenticationMethodType> getAuthenticationMethodsComboBox() {
if (authenticationMethodsComboBox == null) {
Vector<AuthenticationMethodType> methods = new Vector<>(extension.getAuthenticationMethodTypes());
authenticationMethodsComboBox = new JComboBox<>(methods);
authenticationMethodsCom... | [
"protected",
"JComboBox",
"<",
"AuthenticationMethodType",
">",
"getAuthenticationMethodsComboBox",
"(",
")",
"{",
"if",
"(",
"authenticationMethodsComboBox",
"==",
"null",
")",
"{",
"Vector",
"<",
"AuthenticationMethodType",
">",
"methods",
"=",
"new",
"Vector",
"<>"... | Gets the authentication method types combo box.
@return the authentication methods combo box | [
"Gets",
"the",
"authentication",
"method",
"types",
"combo",
"box",
"."
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/extension/authentication/ContextAuthenticationPanel.java#L196-L240 |
129,220 | zaproxy/zaproxy | src/org/zaproxy/zap/extension/authentication/ContextAuthenticationPanel.java | ContextAuthenticationPanel.confirmAndResetUsersCredentials | private boolean confirmAndResetUsersCredentials(AuthenticationMethodType type) {
ExtensionUserManagement usersExtension = Control.getSingleton().getExtensionLoader().getExtension(ExtensionUserManagement.class);
if (usersExtension == null) {
return true;
}
List<User> users = usersExtension.getSharedContextUse... | java | private boolean confirmAndResetUsersCredentials(AuthenticationMethodType type) {
ExtensionUserManagement usersExtension = Control.getSingleton().getExtensionLoader().getExtension(ExtensionUserManagement.class);
if (usersExtension == null) {
return true;
}
List<User> users = usersExtension.getSharedContextUse... | [
"private",
"boolean",
"confirmAndResetUsersCredentials",
"(",
"AuthenticationMethodType",
"type",
")",
"{",
"ExtensionUserManagement",
"usersExtension",
"=",
"Control",
".",
"getSingleton",
"(",
")",
".",
"getExtensionLoader",
"(",
")",
".",
"getExtension",
"(",
"Extens... | Make sure the user acknowledges the Users corresponding to this context will have the credentials changed with the new
type of authentication method.
@param type the type of authentication method being set.
@return true, if successful | [
"Make",
"sure",
"the",
"user",
"acknowledges",
"the",
"Users",
"corresponding",
"to",
"this",
"context",
"will",
"have",
"the",
"credentials",
"changed",
"with",
"the",
"new",
"type",
"of",
"authentication",
"method",
"."
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/extension/authentication/ContextAuthenticationPanel.java#L256-L282 |
129,221 | zaproxy/zaproxy | src/org/parosproxy/paros/core/scanner/Kb.java | Kb.getString | public String getString(String key) {
Object obj = get(key);
if (obj != null && obj instanceof String) {
return (String) obj;
}
return null;
} | java | public String getString(String key) {
Object obj = get(key);
if (obj != null && obj instanceof String) {
return (String) obj;
}
return null;
} | [
"public",
"String",
"getString",
"(",
"String",
"key",
")",
"{",
"Object",
"obj",
"=",
"get",
"(",
"key",
")",
";",
"if",
"(",
"obj",
"!=",
"null",
"&&",
"obj",
"instanceof",
"String",
")",
"{",
"return",
"(",
"String",
")",
"obj",
";",
"}",
"retur... | Get the first item in KB matching the key as a String.
@param key the key for the knowledge base entry
@return the entry, or {@code null} if not a {@code String} or does not exist | [
"Get",
"the",
"first",
"item",
"in",
"KB",
"matching",
"the",
"key",
"as",
"a",
"String",
"."
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/parosproxy/paros/core/scanner/Kb.java#L95-L103 |
129,222 | zaproxy/zaproxy | src/org/parosproxy/paros/core/proxy/ProxyServer.java | ProxyServer.stopServer | public synchronized boolean stopServer() {
if (!isProxyRunning) {
return false;
}
isProxyRunning = false;
HttpUtil.closeServerSocket(proxySocket);
try {
thread.join(); //(PORT_TIME_OUT);
} catch (Exception e) {
... | java | public synchronized boolean stopServer() {
if (!isProxyRunning) {
return false;
}
isProxyRunning = false;
HttpUtil.closeServerSocket(proxySocket);
try {
thread.join(); //(PORT_TIME_OUT);
} catch (Exception e) {
... | [
"public",
"synchronized",
"boolean",
"stopServer",
"(",
")",
"{",
"if",
"(",
"!",
"isProxyRunning",
")",
"{",
"return",
"false",
";",
"}",
"isProxyRunning",
"=",
"false",
";",
"HttpUtil",
".",
"closeServerSocket",
"(",
"proxySocket",
")",
";",
"try",
"{",
... | Stops the proxy server.
@return {@code true} if the proxy server was stopped, {@code false} if it was not running. | [
"Stops",
"the",
"proxy",
"server",
"."
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/parosproxy/paros/core/proxy/ProxyServer.java#L235-L253 |
129,223 | zaproxy/zaproxy | src/org/zaproxy/zap/extension/ascan/ExtensionActiveScan.java | ExtensionActiveScan.getMenuItemPolicy | private ZapMenuItem getMenuItemPolicy() {
if (menuItemPolicy == null) {
menuItemPolicy = new ZapMenuItem("menu.analyse.scanPolicy",
getView().getMenuShortcutKeyStroke(KeyEvent.VK_P, 0, false));
menuItemPolicy.addActionListener(new java.awt.event.ActionListener()... | java | private ZapMenuItem getMenuItemPolicy() {
if (menuItemPolicy == null) {
menuItemPolicy = new ZapMenuItem("menu.analyse.scanPolicy",
getView().getMenuShortcutKeyStroke(KeyEvent.VK_P, 0, false));
menuItemPolicy.addActionListener(new java.awt.event.ActionListener()... | [
"private",
"ZapMenuItem",
"getMenuItemPolicy",
"(",
")",
"{",
"if",
"(",
"menuItemPolicy",
"==",
"null",
")",
"{",
"menuItemPolicy",
"=",
"new",
"ZapMenuItem",
"(",
"\"menu.analyse.scanPolicy\"",
",",
"getView",
"(",
")",
".",
"getMenuShortcutKeyStroke",
"(",
"Key... | This method initializes menuItemPolicy
@return javax.swing.JMenuItem | [
"This",
"method",
"initializes",
"menuItemPolicy"
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/extension/ascan/ExtensionActiveScan.java#L306-L321 |
129,224 | zaproxy/zaproxy | src/org/zaproxy/zap/extension/ascan/ExtensionActiveScan.java | ExtensionActiveScan.showCustomScanDialog | public void showCustomScanDialog(Target target) {
if (customScanDialog == null) {
// Work out the tabs
String[] tabs = CustomScanDialog.STD_TAB_LABELS;
if (this.customScanPanels.size() > 0) {
List<String> tabList = new ArrayList<String>();
for (String str : CustomScanDialog.STD_TAB_LABELS) {
... | java | public void showCustomScanDialog(Target target) {
if (customScanDialog == null) {
// Work out the tabs
String[] tabs = CustomScanDialog.STD_TAB_LABELS;
if (this.customScanPanels.size() > 0) {
List<String> tabList = new ArrayList<String>();
for (String str : CustomScanDialog.STD_TAB_LABELS) {
... | [
"public",
"void",
"showCustomScanDialog",
"(",
"Target",
"target",
")",
"{",
"if",
"(",
"customScanDialog",
"==",
"null",
")",
"{",
"// Work out the tabs \r",
"String",
"[",
"]",
"tabs",
"=",
"CustomScanDialog",
".",
"STD_TAB_LABELS",
";",
"if",
"(",
"this",
"... | Shows the active scan dialogue with the given target, if not already visible.
@param target the target, might be {@code null}.
@since TODO add version. | [
"Shows",
"the",
"active",
"scan",
"dialogue",
"with",
"the",
"given",
"target",
"if",
"not",
"already",
"visible",
"."
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/extension/ascan/ExtensionActiveScan.java#L580-L611 |
129,225 | zaproxy/zaproxy | src/org/zaproxy/zap/network/ZapHeadMethod.java | ZapHeadMethod.readResponseBody | @Override
protected void readResponseBody(HttpState state, HttpConnection conn)
throws HttpException, IOException {
LOG.trace(
"enter HeadMethod.readResponseBody(HttpState, HttpConnection)");
int bodyCheckTimeout =
getParams().getIntParameter(HttpMethodParams.HE... | java | @Override
protected void readResponseBody(HttpState state, HttpConnection conn)
throws HttpException, IOException {
LOG.trace(
"enter HeadMethod.readResponseBody(HttpState, HttpConnection)");
int bodyCheckTimeout =
getParams().getIntParameter(HttpMethodParams.HE... | [
"@",
"Override",
"protected",
"void",
"readResponseBody",
"(",
"HttpState",
"state",
",",
"HttpConnection",
"conn",
")",
"throws",
"HttpException",
",",
"IOException",
"{",
"LOG",
".",
"trace",
"(",
"\"enter HeadMethod.readResponseBody(HttpState, HttpConnection)\"",
")",
... | Implementation copied from HeadMethod. | [
"Implementation",
"copied",
"from",
"HeadMethod",
"."
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/network/ZapHeadMethod.java#L79-L115 |
129,226 | zaproxy/zaproxy | src/org/zaproxy/zap/view/DynamicFieldsPanel.java | DynamicFieldsPanel.clearFields | public void clearFields() {
this.requiredFields = NO_FIELDS;
this.optionalFields = NO_FIELDS;
this.textFields = Collections.emptyMap();
removeAll();
validate();
} | java | public void clearFields() {
this.requiredFields = NO_FIELDS;
this.optionalFields = NO_FIELDS;
this.textFields = Collections.emptyMap();
removeAll();
validate();
} | [
"public",
"void",
"clearFields",
"(",
")",
"{",
"this",
".",
"requiredFields",
"=",
"NO_FIELDS",
";",
"this",
".",
"optionalFields",
"=",
"NO_FIELDS",
";",
"this",
".",
"textFields",
"=",
"Collections",
".",
"emptyMap",
"(",
")",
";",
"removeAll",
"(",
")"... | Clears all the fields, leaving an empty panel.
@since 2.7.0
@see #setFields(String[]) | [
"Clears",
"all",
"the",
"fields",
"leaving",
"an",
"empty",
"panel",
"."
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/view/DynamicFieldsPanel.java#L131-L139 |
129,227 | zaproxy/zaproxy | src/org/zaproxy/zap/view/DynamicFieldsPanel.java | DynamicFieldsPanel.getFieldValues | public Map<String, String> getFieldValues() {
Map<String, String> values = new HashMap<>(requiredFields.length + optionalFields.length);
for (Entry<String, ZapTextField> f : textFields.entrySet())
values.put(f.getKey(), f.getValue().getText());
return values;
}
/**
* Bind a mapping of field names/values t... | java | public Map<String, String> getFieldValues() {
Map<String, String> values = new HashMap<>(requiredFields.length + optionalFields.length);
for (Entry<String, ZapTextField> f : textFields.entrySet())
values.put(f.getKey(), f.getValue().getText());
return values;
}
/**
* Bind a mapping of field names/values t... | [
"public",
"Map",
"<",
"String",
",",
"String",
">",
"getFieldValues",
"(",
")",
"{",
"Map",
"<",
"String",
",",
"String",
">",
"values",
"=",
"new",
"HashMap",
"<>",
"(",
"requiredFields",
".",
"length",
"+",
"optionalFields",
".",
"length",
")",
";",
... | Gets a mapping of the field names to the configured field values.
@return the field values | [
"Gets",
"a",
"mapping",
"of",
"the",
"field",
"names",
"to",
"the",
"configured",
"field",
"values",
"."
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/view/DynamicFieldsPanel.java#L146-L165 |
129,228 | zaproxy/zaproxy | src/org/zaproxy/zap/view/DynamicFieldsPanel.java | DynamicFieldsPanel.validateFields | public void validateFields() throws IllegalStateException {
for (String rf : requiredFields)
if (textFields.get(rf).getText().trim().isEmpty()) {
textFields.get(rf).requestFocusInWindow();
throw new IllegalStateException(Constant.messages.getString(
"authentication.method.script.dialog.error.text.req... | java | public void validateFields() throws IllegalStateException {
for (String rf : requiredFields)
if (textFields.get(rf).getText().trim().isEmpty()) {
textFields.get(rf).requestFocusInWindow();
throw new IllegalStateException(Constant.messages.getString(
"authentication.method.script.dialog.error.text.req... | [
"public",
"void",
"validateFields",
"(",
")",
"throws",
"IllegalStateException",
"{",
"for",
"(",
"String",
"rf",
":",
"requiredFields",
")",
"if",
"(",
"textFields",
".",
"get",
"(",
"rf",
")",
".",
"getText",
"(",
")",
".",
"trim",
"(",
")",
".",
"is... | Validate the fields of the panel, checking that all the required fields has been filled. If
any of the fields are not in the proper state, an IllegalStateException is thrown, containing
a message describing the problem.
@throws IllegalStateException the illegal state exception | [
"Validate",
"the",
"fields",
"of",
"the",
"panel",
"checking",
"that",
"all",
"the",
"required",
"fields",
"has",
"been",
"filled",
".",
"If",
"any",
"of",
"the",
"fields",
"are",
"not",
"in",
"the",
"proper",
"state",
"an",
"IllegalStateException",
"is",
... | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/view/DynamicFieldsPanel.java#L174-L181 |
129,229 | zaproxy/zaproxy | src/org/parosproxy/paros/view/OutputPanel.java | OutputPanel.getTxtOutput | private ZapTextArea getTxtOutput() {
if (txtOutput == null) {
txtOutput = new ZapTextArea();
txtOutput.setEditable(false);
txtOutput.setLineWrap(true);
txtOutput.setName("");
txtOutput.addMouseListener(new java.awt.event.MouseAdapter() {
@Override
public void mousePressed(java.awt.ev... | java | private ZapTextArea getTxtOutput() {
if (txtOutput == null) {
txtOutput = new ZapTextArea();
txtOutput.setEditable(false);
txtOutput.setLineWrap(true);
txtOutput.setName("");
txtOutput.addMouseListener(new java.awt.event.MouseAdapter() {
@Override
public void mousePressed(java.awt.ev... | [
"private",
"ZapTextArea",
"getTxtOutput",
"(",
")",
"{",
"if",
"(",
"txtOutput",
"==",
"null",
")",
"{",
"txtOutput",
"=",
"new",
"ZapTextArea",
"(",
")",
";",
"txtOutput",
".",
"setEditable",
"(",
"false",
")",
";",
"txtOutput",
".",
"setLineWrap",
"(",
... | This method initializes txtOutput
@return org.zaproxy.zap.utils.ZapTextArea | [
"This",
"method",
"initializes",
"txtOutput"
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/parosproxy/paros/view/OutputPanel.java#L144-L171 |
129,230 | zaproxy/zaproxy | src/org/parosproxy/paros/extension/history/BrowserDialog.java | BrowserDialog.getJPanelBottom | private JPanel getJPanelBottom() {
if (jPanelBottom == null) {
GridBagConstraints gridBagConstraints2 = new GridBagConstraints();
gridBagConstraints2.insets = new java.awt.Insets(5,3,5,5);
gridBagConstraints2.gridy = 0;
gridBagConstraints2.anchor = java.awt.GridBagConstraints.EAST;
gridBagConstra... | java | private JPanel getJPanelBottom() {
if (jPanelBottom == null) {
GridBagConstraints gridBagConstraints2 = new GridBagConstraints();
gridBagConstraints2.insets = new java.awt.Insets(5,3,5,5);
gridBagConstraints2.gridy = 0;
gridBagConstraints2.anchor = java.awt.GridBagConstraints.EAST;
gridBagConstra... | [
"private",
"JPanel",
"getJPanelBottom",
"(",
")",
"{",
"if",
"(",
"jPanelBottom",
"==",
"null",
")",
"{",
"GridBagConstraints",
"gridBagConstraints2",
"=",
"new",
"GridBagConstraints",
"(",
")",
";",
"gridBagConstraints2",
".",
"insets",
"=",
"new",
"java",
".",... | This method initializes jPanelBottom
@return javax.swing.JPanel | [
"This",
"method",
"initializes",
"jPanelBottom"
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/parosproxy/paros/extension/history/BrowserDialog.java#L133-L169 |
129,231 | zaproxy/zaproxy | src/org/parosproxy/paros/extension/history/BrowserDialog.java | BrowserDialog.getBtnClose | private JButton getBtnClose() {
if (btnClose == null) {
btnClose = new JButton();
btnClose.setText("Close");
btnClose.setVisible(false);
btnClose.addActionListener(new ActionListener() { // Close this window
@Override
public void actionPerformed(ActionEvent arg0) {
... | java | private JButton getBtnClose() {
if (btnClose == null) {
btnClose = new JButton();
btnClose.setText("Close");
btnClose.setVisible(false);
btnClose.addActionListener(new ActionListener() { // Close this window
@Override
public void actionPerformed(ActionEvent arg0) {
... | [
"private",
"JButton",
"getBtnClose",
"(",
")",
"{",
"if",
"(",
"btnClose",
"==",
"null",
")",
"{",
"btnClose",
"=",
"new",
"JButton",
"(",
")",
";",
"btnClose",
".",
"setText",
"(",
"\"Close\"",
")",
";",
"btnClose",
".",
"setVisible",
"(",
"false",
")... | This method initializes jButton1
@return javax.swing.JButton | [
"This",
"method",
"initializes",
"jButton1"
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/parosproxy/paros/extension/history/BrowserDialog.java#L263-L278 |
129,232 | zaproxy/zaproxy | src/org/zaproxy/zap/view/LicenseFrame.java | LicenseFrame.getTxtLicense | private JTextPane getTxtLicense() {
if (txtLicense == null) {
txtLicense = new JTextPane();
txtLicense.setName("txtLicense");
txtLicense.setEditable(false);
}
return txtLicense;
} | java | private JTextPane getTxtLicense() {
if (txtLicense == null) {
txtLicense = new JTextPane();
txtLicense.setName("txtLicense");
txtLicense.setEditable(false);
}
return txtLicense;
} | [
"private",
"JTextPane",
"getTxtLicense",
"(",
")",
"{",
"if",
"(",
"txtLicense",
"==",
"null",
")",
"{",
"txtLicense",
"=",
"new",
"JTextPane",
"(",
")",
";",
"txtLicense",
".",
"setName",
"(",
"\"txtLicense\"",
")",
";",
"txtLicense",
".",
"setEditable",
... | This method initializes txtLicense
@return javax.swing.JTextPane | [
"This",
"method",
"initializes",
"txtLicense"
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/view/LicenseFrame.java#L142-L149 |
129,233 | zaproxy/zaproxy | src/org/parosproxy/paros/core/scanner/ScannerParamFilter.java | ScannerParamFilter.isToExclude | public boolean isToExclude(HttpMessage msg, NameValuePair param) {
return ((paramType == NameValuePair.TYPE_UNDEFINED) || (param.getType() == paramType)) &&
((urlPattern == null) || urlPattern.matcher(msg.getRequestHeader().getURI().toString().toUpperCase(Locale.ROOT)).matches()) &&
... | java | public boolean isToExclude(HttpMessage msg, NameValuePair param) {
return ((paramType == NameValuePair.TYPE_UNDEFINED) || (param.getType() == paramType)) &&
((urlPattern == null) || urlPattern.matcher(msg.getRequestHeader().getURI().toString().toUpperCase(Locale.ROOT)).matches()) &&
... | [
"public",
"boolean",
"isToExclude",
"(",
"HttpMessage",
"msg",
",",
"NameValuePair",
"param",
")",
"{",
"return",
"(",
"(",
"paramType",
"==",
"NameValuePair",
".",
"TYPE_UNDEFINED",
")",
"||",
"(",
"param",
".",
"getType",
"(",
")",
"==",
"paramType",
")",
... | Check if the parameter should be excluded by the scanner
@param msg the message that is currently under scanning
@param param the Value/Name param object that is currently under scanning
@return true if the parameter should be excluded | [
"Check",
"if",
"the",
"parameter",
"should",
"be",
"excluded",
"by",
"the",
"scanner"
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/parosproxy/paros/core/scanner/ScannerParamFilter.java#L131-L135 |
129,234 | zaproxy/zaproxy | src/org/parosproxy/paros/view/SiteMapPanel.java | SiteMapPanel.getTreeSite | public JTree getTreeSite() {
if (treeSite == null) {
treeSite = new JTree(new DefaultTreeModel(new DefaultMutableTreeNode()));
treeSite.setShowsRootHandles(true);
treeSite.setName("treeSite");
treeSite.setToggleClickCount(1);
// Force macOS L&F to query the row height from SiteMapTreeCellRender... | java | public JTree getTreeSite() {
if (treeSite == null) {
treeSite = new JTree(new DefaultTreeModel(new DefaultMutableTreeNode()));
treeSite.setShowsRootHandles(true);
treeSite.setName("treeSite");
treeSite.setToggleClickCount(1);
// Force macOS L&F to query the row height from SiteMapTreeCellRender... | [
"public",
"JTree",
"getTreeSite",
"(",
")",
"{",
"if",
"(",
"treeSite",
"==",
"null",
")",
"{",
"treeSite",
"=",
"new",
"JTree",
"(",
"new",
"DefaultTreeModel",
"(",
"new",
"DefaultMutableTreeNode",
"(",
")",
")",
")",
";",
"treeSite",
".",
"setShowsRootHa... | This method initializes treeSite
@return javax.swing.JTree | [
"This",
"method",
"initializes",
"treeSite"
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/parosproxy/paros/view/SiteMapPanel.java#L336-L417 |
129,235 | zaproxy/zaproxy | src/org/zaproxy/zap/extension/ascan/ScanProgressItem.java | ScanProgressItem.getProgressPercentage | public int getProgressPercentage() {
// Implemented using node counts...
if (isRunning()) {
int progress = (hProcess.getTestCurrentCount(plugin) * 100) / hProcess.getTestTotalCount();
// Make sure not return 100 (or more) if still running...
// That might happen... | java | public int getProgressPercentage() {
// Implemented using node counts...
if (isRunning()) {
int progress = (hProcess.getTestCurrentCount(plugin) * 100) / hProcess.getTestTotalCount();
// Make sure not return 100 (or more) if still running...
// That might happen... | [
"public",
"int",
"getProgressPercentage",
"(",
")",
"{",
"// Implemented using node counts...\r",
"if",
"(",
"isRunning",
"(",
")",
")",
"{",
"int",
"progress",
"=",
"(",
"hProcess",
".",
"getTestCurrentCount",
"(",
"plugin",
")",
"*",
"100",
")",
"/",
"hProce... | Get back the percentage of completion.
@return the percentage value from 0 to 100 | [
"Get",
"back",
"the",
"percentage",
"of",
"completion",
"."
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/extension/ascan/ScanProgressItem.java#L108-L121 |
129,236 | zaproxy/zaproxy | src/org/zaproxy/zap/extension/ascan/ScanProgressItem.java | ScanProgressItem.refresh | void refresh() {
if (isCompleted()) {
return;
}
if (hProcess.getCompleted().contains(plugin)) {
status = STATUS_COMPLETED;
} else if (hProcess.getRunning().contains(plugin)) {
status = STATUS_RUNNING;
}
} | java | void refresh() {
if (isCompleted()) {
return;
}
if (hProcess.getCompleted().contains(plugin)) {
status = STATUS_COMPLETED;
} else if (hProcess.getRunning().contains(plugin)) {
status = STATUS_RUNNING;
}
} | [
"void",
"refresh",
"(",
")",
"{",
"if",
"(",
"isCompleted",
"(",
")",
")",
"{",
"return",
";",
"}",
"if",
"(",
"hProcess",
".",
"getCompleted",
"(",
")",
".",
"contains",
"(",
"plugin",
")",
")",
"{",
"status",
"=",
"STATUS_COMPLETED",
";",
"}",
"e... | Refresh the state of this scan progress item. | [
"Refresh",
"the",
"state",
"of",
"this",
"scan",
"progress",
"item",
"."
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/extension/ascan/ScanProgressItem.java#L214-L224 |
129,237 | zaproxy/zaproxy | src/org/zaproxy/zap/extension/alert/AlertParam.java | AlertParam.parse | @Override
protected void parse() {
maximumInstances = getInt(PARAM_MAXIMUM_INSTANCES, DEFAULT_MAXIMUM_INSTANCES);
mergeRelatedIssues = getBoolean(PARAM_MERGE_RELATED_ISSUES, true);
overridesFilename = getString(PARAM_OVERRIDES_FILENAME, "");
} | java | @Override
protected void parse() {
maximumInstances = getInt(PARAM_MAXIMUM_INSTANCES, DEFAULT_MAXIMUM_INSTANCES);
mergeRelatedIssues = getBoolean(PARAM_MERGE_RELATED_ISSUES, true);
overridesFilename = getString(PARAM_OVERRIDES_FILENAME, "");
} | [
"@",
"Override",
"protected",
"void",
"parse",
"(",
")",
"{",
"maximumInstances",
"=",
"getInt",
"(",
"PARAM_MAXIMUM_INSTANCES",
",",
"DEFAULT_MAXIMUM_INSTANCES",
")",
";",
"mergeRelatedIssues",
"=",
"getBoolean",
"(",
"PARAM_MERGE_RELATED_ISSUES",
",",
"true",
")",
... | Parses the alert options.
@see #getMaximumInstances() | [
"Parses",
"the",
"alert",
"options",
"."
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/extension/alert/AlertParam.java#L61-L66 |
129,238 | zaproxy/zaproxy | src/org/zaproxy/zap/extension/alert/AlertParam.java | AlertParam.setMaximumInstances | public void setMaximumInstances(int maximumInstances) {
int newValue = maximumInstances < 0 ? 0 : maximumInstances;
if (this.maximumInstances != newValue) {
this.maximumInstances = newValue;
getConfig().setProperty(PARAM_MAXIMUM_INSTANCES, this.maximumInstances);
}
... | java | public void setMaximumInstances(int maximumInstances) {
int newValue = maximumInstances < 0 ? 0 : maximumInstances;
if (this.maximumInstances != newValue) {
this.maximumInstances = newValue;
getConfig().setProperty(PARAM_MAXIMUM_INSTANCES, this.maximumInstances);
}
... | [
"public",
"void",
"setMaximumInstances",
"(",
"int",
"maximumInstances",
")",
"{",
"int",
"newValue",
"=",
"maximumInstances",
"<",
"0",
"?",
"0",
":",
"maximumInstances",
";",
"if",
"(",
"this",
".",
"maximumInstances",
"!=",
"newValue",
")",
"{",
"this",
"... | Sets the maximum instances of an alert to include in a report.
@param maximumInstances the maximum number of instances for each alert | [
"Sets",
"the",
"maximum",
"instances",
"of",
"an",
"alert",
"to",
"include",
"in",
"a",
"report",
"."
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/extension/alert/AlertParam.java#L72-L80 |
129,239 | zaproxy/zaproxy | src/org/zaproxy/zap/extension/alert/ExtensionAlert.java | ExtensionAlert.getAlertPanel | AlertPanel getAlertPanel() {
if (alertPanel == null) {
alertPanel = new AlertPanel(this);
alertPanel.setSize(345, 122);
setMainTreeModel();
}
return alertPanel;
} | java | AlertPanel getAlertPanel() {
if (alertPanel == null) {
alertPanel = new AlertPanel(this);
alertPanel.setSize(345, 122);
setMainTreeModel();
}
return alertPanel;
} | [
"AlertPanel",
"getAlertPanel",
"(",
")",
"{",
"if",
"(",
"alertPanel",
"==",
"null",
")",
"{",
"alertPanel",
"=",
"new",
"AlertPanel",
"(",
"this",
")",
";",
"alertPanel",
".",
"setSize",
"(",
"345",
",",
"122",
")",
";",
"setMainTreeModel",
"(",
")",
... | This method initializes alertPanel
@return org.parosproxy.paros.extension.scanner.AlertPanel | [
"This",
"method",
"initializes",
"alertPanel"
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/extension/alert/ExtensionAlert.java#L368-L376 |
129,240 | zaproxy/zaproxy | src/org/zaproxy/zap/extension/alert/ExtensionAlert.java | ExtensionAlert.showAlertEditDialog | public void showAlertEditDialog(Alert alert) {
if (dialogAlertAdd == null || !dialogAlertAdd.isVisible()) {
dialogAlertAdd = new AlertAddDialog(getView().getMainFrame(), false);
dialogAlertAdd.setVisible(true);
dialogAlertAdd.setAlert(alert);
}
} | java | public void showAlertEditDialog(Alert alert) {
if (dialogAlertAdd == null || !dialogAlertAdd.isVisible()) {
dialogAlertAdd = new AlertAddDialog(getView().getMainFrame(), false);
dialogAlertAdd.setVisible(true);
dialogAlertAdd.setAlert(alert);
}
} | [
"public",
"void",
"showAlertEditDialog",
"(",
"Alert",
"alert",
")",
"{",
"if",
"(",
"dialogAlertAdd",
"==",
"null",
"||",
"!",
"dialogAlertAdd",
".",
"isVisible",
"(",
")",
")",
"{",
"dialogAlertAdd",
"=",
"new",
"AlertAddDialog",
"(",
"getView",
"(",
")",
... | Shows the "Edit Alert" dialogue, with the given alert.
@param alert the alert to be edited.
@since 2.7.0 | [
"Shows",
"the",
"Edit",
"Alert",
"dialogue",
"with",
"the",
"given",
"alert",
"."
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/extension/alert/ExtensionAlert.java#L995-L1001 |
129,241 | zaproxy/zaproxy | src/ch/csnc/extension/util/Encoding.java | Encoding.toHexString | public static String toHexString( byte[] b ) {
if ( null == b )
return null;
int len = b.length;
byte[] hex = new byte[ len << 1 ];
for ( int i = 0, j = 0; i < len; i++, j+=2 ) {
hex[ j ] = (byte) ((b[ i ] & 0xF0) >> 4);
hex[ j ] += 10 > hex[ j ] ? 48 ... | java | public static String toHexString( byte[] b ) {
if ( null == b )
return null;
int len = b.length;
byte[] hex = new byte[ len << 1 ];
for ( int i = 0, j = 0; i < len; i++, j+=2 ) {
hex[ j ] = (byte) ((b[ i ] & 0xF0) >> 4);
hex[ j ] += 10 > hex[ j ] ? 48 ... | [
"public",
"static",
"String",
"toHexString",
"(",
"byte",
"[",
"]",
"b",
")",
"{",
"if",
"(",
"null",
"==",
"b",
")",
"return",
"null",
";",
"int",
"len",
"=",
"b",
".",
"length",
";",
"byte",
"[",
"]",
"hex",
"=",
"new",
"byte",
"[",
"len",
"<... | Converts a byte array into a hexadecimal String.
@param b a byte array to be converted
@return a hexadecimal (lower-case-based) String representation of the
byte array | [
"Converts",
"a",
"byte",
"array",
"into",
"a",
"hexadecimal",
"String",
"."
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/ch/csnc/extension/util/Encoding.java#L225-L237 |
129,242 | zaproxy/zaproxy | src/ch/csnc/extension/util/Encoding.java | Encoding.hashSHA | public static String hashSHA( String str ) {
byte[] b = str.getBytes();
MessageDigest md = null;
try {
md = MessageDigest.getInstance( "SHA1" );
md.update( b );
}
catch ( NoSuchAlgorithmException e ) {
e.printStackTrace();
// it's g... | java | public static String hashSHA( String str ) {
byte[] b = str.getBytes();
MessageDigest md = null;
try {
md = MessageDigest.getInstance( "SHA1" );
md.update( b );
}
catch ( NoSuchAlgorithmException e ) {
e.printStackTrace();
// it's g... | [
"public",
"static",
"String",
"hashSHA",
"(",
"String",
"str",
")",
"{",
"byte",
"[",
"]",
"b",
"=",
"str",
".",
"getBytes",
"(",
")",
";",
"MessageDigest",
"md",
"=",
"null",
";",
"try",
"{",
"md",
"=",
"MessageDigest",
".",
"getInstance",
"(",
"\"S... | Returns the SHA hash of a String.
@param str Description of the Parameter
@return Description of the Return Value | [
"Returns",
"the",
"SHA",
"hash",
"of",
"a",
"String",
"."
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/ch/csnc/extension/util/Encoding.java#L270-L282 |
129,243 | zaproxy/zaproxy | src/ch/csnc/extension/util/Encoding.java | Encoding.rot13 | public static synchronized String rot13( String input ) {
StringBuffer output = new StringBuffer();
if ( input != null ) {
for ( int i = 0; i < input.length(); i++ ) {
char inChar = input.charAt( i );
if ( ( inChar >= 'A' ) & ( inChar <= 'Z' ) ) {
... | java | public static synchronized String rot13( String input ) {
StringBuffer output = new StringBuffer();
if ( input != null ) {
for ( int i = 0; i < input.length(); i++ ) {
char inChar = input.charAt( i );
if ( ( inChar >= 'A' ) & ( inChar <= 'Z' ) ) {
... | [
"public",
"static",
"synchronized",
"String",
"rot13",
"(",
"String",
"input",
")",
"{",
"StringBuffer",
"output",
"=",
"new",
"StringBuffer",
"(",
")",
";",
"if",
"(",
"input",
"!=",
"null",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",... | Description of the Method
@param input Description of the Parameter
@return Description of the Return Value | [
"Description",
"of",
"the",
"Method"
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/ch/csnc/extension/util/Encoding.java#L290-L311 |
129,244 | zaproxy/zaproxy | src/org/parosproxy/paros/common/AbstractParam.java | AbstractParam.load | public void load(FileConfiguration config) {
this.config = config;
try {
parse();
} catch (Exception e) {
logger.error(e.getMessage(), e);
}
} | java | public void load(FileConfiguration config) {
this.config = config;
try {
parse();
} catch (Exception e) {
logger.error(e.getMessage(), e);
}
} | [
"public",
"void",
"load",
"(",
"FileConfiguration",
"config",
")",
"{",
"this",
".",
"config",
"=",
"config",
";",
"try",
"{",
"parse",
"(",
")",
";",
"}",
"catch",
"(",
"Exception",
"e",
")",
"{",
"logger",
".",
"error",
"(",
"e",
".",
"getMessage",... | Loads the configurations from the given configuration file.
@param config the configuration file | [
"Loads",
"the",
"configurations",
"from",
"the",
"given",
"configuration",
"file",
"."
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/parosproxy/paros/common/AbstractParam.java#L55-L63 |
129,245 | zaproxy/zaproxy | src/org/parosproxy/paros/common/AbstractParam.java | AbstractParam.load | public void load(String filePath, ControlOverrides overrides) {
try {
config = new ZapXmlConfiguration(filePath);
if (overrides != null) {
for (Entry<String,String> entry : overrides.getOrderedConfigs().entrySet()) {
logger.info("Setting config " + e... | java | public void load(String filePath, ControlOverrides overrides) {
try {
config = new ZapXmlConfiguration(filePath);
if (overrides != null) {
for (Entry<String,String> entry : overrides.getOrderedConfigs().entrySet()) {
logger.info("Setting config " + e... | [
"public",
"void",
"load",
"(",
"String",
"filePath",
",",
"ControlOverrides",
"overrides",
")",
"{",
"try",
"{",
"config",
"=",
"new",
"ZapXmlConfiguration",
"(",
"filePath",
")",
";",
"if",
"(",
"overrides",
"!=",
"null",
")",
"{",
"for",
"(",
"Entry",
... | Loads the configurations from the file located at the given path and using the given overrides
@param filePath the path to the configuration file, might be relative.
@param overrides the configuration overrides, might be {@code null}. | [
"Loads",
"the",
"configurations",
"from",
"the",
"file",
"located",
"at",
"the",
"given",
"path",
"and",
"using",
"the",
"given",
"overrides"
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/parosproxy/paros/common/AbstractParam.java#L80-L94 |
129,246 | zaproxy/zaproxy | src/org/parosproxy/paros/common/FileXML.java | FileXML.getElements | protected Element[] getElements(Element base, String childTag) {
NodeList nodeList = base.getElementsByTagName(childTag);
if (nodeList.getLength() == 0) {
return null;
}
Element[] elements = new Element[nodeList.getLength()];
for (int i=0; i<nodeList.getLength(); i++) {
elements[i] = (Element)... | java | protected Element[] getElements(Element base, String childTag) {
NodeList nodeList = base.getElementsByTagName(childTag);
if (nodeList.getLength() == 0) {
return null;
}
Element[] elements = new Element[nodeList.getLength()];
for (int i=0; i<nodeList.getLength(); i++) {
elements[i] = (Element)... | [
"protected",
"Element",
"[",
"]",
"getElements",
"(",
"Element",
"base",
",",
"String",
"childTag",
")",
"{",
"NodeList",
"nodeList",
"=",
"base",
".",
"getElementsByTagName",
"(",
"childTag",
")",
";",
"if",
"(",
"nodeList",
".",
"getLength",
"(",
")",
"=... | Get all elements under a base element matching a tag name
@param base
@param childTag
@return | [
"Get",
"all",
"elements",
"under",
"a",
"base",
"element",
"matching",
"a",
"tag",
"name"
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/parosproxy/paros/common/FileXML.java#L119-L129 |
129,247 | zaproxy/zaproxy | src/org/parosproxy/paros/common/FileXML.java | FileXML.getText | private String getText(Element element) {
try {
for (int i = 0; i < element.getChildNodes().getLength(); i++) {
Node node = element.getChildNodes().item(i);
if (node.getNodeType() == Node.TEXT_NODE) {
return node.getNodeValue();
}
}
} catch (Exception e) {
}
return "";
} | java | private String getText(Element element) {
try {
for (int i = 0; i < element.getChildNodes().getLength(); i++) {
Node node = element.getChildNodes().item(i);
if (node.getNodeType() == Node.TEXT_NODE) {
return node.getNodeValue();
}
}
} catch (Exception e) {
}
return "";
} | [
"private",
"String",
"getText",
"(",
"Element",
"element",
")",
"{",
"try",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"element",
".",
"getChildNodes",
"(",
")",
".",
"getLength",
"(",
")",
";",
"i",
"++",
")",
"{",
"Node",
"node",
"="... | Get the text in text node from the element.
@param element Element to get text from
@return Text in the text node under the element | [
"Get",
"the",
"text",
"in",
"text",
"node",
"from",
"the",
"element",
"."
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/parosproxy/paros/common/FileXML.java#L164-L176 |
129,248 | zaproxy/zaproxy | src/org/parosproxy/paros/common/FileXML.java | FileXML.getValue | protected String getValue(Element base, String tag) {
Element element = null;
String result = "";
try {
// ZAP: Removed unnecessary cast.
element = getElement(base, tag);
result = getText(element);
} catch (Exception e) {
}
return result;
} | java | protected String getValue(Element base, String tag) {
Element element = null;
String result = "";
try {
// ZAP: Removed unnecessary cast.
element = getElement(base, tag);
result = getText(element);
} catch (Exception e) {
}
return result;
} | [
"protected",
"String",
"getValue",
"(",
"Element",
"base",
",",
"String",
"tag",
")",
"{",
"Element",
"element",
"=",
"null",
";",
"String",
"result",
"=",
"\"\"",
";",
"try",
"{",
"// ZAP: Removed unnecessary cast.\r",
"element",
"=",
"getElement",
"(",
"base... | Get the value of the tag under a base element
@param base
@param tag
@return | [
"Get",
"the",
"value",
"of",
"the",
"tag",
"under",
"a",
"base",
"element"
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/parosproxy/paros/common/FileXML.java#L184-L196 |
129,249 | zaproxy/zaproxy | src/org/zaproxy/zap/extension/httpsessions/PopupMenuFactoryAddUserFromSession.java | PopupMenuFactoryAddUserFromSession.getExtensionAuthentication | private ExtensionAuthentication getExtensionAuthentication() {
if (extensionAuth == null) {
extensionAuth = Control.getSingleton().getExtensionLoader().getExtension(ExtensionAuthentication.class);
}
return extensionAuth;
} | java | private ExtensionAuthentication getExtensionAuthentication() {
if (extensionAuth == null) {
extensionAuth = Control.getSingleton().getExtensionLoader().getExtension(ExtensionAuthentication.class);
}
return extensionAuth;
} | [
"private",
"ExtensionAuthentication",
"getExtensionAuthentication",
"(",
")",
"{",
"if",
"(",
"extensionAuth",
"==",
"null",
")",
"{",
"extensionAuth",
"=",
"Control",
".",
"getSingleton",
"(",
")",
".",
"getExtensionLoader",
"(",
")",
".",
"getExtension",
"(",
... | Gets the authentication extension
@return the extension authentication | [
"Gets",
"the",
"authentication",
"extension"
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/extension/httpsessions/PopupMenuFactoryAddUserFromSession.java#L55-L60 |
129,250 | zaproxy/zaproxy | src/org/zaproxy/zap/extension/httpsessions/PopupMenuFactoryAddUserFromSession.java | PopupMenuFactoryAddUserFromSession.getExtensionUserManagement | private ExtensionUserManagement getExtensionUserManagement() {
if (extensionUsers == null) {
extensionUsers = Control.getSingleton().getExtensionLoader().getExtension(ExtensionUserManagement.class);
}
return extensionUsers;
} | java | private ExtensionUserManagement getExtensionUserManagement() {
if (extensionUsers == null) {
extensionUsers = Control.getSingleton().getExtensionLoader().getExtension(ExtensionUserManagement.class);
}
return extensionUsers;
} | [
"private",
"ExtensionUserManagement",
"getExtensionUserManagement",
"(",
")",
"{",
"if",
"(",
"extensionUsers",
"==",
"null",
")",
"{",
"extensionUsers",
"=",
"Control",
".",
"getSingleton",
"(",
")",
".",
"getExtensionLoader",
"(",
")",
".",
"getExtension",
"(",
... | Gets the Users extension
@return the extension Users | [
"Gets",
"the",
"Users",
"extension"
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/extension/httpsessions/PopupMenuFactoryAddUserFromSession.java#L67-L72 |
129,251 | zaproxy/zaproxy | src/org/zaproxy/zap/spider/parser/SpiderHtmlParser.java | SpiderHtmlParser.parseSource | private boolean parseSource(HttpMessage message, Source source, int depth, String baseURL) {
log.debug("Parsing an HTML message...");
boolean resourcesfound = false;
// Process A elements
List<Element> elements = source.getAllElements(HTMLElementName.A);
for (Element el : elements) {
resourcesfound |= proc... | java | private boolean parseSource(HttpMessage message, Source source, int depth, String baseURL) {
log.debug("Parsing an HTML message...");
boolean resourcesfound = false;
// Process A elements
List<Element> elements = source.getAllElements(HTMLElementName.A);
for (Element el : elements) {
resourcesfound |= proc... | [
"private",
"boolean",
"parseSource",
"(",
"HttpMessage",
"message",
",",
"Source",
"source",
",",
"int",
"depth",
",",
"String",
"baseURL",
")",
"{",
"log",
".",
"debug",
"(",
"\"Parsing an HTML message...\"",
")",
";",
"boolean",
"resourcesfound",
"=",
"false",... | Parses the HTML Jericho source for the elements that contain references to other resources.
@param message the message
@param source the source
@param depth the depth
@param baseURL the base url
@return {@code true} if at least one URL was found, {@code false} otherwise. | [
"Parses",
"the",
"HTML",
"Jericho",
"source",
"for",
"the",
"elements",
"that",
"contain",
"references",
"to",
"other",
"resources",
"."
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/spider/parser/SpiderHtmlParser.java#L118-L186 |
129,252 | zaproxy/zaproxy | src/org/zaproxy/zap/spider/parser/SpiderHtmlParser.java | SpiderHtmlParser.processAttributeElement | private boolean processAttributeElement(HttpMessage message, int depth, String baseURL, Element element,
String attributeName) {
// The URL as written in the attribute (can be relative or absolute)
String localURL = element.getAttributeValue(attributeName);
if (localURL == null) {
return false;
}
proce... | java | private boolean processAttributeElement(HttpMessage message, int depth, String baseURL, Element element,
String attributeName) {
// The URL as written in the attribute (can be relative or absolute)
String localURL = element.getAttributeValue(attributeName);
if (localURL == null) {
return false;
}
proce... | [
"private",
"boolean",
"processAttributeElement",
"(",
"HttpMessage",
"message",
",",
"int",
"depth",
",",
"String",
"baseURL",
",",
"Element",
"element",
",",
"String",
"attributeName",
")",
"{",
"// The URL as written in the attribute (can be relative or absolute)",
"Strin... | Processes the attribute with the given name of a Jericho element, for an URL. If an URL is
found, notifies the listeners.
@param message the message
@param depth the depth
@param baseURL the base url
@param element the element
@param attributeName the attribute name
@return {@code true} if a URL was processed, {@code ... | [
"Processes",
"the",
"attribute",
"with",
"the",
"given",
"name",
"of",
"a",
"Jericho",
"element",
"for",
"an",
"URL",
".",
"If",
"an",
"URL",
"is",
"found",
"notifies",
"the",
"listeners",
"."
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/spider/parser/SpiderHtmlParser.java#L199-L209 |
129,253 | zaproxy/zaproxy | src/org/zaproxy/zap/view/SplashScreen.java | SplashScreen.appendMsg | public void appendMsg(final String msg) {
if (!EventQueue.isDispatchThread()) {
try {
EventQueue.invokeAndWait(new Runnable() {
@Override
public void run() {
appendMsg(msg);
}
});
... | java | public void appendMsg(final String msg) {
if (!EventQueue.isDispatchThread()) {
try {
EventQueue.invokeAndWait(new Runnable() {
@Override
public void run() {
appendMsg(msg);
}
});
... | [
"public",
"void",
"appendMsg",
"(",
"final",
"String",
"msg",
")",
"{",
"if",
"(",
"!",
"EventQueue",
".",
"isDispatchThread",
"(",
")",
")",
"{",
"try",
"{",
"EventQueue",
".",
"invokeAndWait",
"(",
"new",
"Runnable",
"(",
")",
"{",
"@",
"Override",
"... | Append a message to the output window of this splash screen
@param msg the message that should be appended | [
"Append",
"a",
"message",
"to",
"the",
"output",
"window",
"of",
"this",
"splash",
"screen"
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/view/SplashScreen.java#L261-L282 |
129,254 | zaproxy/zaproxy | src/org/zaproxy/zap/view/StandardFieldsDialog.java | StandardFieldsDialog.validateTabbed | private void validateTabbed(int tabIndex) {
if (!isTabbed()) {
throw new IllegalArgumentException("Not initialised as a tabbed dialog - must use method without tab parameters");
}
if (tabIndex < 0 || tabIndex >= this.tabPanels.size()) {
throw new IllegalArgumentException("Invalid tab index: " + tabIndex);
... | java | private void validateTabbed(int tabIndex) {
if (!isTabbed()) {
throw new IllegalArgumentException("Not initialised as a tabbed dialog - must use method without tab parameters");
}
if (tabIndex < 0 || tabIndex >= this.tabPanels.size()) {
throw new IllegalArgumentException("Invalid tab index: " + tabIndex);
... | [
"private",
"void",
"validateTabbed",
"(",
"int",
"tabIndex",
")",
"{",
"if",
"(",
"!",
"isTabbed",
"(",
")",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"Not initialised as a tabbed dialog - must use method without tab parameters\"",
")",
";",
"}",
"i... | Validates that the dialogue is tabbed and the given tab index is valid.
@param tabIndex the index of the tab to validate.
@throws IllegalArgumentException if the dialogue was not initialised with tabs or if no tab exists with the given index.
@see #validateNotTabbed() | [
"Validates",
"that",
"the",
"dialogue",
"is",
"tabbed",
"and",
"the",
"given",
"tab",
"index",
"is",
"valid",
"."
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/view/StandardFieldsDialog.java#L534-L541 |
129,255 | zaproxy/zaproxy | src/org/zaproxy/zap/view/StandardFieldsDialog.java | StandardFieldsDialog.addTableField | public void addTableField(String fieldLabel, JTable field, List<JButton> buttons) {
validateNotTabbed();
JScrollPane scrollPane = new JScrollPane();
scrollPane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
scrollPane.setViewportView(field);
field.setFillsViewportHeight(true);
// T... | java | public void addTableField(String fieldLabel, JTable field, List<JButton> buttons) {
validateNotTabbed();
JScrollPane scrollPane = new JScrollPane();
scrollPane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
scrollPane.setViewportView(field);
field.setFillsViewportHeight(true);
// T... | [
"public",
"void",
"addTableField",
"(",
"String",
"fieldLabel",
",",
"JTable",
"field",
",",
"List",
"<",
"JButton",
">",
"buttons",
")",
"{",
"validateNotTabbed",
"(",
")",
";",
"JScrollPane",
"scrollPane",
"=",
"new",
"JScrollPane",
"(",
")",
";",
"scrollP... | Add a table field.
@param fieldLabel If null then the table will be full width
@param field the table field
@param buttons if not null then the buttons will be added to the right of the table | [
"Add",
"a",
"table",
"field",
"."
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/view/StandardFieldsDialog.java#L900-L949 |
129,256 | zaproxy/zaproxy | src/org/zaproxy/zap/view/StandardFieldsDialog.java | StandardFieldsDialog.setTabsVisible | public void setTabsVisible(String[] tabLabels, boolean visible) {
if (visible) {
for (String label : tabLabels) {
String name = Constant.messages.getString(label);
JPanel tabPanel = this.tabNameMap.get(label);
tabbedPane.addTab(name, getTabComponent(tabPanel));
}
} else {
for (String labe... | java | public void setTabsVisible(String[] tabLabels, boolean visible) {
if (visible) {
for (String label : tabLabels) {
String name = Constant.messages.getString(label);
JPanel tabPanel = this.tabNameMap.get(label);
tabbedPane.addTab(name, getTabComponent(tabPanel));
}
} else {
for (String labe... | [
"public",
"void",
"setTabsVisible",
"(",
"String",
"[",
"]",
"tabLabels",
",",
"boolean",
"visible",
")",
"{",
"if",
"(",
"visible",
")",
"{",
"for",
"(",
"String",
"label",
":",
"tabLabels",
")",
"{",
"String",
"name",
"=",
"Constant",
".",
"messages",
... | Set the visibility of the specified tabs.
The labels must have been used to create the tabs in the constructor
@param tabLabels the names of the tabs
@param visible {@code true} if the tabs should be visible, {@code false} otherwise | [
"Set",
"the",
"visibility",
"of",
"the",
"specified",
"tabs",
".",
"The",
"labels",
"must",
"have",
"been",
"used",
"to",
"create",
"the",
"tabs",
"in",
"the",
"constructor"
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/view/StandardFieldsDialog.java#L1824-L1837 |
129,257 | zaproxy/zaproxy | src/org/zaproxy/zap/control/AddOn.java | AddOn.isValidAddOn | public static ValidationResult isValidAddOn(Path file) {
if (file == null || file.getNameCount() == 0) {
return new ValidationResult(ValidationResult.Validity.INVALID_PATH);
}
if (!isAddOnFileName(file.getFileName().toString())) {
return new ValidationResult(ValidationResult.Validity.INVALID_FILE_NAM... | java | public static ValidationResult isValidAddOn(Path file) {
if (file == null || file.getNameCount() == 0) {
return new ValidationResult(ValidationResult.Validity.INVALID_PATH);
}
if (!isAddOnFileName(file.getFileName().toString())) {
return new ValidationResult(ValidationResult.Validity.INVALID_FILE_NAM... | [
"public",
"static",
"ValidationResult",
"isValidAddOn",
"(",
"Path",
"file",
")",
"{",
"if",
"(",
"file",
"==",
"null",
"||",
"file",
".",
"getNameCount",
"(",
")",
"==",
"0",
")",
"{",
"return",
"new",
"ValidationResult",
"(",
"ValidationResult",
".",
"Va... | Tells whether or not the given file is a ZAP add-on.
@param file the file to be checked.
@return the result of the validation.
@since TODO add version
@see #isAddOn(Path) | [
"Tells",
"whether",
"or",
"not",
"the",
"given",
"file",
"is",
"a",
"ZAP",
"add",
"-",
"on",
"."
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/control/AddOn.java#L409-L440 |
129,258 | zaproxy/zaproxy | src/org/zaproxy/zap/control/AddOn.java | AddOn.getLoadedExtensionsWithDeps | public List<Extension> getLoadedExtensionsWithDeps() {
List<String> classnames = getExtensionsWithDeps();
ArrayList<Extension> loadedExtensions = new ArrayList<>(extensionsWithDeps.size());
for (Extension extension : getLoadedExtensions()) {
if (classnames.contains(extension.getClass().getCanonicalName()))... | java | public List<Extension> getLoadedExtensionsWithDeps() {
List<String> classnames = getExtensionsWithDeps();
ArrayList<Extension> loadedExtensions = new ArrayList<>(extensionsWithDeps.size());
for (Extension extension : getLoadedExtensions()) {
if (classnames.contains(extension.getClass().getCanonicalName()))... | [
"public",
"List",
"<",
"Extension",
">",
"getLoadedExtensionsWithDeps",
"(",
")",
"{",
"List",
"<",
"String",
">",
"classnames",
"=",
"getExtensionsWithDeps",
"(",
")",
";",
"ArrayList",
"<",
"Extension",
">",
"loadedExtensions",
"=",
"new",
"ArrayList",
"<>",
... | Gets the extensions of this add-on that have dependencies and were loaded.
@return an unmodifiable {@code List} with the extensions of this add-on that have dependencies and were loaded
@since 2.4.0 | [
"Gets",
"the",
"extensions",
"of",
"this",
"add",
"-",
"on",
"that",
"have",
"dependencies",
"and",
"were",
"loaded",
"."
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/control/AddOn.java#L886-L896 |
129,259 | zaproxy/zaproxy | src/org/zaproxy/zap/control/AddOn.java | AddOn.getLoadedExtensions | public List<Extension> getLoadedExtensions() {
if (loadedExtensions == null) {
return Collections.emptyList();
}
return Collections.unmodifiableList(loadedExtensions);
} | java | public List<Extension> getLoadedExtensions() {
if (loadedExtensions == null) {
return Collections.emptyList();
}
return Collections.unmodifiableList(loadedExtensions);
} | [
"public",
"List",
"<",
"Extension",
">",
"getLoadedExtensions",
"(",
")",
"{",
"if",
"(",
"loadedExtensions",
"==",
"null",
")",
"{",
"return",
"Collections",
".",
"emptyList",
"(",
")",
";",
"}",
"return",
"Collections",
".",
"unmodifiableList",
"(",
"loade... | Gets the extensions of this add-on that were loaded.
@return an unmodifiable {@code List} with the extensions of this add-on that were loaded
@since 2.4.0 | [
"Gets",
"the",
"extensions",
"of",
"this",
"add",
"-",
"on",
"that",
"were",
"loaded",
"."
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/control/AddOn.java#L904-L909 |
129,260 | zaproxy/zaproxy | src/org/zaproxy/zap/control/AddOn.java | AddOn.getIdsAddOnDependencies | public List<String> getIdsAddOnDependencies() {
if (dependencies == null) {
return Collections.emptyList();
}
List<String> ids = new ArrayList<>(dependencies.getAddOns().size());
for (AddOnDep dep : dependencies.getAddOns()) {
ids.add(dep.getId());
}
return ids;
} | java | public List<String> getIdsAddOnDependencies() {
if (dependencies == null) {
return Collections.emptyList();
}
List<String> ids = new ArrayList<>(dependencies.getAddOns().size());
for (AddOnDep dep : dependencies.getAddOns()) {
ids.add(dep.getId());
}
return ids;
} | [
"public",
"List",
"<",
"String",
">",
"getIdsAddOnDependencies",
"(",
")",
"{",
"if",
"(",
"dependencies",
"==",
"null",
")",
"{",
"return",
"Collections",
".",
"emptyList",
"(",
")",
";",
"}",
"List",
"<",
"String",
">",
"ids",
"=",
"new",
"ArrayList",
... | Returns the IDs of the add-ons dependencies, an empty collection if none.
@return the IDs of the dependencies.
@since 2.4.0 | [
"Returns",
"the",
"IDs",
"of",
"the",
"add",
"-",
"ons",
"dependencies",
"an",
"empty",
"collection",
"if",
"none",
"."
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/control/AddOn.java#L1589-L1599 |
129,261 | zaproxy/zaproxy | src/org/zaproxy/zap/extension/api/AbstractAPIGenerator.java | AbstractAPIGenerator.generateAPIFiles | public void generateAPIFiles(List<ApiImplementor> implementors) throws IOException {
for (ApiImplementor implementor : implementors) {
this.generateAPIFiles(implementor);
}
} | java | public void generateAPIFiles(List<ApiImplementor> implementors) throws IOException {
for (ApiImplementor implementor : implementors) {
this.generateAPIFiles(implementor);
}
} | [
"public",
"void",
"generateAPIFiles",
"(",
"List",
"<",
"ApiImplementor",
">",
"implementors",
")",
"throws",
"IOException",
"{",
"for",
"(",
"ApiImplementor",
"implementor",
":",
"implementors",
")",
"{",
"this",
".",
"generateAPIFiles",
"(",
"implementor",
")",
... | Generates the API client files of the given API implementors.
@param implementors the API implementors, must not be {@code null}
@throws IOException if an error occurred while writing the API files | [
"Generates",
"the",
"API",
"client",
"files",
"of",
"the",
"given",
"API",
"implementors",
"."
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/extension/api/AbstractAPIGenerator.java#L132-L136 |
129,262 | zaproxy/zaproxy | src/org/parosproxy/paros/network/HttpMessage.java | HttpMessage.setResponseBody | public void setResponseBody(HttpResponseBody resBody) {
if (resBody == null) {
throw new IllegalArgumentException("The parameter resBody must not be null.");
}
mResBody = resBody;
getResponseBody().setCharset(getResponseHeader().getCharset());
} | java | public void setResponseBody(HttpResponseBody resBody) {
if (resBody == null) {
throw new IllegalArgumentException("The parameter resBody must not be null.");
}
mResBody = resBody;
getResponseBody().setCharset(getResponseHeader().getCharset());
} | [
"public",
"void",
"setResponseBody",
"(",
"HttpResponseBody",
"resBody",
")",
"{",
"if",
"(",
"resBody",
"==",
"null",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"The parameter resBody must not be null.\"",
")",
";",
"}",
"mResBody",
"=",
"resBody"... | Sets the response body of this message.
@param resBody the new response body
@throws IllegalArgumentException if parameter {@code resBody} is {@code null}. | [
"Sets",
"the",
"response",
"body",
"of",
"this",
"message",
"."
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/parosproxy/paros/network/HttpMessage.java#L366-L373 |
129,263 | zaproxy/zaproxy | src/org/zaproxy/zap/extension/api/API.java | API.validateFormatForViewAction | private static void validateFormatForViewAction(Format format) throws ApiException {
switch (format) {
case JSON:
case JSONP:
case XML:
case HTML:
return;
default:
throw new ApiException(ApiException.Type.BAD_FORMAT, "The format OTHER should not be used with views and actions.");
}
} | java | private static void validateFormatForViewAction(Format format) throws ApiException {
switch (format) {
case JSON:
case JSONP:
case XML:
case HTML:
return;
default:
throw new ApiException(ApiException.Type.BAD_FORMAT, "The format OTHER should not be used with views and actions.");
}
} | [
"private",
"static",
"void",
"validateFormatForViewAction",
"(",
"Format",
"format",
")",
"throws",
"ApiException",
"{",
"switch",
"(",
"format",
")",
"{",
"case",
"JSON",
":",
"case",
"JSONP",
":",
"case",
"XML",
":",
"case",
"HTML",
":",
"return",
";",
"... | Validates that the given format is supported for views and actions.
@param format the format to validate.
@throws ApiException if the format is not valid.
@see #convertViewActionApiResponse(Format, String, ApiResponse) | [
"Validates",
"that",
"the",
"given",
"format",
"is",
"supported",
"for",
"views",
"and",
"actions",
"."
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/extension/api/API.java#L609-L619 |
129,264 | zaproxy/zaproxy | src/org/zaproxy/zap/extension/api/API.java | API.removeCallBackUrls | public void removeCallBackUrls(ApiImplementor impl) {
if (impl == null) {
throw new IllegalArgumentException("Parameter impl must not be null.");
}
logger.debug("All callbacks removed for " + impl.getClass().getCanonicalName());
this.callBacks.values().removeIf(impl::equals);
} | java | public void removeCallBackUrls(ApiImplementor impl) {
if (impl == null) {
throw new IllegalArgumentException("Parameter impl must not be null.");
}
logger.debug("All callbacks removed for " + impl.getClass().getCanonicalName());
this.callBacks.values().removeIf(impl::equals);
} | [
"public",
"void",
"removeCallBackUrls",
"(",
"ApiImplementor",
"impl",
")",
"{",
"if",
"(",
"impl",
"==",
"null",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"Parameter impl must not be null.\"",
")",
";",
"}",
"logger",
".",
"debug",
"(",
"\"Al... | Removes the given implementor as a callback handler.
@param impl the implementor to remove.
@throws IllegalArgumentException if the given parameter is {@code null}.
@since TODO add version
@see #getCallBackUrl(ApiImplementor, String)
@see #removeCallBackUrl(String)
@see #removeApiImplementor(ApiImplementor) | [
"Removes",
"the",
"given",
"implementor",
"as",
"a",
"callback",
"handler",
"."
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/extension/api/API.java#L815-L821 |
129,265 | zaproxy/zaproxy | src/org/zaproxy/zap/extension/api/API.java | API.getOneTimeNonce | public String getOneTimeNonce(String apiUrl) {
String nonce = Long.toHexString(random.nextLong());
this.nonces.put(nonce, new Nonce(nonce, apiUrl, true));
return nonce;
} | java | public String getOneTimeNonce(String apiUrl) {
String nonce = Long.toHexString(random.nextLong());
this.nonces.put(nonce, new Nonce(nonce, apiUrl, true));
return nonce;
} | [
"public",
"String",
"getOneTimeNonce",
"(",
"String",
"apiUrl",
")",
"{",
"String",
"nonce",
"=",
"Long",
".",
"toHexString",
"(",
"random",
".",
"nextLong",
"(",
")",
")",
";",
"this",
".",
"nonces",
".",
"put",
"(",
"nonce",
",",
"new",
"Nonce",
"(",... | Returns a one time nonce to be used with the API call specified by the URL
@param apiUrl the API URL
@return a one time nonce
@since 2.6.0 | [
"Returns",
"a",
"one",
"time",
"nonce",
"to",
"be",
"used",
"with",
"the",
"API",
"call",
"specified",
"by",
"the",
"URL"
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/extension/api/API.java#L829-L833 |
129,266 | zaproxy/zaproxy | src/org/zaproxy/zap/extension/api/API.java | API.getLongLivedNonce | public String getLongLivedNonce(String apiUrl) {
String nonce = Long.toHexString(random.nextLong());
this.nonces.put(nonce, new Nonce(nonce, apiUrl, false));
return nonce;
} | java | public String getLongLivedNonce(String apiUrl) {
String nonce = Long.toHexString(random.nextLong());
this.nonces.put(nonce, new Nonce(nonce, apiUrl, false));
return nonce;
} | [
"public",
"String",
"getLongLivedNonce",
"(",
"String",
"apiUrl",
")",
"{",
"String",
"nonce",
"=",
"Long",
".",
"toHexString",
"(",
"random",
".",
"nextLong",
"(",
")",
")",
";",
"this",
".",
"nonces",
".",
"put",
"(",
"nonce",
",",
"new",
"Nonce",
"(... | Returns a nonce that will be valid for the lifetime of the ZAP process to used with the API call specified by the URL
@param apiUrl the API URL
@return a nonce that will be valid for the lifetime of the ZAP process
@since 2.6.0 | [
"Returns",
"a",
"nonce",
"that",
"will",
"be",
"valid",
"for",
"the",
"lifetime",
"of",
"the",
"ZAP",
"process",
"to",
"used",
"with",
"the",
"API",
"call",
"specified",
"by",
"the",
"URL"
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/extension/api/API.java#L841-L845 |
129,267 | zaproxy/zaproxy | src/org/zaproxy/zap/authentication/AuthenticationMethod.java | AuthenticationMethod.setLoggedInIndicatorPattern | public void setLoggedInIndicatorPattern(String loggedInIndicatorPattern) {
if (loggedInIndicatorPattern == null || loggedInIndicatorPattern.trim().length() == 0) {
this.loggedInIndicatorPattern = null;
} else {
this.loggedInIndicatorPattern = Pattern.compile(loggedInIndicatorPattern);
}
} | java | public void setLoggedInIndicatorPattern(String loggedInIndicatorPattern) {
if (loggedInIndicatorPattern == null || loggedInIndicatorPattern.trim().length() == 0) {
this.loggedInIndicatorPattern = null;
} else {
this.loggedInIndicatorPattern = Pattern.compile(loggedInIndicatorPattern);
}
} | [
"public",
"void",
"setLoggedInIndicatorPattern",
"(",
"String",
"loggedInIndicatorPattern",
")",
"{",
"if",
"(",
"loggedInIndicatorPattern",
"==",
"null",
"||",
"loggedInIndicatorPattern",
".",
"trim",
"(",
")",
".",
"length",
"(",
")",
"==",
"0",
")",
"{",
"thi... | Sets the logged in indicator pattern.
@param loggedInIndicatorPattern the new logged in indicator pattern | [
"Sets",
"the",
"logged",
"in",
"indicator",
"pattern",
"."
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/authentication/AuthenticationMethod.java#L246-L252 |
129,268 | zaproxy/zaproxy | src/org/zaproxy/zap/authentication/AuthenticationMethod.java | AuthenticationMethod.setLoggedOutIndicatorPattern | public void setLoggedOutIndicatorPattern(String loggedOutIndicatorPattern) {
if (loggedOutIndicatorPattern == null || loggedOutIndicatorPattern.trim().length() == 0) {
this.loggedOutIndicatorPattern = null;
} else {
this.loggedOutIndicatorPattern = Pattern.compile(loggedOutIndicatorPattern);
}
} | java | public void setLoggedOutIndicatorPattern(String loggedOutIndicatorPattern) {
if (loggedOutIndicatorPattern == null || loggedOutIndicatorPattern.trim().length() == 0) {
this.loggedOutIndicatorPattern = null;
} else {
this.loggedOutIndicatorPattern = Pattern.compile(loggedOutIndicatorPattern);
}
} | [
"public",
"void",
"setLoggedOutIndicatorPattern",
"(",
"String",
"loggedOutIndicatorPattern",
")",
"{",
"if",
"(",
"loggedOutIndicatorPattern",
"==",
"null",
"||",
"loggedOutIndicatorPattern",
".",
"trim",
"(",
")",
".",
"length",
"(",
")",
"==",
"0",
")",
"{",
... | Sets the logged out indicator pattern.
@param loggedOutIndicatorPattern the new logged out indicator pattern | [
"Sets",
"the",
"logged",
"out",
"indicator",
"pattern",
"."
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/authentication/AuthenticationMethod.java#L268-L274 |
129,269 | zaproxy/zaproxy | src/org/zaproxy/zap/authentication/AuthenticationMethod.java | AuthenticationMethod.isSameType | public boolean isSameType(AuthenticationMethod other) {
if (other == null)
return false;
return other.getClass().equals(this.getClass());
} | java | public boolean isSameType(AuthenticationMethod other) {
if (other == null)
return false;
return other.getClass().equals(this.getClass());
} | [
"public",
"boolean",
"isSameType",
"(",
"AuthenticationMethod",
"other",
")",
"{",
"if",
"(",
"other",
"==",
"null",
")",
"return",
"false",
";",
"return",
"other",
".",
"getClass",
"(",
")",
".",
"equals",
"(",
"this",
".",
"getClass",
"(",
")",
")",
... | Checks if another method is of the same type.
@param other the other
@return true, if is same type | [
"Checks",
"if",
"another",
"method",
"is",
"of",
"the",
"same",
"type",
"."
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/authentication/AuthenticationMethod.java#L282-L286 |
129,270 | zaproxy/zaproxy | src/org/zaproxy/zap/view/TabbedPanel2.java | TabbedPanel2.showHiddenTabPopup | private void showHiddenTabPopup() {
JPopupMenu menu = new JPopupMenu();
if (getMousePosition() == null) {
// Startup
return;
}
Collections.sort(this.hiddenTabs, NAME_COMPARATOR);
for (Component c : this.hiddenTabs) {
if (c instanceof AbstractPanel) {
final AbstractPanel ap = (AbstractPanel)c;
... | java | private void showHiddenTabPopup() {
JPopupMenu menu = new JPopupMenu();
if (getMousePosition() == null) {
// Startup
return;
}
Collections.sort(this.hiddenTabs, NAME_COMPARATOR);
for (Component c : this.hiddenTabs) {
if (c instanceof AbstractPanel) {
final AbstractPanel ap = (AbstractPanel)c;
... | [
"private",
"void",
"showHiddenTabPopup",
"(",
")",
"{",
"JPopupMenu",
"menu",
"=",
"new",
"JPopupMenu",
"(",
")",
";",
"if",
"(",
"getMousePosition",
"(",
")",
"==",
"null",
")",
"{",
"// Startup",
"return",
";",
"}",
"Collections",
".",
"sort",
"(",
"th... | Show a popup containing a list of all of the hidden tabs - selecting one will reveal that tab | [
"Show",
"a",
"popup",
"containing",
"a",
"list",
"of",
"all",
"of",
"the",
"hidden",
"tabs",
"-",
"selecting",
"one",
"will",
"reveal",
"that",
"tab"
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/view/TabbedPanel2.java#L98-L121 |
129,271 | zaproxy/zaproxy | src/org/zaproxy/zap/view/TabbedPanel2.java | TabbedPanel2.removeTabAt | @Override
public void removeTabAt(int index) {
if (index < 0 || index >= getTabCount()) {
throw new IndexOutOfBoundsException("Index: " + index + ", Tab count: " + getTabCount());
}
Component component = getComponentAt(index);
super.removeTabAt(index);
if (!(component instanceof AbstractPanel)) {
ret... | java | @Override
public void removeTabAt(int index) {
if (index < 0 || index >= getTabCount()) {
throw new IndexOutOfBoundsException("Index: " + index + ", Tab count: " + getTabCount());
}
Component component = getComponentAt(index);
super.removeTabAt(index);
if (!(component instanceof AbstractPanel)) {
ret... | [
"@",
"Override",
"public",
"void",
"removeTabAt",
"(",
"int",
"index",
")",
"{",
"if",
"(",
"index",
"<",
"0",
"||",
"index",
">=",
"getTabCount",
"(",
")",
")",
"{",
"throw",
"new",
"IndexOutOfBoundsException",
"(",
"\"Index: \"",
"+",
"index",
"+",
"\"... | Removes the tab at the given index and the corresponding panel. | [
"Removes",
"the",
"tab",
"at",
"the",
"given",
"index",
"and",
"the",
"corresponding",
"panel",
"."
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/view/TabbedPanel2.java#L483-L497 |
129,272 | zaproxy/zaproxy | src/org/zaproxy/zap/view/TabbedPanel2.java | TabbedPanel2.setShowTabNames | public void setShowTabNames(boolean showTabNames) {
for (int i = 0; i < getTabCount(); i++) {
String title = showTabNames ? getComponentAt(i).getName() : "";
setTitleAt(i, title);
}
} | java | public void setShowTabNames(boolean showTabNames) {
for (int i = 0; i < getTabCount(); i++) {
String title = showTabNames ? getComponentAt(i).getName() : "";
setTitleAt(i, title);
}
} | [
"public",
"void",
"setShowTabNames",
"(",
"boolean",
"showTabNames",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"getTabCount",
"(",
")",
";",
"i",
"++",
")",
"{",
"String",
"title",
"=",
"showTabNames",
"?",
"getComponentAt",
"(",
"i",
... | Sets whether or not the tab names should be shown.
@param showTabNames {@code true} if the tab names should be shown, {@code false} otherwise.
@since 2.4.0 | [
"Sets",
"whether",
"or",
"not",
"the",
"tab",
"names",
"should",
"be",
"shown",
"."
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/view/TabbedPanel2.java#L560-L565 |
129,273 | zaproxy/zaproxy | src/org/zaproxy/zap/utils/ZapTextComponentUndoManager.java | ZapTextComponentUndoManager.setUndoManagerPolicy | public final void setUndoManagerPolicy(UndoManagerPolicy policy) throws NullPointerException {
if (policy == null) {
throw new NullPointerException("The policy must not be null.");
}
if (this.policy == policy) {
return;
}
final UndoManagerPolicy oldPolicy = this.policy;
this.policy = policy;
... | java | public final void setUndoManagerPolicy(UndoManagerPolicy policy) throws NullPointerException {
if (policy == null) {
throw new NullPointerException("The policy must not be null.");
}
if (this.policy == policy) {
return;
}
final UndoManagerPolicy oldPolicy = this.policy;
this.policy = policy;
... | [
"public",
"final",
"void",
"setUndoManagerPolicy",
"(",
"UndoManagerPolicy",
"policy",
")",
"throws",
"NullPointerException",
"{",
"if",
"(",
"policy",
"==",
"null",
")",
"{",
"throw",
"new",
"NullPointerException",
"(",
"\"The policy must not be null.\"",
")",
";",
... | Sets the new policy.
@param policy
the new policy
@throws NullPointerException
if policy is {@code null}
@see UndoManagerPolicy | [
"Sets",
"the",
"new",
"policy",
"."
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/utils/ZapTextComponentUndoManager.java#L156-L179 |
129,274 | zaproxy/zaproxy | src/org/zaproxy/zap/extension/users/UsersTableModel.java | UsersTableModel.addUser | public void addUser(User user){
this.users.add(user);
this.fireTableRowsInserted(this.users.size()-1, this.users.size()-1);
} | java | public void addUser(User user){
this.users.add(user);
this.fireTableRowsInserted(this.users.size()-1, this.users.size()-1);
} | [
"public",
"void",
"addUser",
"(",
"User",
"user",
")",
"{",
"this",
".",
"users",
".",
"add",
"(",
"user",
")",
";",
"this",
".",
"fireTableRowsInserted",
"(",
"this",
".",
"users",
".",
"size",
"(",
")",
"-",
"1",
",",
"this",
".",
"users",
".",
... | Adds a new user to this model
@param user the user | [
"Adds",
"a",
"new",
"user",
"to",
"this",
"model"
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/extension/users/UsersTableModel.java#L130-L133 |
129,275 | zaproxy/zaproxy | src/org/zaproxy/zap/extension/httpsessions/OptionsHttpSessionsPanel.java | OptionsHttpSessionsPanel.getChkProxyOnly | private JCheckBox getChkProxyOnly() {
if (proxyOnlyCheckbox == null) {
proxyOnlyCheckbox = new JCheckBox();
proxyOnlyCheckbox.setText(Constant.messages.getString("httpsessions.options.label.proxyOnly"));
}
return proxyOnlyCheckbox;
} | java | private JCheckBox getChkProxyOnly() {
if (proxyOnlyCheckbox == null) {
proxyOnlyCheckbox = new JCheckBox();
proxyOnlyCheckbox.setText(Constant.messages.getString("httpsessions.options.label.proxyOnly"));
}
return proxyOnlyCheckbox;
} | [
"private",
"JCheckBox",
"getChkProxyOnly",
"(",
")",
"{",
"if",
"(",
"proxyOnlyCheckbox",
"==",
"null",
")",
"{",
"proxyOnlyCheckbox",
"=",
"new",
"JCheckBox",
"(",
")",
";",
"proxyOnlyCheckbox",
".",
"setText",
"(",
"Constant",
".",
"messages",
".",
"getStrin... | Gets the chk proxy only.
@return the chk proxy only | [
"Gets",
"the",
"chk",
"proxy",
"only",
"."
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/extension/httpsessions/OptionsHttpSessionsPanel.java#L126-L132 |
129,276 | zaproxy/zaproxy | src/org/zaproxy/zap/extension/spider/ExtensionSpider.java | ExtensionSpider.initialize | private void initialize() {
this.setOrder(EXTENSION_ORDER);
this.customParsers = new LinkedList<>();
this.customFetchFilters = new LinkedList<>();
this.customParseFilters = new LinkedList<>();
this.scanController = new SpiderScanController(this);
} | java | private void initialize() {
this.setOrder(EXTENSION_ORDER);
this.customParsers = new LinkedList<>();
this.customFetchFilters = new LinkedList<>();
this.customParseFilters = new LinkedList<>();
this.scanController = new SpiderScanController(this);
} | [
"private",
"void",
"initialize",
"(",
")",
"{",
"this",
".",
"setOrder",
"(",
"EXTENSION_ORDER",
")",
";",
"this",
".",
"customParsers",
"=",
"new",
"LinkedList",
"<>",
"(",
")",
";",
"this",
".",
"customFetchFilters",
"=",
"new",
"LinkedList",
"<>",
"(",
... | This method initializes this extension. | [
"This",
"method",
"initializes",
"this",
"extension",
"."
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/extension/spider/ExtensionSpider.java#L125-L131 |
129,277 | zaproxy/zaproxy | src/org/zaproxy/zap/extension/spider/ExtensionSpider.java | ExtensionSpider.startScanNode | public void startScanNode(SiteNode node) {
Target target = new Target(node);
target.setRecurse(true);
this.startScan(target, null, null);
} | java | public void startScanNode(SiteNode node) {
Target target = new Target(node);
target.setRecurse(true);
this.startScan(target, null, null);
} | [
"public",
"void",
"startScanNode",
"(",
"SiteNode",
"node",
")",
"{",
"Target",
"target",
"=",
"new",
"Target",
"(",
"node",
")",
";",
"target",
".",
"setRecurse",
"(",
"true",
")",
";",
"this",
".",
"startScan",
"(",
"target",
",",
"null",
",",
"null"... | Start scan node.
@param node the node | [
"Start",
"scan",
"node",
"."
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/extension/spider/ExtensionSpider.java#L352-L356 |
129,278 | zaproxy/zaproxy | src/org/zaproxy/zap/extension/spider/ExtensionSpider.java | ExtensionSpider.startScanAllInScope | public void startScanAllInScope() {
Target target = new Target(true);
target.setRecurse(true);
this.startScan(target, null, null);
} | java | public void startScanAllInScope() {
Target target = new Target(true);
target.setRecurse(true);
this.startScan(target, null, null);
} | [
"public",
"void",
"startScanAllInScope",
"(",
")",
"{",
"Target",
"target",
"=",
"new",
"Target",
"(",
"true",
")",
";",
"target",
".",
"setRecurse",
"(",
"true",
")",
";",
"this",
".",
"startScan",
"(",
"target",
",",
"null",
",",
"null",
")",
";",
... | Start scan all in scope. | [
"Start",
"scan",
"all",
"in",
"scope",
"."
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/extension/spider/ExtensionSpider.java#L372-L376 |
129,279 | zaproxy/zaproxy | src/org/zaproxy/zap/extension/spider/ExtensionSpider.java | ExtensionSpider.startScan | public void startScan(SiteNode startNode) {
Target target = new Target(startNode);
target.setRecurse(true);
this.startScan(target, null, null);
} | java | public void startScan(SiteNode startNode) {
Target target = new Target(startNode);
target.setRecurse(true);
this.startScan(target, null, null);
} | [
"public",
"void",
"startScan",
"(",
"SiteNode",
"startNode",
")",
"{",
"Target",
"target",
"=",
"new",
"Target",
"(",
"startNode",
")",
";",
"target",
".",
"setRecurse",
"(",
"true",
")",
";",
"this",
".",
"startScan",
"(",
"target",
",",
"null",
",",
... | Start scan.
@param startNode the start node | [
"Start",
"scan",
"."
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/extension/spider/ExtensionSpider.java#L383-L387 |
129,280 | zaproxy/zaproxy | src/org/zaproxy/zap/extension/spider/ExtensionSpider.java | ExtensionSpider.startScanAllInContext | public void startScanAllInContext(Context context, User user) {
Target target = new Target(context);
target.setRecurse(true);
this.startScan(target, user, null);
} | java | public void startScanAllInContext(Context context, User user) {
Target target = new Target(context);
target.setRecurse(true);
this.startScan(target, user, null);
} | [
"public",
"void",
"startScanAllInContext",
"(",
"Context",
"context",
",",
"User",
"user",
")",
"{",
"Target",
"target",
"=",
"new",
"Target",
"(",
"context",
")",
";",
"target",
".",
"setRecurse",
"(",
"true",
")",
";",
"this",
".",
"startScan",
"(",
"t... | Start scan all in context, from the POV of an User. | [
"Start",
"scan",
"all",
"in",
"context",
"from",
"the",
"POV",
"of",
"an",
"User",
"."
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/extension/spider/ExtensionSpider.java#L392-L396 |
129,281 | zaproxy/zaproxy | src/org/zaproxy/zap/extension/spider/ExtensionSpider.java | ExtensionSpider.createDisplayName | private String createDisplayName(Target target, Object[] customConfigurations) {
HttpPrefixFetchFilter subtreeFecthFilter = getUriPrefixFecthFilter(customConfigurations);
if (subtreeFecthFilter != null) {
return abbreviateDisplayName(subtreeFecthFilter.getNormalisedPrefix());
}
if (target.getContext() != nu... | java | private String createDisplayName(Target target, Object[] customConfigurations) {
HttpPrefixFetchFilter subtreeFecthFilter = getUriPrefixFecthFilter(customConfigurations);
if (subtreeFecthFilter != null) {
return abbreviateDisplayName(subtreeFecthFilter.getNormalisedPrefix());
}
if (target.getContext() != nu... | [
"private",
"String",
"createDisplayName",
"(",
"Target",
"target",
",",
"Object",
"[",
"]",
"customConfigurations",
")",
"{",
"HttpPrefixFetchFilter",
"subtreeFecthFilter",
"=",
"getUriPrefixFecthFilter",
"(",
"customConfigurations",
")",
";",
"if",
"(",
"subtreeFecthFi... | Creates the display name for the given target and, optionally, the given custom configurations.
@param target the target that will be spidered
@param customConfigurations other custom configurations for the spider, might be {@code null}
@return a {@code String} containing the display name, never {@code null} | [
"Creates",
"the",
"display",
"name",
"for",
"the",
"given",
"target",
"and",
"optionally",
"the",
"given",
"custom",
"configurations",
"."
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/extension/spider/ExtensionSpider.java#L558-L579 |
129,282 | zaproxy/zaproxy | src/org/zaproxy/zap/extension/spider/ExtensionSpider.java | ExtensionSpider.showSpiderDialog | public void showSpiderDialog(Target target) {
if (spiderDialog == null) {
spiderDialog = new SpiderDialog(this, View.getSingleton().getMainFrame(), new Dimension(700, 430));
}
if (spiderDialog.isVisible()) {
// Its behind you! Actually not needed no the window is alwaysOnTop, but keeping in case we change t... | java | public void showSpiderDialog(Target target) {
if (spiderDialog == null) {
spiderDialog = new SpiderDialog(this, View.getSingleton().getMainFrame(), new Dimension(700, 430));
}
if (spiderDialog.isVisible()) {
// Its behind you! Actually not needed no the window is alwaysOnTop, but keeping in case we change t... | [
"public",
"void",
"showSpiderDialog",
"(",
"Target",
"target",
")",
"{",
"if",
"(",
"spiderDialog",
"==",
"null",
")",
"{",
"spiderDialog",
"=",
"new",
"SpiderDialog",
"(",
"this",
",",
"View",
".",
"getSingleton",
"(",
")",
".",
"getMainFrame",
"(",
")",
... | Shows the spider dialogue with the given target, if not already visible.
@param target the target, might be {@code null}.
@since TODO add version. | [
"Shows",
"the",
"spider",
"dialogue",
"with",
"the",
"given",
"target",
"if",
"not",
"already",
"visible",
"."
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/extension/spider/ExtensionSpider.java#L837-L853 |
129,283 | zaproxy/zaproxy | src/org/parosproxy/paros/extension/filter/AllFilterPanel.java | AllFilterPanel.getTableFilter | private JTable getTableFilter() {
if (tableFilter == null) {
tableFilter = new JTable();
tableFilter.setRowHeight(DisplayUtils.getScaledSize(18));
tableFilter.setIntercellSpacing(new java.awt.Dimension(1,1));
tableFilter.setModel(getAllFilterTableModel());
for (int i = 0; i < width... | java | private JTable getTableFilter() {
if (tableFilter == null) {
tableFilter = new JTable();
tableFilter.setRowHeight(DisplayUtils.getScaledSize(18));
tableFilter.setIntercellSpacing(new java.awt.Dimension(1,1));
tableFilter.setModel(getAllFilterTableModel());
for (int i = 0; i < width... | [
"private",
"JTable",
"getTableFilter",
"(",
")",
"{",
"if",
"(",
"tableFilter",
"==",
"null",
")",
"{",
"tableFilter",
"=",
"new",
"JTable",
"(",
")",
";",
"tableFilter",
".",
"setRowHeight",
"(",
"DisplayUtils",
".",
"getScaledSize",
"(",
"18",
")",
")",
... | This method initializes tableFilter
@return javax.swing.JTable | [
"This",
"method",
"initializes",
"tableFilter"
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/parosproxy/paros/extension/filter/AllFilterPanel.java#L113-L128 |
129,284 | zaproxy/zaproxy | src/org/parosproxy/paros/extension/filter/AllFilterPanel.java | AllFilterPanel.getBtnEnableAll | private JButton getBtnEnableAll() {
if (btnEnableAll == null) {
btnEnableAll = new JButton();
btnEnableAll.setText(Constant.messages.getString("filter.button.enableall"));
btnEnableAll.setEnabled(false);
btnEnableAll.addActionListener(new java.awt.event.ActionListener() {
@Override
publi... | java | private JButton getBtnEnableAll() {
if (btnEnableAll == null) {
btnEnableAll = new JButton();
btnEnableAll.setText(Constant.messages.getString("filter.button.enableall"));
btnEnableAll.setEnabled(false);
btnEnableAll.addActionListener(new java.awt.event.ActionListener() {
@Override
publi... | [
"private",
"JButton",
"getBtnEnableAll",
"(",
")",
"{",
"if",
"(",
"btnEnableAll",
"==",
"null",
")",
"{",
"btnEnableAll",
"=",
"new",
"JButton",
"(",
")",
";",
"btnEnableAll",
".",
"setText",
"(",
"Constant",
".",
"messages",
".",
"getString",
"(",
"\"fil... | This method initializes btnEnableAll
@return javax.swing.JButton | [
"This",
"method",
"initializes",
"btnEnableAll"
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/parosproxy/paros/extension/filter/AllFilterPanel.java#L158-L174 |
129,285 | zaproxy/zaproxy | src/org/parosproxy/paros/extension/filter/AllFilterPanel.java | AllFilterPanel.getBtnDisableAll | private JButton getBtnDisableAll() {
if (btnDisableAll == null) {
btnDisableAll = new JButton();
btnDisableAll.setText(Constant.messages.getString("filter.button.disableall"));
btnDisableAll.setEnabled(false);
btnDisableAll.addActionListener(new java.awt.event.ActionListener() {
@Override
... | java | private JButton getBtnDisableAll() {
if (btnDisableAll == null) {
btnDisableAll = new JButton();
btnDisableAll.setText(Constant.messages.getString("filter.button.disableall"));
btnDisableAll.setEnabled(false);
btnDisableAll.addActionListener(new java.awt.event.ActionListener() {
@Override
... | [
"private",
"JButton",
"getBtnDisableAll",
"(",
")",
"{",
"if",
"(",
"btnDisableAll",
"==",
"null",
")",
"{",
"btnDisableAll",
"=",
"new",
"JButton",
"(",
")",
";",
"btnDisableAll",
".",
"setText",
"(",
"Constant",
".",
"messages",
".",
"getString",
"(",
"\... | This method initializes btnDisableAll
@return javax.swing.JButton | [
"This",
"method",
"initializes",
"btnDisableAll"
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/parosproxy/paros/extension/filter/AllFilterPanel.java#L180-L196 |
129,286 | zaproxy/zaproxy | src/org/zaproxy/zap/extension/ascan/PolicyDialog.java | PolicyDialog.addPolicyPanel | public void addPolicyPanel(AbstractParamPanel panel) {
this.additionalPanels.add(panel);
addParamPanel(ROOT, panel.getName(), panel, true);
} | java | public void addPolicyPanel(AbstractParamPanel panel) {
this.additionalPanels.add(panel);
addParamPanel(ROOT, panel.getName(), panel, true);
} | [
"public",
"void",
"addPolicyPanel",
"(",
"AbstractParamPanel",
"panel",
")",
"{",
"this",
".",
"additionalPanels",
".",
"add",
"(",
"panel",
")",
";",
"addParamPanel",
"(",
"ROOT",
",",
"panel",
".",
"getName",
"(",
")",
",",
"panel",
",",
"true",
")",
"... | Adds the given panel, positioned under the root node and in alphabetic order.
@param panel the panel to add, must not be {@code null}. | [
"Adds",
"the",
"given",
"panel",
"positioned",
"under",
"the",
"root",
"node",
"and",
"in",
"alphabetic",
"order",
"."
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/extension/ascan/PolicyDialog.java#L74-L77 |
129,287 | zaproxy/zaproxy | src/org/zaproxy/zap/extension/ascan/PolicyDialog.java | PolicyDialog.getPolicyAllCategoryPanel | public PolicyAllCategoryPanel getPolicyAllCategoryPanel() {
if (policyAllCategoryPanel == null) {
policyAllCategoryPanel = new PolicyAllCategoryPanel(this.pmd, extension, policy);
policyAllCategoryPanel.setName(Constant.messages.getString("ascan.policy.title"));
}
... | java | public PolicyAllCategoryPanel getPolicyAllCategoryPanel() {
if (policyAllCategoryPanel == null) {
policyAllCategoryPanel = new PolicyAllCategoryPanel(this.pmd, extension, policy);
policyAllCategoryPanel.setName(Constant.messages.getString("ascan.policy.title"));
}
... | [
"public",
"PolicyAllCategoryPanel",
"getPolicyAllCategoryPanel",
"(",
")",
"{",
"if",
"(",
"policyAllCategoryPanel",
"==",
"null",
")",
"{",
"policyAllCategoryPanel",
"=",
"new",
"PolicyAllCategoryPanel",
"(",
"this",
".",
"pmd",
",",
"extension",
",",
"policy",
")"... | This method initializes policyAllCategoryPanel
@return org.parosproxy.paros.extension.scanner.PolicyAllCategoryPanel | [
"This",
"method",
"initializes",
"policyAllCategoryPanel"
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/extension/ascan/PolicyDialog.java#L84-L91 |
129,288 | zaproxy/zaproxy | src/org/zaproxy/zap/network/ZapNTLMEngineImpl.java | ZapNTLMEngineImpl.makeRandomChallenge | private static byte[] makeRandomChallenge(final Random random) throws AuthenticationException {
final byte[] rval = new byte[8];
synchronized (random) {
random.nextBytes(rval);
}
return rval;
} | java | private static byte[] makeRandomChallenge(final Random random) throws AuthenticationException {
final byte[] rval = new byte[8];
synchronized (random) {
random.nextBytes(rval);
}
return rval;
} | [
"private",
"static",
"byte",
"[",
"]",
"makeRandomChallenge",
"(",
"final",
"Random",
"random",
")",
"throws",
"AuthenticationException",
"{",
"final",
"byte",
"[",
"]",
"rval",
"=",
"new",
"byte",
"[",
"8",
"]",
";",
"synchronized",
"(",
"random",
")",
"{... | Calculate a challenge block | [
"Calculate",
"a",
"challenge",
"block"
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/network/ZapNTLMEngineImpl.java#L256-L262 |
129,289 | zaproxy/zaproxy | src/org/zaproxy/zap/network/ZapNTLMEngineImpl.java | ZapNTLMEngineImpl.makeSecondaryKey | private static byte[] makeSecondaryKey(final Random random) throws AuthenticationException {
final byte[] rval = new byte[16];
synchronized (random) {
random.nextBytes(rval);
}
return rval;
} | java | private static byte[] makeSecondaryKey(final Random random) throws AuthenticationException {
final byte[] rval = new byte[16];
synchronized (random) {
random.nextBytes(rval);
}
return rval;
} | [
"private",
"static",
"byte",
"[",
"]",
"makeSecondaryKey",
"(",
"final",
"Random",
"random",
")",
"throws",
"AuthenticationException",
"{",
"final",
"byte",
"[",
"]",
"rval",
"=",
"new",
"byte",
"[",
"16",
"]",
";",
"synchronized",
"(",
"random",
")",
"{",... | Calculate a 16-byte secondary key | [
"Calculate",
"a",
"16",
"-",
"byte",
"secondary",
"key"
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/network/ZapNTLMEngineImpl.java#L265-L271 |
129,290 | zaproxy/zaproxy | src/org/zaproxy/zap/network/ZapNTLMEngineImpl.java | ZapNTLMEngineImpl.hmacMD5 | static byte[] hmacMD5(final byte[] value, final byte[] key)
throws AuthenticationException {
final HMACMD5 hmacMD5 = new HMACMD5(key);
hmacMD5.update(value);
return hmacMD5.getOutput();
} | java | static byte[] hmacMD5(final byte[] value, final byte[] key)
throws AuthenticationException {
final HMACMD5 hmacMD5 = new HMACMD5(key);
hmacMD5.update(value);
return hmacMD5.getOutput();
} | [
"static",
"byte",
"[",
"]",
"hmacMD5",
"(",
"final",
"byte",
"[",
"]",
"value",
",",
"final",
"byte",
"[",
"]",
"key",
")",
"throws",
"AuthenticationException",
"{",
"final",
"HMACMD5",
"hmacMD5",
"=",
"new",
"HMACMD5",
"(",
"key",
")",
";",
"hmacMD5",
... | Calculates HMAC-MD5 | [
"Calculates",
"HMAC",
"-",
"MD5"
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/network/ZapNTLMEngineImpl.java#L582-L587 |
129,291 | zaproxy/zaproxy | src/org/zaproxy/zap/network/ZapNTLMEngineImpl.java | ZapNTLMEngineImpl.ntlm2SessionResponse | static byte[] ntlm2SessionResponse(final byte[] ntlmHash, final byte[] challenge,
final byte[] clientChallenge) throws AuthenticationException {
try {
final MessageDigest md5 = getMD5();
md5.update(challenge);
md5.update(clientChallenge);
final byte[] ... | java | static byte[] ntlm2SessionResponse(final byte[] ntlmHash, final byte[] challenge,
final byte[] clientChallenge) throws AuthenticationException {
try {
final MessageDigest md5 = getMD5();
md5.update(challenge);
md5.update(clientChallenge);
final byte[] ... | [
"static",
"byte",
"[",
"]",
"ntlm2SessionResponse",
"(",
"final",
"byte",
"[",
"]",
"ntlmHash",
",",
"final",
"byte",
"[",
"]",
"challenge",
",",
"final",
"byte",
"[",
"]",
"clientChallenge",
")",
"throws",
"AuthenticationException",
"{",
"try",
"{",
"final"... | Calculates the NTLM2 Session Response for the given challenge, using the
specified password and client challenge.
@return The NTLM2 Session Response. This is placed in the NTLM response
field of the Type 3 message; the LM response field contains the
client challenge, null-padded to 24 bytes. | [
"Calculates",
"the",
"NTLM2",
"Session",
"Response",
"for",
"the",
"given",
"challenge",
"using",
"the",
"specified",
"password",
"and",
"client",
"challenge",
"."
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/network/ZapNTLMEngineImpl.java#L609-L626 |
129,292 | zaproxy/zaproxy | src/org/zaproxy/zap/network/ZapNTLMEngineImpl.java | ZapNTLMEngineImpl.lmResponse | private static byte[] lmResponse(final byte[] hash, final byte[] challenge) throws AuthenticationException {
try {
final byte[] keyBytes = new byte[21];
System.arraycopy(hash, 0, keyBytes, 0, 16);
final Key lowKey = createDESKey(keyBytes, 0);
final Key middleKey =... | java | private static byte[] lmResponse(final byte[] hash, final byte[] challenge) throws AuthenticationException {
try {
final byte[] keyBytes = new byte[21];
System.arraycopy(hash, 0, keyBytes, 0, 16);
final Key lowKey = createDESKey(keyBytes, 0);
final Key middleKey =... | [
"private",
"static",
"byte",
"[",
"]",
"lmResponse",
"(",
"final",
"byte",
"[",
"]",
"hash",
",",
"final",
"byte",
"[",
"]",
"challenge",
")",
"throws",
"AuthenticationException",
"{",
"try",
"{",
"final",
"byte",
"[",
"]",
"keyBytes",
"=",
"new",
"byte"... | Creates the LM Response from the given hash and Type 2 challenge.
@param hash
The LM or NTLM Hash.
@param challenge
The server challenge from the Type 2 message.
@return The response (either LM or NTLM, depending on the provided hash). | [
"Creates",
"the",
"LM",
"Response",
"from",
"the",
"given",
"hash",
"and",
"Type",
"2",
"challenge",
"."
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/network/ZapNTLMEngineImpl.java#L729-L751 |
129,293 | zaproxy/zaproxy | src/org/zaproxy/zap/network/ZapNTLMEngineImpl.java | ZapNTLMEngineImpl.createBlob | private static byte[] createBlob(final byte[] clientChallenge, final byte[] targetInformation, final byte[] timestamp) {
final byte[] blobSignature = new byte[] { (byte) 0x01, (byte) 0x01, (byte) 0x00, (byte) 0x00 };
final byte[] reserved = new byte[] { (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00... | java | private static byte[] createBlob(final byte[] clientChallenge, final byte[] targetInformation, final byte[] timestamp) {
final byte[] blobSignature = new byte[] { (byte) 0x01, (byte) 0x01, (byte) 0x00, (byte) 0x00 };
final byte[] reserved = new byte[] { (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00... | [
"private",
"static",
"byte",
"[",
"]",
"createBlob",
"(",
"final",
"byte",
"[",
"]",
"clientChallenge",
",",
"final",
"byte",
"[",
"]",
"targetInformation",
",",
"final",
"byte",
"[",
"]",
"timestamp",
")",
"{",
"final",
"byte",
"[",
"]",
"blobSignature",
... | Creates the NTLMv2 blob from the given target information block and
client challenge.
@param targetInformation
The target information block from the Type 2 message.
@param clientChallenge
The random 8-byte client challenge.
@return The blob, used in the calculation of the NTLMv2 Response. | [
"Creates",
"the",
"NTLMv2",
"blob",
"from",
"the",
"given",
"target",
"information",
"block",
"and",
"client",
"challenge",
"."
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/network/ZapNTLMEngineImpl.java#L975-L998 |
129,294 | zaproxy/zaproxy | src/org/zaproxy/zap/network/ZapNTLMEngineImpl.java | ZapNTLMEngineImpl.createDESKey | private static Key createDESKey(final byte[] bytes, final int offset) {
final byte[] keyBytes = new byte[7];
System.arraycopy(bytes, offset, keyBytes, 0, 7);
final byte[] material = new byte[8];
material[0] = keyBytes[0];
material[1] = (byte) (keyBytes[0] << 7 | (keyBytes[1] & 0x... | java | private static Key createDESKey(final byte[] bytes, final int offset) {
final byte[] keyBytes = new byte[7];
System.arraycopy(bytes, offset, keyBytes, 0, 7);
final byte[] material = new byte[8];
material[0] = keyBytes[0];
material[1] = (byte) (keyBytes[0] << 7 | (keyBytes[1] & 0x... | [
"private",
"static",
"Key",
"createDESKey",
"(",
"final",
"byte",
"[",
"]",
"bytes",
",",
"final",
"int",
"offset",
")",
"{",
"final",
"byte",
"[",
"]",
"keyBytes",
"=",
"new",
"byte",
"[",
"7",
"]",
";",
"System",
".",
"arraycopy",
"(",
"bytes",
","... | Creates a DES encryption key from the given key material.
@param bytes
A byte array containing the DES key material.
@param offset
The offset in the given byte array at which the 7-byte key
material starts.
@return A DES encryption key created from the key material starting at
the specified offset in the given byte a... | [
"Creates",
"a",
"DES",
"encryption",
"key",
"from",
"the",
"given",
"key",
"material",
"."
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/network/ZapNTLMEngineImpl.java#L1012-L1026 |
129,295 | zaproxy/zaproxy | src/org/zaproxy/zap/network/ZapNTLMEngineImpl.java | ZapNTLMEngineImpl.getCharset | private static Charset getCharset(final int flags) throws AuthenticationException
{
if ((flags & FLAG_REQUEST_UNICODE_ENCODING) == 0) {
return DEFAULT_CHARSET;
} else {
if (UNICODE_LITTLE_UNMARKED == null) {
throw new AuthenticationException( "Unicode not supp... | java | private static Charset getCharset(final int flags) throws AuthenticationException
{
if ((flags & FLAG_REQUEST_UNICODE_ENCODING) == 0) {
return DEFAULT_CHARSET;
} else {
if (UNICODE_LITTLE_UNMARKED == null) {
throw new AuthenticationException( "Unicode not supp... | [
"private",
"static",
"Charset",
"getCharset",
"(",
"final",
"int",
"flags",
")",
"throws",
"AuthenticationException",
"{",
"if",
"(",
"(",
"flags",
"&",
"FLAG_REQUEST_UNICODE_ENCODING",
")",
"==",
"0",
")",
"{",
"return",
"DEFAULT_CHARSET",
";",
"}",
"else",
"... | Find the character set based on the flags.
@param flags is the flags.
@return the character set. | [
"Find",
"the",
"character",
"set",
"based",
"on",
"the",
"flags",
"."
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/network/ZapNTLMEngineImpl.java#L1052-L1062 |
129,296 | zaproxy/zaproxy | src/org/zaproxy/zap/network/ZapNTLMEngineImpl.java | ZapNTLMEngineImpl.stripDotSuffix | private static String stripDotSuffix(final String value) {
if (value == null) {
return null;
}
final int index = value.indexOf(".");
if (index != -1) {
return value.substring(0, index);
}
return value;
} | java | private static String stripDotSuffix(final String value) {
if (value == null) {
return null;
}
final int index = value.indexOf(".");
if (index != -1) {
return value.substring(0, index);
}
return value;
} | [
"private",
"static",
"String",
"stripDotSuffix",
"(",
"final",
"String",
"value",
")",
"{",
"if",
"(",
"value",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"final",
"int",
"index",
"=",
"value",
".",
"indexOf",
"(",
"\".\"",
")",
";",
"if",
"... | Strip dot suffix from a name | [
"Strip",
"dot",
"suffix",
"from",
"a",
"name"
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/network/ZapNTLMEngineImpl.java#L1065-L1074 |
129,297 | zaproxy/zaproxy | src/org/zaproxy/zap/utils/FontUtils.java | FontUtils.getFont | public static Font getFont (String name, int style) {
return new Font(name, style, getDefaultFont().getSize());
} | java | public static Font getFont (String name, int style) {
return new Font(name, style, getDefaultFont().getSize());
} | [
"public",
"static",
"Font",
"getFont",
"(",
"String",
"name",
",",
"int",
"style",
")",
"{",
"return",
"new",
"Font",
"(",
"name",
",",
"style",
",",
"getDefaultFont",
"(",
")",
".",
"getSize",
"(",
")",
")",
";",
"}"
] | Gets the named font with the specified style, correctly scaled
@param name
@param style
@return the named font with the specified style, correctly scaled | [
"Gets",
"the",
"named",
"font",
"with",
"the",
"specified",
"style",
"correctly",
"scaled"
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/utils/FontUtils.java#L169-L171 |
129,298 | zaproxy/zaproxy | src/org/zaproxy/zap/utils/FontUtils.java | FontUtils.getFont | public static Font getFont (int style, Size size) {
return getFont(getDefaultFont(), size).deriveFont(style);
} | java | public static Font getFont (int style, Size size) {
return getFont(getDefaultFont(), size).deriveFont(style);
} | [
"public",
"static",
"Font",
"getFont",
"(",
"int",
"style",
",",
"Size",
"size",
")",
"{",
"return",
"getFont",
"(",
"getDefaultFont",
"(",
")",
",",
"size",
")",
".",
"deriveFont",
"(",
"style",
")",
";",
"}"
] | Gets the default font with the specified style and size, correctly scaled
@param style
@param size
@return | [
"Gets",
"the",
"default",
"font",
"with",
"the",
"specified",
"style",
"and",
"size",
"correctly",
"scaled"
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/utils/FontUtils.java#L179-L181 |
129,299 | zaproxy/zaproxy | src/org/zaproxy/zap/utils/FontUtils.java | FontUtils.getFont | public static Font getFont (Font font, int style, Size size) {
return getFont(font, size).deriveFont(style);
} | java | public static Font getFont (Font font, int style, Size size) {
return getFont(font, size).deriveFont(style);
} | [
"public",
"static",
"Font",
"getFont",
"(",
"Font",
"font",
",",
"int",
"style",
",",
"Size",
"size",
")",
"{",
"return",
"getFont",
"(",
"font",
",",
"size",
")",
".",
"deriveFont",
"(",
"style",
")",
";",
"}"
] | Gets the specified font with the specified style and size, correctly scaled
@param style
@param size
@since 2.7.0
@return | [
"Gets",
"the",
"specified",
"font",
"with",
"the",
"specified",
"style",
"and",
"size",
"correctly",
"scaled"
] | 0cbe5121f2ae1ecca222513d182759210c569bec | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/utils/FontUtils.java#L190-L192 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.