hexsha
stringlengths
40
40
repo
stringlengths
6
126
path
stringlengths
6
1.02k
license
sequence
language
stringclasses
1 value
identifier
stringlengths
1
220
return_type
stringlengths
1
110
original_string
stringlengths
39
223k
original_docstring
stringlengths
16
34.8k
docstring
stringlengths
11
3.41k
docstring_tokens
sequence
code
stringlengths
26
223k
code_tokens
sequence
short_docstring
stringlengths
0
3.02k
short_docstring_tokens
sequence
comment
sequence
parameters
list
docstring_params
dict
input_ids
sequence
attention_mask
sequence
labels
sequence
3e9dbf83ddcbb2b8b167a02b5930c4ce8e47f6d7
jakeswenson/envelop
java/app-encryption/src/main/java/com/godaddy/asherah/crypto/NonceGenerator.java
[ "MIT" ]
Java
createNonce
null
public byte[] createNonce(final int bits) { if (bits % Byte.SIZE != 0) { throw new IllegalArgumentException("Bits parameter must be multiple of 8"); } byte[] keyBytes = new byte[bits / Byte.SIZE]; secureRandom.nextBytes(keyBytes); return keyBytes; }
/** * Generates a nonce. * @param bits Number of bits to use for nonce generation. * @return An array of nonce bytes. */
Generates a nonce. @param bits Number of bits to use for nonce generation. @return An array of nonce bytes.
[ "Generates", "a", "nonce", ".", "@param", "bits", "Number", "of", "bits", "to", "use", "for", "nonce", "generation", ".", "@return", "An", "array", "of", "nonce", "bytes", "." ]
public byte[] createNonce(final int bits) { if (bits % Byte.SIZE != 0) { throw new IllegalArgumentException("Bits parameter must be multiple of 8"); } byte[] keyBytes = new byte[bits / Byte.SIZE]; secureRandom.nextBytes(keyBytes); return keyBytes; }
[ "public", "byte", "[", "]", "createNonce", "(", "final", "int", "bits", ")", "{", "if", "(", "bits", "%", "Byte", ".", "SIZE", "!=", "0", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Bits parameter must be multiple of 8\"", ")", ";", "}", "byte", "[", "]", "keyBytes", "=", "new", "byte", "[", "bits", "/", "Byte", ".", "SIZE", "]", ";", "secureRandom", ".", "nextBytes", "(", "keyBytes", ")", ";", "return", "keyBytes", ";", "}" ]
Generates a nonce.
[ "Generates", "a", "nonce", "." ]
[]
[ { "param": "bits", "type": "int" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "bits", "type": "int", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 1160, 8526, 752, 13611, 12, 6385, 509, 4125, 13, 288, 203, 565, 309, 261, 6789, 738, 3506, 18, 4574, 480, 374, 13, 288, 203, 1377, 604, 394, 2754, 2932, 6495, 1569, 1297, 506, 3229, 434, 1725, 8863, 203, 565, 289, 203, 203, 565, 1160, 8526, 27896, 273, 394, 1160, 63, 6789, 342, 3506, 18, 4574, 15533, 203, 565, 8177, 8529, 18, 4285, 2160, 12, 856, 2160, 1769, 203, 565, 327, 27896, 31, 203, 225, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 282, 380, 31902, 279, 7448, 18, 203, 282, 380, 632, 891, 4125, 3588, 434, 4125, 358, 999, 364, 7448, 9377, 18, 203, 282, 380, 632, 2463, 1922, 526, 434, 7448, 1731, 18, 203, 282, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
fa29cb97ba72216df7845f054aa713bbb52eb2e0
jakeswenson/envelop
java/app-encryption/src/main/java/com/godaddy/asherah/appencryption/envelope/EnvelopeKeyRecord.java
[ "MIT" ]
Java
toJson
JSONObject
public JSONObject toJson() { Json json = new Json(); json.put("Created", created); parentKeyMeta.ifPresent(keyMeta -> json.put("ParentKeyMeta", keyMeta.toJson())); json.put("Key", encryptedKey); revoked.ifPresent(value -> json.put("Revoked", value)); return json.toJsonObject(); }
/** * Converts The {@code EnvelopeKeyRecord} to a {@link org.json.JSONObject} with below format. * <pre> * { * "Created": Creation time of the encrypted key, * "ParentKeyMeta" : Parent key meta of the encrypted key(if present), * "Key": Encrypted key, * "Revoked": True/False * } * </pre> * * @return The {@code EnvelopeKeyRecord} converted to a {@link org.json.JSONObject} object. */
Converts The EnvelopeKeyRecord to a org.json.JSONObject with below format. @return The EnvelopeKeyRecord converted to a org.json.JSONObject object.
[ "Converts", "The", "EnvelopeKeyRecord", "to", "a", "org", ".", "json", ".", "JSONObject", "with", "below", "format", ".", "@return", "The", "EnvelopeKeyRecord", "converted", "to", "a", "org", ".", "json", ".", "JSONObject", "object", "." ]
public JSONObject toJson() { Json json = new Json(); json.put("Created", created); parentKeyMeta.ifPresent(keyMeta -> json.put("ParentKeyMeta", keyMeta.toJson())); json.put("Key", encryptedKey); revoked.ifPresent(value -> json.put("Revoked", value)); return json.toJsonObject(); }
[ "public", "JSONObject", "toJson", "(", ")", "{", "Json", "json", "=", "new", "Json", "(", ")", ";", "json", ".", "put", "(", "\"Created\"", ",", "created", ")", ";", "parentKeyMeta", ".", "ifPresent", "(", "keyMeta", "->", "json", ".", "put", "(", "\"ParentKeyMeta\"", ",", "keyMeta", ".", "toJson", "(", ")", ")", ")", ";", "json", ".", "put", "(", "\"Key\"", ",", "encryptedKey", ")", ";", "revoked", ".", "ifPresent", "(", "value", "->", "json", ".", "put", "(", "\"Revoked\"", ",", "value", ")", ")", ";", "return", "json", ".", "toJsonObject", "(", ")", ";", "}" ]
Converts The {@code EnvelopeKeyRecord} to a {@link org.json.JSONObject} with below format.
[ "Converts", "The", "{", "@code", "EnvelopeKeyRecord", "}", "to", "a", "{", "@link", "org", ".", "json", ".", "JSONObject", "}", "with", "below", "format", "." ]
[]
[]
{ "returns": [], "raises": [], "params": [], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 8014, 15241, 1435, 288, 203, 565, 3424, 1163, 273, 394, 3424, 5621, 203, 565, 1163, 18, 458, 2932, 6119, 3113, 2522, 1769, 203, 565, 26993, 2781, 18, 430, 6351, 12, 856, 2781, 317, 1163, 18, 458, 2932, 3054, 653, 2781, 3113, 498, 2781, 18, 869, 3185, 1435, 10019, 203, 565, 1163, 18, 458, 2932, 653, 3113, 6901, 653, 1769, 203, 565, 22919, 18, 430, 6351, 12, 1132, 317, 1163, 18, 458, 2932, 10070, 14276, 3113, 460, 10019, 203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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 282, 380, 20377, 1021, 8901, 710, 16210, 653, 2115, 97, 358, 279, 8901, 1232, 2358, 18, 1977, 18, 2986, 921, 97, 598, 5712, 740, 18, 203, 282, 380, 411, 1484, 34, 203, 282, 380, 288, 203, 282, 380, 282, 315, 6119, 6877, 18199, 813, 434, 326, 6901, 498, 16, 203, 282, 380, 282, 315, 3054, 653, 2781, 6, 294, 9520, 498, 2191, 434, 326, 6901, 498, 12, 430, 3430, 3631, 203, 282, 380, 282, 315, 653, 6877, 22811, 498, 16, 203, 282, 380, 282, 315, 10070, 14276, 6877, 1053, 19, 8381, 203, 282, 380, 289, 203, 282, 380, 7765, 1484, 34, 203, 282, 380, 203, 282, 380, 632, 2463, 1021, 8901, 710, 16210, 653, 2115, 97, 5970, 358, 279, 8901, 1232, 2358, 18, 1977, 2 ]
ddb38ea029b0eb8b1e74856f90c1f192a4fe857d
jakeswenson/envelop
java/app-encryption/src/main/java/com/godaddy/asherah/appencryption/envelope/KeyMeta.java
[ "MIT" ]
Java
toJson
JSONObject
public JSONObject toJson() { Json json = new Json(); json.put("KeyId", keyId); json.put("Created", created); return json.toJsonObject(); }
/** * Converts the {@code KeyMeta} to a {@link org.json.JSONObject} with below format. * <pre> * { * "KeyId": "some_key_id", * "Created": 1534553054 * } * </pre> * * @return The {@code KeyMeta} converted to a {@link org.json.JSONObject} object. */
Converts the KeyMeta to a org.json.JSONObject with below format. @return The KeyMeta converted to a org.json.JSONObject object.
[ "Converts", "the", "KeyMeta", "to", "a", "org", ".", "json", ".", "JSONObject", "with", "below", "format", ".", "@return", "The", "KeyMeta", "converted", "to", "a", "org", ".", "json", ".", "JSONObject", "object", "." ]
public JSONObject toJson() { Json json = new Json(); json.put("KeyId", keyId); json.put("Created", created); return json.toJsonObject(); }
[ "public", "JSONObject", "toJson", "(", ")", "{", "Json", "json", "=", "new", "Json", "(", ")", ";", "json", ".", "put", "(", "\"KeyId\"", ",", "keyId", ")", ";", "json", ".", "put", "(", "\"Created\"", ",", "created", ")", ";", "return", "json", ".", "toJsonObject", "(", ")", ";", "}" ]
Converts the {@code KeyMeta} to a {@link org.json.JSONObject} with below format.
[ "Converts", "the", "{", "@code", "KeyMeta", "}", "to", "a", "{", "@link", "org", ".", "json", ".", "JSONObject", "}", "with", "below", "format", "." ]
[]
[]
{ "returns": [], "raises": [], "params": [], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 8014, 15241, 1435, 288, 203, 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873, 203, 282, 380, 20377, 326, 8901, 710, 1929, 2781, 97, 358, 279, 8901, 1232, 2358, 18, 1977, 18, 2986, 921, 97, 598, 5712, 740, 18, 203, 282, 380, 411, 1484, 34, 203, 282, 380, 288, 203, 282, 380, 282, 315, 14140, 6877, 315, 19068, 67, 856, 67, 350, 3113, 203, 282, 380, 282, 315, 6119, 6877, 4711, 5026, 2539, 5082, 6564, 203, 282, 380, 289, 203, 282, 380, 7765, 1484, 34, 203, 282, 380, 203, 282, 380, 632, 2463, 1021, 8901, 710, 1929, 2781, 97, 5970, 358, 279, 8901, 1232, 2358, 18, 1977, 18, 2986, 921, 97, 733, 18, 203, 282, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
22736641825015fdc04390c28e45edbf128ca494
jakeswenson/envelop
java/app-encryption/src/main/java/com/godaddy/asherah/crypto/AeadCrypto.java
[ "MIT" ]
Java
generateKeyFromBytes
CryptoKey
public CryptoKey generateKeyFromBytes(final byte[] sourceBytes, final Instant created, final boolean revoked) { byte[] clonedBytes = sourceBytes.clone(); Secret newKeySecret = getSecretFactory().createSecret(clonedBytes); return new SecretCryptoKey(newKeySecret, created, revoked); }
/** * Generates a {@link CryptoKey} using the provided source bytes, created time, and revoked flag. <b>NOTE</b>: * you MUST wipe out the source bytes after the completion of this call! * @param sourceBytes The bytes to use for generating {@link CryptoKey}. * @param created The time to associate the generated {@link CryptoKey} with. * @param revoked The flag to set while generating {@link CryptoKey}. * @return A {@link CryptoKey} generated from the {@code sourceBytes}. */
Generates a CryptoKey using the provided source bytes, created time, and revoked flag. NOTE: you MUST wipe out the source bytes after the completion of this call. @param sourceBytes The bytes to use for generating CryptoKey. @param created The time to associate the generated CryptoKey with. @param revoked The flag to set while generating CryptoKey. @return A CryptoKey generated from the sourceBytes.
[ "Generates", "a", "CryptoKey", "using", "the", "provided", "source", "bytes", "created", "time", "and", "revoked", "flag", ".", "NOTE", ":", "you", "MUST", "wipe", "out", "the", "source", "bytes", "after", "the", "completion", "of", "this", "call", ".", "@param", "sourceBytes", "The", "bytes", "to", "use", "for", "generating", "CryptoKey", ".", "@param", "created", "The", "time", "to", "associate", "the", "generated", "CryptoKey", "with", ".", "@param", "revoked", "The", "flag", "to", "set", "while", "generating", "CryptoKey", ".", "@return", "A", "CryptoKey", "generated", "from", "the", "sourceBytes", "." ]
public CryptoKey generateKeyFromBytes(final byte[] sourceBytes, final Instant created, final boolean revoked) { byte[] clonedBytes = sourceBytes.clone(); Secret newKeySecret = getSecretFactory().createSecret(clonedBytes); return new SecretCryptoKey(newKeySecret, created, revoked); }
[ "public", "CryptoKey", "generateKeyFromBytes", "(", "final", "byte", "[", "]", "sourceBytes", ",", "final", "Instant", "created", ",", "final", "boolean", "revoked", ")", "{", "byte", "[", "]", "clonedBytes", "=", "sourceBytes", ".", "clone", "(", ")", ";", "Secret", "newKeySecret", "=", "getSecretFactory", "(", ")", ".", "createSecret", "(", "clonedBytes", ")", ";", "return", "new", "SecretCryptoKey", "(", "newKeySecret", ",", "created", ",", "revoked", ")", ";", "}" ]
Generates a {@link CryptoKey} using the provided source bytes, created time, and revoked flag.
[ "Generates", "a", "{", "@link", "CryptoKey", "}", "using", "the", "provided", "source", "bytes", "created", "time", "and", "revoked", "flag", "." ]
[]
[ { "param": "sourceBytes", "type": "byte[]" }, { "param": "created", "type": "Instant" }, { "param": "revoked", "type": "boolean" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "sourceBytes", "type": "byte[]", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "created", "type": "Instant", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "revoked", "type": "boolean", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 15629, 653, 2103, 653, 29930, 12, 6385, 1160, 8526, 1084, 2160, 16, 727, 11190, 2522, 16, 727, 1250, 22919, 13, 288, 203, 565, 1160, 8526, 13027, 2160, 273, 1084, 2160, 18, 14056, 5621, 203, 565, 7875, 16670, 5207, 273, 27027, 1733, 7675, 2640, 5207, 12, 830, 8184, 2160, 1769, 203, 203, 565, 327, 394, 7875, 18048, 653, 12, 2704, 653, 5207, 16, 2522, 16, 22919, 1769, 203, 225, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,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1232, 15629, 653, 97, 1450, 326, 2112, 1084, 1731, 16, 2522, 813, 16, 471, 22919, 2982, 18, 411, 70, 34, 17857, 1757, 70, 28593, 203, 282, 380, 1846, 10685, 341, 3151, 596, 326, 1084, 1731, 1839, 326, 8364, 434, 333, 745, 5, 203, 282, 380, 632, 891, 1084, 2160, 1021, 1731, 358, 999, 364, 12516, 8901, 1232, 15629, 653, 5496, 203, 282, 380, 632, 891, 2522, 1021, 813, 358, 13251, 326, 4374, 8901, 1232, 15629, 653, 97, 598, 18, 203, 282, 380, 632, 891, 22919, 1021, 2982, 358, 444, 1323, 12516, 8901, 1232, 15629, 653, 5496, 203, 282, 380, 632, 2463, 432, 8901, 1232, 15629, 653, 97, 4374, 628, 326, 8901, 710, 1084, 2160, 5496, 203, 282, 1195, 2, -100 ]
22736641825015fdc04390c28e45edbf128ca494
jakeswenson/envelop
java/app-encryption/src/main/java/com/godaddy/asherah/crypto/AeadCrypto.java
[ "MIT" ]
Java
generateRandomCryptoKey
CryptoKey
protected CryptoKey generateRandomCryptoKey(final Instant created) { int keyLengthBits = getKeySizeBits(); if (keyLengthBits % Byte.SIZE != 0) { throw new IllegalArgumentException("Invalid key length " + keyLengthBits); } byte[] keyBytes = new byte[keyLengthBits / Byte.SIZE]; CRYPTO_RANDOM.nextBytes(keyBytes); try { return generateKeyFromBytes(keyBytes, created); } finally { wipeByteArray(keyBytes); } }
/** * Generates a random {@link CryptoKey} using the given time as the created time. * @param created The time to associate the generated {@link CryptoKey} with. * @return A generated random {@link CryptoKey}. */
Generates a random CryptoKey using the given time as the created time. @param created The time to associate the generated CryptoKey with. @return A generated random CryptoKey.
[ "Generates", "a", "random", "CryptoKey", "using", "the", "given", "time", "as", "the", "created", "time", ".", "@param", "created", "The", "time", "to", "associate", "the", "generated", "CryptoKey", "with", ".", "@return", "A", "generated", "random", "CryptoKey", "." ]
protected CryptoKey generateRandomCryptoKey(final Instant created) { int keyLengthBits = getKeySizeBits(); if (keyLengthBits % Byte.SIZE != 0) { throw new IllegalArgumentException("Invalid key length " + keyLengthBits); } byte[] keyBytes = new byte[keyLengthBits / Byte.SIZE]; CRYPTO_RANDOM.nextBytes(keyBytes); try { return generateKeyFromBytes(keyBytes, created); } finally { wipeByteArray(keyBytes); } }
[ "protected", "CryptoKey", "generateRandomCryptoKey", "(", "final", "Instant", "created", ")", "{", "int", "keyLengthBits", "=", "getKeySizeBits", "(", ")", ";", "if", "(", "keyLengthBits", "%", "Byte", ".", "SIZE", "!=", "0", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Invalid key length \"", "+", "keyLengthBits", ")", ";", "}", "byte", "[", "]", "keyBytes", "=", "new", "byte", "[", "keyLengthBits", "/", "Byte", ".", "SIZE", "]", ";", "CRYPTO_RANDOM", ".", "nextBytes", "(", "keyBytes", ")", ";", "try", "{", "return", "generateKeyFromBytes", "(", "keyBytes", ",", "created", ")", ";", "}", "finally", "{", "wipeByteArray", "(", "keyBytes", ")", ";", "}", "}" ]
Generates a random {@link CryptoKey} using the given time as the created time.
[ "Generates", "a", "random", "{", "@link", "CryptoKey", "}", "using", "the", "given", "time", "as", "the", "created", "time", "." ]
[]
[ { "param": "created", "type": "Instant" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "created", "type": "Instant", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 4750, 15629, 653, 2103, 8529, 18048, 653, 12, 6385, 11190, 2522, 13, 288, 203, 565, 509, 31611, 6495, 273, 3579, 1225, 6495, 5621, 203, 203, 565, 309, 261, 856, 1782, 6495, 738, 3506, 18, 4574, 480, 374, 13, 288, 203, 1377, 604, 394, 2754, 2932, 1941, 498, 769, 315, 397, 31611, 6495, 1769, 203, 565, 289, 203, 203, 565, 1160, 8526, 27896, 273, 394, 1160, 63, 856, 1782, 6495, 342, 3506, 18, 4574, 15533, 203, 565, 31557, 51, 67, 54, 28159, 18, 4285, 2160, 12, 856, 2160, 1769, 203,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 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 282, 380, 31902, 279, 2744, 8901, 1232, 15629, 653, 97, 1450, 326, 864, 813, 487, 326, 2522, 813, 18, 203, 282, 380, 632, 891, 2522, 1021, 813, 358, 13251, 326, 4374, 8901, 1232, 15629, 653, 97, 598, 18, 203, 282, 380, 632, 2463, 432, 4374, 2744, 8901, 1232, 15629, 653, 5496, 203, 282, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
c32062af9bf218cf9f79377e65a5c7312590d4aa
jakeswenson/envelop
java/app-encryption/src/main/java/com/godaddy/asherah/appencryption/persistence/DynamoDbMetastoreImpl.java
[ "MIT" ]
Java
loadLatest
null
@Override public Optional<JSONObject> loadLatest(final String keyId) { return loadLatestTimer.record(() -> { try { // Have to use query api to use limit and reverse sort order ItemCollection<QueryOutcome> itemCollection = table.query(new QuerySpec() .withHashKey(PARTITION_KEY, keyId) .withProjectionExpression(ATTRIBUTE_KEY_RECORD) .withScanIndexForward(false) // sorts descending .withMaxResultSize(1) // limit 1 .withConsistentRead(true)); // always use strong consistency Iterator<Item> iterator = itemCollection.iterator(); if (iterator.hasNext()) { Item item = iterator.next(); return Optional.of(new JSONObject(item.getMap(ATTRIBUTE_KEY_RECORD))); } } catch (SdkBaseException se) { logger.error("Metastore error", se); } return Optional.empty(); }); }
/** * Lookup the latest value associated with the keyId. * * @param keyId The keyId part of the lookup key. * @return The latest value associated with the keyId, if any. */
Lookup the latest value associated with the keyId. @param keyId The keyId part of the lookup key. @return The latest value associated with the keyId, if any.
[ "Lookup", "the", "latest", "value", "associated", "with", "the", "keyId", ".", "@param", "keyId", "The", "keyId", "part", "of", "the", "lookup", "key", ".", "@return", "The", "latest", "value", "associated", "with", "the", "keyId", "if", "any", "." ]
@Override public Optional<JSONObject> loadLatest(final String keyId) { return loadLatestTimer.record(() -> { try { ItemCollection<QueryOutcome> itemCollection = table.query(new QuerySpec() .withHashKey(PARTITION_KEY, keyId) .withProjectionExpression(ATTRIBUTE_KEY_RECORD) .withScanIndexForward(false) .withMaxResultSize(1) .withConsistentRead(true)); Iterator<Item> iterator = itemCollection.iterator(); if (iterator.hasNext()) { Item item = iterator.next(); return Optional.of(new JSONObject(item.getMap(ATTRIBUTE_KEY_RECORD))); } } catch (SdkBaseException se) { logger.error("Metastore error", se); } return Optional.empty(); }); }
[ "@", "Override", "public", "Optional", "<", "JSONObject", ">", "loadLatest", "(", "final", "String", "keyId", ")", "{", "return", "loadLatestTimer", ".", "record", "(", "(", ")", "->", "{", "try", "{", "ItemCollection", "<", "QueryOutcome", ">", "itemCollection", "=", "table", ".", "query", "(", "new", "QuerySpec", "(", ")", ".", "withHashKey", "(", "PARTITION_KEY", ",", "keyId", ")", ".", "withProjectionExpression", "(", "ATTRIBUTE_KEY_RECORD", ")", ".", "withScanIndexForward", "(", "false", ")", ".", "withMaxResultSize", "(", "1", ")", ".", "withConsistentRead", "(", "true", ")", ")", ";", "Iterator", "<", "Item", ">", "iterator", "=", "itemCollection", ".", "iterator", "(", ")", ";", "if", "(", "iterator", ".", "hasNext", "(", ")", ")", "{", "Item", "item", "=", "iterator", ".", "next", "(", ")", ";", "return", "Optional", ".", "of", "(", "new", "JSONObject", "(", "item", ".", "getMap", "(", "ATTRIBUTE_KEY_RECORD", ")", ")", ")", ";", "}", "}", "catch", "(", "SdkBaseException", "se", ")", "{", "logger", ".", "error", "(", "\"Metastore error\"", ",", "se", ")", ";", "}", "return", "Optional", ".", "empty", "(", ")", ";", "}", ")", ";", "}" ]
Lookup the latest value associated with the keyId.
[ "Lookup", "the", "latest", "value", "associated", "with", "the", "keyId", "." ]
[ "// Have to use query api to use limit and reverse sort order", "// sorts descending", "// limit 1", "// always use strong consistency" ]
[ { "param": "keyId", "type": "String" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "keyId", "type": "String", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 632, 6618, 203, 225, 1071, 4055, 32, 2986, 921, 34, 1262, 18650, 12, 6385, 514, 30914, 13, 288, 203, 565, 327, 1262, 18650, 6777, 18, 3366, 12, 1435, 317, 288, 203, 1377, 775, 288, 203, 3639, 368, 21940, 358, 999, 843, 1536, 358, 999, 1800, 471, 4219, 1524, 1353, 203, 3639, 4342, 2532, 32, 1138, 19758, 34, 761, 2532, 273, 1014, 18, 2271, 12, 2704, 2770, 1990, 1435, 203, 5411, 263, 1918, 31006, 12, 15055, 7022, 67, 3297, 16, 30914, 13, 203, 5411, 263, 1918, 14789, 2300, 12, 11616, 67, 3297, 67, 22261, 13, 203, 5411, 263, 1918, 7972, 1016, 8514, 12, 5743, 13, 368, 18524, 17044, 203, 5411, 263, 1918, 2747, 1253, 1225, 12, 21, 13, 368, 1800, 404, 203, 5411, 263, 1918, 17579, 319, 1994, 12, 3767, 10019, 368, 3712, 999, 11773, 14297, 203, 203, 3639, 4498, 32, 1180, 34, 2775, 273, 761, 2532, 18, 9838, 5621, 203, 3639, 309, 261, 9838, 18, 5332, 2134, 10756, 288, 203, 1850, 4342, 761, 273, 2775, 18, 4285, 5621, 203, 1850, 327, 4055, 18, 792, 12, 2704, 8014, 12, 1726, 18, 588, 863, 12, 11616, 67, 3297, 67, 22261, 3719, 1769, 203, 3639, 289, 203, 1377, 289, 203, 1377, 1044, 261, 23951, 2171, 503, 695, 13, 288, 203, 3639, 1194, 18, 1636, 2932, 12244, 689, 479, 555, 3113, 695, 1769, 203, 1377, 289, 203, 203, 1377, 327, 4055, 18, 5531, 5621, 203, 565, 15549, 203, 225, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,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1, 26873, 203, 282, 380, 8834, 326, 4891, 460, 3627, 598, 326, 30914, 18, 203, 282, 380, 203, 282, 380, 632, 891, 30914, 1021, 30914, 1087, 434, 326, 3689, 498, 18, 203, 282, 380, 632, 2463, 1021, 4891, 460, 3627, 598, 326, 30914, 16, 309, 1281, 18, 203, 282, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
c32062af9bf218cf9f79377e65a5c7312590d4aa
jakeswenson/envelop
java/app-encryption/src/main/java/com/godaddy/asherah/appencryption/persistence/DynamoDbMetastoreImpl.java
[ "MIT" ]
Java
store
null
@Override public boolean store(final String keyId, final Instant created, final JSONObject value) { return storeTimer.record(() -> { try { // Note conditional expression using attribute_not_exists has special semantics. Can be used on partition OR // sort key alone to guarantee primary key uniqueness. It automatically checks for existence of this item's // composite primary key and if it contains the specified attribute name, either of which is inherently // required. Item item = new Item() .withPrimaryKey( PARTITION_KEY, keyId, SORT_KEY, created.getEpochSecond()) .withMap(ATTRIBUTE_KEY_RECORD, value.toMap()); table.putItem(new PutItemSpec() .withItem(item) .withConditionExpression("attribute_not_exists(" + PARTITION_KEY + ")")); return true; } catch (ConditionalCheckFailedException e) { // Duplicate key exists logger.info("Attempted to create duplicate key: {} {}", keyId, created); return false; } catch (SdkBaseException se) { logger.error("Metastore error during store", se); throw new AppEncryptionException("Metastore error", se); } }); }
/** * Stores the value using the specified keyId and created time. * * @param keyId The keyId part of the lookup key. * @param created The created time part of the lookup key. * @param value The value to store. * @return {@code true} if the store succeeded, false if the store failed for a known condition * e.g., trying to save a duplicate value should return false, not throw an exception. */
Stores the value using the specified keyId and created time. @param keyId The keyId part of the lookup key. @param created The created time part of the lookup key. @param value The value to store. @return true if the store succeeded, false if the store failed for a known condition e.g., trying to save a duplicate value should return false, not throw an exception.
[ "Stores", "the", "value", "using", "the", "specified", "keyId", "and", "created", "time", ".", "@param", "keyId", "The", "keyId", "part", "of", "the", "lookup", "key", ".", "@param", "created", "The", "created", "time", "part", "of", "the", "lookup", "key", ".", "@param", "value", "The", "value", "to", "store", ".", "@return", "true", "if", "the", "store", "succeeded", "false", "if", "the", "store", "failed", "for", "a", "known", "condition", "e", ".", "g", ".", "trying", "to", "save", "a", "duplicate", "value", "should", "return", "false", "not", "throw", "an", "exception", "." ]
@Override public boolean store(final String keyId, final Instant created, final JSONObject value) { return storeTimer.record(() -> { try { Item item = new Item() .withPrimaryKey( PARTITION_KEY, keyId, SORT_KEY, created.getEpochSecond()) .withMap(ATTRIBUTE_KEY_RECORD, value.toMap()); table.putItem(new PutItemSpec() .withItem(item) .withConditionExpression("attribute_not_exists(" + PARTITION_KEY + ")")); return true; } catch (ConditionalCheckFailedException e) { logger.info("Attempted to create duplicate key: {} {}", keyId, created); return false; } catch (SdkBaseException se) { logger.error("Metastore error during store", se); throw new AppEncryptionException("Metastore error", se); } }); }
[ "@", "Override", "public", "boolean", "store", "(", "final", "String", "keyId", ",", "final", "Instant", "created", ",", "final", "JSONObject", "value", ")", "{", "return", "storeTimer", ".", "record", "(", "(", ")", "->", "{", "try", "{", "Item", "item", "=", "new", "Item", "(", ")", ".", "withPrimaryKey", "(", "PARTITION_KEY", ",", "keyId", ",", "SORT_KEY", ",", "created", ".", "getEpochSecond", "(", ")", ")", ".", "withMap", "(", "ATTRIBUTE_KEY_RECORD", ",", "value", ".", "toMap", "(", ")", ")", ";", "table", ".", "putItem", "(", "new", "PutItemSpec", "(", ")", ".", "withItem", "(", "item", ")", ".", "withConditionExpression", "(", "\"attribute_not_exists(\"", "+", "PARTITION_KEY", "+", "\")\"", ")", ")", ";", "return", "true", ";", "}", "catch", "(", "ConditionalCheckFailedException", "e", ")", "{", "logger", ".", "info", "(", "\"Attempted to create duplicate key: {} {}\"", ",", "keyId", ",", "created", ")", ";", "return", "false", ";", "}", "catch", "(", "SdkBaseException", "se", ")", "{", "logger", ".", "error", "(", "\"Metastore error during store\"", ",", "se", ")", ";", "throw", "new", "AppEncryptionException", "(", "\"Metastore error\"", ",", "se", ")", ";", "}", "}", ")", ";", "}" ]
Stores the value using the specified keyId and created time.
[ "Stores", "the", "value", "using", "the", "specified", "keyId", "and", "created", "time", "." ]
[ "// Note conditional expression using attribute_not_exists has special semantics. Can be used on partition OR", "// sort key alone to guarantee primary key uniqueness. It automatically checks for existence of this item's", "// composite primary key and if it contains the specified attribute name, either of which is inherently", "// required.", "// Duplicate key exists" ]
[ { "param": "keyId", "type": "String" }, { "param": "created", "type": "Instant" }, { "param": "value", "type": "JSONObject" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "keyId", "type": "String", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "created", "type": "Instant", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "value", "type": "JSONObject", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 632, 6618, 203, 225, 1071, 1250, 1707, 12, 6385, 514, 30914, 16, 727, 11190, 2522, 16, 727, 8014, 460, 13, 288, 203, 565, 327, 1707, 6777, 18, 3366, 12, 1435, 317, 288, 203, 1377, 775, 288, 203, 3639, 368, 3609, 11139, 2652, 1450, 1566, 67, 902, 67, 1808, 711, 4582, 17267, 18, 4480, 506, 1399, 603, 3590, 4869, 203, 3639, 368, 1524, 498, 24068, 358, 18779, 3354, 498, 31596, 18, 2597, 6635, 4271, 364, 15782, 434, 333, 761, 1807, 203, 3639, 368, 9635, 3354, 498, 471, 309, 518, 1914, 326, 1269, 1566, 508, 16, 3344, 434, 1492, 353, 316, 1614, 23351, 203, 3639, 368, 1931, 18, 203, 3639, 4342, 761, 273, 394, 4342, 1435, 203, 5411, 263, 1918, 11575, 12, 203, 7734, 20814, 7022, 67, 3297, 16, 30914, 16, 203, 7734, 11530, 67, 3297, 16, 2522, 18, 588, 14638, 8211, 10756, 203, 5411, 263, 1918, 863, 12, 11616, 67, 3297, 67, 22261, 16, 460, 18, 869, 863, 10663, 203, 3639, 1014, 18, 458, 1180, 12, 2704, 4399, 1180, 1990, 1435, 203, 5411, 263, 1918, 1180, 12, 1726, 13, 203, 5411, 263, 1918, 3418, 2300, 2932, 4589, 67, 902, 67, 1808, 2932, 397, 20814, 7022, 67, 3297, 397, 7310, 10019, 203, 203, 3639, 327, 638, 31, 203, 1377, 289, 203, 1377, 1044, 261, 14132, 1564, 12417, 425, 13, 288, 203, 3639, 368, 19072, 498, 1704, 203, 3639, 1194, 18, 1376, 2932, 28788, 358, 752, 6751, 498, 30, 2618, 3728, 16, 30914, 16, 2522, 1769, 203, 3639, 327, 629, 31, 203, 1377, 289, 203, 1377, 1044, 261, 23951, 2171, 503, 695, 13, 288, 203, 3639, 1194, 18, 1636, 2932, 12244, 689, 479, 555, 4982, 1707, 3113, 695, 1769, 203, 3639, 604, 394, 4677, 7894, 503, 2932, 12244, 689, 479, 555, 3113, 695, 1769, 203, 1377, 289, 203, 565, 15549, 203, 225, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0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1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 282, 380, 20296, 455, 326, 460, 1450, 326, 1269, 30914, 471, 2522, 813, 18, 203, 282, 380, 203, 282, 380, 632, 891, 30914, 1021, 30914, 1087, 434, 326, 3689, 498, 18, 203, 282, 380, 632, 891, 2522, 1021, 2522, 813, 1087, 434, 326, 3689, 498, 18, 203, 282, 380, 632, 891, 460, 1021, 460, 358, 1707, 18, 203, 282, 380, 632, 2463, 8901, 710, 638, 97, 309, 326, 1707, 15784, 16, 629, 309, 326, 1707, 2535, 364, 279, 4846, 2269, 203, 282, 380, 540, 425, 18, 75, 12990, 8374, 358, 1923, 279, 6751, 460, 1410, 327, 629, 16, 486, 604, 392, 1520, 18, 203, 282, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
e103526dcf232a200f3e9fe54216331d778c3006
jakeswenson/envelop
java/app-encryption/src/main/java/com/godaddy/asherah/appencryption/kms/AwsKeyManagementServiceImpl.java
[ "MIT" ]
Java
generateDataKey
GenerateDataKeyResult
GenerateDataKeyResult generateDataKey(final Map<String, AwsKmsArnClient> sortedRegionToArnAndClient) { for (Map.Entry<String, AwsKmsArnClient> regionToArnAndClient : sortedRegionToArnAndClient.entrySet()) { try { Timer generateDataKeyTimer = Metrics.timer(MetricsUtil.AEL_METRICS_PREFIX + ".kms.aws.generatedatakey." + regionToArnAndClient.getKey()); return generateDataKeyTimer.record(() -> { AWSKMS kmsClient = regionToArnAndClient.getValue().awsKmsClient; GenerateDataKeyRequest dataKeyRequest = new GenerateDataKeyRequest() .withKeyId(regionToArnAndClient.getValue().arn) .withKeySpec("AES_256"); return kmsClient.generateDataKey(dataKeyRequest); }); } catch (SdkBaseException e) { logger.warn("Failed to generate data key via region {}, trying next region", regionToArnAndClient.getKey(), e); // TODO Consider adding notification/CW alert } } throw new KmsException("could not successfully generate data key using any regions"); }
/** * Attempt to generate a KMS datakey using the first successful response using a sorted map of available KMS clients. * * @param sortedRegionToArnAndClient A sorted dictionary mapping regions and their arns and kms clients. * @return A {@link GenerateDataKeyResult} object that contains the plain text key and the ciphertext for that key. * @exception KmsException Throws a {@link KmsException} if we're unable to generate a datakey in any AWS region. */
Attempt to generate a KMS datakey using the first successful response using a sorted map of available KMS clients. @param sortedRegionToArnAndClient A sorted dictionary mapping regions and their arns and kms clients. @return A GenerateDataKeyResult object that contains the plain text key and the ciphertext for that key. @exception KmsException Throws a KmsException if we're unable to generate a datakey in any AWS region.
[ "Attempt", "to", "generate", "a", "KMS", "datakey", "using", "the", "first", "successful", "response", "using", "a", "sorted", "map", "of", "available", "KMS", "clients", ".", "@param", "sortedRegionToArnAndClient", "A", "sorted", "dictionary", "mapping", "regions", "and", "their", "arns", "and", "kms", "clients", ".", "@return", "A", "GenerateDataKeyResult", "object", "that", "contains", "the", "plain", "text", "key", "and", "the", "ciphertext", "for", "that", "key", ".", "@exception", "KmsException", "Throws", "a", "KmsException", "if", "we", "'", "re", "unable", "to", "generate", "a", "datakey", "in", "any", "AWS", "region", "." ]
GenerateDataKeyResult generateDataKey(final Map<String, AwsKmsArnClient> sortedRegionToArnAndClient) { for (Map.Entry<String, AwsKmsArnClient> regionToArnAndClient : sortedRegionToArnAndClient.entrySet()) { try { Timer generateDataKeyTimer = Metrics.timer(MetricsUtil.AEL_METRICS_PREFIX + ".kms.aws.generatedatakey." + regionToArnAndClient.getKey()); return generateDataKeyTimer.record(() -> { AWSKMS kmsClient = regionToArnAndClient.getValue().awsKmsClient; GenerateDataKeyRequest dataKeyRequest = new GenerateDataKeyRequest() .withKeyId(regionToArnAndClient.getValue().arn) .withKeySpec("AES_256"); return kmsClient.generateDataKey(dataKeyRequest); }); } catch (SdkBaseException e) { logger.warn("Failed to generate data key via region {}, trying next region", regionToArnAndClient.getKey(), e); } } throw new KmsException("could not successfully generate data key using any regions"); }
[ "GenerateDataKeyResult", "generateDataKey", "(", "final", "Map", "<", "String", ",", "AwsKmsArnClient", ">", "sortedRegionToArnAndClient", ")", "{", "for", "(", "Map", ".", "Entry", "<", "String", ",", "AwsKmsArnClient", ">", "regionToArnAndClient", ":", "sortedRegionToArnAndClient", ".", "entrySet", "(", ")", ")", "{", "try", "{", "Timer", "generateDataKeyTimer", "=", "Metrics", ".", "timer", "(", "MetricsUtil", ".", "AEL_METRICS_PREFIX", "+", "\".kms.aws.generatedatakey.\"", "+", "regionToArnAndClient", ".", "getKey", "(", ")", ")", ";", "return", "generateDataKeyTimer", ".", "record", "(", "(", ")", "->", "{", "AWSKMS", "kmsClient", "=", "regionToArnAndClient", ".", "getValue", "(", ")", ".", "awsKmsClient", ";", "GenerateDataKeyRequest", "dataKeyRequest", "=", "new", "GenerateDataKeyRequest", "(", ")", ".", "withKeyId", "(", "regionToArnAndClient", ".", "getValue", "(", ")", ".", "arn", ")", ".", "withKeySpec", "(", "\"AES_256\"", ")", ";", "return", "kmsClient", ".", "generateDataKey", "(", "dataKeyRequest", ")", ";", "}", ")", ";", "}", "catch", "(", "SdkBaseException", "e", ")", "{", "logger", ".", "warn", "(", "\"Failed to generate data key via region {}, trying next region\"", ",", "regionToArnAndClient", ".", "getKey", "(", ")", ",", "e", ")", ";", "}", "}", "throw", "new", "KmsException", "(", "\"could not successfully generate data key using any regions\"", ")", ";", "}" ]
Attempt to generate a KMS datakey using the first successful response using a sorted map of available KMS clients.
[ "Attempt", "to", "generate", "a", "KMS", "datakey", "using", "the", "first", "successful", "response", "using", "a", "sorted", "map", "of", "available", "KMS", "clients", "." ]
[ "// TODO Consider adding notification/CW alert" ]
[ { "param": "sortedRegionToArnAndClient", "type": "Map<String, AwsKmsArnClient>" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "sortedRegionToArnAndClient", "type": "Map<String, AwsKmsArnClient>", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 6654, 29273, 1253, 2103, 29273, 12, 6385, 1635, 32, 780, 16, 17435, 30949, 5046, 1227, 34, 3115, 5165, 774, 5046, 1876, 1227, 13, 288, 203, 565, 364, 261, 863, 18, 1622, 32, 780, 16, 17435, 30949, 5046, 1227, 34, 3020, 774, 5046, 1876, 1227, 294, 3115, 5165, 774, 5046, 1876, 1227, 18, 4099, 694, 10756, 288, 203, 1377, 775, 288, 203, 3639, 12290, 2103, 29273, 6777, 273, 203, 5411, 10845, 18, 12542, 12, 5653, 1304, 18, 37, 2247, 67, 23081, 4596, 67, 6307, 397, 3552, 79, 959, 18, 6850, 18, 11168, 396, 856, 1199, 397, 203, 7734, 3020, 774, 5046, 1876, 1227, 18, 588, 653, 10663, 203, 3639, 327, 2103, 29273, 6777, 18, 3366, 12, 1435, 317, 288, 203, 1850, 3279, 30531, 20083, 1227, 273, 3020, 774, 5046, 1876, 1227, 18, 24805, 7675, 6850, 30949, 1227, 31, 203, 1850, 6654, 29273, 691, 31975, 691, 273, 394, 6654, 29273, 691, 1435, 203, 2868, 263, 1918, 14140, 12, 6858, 774, 5046, 1876, 1227, 18, 24805, 7675, 1303, 13, 203, 2868, 263, 1918, 653, 1990, 2932, 18436, 67, 5034, 8863, 203, 1850, 327, 20083, 1227, 18, 7163, 29273, 12, 892, 653, 691, 1769, 203, 3639, 15549, 203, 1377, 289, 203, 1377, 1044, 261, 23951, 2171, 503, 425, 13, 288, 203, 3639, 1194, 18, 8935, 2932, 2925, 358, 2103, 501, 498, 3970, 3020, 10615, 8374, 1024, 3020, 3113, 3020, 774, 5046, 1876, 1227, 18, 588, 653, 9334, 425, 1769, 203, 3639, 368, 2660, 23047, 6534, 3851, 19, 12844, 6881, 203, 1377, 289, 203, 565, 289, 203, 203, 565, 604, 394, 1475, 959, 503, 2932, 15195, 486, 4985, 2103, 501, 498, 1450, 1281, 10085, 8863, 203, 225, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 471, 3675, 419, 2387, 471, 20083, 7712, 18, 203, 282, 380, 632, 2463, 432, 8901, 1232, 6654, 29273, 1253, 97, 733, 716, 1914, 326, 7351, 977, 498, 471, 326, 12657, 364, 716, 498, 18, 203, 282, 380, 632, 4064, 1475, 959, 503, 22435, 279, 8901, 1232, 1475, 959, 503, 97, 309, 732, 4565, 13496, 358, 2103, 279, 501, 856, 316, 1281, 3279, 3020, 18, 203, 282, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
7724954da294113c2723be49011a19c25f9a9e0b
jakeswenson/envelop
java/app-encryption/src/main/java/com/godaddy/asherah/appencryption/kms/KeyManagementService.java
[ "MIT" ]
Java
withDecryptedKey
T
default <T> T withDecryptedKey(final byte[] keyCipherText, final Instant keyCreated, final boolean revoked, final BiFunction<CryptoKey, Instant, T> actionWithDecryptedKey) { try (CryptoKey key = decryptKey(keyCipherText, keyCreated, revoked)) { return actionWithDecryptedKey.apply(key, keyCreated); } }
/** * Decrypts a key and applies the provided function to the key. * * @param keyCipherText The encrypted key. * @param keyCreated The creation time of the encrypted key. * @param revoked The revocation status of the key. * @param actionWithDecryptedKey a {@link java.util.function.BiFunction} to be applied to the decrypted key. * @param <T> The type being used to return the result from the function. * @return The function result. */
Decrypts a key and applies the provided function to the key. @param keyCipherText The encrypted key. @param keyCreated The creation time of the encrypted key. @param revoked The revocation status of the key. @param actionWithDecryptedKey a java.util.function.BiFunction to be applied to the decrypted key. @param The type being used to return the result from the function. @return The function result.
[ "Decrypts", "a", "key", "and", "applies", "the", "provided", "function", "to", "the", "key", ".", "@param", "keyCipherText", "The", "encrypted", "key", ".", "@param", "keyCreated", "The", "creation", "time", "of", "the", "encrypted", "key", ".", "@param", "revoked", "The", "revocation", "status", "of", "the", "key", ".", "@param", "actionWithDecryptedKey", "a", "java", ".", "util", ".", "function", ".", "BiFunction", "to", "be", "applied", "to", "the", "decrypted", "key", ".", "@param", "The", "type", "being", "used", "to", "return", "the", "result", "from", "the", "function", ".", "@return", "The", "function", "result", "." ]
default <T> T withDecryptedKey(final byte[] keyCipherText, final Instant keyCreated, final boolean revoked, final BiFunction<CryptoKey, Instant, T> actionWithDecryptedKey) { try (CryptoKey key = decryptKey(keyCipherText, keyCreated, revoked)) { return actionWithDecryptedKey.apply(key, keyCreated); } }
[ "default", "<", "T", ">", "T", "withDecryptedKey", "(", "final", "byte", "[", "]", "keyCipherText", ",", "final", "Instant", "keyCreated", ",", "final", "boolean", "revoked", ",", "final", "BiFunction", "<", "CryptoKey", ",", "Instant", ",", "T", ">", "actionWithDecryptedKey", ")", "{", "try", "(", "CryptoKey", "key", "=", "decryptKey", "(", "keyCipherText", ",", "keyCreated", ",", "revoked", ")", ")", "{", "return", "actionWithDecryptedKey", ".", "apply", "(", "key", ",", "keyCreated", ")", ";", "}", "}" ]
Decrypts a key and applies the provided function to the key.
[ "Decrypts", "a", "key", "and", "applies", "the", "provided", "function", "to", "the", "key", "." ]
[]
[ { "param": "keyCipherText", "type": "byte[]" }, { "param": "keyCreated", "type": "Instant" }, { "param": "revoked", "type": "boolean" }, { "param": "actionWithDecryptedKey", "type": "BiFunction<CryptoKey, Instant, T>" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "keyCipherText", "type": "byte[]", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "keyCreated", "type": "Instant", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "revoked", "type": "boolean", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "actionWithDecryptedKey", "type": "BiFunction<CryptoKey, Instant, T>", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 805, 411, 56, 34, 399, 598, 1799, 4567, 653, 12, 6385, 1160, 8526, 498, 13896, 1528, 16, 727, 11190, 498, 6119, 16, 727, 1250, 22919, 16, 203, 27573, 727, 16682, 2083, 32, 18048, 653, 16, 11190, 16, 399, 34, 1301, 1190, 1799, 4567, 653, 13, 288, 203, 565, 775, 261, 18048, 653, 498, 273, 8420, 653, 12, 856, 13896, 1528, 16, 498, 6119, 16, 22919, 3719, 288, 203, 1377, 327, 1301, 1190, 1799, 4567, 653, 18, 9010, 12, 856, 16, 498, 6119, 1769, 203, 565, 289, 203, 225, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,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896, 1528, 1021, 6901, 498, 18, 203, 282, 380, 632, 891, 498, 6119, 1021, 6710, 813, 434, 326, 6901, 498, 18, 203, 282, 380, 632, 891, 22919, 1021, 24158, 1267, 434, 326, 498, 18, 203, 282, 380, 632, 891, 1301, 1190, 1799, 4567, 653, 279, 8901, 1232, 2252, 18, 1367, 18, 915, 18, 18808, 2083, 97, 358, 506, 6754, 358, 326, 13794, 498, 18, 203, 282, 380, 632, 891, 411, 56, 34, 1021, 618, 3832, 1399, 358, 327, 326, 563, 628, 326, 445, 18, 203, 282, 380, 632, 2463, 1021, 445, 563, 18, 203, 282, 1195, 2, -100, -100, -100, -100 ]
068565e39e62790ae861d4c7551fff0372da570c
jakeswenson/envelop
java/app-encryption/src/main/java/com/godaddy/asherah/appencryption/SessionFactory.java
[ "MIT" ]
Java
acquireShared
CachedSession
CachedSession acquireShared(final Function<String, EnvelopeEncryptionJsonImpl> createSession, final String partitionId) { return sessionCache.asMap().compute(partitionId, (k, cachedSession) -> { if (cachedSession == null) { // Creating for first time and increment usage counter as we're the first user CachedSession newSession = new CachedSession(createSession.apply(partitionId), partitionId); newSession.incrementUsageTracker(); return newSession; } // Already exists in cache, so just increment usage counter cachedSession.incrementUsageTracker(); return cachedSession; }); }
/** * Atomically acquires a shared {@code CachedSession} from the session cache for the {@code partitionId}, creating * a new one using the given function if needed. This is used to track the number of concurrent users so cache * eviction policies don't remove an entry while it's still potentially in use. * * @param createSession The function to create a new session if there is no current mapping. * @param partitionId A unique identifier for a session. * @return The cached session that's mapped for the given {@code partitionId}. */
Atomically acquires a shared CachedSession from the session cache for the partitionId, creating a new one using the given function if needed. This is used to track the number of concurrent users so cache eviction policies don't remove an entry while it's still potentially in use. @param createSession The function to create a new session if there is no current mapping. @param partitionId A unique identifier for a session. @return The cached session that's mapped for the given partitionId.
[ "Atomically", "acquires", "a", "shared", "CachedSession", "from", "the", "session", "cache", "for", "the", "partitionId", "creating", "a", "new", "one", "using", "the", "given", "function", "if", "needed", ".", "This", "is", "used", "to", "track", "the", "number", "of", "concurrent", "users", "so", "cache", "eviction", "policies", "don", "'", "t", "remove", "an", "entry", "while", "it", "'", "s", "still", "potentially", "in", "use", ".", "@param", "createSession", "The", "function", "to", "create", "a", "new", "session", "if", "there", "is", "no", "current", "mapping", ".", "@param", "partitionId", "A", "unique", "identifier", "for", "a", "session", ".", "@return", "The", "cached", "session", "that", "'", "s", "mapped", "for", "the", "given", "partitionId", "." ]
CachedSession acquireShared(final Function<String, EnvelopeEncryptionJsonImpl> createSession, final String partitionId) { return sessionCache.asMap().compute(partitionId, (k, cachedSession) -> { if (cachedSession == null) { CachedSession newSession = new CachedSession(createSession.apply(partitionId), partitionId); newSession.incrementUsageTracker(); return newSession; } cachedSession.incrementUsageTracker(); return cachedSession; }); }
[ "CachedSession", "acquireShared", "(", "final", "Function", "<", "String", ",", "EnvelopeEncryptionJsonImpl", ">", "createSession", ",", "final", "String", "partitionId", ")", "{", "return", "sessionCache", ".", "asMap", "(", ")", ".", "compute", "(", "partitionId", ",", "(", "k", ",", "cachedSession", ")", "->", "{", "if", "(", "cachedSession", "==", "null", ")", "{", "CachedSession", "newSession", "=", "new", "CachedSession", "(", "createSession", ".", "apply", "(", "partitionId", ")", ",", "partitionId", ")", ";", "newSession", ".", "incrementUsageTracker", "(", ")", ";", "return", "newSession", ";", "}", "cachedSession", ".", "incrementUsageTracker", "(", ")", ";", "return", "cachedSession", ";", "}", ")", ";", "}" ]
Atomically acquires a shared {@code CachedSession} from the session cache for the {@code partitionId}, creating a new one using the given function if needed.
[ "Atomically", "acquires", "a", "shared", "{", "@code", "CachedSession", "}", "from", "the", "session", "cache", "for", "the", "{", "@code", "partitionId", "}", "creating", "a", "new", "one", "using", "the", "given", "function", "if", "needed", "." ]
[ "// Creating for first time and increment usage counter as we're the first user", "// Already exists in cache, so just increment usage counter" ]
[ { "param": "createSession", "type": "Function<String, EnvelopeEncryptionJsonImpl>" }, { "param": "partitionId", "type": "String" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "createSession", "type": "Function<String, EnvelopeEncryptionJsonImpl>", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "partitionId", "type": "String", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 15771, 2157, 10533, 7887, 12, 6385, 4284, 32, 780, 16, 16210, 7894, 3185, 2828, 34, 752, 2157, 16, 203, 1377, 727, 514, 24841, 13, 288, 203, 565, 327, 1339, 1649, 18, 345, 863, 7675, 9200, 12, 10534, 548, 16, 261, 79, 16, 3472, 2157, 13, 317, 288, 203, 1377, 309, 261, 7097, 2157, 422, 446, 13, 288, 203, 3639, 368, 21837, 364, 1122, 813, 471, 5504, 4084, 3895, 487, 732, 4565, 326, 1122, 729, 203, 3639, 15771, 2157, 394, 2157, 273, 394, 15771, 2157, 12, 2640, 2157, 18, 9010, 12, 10534, 548, 3631, 24841, 1769, 203, 3639, 394, 2157, 18, 15016, 5357, 8135, 5621, 203, 203, 3639, 327, 394, 2157, 31, 203, 1377, 289, 203, 203, 1377, 368, 17009, 1704, 316, 1247, 16, 1427, 2537, 5504, 4084, 3895, 203, 1377, 3472, 2157, 18, 15016, 5357, 8135, 5621, 203, 1377, 327, 3472, 2157, 31, 203, 565, 15549, 203, 225, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 282, 380, 7149, 6478, 1721, 4138, 279, 5116, 8901, 710, 15771, 2157, 97, 628, 326, 1339, 1247, 364, 326, 8901, 710, 24841, 5779, 4979, 203, 282, 380, 279, 394, 1245, 1450, 326, 864, 445, 309, 3577, 18, 1220, 353, 1399, 358, 3298, 326, 1300, 434, 10020, 3677, 1427, 1247, 203, 282, 380, 23606, 8923, 2727, 1404, 1206, 392, 1241, 1323, 518, 1807, 4859, 13935, 316, 999, 18, 203, 282, 380, 203, 282, 380, 632, 891, 752, 2157, 1021, 445, 358, 752, 279, 394, 1339, 309, 1915, 353, 1158, 783, 2874, 18, 203, 282, 380, 632, 891, 24841, 432, 3089, 2756, 364, 279, 1339, 18, 203, 282, 380, 632, 2463, 1021, 3472, 1339, 716, 1807, 5525, 364, 326, 864, 8901, 710, 24841, 5496, 203, 282, 2 ]
068565e39e62790ae861d4c7551fff0372da570c
jakeswenson/envelop
java/app-encryption/src/main/java/com/godaddy/asherah/appencryption/SessionFactory.java
[ "MIT" ]
Java
releaseShared
null
void releaseShared(final String partitionId) { // Decrements the usage counter if still in the cache sessionCache.asMap().computeIfPresent(partitionId, (k, cachedSession) -> { cachedSession.decrementUsageTracker(); return cachedSession; }); }
/** * Atomically marks a shared {@code CachedSession} in the session cache as no longer being used by the current * caller for the {@code partitionId}. This is used to track the number of concurrent users so cache eviction * policies don't remove an entry while it's still potentially in use. * * @param partitionId A unique identifier for a session. */
Atomically marks a shared CachedSession in the session cache as no longer being used by the current caller for the partitionId. This is used to track the number of concurrent users so cache eviction policies don't remove an entry while it's still potentially in use. @param partitionId A unique identifier for a session.
[ "Atomically", "marks", "a", "shared", "CachedSession", "in", "the", "session", "cache", "as", "no", "longer", "being", "used", "by", "the", "current", "caller", "for", "the", "partitionId", ".", "This", "is", "used", "to", "track", "the", "number", "of", "concurrent", "users", "so", "cache", "eviction", "policies", "don", "'", "t", "remove", "an", "entry", "while", "it", "'", "s", "still", "potentially", "in", "use", ".", "@param", "partitionId", "A", "unique", "identifier", "for", "a", "session", "." ]
void releaseShared(final String partitionId) { sessionCache.asMap().computeIfPresent(partitionId, (k, cachedSession) -> { cachedSession.decrementUsageTracker(); return cachedSession; }); }
[ "void", "releaseShared", "(", "final", "String", "partitionId", ")", "{", "sessionCache", ".", "asMap", "(", ")", ".", "computeIfPresent", "(", "partitionId", ",", "(", "k", ",", "cachedSession", ")", "->", "{", "cachedSession", ".", "decrementUsageTracker", "(", ")", ";", "return", "cachedSession", ";", "}", ")", ";", "}" ]
Atomically marks a shared {@code CachedSession} in the session cache as no longer being used by the current caller for the {@code partitionId}.
[ "Atomically", "marks", "a", "shared", "{", "@code", "CachedSession", "}", "in", "the", "session", "cache", "as", "no", "longer", "being", "used", "by", "the", "current", "caller", "for", "the", "{", "@code", "partitionId", "}", "." ]
[ "// Decrements the usage counter if still in the cache" ]
[ { "param": "partitionId", "type": "String" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "partitionId", "type": "String", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 918, 3992, 7887, 12, 6385, 514, 24841, 13, 288, 203, 565, 368, 31073, 1346, 326, 4084, 3895, 309, 4859, 316, 326, 1247, 203, 565, 1339, 1649, 18, 345, 863, 7675, 9200, 2047, 6351, 12, 10534, 548, 16, 261, 79, 16, 3472, 2157, 13, 317, 288, 203, 1377, 3472, 2157, 18, 323, 3702, 5357, 8135, 5621, 203, 1377, 327, 3472, 2157, 31, 203, 565, 15549, 203, 225, 289, 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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 282, 380, 7149, 6478, 13999, 279, 5116, 8901, 710, 15771, 2157, 97, 316, 326, 1339, 1247, 487, 1158, 7144, 3832, 1399, 635, 326, 783, 203, 282, 380, 4894, 364, 326, 8901, 710, 24841, 5496, 1220, 353, 1399, 358, 3298, 326, 1300, 434, 10020, 3677, 1427, 1247, 23606, 203, 282, 380, 8923, 2727, 1404, 1206, 392, 1241, 1323, 518, 1807, 4859, 13935, 316, 999, 18, 203, 282, 380, 203, 282, 380, 632, 891, 24841, 432, 3089, 2756, 364, 279, 1339, 18, 203, 282, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
055653e76f55b3f77138936142dece2c94645834
jakeswenson/envelop
java/app-encryption/src/main/java/com/godaddy/asherah/appencryption/persistence/Persistence.java
[ "MIT" ]
Java
store
String
default String store(final T value) { String persistenceKey = generateKey(value); store(persistenceKey, value); return persistenceKey; }
/** * Stores the value and returns its associated generated key for future lookup (e.g. UUID, etc.). * * @param value The value to store. * @return The generated key that can be used for looking up this value. */
Stores the value and returns its associated generated key for future lookup . @param value The value to store. @return The generated key that can be used for looking up this value.
[ "Stores", "the", "value", "and", "returns", "its", "associated", "generated", "key", "for", "future", "lookup", ".", "@param", "value", "The", "value", "to", "store", ".", "@return", "The", "generated", "key", "that", "can", "be", "used", "for", "looking", "up", "this", "value", "." ]
default String store(final T value) { String persistenceKey = generateKey(value); store(persistenceKey, value); return persistenceKey; }
[ "default", "String", "store", "(", "final", "T", "value", ")", "{", "String", "persistenceKey", "=", "generateKey", "(", "value", ")", ";", "store", "(", "persistenceKey", ",", "value", ")", ";", "return", "persistenceKey", ";", "}" ]
Stores the value and returns its associated generated key for future lookup (e.g.
[ "Stores", "the", "value", "and", "returns", "its", "associated", "generated", "key", "for", "future", "lookup", "(", "e", ".", "g", "." ]
[]
[ { "param": "value", "type": "T" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "value", "type": "T", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 805, 514, 1707, 12, 6385, 399, 460, 13, 288, 203, 565, 514, 9756, 653, 273, 2103, 653, 12, 1132, 1769, 203, 565, 1707,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 75, 18, 5866, 16, 5527, 18, 2934, 203, 282, 380, 203, 282, 380, 632, 891, 460, 1021, 460, 358, 1707, 18, 203, 282, 380, 632, 2463, 1021, 4374, 498, 716, 848, 506, 1399, 364, 7849, 731, 333, 460, 18, 203, 282, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
38c27a3521eaace745801a97790e9668491a3553
jakeswenson/envelop
java/app-encryption/src/it/java/com/godaddy/asherah/multithreaded/MultiFactoryThreadedIT.java
[ "MIT" ]
Java
multiThreadedMultiFactoryUniquePartitionsEncryptDecrypt
null
@Test void multiThreadedMultiFactoryUniquePartitionsEncryptDecrypt() { ExecutorService pool = Executors.newFixedThreadPool(TEST_PARAM_NUM_THREADS); LongAdder tasksCompleted = new LongAdder(); IntStream.range(0, TEST_PARAM_NUM_REQUESTS) .parallel() .forEach(i -> { pool.submit(() -> { runPartitionTest(TEST_PARAM_NUM_ITERATIONS, String.format("request-%d", i), TEST_PARAM_PAYLOAD_SIZE_BYTES); tasksCompleted.increment(); }); }); try { pool.shutdown(); pool.awaitTermination(TEST_PARAM_THREAD_POOL_TIMEOUT_SECONDS, TimeUnit.SECONDS); } catch (InterruptedException e) { LOG.error("interrupted exception during thread pool shutdown", e); } assertEquals(TEST_PARAM_NUM_REQUESTS, tasksCompleted.intValue()); }
/** * Create multiple sessions from multiple factories * to encrypt and decrypt data for multiple partitions. * * Ensure keys get created properly, DRR's are created as expected, * and (future) collect timing information to ensure no thread is * starved more than others since there will be some locks in play. */
Create multiple sessions from multiple factories to encrypt and decrypt data for multiple partitions. Ensure keys get created properly, DRR's are created as expected, and (future) collect timing information to ensure no thread is starved more than others since there will be some locks in play.
[ "Create", "multiple", "sessions", "from", "multiple", "factories", "to", "encrypt", "and", "decrypt", "data", "for", "multiple", "partitions", ".", "Ensure", "keys", "get", "created", "properly", "DRR", "'", "s", "are", "created", "as", "expected", "and", "(", "future", ")", "collect", "timing", "information", "to", "ensure", "no", "thread", "is", "starved", "more", "than", "others", "since", "there", "will", "be", "some", "locks", "in", "play", "." ]
@Test void multiThreadedMultiFactoryUniquePartitionsEncryptDecrypt() { ExecutorService pool = Executors.newFixedThreadPool(TEST_PARAM_NUM_THREADS); LongAdder tasksCompleted = new LongAdder(); IntStream.range(0, TEST_PARAM_NUM_REQUESTS) .parallel() .forEach(i -> { pool.submit(() -> { runPartitionTest(TEST_PARAM_NUM_ITERATIONS, String.format("request-%d", i), TEST_PARAM_PAYLOAD_SIZE_BYTES); tasksCompleted.increment(); }); }); try { pool.shutdown(); pool.awaitTermination(TEST_PARAM_THREAD_POOL_TIMEOUT_SECONDS, TimeUnit.SECONDS); } catch (InterruptedException e) { LOG.error("interrupted exception during thread pool shutdown", e); } assertEquals(TEST_PARAM_NUM_REQUESTS, tasksCompleted.intValue()); }
[ "@", "Test", "void", "multiThreadedMultiFactoryUniquePartitionsEncryptDecrypt", "(", ")", "{", "ExecutorService", "pool", "=", "Executors", ".", "newFixedThreadPool", "(", "TEST_PARAM_NUM_THREADS", ")", ";", "LongAdder", "tasksCompleted", "=", "new", "LongAdder", "(", ")", ";", "IntStream", ".", "range", "(", "0", ",", "TEST_PARAM_NUM_REQUESTS", ")", ".", "parallel", "(", ")", ".", "forEach", "(", "i", "->", "{", "pool", ".", "submit", "(", "(", ")", "->", "{", "runPartitionTest", "(", "TEST_PARAM_NUM_ITERATIONS", ",", "String", ".", "format", "(", "\"request-%d\"", ",", "i", ")", ",", "TEST_PARAM_PAYLOAD_SIZE_BYTES", ")", ";", "tasksCompleted", ".", "increment", "(", ")", ";", "}", ")", ";", "}", ")", ";", "try", "{", "pool", ".", "shutdown", "(", ")", ";", "pool", ".", "awaitTermination", "(", "TEST_PARAM_THREAD_POOL_TIMEOUT_SECONDS", ",", "TimeUnit", ".", "SECONDS", ")", ";", "}", "catch", "(", "InterruptedException", "e", ")", "{", "LOG", ".", "error", "(", "\"interrupted exception during thread pool shutdown\"", ",", "e", ")", ";", "}", "assertEquals", "(", "TEST_PARAM_NUM_REQUESTS", ",", "tasksCompleted", ".", "intValue", "(", ")", ")", ";", "}" ]
Create multiple sessions from multiple factories to encrypt and decrypt data for multiple partitions.
[ "Create", "multiple", "sessions", "from", "multiple", "factories", "to", "encrypt", "and", "decrypt", "data", "for", "multiple", "partitions", "." ]
[]
[]
{ "returns": [], "raises": [], "params": [], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 632, 4709, 203, 225, 918, 3309, 1315, 20528, 5002, 1733, 6303, 13738, 13129, 17306, 1435, 288, 203, 565, 27299, 2845, 273, 3889, 13595, 18, 2704, 7505, 20621, 12, 16961, 67, 8388, 67, 6069, 67, 21730, 55, 1769, 203, 565, 3407, 986, 264, 4592, 9556, 273, 394, 3407, 986, 264, 5621, 203, 203, 565, 3094, 1228, 18, 3676, 12, 20, 16, 22130, 67, 8388, 67, 6069, 67, 5519, 55, 13, 203, 1377, 263, 18054, 1435, 203, 1377, 263, 1884, 3442, 12, 77, 317, 288, 203, 3639, 2845, 18, 9297, 12, 1435, 317, 288, 203, 1850, 1086, 7003, 4709, 12, 16961, 67, 8388, 67, 6069, 67, 11844, 15297, 16, 514, 18, 2139, 2932, 2293, 6456, 72, 3113, 277, 3631, 22130, 67, 8388, 67, 11389, 7783, 67, 4574, 67, 13718, 1769, 203, 1850, 4592, 9556, 18, 15016, 5621, 203, 3639, 15549, 203, 1377, 15549, 203, 203, 565, 775, 288, 203, 1377, 2845, 18, 15132, 5621, 203, 1377, 2845, 18, 30515, 16516, 12, 16961, 67, 8388, 67, 21730, 67, 20339, 67, 9503, 67, 11609, 16, 9206, 18, 11609, 1769, 203, 565, 289, 203, 565, 1044, 261, 24485, 503, 425, 13, 288, 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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 282, 380, 1788, 3229, 8856, 628, 3229, 17456, 203, 282, 380, 358, 7347, 471, 8420, 501, 364, 3229, 10060, 18, 203, 282, 380, 203, 282, 380, 7693, 1311, 336, 2522, 8214, 16, 16801, 54, 1807, 854, 2522, 487, 2665, 16, 203, 282, 380, 471, 261, 14343, 13, 3274, 15538, 1779, 358, 3387, 1158, 2650, 353, 203, 282, 380, 10443, 2155, 1898, 2353, 10654, 3241, 1915, 903, 506, 2690, 13046, 316, 6599, 18, 203, 282, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
38c27a3521eaace745801a97790e9668491a3553
jakeswenson/envelop
java/app-encryption/src/it/java/com/godaddy/asherah/multithreaded/MultiFactoryThreadedIT.java
[ "MIT" ]
Java
multiThreadedMultiFactorySamePartitionEncryptDecrypt
null
@Test void multiThreadedMultiFactorySamePartitionEncryptDecrypt() { ExecutorService pool = Executors.newFixedThreadPool(TEST_PARAM_NUM_THREADS); LongAdder tasksCompleted = new LongAdder(); IntStream.range(0, TEST_PARAM_NUM_REQUESTS) .parallel() .forEach(i -> { pool.submit(() -> { runPartitionTest(TEST_PARAM_NUM_ITERATIONS, DEFAULT_PARTITION_ID, TEST_PARAM_PAYLOAD_SIZE_BYTES); tasksCompleted.increment(); }); }); try { pool.shutdown(); pool.awaitTermination(TEST_PARAM_THREAD_POOL_TIMEOUT_SECONDS, TimeUnit.SECONDS); } catch (InterruptedException e) { LOG.error("interrupted exception during thread pool shutdown", e); } assertEquals(TEST_PARAM_NUM_REQUESTS, tasksCompleted.intValue()); }
/** * Using the same partition id, create multiple sessions * from multiple factories to encrypt and decrypt data. * * Ensure keys get created properly, DRR's are created as expected, * and (future) collect timing information to ensure no thread is * starved more than others since there will be some locks in play. */
Using the same partition id, create multiple sessions from multiple factories to encrypt and decrypt data. Ensure keys get created properly, DRR's are created as expected, and (future) collect timing information to ensure no thread is starved more than others since there will be some locks in play.
[ "Using", "the", "same", "partition", "id", "create", "multiple", "sessions", "from", "multiple", "factories", "to", "encrypt", "and", "decrypt", "data", ".", "Ensure", "keys", "get", "created", "properly", "DRR", "'", "s", "are", "created", "as", "expected", "and", "(", "future", ")", "collect", "timing", "information", "to", "ensure", "no", "thread", "is", "starved", "more", "than", "others", "since", "there", "will", "be", "some", "locks", "in", "play", "." ]
@Test void multiThreadedMultiFactorySamePartitionEncryptDecrypt() { ExecutorService pool = Executors.newFixedThreadPool(TEST_PARAM_NUM_THREADS); LongAdder tasksCompleted = new LongAdder(); IntStream.range(0, TEST_PARAM_NUM_REQUESTS) .parallel() .forEach(i -> { pool.submit(() -> { runPartitionTest(TEST_PARAM_NUM_ITERATIONS, DEFAULT_PARTITION_ID, TEST_PARAM_PAYLOAD_SIZE_BYTES); tasksCompleted.increment(); }); }); try { pool.shutdown(); pool.awaitTermination(TEST_PARAM_THREAD_POOL_TIMEOUT_SECONDS, TimeUnit.SECONDS); } catch (InterruptedException e) { LOG.error("interrupted exception during thread pool shutdown", e); } assertEquals(TEST_PARAM_NUM_REQUESTS, tasksCompleted.intValue()); }
[ "@", "Test", "void", "multiThreadedMultiFactorySamePartitionEncryptDecrypt", "(", ")", "{", "ExecutorService", "pool", "=", "Executors", ".", "newFixedThreadPool", "(", "TEST_PARAM_NUM_THREADS", ")", ";", "LongAdder", "tasksCompleted", "=", "new", "LongAdder", "(", ")", ";", "IntStream", ".", "range", "(", "0", ",", "TEST_PARAM_NUM_REQUESTS", ")", ".", "parallel", "(", ")", ".", "forEach", "(", "i", "->", "{", "pool", ".", "submit", "(", "(", ")", "->", "{", "runPartitionTest", "(", "TEST_PARAM_NUM_ITERATIONS", ",", "DEFAULT_PARTITION_ID", ",", "TEST_PARAM_PAYLOAD_SIZE_BYTES", ")", ";", "tasksCompleted", ".", "increment", "(", ")", ";", "}", ")", ";", "}", ")", ";", "try", "{", "pool", ".", "shutdown", "(", ")", ";", "pool", ".", "awaitTermination", "(", "TEST_PARAM_THREAD_POOL_TIMEOUT_SECONDS", ",", "TimeUnit", ".", "SECONDS", ")", ";", "}", "catch", "(", "InterruptedException", "e", ")", "{", "LOG", ".", "error", "(", "\"interrupted exception during thread pool shutdown\"", ",", "e", ")", ";", "}", "assertEquals", "(", "TEST_PARAM_NUM_REQUESTS", ",", "tasksCompleted", ".", "intValue", "(", ")", ")", ";", "}" ]
Using the same partition id, create multiple sessions from multiple factories to encrypt and decrypt data.
[ "Using", "the", "same", "partition", "id", "create", "multiple", "sessions", "from", "multiple", "factories", "to", "encrypt", "and", "decrypt", "data", "." ]
[]
[]
{ "returns": [], "raises": [], "params": [], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 632, 4709, 203, 225, 918, 3309, 1315, 20528, 5002, 1733, 8650, 7003, 13129, 17306, 1435, 288, 203, 565, 27299, 2845, 273, 3889, 13595, 18, 2704, 7505, 20621, 12, 16961, 67, 8388, 67, 6069, 67, 21730, 55, 1769, 203, 565, 3407, 986, 264, 4592, 9556, 273, 394, 3407, 986, 264, 5621, 203, 203, 565, 3094, 1228, 18, 3676, 12, 20, 16, 22130, 67, 8388, 67, 6069, 67, 5519, 55, 13, 203, 1377, 263, 18054, 1435, 203, 1377, 263, 1884, 3442, 12, 77, 317, 288, 203, 3639, 2845, 18, 9297, 12, 1435, 317, 288, 203, 1850, 1086, 7003, 4709, 12, 16961, 67, 8388, 67, 6069, 67, 11844, 15297, 16, 3331, 67, 15055, 7022, 67, 734, 16, 22130, 67, 8388, 67, 11389, 7783, 67, 4574, 67, 13718, 1769, 203, 1850, 4592, 9556, 18, 15016, 5621, 203, 3639, 15549, 203, 1377, 15549, 203, 203, 565, 775, 288, 203, 1377, 2845, 18, 15132, 5621, 203, 1377, 2845, 18, 30515, 16516, 12, 16961, 67, 8388, 67, 21730, 67, 20339, 67, 9503, 67, 11609, 16, 9206, 18, 11609, 1769, 203, 565, 289, 203, 565, 1044, 261, 24485, 503, 425, 13, 288, 203, 1377, 2018, 18, 1636, 2932, 474, 5954, 1520, 4982, 2650, 2845, 5731, 3113, 425, 1769, 203, 565, 289, 203, 203, 565, 1815, 8867, 12, 16961, 67, 8388, 67, 6069, 67, 5519, 55, 16, 4592, 9556, 18, 474, 620, 10663, 203, 225, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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0 ]
[ 1, 26873, 203, 282, 380, 11637, 326, 1967, 3590, 612, 16, 752, 3229, 8856, 203, 282, 380, 628, 3229, 17456, 358, 7347, 471, 8420, 501, 18, 203, 282, 380, 203, 282, 380, 7693, 1311, 336, 2522, 8214, 16, 16801, 54, 1807, 854, 2522, 487, 2665, 16, 203, 282, 380, 471, 261, 14343, 13, 3274, 15538, 1779, 358, 3387, 1158, 2650, 353, 203, 282, 380, 10443, 2155, 1898, 2353, 10654, 3241, 1915, 903, 506, 2690, 13046, 316, 6599, 18, 203, 282, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
395bd896bb45d89e50f45c54dcfd69e91284c60a
jakeswenson/envelop
java/app-encryption/src/main/java/com/godaddy/asherah/appencryption/Session.java
[ "MIT" ]
Java
store
String
default String store(final P payload, final Persistence<D> dataPersistence) { D dataRowRecord = encrypt(payload); return dataPersistence.store(dataRowRecord); }
/** * Encrypts a payload, stores the resulting Data Row Record into the provided data persistence store, and returns its * associated persistence key for future lookups. * * @param payload The payload to encrypt and store. * @param dataPersistence The data persistence store to use. * @return The persistence key associated with the stored Data Row Record. */
Encrypts a payload, stores the resulting Data Row Record into the provided data persistence store, and returns its associated persistence key for future lookups. @param payload The payload to encrypt and store. @param dataPersistence The data persistence store to use. @return The persistence key associated with the stored Data Row Record.
[ "Encrypts", "a", "payload", "stores", "the", "resulting", "Data", "Row", "Record", "into", "the", "provided", "data", "persistence", "store", "and", "returns", "its", "associated", "persistence", "key", "for", "future", "lookups", ".", "@param", "payload", "The", "payload", "to", "encrypt", "and", "store", ".", "@param", "dataPersistence", "The", "data", "persistence", "store", "to", "use", ".", "@return", "The", "persistence", "key", "associated", "with", "the", "stored", "Data", "Row", "Record", "." ]
default String store(final P payload, final Persistence<D> dataPersistence) { D dataRowRecord = encrypt(payload); return dataPersistence.store(dataRowRecord); }
[ "default", "String", "store", "(", "final", "P", "payload", ",", "final", "Persistence", "<", "D", ">", "dataPersistence", ")", "{", "D", "dataRowRecord", "=", "encrypt", "(", "payload", ")", ";", "return", "dataPersistence", ".", "store", "(", "dataRowRecord", ")", ";", "}" ]
Encrypts a payload, stores the resulting Data Row Record into the provided data persistence store, and returns its associated persistence key for future lookups.
[ "Encrypts", "a", "payload", "stores", "the", "resulting", "Data", "Row", "Record", "into", "the", "provided", "data", "persistence", "store", "and", "returns", "its", "associated", "persistence", "key", "for", "future", "lookups", "." ]
[]
[ { "param": "payload", "type": "P" }, { "param": "dataPersistence", "type": "Persistence<D>" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "payload", "type": "P", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "dataPersistence", "type": "Persistence<D>", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 805, 514, 1707, 12, 6385, 453, 2385, 16, 727, 13381, 32, 40, 34, 501, 13182, 13, 288, 203, 565, 463, 31659, 2115, 273, 7347, 12, 7648, 1769, 203, 203, 565, 327, 501, 13182, 18, 2233, 12, 892, 1999, 2115, 1769, 203, 225, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,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 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 282, 380, 8594, 20261, 279, 2385, 16, 9064, 326, 8156, 1910, 6556, 5059, 1368, 326, 2112, 501, 9756, 1707, 16, 471, 1135, 2097, 203, 282, 380, 3627, 9756, 498, 364, 3563, 20286, 18, 203, 282, 380, 203, 282, 380, 632, 891, 2385, 1021, 2385, 358, 7347, 471, 1707, 18, 203, 282, 380, 632, 891, 501, 13182, 1021, 501, 9756, 1707, 358, 999, 18, 203, 282, 380, 632, 2463, 1021, 9756, 498, 3627, 598, 326, 4041, 1910, 6556, 5059, 18, 203, 282, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
395bd896bb45d89e50f45c54dcfd69e91284c60a
jakeswenson/envelop
java/app-encryption/src/main/java/com/godaddy/asherah/appencryption/Session.java
[ "MIT" ]
Java
store
null
default void store(final String key, final P payload, final Persistence<D> dataPersistence) { D dataRowRecord = encrypt(payload); dataPersistence.store(key, dataRowRecord); }
/** * Encrypts a payload, stores the resulting Data Row Record into the provided data persistence store with given key. * * @param key The key to associate the Data Row Record with. * @param payload The payload to encrypt and store. * @param dataPersistence The data persistence store to use. */
Encrypts a payload, stores the resulting Data Row Record into the provided data persistence store with given key. @param key The key to associate the Data Row Record with. @param payload The payload to encrypt and store. @param dataPersistence The data persistence store to use.
[ "Encrypts", "a", "payload", "stores", "the", "resulting", "Data", "Row", "Record", "into", "the", "provided", "data", "persistence", "store", "with", "given", "key", ".", "@param", "key", "The", "key", "to", "associate", "the", "Data", "Row", "Record", "with", ".", "@param", "payload", "The", "payload", "to", "encrypt", "and", "store", ".", "@param", "dataPersistence", "The", "data", "persistence", "store", "to", "use", "." ]
default void store(final String key, final P payload, final Persistence<D> dataPersistence) { D dataRowRecord = encrypt(payload); dataPersistence.store(key, dataRowRecord); }
[ "default", "void", "store", "(", "final", "String", "key", ",", "final", "P", "payload", ",", "final", "Persistence", "<", "D", ">", "dataPersistence", ")", "{", "D", "dataRowRecord", "=", "encrypt", "(", "payload", ")", ";", "dataPersistence", ".", "store", "(", "key", ",", "dataRowRecord", ")", ";", "}" ]
Encrypts a payload, stores the resulting Data Row Record into the provided data persistence store with given key.
[ "Encrypts", "a", "payload", "stores", "the", "resulting", "Data", "Row", "Record", "into", "the", "provided", "data", "persistence", "store", "with", "given", "key", "." ]
[]
[ { "param": "key", "type": "String" }, { "param": "payload", "type": "P" }, { "param": "dataPersistence", "type": "Persistence<D>" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "key", "type": "String", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "payload", "type": "P", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "dataPersistence", "type": "Persistence<D>", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 805, 918, 1707, 12, 6385, 514, 498, 16, 727, 453, 2385, 16, 727, 13381, 32, 40, 34, 501, 13182, 13, 288, 203, 565, 463, 31659, 2115, 273, 7347, 12, 7648, 1769, 203, 203, 565, 501, 13182, 18, 2233, 12, 856, 16, 31659, 2115, 1769, 203, 225, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,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 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 282, 380, 8594, 20261, 279, 2385, 16, 9064, 326, 8156, 1910, 6556, 5059, 1368, 326, 2112, 501, 9756, 1707, 598, 864, 498, 18, 203, 282, 380, 203, 282, 380, 632, 891, 498, 1021, 498, 358, 13251, 326, 1910, 6556, 5059, 598, 18, 203, 282, 380, 632, 891, 2385, 1021, 2385, 358, 7347, 471, 1707, 18, 203, 282, 380, 632, 891, 501, 13182, 1021, 501, 9756, 1707, 358, 999, 18, 203, 282, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
0eb33d1a43ab3f2c2a1264157932ca6b125f6e92
jakeswenson/envelop
java/app-encryption/src/main/java/com/godaddy/asherah/appencryption/envelope/EnvelopeEncryptionJsonImpl.java
[ "MIT" ]
Java
withIntermediateKeyForRead
T
<T> T withIntermediateKeyForRead(final KeyMeta intermediateKeyMeta, final Function<CryptoKey, T> functionWithIntermediateKey) { // Get from cache or lookup previously used key CryptoKey intermediateKey = intermediateKeyCache.get(intermediateKeyMeta.getCreated()); if (intermediateKey == null) { intermediateKey = getIntermediateKey(intermediateKeyMeta); // Put the key into our cache if allowed if (cryptoPolicy.canCacheIntermediateKeys()) { try { logger.debug("attempting to update cache for IK {} with created {}", partition.getIntermediateKeyId(), intermediateKey.getCreated()); intermediateKey = intermediateKeyCache.putAndGetUsable(intermediateKey.getCreated(), intermediateKey); } catch (Exception e) { closeKey(intermediateKey, e); throw new AppEncryptionException("Unable to update cache for Intermediate Key", e); } } } if (cryptoPolicy.notifyExpiredIntermediateKeyOnRead() && isKeyExpiredOrRevoked(intermediateKey)) { // TODO Send notification that a DRK is using an expired IK logger.debug("NOTIFICATION: Expired IK {} in use during read", intermediateKeyMeta); } return applyFunctionAndCloseKey(intermediateKey, functionWithIntermediateKey); }
/** * Calls a function using a decrypted intermediate key that was previously used. * * @param intermediateKeyMeta The {@code IntermediateKey} meta used previously to write a DRR. * @param functionWithIntermediateKey The function to call using the decrypted intermediate key. * @return The result returned by the {@code functionWithIntermediateKey}. * @throws MetadataMissingException If the intermediate key is not found, or it has missing system key info. */
Calls a function using a decrypted intermediate key that was previously used. @param intermediateKeyMeta The IntermediateKey meta used previously to write a DRR. @param functionWithIntermediateKey The function to call using the decrypted intermediate key. @return The result returned by the functionWithIntermediateKey. @throws MetadataMissingException If the intermediate key is not found, or it has missing system key info.
[ "Calls", "a", "function", "using", "a", "decrypted", "intermediate", "key", "that", "was", "previously", "used", ".", "@param", "intermediateKeyMeta", "The", "IntermediateKey", "meta", "used", "previously", "to", "write", "a", "DRR", ".", "@param", "functionWithIntermediateKey", "The", "function", "to", "call", "using", "the", "decrypted", "intermediate", "key", ".", "@return", "The", "result", "returned", "by", "the", "functionWithIntermediateKey", ".", "@throws", "MetadataMissingException", "If", "the", "intermediate", "key", "is", "not", "found", "or", "it", "has", "missing", "system", "key", "info", "." ]
<T> T withIntermediateKeyForRead(final KeyMeta intermediateKeyMeta, final Function<CryptoKey, T> functionWithIntermediateKey) { CryptoKey intermediateKey = intermediateKeyCache.get(intermediateKeyMeta.getCreated()); if (intermediateKey == null) { intermediateKey = getIntermediateKey(intermediateKeyMeta); if (cryptoPolicy.canCacheIntermediateKeys()) { try { logger.debug("attempting to update cache for IK {} with created {}", partition.getIntermediateKeyId(), intermediateKey.getCreated()); intermediateKey = intermediateKeyCache.putAndGetUsable(intermediateKey.getCreated(), intermediateKey); } catch (Exception e) { closeKey(intermediateKey, e); throw new AppEncryptionException("Unable to update cache for Intermediate Key", e); } } } if (cryptoPolicy.notifyExpiredIntermediateKeyOnRead() && isKeyExpiredOrRevoked(intermediateKey)) { logger.debug("NOTIFICATION: Expired IK {} in use during read", intermediateKeyMeta); } return applyFunctionAndCloseKey(intermediateKey, functionWithIntermediateKey); }
[ "<", "T", ">", "T", "withIntermediateKeyForRead", "(", "final", "KeyMeta", "intermediateKeyMeta", ",", "final", "Function", "<", "CryptoKey", ",", "T", ">", "functionWithIntermediateKey", ")", "{", "CryptoKey", "intermediateKey", "=", "intermediateKeyCache", ".", "get", "(", "intermediateKeyMeta", ".", "getCreated", "(", ")", ")", ";", "if", "(", "intermediateKey", "==", "null", ")", "{", "intermediateKey", "=", "getIntermediateKey", "(", "intermediateKeyMeta", ")", ";", "if", "(", "cryptoPolicy", ".", "canCacheIntermediateKeys", "(", ")", ")", "{", "try", "{", "logger", ".", "debug", "(", "\"attempting to update cache for IK {} with created {}\"", ",", "partition", ".", "getIntermediateKeyId", "(", ")", ",", "intermediateKey", ".", "getCreated", "(", ")", ")", ";", "intermediateKey", "=", "intermediateKeyCache", ".", "putAndGetUsable", "(", "intermediateKey", ".", "getCreated", "(", ")", ",", "intermediateKey", ")", ";", "}", "catch", "(", "Exception", "e", ")", "{", "closeKey", "(", "intermediateKey", ",", "e", ")", ";", "throw", "new", "AppEncryptionException", "(", "\"Unable to update cache for Intermediate Key\"", ",", "e", ")", ";", "}", "}", "}", "if", "(", "cryptoPolicy", ".", "notifyExpiredIntermediateKeyOnRead", "(", ")", "&&", "isKeyExpiredOrRevoked", "(", "intermediateKey", ")", ")", "{", "logger", ".", "debug", "(", "\"NOTIFICATION: Expired IK {} in use during read\"", ",", "intermediateKeyMeta", ")", ";", "}", "return", "applyFunctionAndCloseKey", "(", "intermediateKey", ",", "functionWithIntermediateKey", ")", ";", "}" ]
Calls a function using a decrypted intermediate key that was previously used.
[ "Calls", "a", "function", "using", "a", "decrypted", "intermediate", "key", "that", "was", "previously", "used", "." ]
[ "// Get from cache or lookup previously used key", "// Put the key into our cache if allowed", "// TODO Send notification that a DRK is using an expired IK" ]
[ { "param": "intermediateKeyMeta", "type": "KeyMeta" }, { "param": "functionWithIntermediateKey", "type": "Function<CryptoKey, T>" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "intermediateKeyMeta", "type": "KeyMeta", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "functionWithIntermediateKey", "type": "Function<CryptoKey, T>", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 411, 56, 34, 399, 598, 2465, 6785, 653, 1290, 1994, 12, 6385, 1929, 2781, 12110, 653, 2781, 16, 203, 1377, 727, 4284, 32, 18048, 653, 16, 399, 34, 445, 1190, 2465, 6785, 653, 13, 288, 203, 565, 368, 968, 628, 1247, 578, 3689, 7243, 1399, 498, 203, 565, 15629, 653, 12110, 653, 273, 12110, 653, 1649, 18, 588, 12, 2761, 6785, 653, 2781, 18, 588, 6119, 10663, 203, 565, 309, 261, 2761, 6785, 653, 422, 446, 13, 288, 203, 1377, 12110, 653, 273, 336, 2465, 6785, 653, 12, 2761, 6785, 653, 2781, 1769, 203, 203, 1377, 368, 4399, 326, 498, 1368, 3134, 1247, 309, 2935, 203, 1377, 309, 261, 18489, 2582, 18, 4169, 1649, 2465, 6785, 2396, 10756, 288, 203, 3639, 775, 288, 203, 1850, 1194, 18, 4148, 2932, 11764, 310, 358, 1089, 1247, 364, 467, 47, 2618, 598, 2522, 3728, 16, 203, 2868, 3590, 18, 588, 2465, 6785, 14140, 9334, 12110, 653, 18, 588, 6119, 10663, 203, 1850, 12110, 653, 273, 12110, 653, 1649, 18, 458, 14042, 27682, 12, 2761, 6785, 653, 18, 588, 6119, 9334, 12110, 653, 1769, 203, 3639, 289, 203, 3639, 1044, 261, 503, 425, 13, 288, 203, 1850, 1746, 653, 12, 2761, 6785, 653, 16, 425, 1769, 203, 1850, 604, 394, 4677, 7894, 503, 2932, 3370, 358, 1089, 1247, 364, 5294, 6785, 1929, 3113, 425, 1769, 203, 3639, 289, 203, 1377, 289, 203, 565, 289, 203, 203, 565, 309, 261, 18489, 2582, 18, 12336, 10556, 2465, 6785, 653, 1398, 1994, 1435, 597, 353, 653, 10556, 1162, 10070, 14276, 12, 2761, 6785, 653, 3719, 288, 203, 1377, 368, 2660, 2479, 3851, 716, 279, 16801, 47, 353, 1450, 392, 7708, 467, 47, 203, 1377, 1194, 18, 4148, 2932, 4400, 14865, 30, 7784, 2921, 467, 47, 2618, 316, 999, 4982, 855, 3113, 12110, 653, 2781, 1769, 203, 565, 289, 203, 203, 565, 327, 2230, 2083, 1876, 4605, 653, 12, 2761, 6785, 653, 16, 445, 1190, 2465, 6785, 653, 1769, 203, 225, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1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 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 282, 380, 23665, 279, 445, 1450, 279, 13794, 12110, 498, 716, 1703, 7243, 1399, 18, 203, 282, 380, 203, 282, 380, 632, 891, 12110, 653, 2781, 1021, 8901, 710, 5294, 6785, 653, 97, 2191, 1399, 7243, 358, 1045, 279, 16801, 54, 18, 203, 282, 380, 632, 891, 445, 1190, 2465, 6785, 653, 1021, 445, 358, 745, 1450, 326, 13794, 12110, 498, 18, 203, 282, 380, 632, 2463, 1021, 563, 2106, 635, 326, 8901, 710, 445, 1190, 2465, 6785, 653, 5496, 203, 282, 380, 632, 15069, 6912, 4841, 503, 971, 326, 12110, 498, 353, 486, 1392, 16, 578, 518, 711, 3315, 2619, 498, 1123, 18, 203, 282, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
0eb33d1a43ab3f2c2a1264157932ca6b125f6e92
jakeswenson/envelop
java/app-encryption/src/main/java/com/godaddy/asherah/appencryption/envelope/EnvelopeEncryptionJsonImpl.java
[ "MIT" ]
Java
withExistingSystemKey
T
<T> T withExistingSystemKey(final KeyMeta systemKeyMeta, final boolean treatExpiredAsMissing, final Function<CryptoKey, T> functionWithSystemKey) { // Get from cache or lookup previously used key CryptoKey systemKey = systemKeyCache.get(systemKeyMeta.getCreated()); if (systemKey == null) { systemKey = getSystemKey(systemKeyMeta); // Put the key into our cache if allowed if (cryptoPolicy.canCacheSystemKeys()) { try { logger.debug("attempting to update cache for SK {}", systemKeyMeta); systemKey = systemKeyCache.putAndGetUsable(systemKeyMeta.getCreated(), systemKey); } catch (Exception e) { closeKey(systemKey, e); throw new AppEncryptionException("Unable to update cache for SystemKey", e); } } } if (isKeyExpiredOrRevoked(systemKey)) { if (treatExpiredAsMissing) { closeKey(systemKey, null); throw new MetadataMissingException("System key is expired/revoked, keyMeta = " + systemKeyMeta); } // There's an implied else here if (cryptoPolicy.notifyExpiredSystemKeyOnRead()) { // TODO Send notification that an SK is expired logger.debug("NOTIFICATION: Expired SK {} in use during read", systemKeyMeta); } } return applyFunctionAndCloseKey(systemKey, functionWithSystemKey); }
/** * Calls a function using a decrypted system key that was previously used. * * @param systemKeyMeta The {@code SystemKey} meta used previously to write an IK. * @param treatExpiredAsMissing If {@code true}, will throw a {@code MetadataMissingException} if the key is * expired/revoked. * @param functionWithSystemKey The function to call using the decrypted system key. * @return The result returned by the {@code functionWithSystemKey}. * @throws MetadataMissingException If the system key is not found, or if its expired/revoked and {@code * treatExpiredAsMissing} is {@code true}. */
Calls a function using a decrypted system key that was previously used. @param systemKeyMeta The SystemKey meta used previously to write an IK. @param treatExpiredAsMissing If true, will throw a MetadataMissingException if the key is expired/revoked. @param functionWithSystemKey The function to call using the decrypted system key. @return The result returned by the functionWithSystemKey. @throws MetadataMissingException If the system key is not found, or if its expired/revoked and {@code treatExpiredAsMissing} is true.
[ "Calls", "a", "function", "using", "a", "decrypted", "system", "key", "that", "was", "previously", "used", ".", "@param", "systemKeyMeta", "The", "SystemKey", "meta", "used", "previously", "to", "write", "an", "IK", ".", "@param", "treatExpiredAsMissing", "If", "true", "will", "throw", "a", "MetadataMissingException", "if", "the", "key", "is", "expired", "/", "revoked", ".", "@param", "functionWithSystemKey", "The", "function", "to", "call", "using", "the", "decrypted", "system", "key", ".", "@return", "The", "result", "returned", "by", "the", "functionWithSystemKey", ".", "@throws", "MetadataMissingException", "If", "the", "system", "key", "is", "not", "found", "or", "if", "its", "expired", "/", "revoked", "and", "{", "@code", "treatExpiredAsMissing", "}", "is", "true", "." ]
<T> T withExistingSystemKey(final KeyMeta systemKeyMeta, final boolean treatExpiredAsMissing, final Function<CryptoKey, T> functionWithSystemKey) { CryptoKey systemKey = systemKeyCache.get(systemKeyMeta.getCreated()); if (systemKey == null) { systemKey = getSystemKey(systemKeyMeta); if (cryptoPolicy.canCacheSystemKeys()) { try { logger.debug("attempting to update cache for SK {}", systemKeyMeta); systemKey = systemKeyCache.putAndGetUsable(systemKeyMeta.getCreated(), systemKey); } catch (Exception e) { closeKey(systemKey, e); throw new AppEncryptionException("Unable to update cache for SystemKey", e); } } } if (isKeyExpiredOrRevoked(systemKey)) { if (treatExpiredAsMissing) { closeKey(systemKey, null); throw new MetadataMissingException("System key is expired/revoked, keyMeta = " + systemKeyMeta); } if (cryptoPolicy.notifyExpiredSystemKeyOnRead()) { logger.debug("NOTIFICATION: Expired SK {} in use during read", systemKeyMeta); } } return applyFunctionAndCloseKey(systemKey, functionWithSystemKey); }
[ "<", "T", ">", "T", "withExistingSystemKey", "(", "final", "KeyMeta", "systemKeyMeta", ",", "final", "boolean", "treatExpiredAsMissing", ",", "final", "Function", "<", "CryptoKey", ",", "T", ">", "functionWithSystemKey", ")", "{", "CryptoKey", "systemKey", "=", "systemKeyCache", ".", "get", "(", "systemKeyMeta", ".", "getCreated", "(", ")", ")", ";", "if", "(", "systemKey", "==", "null", ")", "{", "systemKey", "=", "getSystemKey", "(", "systemKeyMeta", ")", ";", "if", "(", "cryptoPolicy", ".", "canCacheSystemKeys", "(", ")", ")", "{", "try", "{", "logger", ".", "debug", "(", "\"attempting to update cache for SK {}\"", ",", "systemKeyMeta", ")", ";", "systemKey", "=", "systemKeyCache", ".", "putAndGetUsable", "(", "systemKeyMeta", ".", "getCreated", "(", ")", ",", "systemKey", ")", ";", "}", "catch", "(", "Exception", "e", ")", "{", "closeKey", "(", "systemKey", ",", "e", ")", ";", "throw", "new", "AppEncryptionException", "(", "\"Unable to update cache for SystemKey\"", ",", "e", ")", ";", "}", "}", "}", "if", "(", "isKeyExpiredOrRevoked", "(", "systemKey", ")", ")", "{", "if", "(", "treatExpiredAsMissing", ")", "{", "closeKey", "(", "systemKey", ",", "null", ")", ";", "throw", "new", "MetadataMissingException", "(", "\"System key is expired/revoked, keyMeta = \"", "+", "systemKeyMeta", ")", ";", "}", "if", "(", "cryptoPolicy", ".", "notifyExpiredSystemKeyOnRead", "(", ")", ")", "{", "logger", ".", "debug", "(", "\"NOTIFICATION: Expired SK {} in use during read\"", ",", "systemKeyMeta", ")", ";", "}", "}", "return", "applyFunctionAndCloseKey", "(", "systemKey", ",", "functionWithSystemKey", ")", ";", "}" ]
Calls a function using a decrypted system key that was previously used.
[ "Calls", "a", "function", "using", "a", "decrypted", "system", "key", "that", "was", "previously", "used", "." ]
[ "// Get from cache or lookup previously used key", "// Put the key into our cache if allowed", "// There's an implied else here", "// TODO Send notification that an SK is expired" ]
[ { "param": "systemKeyMeta", "type": "KeyMeta" }, { "param": "treatExpiredAsMissing", "type": "boolean" }, { "param": "functionWithSystemKey", "type": "Function<CryptoKey, T>" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "systemKeyMeta", "type": "KeyMeta", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "treatExpiredAsMissing", "type": "boolean", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "functionWithSystemKey", "type": "Function<CryptoKey, T>", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 411, 56, 34, 399, 598, 9895, 3163, 653, 12, 6385, 1929, 2781, 2619, 653, 2781, 16, 727, 1250, 10116, 10556, 1463, 4841, 16, 203, 1377, 727, 4284, 32, 18048, 653, 16, 399, 34, 445, 1190, 3163, 653, 13, 288, 203, 565, 368, 968, 628, 1247, 578, 3689, 7243, 1399, 498, 203, 565, 15629, 653, 2619, 653, 273, 2619, 653, 1649, 18, 588, 12, 4299, 653, 2781, 18, 588, 6119, 10663, 203, 565, 309, 261, 4299, 653, 422, 446, 13, 288, 203, 1377, 2619, 653, 273, 12996, 653, 12, 4299, 653, 2781, 1769, 203, 203, 1377, 368, 4399, 326, 498, 1368, 3134, 1247, 309, 2935, 203, 1377, 309, 261, 18489, 2582, 18, 4169, 1649, 3163, 2396, 10756, 288, 203, 3639, 775, 288, 203, 1850, 1194, 18, 4148, 2932, 11764, 310, 358, 1089, 1247, 364, 12038, 3728, 16, 2619, 653, 2781, 1769, 203, 1850, 2619, 653, 273, 2619, 653, 1649, 18, 458, 14042, 27682, 12, 4299, 653, 2781, 18, 588, 6119, 9334, 2619, 653, 1769, 203, 3639, 289, 203, 3639, 1044, 261, 503, 425, 13, 288, 203, 1850, 1746, 653, 12, 4299, 653, 16, 425, 1769, 203, 1850, 604, 394, 4677, 7894, 503, 2932, 3370, 358, 1089, 1247, 364, 2332, 653, 3113, 425, 1769, 203, 3639, 289, 203, 1377, 289, 203, 565, 289, 203, 203, 565, 309, 261, 291, 653, 10556, 1162, 10070, 14276, 12, 4299, 653, 3719, 288, 203, 1377, 309, 261, 17283, 10556, 1463, 4841, 13, 288, 203, 3639, 1746, 653, 12, 4299, 653, 16, 446, 1769, 203, 3639, 604, 394, 6912, 4841, 503, 2932, 3163, 498, 353, 7708, 19, 9083, 14276, 16, 498, 2781, 273, 315, 397, 2619, 653, 2781, 1769, 203, 1377, 289, 203, 203, 1377, 368, 6149, 1807, 392, 23547, 469, 2674, 203, 1377, 309, 261, 18489, 2582, 18, 12336, 10556, 3163, 653, 1398, 1994, 10756, 288, 203, 3639, 368, 2660, 2479, 3851, 716, 392, 12038, 353, 7708, 203, 3639, 1194, 18, 4148, 2932, 4400, 14865, 30, 7784, 2921, 12038, 2618, 316, 999, 4982, 855, 3113, 2619, 653, 2781, 1769, 203, 1377, 289, 203, 565, 289, 203,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0 ]
[ 1, 26873, 203, 282, 380, 23665, 279, 445, 1450, 279, 13794, 2619, 498, 716, 1703, 7243, 1399, 18, 203, 282, 380, 203, 282, 380, 632, 891, 2619, 653, 2781, 1021, 8901, 710, 2332, 653, 97, 2191, 1399, 7243, 358, 1045, 392, 467, 47, 18, 203, 282, 380, 632, 891, 10116, 10556, 1463, 4841, 971, 8901, 710, 638, 5779, 903, 604, 279, 8901, 710, 6912, 4841, 503, 97, 309, 326, 498, 353, 203, 282, 380, 7708, 19, 9083, 14276, 18, 203, 282, 380, 632, 891, 445, 1190, 3163, 653, 1021, 445, 358, 745, 1450, 326, 13794, 2619, 498, 18, 203, 282, 380, 632, 2463, 1021, 563, 2106, 635, 326, 8901, 710, 445, 1190, 3163, 653, 5496, 203, 282, 380, 632, 15069, 6912, 4841, 503, 971, 326, 2619, 498, 2 ]
0eb33d1a43ab3f2c2a1264157932ca6b125f6e92
jakeswenson/envelop
java/app-encryption/src/main/java/com/godaddy/asherah/appencryption/envelope/EnvelopeEncryptionJsonImpl.java
[ "MIT" ]
Java
loadKeyRecord
EnvelopeKeyRecord
EnvelopeKeyRecord loadKeyRecord(final String keyId, final Instant created) { logger.debug("attempting to load key with keyId {} created {}", keyId, created); return metastore.load(keyId, created) .map(Json::new) .map(EnvelopeKeyRecord::new) .orElseThrow( () -> new MetadataMissingException("Could not find EnvelopeKeyRecord with keyId=" + keyId + ", created=" + created) ); }
/** * Gets a specific {@code EnvelopeKeyRecord} or throws a {@code MetadataMissingException} if not found. * * @param keyId Key id of the record to load. * @param created Created time of the record to load. * @return The {@link EnvelopeKeyRecord}, if found. * @throws MetadataMissingException if the {@code EnvelopeKeyRecord} is not found. */
Gets a specific EnvelopeKeyRecord or throws a MetadataMissingException if not found. @param keyId Key id of the record to load. @param created Created time of the record to load. @return The EnvelopeKeyRecord, if found. @throws MetadataMissingException if the EnvelopeKeyRecord is not found.
[ "Gets", "a", "specific", "EnvelopeKeyRecord", "or", "throws", "a", "MetadataMissingException", "if", "not", "found", ".", "@param", "keyId", "Key", "id", "of", "the", "record", "to", "load", ".", "@param", "created", "Created", "time", "of", "the", "record", "to", "load", ".", "@return", "The", "EnvelopeKeyRecord", "if", "found", ".", "@throws", "MetadataMissingException", "if", "the", "EnvelopeKeyRecord", "is", "not", "found", "." ]
EnvelopeKeyRecord loadKeyRecord(final String keyId, final Instant created) { logger.debug("attempting to load key with keyId {} created {}", keyId, created); return metastore.load(keyId, created) .map(Json::new) .map(EnvelopeKeyRecord::new) .orElseThrow( () -> new MetadataMissingException("Could not find EnvelopeKeyRecord with keyId=" + keyId + ", created=" + created) ); }
[ "EnvelopeKeyRecord", "loadKeyRecord", "(", "final", "String", "keyId", ",", "final", "Instant", "created", ")", "{", "logger", ".", "debug", "(", "\"attempting to load key with keyId {} created {}\"", ",", "keyId", ",", "created", ")", ";", "return", "metastore", ".", "load", "(", "keyId", ",", "created", ")", ".", "map", "(", "Json", "::", "new", ")", ".", "map", "(", "EnvelopeKeyRecord", "::", "new", ")", ".", "orElseThrow", "(", "(", ")", "->", "new", "MetadataMissingException", "(", "\"Could not find EnvelopeKeyRecord with keyId=\"", "+", "keyId", "+", "\", created=\"", "+", "created", ")", ")", ";", "}" ]
Gets a specific {@code EnvelopeKeyRecord} or throws a {@code MetadataMissingException} if not found.
[ "Gets", "a", "specific", "{", "@code", "EnvelopeKeyRecord", "}", "or", "throws", "a", "{", "@code", "MetadataMissingException", "}", "if", "not", "found", "." ]
[]
[ { "param": "keyId", "type": "String" }, { "param": "created", "type": "Instant" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "keyId", "type": "String", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "created", "type": "Instant", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 16210, 653, 2115, 1262, 653, 2115, 12, 6385, 514, 30914, 16, 727, 11190, 2522, 13, 288, 203, 565, 1194, 18, 4148, 2932, 11764, 310, 358, 1262, 498, 598, 30914, 2618, 2522, 3728, 16, 30914, 16, 2522, 1769, 203, 565, 327, 5100, 689, 479, 18, 945, 12, 856, 548, 16, 2522, 13, 203, 3639, 263, 1458, 12, 3185, 2866, 2704, 13, 203, 3639, 263, 1458, 12, 10862, 653, 2115, 2866, 2704, 13, 203, 3639, 263, 280, 12427, 8282, 12, 203, 5411, 1832, 317, 394, 6912, 4841, 503, 2932, 4445, 486, 1104, 16210, 653, 2115, 598, 30914, 1546, 397, 30914, 397, 3104, 2522, 1546, 397, 203, 8227, 2522, 13, 203, 3639, 11272, 203, 225, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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710, 16210, 653, 2115, 97, 578, 1216, 279, 8901, 710, 6912, 4841, 503, 97, 309, 486, 1392, 18, 203, 282, 380, 203, 282, 380, 632, 891, 30914, 1929, 612, 434, 326, 1409, 358, 1262, 18, 203, 282, 380, 632, 891, 2522, 12953, 813, 434, 326, 1409, 358, 1262, 18, 203, 282, 380, 632, 2463, 1021, 8901, 1232, 16210, 653, 2115, 5779, 309, 1392, 18, 203, 282, 380, 632, 15069, 6912, 4841, 503, 309, 326, 8901, 710, 16210, 653, 2115, 97, 353, 486, 1392, 18, 203, 282, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
0eb33d1a43ab3f2c2a1264157932ca6b125f6e92
jakeswenson/envelop
java/app-encryption/src/main/java/com/godaddy/asherah/appencryption/envelope/EnvelopeEncryptionJsonImpl.java
[ "MIT" ]
Java
loadLatestKeyRecord
null
Optional<EnvelopeKeyRecord> loadLatestKeyRecord(final String keyId) { logger.debug("attempting to load latest key with keyId {}", keyId); return metastore.loadLatest(keyId) .map(Json::new) .map(EnvelopeKeyRecord::new); }
/** * Gets the most recently created key for a given key ID, if any. * * @param keyId The id to find the latest key of. * @return The latest key for the {@code keyId}, if any. */
Gets the most recently created key for a given key ID, if any. @param keyId The id to find the latest key of. @return The latest key for the keyId, if any.
[ "Gets", "the", "most", "recently", "created", "key", "for", "a", "given", "key", "ID", "if", "any", ".", "@param", "keyId", "The", "id", "to", "find", "the", "latest", "key", "of", ".", "@return", "The", "latest", "key", "for", "the", "keyId", "if", "any", "." ]
Optional<EnvelopeKeyRecord> loadLatestKeyRecord(final String keyId) { logger.debug("attempting to load latest key with keyId {}", keyId); return metastore.loadLatest(keyId) .map(Json::new) .map(EnvelopeKeyRecord::new); }
[ "Optional", "<", "EnvelopeKeyRecord", ">", "loadLatestKeyRecord", "(", "final", "String", "keyId", ")", "{", "logger", ".", "debug", "(", "\"attempting to load latest key with keyId {}\"", ",", "keyId", ")", ";", "return", "metastore", ".", "loadLatest", "(", "keyId", ")", ".", "map", "(", "Json", "::", "new", ")", ".", "map", "(", "EnvelopeKeyRecord", "::", "new", ")", ";", "}" ]
Gets the most recently created key for a given key ID, if any.
[ "Gets", "the", "most", "recently", "created", "key", "for", "a", "given", "key", "ID", "if", "any", "." ]
[]
[ { "param": "keyId", "type": "String" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "keyId", "type": "String", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 4055, 32, 10862, 653, 2115, 34, 1262, 18650, 653, 2115, 12, 6385, 514, 30914, 13, 288, 203, 565, 1194, 18, 4148, 2932, 11764, 310, 358, 1262, 4891, 498, 598, 30914, 3728, 16, 30914, 1769, 203, 565, 327, 5100, 689, 479, 18, 945, 18650, 12, 856, 548, 13, 203, 3639, 263, 1458, 12, 3185, 2866, 2704, 13, 203, 3639, 263, 1458, 12, 10862, 653, 2115, 2866, 2704, 1769, 203, 225, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 282, 380, 11881, 326, 4486, 19907, 2522, 498, 364, 279, 864, 498, 1599, 16, 309, 1281, 18, 203, 282, 380, 203, 282, 380, 632, 891, 30914, 1021, 612, 358, 1104, 326, 4891, 498, 434, 18, 203, 282, 380, 632, 2463, 1021, 4891, 498, 364, 326, 8901, 710, 30914, 5779, 309, 1281, 18, 203, 282, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
5564750d32b51f7b0dd5e7b70f8796ebeddd6f42
jakeswenson/envelop
java/app-encryption/src/main/java/com/godaddy/asherah/crypto/envelope/AeadEnvelopeCrypto.java
[ "MIT" ]
Java
decryptKey
CryptoKey
public CryptoKey decryptKey(final byte[] encryptedKey, final Instant encryptedKeyCreated, final CryptoKey keyEncryptionKey, final boolean revoked) { //Invert this into functional byte[] decryptedKey = decrypt(encryptedKey, keyEncryptionKey); try { return generateKeyFromBytes(decryptedKey, encryptedKeyCreated, revoked); } finally { wipeByteArray(decryptedKey); } }
/** * Decrypts an encrypted key. * @param encryptedKey The encrypted key bytes. * @param encryptedKeyCreated The creation time of the encrypted key. * @param keyEncryptionKey The key encryption key. * @param revoked The revocation status of the key. * @return A decrypted {@link CryptoKey} object. */
Decrypts an encrypted key. @param encryptedKey The encrypted key bytes. @param encryptedKeyCreated The creation time of the encrypted key. @param keyEncryptionKey The key encryption key. @param revoked The revocation status of the key. @return A decrypted CryptoKey object.
[ "Decrypts", "an", "encrypted", "key", ".", "@param", "encryptedKey", "The", "encrypted", "key", "bytes", ".", "@param", "encryptedKeyCreated", "The", "creation", "time", "of", "the", "encrypted", "key", ".", "@param", "keyEncryptionKey", "The", "key", "encryption", "key", ".", "@param", "revoked", "The", "revocation", "status", "of", "the", "key", ".", "@return", "A", "decrypted", "CryptoKey", "object", "." ]
public CryptoKey decryptKey(final byte[] encryptedKey, final Instant encryptedKeyCreated, final CryptoKey keyEncryptionKey, final boolean revoked) { byte[] decryptedKey = decrypt(encryptedKey, keyEncryptionKey); try { return generateKeyFromBytes(decryptedKey, encryptedKeyCreated, revoked); } finally { wipeByteArray(decryptedKey); } }
[ "public", "CryptoKey", "decryptKey", "(", "final", "byte", "[", "]", "encryptedKey", ",", "final", "Instant", "encryptedKeyCreated", ",", "final", "CryptoKey", "keyEncryptionKey", ",", "final", "boolean", "revoked", ")", "{", "byte", "[", "]", "decryptedKey", "=", "decrypt", "(", "encryptedKey", ",", "keyEncryptionKey", ")", ";", "try", "{", "return", "generateKeyFromBytes", "(", "decryptedKey", ",", "encryptedKeyCreated", ",", "revoked", ")", ";", "}", "finally", "{", "wipeByteArray", "(", "decryptedKey", ")", ";", "}", "}" ]
Decrypts an encrypted key.
[ "Decrypts", "an", "encrypted", "key", "." ]
[ "//Invert this into functional" ]
[ { "param": "encryptedKey", "type": "byte[]" }, { "param": "encryptedKeyCreated", "type": "Instant" }, { "param": "keyEncryptionKey", "type": "CryptoKey" }, { "param": "revoked", "type": "boolean" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "encryptedKey", "type": "byte[]", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "encryptedKeyCreated", "type": "Instant", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "keyEncryptionKey", "type": "CryptoKey", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "revoked", "type": "boolean", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 15629, 653, 8420, 653, 12, 6385, 1160, 8526, 6901, 653, 16, 727, 11190, 6901, 653, 6119, 16, 203, 1377, 727, 15629, 653, 498, 26740, 16, 727, 1250, 22919, 13, 288, 203, 565, 368, 382, 1097, 333, 1368, 18699, 203, 565, 1160, 8526, 13794, 653, 273, 8420, 12, 18702, 653, 16, 498, 26740, 1769, 203, 565, 775, 288, 203, 1377, 327, 2103, 653, 29930, 12, 4924, 4567, 653, 16, 6901, 653, 6119, 16, 22919, 1769, 203, 565, 289, 203, 565, 3095, 288, 203, 1377, 341, 3151, 8826, 12, 4924, 4567, 653, 1769, 203, 565, 289, 203, 225, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,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 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 282, 380, 3416, 20261, 392, 6901, 498, 18, 203, 282, 380, 632, 891, 6901, 653, 1021, 6901, 498, 1731, 18, 203, 282, 380, 632, 891, 6901, 653, 6119, 1021, 6710, 813, 434, 326, 6901, 498, 18, 203, 282, 380, 632, 891, 498, 26740, 1021, 498, 8731, 498, 18, 203, 282, 380, 632, 891, 22919, 1021, 24158, 1267, 434, 326, 498, 18, 203, 282, 380, 632, 2463, 432, 13794, 8901, 1232, 15629, 653, 97, 733, 18, 203, 282, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
5564750d32b51f7b0dd5e7b70f8796ebeddd6f42
jakeswenson/envelop
java/app-encryption/src/main/java/com/godaddy/asherah/crypto/envelope/AeadEnvelopeCrypto.java
[ "MIT" ]
Java
envelopeEncrypt
EnvelopeEncryptResult
public EnvelopeEncryptResult envelopeEncrypt(final byte[] plainText, final CryptoKey keyEncryptionKey, final Object userState) { try (CryptoKey dataEncryptionKey = generateKey()) { EnvelopeEncryptResult result = new EnvelopeEncryptResult(); result.setCipherText(encrypt(plainText, dataEncryptionKey)); result.setEncryptedKey(encryptKey(dataEncryptionKey, keyEncryptionKey)); result.setUserState(userState); return result; } }
/** * Encrypts the payload and the key to create the data row record. * @param plainText The payload to be encrypted. * @param keyEncryptionKey The key encryption key. * @param userState The KeyMeta for the {@code keyEncryptionKey}. * @return An {@link EnvelopeEncryptResult} object/data row record (DRR). */
Encrypts the payload and the key to create the data row record. @param plainText The payload to be encrypted. @param keyEncryptionKey The key encryption key. @param userState The KeyMeta for the keyEncryptionKey. @return An EnvelopeEncryptResult object/data row record (DRR).
[ "Encrypts", "the", "payload", "and", "the", "key", "to", "create", "the", "data", "row", "record", ".", "@param", "plainText", "The", "payload", "to", "be", "encrypted", ".", "@param", "keyEncryptionKey", "The", "key", "encryption", "key", ".", "@param", "userState", "The", "KeyMeta", "for", "the", "keyEncryptionKey", ".", "@return", "An", "EnvelopeEncryptResult", "object", "/", "data", "row", "record", "(", "DRR", ")", "." ]
public EnvelopeEncryptResult envelopeEncrypt(final byte[] plainText, final CryptoKey keyEncryptionKey, final Object userState) { try (CryptoKey dataEncryptionKey = generateKey()) { EnvelopeEncryptResult result = new EnvelopeEncryptResult(); result.setCipherText(encrypt(plainText, dataEncryptionKey)); result.setEncryptedKey(encryptKey(dataEncryptionKey, keyEncryptionKey)); result.setUserState(userState); return result; } }
[ "public", "EnvelopeEncryptResult", "envelopeEncrypt", "(", "final", "byte", "[", "]", "plainText", ",", "final", "CryptoKey", "keyEncryptionKey", ",", "final", "Object", "userState", ")", "{", "try", "(", "CryptoKey", "dataEncryptionKey", "=", "generateKey", "(", ")", ")", "{", "EnvelopeEncryptResult", "result", "=", "new", "EnvelopeEncryptResult", "(", ")", ";", "result", ".", "setCipherText", "(", "encrypt", "(", "plainText", ",", "dataEncryptionKey", ")", ")", ";", "result", ".", "setEncryptedKey", "(", "encryptKey", "(", "dataEncryptionKey", ",", "keyEncryptionKey", ")", ")", ";", "result", ".", "setUserState", "(", "userState", ")", ";", "return", "result", ";", "}", "}" ]
Encrypts the payload and the key to create the data row record.
[ "Encrypts", "the", "payload", "and", "the", "key", "to", "create", "the", "data", "row", "record", "." ]
[]
[ { "param": "plainText", "type": "byte[]" }, { "param": "keyEncryptionKey", "type": "CryptoKey" }, { "param": "userState", "type": "Object" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "plainText", "type": "byte[]", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "keyEncryptionKey", "type": "CryptoKey", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "userState", "type": "Object", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 16210, 13129, 1253, 9045, 13129, 12, 6385, 1160, 8526, 7351, 1528, 16, 727, 15629, 653, 498, 26740, 16, 203, 1377, 727, 1033, 729, 1119, 13, 288, 203, 565, 775, 261, 18048, 653, 501, 26740, 273, 2103, 653, 10756, 288, 203, 1377, 16210, 13129, 1253, 563, 273, 394, 16210, 13129, 1253, 5621, 203, 1377, 563, 18, 542, 13896, 1528, 12, 15890, 12, 7446, 1528, 16, 501, 26740, 10019, 203, 1377, 563, 18, 542, 14678, 653, 12, 15890, 653, 12, 892, 26740, 16, 498, 26740, 10019, 203, 1377, 563, 18, 542, 1299, 1119, 12, 1355, 1119, 1769, 203, 1377, 327, 563, 31, 203, 565, 289, 203, 225, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 282, 380, 8594, 20261, 326, 2385, 471, 326, 498, 358, 752, 326, 501, 1027, 1409, 18, 203, 282, 380, 632, 891, 7351, 1528, 1021, 2385, 358, 506, 6901, 18, 203, 282, 380, 632, 891, 498, 26740, 1021, 498, 8731, 498, 18, 203, 282, 380, 632, 891, 729, 1119, 1021, 1929, 2781, 364, 326, 8901, 710, 498, 26740, 5496, 203, 282, 380, 632, 2463, 1922, 8901, 1232, 16210, 13129, 1253, 97, 733, 19, 892, 1027, 1409, 261, 6331, 54, 2934, 203, 282, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
5564750d32b51f7b0dd5e7b70f8796ebeddd6f42
jakeswenson/envelop
java/app-encryption/src/main/java/com/godaddy/asherah/crypto/envelope/AeadEnvelopeCrypto.java
[ "MIT" ]
Java
envelopeDecrypt
null
public byte[] envelopeDecrypt(final byte[] cipherText, final byte[] encryptedKey, final Instant keyCreated, final CryptoKey keyEncryptionKey) { try (CryptoKey plaintextKey = decryptKey(encryptedKey, keyCreated, keyEncryptionKey)) { return decrypt(cipherText, plaintextKey); } }
/** * Decrypts the encryptedKey and then uses the decrypted key to decrypt the encrypted payload in the data row record. * @param cipherText The encrypted payload. * @param encryptedKey The encrypted key. * @param keyCreated The creation time of the data row record. * @param keyEncryptionKey The key encryption key. * @return The decrypted payload. */
Decrypts the encryptedKey and then uses the decrypted key to decrypt the encrypted payload in the data row record. @param cipherText The encrypted payload. @param encryptedKey The encrypted key. @param keyCreated The creation time of the data row record. @param keyEncryptionKey The key encryption key. @return The decrypted payload.
[ "Decrypts", "the", "encryptedKey", "and", "then", "uses", "the", "decrypted", "key", "to", "decrypt", "the", "encrypted", "payload", "in", "the", "data", "row", "record", ".", "@param", "cipherText", "The", "encrypted", "payload", ".", "@param", "encryptedKey", "The", "encrypted", "key", ".", "@param", "keyCreated", "The", "creation", "time", "of", "the", "data", "row", "record", ".", "@param", "keyEncryptionKey", "The", "key", "encryption", "key", ".", "@return", "The", "decrypted", "payload", "." ]
public byte[] envelopeDecrypt(final byte[] cipherText, final byte[] encryptedKey, final Instant keyCreated, final CryptoKey keyEncryptionKey) { try (CryptoKey plaintextKey = decryptKey(encryptedKey, keyCreated, keyEncryptionKey)) { return decrypt(cipherText, plaintextKey); } }
[ "public", "byte", "[", "]", "envelopeDecrypt", "(", "final", "byte", "[", "]", "cipherText", ",", "final", "byte", "[", "]", "encryptedKey", ",", "final", "Instant", "keyCreated", ",", "final", "CryptoKey", "keyEncryptionKey", ")", "{", "try", "(", "CryptoKey", "plaintextKey", "=", "decryptKey", "(", "encryptedKey", ",", "keyCreated", ",", "keyEncryptionKey", ")", ")", "{", "return", "decrypt", "(", "cipherText", ",", "plaintextKey", ")", ";", "}", "}" ]
Decrypts the encryptedKey and then uses the decrypted key to decrypt the encrypted payload in the data row record.
[ "Decrypts", "the", "encryptedKey", "and", "then", "uses", "the", "decrypted", "key", "to", "decrypt", "the", "encrypted", "payload", "in", "the", "data", "row", "record", "." ]
[]
[ { "param": "cipherText", "type": "byte[]" }, { "param": "encryptedKey", "type": "byte[]" }, { "param": "keyCreated", "type": "Instant" }, { "param": "keyEncryptionKey", "type": "CryptoKey" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "cipherText", "type": "byte[]", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "encryptedKey", "type": "byte[]", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "keyCreated", "type": "Instant", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "keyEncryptionKey", "type": "CryptoKey", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 1160, 8526, 9045, 17306, 12, 6385, 1160, 8526, 5867, 1528, 16, 727, 1160, 8526, 6901, 653, 16, 203, 1377, 727, 11190, 498, 6119, 16, 727, 15629, 653, 498, 26740, 13, 288, 203, 565, 775, 261, 18048, 653, 11917, 653, 273, 8420, 653, 12, 18702, 653, 16, 498, 6119, 16, 498, 26740, 3719, 288, 203, 1377, 327, 8420, 12, 17094, 1528, 16, 11917, 653, 1769, 203, 565, 289, 203, 225, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 282, 380, 3416, 20261, 326, 6901, 653, 471, 1508, 4692, 326, 13794, 498, 358, 8420, 326, 6901, 2385, 316, 326, 501, 1027, 1409, 18, 203, 282, 380, 632, 891, 5867, 1528, 1021, 6901, 2385, 18, 203, 282, 380, 632, 891, 6901, 653, 1021, 6901, 498, 18, 203, 282, 380, 632, 891, 498, 6119, 1021, 6710, 813, 434, 326, 501, 1027, 1409, 18, 203, 282, 380, 632, 891, 498, 26740, 1021, 498, 8731, 498, 18, 203, 282, 380, 632, 2463, 1021, 13794, 2385, 18, 203, 282, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
5576e467b2dc0c222e0bf29f8cdab2654f4c673a
jakeswenson/envelop
java/app-encryption/src/main/java/com/godaddy/asherah/crypto/keys/SecureCryptoKeyMap.java
[ "MIT" ]
Java
putAndGetUsable
CryptoKey
public CryptoKey putAndGetUsable(final K key, final CryptoKey cryptoKey) { if (!isClosed.get()) { SharedCryptoKeyEntry cacheValue = sharedCryptoKeyMap.putIfAbsent(key, new SharedCryptoKeyEntry(new SharedCryptoKey(cryptoKey), System.currentTimeMillis())); // We want to return something that can always be closed by the calling method. // If putIfAbsent returns null, the value was put into the cache, so return the new "shared" version whose // close() calls will not close the underlying now-cached Secret. if (cacheValue == null) { return sharedCryptoKeyMap.get(key).sharedCryptoKey; } else { // If non-null value returned then it's already cached. If the passed in value is now revoked, // mark the shared/cached version as revoked. Otherwise, just update the cachedTime of the shared/cached value if (cryptoKey.isRevoked()) { cacheValue.sharedCryptoKey.markRevoked(); } else { cacheValue.cachedTimeMillis = System.currentTimeMillis(); } // Return the passed in CryptoKey so caller can safely close it without affecting other threads return cryptoKey; } } else { throw new IllegalStateException("Attempted to store CryptoKey after close"); } }
/** * Put a CryptoKey into the cache and return a CryptoKey that should be used * in place of the cryptoKey parameter that was provided. This method manages * the closeability of the return value such that it can (and should) * always be closed by the calling method. * * Example: * <pre>{@code * SecureCryptoKeyMap map = new SecureCryptoKeyMap<String>(); * CryptoKey key = ...; * * // Cache the key and use what was returned * key = map.putAndGetUsable("key_string", key); * * performActionWithKey(key, ...); * * // Because we re-assigned key to what was returned from the putAndGetUsable() call, we * // know we it's always ok (and the right thing to do) to close it. * key.close(); * }</pre> * * @param key The key to store the cryptoKey. * @param cryptoKey The cryptoKey to store. * @return The {@link CryptoKey} which should be used and subsequently closed after use. */
Put a CryptoKey into the cache and return a CryptoKey that should be used in place of the cryptoKey parameter that was provided. This method manages the closeability of the return value such that it can (and should) always be closed by the calling method. {@code SecureCryptoKeyMap map = new SecureCryptoKeyMap(); CryptoKey key = .... Cache the key and use what was returned key = map.putAndGetUsable("key_string", key). Because we re-assigned key to what was returned from the putAndGetUsable() call, we know we it's always ok (and the right thing to do) to close it. @param key The key to store the cryptoKey. @param cryptoKey The cryptoKey to store. @return The CryptoKey which should be used and subsequently closed after use.
[ "Put", "a", "CryptoKey", "into", "the", "cache", "and", "return", "a", "CryptoKey", "that", "should", "be", "used", "in", "place", "of", "the", "cryptoKey", "parameter", "that", "was", "provided", ".", "This", "method", "manages", "the", "closeability", "of", "the", "return", "value", "such", "that", "it", "can", "(", "and", "should", ")", "always", "be", "closed", "by", "the", "calling", "method", ".", "{", "@code", "SecureCryptoKeyMap", "map", "=", "new", "SecureCryptoKeyMap", "()", ";", "CryptoKey", "key", "=", "....", "Cache", "the", "key", "and", "use", "what", "was", "returned", "key", "=", "map", ".", "putAndGetUsable", "(", "\"", "key_string", "\"", "key", ")", ".", "Because", "we", "re", "-", "assigned", "key", "to", "what", "was", "returned", "from", "the", "putAndGetUsable", "()", "call", "we", "know", "we", "it", "'", "s", "always", "ok", "(", "and", "the", "right", "thing", "to", "do", ")", "to", "close", "it", ".", "@param", "key", "The", "key", "to", "store", "the", "cryptoKey", ".", "@param", "cryptoKey", "The", "cryptoKey", "to", "store", ".", "@return", "The", "CryptoKey", "which", "should", "be", "used", "and", "subsequently", "closed", "after", "use", "." ]
public CryptoKey putAndGetUsable(final K key, final CryptoKey cryptoKey) { if (!isClosed.get()) { SharedCryptoKeyEntry cacheValue = sharedCryptoKeyMap.putIfAbsent(key, new SharedCryptoKeyEntry(new SharedCryptoKey(cryptoKey), System.currentTimeMillis())); if (cacheValue == null) { return sharedCryptoKeyMap.get(key).sharedCryptoKey; } else { if (cryptoKey.isRevoked()) { cacheValue.sharedCryptoKey.markRevoked(); } else { cacheValue.cachedTimeMillis = System.currentTimeMillis(); } return cryptoKey; } } else { throw new IllegalStateException("Attempted to store CryptoKey after close"); } }
[ "public", "CryptoKey", "putAndGetUsable", "(", "final", "K", "key", ",", "final", "CryptoKey", "cryptoKey", ")", "{", "if", "(", "!", "isClosed", ".", "get", "(", ")", ")", "{", "SharedCryptoKeyEntry", "cacheValue", "=", "sharedCryptoKeyMap", ".", "putIfAbsent", "(", "key", ",", "new", "SharedCryptoKeyEntry", "(", "new", "SharedCryptoKey", "(", "cryptoKey", ")", ",", "System", ".", "currentTimeMillis", "(", ")", ")", ")", ";", "if", "(", "cacheValue", "==", "null", ")", "{", "return", "sharedCryptoKeyMap", ".", "get", "(", "key", ")", ".", "sharedCryptoKey", ";", "}", "else", "{", "if", "(", "cryptoKey", ".", "isRevoked", "(", ")", ")", "{", "cacheValue", ".", "sharedCryptoKey", ".", "markRevoked", "(", ")", ";", "}", "else", "{", "cacheValue", ".", "cachedTimeMillis", "=", "System", ".", "currentTimeMillis", "(", ")", ";", "}", "return", "cryptoKey", ";", "}", "}", "else", "{", "throw", "new", "IllegalStateException", "(", "\"Attempted to store CryptoKey after close\"", ")", ";", "}", "}" ]
Put a CryptoKey into the cache and return a CryptoKey that should be used in place of the cryptoKey parameter that was provided.
[ "Put", "a", "CryptoKey", "into", "the", "cache", "and", "return", "a", "CryptoKey", "that", "should", "be", "used", "in", "place", "of", "the", "cryptoKey", "parameter", "that", "was", "provided", "." ]
[ "// We want to return something that can always be closed by the calling method.", "// If putIfAbsent returns null, the value was put into the cache, so return the new \"shared\" version whose", "// close() calls will not close the underlying now-cached Secret.", "// If non-null value returned then it's already cached. If the passed in value is now revoked,", "// mark the shared/cached version as revoked. Otherwise, just update the cachedTime of the shared/cached value", "// Return the passed in CryptoKey so caller can safely close it without affecting other threads" ]
[ { "param": "key", "type": "K" }, { "param": "cryptoKey", "type": "CryptoKey" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "key", "type": "K", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "cryptoKey", "type": "CryptoKey", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 15629, 653, 1378, 14042, 27682, 12, 6385, 1475, 498, 16, 727, 15629, 653, 8170, 653, 13, 288, 203, 565, 309, 16051, 291, 7395, 18, 588, 10756, 288, 203, 1377, 10314, 18048, 653, 1622, 1247, 620, 273, 5116, 18048, 653, 863, 18, 458, 14711, 12, 856, 16, 203, 1850, 394, 10314, 18048, 653, 1622, 12, 2704, 10314, 18048, 653, 12, 18489, 653, 3631, 2332, 18, 2972, 28512, 1435, 10019, 203, 203, 1377, 368, 1660, 2545, 358, 327, 5943, 716, 848, 3712, 506, 4375, 635, 326, 4440, 707, 18, 203, 1377, 368, 971, 19777, 1135, 446, 16, 326, 460, 1703, 1378, 1368, 326, 1247, 16, 1427, 327, 326, 394, 315, 11574, 6, 1177, 8272, 203, 1377, 368, 1746, 1435, 4097, 903, 486, 1746, 326, 6808, 2037, 17, 7097, 7875, 18, 203, 1377, 309, 261, 2493, 620, 422, 446, 13, 288, 203, 3639, 327, 5116, 18048, 653, 863, 18, 588, 12, 856, 2934, 11574, 18048, 653, 31, 203, 1377, 289, 203, 1377, 469, 288, 203, 3639, 368, 971, 1661, 17, 2011, 460, 2106, 1508, 518, 1807, 1818, 3472, 18, 971, 326, 2275, 316, 460, 353, 2037, 22919, 16, 203, 3639, 368, 2267, 326, 5116, 19, 7097, 1177, 487, 22919, 18, 5272, 16, 2537, 1089, 326, 3472, 950, 434, 326, 5116, 19, 7097, 460, 203, 3639, 309, 261, 18489, 653, 18, 291, 10070, 14276, 10756, 288, 203, 1850, 1247, 620, 18, 11574, 18048, 653, 18, 3355, 10070, 14276, 5621, 203, 3639, 289, 203, 3639, 469, 288, 203, 1850, 1247, 620, 18, 7097, 28512, 273, 2332, 18, 2972, 28512, 5621, 203, 3639, 289, 203, 203, 3639, 368, 2000, 326, 2275, 316, 15629, 653, 1427, 4894, 848, 15303, 1746, 518, 2887, 13418, 310, 1308, 7403, 203, 3639, 327, 8170, 653, 31, 203, 1377, 289, 203, 565, 289, 203, 565, 469, 288, 203, 1377, 604, 394, 5477, 2932, 28788, 358, 1707, 15629, 653, 1839, 1746, 8863, 203, 565, 289, 203, 225, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,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, 460, 4123, 716, 518, 848, 261, 464, 1410, 13, 203, 282, 380, 3712, 506, 4375, 635, 326, 4440, 707, 18, 203, 282, 380, 203, 282, 380, 5090, 30, 203, 282, 380, 411, 1484, 21502, 36, 710, 203, 282, 380, 15653, 18048, 653, 863, 852, 273, 394, 15653, 18048, 653, 863, 32, 780, 34, 5621, 203, 282, 380, 15629, 653, 498, 273, 1372, 31, 203, 282, 380, 203, 282, 380, 368, 4379, 326, 498, 471, 999, 4121, 1703, 2106, 2 ]
346959e1987839bb52f6d9feaf331cbd5774d93b
BiM31/CadeauAleatoire
src/RandomGift.java
[ "Apache-2.0" ]
Java
launch
null
public static void launch(List<Person> persons) { int nbPersons = persons.size(); // Generation of the random list Random r = new Random(); Person[] listeEnvoi = new Person[nbPersons]; for (int i = 0; i < nbPersons; i++) { listeEnvoi[i] = null; } for (int i = 0; i < nbPersons; i++) { int set; do { set = r.nextInt(nbPersons); } while (!(listeEnvoi[set] == null)); listeEnvoi[set] = persons.get(i); } Set<String> logLines = new HashSet<>(); // Send mail to the next person in the array for (int i = 0; i < nbPersons; i++) { Person offerer = listeEnvoi[i]; Person winner = listeEnvoi[(i+1)%nbPersons]; _sendMail(offerer, winner); logLines.add(offerer.getFirstName() + " -> " + winner.getFirstName()); } // Log in a file, just in case... _log(logLines); }
/** * This method will launch the process of generating a random order to offer a gift to a random person. * @param persons The list of persons. */
This method will launch the process of generating a random order to offer a gift to a random person. @param persons The list of persons.
[ "This", "method", "will", "launch", "the", "process", "of", "generating", "a", "random", "order", "to", "offer", "a", "gift", "to", "a", "random", "person", ".", "@param", "persons", "The", "list", "of", "persons", "." ]
public static void launch(List<Person> persons) { int nbPersons = persons.size(); Random r = new Random(); Person[] listeEnvoi = new Person[nbPersons]; for (int i = 0; i < nbPersons; i++) { listeEnvoi[i] = null; } for (int i = 0; i < nbPersons; i++) { int set; do { set = r.nextInt(nbPersons); } while (!(listeEnvoi[set] == null)); listeEnvoi[set] = persons.get(i); } Set<String> logLines = new HashSet<>(); for (int i = 0; i < nbPersons; i++) { Person offerer = listeEnvoi[i]; Person winner = listeEnvoi[(i+1)%nbPersons]; _sendMail(offerer, winner); logLines.add(offerer.getFirstName() + " -> " + winner.getFirstName()); } _log(logLines); }
[ "public", "static", "void", "launch", "(", "List", "<", "Person", ">", "persons", ")", "{", "int", "nbPersons", "=", "persons", ".", "size", "(", ")", ";", "Random", "r", "=", "new", "Random", "(", ")", ";", "Person", "[", "]", "listeEnvoi", "=", "new", "Person", "[", "nbPersons", "]", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "nbPersons", ";", "i", "++", ")", "{", "listeEnvoi", "[", "i", "]", "=", "null", ";", "}", "for", "(", "int", "i", "=", "0", ";", "i", "<", "nbPersons", ";", "i", "++", ")", "{", "int", "set", ";", "do", "{", "set", "=", "r", ".", "nextInt", "(", "nbPersons", ")", ";", "}", "while", "(", "!", "(", "listeEnvoi", "[", "set", "]", "==", "null", ")", ")", ";", "listeEnvoi", "[", "set", "]", "=", "persons", ".", "get", "(", "i", ")", ";", "}", "Set", "<", "String", ">", "logLines", "=", "new", "HashSet", "<", ">", "(", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "nbPersons", ";", "i", "++", ")", "{", "Person", "offerer", "=", "listeEnvoi", "[", "i", "]", ";", "Person", "winner", "=", "listeEnvoi", "[", "(", "i", "+", "1", ")", "%", "nbPersons", "]", ";", "_sendMail", "(", "offerer", ",", "winner", ")", ";", "logLines", ".", "add", "(", "offerer", ".", "getFirstName", "(", ")", "+", "\" -> \"", "+", "winner", ".", "getFirstName", "(", ")", ")", ";", "}", "_log", "(", "logLines", ")", ";", "}" ]
This method will launch the process of generating a random order to offer a gift to a random person.
[ "This", "method", "will", "launch", "the", "process", "of", "generating", "a", "random", "order", "to", "offer", "a", "gift", "to", "a", "random", "person", "." ]
[ "// Generation of the random list", "// Send mail to the next person in the array", "// Log in a file, just in case..." ]
[ { "param": "persons", "type": "List<Person>" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "persons", "type": "List<Person>", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 760, 918, 8037, 12, 682, 32, 8346, 34, 6175, 87, 13, 203, 565, 288, 203, 3639, 509, 4264, 8346, 87, 273, 6175, 87, 18, 1467, 5621, 203, 540, 203, 3639, 368, 23234, 434, 326, 2744, 666, 203, 3639, 8072, 436, 273, 394, 8072, 5621, 203, 540, 203, 3639, 11573, 8526, 31614, 3491, 11359, 273, 394, 11573, 63, 6423, 8346, 87, 15533, 203, 3639, 364, 261, 474, 277, 273, 374, 31, 277, 411, 4264, 8346, 87, 31, 277, 27245, 203, 3639, 288, 203, 5411, 31614, 3491, 11359, 63, 77, 65, 273, 446, 31, 203, 3639, 289, 203, 540, 203, 3639, 364, 261, 474, 277, 273, 374, 31, 277, 411, 4264, 8346, 87, 31, 277, 27245, 203, 3639, 288, 203, 5411, 509, 444, 31, 203, 5411, 741, 203, 5411, 288, 203, 7734, 444, 273, 436, 18, 4285, 1702, 12, 6423, 8346, 87, 1769, 203, 5411, 289, 203, 5411, 1323, 16051, 12, 1098, 73, 3491, 11359, 63, 542, 65, 422, 446, 10019, 203, 5411, 31614, 3491, 11359, 63, 542, 65, 273, 6175, 87, 18, 588, 12, 77, 1769, 203, 3639, 289, 203, 540, 203, 3639, 1000, 32, 780, 34, 613, 5763, 273, 394, 6847, 29667, 5621, 203, 3639, 368, 2479, 4791, 358, 326, 1024, 6175, 316, 326, 526, 203, 3639, 364, 261, 474, 277, 273, 374, 31, 277, 411, 4264, 8346, 87, 31, 277, 27245, 203, 3639, 288, 203, 5411, 11573, 10067, 264, 273, 31614, 3491, 11359, 63, 77, 15533, 203, 5411, 11573, 5657, 1224, 273, 31614, 3491, 11359, 63, 12, 77, 15, 21, 13, 9, 6423, 8346, 87, 15533, 203, 5411, 389, 4661, 6759, 12, 792, 18459, 16, 5657, 1224, 1769, 203, 5411, 613, 5763, 18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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 377, 380, 1220, 707, 903, 8037, 326, 1207, 434, 12516, 279, 2744, 1353, 358, 10067, 279, 314, 2136, 358, 279, 2744, 6175, 18, 203, 377, 380, 632, 891, 6175, 87, 1021, 666, 434, 6175, 87, 18, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
346959e1987839bb52f6d9feaf331cbd5774d93b
BiM31/CadeauAleatoire
src/RandomGift.java
[ "Apache-2.0" ]
Java
_sendMail
null
private static void _sendMail(Person offerer, Person winner) { try { Properties prop = System.getProperties(); prop.put("mail.smtp.host", __SMTP_HOST); Session session = Session.getDefaultInstance(prop, null); Message message = new MimeMessage(session); message.setFrom(new InternetAddress(__SENDER)); InternetAddress[] internetAddresses = new InternetAddress[1]; internetAddresses[0] = new InternetAddress(offerer.getMail()); message.setRecipients(Message.RecipientType.TO, internetAddresses); message.setSubject("[Cadeau Noël] Et l'heureux gagnant de votre cadeau sera..."); message.setText(winner.getFirstName()); Transport.send(message); } catch (AddressException e) { e.printStackTrace(); } catch (MessagingException e) { e.printStackTrace(); } }
/** * Send the mail. * @param offerer The person who offer the gift * @param winner The person who receive the gift */
Send the mail. @param offerer The person who offer the gift @param winner The person who receive the gift
[ "Send", "the", "mail", ".", "@param", "offerer", "The", "person", "who", "offer", "the", "gift", "@param", "winner", "The", "person", "who", "receive", "the", "gift" ]
private static void _sendMail(Person offerer, Person winner) { try { Properties prop = System.getProperties(); prop.put("mail.smtp.host", __SMTP_HOST); Session session = Session.getDefaultInstance(prop, null); Message message = new MimeMessage(session); message.setFrom(new InternetAddress(__SENDER)); InternetAddress[] internetAddresses = new InternetAddress[1]; internetAddresses[0] = new InternetAddress(offerer.getMail()); message.setRecipients(Message.RecipientType.TO, internetAddresses); message.setSubject("[Cadeau Noël] Et l'heureux gagnant de votre cadeau sera..."); message.setText(winner.getFirstName()); Transport.send(message); } catch (AddressException e) { e.printStackTrace(); } catch (MessagingException e) { e.printStackTrace(); } }
[ "private", "static", "void", "_sendMail", "(", "Person", "offerer", ",", "Person", "winner", ")", "{", "try", "{", "Properties", "prop", "=", "System", ".", "getProperties", "(", ")", ";", "prop", ".", "put", "(", "\"mail.smtp.host\"", ",", "__SMTP_HOST", ")", ";", "Session", "session", "=", "Session", ".", "getDefaultInstance", "(", "prop", ",", "null", ")", ";", "Message", "message", "=", "new", "MimeMessage", "(", "session", ")", ";", "message", ".", "setFrom", "(", "new", "InternetAddress", "(", "__SENDER", ")", ")", ";", "InternetAddress", "[", "]", "internetAddresses", "=", "new", "InternetAddress", "[", "1", "]", ";", "internetAddresses", "[", "0", "]", "=", "new", "InternetAddress", "(", "offerer", ".", "getMail", "(", ")", ")", ";", "message", ".", "setRecipients", "(", "Message", ".", "RecipientType", ".", "TO", ",", "internetAddresses", ")", ";", "message", ".", "setSubject", "(", "\"[Cadeau Noël] Et l'heureux gagnant de votre cadeau sera...\")", ";", "", "message", ".", "setText", "(", "winner", ".", "getFirstName", "(", ")", ")", ";", "Transport", ".", "send", "(", "message", ")", ";", "}", "catch", "(", "AddressException", "e", ")", "{", "e", ".", "printStackTrace", "(", ")", ";", "}", "catch", "(", "MessagingException", "e", ")", "{", "e", ".", "printStackTrace", "(", ")", ";", "}", "}" ]
Send the mail.
[ "Send", "the", "mail", "." ]
[]
[ { "param": "offerer", "type": "Person" }, { "param": "winner", "type": "Person" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "offerer", "type": "Person", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "winner", "type": "Person", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 3238, 760, 918, 389, 4661, 6759, 12, 8346, 10067, 264, 16, 11573, 5657, 1224, 13, 203, 565, 288, 203, 540, 775, 203, 540, 288, 203, 2868, 6183, 2270, 273, 2332, 18, 588, 2297, 5621, 203, 2868, 2270, 18, 458, 2932, 4408, 18, 20278, 18, 2564, 3113, 1001, 55, 14636, 67, 8908, 1769, 203, 2868, 3877, 1339, 273, 3877, 18, 588, 1868, 1442, 12, 5986, 16, 446, 1769, 203, 2868, 2350, 883, 273, 394, 22059, 1079, 12, 3184, 1769, 203, 2868, 883, 18, 542, 1265, 12, 2704, 21352, 1887, 12, 972, 1090, 18556, 10019, 203, 2868, 21352, 1887, 8526, 24264, 7148, 273, 394, 21352, 1887, 63, 21, 15533, 203, 2868, 24264, 7148, 63, 20, 65, 273, 394, 21352, 1887, 12, 792, 18459, 18, 588, 6759, 10663, 203, 2868, 883, 18, 542, 22740, 12, 1079, 18, 18241, 559, 18, 4296, 16, 24264, 7148, 1769, 203, 2868, 883, 18, 542, 6638, 2932, 63, 39, 2486, 8377, 2631, 132, 109, 80, 65, 512, 88, 328, 11, 580, 594, 2616, 314, 346, 82, 970, 443, 331, 352, 266, 276, 2486, 8377, 703, 69, 7070, 1769, 203, 2868, 883, 18, 542, 1528, 12, 91, 7872, 18, 588, 3759, 461, 10663, 203, 2868, 9514, 18, 4661, 12, 2150, 1769, 203, 540, 289, 203, 540, 1044, 261, 1887, 503, 425, 13, 203, 540, 288, 203, 2868, 425, 18,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 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 377, 380, 2479, 326, 4791, 18, 203, 377, 380, 632, 891, 10067, 264, 1021, 6175, 10354, 10067, 326, 314, 2136, 203, 377, 380, 632, 891, 5657, 1224, 1021, 6175, 10354, 6798, 326, 314, 2136, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
346959e1987839bb52f6d9feaf331cbd5774d93b
BiM31/CadeauAleatoire
src/RandomGift.java
[ "Apache-2.0" ]
Java
_log
null
private static void _log(Set<String> logLines) { try (FileWriter writer = new FileWriter("gift-" + System.currentTimeMillis() + ".txt", true)) { for (String logLine : logLines) { writer.write(logLine + System.getProperty("line.separator")); } } catch (IOException ex) { ex.printStackTrace(); } }
/** * Write the log file. * @param logLines The lines to log */
Write the log file. @param logLines The lines to log
[ "Write", "the", "log", "file", ".", "@param", "logLines", "The", "lines", "to", "log" ]
private static void _log(Set<String> logLines) { try (FileWriter writer = new FileWriter("gift-" + System.currentTimeMillis() + ".txt", true)) { for (String logLine : logLines) { writer.write(logLine + System.getProperty("line.separator")); } } catch (IOException ex) { ex.printStackTrace(); } }
[ "private", "static", "void", "_log", "(", "Set", "<", "String", ">", "logLines", ")", "{", "try", "(", "FileWriter", "writer", "=", "new", "FileWriter", "(", "\"gift-\"", "+", "System", ".", "currentTimeMillis", "(", ")", "+", "\".txt\"", ",", "true", ")", ")", "{", "for", "(", "String", "logLine", ":", "logLines", ")", "{", "writer", ".", "write", "(", "logLine", "+", "System", ".", "getProperty", "(", "\"line.separator\"", ")", ")", ";", "}", "}", "catch", "(", "IOException", "ex", ")", "{", "ex", ".", "printStackTrace", "(", ")", ";", "}", "}" ]
Write the log file.
[ "Write", "the", "log", "file", "." ]
[]
[ { "param": "logLines", "type": "Set<String>" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "logLines", "type": "Set<String>", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 3238, 760, 918, 389, 1330, 12, 694, 32, 780, 34, 613, 5763, 13, 203, 565, 288, 203, 3639, 775, 261, 812, 2289, 2633, 273, 394, 24639, 2932, 75, 2136, 10951, 397, 2332, 18, 2972, 28512, 1435, 397, 3552, 5830, 3113, 638, 3719, 203, 3639, 288, 203, 5411, 364, 261, 780, 613, 1670, 294, 613, 5763, 13, 203, 5411, 288, 203, 7734, 2633, 18, 2626, 12, 1330, 1670, 397, 2332, 18, 588, 1396, 2932, 1369, 18, 11287, 7923, 1769, 203, 5411, 289, 203, 3639, 289, 203, 3639, 1044, 261, 14106, 431, 13, 203, 3639, 288, 203, 5411, 431, 18, 1188, 6332, 5621, 203, 3639, 289, 203, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 377, 380, 2598, 326, 613, 585, 18, 203, 377, 380, 632, 891, 613, 5763, 1021, 2362, 358, 613, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
e9b498746da3311dfd8e19e35f1b41f222d2f9d8
BiM31/CadeauAleatoire
src/Execution.java
[ "Apache-2.0" ]
Java
main
null
public static void main(String[] args) { List<Person> persons = new ArrayList<>(); /* Add here the persons who participates */ persons.add(new Person("Challenger 1", "challenger1@mail.org")); persons.add(new Person("Challenger 2", "challenger2@mail.org")); persons.add(new Person("Challenger 3", "challenger3@mail.org")); persons.add(new Person("Challenger 4", "challenger4@mail.org")); persons.add(new Person("Challenger 5", "challenger5@mail.org")); persons.add(new Person("Challenger 6", "challenger6@mail.org")); persons.add(new Person("Challenger 7", "challenger7@mail.org")); persons.add(new Person("Challenger 8", "challenger8@mail.org")); persons.add(new Person("Challenger 9", "challenger9@mail.org")); RandomGift.launch(persons); }
/** * Launch the execution. * @param args Nothing needed in the arguments */
Launch the execution. @param args Nothing needed in the arguments
[ "Launch", "the", "execution", ".", "@param", "args", "Nothing", "needed", "in", "the", "arguments" ]
public static void main(String[] args) { List<Person> persons = new ArrayList<>(); /* Add here the persons who participates */ persons.add(new Person("Challenger 1", "challenger1@mail.org")); persons.add(new Person("Challenger 2", "challenger2@mail.org")); persons.add(new Person("Challenger 3", "challenger3@mail.org")); persons.add(new Person("Challenger 4", "challenger4@mail.org")); persons.add(new Person("Challenger 5", "challenger5@mail.org")); persons.add(new Person("Challenger 6", "challenger6@mail.org")); persons.add(new Person("Challenger 7", "challenger7@mail.org")); persons.add(new Person("Challenger 8", "challenger8@mail.org")); persons.add(new Person("Challenger 9", "challenger9@mail.org")); RandomGift.launch(persons); }
[ "public", "static", "void", "main", "(", "String", "[", "]", "args", ")", "{", "List", "<", "Person", ">", "persons", "=", "new", "ArrayList", "<", ">", "(", ")", ";", "/* Add here the persons who participates */", "persons", ".", "add", "(", "new", "Person", "(", "\"Challenger 1\"", ",", "\"challenger1@mail.org\"", ")", ")", ";", "persons", ".", "add", "(", "new", "Person", "(", "\"Challenger 2\"", ",", "\"challenger2@mail.org\"", ")", ")", ";", "persons", ".", "add", "(", "new", "Person", "(", "\"Challenger 3\"", ",", "\"challenger3@mail.org\"", ")", ")", ";", "persons", ".", "add", "(", "new", "Person", "(", "\"Challenger 4\"", ",", "\"challenger4@mail.org\"", ")", ")", ";", "persons", ".", "add", "(", "new", "Person", "(", "\"Challenger 5\"", ",", "\"challenger5@mail.org\"", ")", ")", ";", "persons", ".", "add", "(", "new", "Person", "(", "\"Challenger 6\"", ",", "\"challenger6@mail.org\"", ")", ")", ";", "persons", ".", "add", "(", "new", "Person", "(", "\"Challenger 7\"", ",", "\"challenger7@mail.org\"", ")", ")", ";", "persons", ".", "add", "(", "new", "Person", "(", "\"Challenger 8\"", ",", "\"challenger8@mail.org\"", ")", ")", ";", "persons", ".", "add", "(", "new", "Person", "(", "\"Challenger 9\"", ",", "\"challenger9@mail.org\"", ")", ")", ";", "RandomGift", ".", "launch", "(", "persons", ")", ";", "}" ]
Launch the execution.
[ "Launch", "the", "execution", "." ]
[]
[ { "param": "args", "type": "String[]" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "args", "type": "String[]", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 760, 918, 2774, 12, 780, 8526, 833, 13, 203, 565, 288, 203, 3639, 987, 32, 8346, 34, 6175, 87, 273, 394, 2407, 29667, 5621, 203, 3639, 1748, 1436, 2674, 326, 6175, 87, 10354, 30891, 815, 1195, 203, 3639, 6175, 87, 18, 1289, 12, 2704, 11573, 2932, 782, 7862, 693, 404, 3113, 315, 343, 7862, 693, 21, 36, 4408, 18, 3341, 7923, 1769, 203, 3639, 6175, 87, 18, 1289, 12, 2704, 11573, 2932, 782, 7862, 693, 576, 3113, 315, 343, 7862, 693, 22, 36, 4408, 18, 3341, 7923, 1769, 203, 3639, 6175, 87, 18, 1289, 12, 2704, 11573, 2932, 782, 7862, 693, 890, 3113, 315, 343, 7862, 693, 23, 36, 4408, 18, 3341, 7923, 1769, 203, 3639, 6175, 87, 18, 1289, 12, 2704, 11573, 2932, 782, 7862, 693, 1059, 3113, 315, 343, 7862, 693, 24, 36, 4408, 18, 3341, 7923, 1769, 203, 3639, 6175, 87, 18, 1289, 12, 2704, 11573, 2932, 782, 7862, 693, 1381, 3113, 315, 343, 7862, 693, 25, 36, 4408, 18, 3341, 7923, 1769, 203, 3639, 6175, 87, 18, 1289, 12, 2704, 11573, 2932, 782, 7862, 693, 1666, 3113, 315, 343, 7862, 693, 26, 36, 4408, 18, 3341, 7923, 1769, 203, 3639, 6175, 87, 18, 1289, 12, 2704, 11573, 2932, 782, 7862, 693, 2371, 3113, 315, 343, 7862, 693, 27, 36, 4408, 18, 3341, 7923, 1769, 203, 3639, 6175, 87, 18, 1289, 12, 2704, 11573, 2932, 782, 7862, 693, 1725, 3113, 315, 343, 7862, 693, 28, 36, 4408, 18, 3341, 7923, 1769, 203, 3639, 6175, 87, 18, 1289, 12, 2704, 11573, 2932, 782, 7862, 693, 2468, 3113, 315, 343, 7862, 693, 29, 36, 4408, 18, 3341, 7923, 1769, 203, 540, 203, 3639, 8072, 43, 2136, 18, 20738, 12, 12479, 87, 1769, 203, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 377, 380, 14643, 326, 4588, 18, 203, 377, 380, 632, 891, 833, 13389, 3577, 316, 326, 1775, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
781d492c25800b4b2677e7ccd3e7408e59fda840
Jesus-Herself-Nuke-Bait/Akari-addition
src/com/lilithsthrone/game/combat/DamageType.java
[ "Linux-OpenIB" ]
Java
damageTarget
null
public int damageTarget(GameCharacter source, GameCharacter target, int damageAmount) { damageAmount = shieldCheck(source, target, damageAmount); if(damageAmount > 0) { target.setHealth(target.getHealth()-damageAmount); } return damageAmount; }
/** * Deals damage to the target, checking against their shielding against the attack type. Override this if the attack * @param target * @param damageAmount * @return */
Deals damage to the target, checking against their shielding against the attack type. Override this if the attack @param target @param damageAmount @return
[ "Deals", "damage", "to", "the", "target", "checking", "against", "their", "shielding", "against", "the", "attack", "type", ".", "Override", "this", "if", "the", "attack", "@param", "target", "@param", "damageAmount", "@return" ]
public int damageTarget(GameCharacter source, GameCharacter target, int damageAmount) { damageAmount = shieldCheck(source, target, damageAmount); if(damageAmount > 0) { target.setHealth(target.getHealth()-damageAmount); } return damageAmount; }
[ "public", "int", "damageTarget", "(", "GameCharacter", "source", ",", "GameCharacter", "target", ",", "int", "damageAmount", ")", "{", "damageAmount", "=", "shieldCheck", "(", "source", ",", "target", ",", "damageAmount", ")", ";", "if", "(", "damageAmount", ">", "0", ")", "{", "target", ".", "setHealth", "(", "target", ".", "getHealth", "(", ")", "-", "damageAmount", ")", ";", "}", "return", "damageAmount", ";", "}" ]
Deals damage to the target, checking against their shielding against the attack type.
[ "Deals", "damage", "to", "the", "target", "checking", "against", "their", "shielding", "against", "the", "attack", "type", "." ]
[]
[ { "param": "source", "type": "GameCharacter" }, { "param": "target", "type": "GameCharacter" }, { "param": "damageAmount", "type": "int" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "source", "type": "GameCharacter", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "target", "type": "GameCharacter", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "damageAmount", "type": "int", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 509, 302, 301, 410, 2326, 12, 12496, 7069, 1084, 16, 14121, 7069, 1018, 16, 509, 302, 301, 410, 6275, 13, 288, 203, 202, 202, 72, 301, 410, 6275, 273, 699, 491, 1564, 12, 3168, 16, 1018, 16, 302, 301, 410, 6275, 1769, 203, 202, 202, 430, 12, 72, 301, 410, 6275, 405, 374, 13, 288, 203, 1082, 202, 3299, 18, 542, 7802, 12, 3299, 18, 588, 7802, 1435, 17, 72, 301, 410, 6275, 1769, 203, 202, 202, 97, 203, 202, 202, 2463, 302, 301, 410, 6275, 31, 203, 202, 97, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 202, 380, 1505, 1031, 302, 301, 410, 358, 326, 1018, 16, 6728, 5314, 3675, 699, 491, 310, 5314, 326, 13843, 618, 18, 1439, 333, 309, 326, 13843, 203, 202, 380, 632, 891, 1018, 203, 202, 380, 632, 891, 302, 301, 410, 6275, 203, 202, 380, 632, 2463, 203, 202, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
781d492c25800b4b2677e7ccd3e7408e59fda840
Jesus-Herself-Nuke-Bait/Akari-addition
src/com/lilithsthrone/game/combat/DamageType.java
[ "Linux-OpenIB" ]
Java
shieldCheckNoDamage
null
public int shieldCheckNoDamage(GameCharacter source, GameCharacter target, int damageAmount) { if(this.getParentDamageType(source, target) != null) { damageAmount = this.getParentDamageType(source, target).shieldCheckNoDamage(source, target, damageAmount); } if(target.getShields(this) > 0) { damageAmount -= target.getShields(this); if(damageAmount < 0) { damageAmount = 0; } } return damageAmount; }
/** * @return How much damage this damage type will do vs the target, taking into account the target's shields. <br/> * <b>Does not</b> deplete the target's shields. */
@return How much damage this damage type will do vs the target, taking into account the target's shields. Does not deplete the target's shields.
[ "@return", "How", "much", "damage", "this", "damage", "type", "will", "do", "vs", "the", "target", "taking", "into", "account", "the", "target", "'", "s", "shields", ".", "Does", "not", "deplete", "the", "target", "'", "s", "shields", "." ]
public int shieldCheckNoDamage(GameCharacter source, GameCharacter target, int damageAmount) { if(this.getParentDamageType(source, target) != null) { damageAmount = this.getParentDamageType(source, target).shieldCheckNoDamage(source, target, damageAmount); } if(target.getShields(this) > 0) { damageAmount -= target.getShields(this); if(damageAmount < 0) { damageAmount = 0; } } return damageAmount; }
[ "public", "int", "shieldCheckNoDamage", "(", "GameCharacter", "source", ",", "GameCharacter", "target", ",", "int", "damageAmount", ")", "{", "if", "(", "this", ".", "getParentDamageType", "(", "source", ",", "target", ")", "!=", "null", ")", "{", "damageAmount", "=", "this", ".", "getParentDamageType", "(", "source", ",", "target", ")", ".", "shieldCheckNoDamage", "(", "source", ",", "target", ",", "damageAmount", ")", ";", "}", "if", "(", "target", ".", "getShields", "(", "this", ")", ">", "0", ")", "{", "damageAmount", "-=", "target", ".", "getShields", "(", "this", ")", ";", "if", "(", "damageAmount", "<", "0", ")", "{", "damageAmount", "=", "0", ";", "}", "}", "return", "damageAmount", ";", "}" ]
@return How much damage this damage type will do vs the target, taking into account the target's shields.
[ "@return", "How", "much", "damage", "this", "damage", "type", "will", "do", "vs", "the", "target", "taking", "into", "account", "the", "target", "'", "s", "shields", "." ]
[]
[ { "param": "source", "type": "GameCharacter" }, { "param": "target", "type": "GameCharacter" }, { "param": "damageAmount", "type": "int" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "source", "type": "GameCharacter", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "target", "type": "GameCharacter", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "damageAmount", "type": "int", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 509, 699, 491, 1564, 2279, 40, 301, 410, 12, 12496, 7069, 1084, 16, 14121, 7069, 1018, 16, 509, 302, 301, 410, 6275, 13, 288, 203, 202, 202, 430, 12, 2211, 18, 588, 3054, 40, 301, 410, 559, 12, 3168, 16, 1018, 13, 480, 446, 13, 288, 203, 1082, 202, 72, 301, 410, 6275, 273, 333, 18, 588, 3054, 40, 301, 410, 559, 12, 3168, 16, 1018, 2934, 674, 491, 1564, 2279, 40, 301, 410, 12, 3168, 16, 1018, 16, 302, 301, 410, 6275, 1769, 203, 202, 202, 97, 203, 202, 202, 430, 12, 3299, 18, 588, 1555, 491, 87, 12, 2211, 13, 405, 374, 13, 288, 203, 1082, 202, 72, 301, 410, 6275, 3947, 1018, 18, 588, 1555, 491, 87, 12, 2211, 1769, 203, 1082, 202, 430, 12, 72, 301, 410, 6275, 411, 374, 13, 288, 203, 9506, 202, 72, 301, 410, 6275, 273, 374, 31, 203, 1082, 202, 97, 203, 202, 202, 97, 203, 202, 202, 2463, 302, 301, 410, 6275, 31, 203, 202, 97, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0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411, 2848, 21259, 203, 202, 380, 411, 70, 34, 10154, 486, 1757, 70, 34, 443, 3544, 326, 1018, 1807, 699, 491, 87, 18, 203, 202, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
781d492c25800b4b2677e7ccd3e7408e59fda840
Jesus-Herself-Nuke-Bait/Akari-addition
src/com/lilithsthrone/game/combat/DamageType.java
[ "Linux-OpenIB" ]
Java
shieldCheck
null
public int shieldCheck(GameCharacter source, GameCharacter target, int damageAmount) { if(this.getParentDamageType(source, target) != null) { damageAmount = this.getParentDamageType(source, target).shieldCheck(source, target, damageAmount); } if(target.getShields(this) > 0) { int oldShields = target.getShields(this); target.setShields(this, target.getShields(this) - damageAmount); damageAmount -= oldShields; if(damageAmount < 0) { damageAmount = 0; } } return damageAmount; }
/** * @return How much damage this damage type will do vs the target, taking into account the target's shields. <br/> * <b>Does</b> deplete the target's shields. */
@return How much damage this damage type will do vs the target, taking into account the target's shields. Does deplete the target's shields.
[ "@return", "How", "much", "damage", "this", "damage", "type", "will", "do", "vs", "the", "target", "taking", "into", "account", "the", "target", "'", "s", "shields", ".", "Does", "deplete", "the", "target", "'", "s", "shields", "." ]
public int shieldCheck(GameCharacter source, GameCharacter target, int damageAmount) { if(this.getParentDamageType(source, target) != null) { damageAmount = this.getParentDamageType(source, target).shieldCheck(source, target, damageAmount); } if(target.getShields(this) > 0) { int oldShields = target.getShields(this); target.setShields(this, target.getShields(this) - damageAmount); damageAmount -= oldShields; if(damageAmount < 0) { damageAmount = 0; } } return damageAmount; }
[ "public", "int", "shieldCheck", "(", "GameCharacter", "source", ",", "GameCharacter", "target", ",", "int", "damageAmount", ")", "{", "if", "(", "this", ".", "getParentDamageType", "(", "source", ",", "target", ")", "!=", "null", ")", "{", "damageAmount", "=", "this", ".", "getParentDamageType", "(", "source", ",", "target", ")", ".", "shieldCheck", "(", "source", ",", "target", ",", "damageAmount", ")", ";", "}", "if", "(", "target", ".", "getShields", "(", "this", ")", ">", "0", ")", "{", "int", "oldShields", "=", "target", ".", "getShields", "(", "this", ")", ";", "target", ".", "setShields", "(", "this", ",", "target", ".", "getShields", "(", "this", ")", "-", "damageAmount", ")", ";", "damageAmount", "-=", "oldShields", ";", "if", "(", "damageAmount", "<", "0", ")", "{", "damageAmount", "=", "0", ";", "}", "}", "return", "damageAmount", ";", "}" ]
@return How much damage this damage type will do vs the target, taking into account the target's shields.
[ "@return", "How", "much", "damage", "this", "damage", "type", "will", "do", "vs", "the", "target", "taking", "into", "account", "the", "target", "'", "s", "shields", "." ]
[]
[ { "param": "source", "type": "GameCharacter" }, { "param": "target", "type": "GameCharacter" }, { "param": "damageAmount", "type": "int" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "source", "type": "GameCharacter", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "target", "type": "GameCharacter", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "damageAmount", "type": "int", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 509, 699, 491, 1564, 12, 12496, 7069, 1084, 16, 14121, 7069, 1018, 16, 509, 302, 301, 410, 6275, 13, 288, 203, 202, 202, 430, 12, 2211, 18, 588, 3054, 40, 301, 410, 559, 12, 3168, 16, 1018, 13, 480, 446, 13, 288, 203, 1082, 202, 72, 301, 410, 6275, 273, 333, 18, 588, 3054, 40, 301, 410, 559, 12, 3168, 16, 1018, 2934, 674, 491, 1564, 12, 3168, 16, 1018, 16, 302, 301, 410, 6275, 1769, 203, 202, 202, 97, 203, 202, 202, 430, 12, 3299, 18, 588, 1555, 491, 87, 12, 2211, 13, 405, 374, 13, 288, 203, 1082, 202, 474, 1592, 1555, 491, 87, 273, 1018, 18, 588, 1555, 491, 87, 12, 2211, 1769, 203, 1082, 202, 3299, 18, 542, 1555, 491, 87, 12, 2211, 16, 1018, 18, 588, 1555, 491, 87, 12, 2211, 13, 300, 302, 301, 410, 6275, 1769, 203, 1082, 202, 72, 301, 410, 6275, 3947, 1592, 1555, 491, 87, 31, 203, 1082, 202, 430, 12, 72, 301, 410, 6275, 411, 374, 13, 288, 203, 9506, 202, 72, 301, 410, 6275, 273, 374, 31, 203, 1082, 202, 97, 203, 202, 202, 97, 203, 202, 202, 2463, 302, 301, 410, 6275, 31, 203, 202, 97, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 202, 380, 632, 2463, 9017, 9816, 302, 301, 410, 333, 302, 301, 410, 618, 903, 741, 6195, 326, 1018, 16, 13763, 1368, 2236, 326, 1018, 1807, 699, 491, 87, 18, 411, 2848, 21259, 203, 202, 380, 411, 70, 34, 10154, 1757, 70, 34, 443, 3544, 326, 1018, 1807, 699, 491, 87, 18, 203, 202, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
0796815fe69bd6c308c9f76bf26150861d15e551
Jesus-Herself-Nuke-Bait/Akari-addition
src/com/lilithsthrone/game/inventory/clothing/AbstractClothingType.java
[ "Linux-OpenIB" ]
Java
generateClothing
AbstractClothing
public static AbstractClothing generateClothing(AbstractClothingType clothingType, Colour primaryColour, Colour secondaryColour, Colour tertiaryColour, List<ItemEffect> effects) { Colour c1 = primaryColour; Colour c2 = secondaryColour; Colour c3 = tertiaryColour; if (primaryColour == null) { if(clothingType.getAvailablePrimaryColours().isEmpty()) { c1 = DEFAULT_COLOUR_VALUE; } else { c1 = Util.randomItemFrom(clothingType.getAvailablePrimaryColours()); } } else if (clothingType.getAllAvailablePrimaryColours() != null) { if (!clothingType.getAllAvailablePrimaryColours().contains(primaryColour)) { c1 = Util.randomItemFrom(clothingType.getAllAvailablePrimaryColours()); } } if (secondaryColour == null) { if(clothingType.getAvailableSecondaryColours().isEmpty()) { c2 = DEFAULT_COLOUR_VALUE; } else { List<Colour> secondariesExclusive = new ArrayList<>(clothingType.getAvailableSecondaryColours()); if(secondariesExclusive.size()>1) { secondariesExclusive.remove(c1); } c2 = Util.randomItemFrom(secondariesExclusive); } } else if(!clothingType.getAllAvailableSecondaryColours().contains(secondaryColour)) { if(clothingType.getAllAvailableSecondaryColours().isEmpty()) { c2 = DEFAULT_COLOUR_VALUE; } else { List<Colour> secondariesExclusive = new ArrayList<>(clothingType.getAllAvailableSecondaryColours()); if(secondariesExclusive.size()>1) { secondariesExclusive.remove(c1); } c2 = Util.randomItemFrom(secondariesExclusive); } } if (tertiaryColour == null) { if(clothingType.getAvailableTertiaryColours().isEmpty()) { c3 = DEFAULT_COLOUR_VALUE; } else { List<Colour> tertiariesExclusive = new ArrayList<>(clothingType.getAvailableTertiaryColours()); if(tertiariesExclusive.size()>2) { tertiariesExclusive.remove(c1); tertiariesExclusive.remove(c2); } c3 = Util.randomItemFrom(tertiariesExclusive); } } else if(!clothingType.getAllAvailableTertiaryColours().contains(tertiaryColour)) { if(clothingType.getAllAvailableTertiaryColours().isEmpty()) { c3 = DEFAULT_COLOUR_VALUE; } else { List<Colour> tertiariesExclusive = new ArrayList<>(clothingType.getAllAvailableTertiaryColours()); if(tertiariesExclusive.size()>2) { tertiariesExclusive.remove(c1); tertiariesExclusive.remove(c2); } c3 = Util.randomItemFrom(tertiariesExclusive); } } return new AbstractClothing(clothingType, c1, c2, c3, effects) {}; }
/** * Generates clothing with the provided enchantments. */
Generates clothing with the provided enchantments.
[ "Generates", "clothing", "with", "the", "provided", "enchantments", "." ]
public static AbstractClothing generateClothing(AbstractClothingType clothingType, Colour primaryColour, Colour secondaryColour, Colour tertiaryColour, List<ItemEffect> effects) { Colour c1 = primaryColour; Colour c2 = secondaryColour; Colour c3 = tertiaryColour; if (primaryColour == null) { if(clothingType.getAvailablePrimaryColours().isEmpty()) { c1 = DEFAULT_COLOUR_VALUE; } else { c1 = Util.randomItemFrom(clothingType.getAvailablePrimaryColours()); } } else if (clothingType.getAllAvailablePrimaryColours() != null) { if (!clothingType.getAllAvailablePrimaryColours().contains(primaryColour)) { c1 = Util.randomItemFrom(clothingType.getAllAvailablePrimaryColours()); } } if (secondaryColour == null) { if(clothingType.getAvailableSecondaryColours().isEmpty()) { c2 = DEFAULT_COLOUR_VALUE; } else { List<Colour> secondariesExclusive = new ArrayList<>(clothingType.getAvailableSecondaryColours()); if(secondariesExclusive.size()>1) { secondariesExclusive.remove(c1); } c2 = Util.randomItemFrom(secondariesExclusive); } } else if(!clothingType.getAllAvailableSecondaryColours().contains(secondaryColour)) { if(clothingType.getAllAvailableSecondaryColours().isEmpty()) { c2 = DEFAULT_COLOUR_VALUE; } else { List<Colour> secondariesExclusive = new ArrayList<>(clothingType.getAllAvailableSecondaryColours()); if(secondariesExclusive.size()>1) { secondariesExclusive.remove(c1); } c2 = Util.randomItemFrom(secondariesExclusive); } } if (tertiaryColour == null) { if(clothingType.getAvailableTertiaryColours().isEmpty()) { c3 = DEFAULT_COLOUR_VALUE; } else { List<Colour> tertiariesExclusive = new ArrayList<>(clothingType.getAvailableTertiaryColours()); if(tertiariesExclusive.size()>2) { tertiariesExclusive.remove(c1); tertiariesExclusive.remove(c2); } c3 = Util.randomItemFrom(tertiariesExclusive); } } else if(!clothingType.getAllAvailableTertiaryColours().contains(tertiaryColour)) { if(clothingType.getAllAvailableTertiaryColours().isEmpty()) { c3 = DEFAULT_COLOUR_VALUE; } else { List<Colour> tertiariesExclusive = new ArrayList<>(clothingType.getAllAvailableTertiaryColours()); if(tertiariesExclusive.size()>2) { tertiariesExclusive.remove(c1); tertiariesExclusive.remove(c2); } c3 = Util.randomItemFrom(tertiariesExclusive); } } return new AbstractClothing(clothingType, c1, c2, c3, effects) {}; }
[ "public", "static", "AbstractClothing", "generateClothing", "(", "AbstractClothingType", "clothingType", ",", "Colour", "primaryColour", ",", "Colour", "secondaryColour", ",", "Colour", "tertiaryColour", ",", "List", "<", "ItemEffect", ">", "effects", ")", "{", "Colour", "c1", "=", "primaryColour", ";", "Colour", "c2", "=", "secondaryColour", ";", "Colour", "c3", "=", "tertiaryColour", ";", "if", "(", "primaryColour", "==", "null", ")", "{", "if", "(", "clothingType", ".", "getAvailablePrimaryColours", "(", ")", ".", "isEmpty", "(", ")", ")", "{", "c1", "=", "DEFAULT_COLOUR_VALUE", ";", "}", "else", "{", "c1", "=", "Util", ".", "randomItemFrom", "(", "clothingType", ".", "getAvailablePrimaryColours", "(", ")", ")", ";", "}", "}", "else", "if", "(", "clothingType", ".", "getAllAvailablePrimaryColours", "(", ")", "!=", "null", ")", "{", "if", "(", "!", "clothingType", ".", "getAllAvailablePrimaryColours", "(", ")", ".", "contains", "(", "primaryColour", ")", ")", "{", "c1", "=", "Util", ".", "randomItemFrom", "(", "clothingType", ".", "getAllAvailablePrimaryColours", "(", ")", ")", ";", "}", "}", "if", "(", "secondaryColour", "==", "null", ")", "{", "if", "(", "clothingType", ".", "getAvailableSecondaryColours", "(", ")", ".", "isEmpty", "(", ")", ")", "{", "c2", "=", "DEFAULT_COLOUR_VALUE", ";", "}", "else", "{", "List", "<", "Colour", ">", "secondariesExclusive", "=", "new", "ArrayList", "<", ">", "(", "clothingType", ".", "getAvailableSecondaryColours", "(", ")", ")", ";", "if", "(", "secondariesExclusive", ".", "size", "(", ")", ">", "1", ")", "{", "secondariesExclusive", ".", "remove", "(", "c1", ")", ";", "}", "c2", "=", "Util", ".", "randomItemFrom", "(", "secondariesExclusive", ")", ";", "}", "}", "else", "if", "(", "!", "clothingType", ".", "getAllAvailableSecondaryColours", "(", ")", ".", "contains", "(", "secondaryColour", ")", ")", "{", "if", "(", "clothingType", ".", "getAllAvailableSecondaryColours", "(", ")", ".", "isEmpty", "(", ")", ")", "{", "c2", "=", "DEFAULT_COLOUR_VALUE", ";", "}", "else", "{", "List", "<", "Colour", ">", "secondariesExclusive", "=", "new", "ArrayList", "<", ">", "(", "clothingType", ".", "getAllAvailableSecondaryColours", "(", ")", ")", ";", "if", "(", "secondariesExclusive", ".", "size", "(", ")", ">", "1", ")", "{", "secondariesExclusive", ".", "remove", "(", "c1", ")", ";", "}", "c2", "=", "Util", ".", "randomItemFrom", "(", "secondariesExclusive", ")", ";", "}", "}", "if", "(", "tertiaryColour", "==", "null", ")", "{", "if", "(", "clothingType", ".", "getAvailableTertiaryColours", "(", ")", ".", "isEmpty", "(", ")", ")", "{", "c3", "=", "DEFAULT_COLOUR_VALUE", ";", "}", "else", "{", "List", "<", "Colour", ">", "tertiariesExclusive", "=", "new", "ArrayList", "<", ">", "(", "clothingType", ".", "getAvailableTertiaryColours", "(", ")", ")", ";", "if", "(", "tertiariesExclusive", ".", "size", "(", ")", ">", "2", ")", "{", "tertiariesExclusive", ".", "remove", "(", "c1", ")", ";", "tertiariesExclusive", ".", "remove", "(", "c2", ")", ";", "}", "c3", "=", "Util", ".", "randomItemFrom", "(", "tertiariesExclusive", ")", ";", "}", "}", "else", "if", "(", "!", "clothingType", ".", "getAllAvailableTertiaryColours", "(", ")", ".", "contains", "(", "tertiaryColour", ")", ")", "{", "if", "(", "clothingType", ".", "getAllAvailableTertiaryColours", "(", ")", ".", "isEmpty", "(", ")", ")", "{", "c3", "=", "DEFAULT_COLOUR_VALUE", ";", "}", "else", "{", "List", "<", "Colour", ">", "tertiariesExclusive", "=", "new", "ArrayList", "<", ">", "(", "clothingType", ".", "getAllAvailableTertiaryColours", "(", ")", ")", ";", "if", "(", "tertiariesExclusive", ".", "size", "(", ")", ">", "2", ")", "{", "tertiariesExclusive", ".", "remove", "(", "c1", ")", ";", "tertiariesExclusive", ".", "remove", "(", "c2", ")", ";", "}", "c3", "=", "Util", ".", "randomItemFrom", "(", "tertiariesExclusive", ")", ";", "}", "}", "return", "new", "AbstractClothing", "(", "clothingType", ",", "c1", ",", "c2", ",", "c3", ",", "effects", ")", "{", "}", ";", "}" ]
Generates clothing with the provided enchantments.
[ "Generates", "clothing", "with", "the", "provided", "enchantments", "." ]
[]
[ { "param": "clothingType", "type": "AbstractClothingType" }, { "param": "primaryColour", "type": "Colour" }, { "param": "secondaryColour", "type": "Colour" }, { "param": "tertiaryColour", "type": "Colour" }, { "param": "effects", "type": "List<ItemEffect>" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "clothingType", "type": "AbstractClothingType", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "primaryColour", "type": "Colour", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "secondaryColour", "type": "Colour", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "tertiaryColour", "type": "Colour", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "effects", "type": "List<ItemEffect>", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 760, 4115, 2009, 352, 4018, 2103, 2009, 352, 4018, 12, 7469, 2009, 352, 4018, 559, 927, 352, 4018, 559, 16, 1558, 477, 3354, 26404, 16, 1558, 477, 9946, 26404, 16, 1558, 477, 268, 1051, 77, 814, 26404, 16, 987, 32, 1180, 12477, 34, 16605, 13, 288, 203, 202, 202, 26404, 276, 21, 273, 3354, 26404, 31, 203, 202, 202, 26404, 276, 22, 273, 9946, 26404, 31, 203, 202, 202, 26404, 276, 23, 273, 268, 1051, 77, 814, 26404, 31, 203, 203, 202, 202, 430, 261, 8258, 26404, 422, 446, 13, 288, 203, 1082, 202, 430, 12, 830, 352, 4018, 559, 18, 588, 5268, 6793, 914, 4390, 7675, 291, 1921, 10756, 288, 203, 9506, 202, 71, 21, 273, 3331, 67, 3865, 1502, 1099, 67, 4051, 31, 203, 1082, 202, 97, 469, 288, 203, 9506, 202, 71, 21, 273, 3564, 18, 9188, 1180, 1265, 12, 830, 352, 4018, 559, 18, 588, 5268, 6793, 914, 4390, 10663, 203, 1082, 202, 97, 203, 202, 202, 97, 469, 309, 261, 830, 352, 4018, 559, 18, 588, 1595, 5268, 6793, 914, 4390, 1435, 480, 446, 13, 288, 203, 1082, 202, 430, 16051, 830, 352, 4018, 559, 18, 588, 1595, 5268, 6793, 914, 4390, 7675, 12298, 12, 8258, 26404, 3719, 288, 203, 9506, 202, 71, 21, 273, 3564, 18, 9188, 1180, 1265, 12, 830, 352, 4018, 559, 18, 588, 1595, 5268, 6793, 914, 4390, 10663, 203, 1082, 202, 97, 203, 202, 202, 97, 203, 1082, 203, 202, 202, 430, 261, 19674, 26404, 422, 446, 13, 288, 203, 1082, 202, 430, 12, 830, 352, 4018, 559, 18, 588, 5268, 14893, 914, 4390, 7675, 291, 1921, 10756, 288, 203, 9506, 202, 71, 22, 273, 3331, 67, 3865, 1502, 1099, 67, 4051, 31, 203, 1082, 202, 97, 469, 288, 203, 9506, 202, 682, 32, 26404, 34, 2205, 5646, 17075, 273, 394, 2407, 29667, 12, 830, 352, 4018, 559, 18, 588, 5268, 14893, 914, 4390, 10663, 203, 9506, 202, 430, 12, 8538, 5646, 17075, 18, 1467, 1435, 34, 21, 13, 288, 203, 6862, 202, 8538, 5646, 17075, 18, 4479, 12, 71, 21, 1769, 203, 9506, 202, 97, 203, 9506, 202, 71, 22, 273, 3564, 18, 9188, 1180, 1265, 12, 8538, 5646, 17075, 1769, 203, 1082, 202, 97, 203, 202, 202, 97, 469, 309, 12, 5, 830, 352, 4018, 559, 18, 588, 1595, 5268, 14893, 914, 4390, 7675, 12298, 12, 19674, 26404, 3719, 288, 203, 1082, 202, 430, 12, 830, 352, 4018, 559, 18, 588, 1595, 5268, 14893, 914, 4390, 7675, 291, 1921, 10756, 288, 203, 9506, 202, 71, 22, 273, 3331, 67, 3865, 1502, 1099, 67, 4051, 31, 203, 1082, 202, 97, 469, 288, 203, 9506, 202, 682, 32, 26404, 34, 2205, 5646, 17075, 273, 394, 2407, 29667, 12, 830, 352, 4018, 559, 18, 588, 1595, 5268, 14893, 914, 4390, 10663, 203, 9506, 202, 430, 12, 8538, 5646, 17075, 18, 1467, 1435, 34, 21, 13, 288, 203, 6862, 202, 8538, 5646, 17075, 18, 4479, 12, 71, 21, 1769, 203, 9506, 202, 97, 203, 9506, 202, 71, 22, 273, 3564, 18, 9188, 1180, 1265, 12, 8538, 5646, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
[ 1, 26873, 203, 202, 380, 31902, 927, 352, 4018, 598, 326, 2112, 570, 11106, 1346, 18, 203, 202, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
adaa9fb2ac67476db74196de4626dd8113d6fd12
Jesus-Herself-Nuke-Bait/Akari-addition
src/com/lilithsthrone/game/character/npc/dominion/Finch.java
[ "Linux-OpenIB" ]
Java
addEnchantedClothing
null
private void addEnchantedClothing(List<AbstractClothing> clothingList) { List<AbstractClothing> generatedClothing = new ArrayList<>(); for(AbstractClothing clothing : clothingList) { if(clothing.getRarity()==Rarity.COMMON) { for(int i = 0; i<Util.random.nextInt(2); i++) { if(Math.random()<0.66f) { generatedClothing.add(AbstractClothingType.generateRareClothing(clothing.getClothingType())); } else { generatedClothing.add(AbstractClothingType.generateClothingWithEnchantment(clothing.getClothingType())); } } } } for(AbstractClothing c : generatedClothing) { c.setEnchantmentKnown(this, true); clothingList.add(c); } }
/** * Adds four uncommon clothing items to the list, and two rare items. */
Adds four uncommon clothing items to the list, and two rare items.
[ "Adds", "four", "uncommon", "clothing", "items", "to", "the", "list", "and", "two", "rare", "items", "." ]
private void addEnchantedClothing(List<AbstractClothing> clothingList) { List<AbstractClothing> generatedClothing = new ArrayList<>(); for(AbstractClothing clothing : clothingList) { if(clothing.getRarity()==Rarity.COMMON) { for(int i = 0; i<Util.random.nextInt(2); i++) { if(Math.random()<0.66f) { generatedClothing.add(AbstractClothingType.generateRareClothing(clothing.getClothingType())); } else { generatedClothing.add(AbstractClothingType.generateClothingWithEnchantment(clothing.getClothingType())); } } } } for(AbstractClothing c : generatedClothing) { c.setEnchantmentKnown(this, true); clothingList.add(c); } }
[ "private", "void", "addEnchantedClothing", "(", "List", "<", "AbstractClothing", ">", "clothingList", ")", "{", "List", "<", "AbstractClothing", ">", "generatedClothing", "=", "new", "ArrayList", "<", ">", "(", ")", ";", "for", "(", "AbstractClothing", "clothing", ":", "clothingList", ")", "{", "if", "(", "clothing", ".", "getRarity", "(", ")", "==", "Rarity", ".", "COMMON", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "Util", ".", "random", ".", "nextInt", "(", "2", ")", ";", "i", "++", ")", "{", "if", "(", "Math", ".", "random", "(", ")", "<", "0.66f", ")", "{", "generatedClothing", ".", "add", "(", "AbstractClothingType", ".", "generateRareClothing", "(", "clothing", ".", "getClothingType", "(", ")", ")", ")", ";", "}", "else", "{", "generatedClothing", ".", "add", "(", "AbstractClothingType", ".", "generateClothingWithEnchantment", "(", "clothing", ".", "getClothingType", "(", ")", ")", ")", ";", "}", "}", "}", "}", "for", "(", "AbstractClothing", "c", ":", "generatedClothing", ")", "{", "c", ".", "setEnchantmentKnown", "(", "this", ",", "true", ")", ";", "clothingList", ".", "add", "(", "c", ")", ";", "}", "}" ]
Adds four uncommon clothing items to the list, and two rare items.
[ "Adds", "four", "uncommon", "clothing", "items", "to", "the", "list", "and", "two", "rare", "items", "." ]
[]
[ { "param": "clothingList", "type": "List<AbstractClothing>" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "clothingList", "type": "List<AbstractClothing>", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 3238, 918, 527, 664, 11106, 329, 2009, 352, 4018, 12, 682, 32, 7469, 2009, 352, 4018, 34, 927, 352, 4018, 682, 13, 288, 203, 202, 202, 682, 32, 7469, 2009, 352, 4018, 34, 4374, 2009, 352, 4018, 273, 394, 2407, 29667, 5621, 203, 203, 202, 202, 1884, 12, 7469, 2009, 352, 4018, 927, 352, 4018, 294, 927, 352, 4018, 682, 13, 288, 203, 1082, 202, 430, 12, 830, 352, 4018, 18, 588, 54, 20498, 1435, 631, 54, 20498, 18, 4208, 17667, 13, 288, 203, 9506, 202, 1884, 12, 474, 277, 273, 374, 31, 277, 32, 1304, 18, 9188, 18, 4285, 1702, 12, 22, 1769, 277, 27245, 288, 203, 6862, 202, 430, 12, 10477, 18, 9188, 1435, 32, 20, 18, 6028, 74, 13, 288, 203, 25083, 202, 11168, 2009, 352, 4018, 18, 1289, 12, 7469, 2009, 352, 4018, 559, 18, 7163, 54, 834, 2009, 352, 4018, 12, 830, 352, 4018, 18, 588, 2009, 352, 4018, 559, 1435, 10019, 203, 6862, 202, 97, 469, 288, 203, 25083, 202, 11168, 2009, 352, 4018, 18, 1289, 12, 7469, 2009, 352, 4018, 559, 18, 7163, 2009, 352, 4018, 1190, 664, 11106, 475, 12, 830, 352, 4018, 18, 588, 2009, 352, 4018, 559, 1435, 10019, 203, 6862, 202, 97, 203, 9506, 202, 97, 203, 1082, 202, 97, 203, 202, 202, 97, 203, 203, 202, 202, 1884, 12, 7469, 2009, 352, 4018, 276, 294, 4374, 2009, 352, 4018, 13, 288, 203, 1082, 202, 71, 18, 542, 664, 11106, 475, 11925, 12, 2211, 16, 638, 1769, 203, 1082, 202, 830, 352, 4018, 682, 18, 1289, 12, 71, 1769, 203, 202, 202, 97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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 202, 380, 15605, 12792, 12704, 2586, 927, 352, 4018, 1516, 358, 326, 666, 16, 471, 2795, 25671, 1516, 18, 203, 202, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
b6dbfe8d180f63176ccd099eecf5382589701ba8
Jesus-Herself-Nuke-Bait/Akari-addition
src/com/lilithsthrone/game/character/GameCharacter.java
[ "Linux-OpenIB" ]
Java
loadImages
null
public void loadImages(boolean forceReload) { String folder = getArtworkFolderName(); // if(Main.game.isStarted()) // System.out.println(folder); if (folder.equals(artworkFolderName) && !forceReload) { // Nothing changed, abort loading return; } else { artworkList.clear(); artworkFolderName = folder; } if(!folder.isEmpty()) { for(Artist artist : Artwork.allArtists) { File f = new File("res/images/characters/" + folder + "/" + artist.getFolderName()); if(f.exists() && f.isDirectory()) { Artwork art = new Artwork(f, artist); // Cull empty artwork lists if (art.getTotalArtworkCount() > 0) { artworkList.add(art); } } } } if(artworkIndex >= getArtworkList().size()) { artworkIndex = getDefaultArtworkIndex(); } }
/** * Load or reload all artworks associated with the character. If the parameter is set to true, a reload will always * happen. Otherwise, nothing will be done if the folder name didn't change. * @param forceReload Always reload, even if the folder name didn't change */
Load or reload all artworks associated with the character. If the parameter is set to true, a reload will always happen. Otherwise, nothing will be done if the folder name didn't change. @param forceReload Always reload, even if the folder name didn't change
[ "Load", "or", "reload", "all", "artworks", "associated", "with", "the", "character", ".", "If", "the", "parameter", "is", "set", "to", "true", "a", "reload", "will", "always", "happen", ".", "Otherwise", "nothing", "will", "be", "done", "if", "the", "folder", "name", "didn", "'", "t", "change", ".", "@param", "forceReload", "Always", "reload", "even", "if", "the", "folder", "name", "didn", "'", "t", "change" ]
public void loadImages(boolean forceReload) { String folder = getArtworkFolderName(); if (folder.equals(artworkFolderName) && !forceReload) { return; } else { artworkList.clear(); artworkFolderName = folder; } if(!folder.isEmpty()) { for(Artist artist : Artwork.allArtists) { File f = new File("res/images/characters/" + folder + "/" + artist.getFolderName()); if(f.exists() && f.isDirectory()) { Artwork art = new Artwork(f, artist); if (art.getTotalArtworkCount() > 0) { artworkList.add(art); } } } } if(artworkIndex >= getArtworkList().size()) { artworkIndex = getDefaultArtworkIndex(); } }
[ "public", "void", "loadImages", "(", "boolean", "forceReload", ")", "{", "String", "folder", "=", "getArtworkFolderName", "(", ")", ";", "if", "(", "folder", ".", "equals", "(", "artworkFolderName", ")", "&&", "!", "forceReload", ")", "{", "return", ";", "}", "else", "{", "artworkList", ".", "clear", "(", ")", ";", "artworkFolderName", "=", "folder", ";", "}", "if", "(", "!", "folder", ".", "isEmpty", "(", ")", ")", "{", "for", "(", "Artist", "artist", ":", "Artwork", ".", "allArtists", ")", "{", "File", "f", "=", "new", "File", "(", "\"res/images/characters/\"", "+", "folder", "+", "\"/\"", "+", "artist", ".", "getFolderName", "(", ")", ")", ";", "if", "(", "f", ".", "exists", "(", ")", "&&", "f", ".", "isDirectory", "(", ")", ")", "{", "Artwork", "art", "=", "new", "Artwork", "(", "f", ",", "artist", ")", ";", "if", "(", "art", ".", "getTotalArtworkCount", "(", ")", ">", "0", ")", "{", "artworkList", ".", "add", "(", "art", ")", ";", "}", "}", "}", "}", "if", "(", "artworkIndex", ">=", "getArtworkList", "(", ")", ".", "size", "(", ")", ")", "{", "artworkIndex", "=", "getDefaultArtworkIndex", "(", ")", ";", "}", "}" ]
Load or reload all artworks associated with the character.
[ "Load", "or", "reload", "all", "artworks", "associated", "with", "the", "character", "." ]
[ "//\t\tif(Main.game.isStarted())", "//\t\t\tSystem.out.println(folder);", "// Nothing changed, abort loading", "// Cull empty artwork lists" ]
[ { "param": "forceReload", "type": "boolean" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "forceReload", "type": "boolean", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 918, 1262, 8946, 12, 6494, 2944, 13013, 13, 288, 203, 202, 202, 780, 3009, 273, 336, 4411, 1252, 26169, 5621, 203, 1082, 203, 759, 202, 202, 430, 12, 6376, 18, 13957, 18, 291, 9217, 10756, 203, 759, 1082, 202, 3163, 18, 659, 18, 8222, 12, 5609, 1769, 203, 1082, 203, 202, 202, 430, 261, 5609, 18, 14963, 12, 485, 1252, 26169, 13, 597, 401, 5734, 13013, 13, 288, 203, 1082, 202, 759, 13389, 3550, 16, 6263, 7153, 203, 1082, 202, 2463, 31, 203, 202, 202, 97, 469, 288, 203, 1082, 202, 485, 1252, 682, 18, 8507, 5621, 203, 1082, 202, 485, 1252, 26169, 273, 3009, 31, 203, 202, 202, 97, 203, 203, 202, 202, 430, 12, 5, 5609, 18, 291, 1921, 10756, 288, 203, 1082, 202, 1884, 12, 4411, 376, 15469, 294, 9042, 1252, 18, 454, 4411, 1486, 13, 288, 203, 9506, 202, 812, 284, 273, 394, 1387, 2932, 455, 19, 7369, 19, 20558, 4898, 397, 3009, 397, 4016, 397, 15469, 18, 588, 26169, 10663, 203, 9506, 202, 430, 12, 74, 18, 1808, 1435, 597, 284, 18, 291, 2853, 10756, 288, 203, 6862, 202, 4411, 1252, 3688, 273, 394, 9042, 1252, 12, 74, 16, 15469, 1769, 203, 6862, 202, 759, 385, 420, 1008, 3688, 1252, 6035, 203, 6862, 202, 430, 261, 485, 18, 588, 5269, 4411, 1252, 1380, 1435, 405, 374, 13, 288, 203, 25083, 202, 485, 1252, 682, 18, 1289, 12, 485, 1769, 203, 6862, 202, 97, 203, 9506, 202, 97, 203, 1082, 202, 97, 203, 202, 202, 97, 203, 1082, 203, 202, 202, 430, 12, 485, 1252, 1016, 1545, 336, 4411, 1252, 682, 7675, 1467, 10756, 288, 203, 1082, 202, 485, 1252, 1016, 273, 4829, 4411, 1252, 1016, 5621, 203, 202, 202, 97, 203, 202, 97, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 202, 380, 4444, 578, 7749, 777, 3688, 18597, 3627, 598, 326, 3351, 18, 971, 326, 1569, 353, 444, 358, 638, 16, 279, 7749, 903, 3712, 203, 202, 380, 5865, 18, 5272, 16, 5083, 903, 506, 2731, 309, 326, 3009, 508, 10242, 1404, 2549, 18, 203, 202, 380, 632, 891, 2944, 13013, 14178, 7749, 16, 5456, 309, 326, 3009, 508, 10242, 1404, 2549, 203, 202, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
b6dbfe8d180f63176ccd099eecf5382589701ba8
Jesus-Herself-Nuke-Bait/Akari-addition
src/com/lilithsthrone/game/character/GameCharacter.java
[ "Linux-OpenIB" ]
Java
importImages
null
public void importImages(List<File> imageFiles) { try { // Copy files to the character's custom image folder Path destination = Paths.get("res", "images", "characters", getArtworkFolderName(), "custom"); Files.createDirectories(destination); for (File source : imageFiles) { // Copy to temporary file and use atomic move to guarantee that the file is available Path tmp = destination.resolve(source.getName() + ".tmp"); Files.copy(source.toPath(), tmp); Files.move(tmp, destination.resolve(source.getName()), StandardCopyOption.ATOMIC_MOVE); } // Reload the character's images loadImages(true); Main.game.addEvent(new EventLogEntry(Main.game.getMinutesPassed(), "[style.colourGood(Images imported)]", imageFiles.size() + (imageFiles.size() > 1 ? " images were" : " image was") + " added"), false); } catch (IOException e1) { e1.printStackTrace(); Main.game.addEvent(new EventLogEntry(Main.game.getMinutesPassed(), "[style.colourBad(Image import failed)]", "See error.log for details"), false); } }
/** * Copies a list of files into this character's image directory and forces a reload of the artwork list. * @param imageFiles The list of files to import */
Copies a list of files into this character's image directory and forces a reload of the artwork list. @param imageFiles The list of files to import
[ "Copies", "a", "list", "of", "files", "into", "this", "character", "'", "s", "image", "directory", "and", "forces", "a", "reload", "of", "the", "artwork", "list", ".", "@param", "imageFiles", "The", "list", "of", "files", "to", "import" ]
public void importImages(List<File> imageFiles) { try { Path destination = Paths.get("res", "images", "characters", getArtworkFolderName(), "custom"); Files.createDirectories(destination); for (File source : imageFiles) { Path tmp = destination.resolve(source.getName() + ".tmp"); Files.copy(source.toPath(), tmp); Files.move(tmp, destination.resolve(source.getName()), StandardCopyOption.ATOMIC_MOVE); } loadImages(true); Main.game.addEvent(new EventLogEntry(Main.game.getMinutesPassed(), "[style.colourGood(Images imported)]", imageFiles.size() + (imageFiles.size() > 1 ? " images were" : " image was") + " added"), false); } catch (IOException e1) { e1.printStackTrace(); Main.game.addEvent(new EventLogEntry(Main.game.getMinutesPassed(), "[style.colourBad(Image import failed)]", "See error.log for details"), false); } }
[ "public", "void", "importImages", "(", "List", "<", "File", ">", "imageFiles", ")", "{", "try", "{", "Path", "destination", "=", "Paths", ".", "get", "(", "\"res\"", ",", "\"images\"", ",", "\"characters\"", ",", "getArtworkFolderName", "(", ")", ",", "\"custom\"", ")", ";", "Files", ".", "createDirectories", "(", "destination", ")", ";", "for", "(", "File", "source", ":", "imageFiles", ")", "{", "Path", "tmp", "=", "destination", ".", "resolve", "(", "source", ".", "getName", "(", ")", "+", "\".tmp\"", ")", ";", "Files", ".", "copy", "(", "source", ".", "toPath", "(", ")", ",", "tmp", ")", ";", "Files", ".", "move", "(", "tmp", ",", "destination", ".", "resolve", "(", "source", ".", "getName", "(", ")", ")", ",", "StandardCopyOption", ".", "ATOMIC_MOVE", ")", ";", "}", "loadImages", "(", "true", ")", ";", "Main", ".", "game", ".", "addEvent", "(", "new", "EventLogEntry", "(", "Main", ".", "game", ".", "getMinutesPassed", "(", ")", ",", "\"[style.colourGood(Images imported)]\"", ",", "imageFiles", ".", "size", "(", ")", "+", "(", "imageFiles", ".", "size", "(", ")", ">", "1", "?", "\" images were\"", ":", "\" image was\"", ")", "+", "\" added\"", ")", ",", "false", ")", ";", "}", "catch", "(", "IOException", "e1", ")", "{", "e1", ".", "printStackTrace", "(", ")", ";", "Main", ".", "game", ".", "addEvent", "(", "new", "EventLogEntry", "(", "Main", ".", "game", ".", "getMinutesPassed", "(", ")", ",", "\"[style.colourBad(Image import failed)]\"", ",", "\"See error.log for details\"", ")", ",", "false", ")", ";", "}", "}" ]
Copies a list of files into this character's image directory and forces a reload of the artwork list.
[ "Copies", "a", "list", "of", "files", "into", "this", "character", "'", "s", "image", "directory", "and", "forces", "a", "reload", "of", "the", "artwork", "list", "." ]
[ "// Copy files to the character's custom image folder", "// Copy to temporary file and use atomic move to guarantee that the file is available", "// Reload the character's images" ]
[ { "param": "imageFiles", "type": "List<File>" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "imageFiles", "type": "List<File>", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 918, 1930, 8946, 12, 682, 32, 812, 34, 1316, 2697, 13, 288, 203, 202, 202, 698, 288, 203, 1082, 202, 759, 5631, 1390, 358, 326, 3351, 1807, 1679, 1316, 3009, 203, 1082, 202, 743, 2929, 273, 16643, 18, 588, 2932, 455, 3113, 315, 7369, 3113, 315, 20558, 3113, 336, 4411, 1252, 26169, 9334, 315, 3662, 8863, 203, 1082, 202, 2697, 18, 2640, 13071, 12, 10590, 1769, 203, 1082, 202, 1884, 261, 812, 1084, 294, 1316, 2697, 13, 288, 203, 9506, 202, 759, 5631, 358, 6269, 585, 471, 999, 7960, 3635, 358, 18779, 716, 326, 585, 353, 2319, 203, 9506, 202, 743, 1853, 273, 2929, 18, 10828, 12, 3168, 18, 17994, 1435, 397, 3552, 5645, 8863, 203, 9506, 202, 2697, 18, 3530, 12, 3168, 18, 869, 743, 9334, 1853, 1769, 203, 9506, 202, 2697, 18, 8501, 12, 5645, 16, 2929, 18, 10828, 12, 3168, 18, 17994, 1435, 3631, 8263, 2951, 1895, 18, 28146, 2871, 67, 16537, 1769, 203, 1082, 202, 97, 203, 203, 1082, 202, 759, 23086, 326, 3351, 1807, 4602, 203, 1082, 202, 945, 8946, 12, 3767, 1769, 203, 1082, 202, 6376, 18, 13957, 18, 1289, 1133, 12, 2704, 2587, 25548, 12, 6376, 18, 13957, 18, 588, 13050, 22530, 9334, 5158, 4060, 18, 27408, 18195, 12, 8946, 9101, 25887, 3113, 203, 6862, 202, 2730, 2697, 18, 1467, 1435, 397, 261, 2730, 2697, 18, 1467, 1435, 405, 404, 692, 315, 4602, 4591, 6, 294, 315, 1316, 1703, 7923, 397, 315, 3096, 6, 3631, 629, 1769, 203, 202, 202, 97, 1044, 261, 14106, 425, 21, 13, 288, 203, 1082, 202, 73, 21, 18, 1188, 6332, 5621, 203, 1082, 202, 6376, 18, 13957, 18, 1289, 1133, 12, 2704, 2587, 25548, 12, 6376, 18, 13957, 18, 588, 13050, 22530, 9334, 5158, 4060, 18, 27408, 6434,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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 202, 380, 28506, 606, 279, 666, 434, 1390, 1368, 333, 3351, 1807, 1316, 1867, 471, 26376, 279, 7749, 434, 326, 3688, 1252, 666, 18, 203, 202, 380, 632, 891, 1316, 2697, 1021, 666, 434, 1390, 358, 1930, 203, 202, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
b6dbfe8d180f63176ccd099eecf5382589701ba8
Jesus-Herself-Nuke-Bait/Akari-addition
src/com/lilithsthrone/game/character/GameCharacter.java
[ "Linux-OpenIB" ]
Java
isAreaKnownByCharacter
null
public boolean isAreaKnownByCharacter(CoverableArea area, GameCharacter target) { if(target.equals(this) || Main.game.isConcealedSlotsReveal()) { return true; } return areasKnownByCharactersMap.get(area).contains(target.getId()); }
/** * @param area * @param target * @return true if the target knows what this character's area looks like. */
@param area @param target @return true if the target knows what this character's area looks like.
[ "@param", "area", "@param", "target", "@return", "true", "if", "the", "target", "knows", "what", "this", "character", "'", "s", "area", "looks", "like", "." ]
public boolean isAreaKnownByCharacter(CoverableArea area, GameCharacter target) { if(target.equals(this) || Main.game.isConcealedSlotsReveal()) { return true; } return areasKnownByCharactersMap.get(area).contains(target.getId()); }
[ "public", "boolean", "isAreaKnownByCharacter", "(", "CoverableArea", "area", ",", "GameCharacter", "target", ")", "{", "if", "(", "target", ".", "equals", "(", "this", ")", "||", "Main", ".", "game", ".", "isConcealedSlotsReveal", "(", ")", ")", "{", "return", "true", ";", "}", "return", "areasKnownByCharactersMap", ".", "get", "(", "area", ")", ".", "contains", "(", "target", ".", "getId", "(", ")", ")", ";", "}" ]
@param area @param target @return true if the target knows what this character's area looks like.
[ "@param", "area", "@param", "target", "@return", "true", "if", "the", "target", "knows", "what", "this", "character", "'", "s", "area", "looks", "like", "." ]
[]
[ { "param": "area", "type": "CoverableArea" }, { "param": "target", "type": "GameCharacter" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "area", "type": "CoverableArea", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "target", "type": "GameCharacter", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 1250, 353, 5484, 11925, 858, 7069, 12, 8084, 429, 5484, 5091, 16, 14121, 7069, 1018, 13, 288, 203, 202, 202, 430, 12, 3299, 18, 14963, 12, 2211, 13, 747, 12740, 18, 13957, 18, 291, 442, 311, 18931, 16266, 426, 24293, 10756, 288, 203, 1082, 202, 2463, 638, 31, 203, 202, 202, 97, 203, 202, 202, 2463, 15586, 11925, 858, 11600, 863, 18, 588, 12, 5036, 2934, 12298, 12, 3299, 18, 26321, 10663, 203, 202, 97, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,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 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 202, 380, 632, 891, 5091, 203, 202, 380, 632, 891, 1018, 203, 202, 380, 632, 2463, 638, 309, 326, 1018, 21739, 4121, 333, 3351, 1807, 5091, 10192, 3007, 18, 203, 202, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
b6dbfe8d180f63176ccd099eecf5382589701ba8
Jesus-Herself-Nuke-Bait/Akari-addition
src/com/lilithsthrone/game/character/GameCharacter.java
[ "Linux-OpenIB" ]
Java
isKnowsCharacterArea
null
public boolean isKnowsCharacterArea(CoverableArea area, GameCharacter target) { if(target.equals(this)) { return true; } return target.isAreaKnownByCharacter(area, this); }
/** * @param area * @param target * @return true if this character knows what the target's area looks like. */
@param area @param target @return true if this character knows what the target's area looks like.
[ "@param", "area", "@param", "target", "@return", "true", "if", "this", "character", "knows", "what", "the", "target", "'", "s", "area", "looks", "like", "." ]
public boolean isKnowsCharacterArea(CoverableArea area, GameCharacter target) { if(target.equals(this)) { return true; } return target.isAreaKnownByCharacter(area, this); }
[ "public", "boolean", "isKnowsCharacterArea", "(", "CoverableArea", "area", ",", "GameCharacter", "target", ")", "{", "if", "(", "target", ".", "equals", "(", "this", ")", ")", "{", "return", "true", ";", "}", "return", "target", ".", "isAreaKnownByCharacter", "(", "area", ",", "this", ")", ";", "}" ]
@param area @param target @return true if this character knows what the target's area looks like.
[ "@param", "area", "@param", "target", "@return", "true", "if", "this", "character", "knows", "what", "the", "target", "'", "s", "area", "looks", "like", "." ]
[]
[ { "param": "area", "type": "CoverableArea" }, { "param": "target", "type": "GameCharacter" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "area", "type": "CoverableArea", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "target", "type": "GameCharacter", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 1250, 353, 47, 3338, 87, 7069, 5484, 12, 8084, 429, 5484, 5091, 16, 14121, 7069, 1018, 13, 288, 203, 202, 202, 430, 12, 3299, 18, 14963, 12, 2211, 3719, 288, 203, 1082, 202, 2463, 638, 31, 203, 202, 202, 97, 203, 202, 202, 2463, 1018, 18, 291, 5484, 11925, 858, 7069, 12, 5036, 16, 333, 1769, 203, 202, 97, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 202, 380, 632, 891, 5091, 203, 202, 380, 632, 891, 1018, 203, 202, 380, 632, 2463, 638, 309, 333, 3351, 21739, 4121, 326, 1018, 1807, 5091, 10192, 3007, 18, 203, 202, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
b6dbfe8d180f63176ccd099eecf5382589701ba8
Jesus-Herself-Nuke-Bait/Akari-addition
src/com/lilithsthrone/game/character/GameCharacter.java
[ "Linux-OpenIB" ]
Java
incrementAffection
String
public String incrementAffection(GameCharacter character, float affectionIncrement, String affectionLossDescription) { setAffection(character, getAffection(character) + affectionIncrement); return UtilText.parse(this, character, "<p style='text-align:center'>" + (affectionLossDescription!=null && affectionLossDescription.isEmpty()?affectionLossDescription+"<br/>":"") + "[npc.Name] "+(affectionIncrement>0?"[style.boldGood(gains)]":"[style.boldBad(loses)]")+" <b>"+Math.abs(affectionIncrement)+"</b> [style.boldAffection(affection)] towards [npc2.name]!<br/>" + AffectionLevel.getDescription(this, character, getAffectionLevel(character), true) + "</p>"); }
/** * Increments this character's affection towards the supplied GameCharacter. * @param affectionLossDescription The description to be added to the returned affection loss String. Is parsed with "npc" being this character, and "npc2" being the passed in character. */
Increments this character's affection towards the supplied GameCharacter. @param affectionLossDescription The description to be added to the returned affection loss String. Is parsed with "npc" being this character, and "npc2" being the passed in character.
[ "Increments", "this", "character", "'", "s", "affection", "towards", "the", "supplied", "GameCharacter", ".", "@param", "affectionLossDescription", "The", "description", "to", "be", "added", "to", "the", "returned", "affection", "loss", "String", ".", "Is", "parsed", "with", "\"", "npc", "\"", "being", "this", "character", "and", "\"", "npc2", "\"", "being", "the", "passed", "in", "character", "." ]
public String incrementAffection(GameCharacter character, float affectionIncrement, String affectionLossDescription) { setAffection(character, getAffection(character) + affectionIncrement); return UtilText.parse(this, character, "<p style='text-align:center'>" + (affectionLossDescription!=null && affectionLossDescription.isEmpty()?affectionLossDescription+"<br/>":"") + "[npc.Name] "+(affectionIncrement>0?"[style.boldGood(gains)]":"[style.boldBad(loses)]")+" <b>"+Math.abs(affectionIncrement)+"</b> [style.boldAffection(affection)] towards [npc2.name]!<br/>" + AffectionLevel.getDescription(this, character, getAffectionLevel(character), true) + "</p>"); }
[ "public", "String", "incrementAffection", "(", "GameCharacter", "character", ",", "float", "affectionIncrement", ",", "String", "affectionLossDescription", ")", "{", "setAffection", "(", "character", ",", "getAffection", "(", "character", ")", "+", "affectionIncrement", ")", ";", "return", "UtilText", ".", "parse", "(", "this", ",", "character", ",", "\"<p style='text-align:center'>\"", "+", "(", "affectionLossDescription", "!=", "null", "&&", "affectionLossDescription", ".", "isEmpty", "(", ")", "?", "affectionLossDescription", "+", "\"<br/>\"", ":", "\"\"", ")", "+", "\"[npc.Name] \"", "+", "(", "affectionIncrement", ">", "0", "?", "\"[style.boldGood(gains)]\"", ":", "\"[style.boldBad(loses)]\"", ")", "+", "\" <b>\"", "+", "Math", ".", "abs", "(", "affectionIncrement", ")", "+", "\"</b> [style.boldAffection(affection)] towards [npc2.name]!<br/>\"", "+", "AffectionLevel", ".", "getDescription", "(", "this", ",", "character", ",", "getAffectionLevel", "(", "character", ")", ",", "true", ")", "+", "\"</p>\"", ")", ";", "}" ]
Increments this character's affection towards the supplied GameCharacter.
[ "Increments", "this", "character", "'", "s", "affection", "towards", "the", "supplied", "GameCharacter", "." ]
[]
[ { "param": "character", "type": "GameCharacter" }, { "param": "affectionIncrement", "type": "float" }, { "param": "affectionLossDescription", "type": "String" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "character", "type": "GameCharacter", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "affectionIncrement", "type": "float", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "affectionLossDescription", "type": "String", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 514, 5504, 13785, 794, 12, 12496, 7069, 3351, 16, 1431, 7103, 794, 10798, 16, 514, 7103, 794, 20527, 3291, 13, 288, 203, 202, 202, 542, 13785, 794, 12, 11560, 16, 4506, 1403, 794, 12, 11560, 13, 397, 7103, 794, 10798, 1769, 203, 1082, 203, 202, 202, 2463, 3564, 1528, 18, 2670, 12, 2211, 16, 3351, 16, 203, 9506, 202, 6, 32, 84, 2154, 2218, 955, 17, 7989, 30, 5693, 28533, 203, 6862, 202, 15, 261, 7329, 794, 20527, 3291, 5, 33, 2011, 597, 7103, 794, 20527, 3291, 18, 291, 1921, 1435, 35, 7329, 794, 20527, 3291, 9078, 32, 2848, 26293, 2773, 7923, 203, 6862, 202, 15, 5158, 82, 2436, 18, 461, 65, 13773, 12, 7329, 794, 10798, 34, 20, 7225, 63, 4060, 18, 16390, 18195, 12, 75, 4167, 13, 4279, 2773, 63, 4060, 18, 16390, 6434, 12, 383, 2420, 13, 4279, 13, 9078, 411, 70, 2984, 15, 10477, 18, 5113, 12, 7329, 794, 10798, 13, 9078, 1757, 70, 34, 306, 4060, 18, 16390, 13785, 794, 12, 7329, 794, 25887, 23248, 306, 82, 2436, 22, 18, 529, 65, 5, 32, 2848, 26293, 203, 6862, 202, 15, 23906, 794, 2355, 18, 588, 3291, 12, 2211, 16, 3351, 16, 4506, 1403, 794, 2355, 12, 11560, 3631, 638, 13, 203, 9506, 202, 15, 6823, 84, 2984, 1769, 203, 202, 97, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0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807, 7103, 794, 23248, 326, 4580, 14121, 7069, 18, 203, 202, 380, 632, 891, 7103, 794, 20527, 3291, 1021, 2477, 358, 506, 3096, 358, 326, 2106, 7103, 794, 8324, 514, 18, 2585, 2707, 598, 315, 82, 2436, 6, 3832, 333, 3351, 16, 471, 315, 82, 2436, 22, 6, 3832, 326, 2275, 316, 3351, 18, 7010, 202, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
b6dbfe8d180f63176ccd099eecf5382589701ba8
Jesus-Herself-Nuke-Bait/Akari-addition
src/com/lilithsthrone/game/character/GameCharacter.java
[ "Linux-OpenIB" ]
Java
clearAllCompanionVariables
null
protected void clearAllCompanionVariables() { this.partyLeader=""; this.getCompanionsId().clear(); this.elementalID = ""; }
/** * <b>Only to be called on character slave import! Don't use this method!!!</b> */
Only to be called on character slave import. Don't use this method!!!
[ "Only", "to", "be", "called", "on", "character", "slave", "import", ".", "Don", "'", "t", "use", "this", "method!!!" ]
protected void clearAllCompanionVariables() { this.partyLeader=""; this.getCompanionsId().clear(); this.elementalID = ""; }
[ "protected", "void", "clearAllCompanionVariables", "(", ")", "{", "this", ".", "partyLeader", "=", "\"\"", ";", "this", ".", "getCompanionsId", "(", ")", ".", "clear", "(", ")", ";", "this", ".", "elementalID", "=", "\"\"", ";", "}" ]
<b>Only to be called on character slave import!
[ "<b", ">", "Only", "to", "be", "called", "on", "character", "slave", "import!" ]
[]
[]
{ "returns": [], "raises": [], "params": [], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 4750, 918, 29453, 2945, 304, 285, 6158, 1435, 288, 203, 202, 202, 2211, 18, 21214, 15254, 1546, 14432, 203, 202, 202, 2211, 18, 588,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333, 707, 25885, 1757, 70, 34, 203, 202, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
b6dbfe8d180f63176ccd099eecf5382589701ba8
Jesus-Herself-Nuke-Bait/Akari-addition
src/com/lilithsthrone/game/character/GameCharacter.java
[ "Linux-OpenIB" ]
Java
addCompanion
null
public boolean addCompanion(GameCharacter character) { if(!character.isPlayer() && (getPartyLeader() == null || character instanceof Elemental)) { if(character.getPartyLeader() != null) { character.getPartyLeader().removeCompanion(character); } character.setPartyLeader(this.getId()); character.setLocation(this.getWorldLocation(), this.getLocation(), false); return this.companions.add(character.getId()); } else { return false; } }
/** * Adds a companion character, if possible. Removes character from a previous party.<br/> * Should be preceded by a canHaveMoreCompanions() check. * @param npc * @return */
Adds a companion character, if possible. Removes character from a previous party. Should be preceded by a canHaveMoreCompanions() check. @param npc @return
[ "Adds", "a", "companion", "character", "if", "possible", ".", "Removes", "character", "from", "a", "previous", "party", ".", "Should", "be", "preceded", "by", "a", "canHaveMoreCompanions", "()", "check", ".", "@param", "npc", "@return" ]
public boolean addCompanion(GameCharacter character) { if(!character.isPlayer() && (getPartyLeader() == null || character instanceof Elemental)) { if(character.getPartyLeader() != null) { character.getPartyLeader().removeCompanion(character); } character.setPartyLeader(this.getId()); character.setLocation(this.getWorldLocation(), this.getLocation(), false); return this.companions.add(character.getId()); } else { return false; } }
[ "public", "boolean", "addCompanion", "(", "GameCharacter", "character", ")", "{", "if", "(", "!", "character", ".", "isPlayer", "(", ")", "&&", "(", "getPartyLeader", "(", ")", "==", "null", "||", "character", "instanceof", "Elemental", ")", ")", "{", "if", "(", "character", ".", "getPartyLeader", "(", ")", "!=", "null", ")", "{", "character", ".", "getPartyLeader", "(", ")", ".", "removeCompanion", "(", "character", ")", ";", "}", "character", ".", "setPartyLeader", "(", "this", ".", "getId", "(", ")", ")", ";", "character", ".", "setLocation", "(", "this", ".", "getWorldLocation", "(", ")", ",", "this", ".", "getLocation", "(", ")", ",", "false", ")", ";", "return", "this", ".", "companions", ".", "add", "(", "character", ".", "getId", "(", ")", ")", ";", "}", "else", "{", "return", "false", ";", "}", "}" ]
Adds a companion character, if possible.
[ "Adds", "a", "companion", "character", "if", "possible", "." ]
[]
[ { "param": "character", "type": "GameCharacter" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "character", "type": "GameCharacter", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 1250, 527, 2945, 304, 285, 12, 12496, 7069, 3351, 13, 288, 203, 202, 202, 430, 12, 5, 11560, 18, 291, 12148, 1435, 597, 261, 588, 17619, 15254, 1435, 422, 446, 747, 3351, 1276, 3010, 287, 3719, 288, 203, 1082, 202, 430, 12, 11560, 18, 588, 17619, 15254, 1435, 480, 446, 13, 288, 203, 9506, 202, 11560, 18, 588, 17619, 15254, 7675, 4479, 2945, 304, 285, 12, 11560, 1769, 203, 1082, 202, 97, 203, 1082, 202, 11560, 18, 542, 17619, 15254, 12, 2211, 18, 26321, 10663, 203, 1082, 202, 11560, 18, 542, 2735, 12, 2211, 18, 588, 18071, 2735, 9334, 333, 18, 588, 2735, 9334, 629, 1769, 203, 1082, 202, 2463, 333, 18, 2919, 304, 1115, 18, 1289, 12, 11560, 18, 26321, 10663, 203, 9506, 203, 202, 202, 97, 469, 288, 203, 1082, 202, 2463, 629, 31, 203, 202, 202, 97, 203, 202, 97, 2, 0, 0, 0, 0, 0, 0, 0, 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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 202, 380, 15605, 279, 1161, 304, 285, 3351, 16, 309, 3323, 18, 20284, 3351, 628, 279, 2416, 18285, 22782, 2848, 21259, 203, 202, 380, 9363, 506, 29953, 635, 279, 848, 17944, 7417, 2945, 304, 1115, 1435, 866, 18, 203, 202, 380, 632, 891, 1130, 71, 203, 202, 380, 632, 2463, 203, 202, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
b6dbfe8d180f63176ccd099eecf5382589701ba8
Jesus-Herself-Nuke-Bait/Akari-addition
src/com/lilithsthrone/game/character/GameCharacter.java
[ "Linux-OpenIB" ]
Java
hasCompanion
null
public boolean hasCompanion(GameCharacter character) { if(this.companions == null) { return false; } return this.companions.contains(character.getId()); }
/** * Returns true if the character is currently the character's companion. */
Returns true if the character is currently the character's companion.
[ "Returns", "true", "if", "the", "character", "is", "currently", "the", "character", "'", "s", "companion", "." ]
public boolean hasCompanion(GameCharacter character) { if(this.companions == null) { return false; } return this.companions.contains(character.getId()); }
[ "public", "boolean", "hasCompanion", "(", "GameCharacter", "character", ")", "{", "if", "(", "this", ".", "companions", "==", "null", ")", "{", "return", "false", ";", "}", "return", "this", ".", "companions", ".", "contains", "(", "character", ".", "getId", "(", ")", ")", ";", "}" ]
Returns true if the character is currently the character's companion.
[ "Returns", "true", "if", "the", "character", "is", "currently", "the", "character", "'", "s", "companion", "." ]
[]
[ { "param": "character", "type": "GameCharacter" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "character", "type": "GameCharacter", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 1250, 711, 2945, 304, 285, 12, 12496, 7069, 3351, 13, 288, 203, 202, 202, 430, 12, 2211, 18, 2919, 304, 1115, 422, 446, 13, 288, 203, 1082, 202, 2463, 629, 31, 203, 202, 202, 97, 203, 202, 202, 2463, 333, 18, 2919, 304, 1115, 18, 12298, 12, 11560, 18, 26321, 10663, 203, 202, 97, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 202, 380, 2860, 638, 309, 326, 3351, 353, 4551, 326, 3351, 1807, 1161, 304, 285, 18, 203, 202, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
b6dbfe8d180f63176ccd099eecf5382589701ba8
Jesus-Herself-Nuke-Bait/Akari-addition
src/com/lilithsthrone/game/character/GameCharacter.java
[ "Linux-OpenIB" ]
Java
canHaveMoreCompanions
null
public boolean canHaveMoreCompanions() { int elementals = 0; for(GameCharacter companion : getCompanions()) { if(companion instanceof Elemental) { elementals++; } } return this.maxCompanions != -1 && (companions.size()-elementals) < maxCompanions; }
/** * @return true if there is space for more party members. Elemental companions do not take up a companion slot. */
@return true if there is space for more party members. Elemental companions do not take up a companion slot.
[ "@return", "true", "if", "there", "is", "space", "for", "more", "party", "members", ".", "Elemental", "companions", "do", "not", "take", "up", "a", "companion", "slot", "." ]
public boolean canHaveMoreCompanions() { int elementals = 0; for(GameCharacter companion : getCompanions()) { if(companion instanceof Elemental) { elementals++; } } return this.maxCompanions != -1 && (companions.size()-elementals) < maxCompanions; }
[ "public", "boolean", "canHaveMoreCompanions", "(", ")", "{", "int", "elementals", "=", "0", ";", "for", "(", "GameCharacter", "companion", ":", "getCompanions", "(", ")", ")", "{", "if", "(", "companion", "instanceof", "Elemental", ")", "{", "elementals", "++", ";", "}", "}", "return", "this", ".", "maxCompanions", "!=", "-", "1", "&&", "(", "companions", ".", "size", "(", ")", "-", "elementals", ")", "<", "maxCompanions", ";", "}" ]
@return true if there is space for more party members.
[ "@return", "true", "if", "there", "is", "space", "for", "more", "party", "members", "." ]
[]
[]
{ "returns": [], "raises": [], "params": [], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 1250, 848, 17944, 7417, 2945, 304, 1115, 1435, 288, 203, 202, 202, 474, 930, 1031, 273, 374, 31, 203, 202, 202, 1884, 12, 12496, 7069, 1161, 304, 285, 294, 336, 2945, 304, 1115, 10756, 288, 203, 1082, 202, 430, 12, 2919, 304, 285, 1276, 3010, 287, 13, 288, 203, 9506, 202, 2956, 1031, 9904, 31, 203, 1082, 202, 97, 203, 202, 202, 97, 203, 1082, 203, 202, 202, 2463, 333, 18, 1896, 2945, 304, 1115, 480, 300, 21, 203, 9506, 202, 10, 10, 261, 2919, 304, 1115, 18, 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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 202, 380, 632, 2463, 638, 309, 1915, 353, 3476, 364, 1898, 18285, 4833, 18, 3010, 287, 1161, 304, 1115, 741, 486, 4862, 731, 279, 1161, 304, 285, 4694, 18, 203, 202, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
b6dbfe8d180f63176ccd099eecf5382589701ba8
Jesus-Herself-Nuke-Bait/Akari-addition
src/com/lilithsthrone/game/character/GameCharacter.java
[ "Linux-OpenIB" ]
Java
isCompanionAvailable
null
public boolean isCompanionAvailable(GameCharacter partyLeader) { if(Main.game.getPlayer().getFriendlyOccupants().contains(this.getId()) && this.getHistory().isAtWork(Main.game.getHourOfDay()) && !this.getHistory().isLowlife()) { return false; } return (this.isSlave() && this.getOwner().equals(partyLeader)) || (Main.game.getPlayer().getFriendlyOccupants().contains(this.getId())) || (this instanceof Elemental && ((Elemental)this).getSummoner().equals(partyLeader)); }
/** * Override if needed. Returns true if this companion is available to that character. Is called during turn updates to make sure NPCs keep their companionship state updated. */
Override if needed. Returns true if this companion is available to that character. Is called during turn updates to make sure NPCs keep their companionship state updated.
[ "Override", "if", "needed", ".", "Returns", "true", "if", "this", "companion", "is", "available", "to", "that", "character", ".", "Is", "called", "during", "turn", "updates", "to", "make", "sure", "NPCs", "keep", "their", "companionship", "state", "updated", "." ]
public boolean isCompanionAvailable(GameCharacter partyLeader) { if(Main.game.getPlayer().getFriendlyOccupants().contains(this.getId()) && this.getHistory().isAtWork(Main.game.getHourOfDay()) && !this.getHistory().isLowlife()) { return false; } return (this.isSlave() && this.getOwner().equals(partyLeader)) || (Main.game.getPlayer().getFriendlyOccupants().contains(this.getId())) || (this instanceof Elemental && ((Elemental)this).getSummoner().equals(partyLeader)); }
[ "public", "boolean", "isCompanionAvailable", "(", "GameCharacter", "partyLeader", ")", "{", "if", "(", "Main", ".", "game", ".", "getPlayer", "(", ")", ".", "getFriendlyOccupants", "(", ")", ".", "contains", "(", "this", ".", "getId", "(", ")", ")", "&&", "this", ".", "getHistory", "(", ")", ".", "isAtWork", "(", "Main", ".", "game", ".", "getHourOfDay", "(", ")", ")", "&&", "!", "this", ".", "getHistory", "(", ")", ".", "isLowlife", "(", ")", ")", "{", "return", "false", ";", "}", "return", "(", "this", ".", "isSlave", "(", ")", "&&", "this", ".", "getOwner", "(", ")", ".", "equals", "(", "partyLeader", ")", ")", "||", "(", "Main", ".", "game", ".", "getPlayer", "(", ")", ".", "getFriendlyOccupants", "(", ")", ".", "contains", "(", "this", ".", "getId", "(", ")", ")", ")", "||", "(", "this", "instanceof", "Elemental", "&&", "(", "(", "Elemental", ")", "this", ")", ".", "getSummoner", "(", ")", ".", "equals", "(", "partyLeader", ")", ")", ";", "}" ]
Override if needed.
[ "Override", "if", "needed", "." ]
[]
[ { "param": "partyLeader", "type": "GameCharacter" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "partyLeader", "type": "GameCharacter", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 1250, 353, 2945, 304, 285, 5268, 12, 12496, 7069, 18285, 15254, 13, 288, 203, 202, 202, 430, 12, 6376, 18, 13957, 18, 588, 12148, 7675, 588, 19730, 24269, 416, 4388, 7675, 12298, 12, 2211, 18, 26321, 10756, 597, 333, 18, 588, 5623, 7675, 291, 861, 2421, 12, 6376, 18, 13957, 18, 588, 13433, 17263, 10756, 597, 401, 2211, 18, 588, 5623, 7675, 291, 10520, 10256, 73, 10756, 288, 203, 1082, 202, 2463, 629, 31, 203, 202, 202, 97, 203, 1082, 203, 202, 202, 2463, 261, 2211, 18, 291, 20302, 1435, 597, 333, 18, 588, 5541, 7675, 14963, 12, 21214, 15254, 3719, 203, 9506, 202, 20081, 261, 6376, 18, 13957, 18, 588, 12148, 7675, 588, 19730, 24269, 416, 4388, 7675, 12298, 12, 2211, 18, 26321, 1435, 3719, 203, 9506, 202, 20081, 261, 2211, 1276, 3010, 287, 597, 14015, 1046, 287, 13, 2211, 2934, 588, 3495, 2586, 264,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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 202, 380, 1439, 309, 3577, 18, 2860, 638, 309, 333, 1161, 304, 285, 353, 2319, 358, 716, 3351, 18, 2585, 2566, 4982, 7005, 4533, 358, 1221, 3071, 423, 3513, 87, 3455, 3675, 1161, 304, 285, 3261, 919, 3526, 18, 7010, 202, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
b6dbfe8d180f63176ccd099eecf5382589701ba8
Jesus-Herself-Nuke-Bait/Akari-addition
src/com/lilithsthrone/game/character/GameCharacter.java
[ "Linux-OpenIB" ]
Java
calculateSexTypeWeighting
null
public int calculateSexTypeWeighting(SexType type, GameCharacter target, List<SexType> request, boolean lustOrArousalCalculation) { int weight = 0; List<Fetish> fetishes = type.getRelatedFetishes(this, target, true, false); for(Fetish fetish : fetishes) { if(this.hasFetish(fetish)) { weight+=7; } else { switch(this.getFetishDesire(fetish)) { case FOUR_LOVE: weight+=5; break; case THREE_LIKE: weight+=3; break; case TWO_NEUTRAL: weight+=1; break; case ONE_DISLIKE: weight-=3; break; case ZERO_HATE: weight-=5; break; } } } boolean isRequest = false; if(request!=null && weight>=0) { // Do not increase weighting if the base action is not wanted by this character. for(SexType st : request) { if((st.getTargetedSexArea()==type.getTargetedSexArea() || st.getPerformingSexArea()==type.getPerformingSexArea())) { weight += 50; isRequest = true; } } } if(fetishes.contains(Fetish.FETISH_ORAL_GIVING)) { for(Addiction add : this.getAddictions()) { if(target.hasPenisIgnoreDildo() && add.getFluid() == target.getCumType() && fetishes.contains(Fetish.FETISH_PENIS_RECEIVING)) { weight+=10; } if(target.hasVagina() && add.getFluid() == target.getGirlcumType() && fetishes.contains(Fetish.FETISH_VAGINAL_GIVING)) { weight+=10; } if(target.getBreastRawMilkStorageValue()>0 && add.getFluid() == target.getMilkType() && fetishes.contains(Fetish.FETISH_BREASTS_OTHERS)) { weight+=10; } } } if((fetishes.contains(Fetish.FETISH_ANAL_GIVING) || fetishes.contains(Fetish.FETISH_ANAL_RECEIVING)) && !Main.game.isAnalContentEnabled()) { weight-=100000; } if((fetishes.contains(Fetish.FETISH_FOOT_GIVING) || fetishes.contains(Fetish.FETISH_FOOT_RECEIVING)) && !Main.game.isFootContentEnabled()) { weight-=100000; } // Anal actions are not available unless the person likes anal. if(fetishes.contains(Fetish.FETISH_ANAL_RECEIVING) && !isRequest) { if(type.getAsParticipant()==SexParticipantType.SELF && !this.getFetishDesire(Fetish.FETISH_ANAL_RECEIVING).isPositive()) { weight-=100000; // ban self-anal actions unless the character likes anal } if(!fetishes.contains(Fetish.FETISH_PENIS_RECEIVING) && ((!this.getFetishDesire(Fetish.FETISH_ANAL_RECEIVING).isPositive() && !lustOrArousalCalculation) || this.getFetishDesire(Fetish.FETISH_ANAL_GIVING).isNegative())) { weight-=100000; // Ban non-penis anal actions (like fingering and tail sex) unless the character likes anal } } if(fetishes.contains(Fetish.FETISH_ANAL_GIVING) && !isRequest) { if(type.getAsParticipant()==SexParticipantType.SELF && !this.getFetishDesire(Fetish.FETISH_ANAL_GIVING).isPositive()) { weight-=100000; // ban self-anal actions unless the character likes anal } if(!fetishes.contains(Fetish.FETISH_PENIS_GIVING) && ((!this.getFetishDesire(Fetish.FETISH_ANAL_GIVING).isPositive() && !lustOrArousalCalculation) || this.getFetishDesire(Fetish.FETISH_ANAL_GIVING).isNegative())) { weight-=100000; // Ban non-penis anal actions (like fingering and tail sex) unless the character likes anal } } List<Fetish> fetishesOpposite = type.getOppositeFetishes(this, target, true, false); if(fetishesOpposite.contains(Fetish.FETISH_DEFLOWERING) && this.hasFetish(Fetish.FETISH_PURE_VIRGIN) && fetishes.contains(Fetish.FETISH_VAGINAL_RECEIVING)) { weight-=50; } return weight; }
/** * @param type The SexType to find the weight of. * @param target The targeted character for the type. * @param request Any requests from the target that should be taken into account for weighting. * @param lustOrArousalCalculation True if this weighting calculation is for calculating lust or arousal increases. This slightly differs from normal by removing hugely negative weightings from anal actions. * @return The weight value of the type, usually of a value of around +/- 20, but sometimes higher for requests. */
@param type The SexType to find the weight of. @param target The targeted character for the type. @param request Any requests from the target that should be taken into account for weighting. @param lustOrArousalCalculation True if this weighting calculation is for calculating lust or arousal increases. This slightly differs from normal by removing hugely negative weightings from anal actions. @return The weight value of the type, usually of a value of around +/- 20, but sometimes higher for requests.
[ "@param", "type", "The", "SexType", "to", "find", "the", "weight", "of", ".", "@param", "target", "The", "targeted", "character", "for", "the", "type", ".", "@param", "request", "Any", "requests", "from", "the", "target", "that", "should", "be", "taken", "into", "account", "for", "weighting", ".", "@param", "lustOrArousalCalculation", "True", "if", "this", "weighting", "calculation", "is", "for", "calculating", "lust", "or", "arousal", "increases", ".", "This", "slightly", "differs", "from", "normal", "by", "removing", "hugely", "negative", "weightings", "from", "anal", "actions", ".", "@return", "The", "weight", "value", "of", "the", "type", "usually", "of", "a", "value", "of", "around", "+", "/", "-", "20", "but", "sometimes", "higher", "for", "requests", "." ]
public int calculateSexTypeWeighting(SexType type, GameCharacter target, List<SexType> request, boolean lustOrArousalCalculation) { int weight = 0; List<Fetish> fetishes = type.getRelatedFetishes(this, target, true, false); for(Fetish fetish : fetishes) { if(this.hasFetish(fetish)) { weight+=7; } else { switch(this.getFetishDesire(fetish)) { case FOUR_LOVE: weight+=5; break; case THREE_LIKE: weight+=3; break; case TWO_NEUTRAL: weight+=1; break; case ONE_DISLIKE: weight-=3; break; case ZERO_HATE: weight-=5; break; } } } boolean isRequest = false; if(request!=null && weight>=0) { for(SexType st : request) { if((st.getTargetedSexArea()==type.getTargetedSexArea() || st.getPerformingSexArea()==type.getPerformingSexArea())) { weight += 50; isRequest = true; } } } if(fetishes.contains(Fetish.FETISH_ORAL_GIVING)) { for(Addiction add : this.getAddictions()) { if(target.hasPenisIgnoreDildo() && add.getFluid() == target.getCumType() && fetishes.contains(Fetish.FETISH_PENIS_RECEIVING)) { weight+=10; } if(target.hasVagina() && add.getFluid() == target.getGirlcumType() && fetishes.contains(Fetish.FETISH_VAGINAL_GIVING)) { weight+=10; } if(target.getBreastRawMilkStorageValue()>0 && add.getFluid() == target.getMilkType() && fetishes.contains(Fetish.FETISH_BREASTS_OTHERS)) { weight+=10; } } } if((fetishes.contains(Fetish.FETISH_ANAL_GIVING) || fetishes.contains(Fetish.FETISH_ANAL_RECEIVING)) && !Main.game.isAnalContentEnabled()) { weight-=100000; } if((fetishes.contains(Fetish.FETISH_FOOT_GIVING) || fetishes.contains(Fetish.FETISH_FOOT_RECEIVING)) && !Main.game.isFootContentEnabled()) { weight-=100000; } if(fetishes.contains(Fetish.FETISH_ANAL_RECEIVING) && !isRequest) { if(type.getAsParticipant()==SexParticipantType.SELF && !this.getFetishDesire(Fetish.FETISH_ANAL_RECEIVING).isPositive()) { weight-=100000; } if(!fetishes.contains(Fetish.FETISH_PENIS_RECEIVING) && ((!this.getFetishDesire(Fetish.FETISH_ANAL_RECEIVING).isPositive() && !lustOrArousalCalculation) || this.getFetishDesire(Fetish.FETISH_ANAL_GIVING).isNegative())) { weight-=100000; } } if(fetishes.contains(Fetish.FETISH_ANAL_GIVING) && !isRequest) { if(type.getAsParticipant()==SexParticipantType.SELF && !this.getFetishDesire(Fetish.FETISH_ANAL_GIVING).isPositive()) { weight-=100000; } if(!fetishes.contains(Fetish.FETISH_PENIS_GIVING) && ((!this.getFetishDesire(Fetish.FETISH_ANAL_GIVING).isPositive() && !lustOrArousalCalculation) || this.getFetishDesire(Fetish.FETISH_ANAL_GIVING).isNegative())) { weight-=100000; } } List<Fetish> fetishesOpposite = type.getOppositeFetishes(this, target, true, false); if(fetishesOpposite.contains(Fetish.FETISH_DEFLOWERING) && this.hasFetish(Fetish.FETISH_PURE_VIRGIN) && fetishes.contains(Fetish.FETISH_VAGINAL_RECEIVING)) { weight-=50; } return weight; }
[ "public", "int", "calculateSexTypeWeighting", "(", "SexType", "type", ",", "GameCharacter", "target", ",", "List", "<", "SexType", ">", "request", ",", "boolean", "lustOrArousalCalculation", ")", "{", "int", "weight", "=", "0", ";", "List", "<", "Fetish", ">", "fetishes", "=", "type", ".", "getRelatedFetishes", "(", "this", ",", "target", ",", "true", ",", "false", ")", ";", "for", "(", "Fetish", "fetish", ":", "fetishes", ")", "{", "if", "(", "this", ".", "hasFetish", "(", "fetish", ")", ")", "{", "weight", "+=", "7", ";", "}", "else", "{", "switch", "(", "this", ".", "getFetishDesire", "(", "fetish", ")", ")", "{", "case", "FOUR_LOVE", ":", "weight", "+=", "5", ";", "break", ";", "case", "THREE_LIKE", ":", "weight", "+=", "3", ";", "break", ";", "case", "TWO_NEUTRAL", ":", "weight", "+=", "1", ";", "break", ";", "case", "ONE_DISLIKE", ":", "weight", "-=", "3", ";", "break", ";", "case", "ZERO_HATE", ":", "weight", "-=", "5", ";", "break", ";", "}", "}", "}", "boolean", "isRequest", "=", "false", ";", "if", "(", "request", "!=", "null", "&&", "weight", ">=", "0", ")", "{", "for", "(", "SexType", "st", ":", "request", ")", "{", "if", "(", "(", "st", ".", "getTargetedSexArea", "(", ")", "==", "type", ".", "getTargetedSexArea", "(", ")", "||", "st", ".", "getPerformingSexArea", "(", ")", "==", "type", ".", "getPerformingSexArea", "(", ")", ")", ")", "{", "weight", "+=", "50", ";", "isRequest", "=", "true", ";", "}", "}", "}", "if", "(", "fetishes", ".", "contains", "(", "Fetish", ".", "FETISH_ORAL_GIVING", ")", ")", "{", "for", "(", "Addiction", "add", ":", "this", ".", "getAddictions", "(", ")", ")", "{", "if", "(", "target", ".", "hasPenisIgnoreDildo", "(", ")", "&&", "add", ".", "getFluid", "(", ")", "==", "target", ".", "getCumType", "(", ")", "&&", "fetishes", ".", "contains", "(", "Fetish", ".", "FETISH_PENIS_RECEIVING", ")", ")", "{", "weight", "+=", "10", ";", "}", "if", "(", "target", ".", "hasVagina", "(", ")", "&&", "add", ".", "getFluid", "(", ")", "==", "target", ".", "getGirlcumType", "(", ")", "&&", "fetishes", ".", "contains", "(", "Fetish", ".", "FETISH_VAGINAL_GIVING", ")", ")", "{", "weight", "+=", "10", ";", "}", "if", "(", "target", ".", "getBreastRawMilkStorageValue", "(", ")", ">", "0", "&&", "add", ".", "getFluid", "(", ")", "==", "target", ".", "getMilkType", "(", ")", "&&", "fetishes", ".", "contains", "(", "Fetish", ".", "FETISH_BREASTS_OTHERS", ")", ")", "{", "weight", "+=", "10", ";", "}", "}", "}", "if", "(", "(", "fetishes", ".", "contains", "(", "Fetish", ".", "FETISH_ANAL_GIVING", ")", "||", "fetishes", ".", "contains", "(", "Fetish", ".", "FETISH_ANAL_RECEIVING", ")", ")", "&&", "!", "Main", ".", "game", ".", "isAnalContentEnabled", "(", ")", ")", "{", "weight", "-=", "100000", ";", "}", "if", "(", "(", "fetishes", ".", "contains", "(", "Fetish", ".", "FETISH_FOOT_GIVING", ")", "||", "fetishes", ".", "contains", "(", "Fetish", ".", "FETISH_FOOT_RECEIVING", ")", ")", "&&", "!", "Main", ".", "game", ".", "isFootContentEnabled", "(", ")", ")", "{", "weight", "-=", "100000", ";", "}", "if", "(", "fetishes", ".", "contains", "(", "Fetish", ".", "FETISH_ANAL_RECEIVING", ")", "&&", "!", "isRequest", ")", "{", "if", "(", "type", ".", "getAsParticipant", "(", ")", "==", "SexParticipantType", ".", "SELF", "&&", "!", "this", ".", "getFetishDesire", "(", "Fetish", ".", "FETISH_ANAL_RECEIVING", ")", ".", "isPositive", "(", ")", ")", "{", "weight", "-=", "100000", ";", "}", "if", "(", "!", "fetishes", ".", "contains", "(", "Fetish", ".", "FETISH_PENIS_RECEIVING", ")", "&&", "(", "(", "!", "this", ".", "getFetishDesire", "(", "Fetish", ".", "FETISH_ANAL_RECEIVING", ")", ".", "isPositive", "(", ")", "&&", "!", "lustOrArousalCalculation", ")", "||", "this", ".", "getFetishDesire", "(", "Fetish", ".", "FETISH_ANAL_GIVING", ")", ".", "isNegative", "(", ")", ")", ")", "{", "weight", "-=", "100000", ";", "}", "}", "if", "(", "fetishes", ".", "contains", "(", "Fetish", ".", "FETISH_ANAL_GIVING", ")", "&&", "!", "isRequest", ")", "{", "if", "(", "type", ".", "getAsParticipant", "(", ")", "==", "SexParticipantType", ".", "SELF", "&&", "!", "this", ".", "getFetishDesire", "(", "Fetish", ".", "FETISH_ANAL_GIVING", ")", ".", "isPositive", "(", ")", ")", "{", "weight", "-=", "100000", ";", "}", "if", "(", "!", "fetishes", ".", "contains", "(", "Fetish", ".", "FETISH_PENIS_GIVING", ")", "&&", "(", "(", "!", "this", ".", "getFetishDesire", "(", "Fetish", ".", "FETISH_ANAL_GIVING", ")", ".", "isPositive", "(", ")", "&&", "!", "lustOrArousalCalculation", ")", "||", "this", ".", "getFetishDesire", "(", "Fetish", ".", "FETISH_ANAL_GIVING", ")", ".", "isNegative", "(", ")", ")", ")", "{", "weight", "-=", "100000", ";", "}", "}", "List", "<", "Fetish", ">", "fetishesOpposite", "=", "type", ".", "getOppositeFetishes", "(", "this", ",", "target", ",", "true", ",", "false", ")", ";", "if", "(", "fetishesOpposite", ".", "contains", "(", "Fetish", ".", "FETISH_DEFLOWERING", ")", "&&", "this", ".", "hasFetish", "(", "Fetish", ".", "FETISH_PURE_VIRGIN", ")", "&&", "fetishes", ".", "contains", "(", "Fetish", ".", "FETISH_VAGINAL_RECEIVING", ")", ")", "{", "weight", "-=", "50", ";", "}", "return", "weight", ";", "}" ]
@param type The SexType to find the weight of.
[ "@param", "type", "The", "SexType", "to", "find", "the", "weight", "of", "." ]
[ "// Do not increase weighting if the base action is not wanted by this character.", "// Anal actions are not available unless the person likes anal.", "// ban self-anal actions unless the character likes anal", "// Ban non-penis anal actions (like fingering and tail sex) unless the character likes anal", "// ban self-anal actions unless the character likes anal", "// Ban non-penis anal actions (like fingering and tail sex) unless the character likes anal" ]
[ { "param": "type", "type": "SexType" }, { "param": "target", "type": "GameCharacter" }, { "param": "request", "type": "List<SexType>" }, { "param": "lustOrArousalCalculation", "type": "boolean" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "type", "type": "SexType", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "target", "type": "GameCharacter", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "request", "type": "List<SexType>", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "lustOrArousalCalculation", "type": "boolean", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 509, 4604, 55, 338, 559, 6544, 310, 12, 55, 338, 559, 618, 16, 14121, 7069, 1018, 16, 987, 32, 55, 338, 559, 34, 590, 16, 1250, 328, 641, 1162, 37, 303, 407, 287, 13989, 13, 288, 203, 202, 202, 474, 3119, 273, 374, 31, 203, 1082, 203, 202, 202, 682, 32, 42, 278, 1468, 34, 284, 278, 1468, 281, 273, 618, 18, 588, 8017, 42, 278, 1468, 281, 12, 2211, 16, 1018, 16, 638, 16, 629, 1769, 203, 1082, 203, 202, 202, 1884, 12, 42, 278, 1468, 284, 278, 1468, 294, 284, 278, 1468, 281, 13, 288, 203, 1082, 202, 430, 12, 2211, 18, 5332, 42, 278, 1468, 12, 74, 278, 1468, 3719, 288, 203, 9506, 202, 4865, 15, 33, 27, 31, 203, 1082, 202, 97, 469, 288, 203, 9506, 202, 9610, 12, 2211, 18, 588, 42, 278, 1468, 6305, 577, 12, 74, 278, 1468, 3719, 288, 203, 6862, 202, 3593, 17634, 1099, 67, 1502, 3412, 30, 203, 25083, 202, 4865, 15, 33, 25, 31, 203, 25083, 202, 8820, 31, 203, 6862, 202, 3593, 18979, 67, 21538, 30, 203, 25083, 202, 4865, 15, 33, 23, 31, 203, 25083, 202, 8820, 31, 203, 6862, 202, 3593, 24722, 51, 67, 5407, 1693, 54, 1013, 30, 203, 25083, 202, 4865, 15, 33, 21, 31, 203, 25083, 202, 8820, 31, 203, 6862, 202, 3593, 15623, 67, 13498, 21538, 30, 203, 25083, 202, 4865, 17, 33, 23, 31, 203, 25083, 202, 8820, 31, 203, 6862, 202, 3593, 18449, 67, 44, 1777, 30, 203, 25083, 202, 4865, 17, 33, 25, 31, 203, 25083, 202, 8820, 31, 203, 9506, 202, 97, 203, 1082, 202, 97, 203, 202, 202, 97, 203, 1082, 203, 202, 202, 6494, 353, 691, 273, 629, 31, 203, 202, 202, 430, 12, 2293, 5, 33, 2011, 597, 3119, 34, 33, 20, 13, 288, 368, 2256, 486, 10929, 3119, 310, 309, 326, 1026, 1301, 353, 486, 15504, 635, 333, 3351, 18, 203, 1082, 202, 1884, 12, 55, 338, 559, 384, 294, 590, 13, 288, 203, 9506, 202, 430, 12443, 334, 18, 588, 2326, 329, 55, 338, 5484, 1435, 631, 723, 18, 588, 2326, 329, 55, 338, 5484, 1435, 747, 384, 18, 588, 4990, 310, 55, 338, 5484, 1435, 631, 723, 18, 588, 4990, 310, 55, 338, 5484, 1435, 3719, 288, 203, 6862, 202, 4865, 1011, 6437, 31, 203, 6862, 202, 291, 691, 273, 638, 31, 203, 9506, 202, 97, 203, 1082, 202, 97, 203, 202, 202, 97, 203, 1082, 203, 202, 202, 430, 12, 74, 278, 1468, 281, 18, 12298, 12, 42, 278, 1468, 18, 42, 1584, 20424, 67, 916, 1013, 67, 43, 8188, 1360, 3719, 288, 203, 1082, 202, 1884, 12, 986, 2228, 527, 294, 333, 18, 588, 986, 2228, 87, 10756, 288, 203, 9506, 202, 430, 12, 3299, 18, 5332, 24251, 291, 3777, 40, 545, 83, 1435, 597, 527, 18, 588, 2340, 1911, 1435, 422, 1018, 18, 588, 39, 379, 559, 1435, 597, 284, 278, 1468, 281, 18, 12298, 12, 42, 278, 1468, 18, 42, 1584, 20424, 67, 52, 1157, 5127, 67, 27086, 8188, 1360, 3719, 288, 203, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1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 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
[ 1, 26873, 203, 202, 380, 632, 891, 618, 1021, 348, 338, 559, 358, 1104, 326, 3119, 434, 18, 203, 202, 380, 632, 891, 1018, 1021, 20715, 3351, 364, 326, 618, 18, 203, 202, 380, 632, 891, 590, 5502, 3285, 628, 326, 1018, 716, 1410, 506, 9830, 1368, 2236, 364, 3119, 310, 18, 203, 202, 380, 632, 891, 328, 641, 1162, 37, 303, 407, 287, 13989, 1053, 309, 333, 3119, 310, 11096, 353, 364, 21046, 328, 641, 578, 279, 303, 407, 287, 7033, 3304, 18, 1220, 21980, 21944, 628, 2212, 635, 9427, 366, 637, 2357, 6092, 3119, 899, 628, 392, 287, 4209, 18, 203, 202, 380, 632, 2463, 1021, 3119, 460, 434, 326, 618, 16, 11234, 434, 279, 460, 434, 6740, 397, 19, 17, 4200, 16, 1496, 16594, 2 ]
b6dbfe8d180f63176ccd099eecf5382589701ba8
Jesus-Herself-Nuke-Bait/Akari-addition
src/com/lilithsthrone/game/character/GameCharacter.java
[ "Linux-OpenIB" ]
Java
disruptMoveByType
null
public void disruptMoveByType(CombatMoveType type, List<GameCharacter> enemies, List<GameCharacter> allies) { List<Value<GameCharacter, CombatMove>> reversedList = selectedMoves.subList(0, selectedMoves.size()); Collections.reverse(selectedMoves); int index = 0; int highestIndex = -1; for(Value<GameCharacter, CombatMove> move : reversedList) { // Excluding already disrupted moves. if(selectedMovesDisruption.get(index) == false) { if(move.getValue().getType().countsAs(type)) { highestIndex = index; } } index++; } if(highestIndex >= 0) { disruptMove(reversedList.get(highestIndex).getValue().getIdentifier(), enemies, allies); } else { moveTypeDisruptionMap.put(type, moveTypeDisruptionMap.get(type)+1); // Adding for the future } }
/** * Will disrupt by move type. If no moves of the specified type are selected, stores it till the cooldowns reset. * * Example: Flash spell disrupting a BLOCK type move. */
Will disrupt by move type. If no moves of the specified type are selected, stores it till the cooldowns reset. Example: Flash spell disrupting a BLOCK type move.
[ "Will", "disrupt", "by", "move", "type", ".", "If", "no", "moves", "of", "the", "specified", "type", "are", "selected", "stores", "it", "till", "the", "cooldowns", "reset", ".", "Example", ":", "Flash", "spell", "disrupting", "a", "BLOCK", "type", "move", "." ]
public void disruptMoveByType(CombatMoveType type, List<GameCharacter> enemies, List<GameCharacter> allies) { List<Value<GameCharacter, CombatMove>> reversedList = selectedMoves.subList(0, selectedMoves.size()); Collections.reverse(selectedMoves); int index = 0; int highestIndex = -1; for(Value<GameCharacter, CombatMove> move : reversedList) { if(selectedMovesDisruption.get(index) == false) { if(move.getValue().getType().countsAs(type)) { highestIndex = index; } } index++; } if(highestIndex >= 0) { disruptMove(reversedList.get(highestIndex).getValue().getIdentifier(), enemies, allies); } else { moveTypeDisruptionMap.put(type, moveTypeDisruptionMap.get(type)+1); } }
[ "public", "void", "disruptMoveByType", "(", "CombatMoveType", "type", ",", "List", "<", "GameCharacter", ">", "enemies", ",", "List", "<", "GameCharacter", ">", "allies", ")", "{", "List", "<", "Value", "<", "GameCharacter", ",", "CombatMove", ">", ">", "reversedList", "=", "selectedMoves", ".", "subList", "(", "0", ",", "selectedMoves", ".", "size", "(", ")", ")", ";", "Collections", ".", "reverse", "(", "selectedMoves", ")", ";", "int", "index", "=", "0", ";", "int", "highestIndex", "=", "-", "1", ";", "for", "(", "Value", "<", "GameCharacter", ",", "CombatMove", ">", "move", ":", "reversedList", ")", "{", "if", "(", "selectedMovesDisruption", ".", "get", "(", "index", ")", "==", "false", ")", "{", "if", "(", "move", ".", "getValue", "(", ")", ".", "getType", "(", ")", ".", "countsAs", "(", "type", ")", ")", "{", "highestIndex", "=", "index", ";", "}", "}", "index", "++", ";", "}", "if", "(", "highestIndex", ">=", "0", ")", "{", "disruptMove", "(", "reversedList", ".", "get", "(", "highestIndex", ")", ".", "getValue", "(", ")", ".", "getIdentifier", "(", ")", ",", "enemies", ",", "allies", ")", ";", "}", "else", "{", "moveTypeDisruptionMap", ".", "put", "(", "type", ",", "moveTypeDisruptionMap", ".", "get", "(", "type", ")", "+", "1", ")", ";", "}", "}" ]
Will disrupt by move type.
[ "Will", "disrupt", "by", "move", "type", "." ]
[ "// Excluding already disrupted moves.", "// Adding for the future" ]
[ { "param": "type", "type": "CombatMoveType" }, { "param": "enemies", "type": "List<GameCharacter>" }, { "param": "allies", "type": "List<GameCharacter>" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "type", "type": "CombatMoveType", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "enemies", "type": "List<GameCharacter>", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "allies", "type": "List<GameCharacter>", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 918, 1015, 10433, 7607, 14145, 12, 11328, 270, 7607, 559, 618, 16, 987, 32, 12496, 7069, 34, 570, 351, 606, 16, 987, 32, 12496, 7069, 34, 524, 549, 281, 13, 288, 203, 202, 202, 682, 32, 620, 32, 12496, 7069, 16, 15645, 270, 7607, 9778, 9553, 682, 273, 3170, 19297, 18, 1717, 682, 12, 20, 16, 3170, 19297, 18, 1467, 10663, 203, 202, 202, 15150, 18, 9845, 12, 8109, 19297, 1769, 203, 202, 202, 474, 770, 273, 374, 31, 203, 202, 202, 474, 9742, 1016, 273, 300, 21, 31, 203, 202, 202, 1884, 12, 620, 32, 12496, 7069, 16, 15645, 270, 7607, 34, 3635, 294, 9553, 682, 13, 288, 203, 1082, 202, 759, 1312, 18596, 1818, 1015, 10433, 329, 13934, 18, 203, 1082, 202, 430, 12, 8109, 19297, 1669, 21421, 18, 588, 12, 1615, 13, 422, 629, 13, 288, 203, 9506, 202, 430, 12, 8501, 18, 24805, 7675, 588, 559, 7675, 8008, 1463, 12, 723, 3719, 288, 203, 6862, 202, 8766, 395, 1016, 273, 770, 31, 203, 9506, 202, 97, 203, 1082, 202, 97, 203, 1082, 202, 1615, 9904, 31, 203, 202, 202, 97, 203, 202, 202, 430, 12, 8766, 395, 1016, 1545, 374, 13, 288, 203, 1082, 202, 2251, 10433, 7607, 12, 266, 7548, 682, 18, 588, 12, 8766, 395, 1016, 2934, 24805, 7675, 588, 3004, 9334, 570, 351, 606, 16, 524, 549, 281, 1769, 203, 9506, 203, 202, 202, 97, 469, 288, 203, 1082, 202, 8501, 559, 1669, 21421, 863, 18, 458, 12, 723, 16, 3635, 559, 1669, 21421, 863, 18, 588, 12, 723, 27921, 21, 1769, 368, 21240, 364, 326, 3563, 203, 202, 202, 97, 203, 202, 97, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 202, 380, 9980, 1015, 10433, 635, 3635, 618, 18, 971, 1158, 13934, 434, 326, 1269, 618, 854, 3170, 16, 9064, 518, 21364, 326, 27367, 2378, 87, 2715, 18, 203, 202, 380, 203, 202, 380, 5090, 30, 15014, 22377, 1015, 10433, 310, 279, 14073, 618, 3635, 18, 203, 202, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
b6dbfe8d180f63176ccd099eecf5382589701ba8
Jesus-Herself-Nuke-Bait/Akari-addition
src/com/lilithsthrone/game/character/GameCharacter.java
[ "Linux-OpenIB" ]
Java
disruptionByTypeCheck
null
public boolean disruptionByTypeCheck(CombatMoveType typeBase) { for(CombatMoveType type : typeBase.getCountsAsList()) { if (moveTypeDisruptionMap.containsKey(type)) { if (moveTypeDisruptionMap.get(type) > 0) { moveTypeDisruptionMap.put(type, moveTypeDisruptionMap.get(type) - 1); return true; } } } return false; }
/** * Used by isAlreadyDisrupted function of CombatMove to figure out if a move of it's type is already disrupted. * @param type * @return */
Used by isAlreadyDisrupted function of CombatMove to figure out if a move of it's type is already disrupted. @param type @return
[ "Used", "by", "isAlreadyDisrupted", "function", "of", "CombatMove", "to", "figure", "out", "if", "a", "move", "of", "it", "'", "s", "type", "is", "already", "disrupted", ".", "@param", "type", "@return" ]
public boolean disruptionByTypeCheck(CombatMoveType typeBase) { for(CombatMoveType type : typeBase.getCountsAsList()) { if (moveTypeDisruptionMap.containsKey(type)) { if (moveTypeDisruptionMap.get(type) > 0) { moveTypeDisruptionMap.put(type, moveTypeDisruptionMap.get(type) - 1); return true; } } } return false; }
[ "public", "boolean", "disruptionByTypeCheck", "(", "CombatMoveType", "typeBase", ")", "{", "for", "(", "CombatMoveType", "type", ":", "typeBase", ".", "getCountsAsList", "(", ")", ")", "{", "if", "(", "moveTypeDisruptionMap", ".", "containsKey", "(", "type", ")", ")", "{", "if", "(", "moveTypeDisruptionMap", ".", "get", "(", "type", ")", ">", "0", ")", "{", "moveTypeDisruptionMap", ".", "put", "(", "type", ",", "moveTypeDisruptionMap", ".", "get", "(", "type", ")", "-", "1", ")", ";", "return", "true", ";", "}", "}", "}", "return", "false", ";", "}" ]
Used by isAlreadyDisrupted function of CombatMove to figure out if a move of it's type is already disrupted.
[ "Used", "by", "isAlreadyDisrupted", "function", "of", "CombatMove", "to", "figure", "out", "if", "a", "move", "of", "it", "'", "s", "type", "is", "already", "disrupted", "." ]
[]
[ { "param": "typeBase", "type": "CombatMoveType" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "typeBase", "type": "CombatMoveType", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 1250, 1015, 21421, 14145, 1564, 12, 11328, 270, 7607, 559, 618, 2171, 13, 288, 203, 202, 202, 1884, 12, 11328, 270, 7607, 559, 618, 294, 618, 2171, 18, 588, 9211, 1463, 682, 10756, 288, 203, 1082, 202, 430, 261, 8501, 559, 1669, 21421, 863, 18, 12298, 653, 12, 723, 3719, 288, 203, 9506, 202, 430, 261, 8501, 559, 1669, 21421, 863, 18, 588, 12, 723, 13, 405, 374, 13, 288, 203, 6862, 202, 8501, 559, 1669, 21421, 863, 18, 458, 12, 723, 16, 3635, 559, 1669, 21421, 863, 18, 588, 12, 723, 13, 300, 404, 1769, 203, 6862, 202, 2463, 638, 31, 203, 9506, 202, 97, 203, 1082, 202, 97, 203, 202, 202, 97, 203, 202, 202, 2463, 629, 31, 203, 202, 97, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 202, 380, 10286, 635, 353, 9430, 1669, 10433, 329, 445, 434, 15645, 270, 7607, 358, 7837, 596, 309, 279, 3635, 434, 518, 1807, 618, 353, 1818, 1015, 10433, 329, 18, 203, 202, 380, 632, 891, 618, 203, 202, 380, 632, 2463, 203, 202, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
b6dbfe8d180f63176ccd099eecf5382589701ba8
Jesus-Herself-Nuke-Bait/Akari-addition
src/com/lilithsthrone/game/character/GameCharacter.java
[ "Linux-OpenIB" ]
Java
performMoves
null
public List<String> performMoves(List<GameCharacter> enemies, List<GameCharacter> allies) { List<String> moves = new ArrayList<>(); StringBuilder sb = new StringBuilder(); int index = 0; for(Value<GameCharacter, CombatMove> moveEntry : selectedMoves) { sb.setLength(0); CombatMove move = moveEntry.getValue(); if(selectedMovesDisruption.get(index) == false) { GameCharacter target = moveEntry.getKey(); float lustStart = target.getLust(); sb.append("<b style='text-align:center; color: " + move.getColour().toWebHexString() + "'>" + Util.capitaliseSentence(move.getName()) + ":</b> " + move.perform(index, this, target, enemies, allies)); float lustEnd = target.getLust(); if(lustStart!=lustEnd) { if(this.hasTraitActivated(Perk.LUSTPYRE)) { int manaAbsorbed = Math.min(Math.round(target.getMana()), Math.max(1, Math.round(target.getAttributeValue(Attribute.MANA_MAXIMUM)*0.02f))); if(manaAbsorbed>0) { this.incrementMana(manaAbsorbed); target.incrementMana(-manaAbsorbed); sb.append("<br/>" + UtilText.parse(this, target, "Thanks to [npc.her] '<span style='color:"+Perk.LUSTPYRE.getColour().toWebHexString()+";'>"+Util.capitaliseSentence(Perk.LUSTPYRE.getName(this))+"</span>' trait," + " [npc.name] [npc.verb(absorb)] [style.colourMana("+manaAbsorbed+")] "+Attribute.MANA_MAXIMUM.getName()+" from [npc2.name]!")); } } if(target.hasTraitActivated(Perk.PURE_MIND)) { int manaRestored = Math.round(target.getAttributeValue(Attribute.MANA_MAXIMUM)*0.02f); target.incrementMana(manaRestored); sb.append("<br/>" + UtilText.parse(target, "Thanks to [npc.namePos] '<span style='color:"+Perk.PURE_MIND.getColour().toWebHexString()+";'>"+Util.capitaliseSentence(Perk.PURE_MIND.getName(this))+"</span>' trait," + " [npc.she] [npc.verb(recover)] [style.colourMana("+manaRestored+")] "+Attribute.MANA_MAXIMUM.getName()+" in response to taking "+Attribute.DAMAGE_LUST.getName()+"!")); } } if(move.getStatusEffects()!=null) { for(Entry<StatusEffect, Integer> entry : move.getStatusEffects().entrySet()) { if(move.canCrit(index, this, target, enemies, allies)) { int duration = (int)(entry.getValue()*move.getCritStatusEffectDurationIncrease()); target.addStatusEffect(entry.getKey(), duration); sb.append(UtilText.parse(target, "<br/>[npc.NameIsFull] now affected by <b style='color:"+entry.getKey().getColour().toWebHexString()+";'>"+Util.capitaliseSentence(entry.getKey().getName(target))+"</b>" + " for <b>"+Util.intToString(duration)+(duration==1?" turn":" turns")+"</b>!")); } else { target.addStatusEffect(entry.getKey(), entry.getValue()); sb.append(UtilText.parse(target, "<br/>[npc.NameIsFull] now affected by <b style='color:"+entry.getKey().getColour().toWebHexString()+";'>"+Util.capitaliseSentence(entry.getKey().getName(target))+"</b>" + " for <b>"+Util.intToString(entry.getValue())+(entry.getValue()==1?" turn":" turns")+"</b>!")); } } } } else { sb.append("<b style='text-align:center; color: " + move.getType().getColour().toWebHexString() + "'>" + Util.capitaliseSentence(move.getType().getName()) + ":</b><br/>" + "<b style='color: " + Colour.GENERIC_MINOR_BAD.toWebHexString() + "'>" + "The action was disrupted!</b>"); } moves.add(sb.toString()); index++; } if(selectedMoves.isEmpty()) { moves.add(UtilText.parse(this, "[npc.Name] [npc.verb(decide)] not to make a move, and instead [npc.verb(try)] to brace [npc.herself] as best as possible against any incoming attacks.")); } if(!Combat.isCombatantDefeated(this) && this.hasTraitActivated(Perk.COMBAT_REGENERATION)) { int healthRecovery = Math.round(this.getAttributeValue(Attribute.HEALTH_MAXIMUM)*0.05f); this.setHealth(this.getHealth()+healthRecovery); moves.add(UtilText.parse(this, "Thanks to [npc.her] '<span style='color:"+Perk.COMBAT_REGENERATION.getColour().toWebHexString()+";'>"+Util.capitaliseSentence(Perk.COMBAT_REGENERATION.getName(this))+"</span>' trait," + " [npc.name] [npc.verb(recover)] [style.colourHealth("+healthRecovery+")] "+Attribute.HEALTH_MAXIMUM.getName()+"!")); } selectedMoves.clear(); selectedMovesDisruption.clear(); remainingAP = maxAP; return moves; }
/** * Performs the moves that the character has selected then clears the list. * @return String that describes the moves performed. */
Performs the moves that the character has selected then clears the list. @return String that describes the moves performed.
[ "Performs", "the", "moves", "that", "the", "character", "has", "selected", "then", "clears", "the", "list", ".", "@return", "String", "that", "describes", "the", "moves", "performed", "." ]
public List<String> performMoves(List<GameCharacter> enemies, List<GameCharacter> allies) { List<String> moves = new ArrayList<>(); StringBuilder sb = new StringBuilder(); int index = 0; for(Value<GameCharacter, CombatMove> moveEntry : selectedMoves) { sb.setLength(0); CombatMove move = moveEntry.getValue(); if(selectedMovesDisruption.get(index) == false) { GameCharacter target = moveEntry.getKey(); float lustStart = target.getLust(); sb.append("<b style='text-align:center; color: " + move.getColour().toWebHexString() + "'>" + Util.capitaliseSentence(move.getName()) + ":</b> " + move.perform(index, this, target, enemies, allies)); float lustEnd = target.getLust(); if(lustStart!=lustEnd) { if(this.hasTraitActivated(Perk.LUSTPYRE)) { int manaAbsorbed = Math.min(Math.round(target.getMana()), Math.max(1, Math.round(target.getAttributeValue(Attribute.MANA_MAXIMUM)*0.02f))); if(manaAbsorbed>0) { this.incrementMana(manaAbsorbed); target.incrementMana(-manaAbsorbed); sb.append("<br/>" + UtilText.parse(this, target, "Thanks to [npc.her] '<span style='color:"+Perk.LUSTPYRE.getColour().toWebHexString()+";'>"+Util.capitaliseSentence(Perk.LUSTPYRE.getName(this))+"</span>' trait," + " [npc.name] [npc.verb(absorb)] [style.colourMana("+manaAbsorbed+")] "+Attribute.MANA_MAXIMUM.getName()+" from [npc2.name]!")); } } if(target.hasTraitActivated(Perk.PURE_MIND)) { int manaRestored = Math.round(target.getAttributeValue(Attribute.MANA_MAXIMUM)*0.02f); target.incrementMana(manaRestored); sb.append("<br/>" + UtilText.parse(target, "Thanks to [npc.namePos] '<span style='color:"+Perk.PURE_MIND.getColour().toWebHexString()+";'>"+Util.capitaliseSentence(Perk.PURE_MIND.getName(this))+"</span>' trait," + " [npc.she] [npc.verb(recover)] [style.colourMana("+manaRestored+")] "+Attribute.MANA_MAXIMUM.getName()+" in response to taking "+Attribute.DAMAGE_LUST.getName()+"!")); } } if(move.getStatusEffects()!=null) { for(Entry<StatusEffect, Integer> entry : move.getStatusEffects().entrySet()) { if(move.canCrit(index, this, target, enemies, allies)) { int duration = (int)(entry.getValue()*move.getCritStatusEffectDurationIncrease()); target.addStatusEffect(entry.getKey(), duration); sb.append(UtilText.parse(target, "<br/>[npc.NameIsFull] now affected by <b style='color:"+entry.getKey().getColour().toWebHexString()+";'>"+Util.capitaliseSentence(entry.getKey().getName(target))+"</b>" + " for <b>"+Util.intToString(duration)+(duration==1?" turn":" turns")+"</b>!")); } else { target.addStatusEffect(entry.getKey(), entry.getValue()); sb.append(UtilText.parse(target, "<br/>[npc.NameIsFull] now affected by <b style='color:"+entry.getKey().getColour().toWebHexString()+";'>"+Util.capitaliseSentence(entry.getKey().getName(target))+"</b>" + " for <b>"+Util.intToString(entry.getValue())+(entry.getValue()==1?" turn":" turns")+"</b>!")); } } } } else { sb.append("<b style='text-align:center; color: " + move.getType().getColour().toWebHexString() + "'>" + Util.capitaliseSentence(move.getType().getName()) + ":</b><br/>" + "<b style='color: " + Colour.GENERIC_MINOR_BAD.toWebHexString() + "'>" + "The action was disrupted!</b>"); } moves.add(sb.toString()); index++; } if(selectedMoves.isEmpty()) { moves.add(UtilText.parse(this, "[npc.Name] [npc.verb(decide)] not to make a move, and instead [npc.verb(try)] to brace [npc.herself] as best as possible against any incoming attacks.")); } if(!Combat.isCombatantDefeated(this) && this.hasTraitActivated(Perk.COMBAT_REGENERATION)) { int healthRecovery = Math.round(this.getAttributeValue(Attribute.HEALTH_MAXIMUM)*0.05f); this.setHealth(this.getHealth()+healthRecovery); moves.add(UtilText.parse(this, "Thanks to [npc.her] '<span style='color:"+Perk.COMBAT_REGENERATION.getColour().toWebHexString()+";'>"+Util.capitaliseSentence(Perk.COMBAT_REGENERATION.getName(this))+"</span>' trait," + " [npc.name] [npc.verb(recover)] [style.colourHealth("+healthRecovery+")] "+Attribute.HEALTH_MAXIMUM.getName()+"!")); } selectedMoves.clear(); selectedMovesDisruption.clear(); remainingAP = maxAP; return moves; }
[ "public", "List", "<", "String", ">", "performMoves", "(", "List", "<", "GameCharacter", ">", "enemies", ",", "List", "<", "GameCharacter", ">", "allies", ")", "{", "List", "<", "String", ">", "moves", "=", "new", "ArrayList", "<", ">", "(", ")", ";", "StringBuilder", "sb", "=", "new", "StringBuilder", "(", ")", ";", "int", "index", "=", "0", ";", "for", "(", "Value", "<", "GameCharacter", ",", "CombatMove", ">", "moveEntry", ":", "selectedMoves", ")", "{", "sb", ".", "setLength", "(", "0", ")", ";", "CombatMove", "move", "=", "moveEntry", ".", "getValue", "(", ")", ";", "if", "(", "selectedMovesDisruption", ".", "get", "(", "index", ")", "==", "false", ")", "{", "GameCharacter", "target", "=", "moveEntry", ".", "getKey", "(", ")", ";", "float", "lustStart", "=", "target", ".", "getLust", "(", ")", ";", "sb", ".", "append", "(", "\"<b style='text-align:center; color: \"", "+", "move", ".", "getColour", "(", ")", ".", "toWebHexString", "(", ")", "+", "\"'>\"", "+", "Util", ".", "capitaliseSentence", "(", "move", ".", "getName", "(", ")", ")", "+", "\":</b> \"", "+", "move", ".", "perform", "(", "index", ",", "this", ",", "target", ",", "enemies", ",", "allies", ")", ")", ";", "float", "lustEnd", "=", "target", ".", "getLust", "(", ")", ";", "if", "(", "lustStart", "!=", "lustEnd", ")", "{", "if", "(", "this", ".", "hasTraitActivated", "(", "Perk", ".", "LUSTPYRE", ")", ")", "{", "int", "manaAbsorbed", "=", "Math", ".", "min", "(", "Math", ".", "round", "(", "target", ".", "getMana", "(", ")", ")", ",", "Math", ".", "max", "(", "1", ",", "Math", ".", "round", "(", "target", ".", "getAttributeValue", "(", "Attribute", ".", "MANA_MAXIMUM", ")", "*", "0.02f", ")", ")", ")", ";", "if", "(", "manaAbsorbed", ">", "0", ")", "{", "this", ".", "incrementMana", "(", "manaAbsorbed", ")", ";", "target", ".", "incrementMana", "(", "-", "manaAbsorbed", ")", ";", "sb", ".", "append", "(", "\"<br/>\"", "+", "UtilText", ".", "parse", "(", "this", ",", "target", ",", "\"Thanks to [npc.her] '<span style='color:\"", "+", "Perk", ".", "LUSTPYRE", ".", "getColour", "(", ")", ".", "toWebHexString", "(", ")", "+", "\";'>\"", "+", "Util", ".", "capitaliseSentence", "(", "Perk", ".", "LUSTPYRE", ".", "getName", "(", "this", ")", ")", "+", "\"</span>' trait,\"", "+", "\" [npc.name] [npc.verb(absorb)] [style.colourMana(\"", "+", "manaAbsorbed", "+", "\")] \"", "+", "Attribute", ".", "MANA_MAXIMUM", ".", "getName", "(", ")", "+", "\" from [npc2.name]!\"", ")", ")", ";", "}", "}", "if", "(", "target", ".", "hasTraitActivated", "(", "Perk", ".", "PURE_MIND", ")", ")", "{", "int", "manaRestored", "=", "Math", ".", "round", "(", "target", ".", "getAttributeValue", "(", "Attribute", ".", "MANA_MAXIMUM", ")", "*", "0.02f", ")", ";", "target", ".", "incrementMana", "(", "manaRestored", ")", ";", "sb", ".", "append", "(", "\"<br/>\"", "+", "UtilText", ".", "parse", "(", "target", ",", "\"Thanks to [npc.namePos] '<span style='color:\"", "+", "Perk", ".", "PURE_MIND", ".", "getColour", "(", ")", ".", "toWebHexString", "(", ")", "+", "\";'>\"", "+", "Util", ".", "capitaliseSentence", "(", "Perk", ".", "PURE_MIND", ".", "getName", "(", "this", ")", ")", "+", "\"</span>' trait,\"", "+", "\" [npc.she] [npc.verb(recover)] [style.colourMana(\"", "+", "manaRestored", "+", "\")] \"", "+", "Attribute", ".", "MANA_MAXIMUM", ".", "getName", "(", ")", "+", "\" in response to taking \"", "+", "Attribute", ".", "DAMAGE_LUST", ".", "getName", "(", ")", "+", "\"!\"", ")", ")", ";", "}", "}", "if", "(", "move", ".", "getStatusEffects", "(", ")", "!=", "null", ")", "{", "for", "(", "Entry", "<", "StatusEffect", ",", "Integer", ">", "entry", ":", "move", ".", "getStatusEffects", "(", ")", ".", "entrySet", "(", ")", ")", "{", "if", "(", "move", ".", "canCrit", "(", "index", ",", "this", ",", "target", ",", "enemies", ",", "allies", ")", ")", "{", "int", "duration", "=", "(", "int", ")", "(", "entry", ".", "getValue", "(", ")", "*", "move", ".", "getCritStatusEffectDurationIncrease", "(", ")", ")", ";", "target", ".", "addStatusEffect", "(", "entry", ".", "getKey", "(", ")", ",", "duration", ")", ";", "sb", ".", "append", "(", "UtilText", ".", "parse", "(", "target", ",", "\"<br/>[npc.NameIsFull] now affected by <b style='color:\"", "+", "entry", ".", "getKey", "(", ")", ".", "getColour", "(", ")", ".", "toWebHexString", "(", ")", "+", "\";'>\"", "+", "Util", ".", "capitaliseSentence", "(", "entry", ".", "getKey", "(", ")", ".", "getName", "(", "target", ")", ")", "+", "\"</b>\"", "+", "\" for <b>\"", "+", "Util", ".", "intToString", "(", "duration", ")", "+", "(", "duration", "==", "1", "?", "\" turn\"", ":", "\" turns\"", ")", "+", "\"</b>!\"", ")", ")", ";", "}", "else", "{", "target", ".", "addStatusEffect", "(", "entry", ".", "getKey", "(", ")", ",", "entry", ".", "getValue", "(", ")", ")", ";", "sb", ".", "append", "(", "UtilText", ".", "parse", "(", "target", ",", "\"<br/>[npc.NameIsFull] now affected by <b style='color:\"", "+", "entry", ".", "getKey", "(", ")", ".", "getColour", "(", ")", ".", "toWebHexString", "(", ")", "+", "\";'>\"", "+", "Util", ".", "capitaliseSentence", "(", "entry", ".", "getKey", "(", ")", ".", "getName", "(", "target", ")", ")", "+", "\"</b>\"", "+", "\" for <b>\"", "+", "Util", ".", "intToString", "(", "entry", ".", "getValue", "(", ")", ")", "+", "(", "entry", ".", "getValue", "(", ")", "==", "1", "?", "\" turn\"", ":", "\" turns\"", ")", "+", "\"</b>!\"", ")", ")", ";", "}", "}", "}", "}", "else", "{", "sb", ".", "append", "(", "\"<b style='text-align:center; color: \"", "+", "move", ".", "getType", "(", ")", ".", "getColour", "(", ")", ".", "toWebHexString", "(", ")", "+", "\"'>\"", "+", "Util", ".", "capitaliseSentence", "(", "move", ".", "getType", "(", ")", ".", "getName", "(", ")", ")", "+", "\":</b><br/>\"", "+", "\"<b style='color: \"", "+", "Colour", ".", "GENERIC_MINOR_BAD", ".", "toWebHexString", "(", ")", "+", "\"'>\"", "+", "\"The action was disrupted!</b>\"", ")", ";", "}", "moves", ".", "add", "(", "sb", ".", "toString", "(", ")", ")", ";", "index", "++", ";", "}", "if", "(", "selectedMoves", ".", "isEmpty", "(", ")", ")", "{", "moves", ".", "add", "(", "UtilText", ".", "parse", "(", "this", ",", "\"[npc.Name] [npc.verb(decide)] not to make a move, and instead [npc.verb(try)] to brace [npc.herself] as best as possible against any incoming attacks.\"", ")", ")", ";", "}", "if", "(", "!", "Combat", ".", "isCombatantDefeated", "(", "this", ")", "&&", "this", ".", "hasTraitActivated", "(", "Perk", ".", "COMBAT_REGENERATION", ")", ")", "{", "int", "healthRecovery", "=", "Math", ".", "round", "(", "this", ".", "getAttributeValue", "(", "Attribute", ".", "HEALTH_MAXIMUM", ")", "*", "0.05f", ")", ";", "this", ".", "setHealth", "(", "this", ".", "getHealth", "(", ")", "+", "healthRecovery", ")", ";", "moves", ".", "add", "(", "UtilText", ".", "parse", "(", "this", ",", "\"Thanks to [npc.her] '<span style='color:\"", "+", "Perk", ".", "COMBAT_REGENERATION", ".", "getColour", "(", ")", ".", "toWebHexString", "(", ")", "+", "\";'>\"", "+", "Util", ".", "capitaliseSentence", "(", "Perk", ".", "COMBAT_REGENERATION", ".", "getName", "(", "this", ")", ")", "+", "\"</span>' trait,\"", "+", "\" [npc.name] [npc.verb(recover)] [style.colourHealth(\"", "+", "healthRecovery", "+", "\")] \"", "+", "Attribute", ".", "HEALTH_MAXIMUM", ".", "getName", "(", ")", "+", "\"!\"", ")", ")", ";", "}", "selectedMoves", ".", "clear", "(", ")", ";", "selectedMovesDisruption", ".", "clear", "(", ")", ";", "remainingAP", "=", "maxAP", ";", "return", "moves", ";", "}" ]
Performs the moves that the character has selected then clears the list.
[ "Performs", "the", "moves", "that", "the", "character", "has", "selected", "then", "clears", "the", "list", "." ]
[]
[ { "param": "enemies", "type": "List<GameCharacter>" }, { "param": "allies", "type": "List<GameCharacter>" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "enemies", "type": "List<GameCharacter>", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "allies", "type": "List<GameCharacter>", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 987, 32, 780, 34, 3073, 19297, 12, 682, 32, 12496, 7069, 34, 570, 351, 606, 16, 987, 32, 12496, 7069, 34, 524, 549, 281, 13, 288, 203, 202, 202, 682, 32, 780, 34, 13934, 273, 394, 2407, 29667, 5621, 203, 202, 202, 21253, 2393, 273, 394, 3225, 5621, 203, 202, 202, 474, 770, 273, 374, 31, 203, 1082, 203, 202, 202, 1884, 12, 620, 32, 12496, 7069, 16, 15645, 270, 7607, 34, 3635, 1622, 294, 3170, 19297, 13, 288, 203, 1082, 202, 18366, 18, 542, 1782, 12, 20, 1769, 203, 1082, 202, 11328, 270, 7607, 3635, 273, 3635, 1622, 18, 24805, 5621, 203, 1082, 202, 430, 12, 8109, 19297, 1669, 21421, 18, 588, 12, 1615, 13, 422, 629, 13, 288, 203, 9506, 202, 12496, 7069, 1018, 273, 3635, 1622, 18, 588, 653, 5621, 203, 9506, 202, 5659, 328, 641, 1685, 273, 1018, 18, 588, 48, 641, 5621, 203, 9506, 202, 18366, 18, 6923, 2932, 32, 70, 2154, 2218, 955, 17, 7989, 30, 5693, 31, 2036, 30, 315, 397, 3635, 18, 588, 26404, 7675, 869, 4079, 14866, 1435, 397, 2491, 2984, 397, 3564, 18, 5909, 7053, 784, 17923, 12, 8501, 18, 17994, 10756, 397, 6398, 1757, 70, 34, 315, 203, 6862, 1082, 202, 15, 3635, 18, 16092, 12, 1615, 16, 333, 16, 1018, 16, 570, 351, 606, 16, 524, 549, 281, 10019, 203, 9506, 202, 5659, 328, 641, 1638, 273, 1018, 18, 588, 48, 641, 5621, 203, 9506, 202, 430, 12, 80, 641, 1685, 5, 33, 80, 641, 1638, 13, 288, 203, 6862, 202, 430, 12, 2211, 18, 5332, 15525, 28724, 12, 2173, 79, 18, 48, 5996, 16235, 862, 3719, 288, 203, 25083, 202, 474, 3161, 69, 9382, 280, 2992, 273, 2361, 18, 1154, 12, 10477, 18, 2260, 12, 3299, 18, 588, 5669, 69, 1435, 3631, 2361, 18, 1896, 12, 21, 16, 2361, 18, 2260, 12, 3299, 18, 588, 14942, 12, 1499, 18, 9560, 37, 67, 6694, 18605, 17653, 20, 18, 3103, 74, 3719, 1769, 203, 25083, 202, 430, 12, 4728, 69, 9382, 280, 2992, 34, 20, 13, 288, 203, 6862, 1082, 202, 2211, 18, 15016, 5669, 69, 12, 4728, 69, 9382, 280, 2992, 1769, 203, 6862, 1082, 202, 3299, 18, 15016, 5669, 69, 19236, 4728, 69, 9382, 280, 2992, 1769, 203, 6862, 1082, 202, 18366, 18, 6923, 2932, 32, 2848, 26293, 203, 6862, 6862, 202, 15, 3564, 1528, 18, 2670, 12, 2211, 16, 1018, 16, 203, 6862, 6862, 1082, 202, 6, 1315, 19965, 358, 306, 82, 2436, 18, 1614, 65, 2368, 3969, 2154, 2218, 3266, 2773, 15, 2173, 79, 18, 48, 5996, 16235, 862, 18, 588, 26404, 7675, 869, 4079, 14866, 1435, 9078, 4359, 2984, 15, 1304, 18, 5909, 7053, 784, 17923, 12, 2173, 79, 18, 48, 5996, 16235, 862, 18, 17994, 12, 2211, 3719, 9078, 1757, 3969, 1870, 13517, 10837, 203, 6862, 6862, 6862, 202, 15, 315, 306, 82, 2436, 18, 529, 65, 306, 82, 2436, 18, 16629, 12, 378, 2467, 70, 25887, 306, 4060, 18, 27408, 5669, 69, 2932, 15, 4728, 69, 9382, 280, 2992, 15, 7923, 65, 13773, 1499, 18, 9560, 37, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3170, 1508, 22655, 326, 666, 18, 203, 202, 380, 632, 2463, 514, 716, 19605, 326, 13934, 9591, 18, 203, 202, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
b6dbfe8d180f63176ccd099eecf5382589701ba8
Jesus-Herself-Nuke-Bait/Akari-addition
src/com/lilithsthrone/game/character/GameCharacter.java
[ "Linux-OpenIB" ]
Java
selectMoves
null
public void selectMoves(List<GameCharacter> enemies, List<GameCharacter> allies) { int turnIndex=0; if(enemies.isEmpty()) { return; } while(remainingAP > 0) { // Assembling move list List<CombatMove> potentialMoves = new ArrayList<>(); for(CombatMove move : equippedMoves) { if(move.isUseable(this, null, enemies, allies) == null) { potentialMoves.add(move); } } // Determining move based on weight CombatMove selectedMove = null; float highestWeight = 0.0f; for(CombatMove move : potentialMoves) { float currentWeight = move.getWeight(this, enemies, allies); if(highestWeight < currentWeight) { selectedMove = move; highestWeight = currentWeight; } } if(selectedMove == null) { break; } else { selectMove(turnIndex, selectedMove, selectedMove.getPreferredTarget(this, enemies, allies), enemies, allies); } turnIndex++; } }
/** * Selects moves for the character using weights of these moves. */
Selects moves for the character using weights of these moves.
[ "Selects", "moves", "for", "the", "character", "using", "weights", "of", "these", "moves", "." ]
public void selectMoves(List<GameCharacter> enemies, List<GameCharacter> allies) { int turnIndex=0; if(enemies.isEmpty()) { return; } while(remainingAP > 0) { List<CombatMove> potentialMoves = new ArrayList<>(); for(CombatMove move : equippedMoves) { if(move.isUseable(this, null, enemies, allies) == null) { potentialMoves.add(move); } } CombatMove selectedMove = null; float highestWeight = 0.0f; for(CombatMove move : potentialMoves) { float currentWeight = move.getWeight(this, enemies, allies); if(highestWeight < currentWeight) { selectedMove = move; highestWeight = currentWeight; } } if(selectedMove == null) { break; } else { selectMove(turnIndex, selectedMove, selectedMove.getPreferredTarget(this, enemies, allies), enemies, allies); } turnIndex++; } }
[ "public", "void", "selectMoves", "(", "List", "<", "GameCharacter", ">", "enemies", ",", "List", "<", "GameCharacter", ">", "allies", ")", "{", "int", "turnIndex", "=", "0", ";", "if", "(", "enemies", ".", "isEmpty", "(", ")", ")", "{", "return", ";", "}", "while", "(", "remainingAP", ">", "0", ")", "{", "List", "<", "CombatMove", ">", "potentialMoves", "=", "new", "ArrayList", "<", ">", "(", ")", ";", "for", "(", "CombatMove", "move", ":", "equippedMoves", ")", "{", "if", "(", "move", ".", "isUseable", "(", "this", ",", "null", ",", "enemies", ",", "allies", ")", "==", "null", ")", "{", "potentialMoves", ".", "add", "(", "move", ")", ";", "}", "}", "CombatMove", "selectedMove", "=", "null", ";", "float", "highestWeight", "=", "0.0f", ";", "for", "(", "CombatMove", "move", ":", "potentialMoves", ")", "{", "float", "currentWeight", "=", "move", ".", "getWeight", "(", "this", ",", "enemies", ",", "allies", ")", ";", "if", "(", "highestWeight", "<", "currentWeight", ")", "{", "selectedMove", "=", "move", ";", "highestWeight", "=", "currentWeight", ";", "}", "}", "if", "(", "selectedMove", "==", "null", ")", "{", "break", ";", "}", "else", "{", "selectMove", "(", "turnIndex", ",", "selectedMove", ",", "selectedMove", ".", "getPreferredTarget", "(", "this", ",", "enemies", ",", "allies", ")", ",", "enemies", ",", "allies", ")", ";", "}", "turnIndex", "++", ";", "}", "}" ]
Selects moves for the character using weights of these moves.
[ "Selects", "moves", "for", "the", "character", "using", "weights", "of", "these", "moves", "." ]
[ "// Assembling move list", "// Determining move based on weight" ]
[ { "param": "enemies", "type": "List<GameCharacter>" }, { "param": "allies", "type": "List<GameCharacter>" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "enemies", "type": "List<GameCharacter>", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "allies", "type": "List<GameCharacter>", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 918, 2027, 19297, 12, 682, 32, 12496, 7069, 34, 570, 351, 606, 16, 987, 32, 12496, 7069, 34, 524, 549, 281, 13, 288, 203, 202, 202, 474, 7005, 1016, 33, 20, 31, 203, 202, 202, 430, 12, 275, 351, 606, 18, 291, 1921, 10756, 288, 203, 1082, 202, 2463, 31, 203, 202, 202, 97, 203, 202, 202, 17523, 12, 17956, 2203, 405, 374, 13, 288, 203, 1082, 202, 759, 2970, 5747, 2456, 3635, 666, 203, 1082, 202, 682, 32, 11328, 270, 7607, 34, 8555, 19297, 273, 394, 2407, 29667, 5621, 203, 1082, 202, 1884, 12, 11328, 270, 7607, 3635, 294, 1298, 625, 1845, 19297, 13, 288, 203, 9506, 202, 430, 12, 8501, 18, 291, 3727, 429, 12, 2211, 16, 446, 16, 570, 351, 606, 16, 524, 549, 281, 13, 422, 446, 13, 288, 203, 6862, 202, 26451, 19297, 18, 1289, 12, 8501, 1769, 203, 9506, 202, 97, 203, 1082, 202, 97, 203, 9506, 203, 1082, 202, 759, 23608, 310, 3635, 2511, 603, 3119, 203, 1082, 202, 11328, 270, 7607, 3170, 7607, 273, 446, 31, 203, 1082, 202, 5659, 9742, 6544, 273, 374, 18, 20, 74, 31, 203, 1082, 202, 1884, 12, 11328, 270, 7607, 3635, 294, 8555, 19297, 13, 288, 203, 9506, 202, 5659, 783, 6544, 273, 3635, 18, 588, 6544, 12, 2211, 16, 570, 351, 606, 16, 524, 549, 281, 1769, 203, 9506, 202, 430, 12, 8766, 395, 6544, 411, 783, 6544, 13, 288, 203, 6862, 202, 8109, 7607, 273, 3635, 31, 203, 6862, 202, 8766, 395, 6544, 273, 783, 6544, 31, 203, 9506, 202, 97, 203, 1082, 202, 97, 203, 1082, 202, 430, 12, 8109, 7607, 422, 446, 13, 288, 203, 9506, 202, 8820, 31, 203, 1082, 202, 97, 469, 288, 203, 9506, 202, 4025, 7607, 12, 20922, 1016, 16, 3170, 7607, 16, 3170, 7607, 18, 588, 16028, 2326, 12, 2211, 16, 570, 351, 606, 16, 524, 549, 281, 3631, 570, 351, 606, 16, 524, 549, 281, 1769, 203, 1082, 202, 97, 203, 1082, 202, 20922, 1016, 9904, 31, 203, 202, 202, 97, 203, 202, 97, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1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 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 202, 380, 6766, 87, 13934, 364, 326, 3351, 1450, 5376, 434, 4259, 13934, 18, 203, 202, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
b6dbfe8d180f63176ccd099eecf5382589701ba8
Jesus-Herself-Nuke-Bait/Akari-addition
src/com/lilithsthrone/game/character/GameCharacter.java
[ "Linux-OpenIB" ]
Java
burnMana
null
public void burnMana(float mana) { float healthDamage = (getMana() - mana) * -1; if(healthDamage > 0) { healthDamage = (int)(0.25 * healthDamage); if(healthDamage > getHealth()) { setHealth(1); // Can't burn below 1 HP. } else { setHealth(getHealth() - healthDamage); } } setMana(getMana() - mana); }
/** * "Burns" mana instead of lowering it. If the character has no mana, would lower HP instead with a 4 mana to 1 ratio. Used by fire spells. * @param mana */
"Burns" mana instead of lowering it. If the character has no mana, would lower HP instead with a 4 mana to 1 ratio. Used by fire spells. @param mana
[ "\"", "Burns", "\"", "mana", "instead", "of", "lowering", "it", ".", "If", "the", "character", "has", "no", "mana", "would", "lower", "HP", "instead", "with", "a", "4", "mana", "to", "1", "ratio", ".", "Used", "by", "fire", "spells", ".", "@param", "mana" ]
public void burnMana(float mana) { float healthDamage = (getMana() - mana) * -1; if(healthDamage > 0) { healthDamage = (int)(0.25 * healthDamage); if(healthDamage > getHealth()) { setHealth(1); } else { setHealth(getHealth() - healthDamage); } } setMana(getMana() - mana); }
[ "public", "void", "burnMana", "(", "float", "mana", ")", "{", "float", "healthDamage", "=", "(", "getMana", "(", ")", "-", "mana", ")", "*", "-", "1", ";", "if", "(", "healthDamage", ">", "0", ")", "{", "healthDamage", "=", "(", "int", ")", "(", "0.25", "*", "healthDamage", ")", ";", "if", "(", "healthDamage", ">", "getHealth", "(", ")", ")", "{", "setHealth", "(", "1", ")", ";", "}", "else", "{", "setHealth", "(", "getHealth", "(", ")", "-", "healthDamage", ")", ";", "}", "}", "setMana", "(", "getMana", "(", ")", "-", "mana", ")", ";", "}" ]
"Burns" mana instead of lowering it.
[ "\"", "Burns", "\"", "mana", "instead", "of", "lowering", "it", "." ]
[ "// Can't burn below 1 HP." ]
[ { "param": "mana", "type": "float" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "mana", "type": "float", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 918, 18305, 5669, 69, 12, 5659, 3161, 69, 13, 288, 203, 202, 202, 5659, 8437, 40, 301, 410, 273, 261, 588, 5669, 69, 1435, 300, 3161, 69, 13, 380, 300, 21, 31, 203, 202, 202, 430, 12, 13267, 40, 301, 410, 405, 374, 13, 288, 203, 1082, 202, 13267, 40, 301, 410, 273, 261, 474, 21433, 20, 18, 2947, 380, 8437, 40, 301, 410, 1769, 203, 1082, 202, 430, 12, 13267, 40, 301, 410, 405, 336, 7802, 10756, 288, 203, 9506, 202, 542, 7802, 12, 21, 1769, 368, 4480, 1404, 18305, 5712, 404, 670, 52, 18, 203, 1082, 202, 97, 469, 288, 203, 9506, 202, 542, 7802, 12, 588, 7802, 1435, 300, 8437, 40, 301, 410, 1769, 203, 1082, 202, 97, 203, 202, 202, 97, 203, 202, 202, 542, 5669, 69, 12, 588, 5669, 69, 1435, 300, 3161, 69, 1769, 203, 202, 97, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 202, 380, 315, 38, 321, 87, 6, 3161, 69, 3560, 434, 2612, 310, 518, 18, 971, 326, 3351, 711, 1158, 3161, 69, 16, 4102, 2612, 670, 52, 3560, 598, 279, 1059, 3161, 69, 358, 404, 7169, 18, 10286, 635, 4452, 22377, 87, 18, 203, 202, 380, 632, 891, 3161, 69, 203, 202, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
b6dbfe8d180f63176ccd099eecf5382589701ba8
Jesus-Herself-Nuke-Bait/Akari-addition
src/com/lilithsthrone/game/character/GameCharacter.java
[ "Linux-OpenIB" ]
Java
incrementLust
String
public String incrementLust(float increment, boolean applyMaximumLustDamage) { StringBuilder sb = new StringBuilder(); if(this.hasStatusEffect(StatusEffect.DESPERATE_FOR_SEX) && applyMaximumLustDamage) { sb.append(UtilText.parse(this, "<p>" + "<b>[npc.Name] [npc.verb(take)]" + " <b>" + (increment*2) + "</b> <b style='color:" + Colour.ATTRIBUTE_HEALTH.toWebHexString() + ";'>energy damage</b>" + " and <b>"+increment+"</b> <b style='color:" + Colour.ATTRIBUTE_MANA.toWebHexString() + ";'>aura damage</b>" + " as [npc.she] [npc.verb(struggle)] to control [npc.her] burning desire for sex!</b>" + "</p>")); this.incrementHealth(-increment*2); this.incrementMana(-increment); } sb.append(setLust(getLust() + increment)); return sb.toString(); }
/** * @param increment Amount to increment lust by. * @param applyMaximumLustDamage If true, and this character has maximum lust with the status effect 'DESPERATE_FOR_SEX', this method will apply energy and aura damage, and return a description of this happening. * @return */
@param increment Amount to increment lust by. @param applyMaximumLustDamage If true, and this character has maximum lust with the status effect 'DESPERATE_FOR_SEX', this method will apply energy and aura damage, and return a description of this happening. @return
[ "@param", "increment", "Amount", "to", "increment", "lust", "by", ".", "@param", "applyMaximumLustDamage", "If", "true", "and", "this", "character", "has", "maximum", "lust", "with", "the", "status", "effect", "'", "DESPERATE_FOR_SEX", "'", "this", "method", "will", "apply", "energy", "and", "aura", "damage", "and", "return", "a", "description", "of", "this", "happening", ".", "@return" ]
public String incrementLust(float increment, boolean applyMaximumLustDamage) { StringBuilder sb = new StringBuilder(); if(this.hasStatusEffect(StatusEffect.DESPERATE_FOR_SEX) && applyMaximumLustDamage) { sb.append(UtilText.parse(this, "<p>" + "<b>[npc.Name] [npc.verb(take)]" + " <b>" + (increment*2) + "</b> <b style='color:" + Colour.ATTRIBUTE_HEALTH.toWebHexString() + ";'>energy damage</b>" + " and <b>"+increment+"</b> <b style='color:" + Colour.ATTRIBUTE_MANA.toWebHexString() + ";'>aura damage</b>" + " as [npc.she] [npc.verb(struggle)] to control [npc.her] burning desire for sex!</b>" + "</p>")); this.incrementHealth(-increment*2); this.incrementMana(-increment); } sb.append(setLust(getLust() + increment)); return sb.toString(); }
[ "public", "String", "incrementLust", "(", "float", "increment", ",", "boolean", "applyMaximumLustDamage", ")", "{", "StringBuilder", "sb", "=", "new", "StringBuilder", "(", ")", ";", "if", "(", "this", ".", "hasStatusEffect", "(", "StatusEffect", ".", "DESPERATE_FOR_SEX", ")", "&&", "applyMaximumLustDamage", ")", "{", "sb", ".", "append", "(", "UtilText", ".", "parse", "(", "this", ",", "\"<p>\"", "+", "\"<b>[npc.Name] [npc.verb(take)]\"", "+", "\" <b>\"", "+", "(", "increment", "*", "2", ")", "+", "\"</b> <b style='color:\"", "+", "Colour", ".", "ATTRIBUTE_HEALTH", ".", "toWebHexString", "(", ")", "+", "\";'>energy damage</b>\"", "+", "\" and <b>\"", "+", "increment", "+", "\"</b> <b style='color:\"", "+", "Colour", ".", "ATTRIBUTE_MANA", ".", "toWebHexString", "(", ")", "+", "\";'>aura damage</b>\"", "+", "\" as [npc.she] [npc.verb(struggle)] to control [npc.her] burning desire for sex!</b>\"", "+", "\"</p>\"", ")", ")", ";", "this", ".", "incrementHealth", "(", "-", "increment", "*", "2", ")", ";", "this", ".", "incrementMana", "(", "-", "increment", ")", ";", "}", "sb", ".", "append", "(", "setLust", "(", "getLust", "(", ")", "+", "increment", ")", ")", ";", "return", "sb", ".", "toString", "(", ")", ";", "}" ]
@param increment Amount to increment lust by.
[ "@param", "increment", "Amount", "to", "increment", "lust", "by", "." ]
[]
[ { "param": "increment", "type": "float" }, { "param": "applyMaximumLustDamage", "type": "boolean" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "increment", "type": "float", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "applyMaximumLustDamage", "type": "boolean", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 514, 5504, 48, 641, 12, 5659, 5504, 16, 1250, 2230, 13528, 48, 641, 40, 301, 410, 13, 288, 203, 202, 202, 21253, 2393, 273, 394, 3225, 5621, 203, 1082, 203, 202, 202, 430, 12, 2211, 18, 5332, 1482, 12477, 12, 1482, 12477, 18, 1639, 3118, 654, 1777, 67, 7473, 67, 1090, 60, 13, 597, 2230, 13528, 48, 641, 40, 301, 410, 13, 288, 203, 1082, 202, 18366, 18, 6923, 12, 1304, 1528, 18, 2670, 12, 2211, 16, 203, 25083, 202, 6, 32, 84, 2984, 203, 6862, 1082, 202, 15, 3532, 70, 23224, 82, 2436, 18, 461, 65, 306, 82, 2436, 18, 16629, 12, 22188, 13, 4279, 203, 6862, 9506, 202, 15, 315, 411, 70, 2984, 397, 261, 15016, 14, 22, 13, 397, 6823, 70, 34, 411, 70, 2154, 2218, 3266, 2773, 397, 1558, 477, 18, 11616, 67, 3900, 1013, 2455, 18, 869, 4079, 14866, 1435, 397, 315, 4359, 34, 15358, 302, 301, 410, 1757, 70, 2984, 203, 6862, 9506, 202, 15, 315, 471, 411, 70, 2984, 15, 15016, 9078, 1757, 70, 34, 411, 70, 2154, 2218, 3266, 2773, 397, 1558, 477, 18, 11616, 67, 9560, 37, 18, 869, 4079, 14866, 1435, 397, 315, 4359, 34, 69, 21401, 302, 301, 410, 1757, 70, 2984, 203, 6862, 9506, 202, 15, 315, 487, 306, 82, 2436, 18, 87, 580, 65, 306, 82, 2436, 18, 16629, 12, 701, 637, 3213, 25887, 358, 3325, 306, 82, 2436, 18, 1614, 65, 18305, 310, 2832, 577, 364, 19631, 5, 1757, 70, 2984, 203, 25083, 202, 15, 6823, 84, 2984, 10019, 203, 203, 1082, 202, 2211, 18, 15016, 7802, 19236, 15016, 14, 22, 1769, 203, 1082, 202, 2211, 18, 15016, 5669, 69, 19236, 15016, 1769, 203, 202, 202, 97, 203, 1082, 203, 202, 202, 18366, 18, 6923, 12, 542, 48, 641, 12, 588, 48, 641, 1435, 397, 5504, 10019, 203, 202, 202, 2463, 2393, 18, 10492, 5621, 203, 202, 97, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1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 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 202, 380, 632, 891, 5504, 16811, 358, 5504, 328, 641, 635, 18, 203, 202, 380, 632, 891, 2230, 13528, 48, 641, 40, 301, 410, 971, 638, 16, 471, 333, 3351, 711, 4207, 328, 641, 598, 326, 1267, 5426, 296, 1639, 3118, 654, 1777, 67, 7473, 67, 1090, 60, 2187, 333, 707, 903, 2230, 12929, 471, 279, 21401, 302, 301, 410, 16, 471, 327, 279, 2477, 434, 333, 5865, 310, 18, 203, 202, 380, 632, 2463, 203, 202, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
b6dbfe8d180f63176ccd099eecf5382589701ba8
Jesus-Herself-Nuke-Bait/Akari-addition
src/com/lilithsthrone/game/character/GameCharacter.java
[ "Linux-OpenIB" ]
Java
endPregnancy
null
public void endPregnancy(boolean withBirth) { for(PregnancyPossibility pregPoss : potentialPartnersAsMother) { if(pregPoss.getFather()!=null) { pregPoss.getFather().getPotentialPartnersAsFather().remove(pregPoss); } } potentialPartnersAsMother.clear(); if(withBirth) { AbstractClothing c = getClothingBlockingCoverableAreaAccess(CoverableArea.VAGINA, true); while(c!=null) { ItemEffect effect = null; for(ItemEffect e : c.getEffects()) { if(e.getPrimaryModifier()==TFModifier.CLOTHING_SEALING) { effect = e; } } c.removeEffect(effect); c = getClothingBlockingCoverableAreaAccess(CoverableArea.VAGINA, true); } this.drainTotalFluidsStored(SexAreaOrifice.VAGINA, this.getTotalFluidInArea(SexAreaOrifice.VAGINA)); this.drainTotalFluidsStored(SexAreaOrifice.URETHRA_VAGINA, this.getTotalFluidInArea(SexAreaOrifice.URETHRA_VAGINA)); this.removeDirtySlot(InventorySlot.VAGINA); this.removeDirtySlot(InventorySlot.PIERCING_VAGINA); Litter birthedLitter = pregnantLitter; birthedLitter.setBirthDate(Main.game.getDateNow()); if((birthedLitter.getFather()!=null && birthedLitter.getFather().isPlayer()) || (birthedLitter.getMother()!=null && birthedLitter.getMother().isPlayer())) { for(String id: birthedLitter.getOffspring()) { try { NPC npc = (NPC) Main.game.getNPCById(id); npc.setConceptionDate(birthedLitter.getConceptionDate()); npc.setBirthday(LocalDateTime.of(Main.game.getDateNow().getYear(), Main.game.getDateNow().getMonth(), Main.game.getDateNow().getDayOfMonth(), Main.game.getDateNow().getHour(), Main.game.getDateNow().getMinute())); } catch(Exception e) { Util.logGetNpcByIdError("endPregnancy()", id); } } } littersBirthed.add(birthedLitter); if(birthedLitter.getFather()!=null) { birthedLitter.getFather().getLittersFathered().add(birthedLitter); } // Remove NPCs if not related to the player: if(!this.isPlayer() && (birthedLitter.getFather()==null || !birthedLitter.getFather().isPlayer())) { for(String npc : birthedLitter.getOffspring()) { Main.game.removeNPC(npc); } } } else { if(pregnantLitter!=null) { for(String npc : pregnantLitter.getOffspring()) { Main.game.removeNPC(npc); } } } removeStatusEffect(StatusEffect.PREGNANT_1); removeStatusEffect(StatusEffect.PREGNANT_2); removeStatusEffect(StatusEffect.PREGNANT_3); pregnantLitter = null; this.resetAllPregnancyReactions(); }
/** * Ends the character's pregnancy. If ended with birth, also handles litters added to the littersBirthed list. * * @param withBirth True if this pregnancy ends by giving birth. */
Ends the character's pregnancy. If ended with birth, also handles litters added to the littersBirthed list. @param withBirth True if this pregnancy ends by giving birth.
[ "Ends", "the", "character", "'", "s", "pregnancy", ".", "If", "ended", "with", "birth", "also", "handles", "litters", "added", "to", "the", "littersBirthed", "list", ".", "@param", "withBirth", "True", "if", "this", "pregnancy", "ends", "by", "giving", "birth", "." ]
public void endPregnancy(boolean withBirth) { for(PregnancyPossibility pregPoss : potentialPartnersAsMother) { if(pregPoss.getFather()!=null) { pregPoss.getFather().getPotentialPartnersAsFather().remove(pregPoss); } } potentialPartnersAsMother.clear(); if(withBirth) { AbstractClothing c = getClothingBlockingCoverableAreaAccess(CoverableArea.VAGINA, true); while(c!=null) { ItemEffect effect = null; for(ItemEffect e : c.getEffects()) { if(e.getPrimaryModifier()==TFModifier.CLOTHING_SEALING) { effect = e; } } c.removeEffect(effect); c = getClothingBlockingCoverableAreaAccess(CoverableArea.VAGINA, true); } this.drainTotalFluidsStored(SexAreaOrifice.VAGINA, this.getTotalFluidInArea(SexAreaOrifice.VAGINA)); this.drainTotalFluidsStored(SexAreaOrifice.URETHRA_VAGINA, this.getTotalFluidInArea(SexAreaOrifice.URETHRA_VAGINA)); this.removeDirtySlot(InventorySlot.VAGINA); this.removeDirtySlot(InventorySlot.PIERCING_VAGINA); Litter birthedLitter = pregnantLitter; birthedLitter.setBirthDate(Main.game.getDateNow()); if((birthedLitter.getFather()!=null && birthedLitter.getFather().isPlayer()) || (birthedLitter.getMother()!=null && birthedLitter.getMother().isPlayer())) { for(String id: birthedLitter.getOffspring()) { try { NPC npc = (NPC) Main.game.getNPCById(id); npc.setConceptionDate(birthedLitter.getConceptionDate()); npc.setBirthday(LocalDateTime.of(Main.game.getDateNow().getYear(), Main.game.getDateNow().getMonth(), Main.game.getDateNow().getDayOfMonth(), Main.game.getDateNow().getHour(), Main.game.getDateNow().getMinute())); } catch(Exception e) { Util.logGetNpcByIdError("endPregnancy()", id); } } } littersBirthed.add(birthedLitter); if(birthedLitter.getFather()!=null) { birthedLitter.getFather().getLittersFathered().add(birthedLitter); } if(!this.isPlayer() && (birthedLitter.getFather()==null || !birthedLitter.getFather().isPlayer())) { for(String npc : birthedLitter.getOffspring()) { Main.game.removeNPC(npc); } } } else { if(pregnantLitter!=null) { for(String npc : pregnantLitter.getOffspring()) { Main.game.removeNPC(npc); } } } removeStatusEffect(StatusEffect.PREGNANT_1); removeStatusEffect(StatusEffect.PREGNANT_2); removeStatusEffect(StatusEffect.PREGNANT_3); pregnantLitter = null; this.resetAllPregnancyReactions(); }
[ "public", "void", "endPregnancy", "(", "boolean", "withBirth", ")", "{", "for", "(", "PregnancyPossibility", "pregPoss", ":", "potentialPartnersAsMother", ")", "{", "if", "(", "pregPoss", ".", "getFather", "(", ")", "!=", "null", ")", "{", "pregPoss", ".", "getFather", "(", ")", ".", "getPotentialPartnersAsFather", "(", ")", ".", "remove", "(", "pregPoss", ")", ";", "}", "}", "potentialPartnersAsMother", ".", "clear", "(", ")", ";", "if", "(", "withBirth", ")", "{", "AbstractClothing", "c", "=", "getClothingBlockingCoverableAreaAccess", "(", "CoverableArea", ".", "VAGINA", ",", "true", ")", ";", "while", "(", "c", "!=", "null", ")", "{", "ItemEffect", "effect", "=", "null", ";", "for", "(", "ItemEffect", "e", ":", "c", ".", "getEffects", "(", ")", ")", "{", "if", "(", "e", ".", "getPrimaryModifier", "(", ")", "==", "TFModifier", ".", "CLOTHING_SEALING", ")", "{", "effect", "=", "e", ";", "}", "}", "c", ".", "removeEffect", "(", "effect", ")", ";", "c", "=", "getClothingBlockingCoverableAreaAccess", "(", "CoverableArea", ".", "VAGINA", ",", "true", ")", ";", "}", "this", ".", "drainTotalFluidsStored", "(", "SexAreaOrifice", ".", "VAGINA", ",", "this", ".", "getTotalFluidInArea", "(", "SexAreaOrifice", ".", "VAGINA", ")", ")", ";", "this", ".", "drainTotalFluidsStored", "(", "SexAreaOrifice", ".", "URETHRA_VAGINA", ",", "this", ".", "getTotalFluidInArea", "(", "SexAreaOrifice", ".", "URETHRA_VAGINA", ")", ")", ";", "this", ".", "removeDirtySlot", "(", "InventorySlot", ".", "VAGINA", ")", ";", "this", ".", "removeDirtySlot", "(", "InventorySlot", ".", "PIERCING_VAGINA", ")", ";", "Litter", "birthedLitter", "=", "pregnantLitter", ";", "birthedLitter", ".", "setBirthDate", "(", "Main", ".", "game", ".", "getDateNow", "(", ")", ")", ";", "if", "(", "(", "birthedLitter", ".", "getFather", "(", ")", "!=", "null", "&&", "birthedLitter", ".", "getFather", "(", ")", ".", "isPlayer", "(", ")", ")", "||", "(", "birthedLitter", ".", "getMother", "(", ")", "!=", "null", "&&", "birthedLitter", ".", "getMother", "(", ")", ".", "isPlayer", "(", ")", ")", ")", "{", "for", "(", "String", "id", ":", "birthedLitter", ".", "getOffspring", "(", ")", ")", "{", "try", "{", "NPC", "npc", "=", "(", "NPC", ")", "Main", ".", "game", ".", "getNPCById", "(", "id", ")", ";", "npc", ".", "setConceptionDate", "(", "birthedLitter", ".", "getConceptionDate", "(", ")", ")", ";", "npc", ".", "setBirthday", "(", "LocalDateTime", ".", "of", "(", "Main", ".", "game", ".", "getDateNow", "(", ")", ".", "getYear", "(", ")", ",", "Main", ".", "game", ".", "getDateNow", "(", ")", ".", "getMonth", "(", ")", ",", "Main", ".", "game", ".", "getDateNow", "(", ")", ".", "getDayOfMonth", "(", ")", ",", "Main", ".", "game", ".", "getDateNow", "(", ")", ".", "getHour", "(", ")", ",", "Main", ".", "game", ".", "getDateNow", "(", ")", ".", "getMinute", "(", ")", ")", ")", ";", "}", "catch", "(", "Exception", "e", ")", "{", "Util", ".", "logGetNpcByIdError", "(", "\"endPregnancy()\"", ",", "id", ")", ";", "}", "}", "}", "littersBirthed", ".", "add", "(", "birthedLitter", ")", ";", "if", "(", "birthedLitter", ".", "getFather", "(", ")", "!=", "null", ")", "{", "birthedLitter", ".", "getFather", "(", ")", ".", "getLittersFathered", "(", ")", ".", "add", "(", "birthedLitter", ")", ";", "}", "if", "(", "!", "this", ".", "isPlayer", "(", ")", "&&", "(", "birthedLitter", ".", "getFather", "(", ")", "==", "null", "||", "!", "birthedLitter", ".", "getFather", "(", ")", ".", "isPlayer", "(", ")", ")", ")", "{", "for", "(", "String", "npc", ":", "birthedLitter", ".", "getOffspring", "(", ")", ")", "{", "Main", ".", "game", ".", "removeNPC", "(", "npc", ")", ";", "}", "}", "}", "else", "{", "if", "(", "pregnantLitter", "!=", "null", ")", "{", "for", "(", "String", "npc", ":", "pregnantLitter", ".", "getOffspring", "(", ")", ")", "{", "Main", ".", "game", ".", "removeNPC", "(", "npc", ")", ";", "}", "}", "}", "removeStatusEffect", "(", "StatusEffect", ".", "PREGNANT_1", ")", ";", "removeStatusEffect", "(", "StatusEffect", ".", "PREGNANT_2", ")", ";", "removeStatusEffect", "(", "StatusEffect", ".", "PREGNANT_3", ")", ";", "pregnantLitter", "=", "null", ";", "this", ".", "resetAllPregnancyReactions", "(", ")", ";", "}" ]
Ends the character's pregnancy.
[ "Ends", "the", "character", "'", "s", "pregnancy", "." ]
[ "// Remove NPCs if not related to the player:" ]
[ { "param": "withBirth", "type": "boolean" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "withBirth", "type": "boolean", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 918, 679, 1386, 1600, 12514, 12, 6494, 598, 25791, 13, 288, 203, 202, 202, 1884, 12, 1386, 1600, 12514, 1616, 17349, 2299, 1616, 87, 294, 8555, 1988, 9646, 1463, 49, 3011, 13, 288, 203, 1082, 202, 430, 12, 1484, 75, 1616, 87, 18, 588, 42, 4806, 1435, 5, 33, 2011, 13, 288, 203, 9506, 202, 1484, 75, 1616, 87, 18, 588, 42, 4806, 7675, 588, 24947, 1988, 9646, 1463, 42, 4806, 7675, 4479, 12, 1484, 75, 1616, 87, 1769, 203, 1082, 202, 97, 203, 202, 202, 97, 203, 202, 202, 26451, 1988, 9646, 1463, 49, 3011, 18, 8507, 5621, 203, 1082, 203, 202, 202, 430, 12, 1918, 25791, 13, 288, 203, 1082, 202, 7469, 2009, 352, 4018, 276, 273, 13674, 352, 4018, 8728, 8084, 429, 5484, 1862, 12, 8084, 429, 5484, 18, 58, 1781, 706, 37, 16, 638, 1769, 203, 1082, 202, 17523, 12, 71, 5, 33, 2011, 13, 288, 203, 9506, 202, 1180, 12477, 5426, 273, 446, 31, 203, 9506, 202, 1884, 12, 1180, 12477, 425, 294, 276, 18, 588, 29013, 10756, 288, 203, 6862, 202, 430, 12, 73, 18, 588, 6793, 9829, 1435, 631, 17963, 9829, 18, 22693, 2455, 1360, 67, 1090, 1013, 1360, 13, 288, 203, 25083, 202, 13867, 273, 425, 31, 203, 6862, 202, 97, 203, 9506, 202, 97, 203, 9506, 202, 71, 18, 4479, 12477, 12, 13867, 1769, 203, 9506, 202, 71, 273, 13674, 352, 4018, 8728, 8084, 429, 5484, 1862, 12, 8084, 429, 5484, 18, 58, 1781, 706, 37, 16, 638, 1769, 203, 1082, 202, 97, 203, 9506, 203, 1082, 202, 2211, 18, 72, 7596, 5269, 2340, 21428, 18005, 12, 55, 338, 5484, 1162, 704, 311, 18, 58, 1781, 706, 37, 16, 333, 18, 588, 5269, 2340, 1911, 382, 5484, 12, 55, 338, 5484, 1162, 704, 311, 18, 58, 1781, 706, 37, 10019, 203, 1082, 202, 2211, 18, 72, 7596, 5269, 2340, 21428, 18005, 12, 55, 338, 5484, 1162, 704, 311, 18, 4830, 2455, 2849, 67, 58, 1781, 706, 37, 16, 333, 18, 588, 5269, 2340, 1911, 382, 5484, 12, 55, 338, 5484, 1162, 704, 311, 18, 4830, 2455, 2849, 67, 58, 1781, 706, 37, 10019, 203, 9506, 203, 1082, 202, 2211, 18, 4479, 10785, 8764, 12, 15059, 8764, 18, 58, 1781, 706, 37, 1769, 203, 1082, 202, 2211, 18, 4479, 10785, 8764, 12, 15059, 8764, 18, 1102, 654, 39, 1360, 67, 58, 1781, 706, 37, 1769, 203, 9506, 203, 1082, 202, 48, 6132, 17057, 329, 48, 6132, 273, 675, 1600, 970, 48, 6132, 31, 203, 203, 1082, 202, 22531, 329, 48, 6132, 18, 542, 25791, 1626, 12, 6376, 18, 13957, 18, 588, 1626, 8674, 10663, 203, 9506, 203, 1082, 202, 430, 12443, 22531, 329, 48, 6132, 18, 588, 42, 4806, 1435, 5, 33, 2011, 597, 17057, 329, 48, 6132, 18, 588, 42, 4806, 7675, 291, 12148, 10756, 747, 261, 22531, 329, 48, 6132, 18, 588, 49, 3011, 1435, 5, 33, 2011, 597, 17057, 329, 48, 6132, 18, 588, 49, 3011, 7675, 291, 12148, 1435, 3719, 288, 203, 9506, 202, 1884, 12, 780, 612, 30, 17057, 329, 48, 6132, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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18, 203, 202, 380, 7010, 202, 380, 632, 891, 598, 25791, 1053, 309, 333, 675, 1600, 12514, 3930, 635, 21057, 17057, 18, 203, 202, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
b6dbfe8d180f63176ccd099eecf5382589701ba8
Jesus-Herself-Nuke-Bait/Akari-addition
src/com/lilithsthrone/game/character/GameCharacter.java
[ "Linux-OpenIB" ]
Java
addPotentialPartnerAsMother
null
public void addPotentialPartnerAsMother(PregnancyPossibility possibility) { boolean alreadyContainedPossibility = false; for(PregnancyPossibility currentPossibility : potentialPartnersAsMother) { if(currentPossibility.getMotherId().equals(possibility.getMotherId()) && currentPossibility.getFatherId().equals(possibility.getFatherId())) { currentPossibility.setProbability(1f-(1-currentPossibility.getProbability() * 1-possibility.getProbability())); alreadyContainedPossibility = true; break; } } if(!alreadyContainedPossibility) { potentialPartnersAsMother.add(possibility); } }
/** * Add this PregnancyPossibility to the list of people who could have gotten this character pregnant. */
Add this PregnancyPossibility to the list of people who could have gotten this character pregnant.
[ "Add", "this", "PregnancyPossibility", "to", "the", "list", "of", "people", "who", "could", "have", "gotten", "this", "character", "pregnant", "." ]
public void addPotentialPartnerAsMother(PregnancyPossibility possibility) { boolean alreadyContainedPossibility = false; for(PregnancyPossibility currentPossibility : potentialPartnersAsMother) { if(currentPossibility.getMotherId().equals(possibility.getMotherId()) && currentPossibility.getFatherId().equals(possibility.getFatherId())) { currentPossibility.setProbability(1f-(1-currentPossibility.getProbability() * 1-possibility.getProbability())); alreadyContainedPossibility = true; break; } } if(!alreadyContainedPossibility) { potentialPartnersAsMother.add(possibility); } }
[ "public", "void", "addPotentialPartnerAsMother", "(", "PregnancyPossibility", "possibility", ")", "{", "boolean", "alreadyContainedPossibility", "=", "false", ";", "for", "(", "PregnancyPossibility", "currentPossibility", ":", "potentialPartnersAsMother", ")", "{", "if", "(", "currentPossibility", ".", "getMotherId", "(", ")", ".", "equals", "(", "possibility", ".", "getMotherId", "(", ")", ")", "&&", "currentPossibility", ".", "getFatherId", "(", ")", ".", "equals", "(", "possibility", ".", "getFatherId", "(", ")", ")", ")", "{", "currentPossibility", ".", "setProbability", "(", "1f", "-", "(", "1", "-", "currentPossibility", ".", "getProbability", "(", ")", "*", "1", "-", "possibility", ".", "getProbability", "(", ")", ")", ")", ";", "alreadyContainedPossibility", "=", "true", ";", "break", ";", "}", "}", "if", "(", "!", "alreadyContainedPossibility", ")", "{", "potentialPartnersAsMother", ".", "add", "(", "possibility", ")", ";", "}", "}" ]
Add this PregnancyPossibility to the list of people who could have gotten this character pregnant.
[ "Add", "this", "PregnancyPossibility", "to", "the", "list", "of", "people", "who", "could", "have", "gotten", "this", "character", "pregnant", "." ]
[]
[ { "param": "possibility", "type": "PregnancyPossibility" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "possibility", "type": "PregnancyPossibility", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 918, 527, 24947, 1988, 1224, 1463, 49, 3011, 12, 1386, 1600, 12514, 1616, 17349, 25547, 13, 288, 203, 202, 202, 6494, 1818, 660, 8707, 1616, 17349, 273, 629, 31, 203, 1082, 203, 202, 202, 1884, 12, 1386, 1600, 12514, 1616, 17349, 783, 1616, 17349, 294, 8555, 1988, 9646, 1463, 49, 3011, 13, 288, 203, 1082, 202, 430, 12, 2972, 1616, 17349, 18, 588, 49, 3011, 548, 7675, 14963, 12, 917, 17349, 18, 588, 49, 3011, 548, 10756, 203, 6862, 202, 10, 10, 783, 1616, 17349, 18, 588, 42, 4806, 548, 7675, 14963, 12, 917, 17349, 18, 588, 42, 4806, 548, 1435, 3719, 288, 203, 9506, 202, 2972, 1616, 17349, 18, 542, 25598, 12, 21, 74, 17, 12, 21, 17, 2972, 1616, 17349, 18, 588, 25598, 1435, 380, 404, 17, 917, 17349, 18, 588, 25598, 1435, 10019, 203, 9506, 202, 17583, 660, 8707, 1616, 17349, 273, 638, 31, 203, 9506, 202, 8820, 31, 203, 1082, 202, 97, 203, 202, 202, 97, 203, 1082, 203, 202, 202, 430, 12, 5, 17583, 660, 8707, 1616, 17349, 13, 288, 203, 1082, 202, 26451, 1988, 9646, 1463, 49, 3011, 18, 1289, 12, 917, 17349, 1769, 203, 202, 202, 97, 203, 202, 97, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 202, 380, 1436, 333, 453, 1574, 82, 12514, 1616, 17349, 358, 326, 666, 434, 16951, 10354, 3377, 1240, 2363, 2253, 333, 3351, 675, 1600, 970, 18, 203, 202, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
b6dbfe8d180f63176ccd099eecf5382589701ba8
Jesus-Herself-Nuke-Bait/Akari-addition
src/com/lilithsthrone/game/character/GameCharacter.java
[ "Linux-OpenIB" ]
Java
isCharacterPossiblyFather
null
public boolean isCharacterPossiblyFather(String id) { for(PregnancyPossibility pp : getPotentialPartnersAsMother()) { if(pp.getFatherId().equals(id)) { return true; } } return false; }
/** * @return true If the supplied character's id is a potential father of this character's currently-ongoing pregnancy. */
@return true If the supplied character's id is a potential father of this character's currently-ongoing pregnancy.
[ "@return", "true", "If", "the", "supplied", "character", "'", "s", "id", "is", "a", "potential", "father", "of", "this", "character", "'", "s", "currently", "-", "ongoing", "pregnancy", "." ]
public boolean isCharacterPossiblyFather(String id) { for(PregnancyPossibility pp : getPotentialPartnersAsMother()) { if(pp.getFatherId().equals(id)) { return true; } } return false; }
[ "public", "boolean", "isCharacterPossiblyFather", "(", "String", "id", ")", "{", "for", "(", "PregnancyPossibility", "pp", ":", "getPotentialPartnersAsMother", "(", ")", ")", "{", "if", "(", "pp", ".", "getFatherId", "(", ")", ".", "equals", "(", "id", ")", ")", "{", "return", "true", ";", "}", "}", "return", "false", ";", "}" ]
@return true If the supplied character's id is a potential father of this character's currently-ongoing pregnancy.
[ "@return", "true", "If", "the", "supplied", "character", "'", "s", "id", "is", "a", "potential", "father", "of", "this", "character", "'", "s", "currently", "-", "ongoing", "pregnancy", "." ]
[]
[ { "param": "id", "type": "String" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "id", "type": "String", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 1250, 353, 7069, 1616, 8781, 42, 4806, 12, 780, 612, 13, 288, 203, 202, 202, 1884, 12, 1386, 1600, 12514, 1616, 17349, 8228, 294, 1689, 352, 2001, 1988, 9646, 1463, 49, 3011, 10756, 288, 203, 1082, 202, 430, 12, 11858, 18, 588, 42, 4806, 548, 7675, 14963, 12, 350, 3719, 288, 203, 9506, 202, 2463, 638, 31, 203, 1082, 202, 97, 203, 202, 202, 97, 203, 202, 202, 2463, 629, 31, 203, 202, 97, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0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, 380, 632, 2463, 638, 971, 326, 4580, 3351, 1807, 612, 353, 279, 8555, 284, 4806, 434, 333, 3351, 1807, 4551, 17, 5409, 310, 675, 1600, 12514, 18, 203, 202, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
b6dbfe8d180f63176ccd099eecf5382589701ba8
Jesus-Herself-Nuke-Bait/Akari-addition
src/com/lilithsthrone/game/character/GameCharacter.java
[ "Linux-OpenIB" ]
Java
addPotentialPartnerAsFather
null
public void addPotentialPartnerAsFather(PregnancyPossibility possibility) { boolean alreadyContainedPossibility = false; for(PregnancyPossibility currentPossibility : potentialPartnersAsFather) { if(currentPossibility.getMotherId().equals(possibility.getMotherId()) && currentPossibility.getFatherId().equals(possibility.getFatherId())) { currentPossibility.setProbability(1f-(1-currentPossibility.getProbability() * 1-possibility.getProbability())); alreadyContainedPossibility = true; break; } } if(!alreadyContainedPossibility) { potentialPartnersAsFather.add(possibility); } }
/** * Add this PregnancyPossibility to the list of people who this character could have gotten pregnant. */
Add this PregnancyPossibility to the list of people who this character could have gotten pregnant.
[ "Add", "this", "PregnancyPossibility", "to", "the", "list", "of", "people", "who", "this", "character", "could", "have", "gotten", "pregnant", "." ]
public void addPotentialPartnerAsFather(PregnancyPossibility possibility) { boolean alreadyContainedPossibility = false; for(PregnancyPossibility currentPossibility : potentialPartnersAsFather) { if(currentPossibility.getMotherId().equals(possibility.getMotherId()) && currentPossibility.getFatherId().equals(possibility.getFatherId())) { currentPossibility.setProbability(1f-(1-currentPossibility.getProbability() * 1-possibility.getProbability())); alreadyContainedPossibility = true; break; } } if(!alreadyContainedPossibility) { potentialPartnersAsFather.add(possibility); } }
[ "public", "void", "addPotentialPartnerAsFather", "(", "PregnancyPossibility", "possibility", ")", "{", "boolean", "alreadyContainedPossibility", "=", "false", ";", "for", "(", "PregnancyPossibility", "currentPossibility", ":", "potentialPartnersAsFather", ")", "{", "if", "(", "currentPossibility", ".", "getMotherId", "(", ")", ".", "equals", "(", "possibility", ".", "getMotherId", "(", ")", ")", "&&", "currentPossibility", ".", "getFatherId", "(", ")", ".", "equals", "(", "possibility", ".", "getFatherId", "(", ")", ")", ")", "{", "currentPossibility", ".", "setProbability", "(", "1f", "-", "(", "1", "-", "currentPossibility", ".", "getProbability", "(", ")", "*", "1", "-", "possibility", ".", "getProbability", "(", ")", ")", ")", ";", "alreadyContainedPossibility", "=", "true", ";", "break", ";", "}", "}", "if", "(", "!", "alreadyContainedPossibility", ")", "{", "potentialPartnersAsFather", ".", "add", "(", "possibility", ")", ";", "}", "}" ]
Add this PregnancyPossibility to the list of people who this character could have gotten pregnant.
[ "Add", "this", "PregnancyPossibility", "to", "the", "list", "of", "people", "who", "this", "character", "could", "have", "gotten", "pregnant", "." ]
[]
[ { "param": "possibility", "type": "PregnancyPossibility" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "possibility", "type": "PregnancyPossibility", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 918, 527, 24947, 1988, 1224, 1463, 42, 4806, 12, 1386, 1600, 12514, 1616, 17349, 25547, 13, 288, 203, 202, 202, 6494, 1818, 660, 8707, 1616, 17349, 273, 629, 31, 203, 1082, 203, 202, 202, 1884, 12, 1386, 1600, 12514, 1616, 17349, 783, 1616, 17349, 294, 8555, 1988, 9646, 1463, 42, 4806, 13, 288, 203, 1082, 202, 430, 12, 2972, 1616, 17349, 18, 588, 49, 3011, 548, 7675, 14963, 12, 917, 17349, 18, 588, 49, 3011, 548, 10756, 203, 6862, 202, 10, 10, 783, 1616, 17349, 18, 588, 42, 4806, 548, 7675, 14963, 12, 917, 17349, 18, 588, 42, 4806, 548, 1435, 3719, 288, 203, 9506, 202, 2972, 1616, 17349, 18, 542, 25598, 12, 21, 74, 17, 12, 21, 17, 2972, 1616, 17349, 18, 588, 25598, 1435, 380, 404, 17, 917, 17349, 18, 588, 25598, 1435, 10019, 203, 9506, 202, 17583, 660, 8707, 1616, 17349, 273, 638, 31, 203, 9506, 202, 8820, 31, 203, 1082, 202, 97, 203, 202, 202, 97, 203, 1082, 203, 202, 202, 430, 12, 5, 17583, 660, 8707, 1616, 17349, 13, 288, 203, 1082, 202, 26451, 1988, 9646, 1463, 42, 4806, 18, 1289, 12, 917, 17349, 1769, 203, 202, 202, 97, 203, 202, 97, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 202, 380, 1436, 333, 453, 1574, 82, 12514, 1616, 17349, 358, 326, 666, 434, 16951, 10354, 333, 3351, 3377, 1240, 2363, 2253, 675, 1600, 970, 18, 203, 202, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
b6dbfe8d180f63176ccd099eecf5382589701ba8
Jesus-Herself-Nuke-Bait/Akari-addition
src/com/lilithsthrone/game/character/GameCharacter.java
[ "Linux-OpenIB" ]
Java
isOnlyCumInArea
null
public boolean isOnlyCumInArea(SexAreaOrifice area) { for(FluidStored f : fluidsStoredMap.get(area)) { if(!f.isCum()) { return false; } } return !fluidsStoredMap.get(area).isEmpty(); }
/** * @return false If the area is not storing any fluids, or if the stored fluids are not only cum. */
@return false If the area is not storing any fluids, or if the stored fluids are not only cum.
[ "@return", "false", "If", "the", "area", "is", "not", "storing", "any", "fluids", "or", "if", "the", "stored", "fluids", "are", "not", "only", "cum", "." ]
public boolean isOnlyCumInArea(SexAreaOrifice area) { for(FluidStored f : fluidsStoredMap.get(area)) { if(!f.isCum()) { return false; } } return !fluidsStoredMap.get(area).isEmpty(); }
[ "public", "boolean", "isOnlyCumInArea", "(", "SexAreaOrifice", "area", ")", "{", "for", "(", "FluidStored", "f", ":", "fluidsStoredMap", ".", "get", "(", "area", ")", ")", "{", "if", "(", "!", "f", ".", "isCum", "(", ")", ")", "{", "return", "false", ";", "}", "}", "return", "!", "fluidsStoredMap", ".", "get", "(", "area", ")", ".", "isEmpty", "(", ")", ";", "}" ]
@return false If the area is not storing any fluids, or if the stored fluids are not only cum.
[ "@return", "false", "If", "the", "area", "is", "not", "storing", "any", "fluids", "or", "if", "the", "stored", "fluids", "are", "not", "only", "cum", "." ]
[]
[ { "param": "area", "type": "SexAreaOrifice" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "area", "type": "SexAreaOrifice", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 1250, 353, 3386, 39, 379, 382, 5484, 12, 55, 338, 5484, 1162, 704, 311, 5091, 13, 288, 203, 202, 202, 1884, 12, 2340, 1911, 18005, 284, 294, 1183, 21428, 18005, 863, 18, 588, 12, 5036, 3719, 288, 203, 1082, 202, 430, 12, 5, 74, 18, 291, 39, 379, 10756, 288, 203, 9506, 202, 2463, 629, 31, 203, 1082, 202, 97, 203, 202, 202, 97, 203, 202, 202, 2463, 401, 2242, 21428, 18005, 863, 18, 588, 12, 5036, 2934, 291, 1921, 5621, 203, 202, 97, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,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 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 202, 380, 632, 2463, 629, 971, 326, 5091, 353, 486, 15729, 1281, 1183, 21428, 16, 578, 309, 326, 4041, 1183, 21428, 854, 486, 1338, 14471, 18, 203, 202, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
b6dbfe8d180f63176ccd099eecf5382589701ba8
Jesus-Herself-Nuke-Bait/Akari-addition
src/com/lilithsthrone/game/character/GameCharacter.java
[ "Linux-OpenIB" ]
Java
drainTotalFluidsStored
null
public void drainTotalFluidsStored(SexAreaOrifice area, float drain) { fluidsStoredMap.putIfAbsent(area, new ArrayList<>()); float drained = 0; drain = Math.abs(drain); for(FluidStored f : fluidsStoredMap.get(area)) { if(drained>=drain) { break; } float drainAmount = Math.min(drain, f.getMillilitres()); f.incrementMillilitres(-drainAmount); drained+=drainAmount; } fluidsStoredMap.get(area).removeIf((fs) -> fs.getMillilitres()<=0); }
/** * Drains the specified quantity of fluids from the specified orifice. * @param area The area to drain. * @param drain The value to be drained. Value can be either <b>positive or negative</b> float - the method automatically converts it to always be a drain. */
Drains the specified quantity of fluids from the specified orifice. @param area The area to drain. @param drain The value to be drained. Value can be either positive or negative float - the method automatically converts it to always be a drain.
[ "Drains", "the", "specified", "quantity", "of", "fluids", "from", "the", "specified", "orifice", ".", "@param", "area", "The", "area", "to", "drain", ".", "@param", "drain", "The", "value", "to", "be", "drained", ".", "Value", "can", "be", "either", "positive", "or", "negative", "float", "-", "the", "method", "automatically", "converts", "it", "to", "always", "be", "a", "drain", "." ]
public void drainTotalFluidsStored(SexAreaOrifice area, float drain) { fluidsStoredMap.putIfAbsent(area, new ArrayList<>()); float drained = 0; drain = Math.abs(drain); for(FluidStored f : fluidsStoredMap.get(area)) { if(drained>=drain) { break; } float drainAmount = Math.min(drain, f.getMillilitres()); f.incrementMillilitres(-drainAmount); drained+=drainAmount; } fluidsStoredMap.get(area).removeIf((fs) -> fs.getMillilitres()<=0); }
[ "public", "void", "drainTotalFluidsStored", "(", "SexAreaOrifice", "area", ",", "float", "drain", ")", "{", "fluidsStoredMap", ".", "putIfAbsent", "(", "area", ",", "new", "ArrayList", "<", ">", "(", ")", ")", ";", "float", "drained", "=", "0", ";", "drain", "=", "Math", ".", "abs", "(", "drain", ")", ";", "for", "(", "FluidStored", "f", ":", "fluidsStoredMap", ".", "get", "(", "area", ")", ")", "{", "if", "(", "drained", ">=", "drain", ")", "{", "break", ";", "}", "float", "drainAmount", "=", "Math", ".", "min", "(", "drain", ",", "f", ".", "getMillilitres", "(", ")", ")", ";", "f", ".", "incrementMillilitres", "(", "-", "drainAmount", ")", ";", "drained", "+=", "drainAmount", ";", "}", "fluidsStoredMap", ".", "get", "(", "area", ")", ".", "removeIf", "(", "(", "fs", ")", "->", "fs", ".", "getMillilitres", "(", ")", "<=", "0", ")", ";", "}" ]
Drains the specified quantity of fluids from the specified orifice.
[ "Drains", "the", "specified", "quantity", "of", "fluids", "from", "the", "specified", "orifice", "." ]
[]
[ { "param": "area", "type": "SexAreaOrifice" }, { "param": "drain", "type": "float" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "area", "type": "SexAreaOrifice", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "drain", "type": "float", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 918, 15427, 5269, 2340, 21428, 18005, 12, 55, 338, 5484, 1162, 704, 311, 5091, 16, 1431, 15427, 13, 288, 203, 202, 202, 2242, 21428, 18005, 863, 18, 458, 14711, 12, 5036, 16, 394, 2407, 29667, 10663, 203, 202, 202, 5659, 302, 354, 1920, 273, 374, 31, 203, 202, 202, 72, 7596, 273, 2361, 18, 5113, 12, 72, 7596, 1769, 203, 202, 202, 1884, 12, 2340, 1911, 18005, 284, 294, 1183, 21428, 18005, 863, 18, 588, 12, 5036, 3719, 288, 203, 1082, 202, 430, 12, 27224, 1920, 34, 33, 72, 7596, 13, 288, 203, 9506, 202, 8820, 31, 203, 1082, 202, 97, 203, 9506, 203, 1082, 202, 5659, 15427, 6275, 273, 2361, 18, 1154, 12, 72, 7596, 16, 284, 18, 588, 49, 737, 330, 305, 455, 10663, 203, 1082, 202, 74, 18, 15016, 49, 737, 330, 305, 455, 19236, 72, 7596, 6275, 1769, 203, 1082, 202, 27224, 1920, 15, 33, 72, 7596, 6275, 31, 203, 202, 202, 97, 203, 202, 202, 2242, 21428, 18005, 863, 18, 588, 12, 5036, 2934, 4479, 2047, 12443, 2556, 13, 317, 2662, 18, 588, 49, 737, 330, 305, 455, 1435, 32, 33, 20, 1769, 203, 202, 97, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 202, 380, 463, 354, 2679, 326, 1269, 10457, 434, 1183, 21428, 628, 326, 1269, 578, 704, 311, 18, 203, 202, 380, 632, 891, 5091, 1021, 5091, 358, 15427, 18, 203, 202, 380, 632, 891, 15427, 1021, 460, 358, 506, 302, 354, 1920, 18, 1445, 848, 506, 3344, 411, 70, 34, 21094, 578, 6092, 1757, 70, 34, 1431, 300, 326, 707, 6635, 7759, 518, 358, 3712, 506, 279, 15427, 18, 203, 202, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
b6dbfe8d180f63176ccd099eecf5382589701ba8
Jesus-Herself-Nuke-Bait/Akari-addition
src/com/lilithsthrone/game/character/GameCharacter.java
[ "Linux-OpenIB" ]
Java
washAllOrifices
String
public String washAllOrifices(boolean drainAllFluids) { for(SexAreaOrifice orifice : SexAreaOrifice.values()) { switch(orifice) { case MOUTH: break; case ASS: case BREAST: case BREAST_CROTCH: case THIGHS: clearFluidsStored(orifice); break; case ANUS: case NIPPLE: case NIPPLE_CROTCH: case URETHRA_PENIS: case URETHRA_VAGINA: case VAGINA: if(drainAllFluids) { clearFluidsStored(orifice); } else { drainTotalFluidsStored(orifice, 500); } break; } } Set<SexAreaOrifice> dirtyOrifices = new HashSet<>(); for(SexAreaOrifice ot: SexAreaOrifice.values()) { if(this.getTotalFluidInArea(ot)>0) { dirtyOrifices.add(ot); } } StringBuilder washingSB = new StringBuilder(); for(SexAreaOrifice orifice : SexAreaOrifice.values()) { if(!orifice.equals(SexAreaOrifice.MOUTH)) { // Don't give description of puking up if(dirtyOrifices.contains(orifice)) { if(orifice.isInternalOrifice()) { if(this.getTotalFluidInArea(orifice)>0) { washingSB.append(formatWashingArea(false, "[npc.Name] [npc.verb(wash)] as much of the cum out of [npc.her] "+orifice.getName(this)+" as [npc.she] can, but there's so much in there that [npc.sheIs] unable to fully clean it all out!")); } else { washingSB.append(formatWashingArea(true, "[npc.Name] [npc.verb(wash)] all of the cum out of [npc.her] "+orifice.getName(this)+".")); } } else { if(this.getTotalFluidInArea(orifice)>0) { washingSB.append(formatWashingArea(false, "[npc.Name] [npc.verb(wash)] as much of the cum off of [npc.her] "+orifice.getName(this)+" as [npc.she] can, but there's just so much that [npc.sheIs] unable to fully clean it all off!")); } else { washingSB.append(formatWashingArea(true, "[npc.Name] [npc.verb(wash)] all of the cum off of [npc.her] "+orifice.getName(this)+".")); } } } } } return UtilText.parse(this, washingSB.toString()); }
/** * @param drainAllFluids Pass in true to completely drain all fluids from all orifices. * @return A description of orifices cleaned. */
@param drainAllFluids Pass in true to completely drain all fluids from all orifices. @return A description of orifices cleaned.
[ "@param", "drainAllFluids", "Pass", "in", "true", "to", "completely", "drain", "all", "fluids", "from", "all", "orifices", ".", "@return", "A", "description", "of", "orifices", "cleaned", "." ]
public String washAllOrifices(boolean drainAllFluids) { for(SexAreaOrifice orifice : SexAreaOrifice.values()) { switch(orifice) { case MOUTH: break; case ASS: case BREAST: case BREAST_CROTCH: case THIGHS: clearFluidsStored(orifice); break; case ANUS: case NIPPLE: case NIPPLE_CROTCH: case URETHRA_PENIS: case URETHRA_VAGINA: case VAGINA: if(drainAllFluids) { clearFluidsStored(orifice); } else { drainTotalFluidsStored(orifice, 500); } break; } } Set<SexAreaOrifice> dirtyOrifices = new HashSet<>(); for(SexAreaOrifice ot: SexAreaOrifice.values()) { if(this.getTotalFluidInArea(ot)>0) { dirtyOrifices.add(ot); } } StringBuilder washingSB = new StringBuilder(); for(SexAreaOrifice orifice : SexAreaOrifice.values()) { if(!orifice.equals(SexAreaOrifice.MOUTH)) { if(dirtyOrifices.contains(orifice)) { if(orifice.isInternalOrifice()) { if(this.getTotalFluidInArea(orifice)>0) { washingSB.append(formatWashingArea(false, "[npc.Name] [npc.verb(wash)] as much of the cum out of [npc.her] "+orifice.getName(this)+" as [npc.she] can, but there's so much in there that [npc.sheIs] unable to fully clean it all out!")); } else { washingSB.append(formatWashingArea(true, "[npc.Name] [npc.verb(wash)] all of the cum out of [npc.her] "+orifice.getName(this)+".")); } } else { if(this.getTotalFluidInArea(orifice)>0) { washingSB.append(formatWashingArea(false, "[npc.Name] [npc.verb(wash)] as much of the cum off of [npc.her] "+orifice.getName(this)+" as [npc.she] can, but there's just so much that [npc.sheIs] unable to fully clean it all off!")); } else { washingSB.append(formatWashingArea(true, "[npc.Name] [npc.verb(wash)] all of the cum off of [npc.her] "+orifice.getName(this)+".")); } } } } } return UtilText.parse(this, washingSB.toString()); }
[ "public", "String", "washAllOrifices", "(", "boolean", "drainAllFluids", ")", "{", "for", "(", "SexAreaOrifice", "orifice", ":", "SexAreaOrifice", ".", "values", "(", ")", ")", "{", "switch", "(", "orifice", ")", "{", "case", "MOUTH", ":", "break", ";", "case", "ASS", ":", "case", "BREAST", ":", "case", "BREAST_CROTCH", ":", "case", "THIGHS", ":", "clearFluidsStored", "(", "orifice", ")", ";", "break", ";", "case", "ANUS", ":", "case", "NIPPLE", ":", "case", "NIPPLE_CROTCH", ":", "case", "URETHRA_PENIS", ":", "case", "URETHRA_VAGINA", ":", "case", "VAGINA", ":", "if", "(", "drainAllFluids", ")", "{", "clearFluidsStored", "(", "orifice", ")", ";", "}", "else", "{", "drainTotalFluidsStored", "(", "orifice", ",", "500", ")", ";", "}", "break", ";", "}", "}", "Set", "<", "SexAreaOrifice", ">", "dirtyOrifices", "=", "new", "HashSet", "<", ">", "(", ")", ";", "for", "(", "SexAreaOrifice", "ot", ":", "SexAreaOrifice", ".", "values", "(", ")", ")", "{", "if", "(", "this", ".", "getTotalFluidInArea", "(", "ot", ")", ">", "0", ")", "{", "dirtyOrifices", ".", "add", "(", "ot", ")", ";", "}", "}", "StringBuilder", "washingSB", "=", "new", "StringBuilder", "(", ")", ";", "for", "(", "SexAreaOrifice", "orifice", ":", "SexAreaOrifice", ".", "values", "(", ")", ")", "{", "if", "(", "!", "orifice", ".", "equals", "(", "SexAreaOrifice", ".", "MOUTH", ")", ")", "{", "if", "(", "dirtyOrifices", ".", "contains", "(", "orifice", ")", ")", "{", "if", "(", "orifice", ".", "isInternalOrifice", "(", ")", ")", "{", "if", "(", "this", ".", "getTotalFluidInArea", "(", "orifice", ")", ">", "0", ")", "{", "washingSB", ".", "append", "(", "formatWashingArea", "(", "false", ",", "\"[npc.Name] [npc.verb(wash)] as much of the cum out of [npc.her] \"", "+", "orifice", ".", "getName", "(", "this", ")", "+", "\" as [npc.she] can, but there's so much in there that [npc.sheIs] unable to fully clean it all out!\"", ")", ")", ";", "}", "else", "{", "washingSB", ".", "append", "(", "formatWashingArea", "(", "true", ",", "\"[npc.Name] [npc.verb(wash)] all of the cum out of [npc.her] \"", "+", "orifice", ".", "getName", "(", "this", ")", "+", "\".\"", ")", ")", ";", "}", "}", "else", "{", "if", "(", "this", ".", "getTotalFluidInArea", "(", "orifice", ")", ">", "0", ")", "{", "washingSB", ".", "append", "(", "formatWashingArea", "(", "false", ",", "\"[npc.Name] [npc.verb(wash)] as much of the cum off of [npc.her] \"", "+", "orifice", ".", "getName", "(", "this", ")", "+", "\" as [npc.she] can, but there's just so much that [npc.sheIs] unable to fully clean it all off!\"", ")", ")", ";", "}", "else", "{", "washingSB", ".", "append", "(", "formatWashingArea", "(", "true", ",", "\"[npc.Name] [npc.verb(wash)] all of the cum off of [npc.her] \"", "+", "orifice", ".", "getName", "(", "this", ")", "+", "\".\"", ")", ")", ";", "}", "}", "}", "}", "}", "return", "UtilText", ".", "parse", "(", "this", ",", "washingSB", ".", "toString", "(", ")", ")", ";", "}" ]
@param drainAllFluids Pass in true to completely drain all fluids from all orifices.
[ "@param", "drainAllFluids", "Pass", "in", "true", "to", "completely", "drain", "all", "fluids", "from", "all", "orifices", "." ]
[ "// Don't give description of puking up" ]
[ { "param": "drainAllFluids", "type": "boolean" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "drainAllFluids", "type": "boolean", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 514, 341, 961, 1595, 1162, 430, 1242, 12, 6494, 15427, 1595, 2340, 21428, 13, 288, 203, 202, 202, 1884, 12, 55, 338, 5484, 1162, 704, 311, 578, 704, 311, 294, 348, 338, 5484, 1162, 704, 311, 18, 2372, 10756, 288, 203, 1082, 202, 9610, 12, 280, 704, 311, 13, 288, 203, 9506, 202, 3593, 490, 5069, 44, 30, 203, 6862, 202, 8820, 31, 203, 9506, 202, 3593, 17289, 30, 648, 605, 862, 9053, 30, 648, 605, 862, 9053, 67, 39, 1457, 56, 1792, 30, 648, 7662, 3047, 13173, 30, 203, 6862, 202, 8507, 2340, 21428, 18005, 12, 280, 704, 311, 1769, 203, 6862, 202, 8820, 31, 203, 9506, 202, 3593, 8175, 3378, 30, 648, 423, 2579, 30099, 30, 648, 423, 2579, 30099, 67, 39, 1457, 56, 1792, 30, 648, 587, 862, 2455, 2849, 67, 52, 1157, 5127, 30, 648, 587, 862, 2455, 2849, 67, 58, 1781, 706, 37, 30, 648, 776, 1781, 706, 37, 30, 203, 6862, 202, 430, 12, 72, 7596, 1595, 2340, 21428, 13, 288, 203, 25083, 202, 8507, 2340, 21428, 18005, 12, 280, 704, 311, 1769, 203, 6862, 202, 97, 469, 288, 203, 25083, 202, 72, 7596, 5269, 2340, 21428, 18005, 12, 280, 704, 311, 16, 6604, 1769, 203, 6862, 202, 97, 203, 6862, 202, 8820, 31, 203, 1082, 202, 97, 203, 202, 202, 97, 203, 203, 202, 202, 694, 32, 55, 338, 5484, 1162, 704, 311, 34, 9603, 1162, 430, 1242, 273, 394, 6847, 29667, 5621, 203, 202, 202, 1884, 12, 55, 338, 5484, 1162, 704, 311, 15835, 30, 348, 338, 5484, 1162, 704, 311, 18, 2372, 10756, 288, 203, 1082, 202, 430, 12, 2211, 18, 588, 5269, 2340, 1911, 382, 5484, 12, 352, 13, 34, 20, 13, 288, 203, 9506, 202, 18013, 1162, 430, 1242, 18, 1289, 12, 352, 1769, 203, 1082, 202, 97, 203, 202, 202, 97, 203, 1082, 203, 202, 202, 21253, 341, 961, 310, 14541, 273, 394, 3225, 5621, 203, 1082, 203, 202, 202, 1884, 12, 55, 338, 5484, 1162, 704, 311, 578, 704, 311, 294, 348, 338, 5484, 1162, 704, 311, 18, 2372, 10756, 288, 203, 1082, 202, 430, 12, 5, 280, 704, 311, 18, 14963, 12, 55, 338, 5484, 1162, 704, 311, 18, 49, 5069, 44, 3719, 288, 368, 7615, 1404, 8492, 2477, 434, 16284, 79, 310, 731, 203, 9506, 202, 430, 12, 18013, 1162, 430, 1242, 18, 12298, 12, 280, 704, 311, 3719, 288, 203, 6862, 202, 430, 12, 280, 704, 311, 18, 291, 3061, 1162, 704, 311, 10756, 288, 203, 25083, 202, 430, 12, 2211, 18, 588, 5269, 2340, 1911, 382, 5484, 12, 280, 704, 311, 13, 34, 20, 13, 288, 203, 6862, 1082, 202, 91, 961, 310, 14541, 18, 6923, 12, 2139, 59, 961, 310, 5484, 12, 5743, 16, 203, 6862, 6862, 202, 6, 63, 82, 2436, 18, 461, 65, 306, 82, 2436, 18, 16629, 12, 91, 961, 25887, 487, 9816, 434, 326, 14471, 596, 434, 306, 82, 2436, 18, 1614, 65, 13773, 280, 704, 311, 18, 17994, 12, 2211, 13, 9078, 487, 306, 82, 2436, 18, 87, 580, 65, 848, 16, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,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1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
[ 1, 26873, 203, 202, 380, 632, 891, 15427, 1595, 2340, 21428, 10311, 316, 638, 358, 14416, 15427, 777, 1183, 21428, 628, 777, 578, 430, 1242, 18, 203, 202, 380, 632, 2463, 432, 2477, 434, 578, 430, 1242, 9426, 18, 203, 202, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
b6dbfe8d180f63176ccd099eecf5382589701ba8
Jesus-Herself-Nuke-Bait/Akari-addition
src/com/lilithsthrone/game/character/GameCharacter.java
[ "Linux-OpenIB" ]
Java
moveToAdjacentMatchingCellType
null
public boolean moveToAdjacentMatchingCellType(boolean setAsHome, AbstractPlaceType... additionalPlaceTypes) { World world = Main.game.getWorlds().get(this.getWorldLocation()); List<Vector2i> availableLocations = new ArrayList<>(); List<AbstractPlaceType> acceptablePlaceTypes = new ArrayList<>(); Collections.addAll(acceptablePlaceTypes, additionalPlaceTypes); acceptablePlaceTypes.add(getLocationPlace().getPlaceType()); if(world.getCell(this.getLocation().getX()+1, this.getLocation().getY())!=null && acceptablePlaceTypes.contains(world.getCell(this.getLocation().getX()+1, this.getLocation().getY()).getPlace().getPlaceType())) { availableLocations.add(new Vector2i(this.getLocation().getX()+1, this.getLocation().getY())); } if(world.getCell(this.getLocation().getX()-1, this.getLocation().getY())!=null && acceptablePlaceTypes.contains(world.getCell(this.getLocation().getX()-1, this.getLocation().getY()).getPlace().getPlaceType())) { availableLocations.add(new Vector2i(this.getLocation().getX()-1, this.getLocation().getY())); } if(world.getCell(this.getLocation().getX(), this.getLocation().getY()+1)!=null && acceptablePlaceTypes.contains(world.getCell(this.getLocation().getX(), this.getLocation().getY()+1).getPlace().getPlaceType())) { availableLocations.add(new Vector2i(this.getLocation().getX(), this.getLocation().getY()+1)); } if(world.getCell(this.getLocation().getX(), this.getLocation().getY()-1)!=null && acceptablePlaceTypes.contains(world.getCell(this.getLocation().getX(), this.getLocation().getY()-1).getPlace().getPlaceType())) { availableLocations.add(new Vector2i(this.getLocation().getX(), this.getLocation().getY()-1)); } if(availableLocations.isEmpty()) { return false; } else { this.setLocation(availableLocations.get(Util.random.nextInt(availableLocations.size()))); if(setAsHome) { this.setHomeLocation(); } return true; } }
/** * Moves this character to an adjoining Cell which shares the PlaceType of the Cell that the character is already in. * @param additionalPlaceTypes Any additional PlaceTypes that should be allowed for movement. * @return True if the character was moved. */
Moves this character to an adjoining Cell which shares the PlaceType of the Cell that the character is already in. @param additionalPlaceTypes Any additional PlaceTypes that should be allowed for movement. @return True if the character was moved.
[ "Moves", "this", "character", "to", "an", "adjoining", "Cell", "which", "shares", "the", "PlaceType", "of", "the", "Cell", "that", "the", "character", "is", "already", "in", ".", "@param", "additionalPlaceTypes", "Any", "additional", "PlaceTypes", "that", "should", "be", "allowed", "for", "movement", ".", "@return", "True", "if", "the", "character", "was", "moved", "." ]
public boolean moveToAdjacentMatchingCellType(boolean setAsHome, AbstractPlaceType... additionalPlaceTypes) { World world = Main.game.getWorlds().get(this.getWorldLocation()); List<Vector2i> availableLocations = new ArrayList<>(); List<AbstractPlaceType> acceptablePlaceTypes = new ArrayList<>(); Collections.addAll(acceptablePlaceTypes, additionalPlaceTypes); acceptablePlaceTypes.add(getLocationPlace().getPlaceType()); if(world.getCell(this.getLocation().getX()+1, this.getLocation().getY())!=null && acceptablePlaceTypes.contains(world.getCell(this.getLocation().getX()+1, this.getLocation().getY()).getPlace().getPlaceType())) { availableLocations.add(new Vector2i(this.getLocation().getX()+1, this.getLocation().getY())); } if(world.getCell(this.getLocation().getX()-1, this.getLocation().getY())!=null && acceptablePlaceTypes.contains(world.getCell(this.getLocation().getX()-1, this.getLocation().getY()).getPlace().getPlaceType())) { availableLocations.add(new Vector2i(this.getLocation().getX()-1, this.getLocation().getY())); } if(world.getCell(this.getLocation().getX(), this.getLocation().getY()+1)!=null && acceptablePlaceTypes.contains(world.getCell(this.getLocation().getX(), this.getLocation().getY()+1).getPlace().getPlaceType())) { availableLocations.add(new Vector2i(this.getLocation().getX(), this.getLocation().getY()+1)); } if(world.getCell(this.getLocation().getX(), this.getLocation().getY()-1)!=null && acceptablePlaceTypes.contains(world.getCell(this.getLocation().getX(), this.getLocation().getY()-1).getPlace().getPlaceType())) { availableLocations.add(new Vector2i(this.getLocation().getX(), this.getLocation().getY()-1)); } if(availableLocations.isEmpty()) { return false; } else { this.setLocation(availableLocations.get(Util.random.nextInt(availableLocations.size()))); if(setAsHome) { this.setHomeLocation(); } return true; } }
[ "public", "boolean", "moveToAdjacentMatchingCellType", "(", "boolean", "setAsHome", ",", "AbstractPlaceType", "...", "additionalPlaceTypes", ")", "{", "World", "world", "=", "Main", ".", "game", ".", "getWorlds", "(", ")", ".", "get", "(", "this", ".", "getWorldLocation", "(", ")", ")", ";", "List", "<", "Vector2i", ">", "availableLocations", "=", "new", "ArrayList", "<", ">", "(", ")", ";", "List", "<", "AbstractPlaceType", ">", "acceptablePlaceTypes", "=", "new", "ArrayList", "<", ">", "(", ")", ";", "Collections", ".", "addAll", "(", "acceptablePlaceTypes", ",", "additionalPlaceTypes", ")", ";", "acceptablePlaceTypes", ".", "add", "(", "getLocationPlace", "(", ")", ".", "getPlaceType", "(", ")", ")", ";", "if", "(", "world", ".", "getCell", "(", "this", ".", "getLocation", "(", ")", ".", "getX", "(", ")", "+", "1", ",", "this", ".", "getLocation", "(", ")", ".", "getY", "(", ")", ")", "!=", "null", "&&", "acceptablePlaceTypes", ".", "contains", "(", "world", ".", "getCell", "(", "this", ".", "getLocation", "(", ")", ".", "getX", "(", ")", "+", "1", ",", "this", ".", "getLocation", "(", ")", ".", "getY", "(", ")", ")", ".", "getPlace", "(", ")", ".", "getPlaceType", "(", ")", ")", ")", "{", "availableLocations", ".", "add", "(", "new", "Vector2i", "(", "this", ".", "getLocation", "(", ")", ".", "getX", "(", ")", "+", "1", ",", "this", ".", "getLocation", "(", ")", ".", "getY", "(", ")", ")", ")", ";", "}", "if", "(", "world", ".", "getCell", "(", "this", ".", "getLocation", "(", ")", ".", "getX", "(", ")", "-", "1", ",", "this", ".", "getLocation", "(", ")", ".", "getY", "(", ")", ")", "!=", "null", "&&", "acceptablePlaceTypes", ".", "contains", "(", "world", ".", "getCell", "(", "this", ".", "getLocation", "(", ")", ".", "getX", "(", ")", "-", "1", ",", "this", ".", "getLocation", "(", ")", ".", "getY", "(", ")", ")", ".", "getPlace", "(", ")", ".", "getPlaceType", "(", ")", ")", ")", "{", "availableLocations", ".", "add", "(", "new", "Vector2i", "(", "this", ".", "getLocation", "(", ")", ".", "getX", "(", ")", "-", "1", ",", "this", ".", "getLocation", "(", ")", ".", "getY", "(", ")", ")", ")", ";", "}", "if", "(", "world", ".", "getCell", "(", "this", ".", "getLocation", "(", ")", ".", "getX", "(", ")", ",", "this", ".", "getLocation", "(", ")", ".", "getY", "(", ")", "+", "1", ")", "!=", "null", "&&", "acceptablePlaceTypes", ".", "contains", "(", "world", ".", "getCell", "(", "this", ".", "getLocation", "(", ")", ".", "getX", "(", ")", ",", "this", ".", "getLocation", "(", ")", ".", "getY", "(", ")", "+", "1", ")", ".", "getPlace", "(", ")", ".", "getPlaceType", "(", ")", ")", ")", "{", "availableLocations", ".", "add", "(", "new", "Vector2i", "(", "this", ".", "getLocation", "(", ")", ".", "getX", "(", ")", ",", "this", ".", "getLocation", "(", ")", ".", "getY", "(", ")", "+", "1", ")", ")", ";", "}", "if", "(", "world", ".", "getCell", "(", "this", ".", "getLocation", "(", ")", ".", "getX", "(", ")", ",", "this", ".", "getLocation", "(", ")", ".", "getY", "(", ")", "-", "1", ")", "!=", "null", "&&", "acceptablePlaceTypes", ".", "contains", "(", "world", ".", "getCell", "(", "this", ".", "getLocation", "(", ")", ".", "getX", "(", ")", ",", "this", ".", "getLocation", "(", ")", ".", "getY", "(", ")", "-", "1", ")", ".", "getPlace", "(", ")", ".", "getPlaceType", "(", ")", ")", ")", "{", "availableLocations", ".", "add", "(", "new", "Vector2i", "(", "this", ".", "getLocation", "(", ")", ".", "getX", "(", ")", ",", "this", ".", "getLocation", "(", ")", ".", "getY", "(", ")", "-", "1", ")", ")", ";", "}", "if", "(", "availableLocations", ".", "isEmpty", "(", ")", ")", "{", "return", "false", ";", "}", "else", "{", "this", ".", "setLocation", "(", "availableLocations", ".", "get", "(", "Util", ".", "random", ".", "nextInt", "(", "availableLocations", ".", "size", "(", ")", ")", ")", ")", ";", "if", "(", "setAsHome", ")", "{", "this", ".", "setHomeLocation", "(", ")", ";", "}", "return", "true", ";", "}", "}" ]
Moves this character to an adjoining Cell which shares the PlaceType of the Cell that the character is already in.
[ "Moves", "this", "character", "to", "an", "adjoining", "Cell", "which", "shares", "the", "PlaceType", "of", "the", "Cell", "that", "the", "character", "is", "already", "in", "." ]
[]
[ { "param": "setAsHome", "type": "boolean" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "setAsHome", "type": "boolean", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 1250, 13863, 17886, 25897, 9517, 4020, 559, 12, 6494, 444, 1463, 8684, 16, 4115, 6029, 559, 2777, 3312, 6029, 2016, 13, 288, 203, 202, 202, 18071, 9117, 273, 12740, 18, 13957, 18, 588, 18071, 87, 7675, 588, 12, 2211, 18, 588, 18071, 2735, 10663, 203, 202, 202, 682, 32, 5018, 22, 77, 34, 2319, 10985, 273, 394, 2407, 29667, 5621, 203, 1082, 203, 202, 202, 682, 32, 7469, 6029, 559, 34, 14206, 6029, 2016, 273, 394, 2407, 29667, 5621, 203, 202, 202, 15150, 18, 1289, 1595, 12, 9436, 429, 6029, 2016, 16, 3312, 6029, 2016, 1769, 203, 202, 202, 9436, 429, 6029, 2016, 18, 1289, 12, 588, 2735, 6029, 7675, 588, 6029, 559, 10663, 203, 1082, 203, 202, 202, 430, 12, 18179, 18, 588, 4020, 12, 2211, 18, 588, 2735, 7675, 588, 60, 1435, 15, 21, 16, 333, 18, 588, 2735, 7675, 588, 61, 10756, 5, 33, 2011, 597, 14206, 6029, 2016, 18, 12298, 12, 18179, 18, 588, 4020, 12, 2211, 18, 588, 2735, 7675, 588, 60, 1435, 15, 21, 16, 333, 18, 588, 2735, 7675, 588, 61, 1435, 2934, 588, 6029, 7675, 588, 6029, 559, 1435, 3719, 288, 203, 1082, 202, 5699, 10985, 18, 1289, 12, 2704, 5589, 22, 77, 12, 2211, 18, 588, 2735, 7675, 588, 60, 1435, 15, 21, 16, 333, 18, 588, 2735, 7675, 588, 61, 1435, 10019, 203, 202, 202, 97, 203, 202, 202, 430, 12, 18179, 18, 588, 4020, 12, 2211, 18, 588, 2735, 7675, 588, 60, 1435, 17, 21, 16, 333, 18, 588, 2735, 7675, 588, 61, 10756, 5, 33, 2011, 597, 14206, 6029, 2016, 18, 12298, 12, 18179, 18, 588, 4020, 12, 2211, 18, 588, 2735, 7675, 588, 60, 1435, 17, 21, 16, 333, 18, 588, 2735, 7675, 588, 61, 1435, 2934, 588, 6029, 7675, 588, 6029, 559, 1435, 3719, 288, 203, 1082, 202, 5699, 10985, 18, 1289, 12, 2704, 5589, 22, 77, 12, 2211, 18, 588, 2735, 7675, 588, 60, 1435, 17, 21, 16, 333, 18, 588, 2735, 7675, 588, 61, 1435, 10019, 203, 202, 202, 97, 203, 202, 202, 430, 12, 18179, 18, 588, 4020, 12, 2211, 18, 588, 2735, 7675, 588, 60, 9334, 333, 18, 588, 2735, 7675, 588, 61, 1435, 15, 21, 13, 5, 33, 2011, 597, 14206, 6029, 2016, 18, 12298, 12, 18179, 18, 588, 4020, 12, 2211, 18, 588, 2735, 7675, 588, 60, 9334, 333, 18, 588, 2735, 7675, 588, 61, 1435, 15, 21, 2934, 588, 6029, 7675, 588, 6029, 559, 1435, 3719, 288, 203, 1082, 202, 5699, 10985, 18, 1289, 12, 2704, 5589, 22, 77, 12, 2211, 18, 588, 2735, 7675, 588, 60, 9334, 333, 18, 588, 2735, 7675, 588, 61, 1435, 15, 21, 10019, 203, 202, 202, 97, 203, 202, 202, 430, 12, 18179, 18, 588, 4020, 12, 2211, 18, 588, 2735, 7675, 588, 60, 9334, 333, 18, 588, 2735, 7675, 588, 61, 1435, 17, 21, 13, 5, 33, 2011, 597, 14206, 6029, 2016, 18, 12298, 12, 18179, 18, 588, 4020, 12, 2211, 18, 588, 2735, 7675, 588, 60, 9334, 333, 18, 588, 2735, 7675, 588, 61, 1435, 17, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
[ 1, 26873, 203, 202, 380, 490, 10829, 333, 3351, 358, 392, 1261, 5701, 310, 8614, 1492, 24123, 326, 13022, 559, 434, 326, 8614, 716, 326, 3351, 353, 1818, 316, 18, 203, 202, 380, 632, 891, 3312, 6029, 2016, 5502, 3312, 13022, 2016, 716, 1410, 506, 2935, 364, 26017, 18, 203, 202, 380, 632, 2463, 1053, 309, 326, 3351, 1703, 10456, 18, 203, 202, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
b6dbfe8d180f63176ccd099eecf5382589701ba8
Jesus-Herself-Nuke-Bait/Akari-addition
src/com/lilithsthrone/game/character/GameCharacter.java
[ "Linux-OpenIB" ]
Java
resetInventory
null
public void resetInventory(boolean includeWeapons){ unequipAllClothingIntoVoid(true, includeWeapons); this.inventory = new CharacterInventory(0); }
/** * First unequips all clothing into void, so that clothing effects are preserved. */
First unequips all clothing into void, so that clothing effects are preserved.
[ "First", "unequips", "all", "clothing", "into", "void", "so", "that", "clothing", "effects", "are", "preserved", "." ]
public void resetInventory(boolean includeWeapons){ unequipAllClothingIntoVoid(true, includeWeapons); this.inventory = new CharacterInventory(0); }
[ "public", "void", "resetInventory", "(", "boolean", "includeWeapons", ")", "{", "unequipAllClothingIntoVoid", "(", "true", ",", "includeWeapons", ")", ";", "this", ".", "inventory", "=", "new", "CharacterInventory", "(", "0", ")", ";", "}" ]
First unequips all clothing into void, so that clothing effects are preserved.
[ "First", "unequips", "all", "clothing", "into", "void", "so", "that", "clothing", "effects", "are", "preserved", "." ]
[]
[ { "param": "includeWeapons", "type": "boolean" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "includeWeapons", "type": "boolean", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 918, 2715, 15059, 12, 6494, 2341, 3218, 438, 7008, 15329, 203, 202, 202, 7556, 372, 625, 1595, 2009, 352, 4018, 5952, 19038, 12, 3767, 16, 2341, 3218, 438, 7008, 1769, 203, 1082, 203, 202, 202, 2211, 18, 26024, 273, 394, 6577, 15059, 12, 20, 1769, 203, 202, 97, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 202, 380, 5783, 640, 14298, 7146, 777, 927, 352, 4018, 1368, 918, 16, 1427, 716, 927, 352, 4018, 16605, 854, 21096, 18, 203, 202, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
b6dbfe8d180f63176ccd099eecf5382589701ba8
Jesus-Herself-Nuke-Bait/Akari-addition
src/com/lilithsthrone/game/character/GameCharacter.java
[ "Linux-OpenIB" ]
Java
addItem
String
public String addItem(AbstractItem item, int count, boolean removingFromFloor, boolean appendTextToEventLog) { if (removingFromFloor) { if (inventory.addItem(item, count)) { updateInventoryListeners(); Main.game.getWorlds().get(getWorldLocation()).getCell(getLocation()).getInventory().removeItem(item, count); if(appendTextToEventLog) { Main.game.addEvent(new EventLogEntry(Main.game.getMinutesPassed(), "Item Added", item.getName()), false); } return "<p style='text-align:center;'>"+ addedItemToInventoryText(item, count)+"</p>"; } else { return inventoryFullText() + droppedItemText(item, count); } } else { if (inventory.addItem(item, count)) { updateInventoryListeners(); if(appendTextToEventLog) { Main.game.addEvent(new EventLogEntry(Main.game.getMinutesPassed(), "Item Added", item.getName()), false); } return "<p style='text-align:center;'>"+ addedItemToInventoryText(item, count)+"</p>"; } else { Main.game.getWorlds().get(getWorldLocation()).getCell(getLocation()).getInventory().addItem(item, count); return inventoryFullText() + droppedItemText(item, count); } } }
/** * Add an item to this character's inventory. If the inventory is full, the item is dropped in the character's current location. * * @param removingFromFloor true if this item should be removed from the floor of the area the character is currently in on a successful pick up. * @return Description of what happened. */
Add an item to this character's inventory. If the inventory is full, the item is dropped in the character's current location. @param removingFromFloor true if this item should be removed from the floor of the area the character is currently in on a successful pick up. @return Description of what happened.
[ "Add", "an", "item", "to", "this", "character", "'", "s", "inventory", ".", "If", "the", "inventory", "is", "full", "the", "item", "is", "dropped", "in", "the", "character", "'", "s", "current", "location", ".", "@param", "removingFromFloor", "true", "if", "this", "item", "should", "be", "removed", "from", "the", "floor", "of", "the", "area", "the", "character", "is", "currently", "in", "on", "a", "successful", "pick", "up", ".", "@return", "Description", "of", "what", "happened", "." ]
public String addItem(AbstractItem item, int count, boolean removingFromFloor, boolean appendTextToEventLog) { if (removingFromFloor) { if (inventory.addItem(item, count)) { updateInventoryListeners(); Main.game.getWorlds().get(getWorldLocation()).getCell(getLocation()).getInventory().removeItem(item, count); if(appendTextToEventLog) { Main.game.addEvent(new EventLogEntry(Main.game.getMinutesPassed(), "Item Added", item.getName()), false); } return "<p style='text-align:center;'>"+ addedItemToInventoryText(item, count)+"</p>"; } else { return inventoryFullText() + droppedItemText(item, count); } } else { if (inventory.addItem(item, count)) { updateInventoryListeners(); if(appendTextToEventLog) { Main.game.addEvent(new EventLogEntry(Main.game.getMinutesPassed(), "Item Added", item.getName()), false); } return "<p style='text-align:center;'>"+ addedItemToInventoryText(item, count)+"</p>"; } else { Main.game.getWorlds().get(getWorldLocation()).getCell(getLocation()).getInventory().addItem(item, count); return inventoryFullText() + droppedItemText(item, count); } } }
[ "public", "String", "addItem", "(", "AbstractItem", "item", ",", "int", "count", ",", "boolean", "removingFromFloor", ",", "boolean", "appendTextToEventLog", ")", "{", "if", "(", "removingFromFloor", ")", "{", "if", "(", "inventory", ".", "addItem", "(", "item", ",", "count", ")", ")", "{", "updateInventoryListeners", "(", ")", ";", "Main", ".", "game", ".", "getWorlds", "(", ")", ".", "get", "(", "getWorldLocation", "(", ")", ")", ".", "getCell", "(", "getLocation", "(", ")", ")", ".", "getInventory", "(", ")", ".", "removeItem", "(", "item", ",", "count", ")", ";", "if", "(", "appendTextToEventLog", ")", "{", "Main", ".", "game", ".", "addEvent", "(", "new", "EventLogEntry", "(", "Main", ".", "game", ".", "getMinutesPassed", "(", ")", ",", "\"Item Added\"", ",", "item", ".", "getName", "(", ")", ")", ",", "false", ")", ";", "}", "return", "\"<p style='text-align:center;'>\"", "+", "addedItemToInventoryText", "(", "item", ",", "count", ")", "+", "\"</p>\"", ";", "}", "else", "{", "return", "inventoryFullText", "(", ")", "+", "droppedItemText", "(", "item", ",", "count", ")", ";", "}", "}", "else", "{", "if", "(", "inventory", ".", "addItem", "(", "item", ",", "count", ")", ")", "{", "updateInventoryListeners", "(", ")", ";", "if", "(", "appendTextToEventLog", ")", "{", "Main", ".", "game", ".", "addEvent", "(", "new", "EventLogEntry", "(", "Main", ".", "game", ".", "getMinutesPassed", "(", ")", ",", "\"Item Added\"", ",", "item", ".", "getName", "(", ")", ")", ",", "false", ")", ";", "}", "return", "\"<p style='text-align:center;'>\"", "+", "addedItemToInventoryText", "(", "item", ",", "count", ")", "+", "\"</p>\"", ";", "}", "else", "{", "Main", ".", "game", ".", "getWorlds", "(", ")", ".", "get", "(", "getWorldLocation", "(", ")", ")", ".", "getCell", "(", "getLocation", "(", ")", ")", ".", "getInventory", "(", ")", ".", "addItem", "(", "item", ",", "count", ")", ";", "return", "inventoryFullText", "(", ")", "+", "droppedItemText", "(", "item", ",", "count", ")", ";", "}", "}", "}" ]
Add an item to this character's inventory.
[ "Add", "an", "item", "to", "this", "character", "'", "s", "inventory", "." ]
[]
[ { "param": "item", "type": "AbstractItem" }, { "param": "count", "type": "int" }, { "param": "removingFromFloor", "type": "boolean" }, { "param": "appendTextToEventLog", "type": "boolean" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "item", "type": "AbstractItem", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "count", "type": "int", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "removingFromFloor", "type": "boolean", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "appendTextToEventLog", "type": "boolean", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 514, 15009, 12, 7469, 1180, 761, 16, 509, 1056, 16, 1250, 9427, 1265, 42, 5807, 16, 1250, 714, 1528, 774, 1133, 1343, 13, 288, 203, 202, 202, 430, 261, 2764, 13767, 1265, 42, 5807, 13, 288, 203, 1082, 202, 430, 261, 26024, 18, 1289, 1180, 12, 1726, 16, 1056, 3719, 288, 203, 9506, 202, 2725, 15059, 5583, 5621, 203, 9506, 202, 6376, 18, 13957, 18, 588, 18071, 87, 7675, 588, 12, 588, 18071, 2735, 1435, 2934, 588, 4020, 12, 588, 2735, 1435, 2934, 588, 15059, 7675, 4479, 1180, 12, 1726, 16, 1056, 1769, 203, 9506, 202, 430, 12, 6923, 1528, 774, 1133, 1343, 13, 288, 203, 6862, 202, 6376, 18, 13957, 18, 1289, 1133, 12, 2704, 2587, 25548, 12, 6376, 18, 13957, 18, 588, 13050, 22530, 9334, 315, 1180, 25808, 3113, 761, 18, 17994, 1435, 3631, 629, 1769, 203, 9506, 202, 97, 203, 9506, 202, 2463, 3532, 84, 2154, 2218, 955, 17, 7989, 30, 5693, 4359, 2984, 15, 3096, 1180, 774, 15059, 1528, 12, 1726, 16, 1056, 13, 9078, 1757, 84, 2984, 31, 203, 1082, 202, 97, 469, 288, 203, 9506, 202, 2463, 13086, 5080, 1528, 1435, 397, 14611, 1180, 1528, 12, 1726, 16, 1056, 1769, 203, 1082, 202, 97, 203, 9506, 203, 202, 202, 97, 469, 288, 203, 1082, 202, 430, 261, 26024, 18, 1289, 1180, 12, 1726, 16, 1056, 3719, 288, 203, 9506, 202, 2725, 15059, 5583, 5621, 203, 9506, 202, 430, 12, 6923, 1528, 774, 1133, 1343, 13, 288, 203, 6862, 202, 6376, 18, 13957, 18, 1289, 1133, 12, 2704, 2587, 25548, 12, 6376, 18, 13957, 18, 588, 13050, 22530, 9334, 315, 1180, 25808, 3113, 761, 18, 17994, 1435, 3631, 629, 1769, 203, 9506, 202, 97, 203, 9506, 202, 2463, 3532, 84, 2154, 2218, 955, 17, 7989, 30, 5693, 4359, 2984, 15, 3096, 1180, 774, 15059, 1528, 12, 1726, 16, 1056, 13, 9078, 1757, 84, 2984, 31, 203, 1082, 202, 97, 469, 288, 203, 9506, 202, 6376, 18, 13957, 18, 588, 18071, 87, 7675, 588, 12, 588, 18071, 2735, 1435, 2934, 588, 4020, 12, 588, 2735, 1435, 2934, 588, 15059, 7675, 1289, 1180, 12, 1726, 16, 1056, 1769, 203, 9506, 202, 2463, 13086, 5080, 1528, 1435, 397, 14611, 1180, 1528, 12, 1726, 16, 1056, 1769, 203, 1082, 202, 97, 203, 202, 202, 97, 203, 202, 97, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 202, 380, 1436, 392, 761, 358, 333, 3351, 1807, 13086, 18, 971, 326, 13086, 353, 1983, 16, 326, 761, 353, 14611, 316, 326, 3351, 1807, 783, 2117, 18, 203, 202, 380, 7010, 202, 380, 632, 891, 9427, 1265, 42, 5807, 638, 309, 333, 761, 1410, 506, 3723, 628, 326, 6346, 434, 326, 5091, 326, 3351, 353, 4551, 316, 603, 279, 6873, 6002, 731, 18, 203, 202, 380, 632, 2463, 6507, 434, 4121, 17497, 18, 203, 202, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
b6dbfe8d180f63176ccd099eecf5382589701ba8
Jesus-Herself-Nuke-Bait/Akari-addition
src/com/lilithsthrone/game/character/GameCharacter.java
[ "Linux-OpenIB" ]
Java
dropItem
String
public String dropItem(AbstractItem item, int count) { if (inventory.dropItem(item, count, Main.game.getWorlds().get(this.worldLocation), location)) { return droppedItemText(item, count); } else { return ""; } }
/** * Drops the item in the cell this character is currently in. * @return Description of what happened. */
Drops the item in the cell this character is currently in. @return Description of what happened.
[ "Drops", "the", "item", "in", "the", "cell", "this", "character", "is", "currently", "in", ".", "@return", "Description", "of", "what", "happened", "." ]
public String dropItem(AbstractItem item, int count) { if (inventory.dropItem(item, count, Main.game.getWorlds().get(this.worldLocation), location)) { return droppedItemText(item, count); } else { return ""; } }
[ "public", "String", "dropItem", "(", "AbstractItem", "item", ",", "int", "count", ")", "{", "if", "(", "inventory", ".", "dropItem", "(", "item", ",", "count", ",", "Main", ".", "game", ".", "getWorlds", "(", ")", ".", "get", "(", "this", ".", "worldLocation", ")", ",", "location", ")", ")", "{", "return", "droppedItemText", "(", "item", ",", "count", ")", ";", "}", "else", "{", "return", "\"\"", ";", "}", "}" ]
Drops the item in the cell this character is currently in.
[ "Drops", "the", "item", "in", "the", "cell", "this", "character", "is", "currently", "in", "." ]
[]
[ { "param": "item", "type": "AbstractItem" }, { "param": "count", "type": "int" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "item", "type": "AbstractItem", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "count", "type": "int", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 514, 3640, 1180, 12, 7469, 1180, 761, 16, 509, 1056, 13, 288, 203, 202, 202, 430, 261, 26024, 18, 7285, 1180, 12, 1726, 16, 1056, 16, 12740, 18, 13957, 18, 588, 18071, 87, 7675, 588, 12, 2211, 18, 18179, 2735, 3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-100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
b6dbfe8d180f63176ccd099eecf5382589701ba8
Jesus-Herself-Nuke-Bait/Akari-addition
src/com/lilithsthrone/game/character/GameCharacter.java
[ "Linux-OpenIB" ]
Java
useItem
String
public String useItem(AbstractItem item, GameCharacter target, boolean removingFromFloor, boolean onlyReturnEffects) { if(ItemType.getAllItems().contains(item.getItemType()) && isPlayer()) { if(Main.getProperties().addItemDiscovered(item.getItemType())) { Main.game.addEvent(new EventLogEntryEncyclopediaUnlock(item.getItemType().getName(false), item.getRarity().getColour()), true); } } if (item.getItemType().isConsumedOnUse()) { if(removingFromFloor) { Main.game.getWorlds().get(getWorldLocation()).getCell(getLocation()).getInventory().removeItem(item); } else { removeItem(item); } } if(onlyReturnEffects) { return item.applyEffect(this, target); } else { return item.getUseDescription(this, target) + item.applyEffect(this, target); } }
/** * Uses the specified item on the specified target. If the item returns true on isConsumedOnUse() call, this item is removed from the character's inventory. * * @param removingFromFloor true if an instance of this item should be consumed from the floor of the area the character is currently in. If item isConsumedOnUse() returns false, an item will not be removed from the floor. * @return Description of what happened. */
Uses the specified item on the specified target. If the item returns true on isConsumedOnUse() call, this item is removed from the character's inventory. @param removingFromFloor true if an instance of this item should be consumed from the floor of the area the character is currently in. If item isConsumedOnUse() returns false, an item will not be removed from the floor. @return Description of what happened.
[ "Uses", "the", "specified", "item", "on", "the", "specified", "target", ".", "If", "the", "item", "returns", "true", "on", "isConsumedOnUse", "()", "call", "this", "item", "is", "removed", "from", "the", "character", "'", "s", "inventory", ".", "@param", "removingFromFloor", "true", "if", "an", "instance", "of", "this", "item", "should", "be", "consumed", "from", "the", "floor", "of", "the", "area", "the", "character", "is", "currently", "in", ".", "If", "item", "isConsumedOnUse", "()", "returns", "false", "an", "item", "will", "not", "be", "removed", "from", "the", "floor", ".", "@return", "Description", "of", "what", "happened", "." ]
public String useItem(AbstractItem item, GameCharacter target, boolean removingFromFloor, boolean onlyReturnEffects) { if(ItemType.getAllItems().contains(item.getItemType()) && isPlayer()) { if(Main.getProperties().addItemDiscovered(item.getItemType())) { Main.game.addEvent(new EventLogEntryEncyclopediaUnlock(item.getItemType().getName(false), item.getRarity().getColour()), true); } } if (item.getItemType().isConsumedOnUse()) { if(removingFromFloor) { Main.game.getWorlds().get(getWorldLocation()).getCell(getLocation()).getInventory().removeItem(item); } else { removeItem(item); } } if(onlyReturnEffects) { return item.applyEffect(this, target); } else { return item.getUseDescription(this, target) + item.applyEffect(this, target); } }
[ "public", "String", "useItem", "(", "AbstractItem", "item", ",", "GameCharacter", "target", ",", "boolean", "removingFromFloor", ",", "boolean", "onlyReturnEffects", ")", "{", "if", "(", "ItemType", ".", "getAllItems", "(", ")", ".", "contains", "(", "item", ".", "getItemType", "(", ")", ")", "&&", "isPlayer", "(", ")", ")", "{", "if", "(", "Main", ".", "getProperties", "(", ")", ".", "addItemDiscovered", "(", "item", ".", "getItemType", "(", ")", ")", ")", "{", "Main", ".", "game", ".", "addEvent", "(", "new", "EventLogEntryEncyclopediaUnlock", "(", "item", ".", "getItemType", "(", ")", ".", "getName", "(", "false", ")", ",", "item", ".", "getRarity", "(", ")", ".", "getColour", "(", ")", ")", ",", "true", ")", ";", "}", "}", "if", "(", "item", ".", "getItemType", "(", ")", ".", "isConsumedOnUse", "(", ")", ")", "{", "if", "(", "removingFromFloor", ")", "{", "Main", ".", "game", ".", "getWorlds", "(", ")", ".", "get", "(", "getWorldLocation", "(", ")", ")", ".", "getCell", "(", "getLocation", "(", ")", ")", ".", "getInventory", "(", ")", ".", "removeItem", "(", "item", ")", ";", "}", "else", "{", "removeItem", "(", "item", ")", ";", "}", "}", "if", "(", "onlyReturnEffects", ")", "{", "return", "item", ".", "applyEffect", "(", "this", ",", "target", ")", ";", "}", "else", "{", "return", "item", ".", "getUseDescription", "(", "this", ",", "target", ")", "+", "item", ".", "applyEffect", "(", "this", ",", "target", ")", ";", "}", "}" ]
Uses the specified item on the specified target.
[ "Uses", "the", "specified", "item", "on", "the", "specified", "target", "." ]
[]
[ { "param": "item", "type": "AbstractItem" }, { "param": "target", "type": "GameCharacter" }, { "param": "removingFromFloor", "type": "boolean" }, { "param": "onlyReturnEffects", "type": "boolean" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "item", "type": "AbstractItem", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "target", "type": "GameCharacter", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "removingFromFloor", "type": "boolean", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "onlyReturnEffects", "type": "boolean", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 514, 999, 1180, 12, 7469, 1180, 761, 16, 14121, 7069, 1018, 16, 1250, 9427, 1265, 42, 5807, 16, 1250, 1338, 990, 29013, 13, 288, 203, 202, 202, 430, 12, 22580, 18, 588, 1595, 3126, 7675, 12298, 12, 1726, 18, 588, 22580, 10756, 597, 353, 12148, 10756, 288, 203, 1082, 202, 430, 12, 6376, 18, 588, 2297, 7675, 1289, 1180, 28851, 12, 1726, 18, 588, 22580, 1435, 3719, 288, 203, 9506, 202, 6376, 18, 13957, 18, 1289, 1133, 12, 2704, 2587, 25548, 664, 2431, 7550, 1845, 1155, 7087, 12, 1726, 18, 588, 22580, 7675, 17994, 12, 5743, 3631, 761, 18, 588, 54, 20498, 7675, 588, 26404, 1435, 3631, 638, 1769, 203, 1082, 202, 97, 203, 202, 202, 97, 203, 1082, 203, 202, 202, 430, 261, 1726, 18, 588, 22580, 7675, 291, 20554, 1398, 3727, 10756, 288, 203, 1082, 202, 430, 12, 2764, 13767, 1265, 42, 5807, 13, 288, 203, 9506, 202, 6376, 18, 13957, 18, 588, 18071, 87, 7675, 588, 12, 588, 18071, 2735, 1435, 2934, 588, 4020, 12, 588, 2735, 1435, 2934, 588, 15059, 7675, 4479, 1180, 12, 1726, 1769, 203, 1082, 202, 97, 469, 288, 203, 9506, 202, 4479, 1180, 12, 1726, 1769, 203, 1082, 202, 97, 203, 202, 202, 97, 203, 1082, 203, 202, 202, 430, 12, 3700, 990, 29013, 13, 288, 203, 1082, 202, 2463, 761, 18, 9010, 12477, 12, 2211, 16, 1018, 1769, 203, 202, 202, 97, 469, 288, 203, 1082, 202, 2463, 761, 18, 588, 3727, 3291, 12, 2211, 16, 1018, 13, 397, 761, 18, 9010, 12477, 12, 2211, 16, 1018, 1769, 203, 202, 202, 97, 203, 1082, 203, 202, 97, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0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1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 202, 380, 14854, 326, 1269, 761, 603, 326, 1269, 1018, 18, 971, 326, 761, 1135, 638, 603, 353, 20554, 1398, 3727, 1435, 745, 16, 333, 761, 353, 3723, 628, 326, 3351, 1807, 13086, 18, 203, 202, 380, 7010, 202, 380, 632, 891, 9427, 1265, 42, 5807, 638, 309, 392, 791, 434, 333, 761, 1410, 506, 12393, 628, 326, 6346, 434, 326, 5091, 326, 3351, 353, 4551, 316, 18, 971, 761, 353, 20554, 1398, 3727, 1435, 1135, 629, 16, 392, 761, 903, 486, 506, 3723, 628, 326, 6346, 18, 203, 202, 380, 632, 2463, 6507, 434, 4121, 17497, 18, 203, 202, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
b6dbfe8d180f63176ccd099eecf5382589701ba8
Jesus-Herself-Nuke-Bait/Akari-addition
src/com/lilithsthrone/game/character/GameCharacter.java
[ "Linux-OpenIB" ]
Java
equipClothingFromInventory
String
public String equipClothingFromInventory(AbstractClothing newClothing, boolean automaticClothingManagement, GameCharacter characterClothingEquipper, GameCharacter fromCharactersInventory) { fromCharactersInventory.removeClothing(newClothing); AbstractClothing clonedClothing = new AbstractClothing(newClothing) {}; boolean wasAbleToEquip = inventory.isAbleToEquip(clonedClothing, true, automaticClothingManagement, this, characterClothingEquipper); // If this item was able to be equipped, and it was equipped, apply its attribute bonuses: if (wasAbleToEquip) { applyEquipClothingEffects(clonedClothing); updateInventoryListeners(); if (isPlayer() && Main.game.isInNewWorld()) { if (Main.getProperties().addClothingDiscovered(clonedClothing.getClothingType())) { Main.game.addEvent(new EventLogEntryEncyclopediaUnlock(clonedClothing.getClothingType().getName(), clonedClothing.getRarity().getColour()), true); } } } else { fromCharactersInventory.addClothing(clonedClothing, false); } return inventory.getEquipDescription(); }
/** * * @param newClothing The clothing to equip to this character. * @param automaticClothingManagement Whether clothing should automatically be shifted/removed in order to equip this clothing. * @param characterClothingEquipper The character who is equipping the clothing to this character. * @param fromCharactersInventory The character who has this clothing in their inventory. * @return Equip description */
@param newClothing The clothing to equip to this character. @param automaticClothingManagement Whether clothing should automatically be shifted/removed in order to equip this clothing. @param characterClothingEquipper The character who is equipping the clothing to this character. @param fromCharactersInventory The character who has this clothing in their inventory. @return Equip description
[ "@param", "newClothing", "The", "clothing", "to", "equip", "to", "this", "character", ".", "@param", "automaticClothingManagement", "Whether", "clothing", "should", "automatically", "be", "shifted", "/", "removed", "in", "order", "to", "equip", "this", "clothing", ".", "@param", "characterClothingEquipper", "The", "character", "who", "is", "equipping", "the", "clothing", "to", "this", "character", ".", "@param", "fromCharactersInventory", "The", "character", "who", "has", "this", "clothing", "in", "their", "inventory", ".", "@return", "Equip", "description" ]
public String equipClothingFromInventory(AbstractClothing newClothing, boolean automaticClothingManagement, GameCharacter characterClothingEquipper, GameCharacter fromCharactersInventory) { fromCharactersInventory.removeClothing(newClothing); AbstractClothing clonedClothing = new AbstractClothing(newClothing) {}; boolean wasAbleToEquip = inventory.isAbleToEquip(clonedClothing, true, automaticClothingManagement, this, characterClothingEquipper); if (wasAbleToEquip) { applyEquipClothingEffects(clonedClothing); updateInventoryListeners(); if (isPlayer() && Main.game.isInNewWorld()) { if (Main.getProperties().addClothingDiscovered(clonedClothing.getClothingType())) { Main.game.addEvent(new EventLogEntryEncyclopediaUnlock(clonedClothing.getClothingType().getName(), clonedClothing.getRarity().getColour()), true); } } } else { fromCharactersInventory.addClothing(clonedClothing, false); } return inventory.getEquipDescription(); }
[ "public", "String", "equipClothingFromInventory", "(", "AbstractClothing", "newClothing", ",", "boolean", "automaticClothingManagement", ",", "GameCharacter", "characterClothingEquipper", ",", "GameCharacter", "fromCharactersInventory", ")", "{", "fromCharactersInventory", ".", "removeClothing", "(", "newClothing", ")", ";", "AbstractClothing", "clonedClothing", "=", "new", "AbstractClothing", "(", "newClothing", ")", "{", "}", ";", "boolean", "wasAbleToEquip", "=", "inventory", ".", "isAbleToEquip", "(", "clonedClothing", ",", "true", ",", "automaticClothingManagement", ",", "this", ",", "characterClothingEquipper", ")", ";", "if", "(", "wasAbleToEquip", ")", "{", "applyEquipClothingEffects", "(", "clonedClothing", ")", ";", "updateInventoryListeners", "(", ")", ";", "if", "(", "isPlayer", "(", ")", "&&", "Main", ".", "game", ".", "isInNewWorld", "(", ")", ")", "{", "if", "(", "Main", ".", "getProperties", "(", ")", ".", "addClothingDiscovered", "(", "clonedClothing", ".", "getClothingType", "(", ")", ")", ")", "{", "Main", ".", "game", ".", "addEvent", "(", "new", "EventLogEntryEncyclopediaUnlock", "(", "clonedClothing", ".", "getClothingType", "(", ")", ".", "getName", "(", ")", ",", "clonedClothing", ".", "getRarity", "(", ")", ".", "getColour", "(", ")", ")", ",", "true", ")", ";", "}", "}", "}", "else", "{", "fromCharactersInventory", ".", "addClothing", "(", "clonedClothing", ",", "false", ")", ";", "}", "return", "inventory", ".", "getEquipDescription", "(", ")", ";", "}" ]
@param newClothing The clothing to equip to this character.
[ "@param", "newClothing", "The", "clothing", "to", "equip", "to", "this", "character", "." ]
[ "// If this item was able to be equipped, and it was equipped, apply its attribute bonuses:" ]
[ { "param": "newClothing", "type": "AbstractClothing" }, { "param": "automaticClothingManagement", "type": "boolean" }, { "param": "characterClothingEquipper", "type": "GameCharacter" }, { "param": "fromCharactersInventory", "type": "GameCharacter" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "newClothing", "type": "AbstractClothing", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "automaticClothingManagement", "type": "boolean", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "characterClothingEquipper", "type": "GameCharacter", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "fromCharactersInventory", "type": "GameCharacter", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 514, 1298, 625, 2009, 352, 4018, 1265, 15059, 12, 7469, 2009, 352, 4018, 394, 2009, 352, 4018, 16, 1250, 5859, 2009, 352, 4018, 10998, 16, 14121, 7069, 3351, 2009, 352, 4018, 13142, 625, 457, 16, 14121, 7069, 628, 11600, 15059, 13, 288, 203, 202, 202, 2080, 11600, 15059, 18, 4479, 2009, 352, 4018, 12, 2704, 2009, 352, 4018, 1769, 203, 1082, 203, 202, 202, 7469, 2009, 352, 4018, 13027, 2009, 352, 4018, 273, 394, 4115, 2009, 352, 4018, 12, 2704, 2009, 352, 4018, 13, 2618, 31, 203, 1082, 203, 202, 202, 6494, 1703, 5895, 298, 774, 13142, 625, 273, 13086, 18, 291, 5895, 298, 774, 13142, 625, 12, 830, 8184, 2009, 352, 4018, 16, 638, 16, 5859, 2009, 352, 4018, 10998, 16, 333, 16, 3351, 2009, 352, 4018, 13142, 625, 457, 1769, 203, 203, 202, 202, 759, 971, 333, 761, 1703, 7752, 358, 506, 1298, 625, 1845, 16, 471, 518, 1703, 1298, 625, 1845, 16, 2230, 2097, 1566, 324, 265, 6117, 30, 203, 202, 202, 430, 261, 17416, 5895, 298, 774, 13142, 625, 13, 288, 203, 1082, 202, 9010, 13142, 625, 2009, 352, 4018, 29013, 12, 830, 8184, 2009, 352, 4018, 1769, 203, 9506, 203, 1082, 202, 2725, 15059, 5583, 5621, 203, 203, 1082, 202, 430, 261, 291, 12148, 1435, 597, 12740, 18, 13957, 18, 291, 382, 1908, 18071, 10756, 288, 203, 9506, 202, 430, 261, 6376, 18, 588, 2297, 7675, 1289, 2009, 352, 4018, 28851, 12, 830, 8184, 2009, 352, 4018, 18, 588, 2009, 352, 4018, 559, 1435, 3719, 288, 203, 6862, 202, 6376, 18, 13957, 18, 1289, 1133, 12, 2704, 2587, 25548, 664, 2431, 7550, 1845, 1155, 7087, 12, 830, 8184, 2009, 352, 4018, 18, 588, 2009, 352, 4018, 559, 7675, 17994, 9334, 13027, 2009, 352, 4018, 18, 588, 54, 20498, 7675, 588, 26404, 1435, 3631, 638, 1769, 203, 9506, 202, 97, 203, 1082, 202, 97, 203, 9506, 203, 202, 202, 97, 469, 288, 203, 1082, 202, 2080, 11600, 15059, 18, 1289, 2009, 352, 4018, 12, 830, 8184, 2009, 352, 4018, 16, 629, 1769, 203, 202, 202, 97, 203, 203, 202, 202, 2463, 13086, 18, 588, 13142, 625, 3291, 5621, 203, 202, 97, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0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14923, 316, 1353, 358, 1298, 625, 333, 927, 352, 4018, 18, 203, 202, 380, 632, 891, 3351, 2009, 352, 4018, 13142, 625, 457, 1021, 3351, 10354, 353, 1298, 6771, 326, 927, 352, 4018, 358, 333, 3351, 18, 203, 202, 380, 632, 891, 628, 11600, 15059, 1021, 3351, 10354, 711, 333, 927, 352, 4018, 316, 3675, 13086, 18, 203, 202, 380, 632, 2463, 19008, 625, 2477, 203, 202, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
b6dbfe8d180f63176ccd099eecf5382589701ba8
Jesus-Herself-Nuke-Bait/Akari-addition
src/com/lilithsthrone/game/character/GameCharacter.java
[ "Linux-OpenIB" ]
Java
equipClothingOverride
null
public void equipClothingOverride(AbstractClothing newClothing, boolean replaceClothing, boolean removeFromInventoryOrFloor) { List<InventorySlot> slotsToClear = new ArrayList<>(); slotsToClear.add(newClothing.getClothingType().getSlot()); slotsToClear.addAll(newClothing.getClothingType().getIncompatibleSlots(this)); for(InventorySlot slot : slotsToClear) { AbstractClothing clothing = this.getClothingInSlot(slot); if(clothing!=null) { if(!replaceClothing) { return; } this.forceUnequipClothingIntoVoid(this, clothing); this.addClothing(clothing, false); } } inventory.getClothingCurrentlyEquipped().add(newClothing); applyEquipClothingEffects(newClothing); if(removeFromInventoryOrFloor) { this.removeClothing(newClothing); Main.game.getWorlds().get(getWorldLocation()).getCell(getLocation()).getInventory().removeClothing(newClothing); } updateInventoryListeners(); }
/** * Overrides all clothing equip checks, making sure that this piece of clothing is equipped, no matter what. Should only be used in exceptional circumstances. * @param newClothing */
Overrides all clothing equip checks, making sure that this piece of clothing is equipped, no matter what. Should only be used in exceptional circumstances. @param newClothing
[ "Overrides", "all", "clothing", "equip", "checks", "making", "sure", "that", "this", "piece", "of", "clothing", "is", "equipped", "no", "matter", "what", ".", "Should", "only", "be", "used", "in", "exceptional", "circumstances", ".", "@param", "newClothing" ]
public void equipClothingOverride(AbstractClothing newClothing, boolean replaceClothing, boolean removeFromInventoryOrFloor) { List<InventorySlot> slotsToClear = new ArrayList<>(); slotsToClear.add(newClothing.getClothingType().getSlot()); slotsToClear.addAll(newClothing.getClothingType().getIncompatibleSlots(this)); for(InventorySlot slot : slotsToClear) { AbstractClothing clothing = this.getClothingInSlot(slot); if(clothing!=null) { if(!replaceClothing) { return; } this.forceUnequipClothingIntoVoid(this, clothing); this.addClothing(clothing, false); } } inventory.getClothingCurrentlyEquipped().add(newClothing); applyEquipClothingEffects(newClothing); if(removeFromInventoryOrFloor) { this.removeClothing(newClothing); Main.game.getWorlds().get(getWorldLocation()).getCell(getLocation()).getInventory().removeClothing(newClothing); } updateInventoryListeners(); }
[ "public", "void", "equipClothingOverride", "(", "AbstractClothing", "newClothing", ",", "boolean", "replaceClothing", ",", "boolean", "removeFromInventoryOrFloor", ")", "{", "List", "<", "InventorySlot", ">", "slotsToClear", "=", "new", "ArrayList", "<", ">", "(", ")", ";", "slotsToClear", ".", "add", "(", "newClothing", ".", "getClothingType", "(", ")", ".", "getSlot", "(", ")", ")", ";", "slotsToClear", ".", "addAll", "(", "newClothing", ".", "getClothingType", "(", ")", ".", "getIncompatibleSlots", "(", "this", ")", ")", ";", "for", "(", "InventorySlot", "slot", ":", "slotsToClear", ")", "{", "AbstractClothing", "clothing", "=", "this", ".", "getClothingInSlot", "(", "slot", ")", ";", "if", "(", "clothing", "!=", "null", ")", "{", "if", "(", "!", "replaceClothing", ")", "{", "return", ";", "}", "this", ".", "forceUnequipClothingIntoVoid", "(", "this", ",", "clothing", ")", ";", "this", ".", "addClothing", "(", "clothing", ",", "false", ")", ";", "}", "}", "inventory", ".", "getClothingCurrentlyEquipped", "(", ")", ".", "add", "(", "newClothing", ")", ";", "applyEquipClothingEffects", "(", "newClothing", ")", ";", "if", "(", "removeFromInventoryOrFloor", ")", "{", "this", ".", "removeClothing", "(", "newClothing", ")", ";", "Main", ".", "game", ".", "getWorlds", "(", ")", ".", "get", "(", "getWorldLocation", "(", ")", ")", ".", "getCell", "(", "getLocation", "(", ")", ")", ".", "getInventory", "(", ")", ".", "removeClothing", "(", "newClothing", ")", ";", "}", "updateInventoryListeners", "(", ")", ";", "}" ]
Overrides all clothing equip checks, making sure that this piece of clothing is equipped, no matter what.
[ "Overrides", "all", "clothing", "equip", "checks", "making", "sure", "that", "this", "piece", "of", "clothing", "is", "equipped", "no", "matter", "what", "." ]
[]
[ { "param": "newClothing", "type": "AbstractClothing" }, { "param": "replaceClothing", "type": "boolean" }, { "param": "removeFromInventoryOrFloor", "type": "boolean" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "newClothing", "type": "AbstractClothing", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "replaceClothing", "type": "boolean", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "removeFromInventoryOrFloor", "type": "boolean", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 918, 1298, 625, 2009, 352, 4018, 6618, 12, 7469, 2009, 352, 4018, 394, 2009, 352, 4018, 16, 1250, 1453, 2009, 352, 4018, 16, 1250, 22386, 15059, 1162, 42, 5807, 13, 288, 203, 202, 202, 682, 32, 15059, 8764, 34, 4694, 11634, 9094, 273, 394, 2407, 29667, 5621, 203, 202, 202, 18875, 774, 9094, 18, 1289, 12, 2704, 2009, 352, 4018, 18, 588, 2009, 352, 4018, 559, 7675, 588, 8764, 10663, 203, 202, 202, 18875, 774, 9094, 18, 1289, 1595, 12, 2704, 2009, 352, 4018, 18, 588, 2009, 352, 4018, 559, 7675, 588, 24272, 16266, 12, 2211, 10019, 203, 1082, 203, 202, 202, 1884, 12, 15059, 8764, 4694, 294, 4694, 11634, 9094, 13, 288, 203, 1082, 202, 7469, 2009, 352, 4018, 927, 352, 4018, 273, 333, 18, 588, 2009, 352, 4018, 382, 8764, 12, 14194, 1769, 203, 1082, 202, 430, 12, 830, 352, 4018, 5, 33, 2011, 13, 288, 203, 9506, 202, 430, 12, 5, 2079, 2009, 352, 4018, 13, 288, 203, 6862, 202, 2463, 31, 203, 9506, 202, 97, 203, 9506, 202, 2211, 18, 5734, 984, 14298, 625, 2009, 352, 4018, 5952, 19038, 12, 2211, 16, 927, 352, 4018, 1769, 203, 9506, 202, 2211, 18, 1289, 2009, 352, 4018, 12, 830, 352, 4018, 16, 629, 1769, 203, 1082, 202, 97, 203, 202, 202, 97, 203, 1082, 203, 202, 202, 26024, 18, 588, 2009, 352, 4018, 3935, 715, 13142, 625, 1845, 7675, 1289, 12, 2704, 2009, 352, 4018, 1769, 203, 1082, 203, 202, 202, 9010, 13142, 625, 2009, 352, 4018, 29013, 12, 2704, 2009, 352, 4018, 1769, 203, 1082, 203, 202, 202, 430, 12, 4479, 1265, 15059, 1162, 42, 5807, 13, 288, 203, 1082, 202, 2211, 18, 4479, 2009, 352, 4018, 12, 2704, 2009, 352, 4018, 1769, 203, 1082, 202, 6376, 18, 13957, 18, 588, 18071, 87, 7675, 588, 12, 588, 18071, 2735, 1435, 2934, 588, 4020, 12, 588, 2735, 1435, 2934, 588, 15059, 7675, 4479, 2009, 352, 4018, 12, 2704, 2009, 352, 4018, 1769, 203, 202, 202, 97, 203, 202, 202, 2725, 15059, 5583, 5621, 203, 202, 97, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 202, 380, 531, 9857, 777, 927, 352, 4018, 1298, 625, 4271, 16, 10480, 3071, 716, 333, 11151, 434, 927, 352, 4018, 353, 1298, 625, 1845, 16, 1158, 15177, 4121, 18, 9363, 1338, 506, 1399, 316, 1520, 287, 29951, 2639, 18, 203, 202, 380, 632, 891, 394, 2009, 352, 4018, 203, 202, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
b6dbfe8d180f63176ccd099eecf5382589701ba8
Jesus-Herself-Nuke-Bait/Akari-addition
src/com/lilithsthrone/game/character/GameCharacter.java
[ "Linux-OpenIB" ]
Java
unequipAllClothing
null
public List<AbstractClothing> unequipAllClothing(GameCharacter remover, boolean removeSeals) { unequipAllClothingSB.setLength(0); List<AbstractClothing> clothingEquipped = new ArrayList<>(this.getClothingCurrentlyEquipped()); List<AbstractClothing> clothingRemoved = new ArrayList<>(); clothingEquipped.sort((c1, c2) -> c1.getClothingType().getSlot().getZLayer() - c2.getClothingType().getSlot().getZLayer()); if(removeSeals) { for(AbstractClothing clothing : clothingEquipped) { clothing.setSealed(false); } } for(AbstractClothing clothing : clothingEquipped) { if(this.isAbleToUnequip(clothing, true, remover)) { clothingRemoved.add(clothing); unequipAllClothingSB.append(this.unequipClothingIntoVoid(clothing, true, remover)); } } return clothingRemoved; }
/** * <b>Note:</b> You can get the generated description of this action by calling:<br/> * <i>getUnequipAllClothingDescription()</i> * @param remover The character who is removing the clothing. * @return A list containing all of the clothing that was unequipped. */
Note: You can get the generated description of this action by calling: getUnequipAllClothingDescription() @param remover The character who is removing the clothing. @return A list containing all of the clothing that was unequipped.
[ "Note", ":", "You", "can", "get", "the", "generated", "description", "of", "this", "action", "by", "calling", ":", "getUnequipAllClothingDescription", "()", "@param", "remover", "The", "character", "who", "is", "removing", "the", "clothing", ".", "@return", "A", "list", "containing", "all", "of", "the", "clothing", "that", "was", "unequipped", "." ]
public List<AbstractClothing> unequipAllClothing(GameCharacter remover, boolean removeSeals) { unequipAllClothingSB.setLength(0); List<AbstractClothing> clothingEquipped = new ArrayList<>(this.getClothingCurrentlyEquipped()); List<AbstractClothing> clothingRemoved = new ArrayList<>(); clothingEquipped.sort((c1, c2) -> c1.getClothingType().getSlot().getZLayer() - c2.getClothingType().getSlot().getZLayer()); if(removeSeals) { for(AbstractClothing clothing : clothingEquipped) { clothing.setSealed(false); } } for(AbstractClothing clothing : clothingEquipped) { if(this.isAbleToUnequip(clothing, true, remover)) { clothingRemoved.add(clothing); unequipAllClothingSB.append(this.unequipClothingIntoVoid(clothing, true, remover)); } } return clothingRemoved; }
[ "public", "List", "<", "AbstractClothing", ">", "unequipAllClothing", "(", "GameCharacter", "remover", ",", "boolean", "removeSeals", ")", "{", "unequipAllClothingSB", ".", "setLength", "(", "0", ")", ";", "List", "<", "AbstractClothing", ">", "clothingEquipped", "=", "new", "ArrayList", "<", ">", "(", "this", ".", "getClothingCurrentlyEquipped", "(", ")", ")", ";", "List", "<", "AbstractClothing", ">", "clothingRemoved", "=", "new", "ArrayList", "<", ">", "(", ")", ";", "clothingEquipped", ".", "sort", "(", "(", "c1", ",", "c2", ")", "->", "c1", ".", "getClothingType", "(", ")", ".", "getSlot", "(", ")", ".", "getZLayer", "(", ")", "-", "c2", ".", "getClothingType", "(", ")", ".", "getSlot", "(", ")", ".", "getZLayer", "(", ")", ")", ";", "if", "(", "removeSeals", ")", "{", "for", "(", "AbstractClothing", "clothing", ":", "clothingEquipped", ")", "{", "clothing", ".", "setSealed", "(", "false", ")", ";", "}", "}", "for", "(", "AbstractClothing", "clothing", ":", "clothingEquipped", ")", "{", "if", "(", "this", ".", "isAbleToUnequip", "(", "clothing", ",", "true", ",", "remover", ")", ")", "{", "clothingRemoved", ".", "add", "(", "clothing", ")", ";", "unequipAllClothingSB", ".", "append", "(", "this", ".", "unequipClothingIntoVoid", "(", "clothing", ",", "true", ",", "remover", ")", ")", ";", "}", "}", "return", "clothingRemoved", ";", "}" ]
<b>Note:</b> You can get the generated description of this action by calling:<br/> <i>getUnequipAllClothingDescription()</i> @param remover The character who is removing the clothing.
[ "<b", ">", "Note", ":", "<", "/", "b", ">", "You", "can", "get", "the", "generated", "description", "of", "this", "action", "by", "calling", ":", "<br", "/", ">", "<i", ">", "getUnequipAllClothingDescription", "()", "<", "/", "i", ">", "@param", "remover", "The", "character", "who", "is", "removing", "the", "clothing", "." ]
[]
[ { "param": "remover", "type": "GameCharacter" }, { "param": "removeSeals", "type": "boolean" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "remover", "type": "GameCharacter", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "removeSeals", "type": "boolean", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 987, 32, 7469, 2009, 352, 4018, 34, 640, 14298, 625, 1595, 2009, 352, 4018, 12, 12496, 7069, 849, 1643, 16, 1250, 1206, 1761, 1031, 13, 288, 203, 202, 202, 7556, 372, 625, 1595, 2009, 352, 4018, 14541, 18, 542, 1782, 12, 20, 1769, 203, 202, 202, 682, 32, 7469, 2009, 352, 4018, 34, 927, 352, 4018, 13142, 625, 1845, 273, 394, 2407, 29667, 12, 2211, 18, 588, 2009, 352, 4018, 3935, 715, 13142, 625, 1845, 10663, 203, 202, 202, 682, 32, 7469, 2009, 352, 4018, 34, 927, 352, 4018, 10026, 273, 394, 2407, 29667, 5621, 203, 1082, 203, 202, 202, 830, 352, 4018, 13142, 625, 1845, 18, 3804, 12443, 71, 21, 16, 276, 22, 13, 317, 276, 21, 18, 588, 2009, 352, 4018, 559, 7675, 588, 8764, 7675, 588, 62, 4576, 1435, 300, 276, 22, 18, 588, 2009, 352, 4018, 559, 7675, 588, 8764, 7675, 588, 62, 4576, 10663, 203, 1082, 203, 202, 202, 430, 12, 4479, 1761, 1031, 13, 288, 203, 1082, 202, 1884, 12, 7469, 2009, 352, 4018, 927, 352, 4018, 294, 927, 352, 4018, 13142, 625, 1845, 13, 288, 203, 9506, 202, 830, 352, 4018, 18, 542, 1761, 18931, 12, 5743, 1769, 203, 1082, 202, 97, 203, 202, 202, 97, 203, 1082, 203, 202, 202, 1884, 12, 7469, 2009, 352, 4018, 927, 352, 4018, 294, 927, 352, 4018, 13142, 625, 1845, 13, 288, 203, 1082, 202, 430, 12, 2211, 18, 291, 5895, 298, 774, 984, 14298, 625, 12, 830, 352, 4018, 16, 638, 16, 849, 1643, 3719, 288, 203, 9506, 202, 830, 352, 4018, 10026, 18, 1289, 12, 830, 352, 4018, 1769, 203, 9506, 202, 7556, 372, 625, 1595, 2009, 352, 4018, 14541, 18, 6923, 12, 2211, 18, 7556, 372, 625, 2009, 352, 4018, 5952, 19038, 12, 830, 352, 4018, 16, 638, 16, 849, 1643, 10019, 203, 1082, 202, 97, 203, 202, 202, 97, 203, 1082, 203, 202, 202, 2463, 927, 352, 4018, 10026, 31, 203, 202, 97, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 202, 380, 411, 70, 34, 8067, 19814, 70, 34, 4554, 848, 336, 326, 4374, 2477, 434, 333, 1301, 635, 4440, 22292, 2848, 21259, 203, 202, 380, 411, 77, 34, 588, 984, 14298, 625, 1595, 2009, 352, 4018, 3291, 1435, 1757, 77, 34, 203, 202, 380, 632, 891, 849, 1643, 1021, 3351, 10354, 353, 9427, 326, 927, 352, 4018, 18, 203, 202, 380, 632, 2463, 432, 666, 4191, 777, 434, 326, 927, 352, 4018, 716, 1703, 640, 14298, 625, 1845, 18, 203, 202, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
b6dbfe8d180f63176ccd099eecf5382589701ba8
Jesus-Herself-Nuke-Bait/Akari-addition
src/com/lilithsthrone/game/character/GameCharacter.java
[ "Linux-OpenIB" ]
Java
isAbleToBeDisplaced
null
public boolean isAbleToBeDisplaced(AbstractClothing clothing, DisplacementType dt, boolean displaceIfAble, boolean automaticClothingManagement, GameCharacter characterClothingDisplacer) { boolean unknownPenis = !this.isAreaKnownByCharacter(CoverableArea.PENIS, Main.game.getPlayer()) && !this.isCoverableAreaVisible(CoverableArea.PENIS); boolean unknownBreasts = !this.isAreaKnownByCharacter(CoverableArea.BREASTS, Main.game.getPlayer()) && !this.isCoverableAreaVisible(CoverableArea.BREASTS); boolean unknownBreastsCrotch = !this.isAreaKnownByCharacter(CoverableArea.BREASTS_CROTCH, Main.game.getPlayer()) && !this.isCoverableAreaVisible(CoverableArea.BREASTS_CROTCH); boolean unknownVagina = !this.isAreaKnownByCharacter(CoverableArea.VAGINA, Main.game.getPlayer()) && !this.isCoverableAreaVisible(CoverableArea.VAGINA); boolean unknownAss = !this.isAreaKnownByCharacter(CoverableArea.ANUS, Main.game.getPlayer()) && !this.isCoverableAreaVisible(CoverableArea.ANUS); boolean wasAbleToDisplace = inventory.isAbleToBeDisplaced(clothing, dt, displaceIfAble, automaticClothingManagement, this, characterClothingDisplacer); // If this item was able to be displaced, and it was displaced, apply // exposed effects: if (wasAbleToDisplace && displaceIfAble) { updateInventoryListeners(); } if(!this.isPlayer() && (Main.game.getCharactersPresent().contains(this) || (this.isSlave() && this.getOwner().isPlayer()))) { for(CoverableArea ca : CoverableArea.values()) { if(this.isCoverableAreaVisible(ca) && ca!=CoverableArea.MOUTH) { this.setAreaKnownByCharacter(ca, Main.game.getPlayer(), true); } } if(!Main.game.isInSex()) { inventory.appendToDisplaceDescription( (unknownBreasts && this.isCoverableAreaVisible(CoverableArea.BREASTS) ?"<p>" + UtilText.parse(this, this.getBreastDescription()) + "</p>" + characterClothingDisplacer.getBreastsRevealDescription(this, Util.newArrayListOfValues(characterClothingDisplacer)) :"") + (unknownBreastsCrotch && this.isCoverableAreaVisible(CoverableArea.BREASTS_CROTCH) && this.hasBreastsCrotch() ?"<p>" + UtilText.parse(this, this.getBreastCrotchDescription()) + "</p>" + characterClothingDisplacer.getBreastsCrotchRevealDescription(this, Util.newArrayListOfValues(characterClothingDisplacer)) :"") + (unknownAss && this.isCoverableAreaVisible(CoverableArea.ANUS) ?"<p>" + UtilText.parse(this, this.getAssDescription(true)) + "</p>" + characterClothingDisplacer.getAssRevealDescription(this, Util.newArrayListOfValues(characterClothingDisplacer), true) :"") + (unknownPenis && this.isCoverableAreaVisible(CoverableArea.PENIS) && this.hasPenis() ?"<p>" + UtilText.parse(this, this.getPenisDescription()) + "</p>" + characterClothingDisplacer.getPenisRevealDescription(this, Util.newArrayListOfValues(characterClothingDisplacer)) :"") + (unknownVagina && this.isCoverableAreaVisible(CoverableArea.VAGINA) && this.hasVagina() ?"<p>" + UtilText.parse(this, this.getVaginaDescription()) + "</p>" + characterClothingDisplacer.getVaginaRevealDescription(this, Util.newArrayListOfValues(characterClothingDisplacer)) :"") + ((unknownPenis || unknownVagina) && this.isCoverableAreaVisible(CoverableArea.VAGINA) && this.isCoverableAreaVisible(CoverableArea.PENIS) && !this.hasVagina()&& !this.hasPenis() ?"<p>" + UtilText.parse(this, this.getMoundDescription()) + "</p>" + characterClothingDisplacer.getMoundRevealDescription(this, Util.newArrayListOfValues(characterClothingDisplacer)) :"")); } } return wasAbleToDisplace; }
/** * <b>Warning:</b> Passing in a DisplacementType that isn't present for the passed in clothing *might* throw a null pointer exception... * * @param clothing The clothing that is to be checked for displacement. * @param dt The type of displacement to perform upon this clothing. * @param displaceIfAble If true, the clothing will be displaced (if it's able to be displaced). If false, this method can just be used as a boolean check to see if it's able to be displaced without actually displacing it. * @param automaticClothingManagement If true, other clothing will be moved aside to get access to the clothing that needs to be displaced. If false, then if other clothing is blocking this clothing from being displaced, this method will return false. * @param characterClothingDisplacer The character who is performing the displacement action. * @return True if the clothing can be displaced, false if it can't/ */
Warning: Passing in a DisplacementType that isn't present for the passed in clothing *might* throw a null pointer exception @param clothing The clothing that is to be checked for displacement. @param dt The type of displacement to perform upon this clothing. @param displaceIfAble If true, the clothing will be displaced (if it's able to be displaced). If false, this method can just be used as a boolean check to see if it's able to be displaced without actually displacing it. @param automaticClothingManagement If true, other clothing will be moved aside to get access to the clothing that needs to be displaced. If false, then if other clothing is blocking this clothing from being displaced, this method will return false. @param characterClothingDisplacer The character who is performing the displacement action. @return True if the clothing can be displaced, false if it can't
[ "Warning", ":", "Passing", "in", "a", "DisplacementType", "that", "isn", "'", "t", "present", "for", "the", "passed", "in", "clothing", "*", "might", "*", "throw", "a", "null", "pointer", "exception", "@param", "clothing", "The", "clothing", "that", "is", "to", "be", "checked", "for", "displacement", ".", "@param", "dt", "The", "type", "of", "displacement", "to", "perform", "upon", "this", "clothing", ".", "@param", "displaceIfAble", "If", "true", "the", "clothing", "will", "be", "displaced", "(", "if", "it", "'", "s", "able", "to", "be", "displaced", ")", ".", "If", "false", "this", "method", "can", "just", "be", "used", "as", "a", "boolean", "check", "to", "see", "if", "it", "'", "s", "able", "to", "be", "displaced", "without", "actually", "displacing", "it", ".", "@param", "automaticClothingManagement", "If", "true", "other", "clothing", "will", "be", "moved", "aside", "to", "get", "access", "to", "the", "clothing", "that", "needs", "to", "be", "displaced", ".", "If", "false", "then", "if", "other", "clothing", "is", "blocking", "this", "clothing", "from", "being", "displaced", "this", "method", "will", "return", "false", ".", "@param", "characterClothingDisplacer", "The", "character", "who", "is", "performing", "the", "displacement", "action", ".", "@return", "True", "if", "the", "clothing", "can", "be", "displaced", "false", "if", "it", "can", "'", "t" ]
public boolean isAbleToBeDisplaced(AbstractClothing clothing, DisplacementType dt, boolean displaceIfAble, boolean automaticClothingManagement, GameCharacter characterClothingDisplacer) { boolean unknownPenis = !this.isAreaKnownByCharacter(CoverableArea.PENIS, Main.game.getPlayer()) && !this.isCoverableAreaVisible(CoverableArea.PENIS); boolean unknownBreasts = !this.isAreaKnownByCharacter(CoverableArea.BREASTS, Main.game.getPlayer()) && !this.isCoverableAreaVisible(CoverableArea.BREASTS); boolean unknownBreastsCrotch = !this.isAreaKnownByCharacter(CoverableArea.BREASTS_CROTCH, Main.game.getPlayer()) && !this.isCoverableAreaVisible(CoverableArea.BREASTS_CROTCH); boolean unknownVagina = !this.isAreaKnownByCharacter(CoverableArea.VAGINA, Main.game.getPlayer()) && !this.isCoverableAreaVisible(CoverableArea.VAGINA); boolean unknownAss = !this.isAreaKnownByCharacter(CoverableArea.ANUS, Main.game.getPlayer()) && !this.isCoverableAreaVisible(CoverableArea.ANUS); boolean wasAbleToDisplace = inventory.isAbleToBeDisplaced(clothing, dt, displaceIfAble, automaticClothingManagement, this, characterClothingDisplacer); if (wasAbleToDisplace && displaceIfAble) { updateInventoryListeners(); } if(!this.isPlayer() && (Main.game.getCharactersPresent().contains(this) || (this.isSlave() && this.getOwner().isPlayer()))) { for(CoverableArea ca : CoverableArea.values()) { if(this.isCoverableAreaVisible(ca) && ca!=CoverableArea.MOUTH) { this.setAreaKnownByCharacter(ca, Main.game.getPlayer(), true); } } if(!Main.game.isInSex()) { inventory.appendToDisplaceDescription( (unknownBreasts && this.isCoverableAreaVisible(CoverableArea.BREASTS) ?"<p>" + UtilText.parse(this, this.getBreastDescription()) + "</p>" + characterClothingDisplacer.getBreastsRevealDescription(this, Util.newArrayListOfValues(characterClothingDisplacer)) :"") + (unknownBreastsCrotch && this.isCoverableAreaVisible(CoverableArea.BREASTS_CROTCH) && this.hasBreastsCrotch() ?"<p>" + UtilText.parse(this, this.getBreastCrotchDescription()) + "</p>" + characterClothingDisplacer.getBreastsCrotchRevealDescription(this, Util.newArrayListOfValues(characterClothingDisplacer)) :"") + (unknownAss && this.isCoverableAreaVisible(CoverableArea.ANUS) ?"<p>" + UtilText.parse(this, this.getAssDescription(true)) + "</p>" + characterClothingDisplacer.getAssRevealDescription(this, Util.newArrayListOfValues(characterClothingDisplacer), true) :"") + (unknownPenis && this.isCoverableAreaVisible(CoverableArea.PENIS) && this.hasPenis() ?"<p>" + UtilText.parse(this, this.getPenisDescription()) + "</p>" + characterClothingDisplacer.getPenisRevealDescription(this, Util.newArrayListOfValues(characterClothingDisplacer)) :"") + (unknownVagina && this.isCoverableAreaVisible(CoverableArea.VAGINA) && this.hasVagina() ?"<p>" + UtilText.parse(this, this.getVaginaDescription()) + "</p>" + characterClothingDisplacer.getVaginaRevealDescription(this, Util.newArrayListOfValues(characterClothingDisplacer)) :"") + ((unknownPenis || unknownVagina) && this.isCoverableAreaVisible(CoverableArea.VAGINA) && this.isCoverableAreaVisible(CoverableArea.PENIS) && !this.hasVagina()&& !this.hasPenis() ?"<p>" + UtilText.parse(this, this.getMoundDescription()) + "</p>" + characterClothingDisplacer.getMoundRevealDescription(this, Util.newArrayListOfValues(characterClothingDisplacer)) :"")); } } return wasAbleToDisplace; }
[ "public", "boolean", "isAbleToBeDisplaced", "(", "AbstractClothing", "clothing", ",", "DisplacementType", "dt", ",", "boolean", "displaceIfAble", ",", "boolean", "automaticClothingManagement", ",", "GameCharacter", "characterClothingDisplacer", ")", "{", "boolean", "unknownPenis", "=", "!", "this", ".", "isAreaKnownByCharacter", "(", "CoverableArea", ".", "PENIS", ",", "Main", ".", "game", ".", "getPlayer", "(", ")", ")", "&&", "!", "this", ".", "isCoverableAreaVisible", "(", "CoverableArea", ".", "PENIS", ")", ";", "boolean", "unknownBreasts", "=", "!", "this", ".", "isAreaKnownByCharacter", "(", "CoverableArea", ".", "BREASTS", ",", "Main", ".", "game", ".", "getPlayer", "(", ")", ")", "&&", "!", "this", ".", "isCoverableAreaVisible", "(", "CoverableArea", ".", "BREASTS", ")", ";", "boolean", "unknownBreastsCrotch", "=", "!", "this", ".", "isAreaKnownByCharacter", "(", "CoverableArea", ".", "BREASTS_CROTCH", ",", "Main", ".", "game", ".", "getPlayer", "(", ")", ")", "&&", "!", "this", ".", "isCoverableAreaVisible", "(", "CoverableArea", ".", "BREASTS_CROTCH", ")", ";", "boolean", "unknownVagina", "=", "!", "this", ".", "isAreaKnownByCharacter", "(", "CoverableArea", ".", "VAGINA", ",", "Main", ".", "game", ".", "getPlayer", "(", ")", ")", "&&", "!", "this", ".", "isCoverableAreaVisible", "(", "CoverableArea", ".", "VAGINA", ")", ";", "boolean", "unknownAss", "=", "!", "this", ".", "isAreaKnownByCharacter", "(", "CoverableArea", ".", "ANUS", ",", "Main", ".", "game", ".", "getPlayer", "(", ")", ")", "&&", "!", "this", ".", "isCoverableAreaVisible", "(", "CoverableArea", ".", "ANUS", ")", ";", "boolean", "wasAbleToDisplace", "=", "inventory", ".", "isAbleToBeDisplaced", "(", "clothing", ",", "dt", ",", "displaceIfAble", ",", "automaticClothingManagement", ",", "this", ",", "characterClothingDisplacer", ")", ";", "if", "(", "wasAbleToDisplace", "&&", "displaceIfAble", ")", "{", "updateInventoryListeners", "(", ")", ";", "}", "if", "(", "!", "this", ".", "isPlayer", "(", ")", "&&", "(", "Main", ".", "game", ".", "getCharactersPresent", "(", ")", ".", "contains", "(", "this", ")", "||", "(", "this", ".", "isSlave", "(", ")", "&&", "this", ".", "getOwner", "(", ")", ".", "isPlayer", "(", ")", ")", ")", ")", "{", "for", "(", "CoverableArea", "ca", ":", "CoverableArea", ".", "values", "(", ")", ")", "{", "if", "(", "this", ".", "isCoverableAreaVisible", "(", "ca", ")", "&&", "ca", "!=", "CoverableArea", ".", "MOUTH", ")", "{", "this", ".", "setAreaKnownByCharacter", "(", "ca", ",", "Main", ".", "game", ".", "getPlayer", "(", ")", ",", "true", ")", ";", "}", "}", "if", "(", "!", "Main", ".", "game", ".", "isInSex", "(", ")", ")", "{", "inventory", ".", "appendToDisplaceDescription", "(", "(", "unknownBreasts", "&&", "this", ".", "isCoverableAreaVisible", "(", "CoverableArea", ".", "BREASTS", ")", "?", "\"<p>\"", "+", "UtilText", ".", "parse", "(", "this", ",", "this", ".", "getBreastDescription", "(", ")", ")", "+", "\"</p>\"", "+", "characterClothingDisplacer", ".", "getBreastsRevealDescription", "(", "this", ",", "Util", ".", "newArrayListOfValues", "(", "characterClothingDisplacer", ")", ")", ":", "\"\"", ")", "+", "(", "unknownBreastsCrotch", "&&", "this", ".", "isCoverableAreaVisible", "(", "CoverableArea", ".", "BREASTS_CROTCH", ")", "&&", "this", ".", "hasBreastsCrotch", "(", ")", "?", "\"<p>\"", "+", "UtilText", ".", "parse", "(", "this", ",", "this", ".", "getBreastCrotchDescription", "(", ")", ")", "+", "\"</p>\"", "+", "characterClothingDisplacer", ".", "getBreastsCrotchRevealDescription", "(", "this", ",", "Util", ".", "newArrayListOfValues", "(", "characterClothingDisplacer", ")", ")", ":", "\"\"", ")", "+", "(", "unknownAss", "&&", "this", ".", "isCoverableAreaVisible", "(", "CoverableArea", ".", "ANUS", ")", "?", "\"<p>\"", "+", "UtilText", ".", "parse", "(", "this", ",", "this", ".", "getAssDescription", "(", "true", ")", ")", "+", "\"</p>\"", "+", "characterClothingDisplacer", ".", "getAssRevealDescription", "(", "this", ",", "Util", ".", "newArrayListOfValues", "(", "characterClothingDisplacer", ")", ",", "true", ")", ":", "\"\"", ")", "+", "(", "unknownPenis", "&&", "this", ".", "isCoverableAreaVisible", "(", "CoverableArea", ".", "PENIS", ")", "&&", "this", ".", "hasPenis", "(", ")", "?", "\"<p>\"", "+", "UtilText", ".", "parse", "(", "this", ",", "this", ".", "getPenisDescription", "(", ")", ")", "+", "\"</p>\"", "+", "characterClothingDisplacer", ".", "getPenisRevealDescription", "(", "this", ",", "Util", ".", "newArrayListOfValues", "(", "characterClothingDisplacer", ")", ")", ":", "\"\"", ")", "+", "(", "unknownVagina", "&&", "this", ".", "isCoverableAreaVisible", "(", "CoverableArea", ".", "VAGINA", ")", "&&", "this", ".", "hasVagina", "(", ")", "?", "\"<p>\"", "+", "UtilText", ".", "parse", "(", "this", ",", "this", ".", "getVaginaDescription", "(", ")", ")", "+", "\"</p>\"", "+", "characterClothingDisplacer", ".", "getVaginaRevealDescription", "(", "this", ",", "Util", ".", "newArrayListOfValues", "(", "characterClothingDisplacer", ")", ")", ":", "\"\"", ")", "+", "(", "(", "unknownPenis", "||", "unknownVagina", ")", "&&", "this", ".", "isCoverableAreaVisible", "(", "CoverableArea", ".", "VAGINA", ")", "&&", "this", ".", "isCoverableAreaVisible", "(", "CoverableArea", ".", "PENIS", ")", "&&", "!", "this", ".", "hasVagina", "(", ")", "&&", "!", "this", ".", "hasPenis", "(", ")", "?", "\"<p>\"", "+", "UtilText", ".", "parse", "(", "this", ",", "this", ".", "getMoundDescription", "(", ")", ")", "+", "\"</p>\"", "+", "characterClothingDisplacer", ".", "getMoundRevealDescription", "(", "this", ",", "Util", ".", "newArrayListOfValues", "(", "characterClothingDisplacer", ")", ")", ":", "\"\"", ")", ")", ";", "}", "}", "return", "wasAbleToDisplace", ";", "}" ]
<b>Warning:</b> Passing in a DisplacementType that isn't present for the passed in clothing *might* throw a null pointer exception...
[ "<b", ">", "Warning", ":", "<", "/", "b", ">", "Passing", "in", "a", "DisplacementType", "that", "isn", "'", "t", "present", "for", "the", "passed", "in", "clothing", "*", "might", "*", "throw", "a", "null", "pointer", "exception", "..." ]
[ "// If this item was able to be displaced, and it was displaced, apply", "// exposed effects:" ]
[ { "param": "clothing", "type": "AbstractClothing" }, { "param": "dt", "type": "DisplacementType" }, { "param": "displaceIfAble", "type": "boolean" }, { "param": "automaticClothingManagement", "type": "boolean" }, { "param": "characterClothingDisplacer", "type": "GameCharacter" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "clothing", "type": "AbstractClothing", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "dt", "type": "DisplacementType", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "displaceIfAble", "type": "boolean", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "automaticClothingManagement", "type": "boolean", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "characterClothingDisplacer", "type": "GameCharacter", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 1250, 353, 5895, 298, 15360, 1669, 28238, 12, 7469, 2009, 352, 4018, 927, 352, 4018, 16, 3035, 15917, 559, 3681, 16, 1250, 1015, 964, 2047, 5895, 298, 16, 1250, 5859, 2009, 352, 4018, 10998, 16, 14121, 7069, 3351, 2009, 352, 4018, 1669, 412, 10598, 13, 288, 203, 202, 202, 6494, 5917, 24251, 291, 273, 401, 2211, 18, 291, 5484, 11925, 858, 7069, 12, 8084, 429, 5484, 18, 52, 1157, 5127, 16, 12740, 18, 13957, 18, 588, 12148, 10756, 597, 401, 2211, 18, 291, 8084, 429, 5484, 6207, 12, 8084, 429, 5484, 18, 52, 1157, 5127, 1769, 203, 202, 202, 6494, 5917, 38, 266, 689, 87, 273, 401, 2211, 18, 291, 5484, 11925, 858, 7069, 12, 8084, 429, 5484, 18, 38, 862, 9053, 55, 16, 12740, 18, 13957, 18, 588, 12148, 10756, 597, 401, 2211, 18, 291, 8084, 429, 5484, 6207, 12, 8084, 429, 5484, 18, 38, 862, 9053, 55, 1769, 203, 202, 202, 6494, 5917, 38, 266, 689, 87, 39, 8342, 343, 273, 401, 2211, 18, 291, 5484, 11925, 858, 7069, 12, 8084, 429, 5484, 18, 38, 862, 9053, 55, 67, 39, 1457, 56, 1792, 16, 12740, 18, 13957, 18, 588, 12148, 10756, 597, 401, 2211, 18, 291, 8084, 429, 5484, 6207, 12, 8084, 429, 5484, 18, 38, 862, 9053, 55, 67, 39, 1457, 56, 1792, 1769, 203, 202, 202, 6494, 5917, 58, 346, 15314, 273, 401, 2211, 18, 291, 5484, 11925, 858, 7069, 12, 8084, 429, 5484, 18, 58, 1781, 706, 37, 16, 12740, 18, 13957, 18, 588, 12148, 10756, 597, 401, 2211, 18, 291, 8084, 429, 5484, 6207, 12, 8084, 429, 5484, 18, 58, 1781, 706, 37, 1769, 203, 202, 202, 6494, 5917, 2610, 273, 401, 2211, 18, 291, 5484, 11925, 858, 7069, 12, 8084, 429, 5484, 18, 1258, 3378, 16, 12740, 18, 13957, 18, 588, 12148, 10756, 597, 401, 2211, 18, 291, 8084, 429, 5484, 6207, 12, 8084, 429, 5484, 18, 1258, 3378, 1769, 203, 1082, 203, 202, 202, 6494, 1703, 5895, 298, 774, 1669, 964, 273, 13086, 18, 291, 5895, 298, 15360, 1669, 28238, 12, 830, 352, 4018, 16, 3681, 16, 1015, 964, 2047, 5895, 298, 16, 5859, 2009, 352, 4018, 10998, 16, 333, 16, 3351, 2009, 352, 4018, 1669, 412, 10598, 1769, 203, 203, 202, 202, 759, 971, 333, 761, 1703, 7752, 358, 506, 1015, 28238, 16, 471, 518, 1703, 1015, 28238, 16, 2230, 203, 202, 202, 759, 16265, 16605, 30, 203, 202, 202, 430, 261, 17416, 5895, 298, 774, 1669, 964, 597, 1015, 964, 2047, 5895, 298, 13, 288, 203, 1082, 202, 2725, 15059, 5583, 5621, 203, 202, 202, 97, 203, 1082, 203, 202, 202, 430, 12, 5, 2211, 18, 291, 12148, 1435, 597, 261, 6376, 18, 13957, 18, 588, 11600, 6351, 7675, 12298, 12, 2211, 13, 747, 261, 2211, 18, 291, 20302, 1435, 597, 333, 18, 588, 5541, 7675, 291, 12148, 1435, 20349, 288, 203, 1082, 202, 1884, 12, 8084, 429, 5484, 3474, 294, 23293, 429, 5484, 18, 2372, 10756, 288, 203, 9506, 202, 430, 12, 2211, 18, 291, 8084, 429, 5484, 6207, 12, 5353, 13, 597, 3474, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,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1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
[ 1, 26873, 203, 202, 380, 411, 70, 34, 6210, 19814, 70, 34, 31741, 316, 279, 3035, 15917, 559, 716, 5177, 1404, 3430, 364, 326, 2275, 316, 927, 352, 4018, 380, 81, 750, 14, 604, 279, 446, 4407, 1520, 2777, 203, 202, 380, 7010, 202, 380, 632, 891, 927, 352, 4018, 1021, 927, 352, 4018, 716, 353, 358, 506, 5950, 364, 1015, 15917, 18, 203, 202, 380, 632, 891, 3681, 1021, 618, 434, 1015, 15917, 358, 3073, 12318, 333, 927, 352, 4018, 18, 203, 202, 380, 632, 891, 1015, 964, 2047, 5895, 298, 971, 638, 16, 326, 927, 352, 4018, 903, 506, 1015, 28238, 261, 430, 518, 1807, 7752, 358, 506, 1015, 28238, 2934, 971, 629, 16, 333, 707, 848, 2537, 506, 1399, 487, 279, 1250, 866, 358, 2 ]
b6dbfe8d180f63176ccd099eecf5382589701ba8
Jesus-Herself-Nuke-Bait/Akari-addition
src/com/lilithsthrone/game/character/GameCharacter.java
[ "Linux-OpenIB" ]
Java
displaceClothingForAccess
null
public void displaceClothingForAccess(CoverableArea coverableArea) { if(isAbleToAccessCoverableArea(coverableArea, true)) { SimpleEntry<AbstractClothing, DisplacementType> entry = getNextClothingToRemoveForCoverableAreaAccess(coverableArea); while(entry != null && entry.getKey()!=null) { this.isAbleToBeDisplaced(entry.getKey(), entry.getValue(), true, true, this); entry = getNextClothingToRemoveForCoverableAreaAccess(coverableArea); } } }
/** * <b>Warning:</b> All clothing displace gets deleted. Should only ever be used in the SexManager's exposeAtStartOfSexMap() method. * @param coverableArea */
Warning: All clothing displace gets deleted. Should only ever be used in the SexManager's exposeAtStartOfSexMap() method. @param coverableArea
[ "Warning", ":", "All", "clothing", "displace", "gets", "deleted", ".", "Should", "only", "ever", "be", "used", "in", "the", "SexManager", "'", "s", "exposeAtStartOfSexMap", "()", "method", ".", "@param", "coverableArea" ]
public void displaceClothingForAccess(CoverableArea coverableArea) { if(isAbleToAccessCoverableArea(coverableArea, true)) { SimpleEntry<AbstractClothing, DisplacementType> entry = getNextClothingToRemoveForCoverableAreaAccess(coverableArea); while(entry != null && entry.getKey()!=null) { this.isAbleToBeDisplaced(entry.getKey(), entry.getValue(), true, true, this); entry = getNextClothingToRemoveForCoverableAreaAccess(coverableArea); } } }
[ "public", "void", "displaceClothingForAccess", "(", "CoverableArea", "coverableArea", ")", "{", "if", "(", "isAbleToAccessCoverableArea", "(", "coverableArea", ",", "true", ")", ")", "{", "SimpleEntry", "<", "AbstractClothing", ",", "DisplacementType", ">", "entry", "=", "getNextClothingToRemoveForCoverableAreaAccess", "(", "coverableArea", ")", ";", "while", "(", "entry", "!=", "null", "&&", "entry", ".", "getKey", "(", ")", "!=", "null", ")", "{", "this", ".", "isAbleToBeDisplaced", "(", "entry", ".", "getKey", "(", ")", ",", "entry", ".", "getValue", "(", ")", ",", "true", ",", "true", ",", "this", ")", ";", "entry", "=", "getNextClothingToRemoveForCoverableAreaAccess", "(", "coverableArea", ")", ";", "}", "}", "}" ]
<b>Warning:</b> All clothing displace gets deleted.
[ "<b", ">", "Warning", ":", "<", "/", "b", ">", "All", "clothing", "displace", "gets", "deleted", "." ]
[]
[ { "param": "coverableArea", "type": "CoverableArea" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "coverableArea", "type": "CoverableArea", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 918, 1015, 964, 2009, 352, 4018, 1290, 1862, 12, 8084, 429, 5484, 5590, 429, 5484, 13, 288, 203, 202, 202, 430, 12, 291, 5895, 298, 774, 1862, 8084, 429, 5484, 12, 17399, 5484, 16, 638, 3719, 288, 203, 1082, 202, 5784, 1622, 32, 7469, 2009, 352, 4018, 16, 3035, 15917, 559, 34, 1241, 273, 6927, 2009, 352, 4018, 12765, 1290, 8084, 429, 5484, 1862, 12, 17399, 5484, 1769, 203, 1082, 202, 17523, 12, 4099, 480, 446, 597, 1241, 18, 588, 653, 1435, 5, 33, 2011, 13, 288, 203, 9506, 202, 2211, 18, 291, 5895, 298, 15360, 1669, 28238, 12, 4099, 18, 588, 653, 9334, 1241, 18, 24805, 9334, 638, 16, 638, 16, 333, 1769, 203, 9506, 202, 4099, 273, 6927, 2009, 352, 4018, 12765, 1290, 8084, 429, 5484, 1862, 12, 17399, 5484, 1769, 203, 1082, 202, 97, 203, 202, 202, 97, 203, 202, 97, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 202, 380, 411, 70, 34, 6210, 19814, 70, 34, 4826, 927, 352, 4018, 1015, 964, 5571, 4282, 18, 9363, 1338, 14103, 506, 1399, 316, 326, 348, 338, 1318, 1807, 15722, 861, 1685, 951, 55, 338, 863, 1435, 707, 18, 203, 202, 380, 632, 891, 5590, 429, 5484, 203, 202, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
b6dbfe8d180f63176ccd099eecf5382589701ba8
Jesus-Herself-Nuke-Bait/Akari-addition
src/com/lilithsthrone/game/character/GameCharacter.java
[ "Linux-OpenIB" ]
Java
isAbleToHaveRaceTransformed
null
public boolean isAbleToHaveRaceTransformed() { return !(this instanceof Elemental) && this.getRace()!=Race.DEMON && this.getRace()!=Race.SLIME; }
/** * Elementals, demons, and slimes can't have their race transformed. */
Elementals, demons, and slimes can't have their race transformed.
[ "Elementals", "demons", "and", "slimes", "can", "'", "t", "have", "their", "race", "transformed", "." ]
public boolean isAbleToHaveRaceTransformed() { return !(this instanceof Elemental) && this.getRace()!=Race.DEMON && this.getRace()!=Race.SLIME; }
[ "public", "boolean", "isAbleToHaveRaceTransformed", "(", ")", "{", "return", "!", "(", "this", "instanceof", "Elemental", ")", "&&", "this", ".", "getRace", "(", ")", "!=", "Race", ".", "DEMON", "&&", "this", ".", "getRace", "(", ")", "!=", "Race", ".", "SLIME", ";", "}" ]
Elementals, demons, and slimes can't have their race transformed.
[ "Elementals", "demons", "and", "slimes", "can", "'", "t", "have", "their", "race", "transformed", "." ]
[]
[]
{ "returns": [], "raises": [], "params": [], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 1250, 353, 5895, 298, 774, 17944, 54, 623, 4059, 329, 1435, 288, 203, 202, 202, 2463, 401, 12, 2211, 1276, 3010, 287, 13, 203, 9506, 202, 10, 10, 333, 18, 588, 54, 623, 1435, 5, 33, 54, 623, 18, 1639, 17667, 203, 9506, 202, 10, 10, 333, 18, 588, 54, 623, 1435, 5, 33, 54, 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 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 202, 380, 3010, 1031, 16, 302, 4758, 87, 16, 471, 2020, 4485, 848, 1404, 1240, 3675, 17996, 10220, 18, 203, 202, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
b6dbfe8d180f63176ccd099eecf5382589701ba8
Jesus-Herself-Nuke-Bait/Akari-addition
src/com/lilithsthrone/game/character/GameCharacter.java
[ "Linux-OpenIB" ]
Java
hasErection
null
public boolean hasErection() { if(Main.game.isInSex()) { for(AbstractClothing c : this.getClothingCurrentlyEquipped()) { if(c.getClothingType().getItemTags().contains(ItemTag.PREVENTS_ERECTION_OTHER) || c.getClothingType().getItemTags().contains(ItemTag.PREVENTS_ERECTION_PHYSICAL)) { return false; } } return true; } return false; }
/** * @return True if this character has an erection. Erections can currently only occur during sex, and are prevented by certain items of clothing. */
@return True if this character has an erection. Erections can currently only occur during sex, and are prevented by certain items of clothing.
[ "@return", "True", "if", "this", "character", "has", "an", "erection", ".", "Erections", "can", "currently", "only", "occur", "during", "sex", "and", "are", "prevented", "by", "certain", "items", "of", "clothing", "." ]
public boolean hasErection() { if(Main.game.isInSex()) { for(AbstractClothing c : this.getClothingCurrentlyEquipped()) { if(c.getClothingType().getItemTags().contains(ItemTag.PREVENTS_ERECTION_OTHER) || c.getClothingType().getItemTags().contains(ItemTag.PREVENTS_ERECTION_PHYSICAL)) { return false; } } return true; } return false; }
[ "public", "boolean", "hasErection", "(", ")", "{", "if", "(", "Main", ".", "game", ".", "isInSex", "(", ")", ")", "{", "for", "(", "AbstractClothing", "c", ":", "this", ".", "getClothingCurrentlyEquipped", "(", ")", ")", "{", "if", "(", "c", ".", "getClothingType", "(", ")", ".", "getItemTags", "(", ")", ".", "contains", "(", "ItemTag", ".", "PREVENTS_ERECTION_OTHER", ")", "||", "c", ".", "getClothingType", "(", ")", ".", "getItemTags", "(", ")", ".", "contains", "(", "ItemTag", ".", "PREVENTS_ERECTION_PHYSICAL", ")", ")", "{", "return", "false", ";", "}", "}", "return", "true", ";", "}", "return", "false", ";", "}" ]
@return True if this character has an erection.
[ "@return", "True", "if", "this", "character", "has", "an", "erection", "." ]
[]
[]
{ "returns": [], "raises": [], "params": [], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 1250, 711, 41, 9329, 1435, 288, 203, 202, 202, 430, 12, 6376, 18, 13957, 18, 291, 382, 55, 338, 10756, 288, 203, 1082, 202, 1884, 12, 7469, 2009, 352, 4018, 276, 294, 333, 18, 588, 2009, 352, 4018, 3935, 715, 13142, 625, 1845, 10756, 288, 203, 9506, 202, 430, 12, 71, 18, 588, 2009, 352, 4018, 559, 7675, 588, 1180, 3453, 7675, 12298, 12, 1180, 1805, 18, 3670, 6465, 55, 67, 29340, 3106, 67, 23940, 13, 203, 25083, 202, 20081, 276, 18, 588, 2009, 352, 4018, 559, 7675, 588, 1180, 3453, 7675, 12298, 12, 1180, 1805, 18, 3670, 6465, 55, 67, 29340, 3106, 67, 8939, 61, 2320, 7913, 3719, 288, 203, 6862, 202, 2463, 629, 31, 203, 9506, 202, 97, 203, 1082, 202, 97, 203, 1082, 202, 2463, 638, 31, 203, 202, 202, 97, 203, 202, 202, 2463, 629, 31, 203, 202, 97, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 202, 380, 632, 2463, 1053, 309, 333, 3351, 711, 392, 6445, 794, 18, 512, 9329, 87, 848, 4551, 1338, 3334, 4982, 19631, 16, 471, 854, 5309, 329, 635, 8626, 1516, 434, 927, 352, 4018, 18, 203, 202, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
b6dbfe8d180f63176ccd099eecf5382589701ba8
Jesus-Herself-Nuke-Bait/Akari-addition
src/com/lilithsthrone/game/character/GameCharacter.java
[ "Linux-OpenIB" ]
Java
isErectionPreventedPhysically
null
public boolean isErectionPreventedPhysically() { for(AbstractClothing c : this.getClothingCurrentlyEquipped()) { if(c.getClothingType().getItemTags().contains(ItemTag.PREVENTS_ERECTION_PHYSICAL)) { return true; } } return false; }
/** * @return True if this character's erection is, or would, be prevented by an item of restrictive clothing. */
@return True if this character's erection is, or would, be prevented by an item of restrictive clothing.
[ "@return", "True", "if", "this", "character", "'", "s", "erection", "is", "or", "would", "be", "prevented", "by", "an", "item", "of", "restrictive", "clothing", "." ]
public boolean isErectionPreventedPhysically() { for(AbstractClothing c : this.getClothingCurrentlyEquipped()) { if(c.getClothingType().getItemTags().contains(ItemTag.PREVENTS_ERECTION_PHYSICAL)) { return true; } } return false; }
[ "public", "boolean", "isErectionPreventedPhysically", "(", ")", "{", "for", "(", "AbstractClothing", "c", ":", "this", ".", "getClothingCurrentlyEquipped", "(", ")", ")", "{", "if", "(", "c", ".", "getClothingType", "(", ")", ".", "getItemTags", "(", ")", ".", "contains", "(", "ItemTag", ".", "PREVENTS_ERECTION_PHYSICAL", ")", ")", "{", "return", "true", ";", "}", "}", "return", "false", ";", "}" ]
@return True if this character's erection is, or would, be prevented by an item of restrictive clothing.
[ "@return", "True", "if", "this", "character", "'", "s", "erection", "is", "or", "would", "be", "prevented", "by", "an", "item", "of", "restrictive", "clothing", "." ]
[]
[]
{ "returns": [], "raises": [], "params": [], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 1250, 353, 41, 9329, 25828, 329, 3731, 1900, 6478, 1435, 288, 203, 202, 202, 1884, 12, 7469, 2009, 352, 4018, 276, 294, 333, 18, 588, 2009, 352, 4018, 3935, 715, 13142, 625, 1845, 10756, 288, 203, 1082, 202, 430, 12, 71, 18, 588, 2009, 352, 4018, 559, 7675, 588, 1180, 3453, 7675, 12298, 12, 1180, 1805, 18, 3670, 6465, 55, 67, 29340, 3106, 67, 8939, 61, 2320, 7913, 3719, 288, 203, 9506, 202, 2463, 638, 31, 203, 1082, 202, 97, 203, 202, 202, 97, 203, 202, 202, 2463, 629, 31, 203, 202, 97, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,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 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 202, 380, 632, 2463, 1053, 309, 333, 3351, 1807, 6445, 794, 353, 16, 578, 4102, 16, 506, 5309, 329, 635, 392, 761, 434, 13108, 688, 927, 352, 4018, 18, 203, 202, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
b6dbfe8d180f63176ccd099eecf5382589701ba8
Jesus-Herself-Nuke-Bait/Akari-addition
src/com/lilithsthrone/game/character/GameCharacter.java
[ "Linux-OpenIB" ]
Java
applyOrgasmCumEffect
null
public void applyOrgasmCumEffect(float cumQuantityModifier) { if(Main.getProperties().hasValue(PropertyValue.cumRegenerationContent)) { this.incrementPenisStoredCum(-getPenisRawOrgasmCumQuantity()); } }
/** * @param cumQuantityModifier A percentage of the normal cum expulsion that you want to be drained. Should nowmally be 1. */
@param cumQuantityModifier A percentage of the normal cum expulsion that you want to be drained. Should nowmally be 1.
[ "@param", "cumQuantityModifier", "A", "percentage", "of", "the", "normal", "cum", "expulsion", "that", "you", "want", "to", "be", "drained", ".", "Should", "nowmally", "be", "1", "." ]
public void applyOrgasmCumEffect(float cumQuantityModifier) { if(Main.getProperties().hasValue(PropertyValue.cumRegenerationContent)) { this.incrementPenisStoredCum(-getPenisRawOrgasmCumQuantity()); } }
[ "public", "void", "applyOrgasmCumEffect", "(", "float", "cumQuantityModifier", ")", "{", "if", "(", "Main", ".", "getProperties", "(", ")", ".", "hasValue", "(", "PropertyValue", ".", "cumRegenerationContent", ")", ")", "{", "this", ".", "incrementPenisStoredCum", "(", "-", "getPenisRawOrgasmCumQuantity", "(", ")", ")", ";", "}", "}" ]
@param cumQuantityModifier A percentage of the normal cum expulsion that you want to be drained.
[ "@param", "cumQuantityModifier", "A", "percentage", "of", "the", "normal", "cum", "expulsion", "that", "you", "want", "to", "be", "drained", "." ]
[]
[ { "param": "cumQuantityModifier", "type": "float" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "cumQuantityModifier", "type": "float", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 918, 2230, 6001, 23522, 39, 379, 12477, 12, 5659, 14471, 12035, 9829, 13, 288, 203, 202, 202, 430, 12, 6376, 18, 588, 2297, 7675, 5332, 620, 12, 16107, 18, 28538, 1617, 708, 367, 1350, 3719, 288, 203, 1082, 202, 2211, 18, 15016, 24251, 291, 18005, 39, 379, 19236, 588, 24251, 291, 4809, 6001, 23522, 39, 379, 12035, 10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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 202, 380, 632, 891, 14471, 12035, 9829, 432, 11622, 434, 326, 2212, 14471, 1329, 332, 87, 285, 716, 1846, 2545, 358, 506, 302, 354, 1920, 18, 9363, 2037, 81, 1230, 506, 404, 18, 203, 202, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
62ca2c25aa0937034dd9a80661705bbeac78577d
Jesus-Herself-Nuke-Bait/Akari-addition
src/com/lilithsthrone/game/combat/CombatMove.java
[ "Linux-OpenIB" ]
Java
formatAttackOutcome
String
protected static String formatAttackOutcome(GameCharacter source, GameCharacter target, String attackText, String attackEffectText, String criticalText, String criticalEffectText) { StringBuilder sb = new StringBuilder(); sb.append("<i>"+attackText+"</i>"); sb.append("<br/>"); sb.append(attackEffectText); if(criticalText!=null) { sb.append("<br/><span style='color:"+Colour.CRIT.toWebHexString()+";'>Critical</span>: "); sb.append("<i>"+criticalEffectText/*criticalText*/+"</i>"); // if(criticalEffectText!=null && !criticalEffectText.isEmpty()) { // sb.append("<br/>"); // sb.append(criticalEffectText); // } } return UtilText.parse(source, target, sb.toString()); }
/** * @return A standard formatting of an attack's outcome. */
@return A standard formatting of an attack's outcome.
[ "@return", "A", "standard", "formatting", "of", "an", "attack", "'", "s", "outcome", "." ]
protected static String formatAttackOutcome(GameCharacter source, GameCharacter target, String attackText, String attackEffectText, String criticalText, String criticalEffectText) { StringBuilder sb = new StringBuilder(); sb.append("<i>"+attackText+"</i>"); sb.append("<br/>"); sb.append(attackEffectText); if(criticalText!=null) { sb.append("<br/><span style='color:"+Colour.CRIT.toWebHexString()+";'>Critical</span>: "); sb.append("<i>"+criticalEffectText/*criticalText*/+"</i>"); } return UtilText.parse(source, target, sb.toString()); }
[ "protected", "static", "String", "formatAttackOutcome", "(", "GameCharacter", "source", ",", "GameCharacter", "target", ",", "String", "attackText", ",", "String", "attackEffectText", ",", "String", "criticalText", ",", "String", "criticalEffectText", ")", "{", "StringBuilder", "sb", "=", "new", "StringBuilder", "(", ")", ";", "sb", ".", "append", "(", "\"<i>\"", "+", "attackText", "+", "\"</i>\"", ")", ";", "sb", ".", "append", "(", "\"<br/>\"", ")", ";", "sb", ".", "append", "(", "attackEffectText", ")", ";", "if", "(", "criticalText", "!=", "null", ")", "{", "sb", ".", "append", "(", "\"<br/><span style='color:\"", "+", "Colour", ".", "CRIT", ".", "toWebHexString", "(", ")", "+", "\";'>Critical</span>: \"", ")", ";", "sb", ".", "append", "(", "\"<i>\"", "+", "criticalEffectText", "/*criticalText*/", "+", "\"</i>\"", ")", ";", "}", "return", "UtilText", ".", "parse", "(", "source", ",", "target", ",", "sb", ".", "toString", "(", ")", ")", ";", "}" ]
@return A standard formatting of an attack's outcome.
[ "@return", "A", "standard", "formatting", "of", "an", "attack", "'", "s", "outcome", "." ]
[ "//\t\t\tif(criticalEffectText!=null && !criticalEffectText.isEmpty()) {", "//\t\t\t\tsb.append(\"<br/>\");", "//\t\t\t\tsb.append(criticalEffectText);", "//\t\t\t}" ]
[ { "param": "source", "type": "GameCharacter" }, { "param": "target", "type": "GameCharacter" }, { "param": "attackText", "type": "String" }, { "param": "attackEffectText", "type": "String" }, { "param": "criticalText", "type": "String" }, { "param": "criticalEffectText", "type": "String" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "source", "type": "GameCharacter", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "target", "type": "GameCharacter", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "attackText", "type": "String", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "attackEffectText", "type": "String", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "criticalText", "type": "String", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "criticalEffectText", "type": "String", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 4750, 760, 514, 740, 3075, 484, 19758, 12, 12496, 7069, 1084, 16, 14121, 7069, 1018, 16, 514, 13843, 1528, 16, 514, 13843, 12477, 1528, 16, 514, 11239, 1528, 16, 514, 11239, 12477, 1528, 13, 288, 203, 202, 202, 21253, 2393, 273, 394, 3225, 5621, 203, 1082, 203, 202, 202, 18366, 18, 6923, 2932, 32, 77, 2984, 15, 4558, 484, 1528, 9078, 1757, 77, 2984, 1769, 203, 202, 202, 18366, 18, 6923, 2932, 32, 2848, 26293, 1769, 203, 202, 202, 18366, 18, 6923, 12, 4558, 484, 12477, 1528, 1769, 203, 1082, 203, 202, 202, 430, 12, 28000, 1528, 5, 33, 2011, 13, 288, 203, 1082, 202, 18366, 18, 6923, 2932, 32, 2848, 19, 4438, 3969, 2154, 2218, 3266, 2773, 15, 26404, 18, 5093, 1285, 18, 869, 4079, 14866, 1435, 9078, 4359, 34, 30286, 1757, 3969, 28593, 315, 1769, 203, 1082, 202, 18366, 18, 6923, 2932, 32, 77, 2984, 15, 28000, 12477, 1528, 20308, 28000, 1528, 5549, 9078, 1757, 77, 2984, 1769, 203, 759, 1082, 202, 430, 12, 28000, 12477, 1528, 5, 33, 2011, 597, 401, 28000, 12477, 1528, 18, 291, 1921, 10756, 288, 203, 759, 9506, 202, 18366, 18, 6923, 2932, 32, 2848, 26293, 1769, 203, 759, 9506, 202, 18366, 18, 6923, 12, 28000, 12477, 1528, 1769, 203, 759, 1082, 202, 97, 203, 202, 202, 97, 203, 1082, 203, 202, 202, 2463, 3564, 1528, 18, 2670, 12, 3168, 16, 1018, 16, 2393, 18, 10492, 10663, 203, 202, 97, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 377, 380, 632, 2463, 432, 4529, 10407, 434, 392, 13843, 1807, 12884, 18, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
62ca2c25aa0937034dd9a80661705bbeac78577d
Jesus-Herself-Nuke-Bait/Akari-addition
src/com/lilithsthrone/game/combat/CombatMove.java
[ "Linux-OpenIB" ]
Java
isUseable
String
public String isUseable(GameCharacter source, GameCharacter target, List<GameCharacter> enemies, List<GameCharacter> allies) { if(target != null) { if(!canTargetSelf && source == target) { return "This action can't be used on yourself!"; } if(!canTargetAllies && allies.contains(target) && source != target) { return "This action can't be used on your allies!"; } if(!canTargetEnemies && enemies.contains(target)) { return "This action can't be used on your enemies!"; } } if(source.getMoveCooldown(this.getIdentifier()) > 0) { return "This action can't be used since it is still on cooldown! "+String.valueOf(source.getMoveCooldown(this.getIdentifier()))+" turns remaining."; } if(source.getRemainingAP() < this.getAPcost()) { return "This action can't be used since you don't have enough AP!"; } return null; }
/** * Returns a string if action can't be used either due to special constraints or because of AP/cooldowns on a specified target; string specifies rejection reason. Returns null if action can be used without an issue. * @param source Character that uses the action. * @param source Target for the action. Can be null. * @param enemies Enemies of the character * @param allies Allies of the character */
Returns a string if action can't be used either due to special constraints or because of AP/cooldowns on a specified target; string specifies rejection reason. Returns null if action can be used without an issue. @param source Character that uses the action. @param source Target for the action. Can be null. @param enemies Enemies of the character @param allies Allies of the character
[ "Returns", "a", "string", "if", "action", "can", "'", "t", "be", "used", "either", "due", "to", "special", "constraints", "or", "because", "of", "AP", "/", "cooldowns", "on", "a", "specified", "target", ";", "string", "specifies", "rejection", "reason", ".", "Returns", "null", "if", "action", "can", "be", "used", "without", "an", "issue", ".", "@param", "source", "Character", "that", "uses", "the", "action", ".", "@param", "source", "Target", "for", "the", "action", ".", "Can", "be", "null", ".", "@param", "enemies", "Enemies", "of", "the", "character", "@param", "allies", "Allies", "of", "the", "character" ]
public String isUseable(GameCharacter source, GameCharacter target, List<GameCharacter> enemies, List<GameCharacter> allies) { if(target != null) { if(!canTargetSelf && source == target) { return "This action can't be used on yourself!"; } if(!canTargetAllies && allies.contains(target) && source != target) { return "This action can't be used on your allies!"; } if(!canTargetEnemies && enemies.contains(target)) { return "This action can't be used on your enemies!"; } } if(source.getMoveCooldown(this.getIdentifier()) > 0) { return "This action can't be used since it is still on cooldown! "+String.valueOf(source.getMoveCooldown(this.getIdentifier()))+" turns remaining."; } if(source.getRemainingAP() < this.getAPcost()) { return "This action can't be used since you don't have enough AP!"; } return null; }
[ "public", "String", "isUseable", "(", "GameCharacter", "source", ",", "GameCharacter", "target", ",", "List", "<", "GameCharacter", ">", "enemies", ",", "List", "<", "GameCharacter", ">", "allies", ")", "{", "if", "(", "target", "!=", "null", ")", "{", "if", "(", "!", "canTargetSelf", "&&", "source", "==", "target", ")", "{", "return", "\"This action can't be used on yourself!\"", ";", "}", "if", "(", "!", "canTargetAllies", "&&", "allies", ".", "contains", "(", "target", ")", "&&", "source", "!=", "target", ")", "{", "return", "\"This action can't be used on your allies!\"", ";", "}", "if", "(", "!", "canTargetEnemies", "&&", "enemies", ".", "contains", "(", "target", ")", ")", "{", "return", "\"This action can't be used on your enemies!\"", ";", "}", "}", "if", "(", "source", ".", "getMoveCooldown", "(", "this", ".", "getIdentifier", "(", ")", ")", ">", "0", ")", "{", "return", "\"This action can't be used since it is still on cooldown! \"", "+", "String", ".", "valueOf", "(", "source", ".", "getMoveCooldown", "(", "this", ".", "getIdentifier", "(", ")", ")", ")", "+", "\" turns remaining.\"", ";", "}", "if", "(", "source", ".", "getRemainingAP", "(", ")", "<", "this", ".", "getAPcost", "(", ")", ")", "{", "return", "\"This action can't be used since you don't have enough AP!\"", ";", "}", "return", "null", ";", "}" ]
Returns a string if action can't be used either due to special constraints or because of AP/cooldowns on a specified target; string specifies rejection reason.
[ "Returns", "a", "string", "if", "action", "can", "'", "t", "be", "used", "either", "due", "to", "special", "constraints", "or", "because", "of", "AP", "/", "cooldowns", "on", "a", "specified", "target", ";", "string", "specifies", "rejection", "reason", "." ]
[]
[ { "param": "source", "type": "GameCharacter" }, { "param": "target", "type": "GameCharacter" }, { "param": "enemies", "type": "List<GameCharacter>" }, { "param": "allies", "type": "List<GameCharacter>" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "source", "type": "GameCharacter", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "target", "type": "GameCharacter", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "enemies", "type": "List<GameCharacter>", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "allies", "type": "List<GameCharacter>", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 514, 353, 3727, 429, 12, 12496, 7069, 1084, 16, 14121, 7069, 1018, 16, 987, 32, 12496, 7069, 34, 570, 351, 606, 16, 987, 32, 12496, 7069, 34, 524, 549, 281, 13, 288, 203, 3639, 309, 12, 3299, 480, 446, 13, 288, 203, 5411, 309, 12, 5, 4169, 2326, 10084, 597, 1084, 422, 1018, 13, 288, 203, 7734, 327, 315, 2503, 1301, 848, 1404, 506, 1399, 603, 3433, 2890, 4442, 31, 203, 5411, 289, 203, 203, 5411, 309, 12, 5, 4169, 2326, 1067, 549, 281, 597, 524, 549, 281, 18, 12298, 12, 3299, 13, 597, 1084, 480, 1018, 13, 288, 203, 7734, 327, 315, 2503, 1301, 848, 1404, 506, 1399, 603, 3433, 524, 549, 281, 4442, 31, 203, 5411, 289, 203, 203, 5411, 309, 12, 5, 4169, 2326, 664, 351, 606, 597, 570, 351, 606, 18, 12298, 12, 3299, 3719, 288, 203, 7734, 327, 315, 2503, 1301, 848, 1404, 506, 1399, 603, 3433, 570, 351, 606, 4442, 31, 203, 5411, 289, 203, 3639, 289, 203, 203, 3639, 309, 12, 3168, 18, 588, 7607, 39, 1371, 2378, 12, 2211, 18, 588, 3004, 10756, 405, 374, 13, 288, 203, 5411, 327, 315, 2503, 1301, 848, 1404, 506, 1399, 3241, 518, 353, 4859, 603, 27367, 2378, 5, 13773, 780, 18, 1132, 951, 12, 3168, 18, 588, 7607, 39, 1371, 2378, 12, 2211, 18, 588, 3004, 1435, 3719, 9078, 20748, 4463, 1199, 31, 203, 3639, 289, 203, 203, 3639, 309, 12, 3168, 18, 588, 11429, 2203, 1435, 411, 333, 18, 588, 2203, 12398, 10756, 288, 203, 5411, 327, 315, 2503, 1301, 848, 1404, 506, 1399, 3241, 1846, 2727, 1404, 1240, 7304, 14410, 4442, 31, 203, 3639, 289, 203, 203, 3639, 327, 446, 31, 203, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0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 2378, 87, 603, 279, 1269, 1018, 31, 533, 11470, 283, 3710, 3971, 18, 2860, 446, 309, 1301, 848, 506, 1399, 2887, 392, 5672, 18, 203, 377, 380, 632, 891, 1084, 6577, 716, 4692, 326, 1301, 18, 203, 377, 380, 632, 891, 1084, 5916, 364, 326, 1301, 18, 4480, 506, 446, 18, 203, 377, 380, 632, 891, 570, 351, 606, 1374, 351, 606, 434, 326, 3351, 203, 377, 380, 632, 891, 524, 549, 281, 2262, 549, 281, 434, 326, 3351, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
016e72c96a68a9b0a332cb481f8fa12162fbccc2
Jesus-Herself-Nuke-Bait/Akari-addition
src/com/lilithsthrone/game/character/npc/NPC.java
[ "Linux-OpenIB" ]
Java
isHappyToBeInSlot
null
public boolean isHappyToBeInSlot(AbstractSexPosition position, SexSlot slot, SexSlot targetSlot, GameCharacter target) { SexType targetSexPreference = this.getForeplayPreference(target); if(!Sex.isInForeplay()) { targetSexPreference = this.getMainSexPreference(target); } if(targetSexPreference==null) { return true; } return slot.isMeetsPreferenceCriteria(this, position, targetSlot, targetSexPreference); }
/** * @param position The position to check. * @param slot The slot to check. * @param slot The target's slot to check. * @param target The person who is being interacted with in this slot. * @return Whether this NPC is happy to be in this SexSlot */
@param position The position to check. @param slot The slot to check. @param slot The target's slot to check. @param target The person who is being interacted with in this slot. @return Whether this NPC is happy to be in this SexSlot
[ "@param", "position", "The", "position", "to", "check", ".", "@param", "slot", "The", "slot", "to", "check", ".", "@param", "slot", "The", "target", "'", "s", "slot", "to", "check", ".", "@param", "target", "The", "person", "who", "is", "being", "interacted", "with", "in", "this", "slot", ".", "@return", "Whether", "this", "NPC", "is", "happy", "to", "be", "in", "this", "SexSlot" ]
public boolean isHappyToBeInSlot(AbstractSexPosition position, SexSlot slot, SexSlot targetSlot, GameCharacter target) { SexType targetSexPreference = this.getForeplayPreference(target); if(!Sex.isInForeplay()) { targetSexPreference = this.getMainSexPreference(target); } if(targetSexPreference==null) { return true; } return slot.isMeetsPreferenceCriteria(this, position, targetSlot, targetSexPreference); }
[ "public", "boolean", "isHappyToBeInSlot", "(", "AbstractSexPosition", "position", ",", "SexSlot", "slot", ",", "SexSlot", "targetSlot", ",", "GameCharacter", "target", ")", "{", "SexType", "targetSexPreference", "=", "this", ".", "getForeplayPreference", "(", "target", ")", ";", "if", "(", "!", "Sex", ".", "isInForeplay", "(", ")", ")", "{", "targetSexPreference", "=", "this", ".", "getMainSexPreference", "(", "target", ")", ";", "}", "if", "(", "targetSexPreference", "==", "null", ")", "{", "return", "true", ";", "}", "return", "slot", ".", "isMeetsPreferenceCriteria", "(", "this", ",", "position", ",", "targetSlot", ",", "targetSexPreference", ")", ";", "}" ]
@param position The position to check.
[ "@param", "position", "The", "position", "to", "check", "." ]
[]
[ { "param": "position", "type": "AbstractSexPosition" }, { "param": "slot", "type": "SexSlot" }, { "param": "targetSlot", "type": "SexSlot" }, { "param": "target", "type": "GameCharacter" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "position", "type": "AbstractSexPosition", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "slot", "type": "SexSlot", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "targetSlot", "type": "SexSlot", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "target", "type": "GameCharacter", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 1250, 27803, 438, 2074, 15360, 382, 8764, 12, 7469, 55, 338, 2555, 1754, 16, 348, 338, 8764, 4694, 16, 348, 338, 8764, 1018, 8764, 16, 14121, 7069, 1018, 13, 288, 203, 202, 202, 55, 338, 559, 1018, 55, 338, 9624, 273, 333, 18, 588, 13573, 1601, 9624, 12, 3299, 1769, 203, 202, 202, 430, 12, 5, 55, 338, 18, 291, 382, 13573, 1601, 10756, 288, 203, 1082, 202, 3299, 55, 338, 9624, 273, 333, 18, 588, 6376, 55, 338, 9624, 12, 3299, 1769, 203, 202, 202, 97, 203, 202, 202, 430, 12, 3299, 55, 338, 9624, 631, 2011, 13, 288, 203, 1082, 202, 2463, 638, 31, 203, 202, 202, 97, 203, 202, 202, 2463, 4694, 18, 291, 4667, 2413, 9624, 7231, 12, 2211, 16, 1754, 16, 1018, 8764, 16, 1018, 55, 338, 9624, 1769, 203, 202, 97, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 316, 333, 4694, 18, 203, 202, 380, 632, 2463, 17403, 333, 423, 3513, 353, 5622, 2074, 358, 506, 316, 333, 348, 338, 8764, 203, 202, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
ad3f7888e7f7c6a6ac551e91edc7234dd322641b
photonized/robot2017
src/org/usfirst/frc6331/sabotage/Robot.java
[ "BSD-3-Clause" ]
Java
teleopPeriodic
null
public void teleopPeriodic() { //double CurrLeftTrigger; double CurrRightTrigger; double CurrLeftTrigger; double CurrLeft; double CurrRight; //double DriveSpeedBase; double DriveSpeedMulti; //DriveSpeedBase = 2.5; CurrRight = driveStick.getRawAxis(5); CurrLeft = driveStick.getRawAxis(1); CurrRightTrigger = driveStick.getRawAxis(3); CurrLeftTrigger = driveStick.getRawAxis(2); boolean leftBump = driveStick.getRawButton(5); DriveSpeedMulti = 0; if(CurrRightTrigger > 0) { DriveSpeedMulti = (CurrRightTrigger); //DriveSpeedMulti = DriveSpeedBase - DriveSpeedMulti; } if(CurrLeftTrigger > 0) { DriveSpeedMulti = -CurrLeftTrigger; } if (leftBump) { DriveSpeedMulti = -0.3; } boolean abutton = driveStick.getRawButton(1); boolean bbutton = driveStick.getRawButton(2); boolean xbutton = driveStick.getRawButton(3); boolean ybutton = driveStick.getRawButton(4); boolean rightBump = driveStick.getRawButton(6); int dPad = driveStick.getPOV(); SmartDashboard.putString("CurrRight", Double.toString(CurrRight)); SmartDashboard.putString("CurrLeft", Double.toString(CurrLeft)); SmartDashboard.putString("CurrRightTrigger", Double.toString(CurrRightTrigger)); SmartDashboard.putString("DriveSpeedMulti", Double.toString(DriveSpeedMulti)); double liftMotor = 0.0; double winchMotor = 0.0; double gateMotor = 0.0; //DigitalInput di1 = new DigitalInput(1); //DigitalInput di2 = new DigitalInput(2); boolean bottomGateSwitch2 = true; boolean topGateSwitch2 = true; boolean bottomScissorSwitch2 = true; boolean topScissorSwitch2 = true; bottomGateSwitch2 = !bottomGateSwitch1.get(); topGateSwitch2 = !topGateSwitch1.get(); bottomScissorSwitch2 = !bottomScissorSwitch1.get(); topScissorSwitch2 = !topScissorSwitch1.get(); /* if(bottomGateSwitch1.get()) { bottomGateSwitch2 = false;} else {bottomGateSwitch2 = true;} if(topGateSwitch1.get()) { topGateSwitch2 = false;} else {topGateSwitch2 = true;} if(bottomScissorSwitch1.get()) { bottomScissorSwitch2 = false;} else {bottomScissorSwitch2 = true;} if(topScissorSwitch1.get()) { topScissorSwitch2 = false;} else {topScissorSwitch2 = true;} */ if(rightBump) { winchMotor = 2.0; SmartDashboard.putString("Right Bumper", "on"); } //******************************Scissor Logic*********************************** if(bbutton) { liftMotor = -0.8; SmartDashboard.putString("B Button", "on"); } if(abutton) { liftMotor = 0.8; SmartDashboard.putString("A Button", "on"); } /*if(bottomScissorSwitch2 && ScissoDirections == 2) { ScissoDirections = 0; } if(topScissorSwitch2 && ScissoDirections == 1) { ScissoDirections = 0; } if (ScissoDirections != 0) { if(ScissoDirections == 1) { liftMotor = -0.8; } if(ScissoDirections == 2) { liftMotor = 0.8; } } else { liftMotor = 0; }*/ if(rightBump) { winchMotor = 2.0; } //*************************************************************************************** //******************************Gate Logic*********************************** if(xbutton) { gateMotor = 0.5; SmartDashboard.putString("X Button", "on"); } if(ybutton){ gateMotor = -0.5; SmartDashboard.putString("Y Button", "on"); } //******************************************************************************* /* liftMotor = 20.0 ; */ double leftMotorValue = 0.0; double rightMotorValue = 0.0; double driveSpeed = 1.0; ; //enclose the 2 if statements below into 1 if statement that reads //if leftjoystick x is between 0.1 and -0.1 do NOTHING //if (driveStick.getRawAxis(0) > 0.1 || driveStick.getRawAxis(0) < -0.1) //{ if(DriveSpeedMulti > 0) { //leftStickValue = (driveStick.getRawAxis(1)/DriveSpeedMulti) * driveSpeed; //rightStickValue = (driveStick.getRawAxis(5)/DriveSpeedMulti) * driveSpeed; rightMotorValue = (DriveSpeedMulti - (driveStick.getRawAxis(0) * 0.5))*0.5; leftMotorValue = (DriveSpeedMulti + (driveStick.getRawAxis(0) * 0.5))*0.5; rightMotorValue *= -driveSpeed; leftMotorValue *= -driveSpeed; } else if(DriveSpeedMulti < 0) { rightMotorValue = (DriveSpeedMulti - (driveStick.getRawAxis(0)* 0.5))*0.5; leftMotorValue = (DriveSpeedMulti + (driveStick.getRawAxis(0) * 0.5))*0.5; rightMotorValue *= -driveSpeed; leftMotorValue *= -driveSpeed; } //} /*if((CurrLeft > .80 & CurrRight > .80) || (CurrLeft < -.80 & CurrRight < -.80)) { leftStickValue = driveStick.getRawAxis(1)/.5; rightStickValue = driveStick.getRawAxis(5)/.5; } else { leftStickValue = driveStick.getRawAxis(1)/2.0; rightStickValue = driveStick.getRawAxis(5)/2.0; } /* /*mainDrive.mecanumDrive_Cartesian(driveStick.getAxis(Joystick.AxisType.kX), driveStick.getAxis(Joystick.AxisType.kY), driveStick.getAxis(Joystick.AxisType.kZ), 0); mainDrive.tankDrive(driveStick,driveStick );*/ /* SmartDashboard.putString("DB/String 0", "leftstick:" + Double.toString(leftStickValue)); SmartDashboard.putString("DB/String 1", "right stick:" + Double.toString(rightStickValue)); SmartDashboard.putString("DB/String 2", "lift:" + Double.toString(liftMotor)); SmartDashboard.putString("DB/String 3", "gate:" + Double.toString(gateMotor)); */ leftFrontDrive.set(-leftMotorValue); leftBackDrive.set(-leftMotorValue); rightFrontDrive.set(rightMotorValue); rightBackDrive.set(rightMotorValue); basketMotor.set(liftMotor); liftGate.set(gateMotor); climber.set(winchMotor); }
/** * This function is called periodically during operator control */
This function is called periodically during operator control
[ "This", "function", "is", "called", "periodically", "during", "operator", "control" ]
public void teleopPeriodic() { double CurrRightTrigger; double CurrLeftTrigger; double CurrLeft; double CurrRight; double DriveSpeedMulti; CurrRight = driveStick.getRawAxis(5); CurrLeft = driveStick.getRawAxis(1); CurrRightTrigger = driveStick.getRawAxis(3); CurrLeftTrigger = driveStick.getRawAxis(2); boolean leftBump = driveStick.getRawButton(5); DriveSpeedMulti = 0; if(CurrRightTrigger > 0) { DriveSpeedMulti = (CurrRightTrigger); } if(CurrLeftTrigger > 0) { DriveSpeedMulti = -CurrLeftTrigger; } if (leftBump) { DriveSpeedMulti = -0.3; } boolean abutton = driveStick.getRawButton(1); boolean bbutton = driveStick.getRawButton(2); boolean xbutton = driveStick.getRawButton(3); boolean ybutton = driveStick.getRawButton(4); boolean rightBump = driveStick.getRawButton(6); int dPad = driveStick.getPOV(); SmartDashboard.putString("CurrRight", Double.toString(CurrRight)); SmartDashboard.putString("CurrLeft", Double.toString(CurrLeft)); SmartDashboard.putString("CurrRightTrigger", Double.toString(CurrRightTrigger)); SmartDashboard.putString("DriveSpeedMulti", Double.toString(DriveSpeedMulti)); double liftMotor = 0.0; double winchMotor = 0.0; double gateMotor = 0.0; boolean bottomGateSwitch2 = true; boolean topGateSwitch2 = true; boolean bottomScissorSwitch2 = true; boolean topScissorSwitch2 = true; bottomGateSwitch2 = !bottomGateSwitch1.get(); topGateSwitch2 = !topGateSwitch1.get(); bottomScissorSwitch2 = !bottomScissorSwitch1.get(); topScissorSwitch2 = !topScissorSwitch1.get(); /* if(bottomGateSwitch1.get()) { bottomGateSwitch2 = false;} else {bottomGateSwitch2 = true;} if(topGateSwitch1.get()) { topGateSwitch2 = false;} else {topGateSwitch2 = true;} if(bottomScissorSwitch1.get()) { bottomScissorSwitch2 = false;} else {bottomScissorSwitch2 = true;} if(topScissorSwitch1.get()) { topScissorSwitch2 = false;} else {topScissorSwitch2 = true;} */ if(rightBump) { winchMotor = 2.0; SmartDashboard.putString("Right Bumper", "on"); } if(bbutton) { liftMotor = -0.8; SmartDashboard.putString("B Button", "on"); } if(abutton) { liftMotor = 0.8; SmartDashboard.putString("A Button", "on"); } /*if(bottomScissorSwitch2 && ScissoDirections == 2) { ScissoDirections = 0; } if(topScissorSwitch2 && ScissoDirections == 1) { ScissoDirections = 0; } if (ScissoDirections != 0) { if(ScissoDirections == 1) { liftMotor = -0.8; } if(ScissoDirections == 2) { liftMotor = 0.8; } } else { liftMotor = 0; }*/ if(rightBump) { winchMotor = 2.0; } if(xbutton) { gateMotor = 0.5; SmartDashboard.putString("X Button", "on"); } if(ybutton){ gateMotor = -0.5; SmartDashboard.putString("Y Button", "on"); } /* liftMotor = 20.0 ; */ double leftMotorValue = 0.0; double rightMotorValue = 0.0; double driveSpeed = 1.0; ; if(DriveSpeedMulti > 0) { rightMotorValue = (DriveSpeedMulti - (driveStick.getRawAxis(0) * 0.5))*0.5; leftMotorValue = (DriveSpeedMulti + (driveStick.getRawAxis(0) * 0.5))*0.5; rightMotorValue *= -driveSpeed; leftMotorValue *= -driveSpeed; } else if(DriveSpeedMulti < 0) { rightMotorValue = (DriveSpeedMulti - (driveStick.getRawAxis(0)* 0.5))*0.5; leftMotorValue = (DriveSpeedMulti + (driveStick.getRawAxis(0) * 0.5))*0.5; rightMotorValue *= -driveSpeed; leftMotorValue *= -driveSpeed; } /*if((CurrLeft > .80 & CurrRight > .80) || (CurrLeft < -.80 & CurrRight < -.80)) { leftStickValue = driveStick.getRawAxis(1)/.5; rightStickValue = driveStick.getRawAxis(5)/.5; } else { leftStickValue = driveStick.getRawAxis(1)/2.0; rightStickValue = driveStick.getRawAxis(5)/2.0; } /* /*mainDrive.mecanumDrive_Cartesian(driveStick.getAxis(Joystick.AxisType.kX), driveStick.getAxis(Joystick.AxisType.kY), driveStick.getAxis(Joystick.AxisType.kZ), 0); mainDrive.tankDrive(driveStick,driveStick );*/ /* SmartDashboard.putString("DB/String 0", "leftstick:" + Double.toString(leftStickValue)); SmartDashboard.putString("DB/String 1", "right stick:" + Double.toString(rightStickValue)); SmartDashboard.putString("DB/String 2", "lift:" + Double.toString(liftMotor)); SmartDashboard.putString("DB/String 3", "gate:" + Double.toString(gateMotor)); */ leftFrontDrive.set(-leftMotorValue); leftBackDrive.set(-leftMotorValue); rightFrontDrive.set(rightMotorValue); rightBackDrive.set(rightMotorValue); basketMotor.set(liftMotor); liftGate.set(gateMotor); climber.set(winchMotor); }
[ "public", "void", "teleopPeriodic", "(", ")", "{", "double", "CurrRightTrigger", ";", "double", "CurrLeftTrigger", ";", "double", "CurrLeft", ";", "double", "CurrRight", ";", "double", "DriveSpeedMulti", ";", "CurrRight", "=", "driveStick", ".", "getRawAxis", "(", "5", ")", ";", "CurrLeft", "=", "driveStick", ".", "getRawAxis", "(", "1", ")", ";", "CurrRightTrigger", "=", "driveStick", ".", "getRawAxis", "(", "3", ")", ";", "CurrLeftTrigger", "=", "driveStick", ".", "getRawAxis", "(", "2", ")", ";", "boolean", "leftBump", "=", "driveStick", ".", "getRawButton", "(", "5", ")", ";", "DriveSpeedMulti", "=", "0", ";", "if", "(", "CurrRightTrigger", ">", "0", ")", "{", "DriveSpeedMulti", "=", "(", "CurrRightTrigger", ")", ";", "}", "if", "(", "CurrLeftTrigger", ">", "0", ")", "{", "DriveSpeedMulti", "=", "-", "CurrLeftTrigger", ";", "}", "if", "(", "leftBump", ")", "{", "DriveSpeedMulti", "=", "-", "0.3", ";", "}", "boolean", "abutton", "=", "driveStick", ".", "getRawButton", "(", "1", ")", ";", "boolean", "bbutton", "=", "driveStick", ".", "getRawButton", "(", "2", ")", ";", "boolean", "xbutton", "=", "driveStick", ".", "getRawButton", "(", "3", ")", ";", "boolean", "ybutton", "=", "driveStick", ".", "getRawButton", "(", "4", ")", ";", "boolean", "rightBump", "=", "driveStick", ".", "getRawButton", "(", "6", ")", ";", "int", "dPad", "=", "driveStick", ".", "getPOV", "(", ")", ";", "SmartDashboard", ".", "putString", "(", "\"CurrRight\"", ",", "Double", ".", "toString", "(", "CurrRight", ")", ")", ";", "SmartDashboard", ".", "putString", "(", "\"CurrLeft\"", ",", "Double", ".", "toString", "(", "CurrLeft", ")", ")", ";", "SmartDashboard", ".", "putString", "(", "\"CurrRightTrigger\"", ",", "Double", ".", "toString", "(", "CurrRightTrigger", ")", ")", ";", "SmartDashboard", ".", "putString", "(", "\"DriveSpeedMulti\"", ",", "Double", ".", "toString", "(", "DriveSpeedMulti", ")", ")", ";", "double", "liftMotor", "=", "0.0", ";", "double", "winchMotor", "=", "0.0", ";", "double", "gateMotor", "=", "0.0", ";", "boolean", "bottomGateSwitch2", "=", "true", ";", "boolean", "topGateSwitch2", "=", "true", ";", "boolean", "bottomScissorSwitch2", "=", "true", ";", "boolean", "topScissorSwitch2", "=", "true", ";", "bottomGateSwitch2", "=", "!", "bottomGateSwitch1", ".", "get", "(", ")", ";", "topGateSwitch2", "=", "!", "topGateSwitch1", ".", "get", "(", ")", ";", "bottomScissorSwitch2", "=", "!", "bottomScissorSwitch1", ".", "get", "(", ")", ";", "topScissorSwitch2", "=", "!", "topScissorSwitch1", ".", "get", "(", ")", ";", "/*\n \tif(bottomGateSwitch1.get()) { bottomGateSwitch2 = false;}\n \telse {bottomGateSwitch2 = true;}\n \tif(topGateSwitch1.get()) { topGateSwitch2 = false;}\n \telse {topGateSwitch2 = true;}\n \tif(bottomScissorSwitch1.get()) { bottomScissorSwitch2 = false;}\n \telse {bottomScissorSwitch2 = true;}\n \tif(topScissorSwitch1.get()) { topScissorSwitch2 = false;}\n \telse {topScissorSwitch2 = true;}\n \t*/", "if", "(", "rightBump", ")", "{", "winchMotor", "=", "2.0", ";", "SmartDashboard", ".", "putString", "(", "\"Right Bumper\"", ",", "\"on\"", ")", ";", "}", "if", "(", "bbutton", ")", "{", "liftMotor", "=", "-", "0.8", ";", "SmartDashboard", ".", "putString", "(", "\"B Button\"", ",", "\"on\"", ")", ";", "}", "if", "(", "abutton", ")", "{", "liftMotor", "=", "0.8", ";", "SmartDashboard", ".", "putString", "(", "\"A Button\"", ",", "\"on\"", ")", ";", "}", "/*if(bottomScissorSwitch2 && ScissoDirections == 2)\n \t{\n \t\tScissoDirections = 0;\n \t}\n \t\n \tif(topScissorSwitch2 && ScissoDirections == 1)\n \t{\n \t\tScissoDirections = 0;\n \t}\n \t\n \tif (ScissoDirections != 0)\n \t{\n \t\tif(ScissoDirections == 1)\n \t\t{\n \t\t\tliftMotor = -0.8;\n \t\t}\n \t\t\n \t\tif(ScissoDirections == 2)\n \t\t{\n \t\t\tliftMotor = 0.8;\n \t\t}\n \t}\n \telse\n \t{\n \t\tliftMotor = 0;\n \t}*/", "if", "(", "rightBump", ")", "{", "winchMotor", "=", "2.0", ";", "}", "if", "(", "xbutton", ")", "{", "gateMotor", "=", "0.5", ";", "SmartDashboard", ".", "putString", "(", "\"X Button\"", ",", "\"on\"", ")", ";", "}", "if", "(", "ybutton", ")", "{", "gateMotor", "=", "-", "0.5", ";", "SmartDashboard", ".", "putString", "(", "\"Y Button\"", ",", "\"on\"", ")", ";", "}", "/*\n \t\tliftMotor = 20.0 ;\n \t*/", "double", "leftMotorValue", "=", "0.0", ";", "double", "rightMotorValue", "=", "0.0", ";", "double", "driveSpeed", "=", "1.0", ";", ";", "if", "(", "DriveSpeedMulti", ">", "0", ")", "{", "rightMotorValue", "=", "(", "DriveSpeedMulti", "-", "(", "driveStick", ".", "getRawAxis", "(", "0", ")", "*", "0.5", ")", ")", "*", "0.5", ";", "leftMotorValue", "=", "(", "DriveSpeedMulti", "+", "(", "driveStick", ".", "getRawAxis", "(", "0", ")", "*", "0.5", ")", ")", "*", "0.5", ";", "rightMotorValue", "*=", "-", "driveSpeed", ";", "leftMotorValue", "*=", "-", "driveSpeed", ";", "}", "else", "if", "(", "DriveSpeedMulti", "<", "0", ")", "{", "rightMotorValue", "=", "(", "DriveSpeedMulti", "-", "(", "driveStick", ".", "getRawAxis", "(", "0", ")", "*", "0.5", ")", ")", "*", "0.5", ";", "leftMotorValue", "=", "(", "DriveSpeedMulti", "+", "(", "driveStick", ".", "getRawAxis", "(", "0", ")", "*", "0.5", ")", ")", "*", "0.5", ";", "rightMotorValue", "*=", "-", "driveSpeed", ";", "leftMotorValue", "*=", "-", "driveSpeed", ";", "}", "/*if((CurrLeft > .80 & CurrRight > .80) || (CurrLeft < -.80 & CurrRight < -.80))\n \t{\n \t\tleftStickValue = driveStick.getRawAxis(1)/.5;\n \t\trightStickValue = driveStick.getRawAxis(5)/.5;\n \t}\n \telse\n \t{\n \t\tleftStickValue = driveStick.getRawAxis(1)/2.0;\n \t\trightStickValue = driveStick.getRawAxis(5)/2.0;\n \t}\n \t/*\n /*mainDrive.mecanumDrive_Cartesian(driveStick.getAxis(Joystick.AxisType.kX),\n driveStick.getAxis(Joystick.AxisType.kY),\n driveStick.getAxis(Joystick.AxisType.kZ), 0);\n mainDrive.tankDrive(driveStick,driveStick );*/", "/*\n \tSmartDashboard.putString(\"DB/String 0\", \"leftstick:\" + Double.toString(leftStickValue));\n \tSmartDashboard.putString(\"DB/String 1\", \"right stick:\" + Double.toString(rightStickValue));\n \tSmartDashboard.putString(\"DB/String 2\", \"lift:\" + Double.toString(liftMotor));\n \tSmartDashboard.putString(\"DB/String 3\", \"gate:\" + Double.toString(gateMotor));\n \t*/", "leftFrontDrive", ".", "set", "(", "-", "leftMotorValue", ")", ";", "leftBackDrive", ".", "set", "(", "-", "leftMotorValue", ")", ";", "rightFrontDrive", ".", "set", "(", "rightMotorValue", ")", ";", "rightBackDrive", ".", "set", "(", "rightMotorValue", ")", ";", "basketMotor", ".", "set", "(", "liftMotor", ")", ";", "liftGate", ".", "set", "(", "gateMotor", ")", ";", "climber", ".", "set", "(", "winchMotor", ")", ";", "}" ]
This function is called periodically during operator control
[ "This", "function", "is", "called", "periodically", "during", "operator", "control" ]
[ "//double CurrLeftTrigger;", "//double DriveSpeedBase;", "//DriveSpeedBase = 2.5;", "//DriveSpeedMulti = DriveSpeedBase - DriveSpeedMulti;", "//DigitalInput di1 = new DigitalInput(1);", "//DigitalInput di2 = new DigitalInput(2);", "//******************************Scissor Logic***********************************", "//***************************************************************************************", "//******************************Gate Logic***********************************", "//*******************************************************************************", "//enclose the 2 if statements below into 1 if statement that reads", "//if leftjoystick x is between 0.1 and -0.1 do NOTHING", "//if (driveStick.getRawAxis(0) > 0.1 || driveStick.getRawAxis(0) < -0.1)", "//{", "//leftStickValue = (driveStick.getRawAxis(1)/DriveSpeedMulti) * driveSpeed;", "//rightStickValue = (driveStick.getRawAxis(5)/DriveSpeedMulti) * driveSpeed;", "//}" ]
[]
{ "returns": [], "raises": [], "params": [], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 918, 268, 6516, 556, 31461, 1435, 288, 203, 377, 202, 203, 377, 202, 759, 9056, 7251, 86, 3910, 6518, 31, 203, 377, 202, 9056, 7251, 86, 4726, 6518, 31, 203, 377, 202, 9056, 7251, 86, 3910, 6518, 31, 203, 377, 202, 9056, 7251, 86, 3910, 31, 203, 377, 202, 9056, 7251, 86, 4726, 31, 203, 377, 202, 759, 9056, 11473, 688, 16562, 2171, 31, 203, 377, 202, 9056, 11473, 688, 16562, 5002, 31, 203, 377, 202, 203, 377, 202, 759, 24681, 16562, 2171, 273, 576, 18, 25, 31, 203, 377, 202, 203, 377, 202, 20143, 4726, 273, 14316, 510, 1200, 18, 588, 4809, 6558, 12, 25, 1769, 203, 377, 202, 20143, 3910, 273, 14316, 510, 1200, 18, 588, 4809, 6558, 12, 21, 1769, 203, 377, 202, 203, 377, 202, 20143, 4726, 6518, 273, 14316, 510, 1200, 18, 588, 4809, 6558, 12, 23, 1769, 203, 377, 202, 20143, 3910, 6518, 273, 14316, 510, 1200, 18, 588, 4809, 6558, 12, 22, 1769, 203, 377, 202, 203, 377, 202, 6494, 2002, 38, 2801, 273, 14316, 510, 1200, 18, 588, 4809, 3616, 12, 25, 1769, 203, 203, 377, 202, 203, 377, 202, 24681, 16562, 5002, 273, 374, 31, 203, 377, 202, 203, 377, 202, 430, 12, 20143, 4726, 6518, 405, 374, 13, 203, 377, 202, 95, 203, 377, 202, 202, 24681, 16562, 5002, 273, 261, 20143, 4726, 6518, 1769, 203, 377, 202, 203, 377, 202, 202, 759, 24681, 16562, 5002, 273, 11473, 688, 16562, 2171, 300, 11473, 688, 16562, 5002, 31, 203, 377, 202, 97, 203, 377, 202, 203, 377, 202, 430, 12, 20143, 3910, 6518, 405, 374, 13, 203, 377, 202, 95, 203, 377, 202, 202, 24681, 16562, 5002, 273, 300, 20143, 3910, 6518, 31, 203, 377, 202, 203, 377, 202, 97, 203, 377, 202, 203, 377, 202, 430, 261, 4482, 38, 2801, 13, 288, 203, 377, 202, 202, 24681, 16562, 5002, 273, 300, 20, 18, 23, 31, 202, 203, 377, 202, 97, 203, 377, 202, 203, 377, 202, 6494, 1223, 2644, 273, 14316, 510, 1200, 18, 588, 4809, 3616, 12, 21, 1769, 203, 377, 202, 6494, 324, 5391, 273, 14316, 510, 1200, 18, 588, 4809, 3616, 12, 22, 1769, 203, 377, 202, 6494, 619, 5391, 273, 14316, 510, 1200, 18, 588, 4809, 3616, 12, 23, 1769, 203, 377, 202, 6494, 677, 5391, 273, 14316, 510, 1200, 18, 588, 4809, 3616, 12, 24, 1769, 203, 377, 202, 6494, 2145, 38, 2801, 273, 14316, 510, 1200, 18, 588, 4809, 3616, 12, 26, 1769, 203, 377, 202, 474, 302, 14878, 273, 14316, 510, 1200, 18, 588, 2419, 58, 5621, 203, 377, 202, 203, 377, 202, 23824, 14830, 18, 458, 780, 2932, 20143, 4726, 3113, 3698, 18, 10492, 12, 20143, 4726, 10019, 203, 377, 202, 23824, 14830, 18, 458, 780, 2932, 20143, 3910, 3113, 3698, 18, 10492, 12, 20143, 3910, 10019, 203, 377, 202, 23824, 14830, 18, 458, 780, 2932, 20143, 4726, 6518, 3113, 3698, 18, 10492, 12, 20143, 4726, 6518, 10019, 203, 377, 202, 23824, 14830, 18, 458, 780, 2932, 24681, 16562, 5002, 3113, 3698, 18, 10492, 12, 24681, 16562, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
[ 1, 26873, 203, 377, 380, 1220, 445, 353, 2566, 26736, 4982, 3726, 3325, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
59aca9119b338334254d73976723dc397a0238c1
photonized/robot2017
Extra/RobotExtra.java
[ "BSD-3-Clause" ]
Java
teleopPeriodic
null
public void teleopPeriodic() { //double CurrLeftTrigger; double CurrRightTrigger; double CurrLeftTrigger; double CurrLeft; double CurrRight; //double DriveSpeedBase; double DriveSpeedMuli; //DriveSpeedBase = 2.5; CurrRight = driveStick.getRawAxis(5); CurrLeft = driveStick.getRawAxis(1); CurrRightTrigger = driveStick.getRawAxis(3); CurrLeftTrigger = driveStick.getRawAxis(2); DriveSpeedMuli = 0; if(CurrRightTrigger > 0) { DriveSpeedMuli = (CurrRightTrigger); //DriveSpeedMuli = DriveSpeedBase - DriveSpeedMuli; } if(CurrLeftTrigger > 0) { DriveSpeedMuli = -CurrLeftTrigger; } SmartDashboard.putString("CurrRight", Double.toString(CurrRight)); SmartDashboard.putString("CurrLeft", Double.toString(CurrLeft)); SmartDashboard.putString("CurrRightTrigger", Double.toString(CurrRightTrigger)); SmartDashboard.putString("DriveSpeedMuli", Double.toString(DriveSpeedMuli)); double leftMotorValue = 0.0; double rightMotorValue = 0.0; double driveSpeed = 0.; //enclose the 2 if statements below into 1 if statement that reads //if leftjoystick x is between 0.1 and -0.1 do NOTHING //if (driveStick.getRawAxis(0) > 0.1 || driveStick.getRawAxis(0) < -0.1) //{ if(DriveSpeedMuli > 0) { //leftStickValue = (driveStick.getRawAxis(1)/DriveSpeedMuli) * driveSpeed; //rightStickValue = (driveStick.getRawAxis(5)/DriveSpeedMuli) * driveSpeed; rightMotorValue = (DriveSpeedMuli - (driveStick.getRawAxis(0) * 0.5))*0.5; leftMotorValue = (DriveSpeedMuli + (driveStick.getRawAxis(0) * 0.5))*0.5; rightMotorValue *= -driveSpeed; leftMotorValue *= -driveSpeed; } else if(DriveSpeedMuli < 0) { rightMotorValue = (DriveSpeedMuli - (driveStick.getRawAxis(0)* 0.5))*0.5; leftMotorValue = (DriveSpeedMuli + (driveStick.getRawAxis(0) * 0.5))*0.5; rightMotorValue *= -driveSpeed; leftMotorValue *= -driveSpeed; } //} /*if((CurrLeft > .80 & CurrRight > .80) || (CurrLeft < -.80 & CurrRight < -.80)) { leftStickValue = driveStick.getRawAxis(1)/.5; rightStickValue = driveStick.getRawAxis(5)/.5; } else { leftStickValue = driveStick.getRawAxis(1)/2.0; rightStickValue = driveStick.getRawAxis(5)/2.0; } /* /*mainDrive.mecanumDrive_Cartesian(driveStick.getAxis(Joystick.AxisType.kX), driveStick.getAxis(Joystick.AxisType.kY), driveStick.getAxis(Joystick.AxisType.kZ), 0); mainDrive.tankDrive(driveStick,driveStick );*/ /* SmartDashboard.putString("DB/String 0", "leftstick:" + Double.toString(leftStickValue)); SmartDashboard.putString("DB/String 1", "right stick:" + Double.toString(rightStickValue)); SmartDashboard.putString("DB/String 2", "lift:" + Double.toString(liftMotor)); SmartDashboard.putString("DB/String 3", "gate:" + Double.toString(gateMotor)); */ leftFrontDrive.set(-leftMotorValue); leftBackDrive.set(-leftMotorValue); rightFrontDrive.set(rightMotorValue); rightBackDrive.set(rightMotorValue); }
/** * This function is called periodically during operator control */
This function is called periodically during operator control
[ "This", "function", "is", "called", "periodically", "during", "operator", "control" ]
public void teleopPeriodic() { double CurrRightTrigger; double CurrLeftTrigger; double CurrLeft; double CurrRight; double DriveSpeedMuli; CurrRight = driveStick.getRawAxis(5); CurrLeft = driveStick.getRawAxis(1); CurrRightTrigger = driveStick.getRawAxis(3); CurrLeftTrigger = driveStick.getRawAxis(2); DriveSpeedMuli = 0; if(CurrRightTrigger > 0) { DriveSpeedMuli = (CurrRightTrigger); } if(CurrLeftTrigger > 0) { DriveSpeedMuli = -CurrLeftTrigger; } SmartDashboard.putString("CurrRight", Double.toString(CurrRight)); SmartDashboard.putString("CurrLeft", Double.toString(CurrLeft)); SmartDashboard.putString("CurrRightTrigger", Double.toString(CurrRightTrigger)); SmartDashboard.putString("DriveSpeedMuli", Double.toString(DriveSpeedMuli)); double leftMotorValue = 0.0; double rightMotorValue = 0.0; double driveSpeed = 0.; if(DriveSpeedMuli > 0) { rightMotorValue = (DriveSpeedMuli - (driveStick.getRawAxis(0) * 0.5))*0.5; leftMotorValue = (DriveSpeedMuli + (driveStick.getRawAxis(0) * 0.5))*0.5; rightMotorValue *= -driveSpeed; leftMotorValue *= -driveSpeed; } else if(DriveSpeedMuli < 0) { rightMotorValue = (DriveSpeedMuli - (driveStick.getRawAxis(0)* 0.5))*0.5; leftMotorValue = (DriveSpeedMuli + (driveStick.getRawAxis(0) * 0.5))*0.5; rightMotorValue *= -driveSpeed; leftMotorValue *= -driveSpeed; } /*if((CurrLeft > .80 & CurrRight > .80) || (CurrLeft < -.80 & CurrRight < -.80)) { leftStickValue = driveStick.getRawAxis(1)/.5; rightStickValue = driveStick.getRawAxis(5)/.5; } else { leftStickValue = driveStick.getRawAxis(1)/2.0; rightStickValue = driveStick.getRawAxis(5)/2.0; } /* /*mainDrive.mecanumDrive_Cartesian(driveStick.getAxis(Joystick.AxisType.kX), driveStick.getAxis(Joystick.AxisType.kY), driveStick.getAxis(Joystick.AxisType.kZ), 0); mainDrive.tankDrive(driveStick,driveStick );*/ /* SmartDashboard.putString("DB/String 0", "leftstick:" + Double.toString(leftStickValue)); SmartDashboard.putString("DB/String 1", "right stick:" + Double.toString(rightStickValue)); SmartDashboard.putString("DB/String 2", "lift:" + Double.toString(liftMotor)); SmartDashboard.putString("DB/String 3", "gate:" + Double.toString(gateMotor)); */ leftFrontDrive.set(-leftMotorValue); leftBackDrive.set(-leftMotorValue); rightFrontDrive.set(rightMotorValue); rightBackDrive.set(rightMotorValue); }
[ "public", "void", "teleopPeriodic", "(", ")", "{", "double", "CurrRightTrigger", ";", "double", "CurrLeftTrigger", ";", "double", "CurrLeft", ";", "double", "CurrRight", ";", "double", "DriveSpeedMuli", ";", "CurrRight", "=", "driveStick", ".", "getRawAxis", "(", "5", ")", ";", "CurrLeft", "=", "driveStick", ".", "getRawAxis", "(", "1", ")", ";", "CurrRightTrigger", "=", "driveStick", ".", "getRawAxis", "(", "3", ")", ";", "CurrLeftTrigger", "=", "driveStick", ".", "getRawAxis", "(", "2", ")", ";", "DriveSpeedMuli", "=", "0", ";", "if", "(", "CurrRightTrigger", ">", "0", ")", "{", "DriveSpeedMuli", "=", "(", "CurrRightTrigger", ")", ";", "}", "if", "(", "CurrLeftTrigger", ">", "0", ")", "{", "DriveSpeedMuli", "=", "-", "CurrLeftTrigger", ";", "}", "SmartDashboard", ".", "putString", "(", "\"CurrRight\"", ",", "Double", ".", "toString", "(", "CurrRight", ")", ")", ";", "SmartDashboard", ".", "putString", "(", "\"CurrLeft\"", ",", "Double", ".", "toString", "(", "CurrLeft", ")", ")", ";", "SmartDashboard", ".", "putString", "(", "\"CurrRightTrigger\"", ",", "Double", ".", "toString", "(", "CurrRightTrigger", ")", ")", ";", "SmartDashboard", ".", "putString", "(", "\"DriveSpeedMuli\"", ",", "Double", ".", "toString", "(", "DriveSpeedMuli", ")", ")", ";", "double", "leftMotorValue", "=", "0.0", ";", "double", "rightMotorValue", "=", "0.0", ";", "double", "driveSpeed", "=", "0.", ";", "if", "(", "DriveSpeedMuli", ">", "0", ")", "{", "rightMotorValue", "=", "(", "DriveSpeedMuli", "-", "(", "driveStick", ".", "getRawAxis", "(", "0", ")", "*", "0.5", ")", ")", "*", "0.5", ";", "leftMotorValue", "=", "(", "DriveSpeedMuli", "+", "(", "driveStick", ".", "getRawAxis", "(", "0", ")", "*", "0.5", ")", ")", "*", "0.5", ";", "rightMotorValue", "*=", "-", "driveSpeed", ";", "leftMotorValue", "*=", "-", "driveSpeed", ";", "}", "else", "if", "(", "DriveSpeedMuli", "<", "0", ")", "{", "rightMotorValue", "=", "(", "DriveSpeedMuli", "-", "(", "driveStick", ".", "getRawAxis", "(", "0", ")", "*", "0.5", ")", ")", "*", "0.5", ";", "leftMotorValue", "=", "(", "DriveSpeedMuli", "+", "(", "driveStick", ".", "getRawAxis", "(", "0", ")", "*", "0.5", ")", ")", "*", "0.5", ";", "rightMotorValue", "*=", "-", "driveSpeed", ";", "leftMotorValue", "*=", "-", "driveSpeed", ";", "}", "/*if((CurrLeft > .80 & CurrRight > .80) || (CurrLeft < -.80 & CurrRight < -.80))\n \t{\n \t\tleftStickValue = driveStick.getRawAxis(1)/.5;\n \t\trightStickValue = driveStick.getRawAxis(5)/.5;\n \t}\n \telse\n \t{\n \t\tleftStickValue = driveStick.getRawAxis(1)/2.0;\n \t\trightStickValue = driveStick.getRawAxis(5)/2.0;\n \t}\n \t/*\n /*mainDrive.mecanumDrive_Cartesian(driveStick.getAxis(Joystick.AxisType.kX),\n driveStick.getAxis(Joystick.AxisType.kY),\n driveStick.getAxis(Joystick.AxisType.kZ), 0);\n mainDrive.tankDrive(driveStick,driveStick );*/", "/*\n \tSmartDashboard.putString(\"DB/String 0\", \"leftstick:\" + Double.toString(leftStickValue));\n \tSmartDashboard.putString(\"DB/String 1\", \"right stick:\" + Double.toString(rightStickValue));\n \tSmartDashboard.putString(\"DB/String 2\", \"lift:\" + Double.toString(liftMotor));\n \tSmartDashboard.putString(\"DB/String 3\", \"gate:\" + Double.toString(gateMotor));\n \t*/", "leftFrontDrive", ".", "set", "(", "-", "leftMotorValue", ")", ";", "leftBackDrive", ".", "set", "(", "-", "leftMotorValue", ")", ";", "rightFrontDrive", ".", "set", "(", "rightMotorValue", ")", ";", "rightBackDrive", ".", "set", "(", "rightMotorValue", ")", ";", "}" ]
This function is called periodically during operator control
[ "This", "function", "is", "called", "periodically", "during", "operator", "control" ]
[ "//double CurrLeftTrigger;", "//double DriveSpeedBase;", "//DriveSpeedBase = 2.5;", "//DriveSpeedMuli = DriveSpeedBase - DriveSpeedMuli;", "//enclose the 2 if statements below into 1 if statement that reads", "//if leftjoystick x is between 0.1 and -0.1 do NOTHING", "//if (driveStick.getRawAxis(0) > 0.1 || driveStick.getRawAxis(0) < -0.1)", "//{", "//leftStickValue = (driveStick.getRawAxis(1)/DriveSpeedMuli) * driveSpeed;", "//rightStickValue = (driveStick.getRawAxis(5)/DriveSpeedMuli) * driveSpeed;", "//}" ]
[]
{ "returns": [], "raises": [], "params": [], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 918, 268, 6516, 556, 31461, 1435, 288, 203, 377, 202, 203, 377, 202, 759, 9056, 7251, 86, 3910, 6518, 31, 203, 377, 202, 9056, 7251, 86, 4726, 6518, 31, 203, 377, 202, 9056, 7251, 86, 3910, 6518, 31, 203, 377, 202, 9056, 7251, 86, 3910, 31, 203, 377, 202, 9056, 7251, 86, 4726, 31, 203, 377, 202, 759, 9056, 11473, 688, 16562, 2171, 31, 203, 377, 202, 9056, 11473, 688, 16562, 49, 14826, 31, 203, 377, 202, 203, 377, 202, 759, 24681, 16562, 2171, 273, 576, 18, 25, 31, 203, 377, 202, 203, 377, 202, 20143, 4726, 273, 14316, 510, 1200, 18, 588, 4809, 6558, 12, 25, 1769, 203, 377, 202, 20143, 3910, 273, 14316, 510, 1200, 18, 588, 4809, 6558, 12, 21, 1769, 203, 377, 202, 203, 377, 202, 20143, 4726, 6518, 273, 14316, 510, 1200, 18, 588, 4809, 6558, 12, 23, 1769, 203, 377, 202, 20143, 3910, 6518, 273, 14316, 510, 1200, 18, 588, 4809, 6558, 12, 22, 1769, 203, 377, 202, 203, 377, 202, 24681, 16562, 49, 14826, 273, 374, 31, 203, 377, 202, 203, 377, 202, 430, 12, 20143, 4726, 6518, 405, 374, 13, 203, 377, 202, 95, 203, 377, 202, 202, 24681, 16562, 49, 14826, 273, 261, 20143, 4726, 6518, 1769, 203, 377, 202, 203, 377, 202, 202, 759, 24681, 16562, 49, 14826, 273, 11473, 688, 16562, 2171, 300, 11473, 688, 16562, 49, 14826, 31, 203, 377, 202, 97, 203, 377, 202, 203, 377, 202, 430, 12, 20143, 3910, 6518, 405, 374, 13, 203, 377, 202, 95, 203, 377, 202, 202, 24681, 16562, 49, 14826, 273, 300, 20143, 3910, 6518, 31, 203, 377, 202, 203, 377, 202, 97, 203, 377, 202, 203, 377, 202, 23824, 14830, 18, 458, 780, 2932, 20143, 4726, 3113, 3698, 18, 10492, 12, 20143, 4726, 10019, 203, 377, 202, 23824, 14830, 18, 458, 780, 2932, 20143, 3910, 3113, 3698, 18, 10492, 12, 20143, 3910, 10019, 203, 377, 202, 23824, 14830, 18, 458, 780, 2932, 20143, 4726, 6518, 3113, 3698, 18, 10492, 12, 20143, 4726, 6518, 10019, 203, 377, 202, 23824, 14830, 18, 458, 780, 2932, 24681, 16562, 49, 14826, 3113, 3698, 18, 10492, 12, 24681, 16562, 49, 14826, 10019, 203, 377, 1082, 203, 377, 202, 9056, 2002, 24749, 280, 620, 273, 225, 374, 18, 20, 31, 203, 377, 202, 9056, 2145, 24749, 280, 620, 273, 225, 374, 18, 20, 31, 203, 377, 202, 9056, 14316, 16562, 273, 374, 18, 31, 203, 377, 202, 203, 377, 202, 759, 1331, 2061, 326, 576, 309, 6317, 5712, 1368, 404, 309, 3021, 716, 6838, 203, 377, 202, 759, 430, 2002, 30952, 1094, 1200, 619, 353, 3086, 374, 18, 21, 471, 300, 20, 18, 21, 741, 4269, 44, 1360, 203, 377, 202, 203, 377, 202, 759, 430, 261, 25431, 510, 1200, 18, 588, 4809, 6558, 12, 20, 13, 405, 374, 18, 21, 747, 14316, 510, 1200, 18, 588, 4809, 6558, 12, 20, 13, 411, 300, 20, 18, 21, 13, 203, 377, 202, 759, 95, 203, 377, 202, 202, 430, 12, 24681, 16562, 49, 14826, 405, 374, 13, 203, 377, 202, 202, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,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]
[ 1, 26873, 203, 377, 380, 1220, 445, 353, 2566, 26736, 4982, 3726, 3325, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
c214230679ddc1d3a1be9802523f243ac0cbc23d
quartzdesk/quartzdesk-ws-examples
ws-connection-example-pom/v10/src/main/java/com/quartzdesk/ws_examples/ws_connection/v10/ConnectionServiceExample.java
[ "MIT" ]
Java
printRegisteredConnection
null
private void printRegisteredConnection( SchedulerConnection connection ) throws Exception { System.out.println( "Scheduler Connection (" + connection.getId() + ')' + ", name=" + connection.getName() + ", schedulerType=" + connection.getSchedulerType() + ", host=" + connection.getRemoteJmxService().getHost() + ", port=" + connection.getRemoteJmxService().getPort() + ", objectName=" + connection.getSchedulerObjectName() ); }
/** * Prints the details of the specified scheduler connection. * * @param connection a scheduler connection. */
Prints the details of the specified scheduler connection. @param connection a scheduler connection.
[ "Prints", "the", "details", "of", "the", "specified", "scheduler", "connection", ".", "@param", "connection", "a", "scheduler", "connection", "." ]
private void printRegisteredConnection( SchedulerConnection connection ) throws Exception { System.out.println( "Scheduler Connection (" + connection.getId() + ')' + ", name=" + connection.getName() + ", schedulerType=" + connection.getSchedulerType() + ", host=" + connection.getRemoteJmxService().getHost() + ", port=" + connection.getRemoteJmxService().getPort() + ", objectName=" + connection.getSchedulerObjectName() ); }
[ "private", "void", "printRegisteredConnection", "(", "SchedulerConnection", "connection", ")", "throws", "Exception", "{", "System", ".", "out", ".", "println", "(", "\"Scheduler Connection (\"", "+", "connection", ".", "getId", "(", ")", "+", "')'", "+", "\", name=\"", "+", "connection", ".", "getName", "(", ")", "+", "\", schedulerType=\"", "+", "connection", ".", "getSchedulerType", "(", ")", "+", "\", host=\"", "+", "connection", ".", "getRemoteJmxService", "(", ")", ".", "getHost", "(", ")", "+", "\", port=\"", "+", "connection", ".", "getRemoteJmxService", "(", ")", ".", "getPort", "(", ")", "+", "\", objectName=\"", "+", "connection", ".", "getSchedulerObjectName", "(", ")", ")", ";", "}" ]
Prints the details of the specified scheduler connection.
[ "Prints", "the", "details", "of", "the", "specified", "scheduler", "connection", "." ]
[]
[ { "param": "connection", "type": "SchedulerConnection" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "connection", "type": "SchedulerConnection", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 3238, 918, 1172, 10868, 1952, 12, 12620, 1952, 1459, 262, 203, 1377, 1216, 1185, 203, 225, 288, 203, 565, 2332, 18, 659, 18, 8222, 12, 315, 11870, 4050, 7566, 397, 1459, 18, 26321, 1435, 397, 5777, 397, 203, 3639, 3104, 508, 1546, 397, 1459, 18, 17994, 1435, 397, 203, 3639, 3104, 8129, 559, 1546, 397, 1459, 18, 588, 11870, 559, 1435, 397, 203, 3639, 3104, 1479, 1546, 397, 1459, 18, 588, 5169, 46, 11023, 1179, 7675, 588, 2594, 1435, 397, 203, 3639, 3104, 1756, 1546, 397, 1459, 18, 588, 5169, 46, 11023, 1179, 7675, 588, 2617, 1435, 397, 203, 3639, 3104, 12282, 1546, 397, 1459, 18, 588, 11870, 16707, 1435, 11272, 203, 225, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 282, 380, 3038, 87, 326, 3189, 434, 326, 1269, 8129, 1459, 18, 203, 282, 380, 203, 282, 380, 632, 891, 1459, 279, 8129, 1459, 18, 203, 282, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
5317dc1ad91eacbb353a685fa6fcab2bab588df4
quartzdesk/quartzdesk-ws-examples
ws-msg-channel-profile-example-pom/v10/src/main/java/com/quartzdesk/ws_examples/ws_msg_channel_profile/v10/MessageChannelProfileServiceExample.java
[ "MIT" ]
Java
printProfile
null
private void printProfile( MessageChannelProfile profile ) throws Exception { System.out.println( "Message Channel Profile (" + profile.getId() + ')' + ", name=" + profile.getName() + ", config=" + profile.getChannelConfig() ); }
/** * Prints the details of the specified message channel profile. * * @param profile a message channel profile. */
Prints the details of the specified message channel profile. @param profile a message channel profile.
[ "Prints", "the", "details", "of", "the", "specified", "message", "channel", "profile", ".", "@param", "profile", "a", "message", "channel", "profile", "." ]
private void printProfile( MessageChannelProfile profile ) throws Exception { System.out.println( "Message Channel Profile (" + profile.getId() + ')' + ", name=" + profile.getName() + ", config=" + profile.getChannelConfig() ); }
[ "private", "void", "printProfile", "(", "MessageChannelProfile", "profile", ")", "throws", "Exception", "{", "System", ".", "out", ".", "println", "(", "\"Message Channel Profile (\"", "+", "profile", ".", "getId", "(", ")", "+", "')'", "+", "\", name=\"", "+", "profile", ".", "getName", "(", ")", "+", "\", config=\"", "+", "profile", ".", "getChannelConfig", "(", ")", ")", ";", "}" ]
Prints the details of the specified message channel profile.
[ "Prints", "the", "details", "of", "the", "specified", "message", "channel", "profile", "." ]
[]
[ { "param": "profile", "type": "MessageChannelProfile" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "profile", "type": "MessageChannelProfile", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 3238, 918, 1172, 4029, 12, 2350, 2909, 4029, 3042, 262, 203, 1377, 1216, 1185, 203, 225, 288, 203, 565, 2332, 18, 659, 18, 8222, 12, 315, 1079, 5307, 11357, 7566, 397, 3042, 18, 26321, 1435, 397, 5777, 397, 203, 3639, 3104, 508, 1546, 397, 3042, 18, 17994, 1435, 397, 203, 3639, 3104, 642, 1546, 397, 3042, 18, 588, 2909, 809, 1435, 11272, 203, 225, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 282, 380, 3038, 87, 326, 3189, 434, 326, 1269, 883, 1904, 3042, 18, 203, 282, 380, 203, 282, 380, 632, 891, 3042, 279, 883, 1904, 3042, 18, 203, 282, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
aa5da3957fd36aa70b97417d3ddebc4510b21e35
quartzdesk/quartzdesk-ws-examples
ws-quartz-example-pom/v10/src/main/java/com/quartzdesk/ws_examples/ws_quartz/v10/QuartzServiceExample.java
[ "MIT" ]
Java
printSchedulerStatus
null
private void printSchedulerStatus() throws Exception { GetSchedulerMonitorStateRequest request = new GetSchedulerMonitorStateRequest() .withConnection( SCHEDULER_CONNECTION ); GetSchedulerMonitorStateResponse response = client.getSchedulerMonitorState( request ); QuartzMonitorSchedulerState state = response.getState(); System.out.println( "State of scheduler: " + state.name() ); }
/** * Obtains the monitoring state of the Quartz scheduler and prints the status in the log. * * @throws Exception if an error occurs. */
Obtains the monitoring state of the Quartz scheduler and prints the status in the log. @throws Exception if an error occurs.
[ "Obtains", "the", "monitoring", "state", "of", "the", "Quartz", "scheduler", "and", "prints", "the", "status", "in", "the", "log", ".", "@throws", "Exception", "if", "an", "error", "occurs", "." ]
private void printSchedulerStatus() throws Exception { GetSchedulerMonitorStateRequest request = new GetSchedulerMonitorStateRequest() .withConnection( SCHEDULER_CONNECTION ); GetSchedulerMonitorStateResponse response = client.getSchedulerMonitorState( request ); QuartzMonitorSchedulerState state = response.getState(); System.out.println( "State of scheduler: " + state.name() ); }
[ "private", "void", "printSchedulerStatus", "(", ")", "throws", "Exception", "{", "GetSchedulerMonitorStateRequest", "request", "=", "new", "GetSchedulerMonitorStateRequest", "(", ")", ".", "withConnection", "(", "SCHEDULER_CONNECTION", ")", ";", "GetSchedulerMonitorStateResponse", "response", "=", "client", ".", "getSchedulerMonitorState", "(", "request", ")", ";", "QuartzMonitorSchedulerState", "state", "=", "response", ".", "getState", "(", ")", ";", "System", ".", "out", ".", "println", "(", "\"State of scheduler: \"", "+", "state", ".", "name", "(", ")", ")", ";", "}" ]
Obtains the monitoring state of the Quartz scheduler and prints the status in the log.
[ "Obtains", "the", "monitoring", "state", "of", "the", "Quartz", "scheduler", "and", "prints", "the", "status", "in", "the", "log", "." ]
[]
[]
{ "returns": [], "raises": [], "params": [], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 3238, 918, 1172, 11870, 1482, 1435, 203, 1377, 1216, 1185, 203, 225, 288, 203, 565, 968, 11870, 7187, 1119, 691, 590, 273, 394, 968, 11870, 7187, 1119, 691, 1435, 203, 3639, 263, 1918, 1952, 12, 348, 15023, 1506, 654, 67, 15461, 11272, 203, 203, 565, 968, 11870, 7187, 1119, 1064, 766, 273, 1004, 18, 588, 11870, 7187, 1119, 12, 590, 11272, 203, 565, 4783, 27202, 7187, 11870, 1119, 919, 273, 766, 18, 588, 1119, 5621, 203, 565, 2332, 18, 659, 18, 8222, 12, 315, 1119, 434, 8129, 30, 315, 397, 919, 18, 529, 1435, 11272, 203, 225, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,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 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 282, 380, 19659, 16598, 326, 16309, 919, 434, 326, 4783, 27202, 8129, 471, 14971, 326, 1267, 316, 326, 613, 18, 203, 282, 380, 203, 282, 380, 632, 15069, 1185, 309, 392, 555, 9938, 18, 203, 282, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
aa5da3957fd36aa70b97417d3ddebc4510b21e35
quartzdesk/quartzdesk-ws-examples
ws-quartz-example-pom/v10/src/main/java/com/quartzdesk/ws_examples/ws_quartz/v10/QuartzServiceExample.java
[ "MIT" ]
Java
listAllJobs
null
private void listAllJobs() throws Exception { System.out.println( "Getting the list of all jobs registered in Quartz scheduler: " + SCHEDULER_OBJECT_NAME ); GetJobDetailsRequest request = new GetJobDetailsRequest() .withConnection( SCHEDULER_CONNECTION ); GetJobDetailsResponse response = client.getJobDetails( request ); for ( QuartzJobDetail jobDetail : response.getJobDetail() ) { System.out.println( "Job: " + jobDetail.getGroup().getName() + '/' + jobDetail.getName() + ", impl class: " + jobDetail.getJobClass() + ", data map: " + jobDetail.getJobDataMap() ); } }
/** * Obtains the list of all jobs from the Quartz scheduler and dumps the list in the log. * * @throws Exception if an error occurs. */
Obtains the list of all jobs from the Quartz scheduler and dumps the list in the log. @throws Exception if an error occurs.
[ "Obtains", "the", "list", "of", "all", "jobs", "from", "the", "Quartz", "scheduler", "and", "dumps", "the", "list", "in", "the", "log", ".", "@throws", "Exception", "if", "an", "error", "occurs", "." ]
private void listAllJobs() throws Exception { System.out.println( "Getting the list of all jobs registered in Quartz scheduler: " + SCHEDULER_OBJECT_NAME ); GetJobDetailsRequest request = new GetJobDetailsRequest() .withConnection( SCHEDULER_CONNECTION ); GetJobDetailsResponse response = client.getJobDetails( request ); for ( QuartzJobDetail jobDetail : response.getJobDetail() ) { System.out.println( "Job: " + jobDetail.getGroup().getName() + '/' + jobDetail.getName() + ", impl class: " + jobDetail.getJobClass() + ", data map: " + jobDetail.getJobDataMap() ); } }
[ "private", "void", "listAllJobs", "(", ")", "throws", "Exception", "{", "System", ".", "out", ".", "println", "(", "\"Getting the list of all jobs registered in Quartz scheduler: \"", "+", "SCHEDULER_OBJECT_NAME", ")", ";", "GetJobDetailsRequest", "request", "=", "new", "GetJobDetailsRequest", "(", ")", ".", "withConnection", "(", "SCHEDULER_CONNECTION", ")", ";", "GetJobDetailsResponse", "response", "=", "client", ".", "getJobDetails", "(", "request", ")", ";", "for", "(", "QuartzJobDetail", "jobDetail", ":", "response", ".", "getJobDetail", "(", ")", ")", "{", "System", ".", "out", ".", "println", "(", "\"Job: \"", "+", "jobDetail", ".", "getGroup", "(", ")", ".", "getName", "(", ")", "+", "'/'", "+", "jobDetail", ".", "getName", "(", ")", "+", "\", impl class: \"", "+", "jobDetail", ".", "getJobClass", "(", ")", "+", "\", data map: \"", "+", "jobDetail", ".", "getJobDataMap", "(", ")", ")", ";", "}", "}" ]
Obtains the list of all jobs from the Quartz scheduler and dumps the list in the log.
[ "Obtains", "the", "list", "of", "all", "jobs", "from", "the", "Quartz", "scheduler", "and", "dumps", "the", "list", "in", "the", "log", "." ]
[]
[]
{ "returns": [], "raises": [], "params": [], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 3238, 918, 27204, 7276, 1435, 203, 1377, 1216, 1185, 203, 225, 288, 203, 565, 2332, 18, 659, 18, 8222, 12, 315, 19213, 326, 666, 434, 777, 6550, 4104, 316, 4783, 27202, 8129, 30, 315, 397, 348, 15023, 1506, 654, 67, 9422, 67, 1985, 11272, 203, 203, 565, 968, 2278, 3790, 691, 590, 273, 394, 968, 2278, 3790, 691, 1435, 203, 3639, 263, 1918, 1952, 12, 348, 15023, 1506, 654, 67, 15461, 11272, 203, 203, 565, 968, 2278, 3790, 1064, 766, 273, 1004, 18, 588, 2278, 3790, 12, 590, 11272, 203, 203, 565, 364, 261, 4783, 27202, 2278, 6109, 1719, 6109, 294, 766, 18, 588, 2278, 6109, 1435, 262, 203, 565, 288, 203, 1377, 2332, 18, 659, 18, 8222, 12, 315, 2278, 30, 315, 397, 1719, 6109, 18, 588, 1114, 7675, 17994, 1435, 397, 2023, 397, 1719, 6109, 18, 17994, 1435, 397, 203, 1850, 3104, 9380, 667, 30, 315, 397, 1719, 6109, 18, 588, 2278, 797, 1435, 397, 203, 1850, 3104, 501, 852, 30, 315, 397, 1719, 6109, 18, 588, 2278, 31982, 1435, 11272, 203, 565, 289, 203, 225, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 282, 380, 19659, 16598, 326, 666, 434, 777, 6550, 628, 326, 4783, 27202, 8129, 471, 6711, 326, 666, 316, 326, 613, 18, 203, 282, 380, 203, 282, 380, 632, 15069, 1185, 309, 392, 555, 9938, 18, 203, 282, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
aa5da3957fd36aa70b97417d3ddebc4510b21e35
quartzdesk/quartzdesk-ws-examples
ws-quartz-example-pom/v10/src/main/java/com/quartzdesk/ws_examples/ws_quartz/v10/QuartzServiceExample.java
[ "MIT" ]
Java
listAllTriggers
null
private void listAllTriggers() throws Exception { System.out.println( "Getting the list of all triggers registered in Quartz scheduler: " + SCHEDULER_OBJECT_NAME ); GetTriggersRequest request = new GetTriggersRequest() .withConnection( SCHEDULER_CONNECTION ); GetTriggersResponse response = client.getTriggers( request ); for ( QuartzTrigger trigger : response.getTrigger() ) { System.out.println( "Trigger: " + trigger.getGroup().getName() + '/' + trigger.getName() + ", type: " + trigger.getClass().getSimpleName() + ", data map: " + trigger.getJobDataMap() ); } }
/** * Obtains the list of all triggers from the Quartz scheduler and dumps the list in the log. * * @throws Exception if an error occurs. */
Obtains the list of all triggers from the Quartz scheduler and dumps the list in the log. @throws Exception if an error occurs.
[ "Obtains", "the", "list", "of", "all", "triggers", "from", "the", "Quartz", "scheduler", "and", "dumps", "the", "list", "in", "the", "log", ".", "@throws", "Exception", "if", "an", "error", "occurs", "." ]
private void listAllTriggers() throws Exception { System.out.println( "Getting the list of all triggers registered in Quartz scheduler: " + SCHEDULER_OBJECT_NAME ); GetTriggersRequest request = new GetTriggersRequest() .withConnection( SCHEDULER_CONNECTION ); GetTriggersResponse response = client.getTriggers( request ); for ( QuartzTrigger trigger : response.getTrigger() ) { System.out.println( "Trigger: " + trigger.getGroup().getName() + '/' + trigger.getName() + ", type: " + trigger.getClass().getSimpleName() + ", data map: " + trigger.getJobDataMap() ); } }
[ "private", "void", "listAllTriggers", "(", ")", "throws", "Exception", "{", "System", ".", "out", ".", "println", "(", "\"Getting the list of all triggers registered in Quartz scheduler: \"", "+", "SCHEDULER_OBJECT_NAME", ")", ";", "GetTriggersRequest", "request", "=", "new", "GetTriggersRequest", "(", ")", ".", "withConnection", "(", "SCHEDULER_CONNECTION", ")", ";", "GetTriggersResponse", "response", "=", "client", ".", "getTriggers", "(", "request", ")", ";", "for", "(", "QuartzTrigger", "trigger", ":", "response", ".", "getTrigger", "(", ")", ")", "{", "System", ".", "out", ".", "println", "(", "\"Trigger: \"", "+", "trigger", ".", "getGroup", "(", ")", ".", "getName", "(", ")", "+", "'/'", "+", "trigger", ".", "getName", "(", ")", "+", "\", type: \"", "+", "trigger", ".", "getClass", "(", ")", ".", "getSimpleName", "(", ")", "+", "\", data map: \"", "+", "trigger", ".", "getJobDataMap", "(", ")", ")", ";", "}", "}" ]
Obtains the list of all triggers from the Quartz scheduler and dumps the list in the log.
[ "Obtains", "the", "list", "of", "all", "triggers", "from", "the", "Quartz", "scheduler", "and", "dumps", "the", "list", "in", "the", "log", "." ]
[]
[]
{ "returns": [], "raises": [], "params": [], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 3238, 918, 27204, 15114, 1435, 203, 1377, 1216, 1185, 203, 225, 288, 203, 565, 2332, 18, 659, 18, 8222, 12, 315, 19213, 326, 666, 434, 777, 11752, 4104, 316, 4783, 27202, 8129, 30, 315, 397, 348, 15023, 1506, 654, 67, 9422, 67, 1985, 11272, 203, 203, 565, 968, 15114, 691, 590, 273, 394, 968, 15114, 691, 1435, 203, 3639, 263, 1918, 1952, 12, 348, 15023, 1506, 654, 67, 15461, 11272, 203, 203, 565, 968, 15114, 1064, 766, 273, 1004, 18, 588, 15114, 12, 590, 11272, 203, 203, 565, 364, 261, 4783, 27202, 6518, 3080, 294, 766, 18, 588, 6518, 1435, 262, 203, 565, 288, 203, 1377, 2332, 18, 659, 18, 8222, 12, 315, 6518, 30, 315, 397, 3080, 18, 588, 1114, 7675, 17994, 1435, 397, 2023, 397, 3080, 18, 17994, 1435, 397, 203, 1850, 3104, 618, 30, 315, 397, 3080, 18, 588, 797, 7675, 588, 5784, 461, 1435, 397, 203, 1850, 3104, 501, 852, 30, 315, 397, 3080, 18, 588, 2278, 31982, 1435, 11272, 203, 565, 289, 203, 225, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,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 380, 19659, 16598, 326, 666, 434, 777, 11752, 628, 326, 4783, 27202, 8129, 471, 6711, 326, 666, 316, 326, 613, 18, 203, 282, 380, 203, 282, 380, 632, 15069, 1185, 309, 392, 555, 9938, 18, 203, 282, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
aa5da3957fd36aa70b97417d3ddebc4510b21e35
quartzdesk/quartzdesk-ws-examples
ws-quartz-example-pom/v10/src/main/java/com/quartzdesk/ws_examples/ws_quartz/v10/QuartzServiceExample.java
[ "MIT" ]
Java
addNewJob
null
private void addNewJob() throws Exception { System.out.println( "Adding test job to Quartz scheduler: " + SCHEDULER_OBJECT_NAME ); AddJobRequest request = new AddJobRequest() .withConnection( SCHEDULER_CONNECTION ) .withJobDetail( new QuartzJobDetail() .withGroup( new QuartzJobGroup().withName( "test" ) ) .withName( "SampleQuartzServiceClientTestJob" ) .withJobClass( "com.quartzdesk.test.quartz.v2.TestJob" ) .withDurability( true ) .withShouldRecover( false ) .withJobDataMap( new QuartzJobDataMap() .withEntry( new QuartzJobDataMapEntry() .withName( "testKey" ) .withValue( "testValue" ) ) ) ); AddJobResponse response = client.addJob( request ); System.out.println( "Successfully added new job: " + request.getJobDetail().getGroup().getName() + '/' + request.getJobDetail().getName() ); }
/** * Adds a new job test/SampleQuartzServiceClientTestJob to the Quartz scheduler. * * @throws Exception if an error occurs. */
Adds a new job test/SampleQuartzServiceClientTestJob to the Quartz scheduler. @throws Exception if an error occurs.
[ "Adds", "a", "new", "job", "test", "/", "SampleQuartzServiceClientTestJob", "to", "the", "Quartz", "scheduler", ".", "@throws", "Exception", "if", "an", "error", "occurs", "." ]
private void addNewJob() throws Exception { System.out.println( "Adding test job to Quartz scheduler: " + SCHEDULER_OBJECT_NAME ); AddJobRequest request = new AddJobRequest() .withConnection( SCHEDULER_CONNECTION ) .withJobDetail( new QuartzJobDetail() .withGroup( new QuartzJobGroup().withName( "test" ) ) .withName( "SampleQuartzServiceClientTestJob" ) .withJobClass( "com.quartzdesk.test.quartz.v2.TestJob" ) .withDurability( true ) .withShouldRecover( false ) .withJobDataMap( new QuartzJobDataMap() .withEntry( new QuartzJobDataMapEntry() .withName( "testKey" ) .withValue( "testValue" ) ) ) ); AddJobResponse response = client.addJob( request ); System.out.println( "Successfully added new job: " + request.getJobDetail().getGroup().getName() + '/' + request.getJobDetail().getName() ); }
[ "private", "void", "addNewJob", "(", ")", "throws", "Exception", "{", "System", ".", "out", ".", "println", "(", "\"Adding test job to Quartz scheduler: \"", "+", "SCHEDULER_OBJECT_NAME", ")", ";", "AddJobRequest", "request", "=", "new", "AddJobRequest", "(", ")", ".", "withConnection", "(", "SCHEDULER_CONNECTION", ")", ".", "withJobDetail", "(", "new", "QuartzJobDetail", "(", ")", ".", "withGroup", "(", "new", "QuartzJobGroup", "(", ")", ".", "withName", "(", "\"test\"", ")", ")", ".", "withName", "(", "\"SampleQuartzServiceClientTestJob\"", ")", ".", "withJobClass", "(", "\"com.quartzdesk.test.quartz.v2.TestJob\"", ")", ".", "withDurability", "(", "true", ")", ".", "withShouldRecover", "(", "false", ")", ".", "withJobDataMap", "(", "new", "QuartzJobDataMap", "(", ")", ".", "withEntry", "(", "new", "QuartzJobDataMapEntry", "(", ")", ".", "withName", "(", "\"testKey\"", ")", ".", "withValue", "(", "\"testValue\"", ")", ")", ")", ")", ";", "AddJobResponse", "response", "=", "client", ".", "addJob", "(", "request", ")", ";", "System", ".", "out", ".", "println", "(", "\"Successfully added new job: \"", "+", "request", ".", "getJobDetail", "(", ")", ".", "getGroup", "(", ")", ".", "getName", "(", ")", "+", "'/'", "+", "request", ".", "getJobDetail", "(", ")", ".", "getName", "(", ")", ")", ";", "}" ]
Adds a new job test/SampleQuartzServiceClientTestJob to the Quartz scheduler.
[ "Adds", "a", "new", "job", "test", "/", "SampleQuartzServiceClientTestJob", "to", "the", "Quartz", "scheduler", "." ]
[]
[]
{ "returns": [], "raises": [], "params": [], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 3238, 918, 20973, 2278, 1435, 203, 1377, 1216, 1185, 203, 225, 288, 203, 565, 2332, 18, 659, 18, 8222, 12, 315, 13962, 1842, 1719, 358, 4783, 27202, 8129, 30, 315, 397, 348, 15023, 1506, 654, 67, 9422, 67, 1985, 11272, 203, 203, 565, 1436, 16568, 590, 273, 394, 1436, 16568, 1435, 203, 3639, 263, 1918, 1952, 12, 348, 15023, 1506, 654, 67, 15461, 262, 203, 203, 3639, 263, 1918, 2278, 6109, 12, 394, 4783, 27202, 2278, 6109, 1435, 203, 5411, 263, 1918, 1114, 12, 394, 4783, 27202, 2278, 1114, 7675, 1918, 461, 12, 315, 3813, 6, 262, 262, 203, 5411, 263, 1918, 461, 12, 315, 8504, 12099, 94, 1179, 1227, 4709, 2278, 6, 262, 203, 5411, 263, 1918, 2278, 797, 12, 315, 832, 18, 372, 27202, 5489, 79, 18, 3813, 18, 372, 27202, 18, 90, 22, 18, 4709, 2278, 6, 262, 203, 5411, 263, 1918, 40, 295, 2967, 12, 638, 262, 203, 5411, 263, 1918, 14309, 27622, 12, 629, 262, 203, 203, 5411, 263, 1918, 2278, 31982, 12, 394, 4783, 27202, 2278, 31982, 1435, 203, 7734, 263, 1918, 1622, 12, 394, 4783, 27202, 2278, 31982, 1622, 1435, 203, 10792, 263, 1918, 461, 12, 315, 3813, 653, 6, 262, 203, 10792, 263, 1918, 620, 12, 315, 3813, 620, 6, 262, 262, 262, 11272, 203, 203, 565, 1436, 2278, 1064, 766, 273, 1004, 18, 1289, 2278, 12, 590, 11272, 203, 203, 565, 2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 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 282, 380, 15605, 279, 394, 1719, 1842, 19, 8504, 12099, 94, 1179, 1227, 4709, 2278, 358, 326, 4783, 27202, 8129, 18, 203, 282, 380, 203, 282, 380, 632, 15069, 1185, 309, 392, 555, 9938, 18, 203, 282, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
aa5da3957fd36aa70b97417d3ddebc4510b21e35
quartzdesk/quartzdesk-ws-examples
ws-quartz-example-pom/v10/src/main/java/com/quartzdesk/ws_examples/ws_quartz/v10/QuartzServiceExample.java
[ "MIT" ]
Java
triggerJob
null
private void triggerJob() throws Exception { System.out.println( "Triggering test job in Quartz scheduler: " + SCHEDULER_OBJECT_NAME ); TriggerJobRequest request = new TriggerJobRequest() .withConnection( SCHEDULER_CONNECTION ) .withJobName( "SampleQuartzServiceClientTestJob" ) .withJobGroupName( "test" ) .withJobDataMap( new QuartzJobDataMap() .withEntry( new QuartzJobDataMapEntry() .withName( "newTestKey" ) .withValue( "newTestValue" ) ) ); TriggerJobResponse response = client.triggerJob( request ); System.out.println( "Successfully triggered job: " + request.getJobGroupName() + '/' + request.getJobName() ); }
/** * Triggers the added job test/SampleQuartzServiceClientTestJob in the Quartz scheduler. * * @throws Exception if an error occurs. */
Triggers the added job test/SampleQuartzServiceClientTestJob in the Quartz scheduler. @throws Exception if an error occurs.
[ "Triggers", "the", "added", "job", "test", "/", "SampleQuartzServiceClientTestJob", "in", "the", "Quartz", "scheduler", ".", "@throws", "Exception", "if", "an", "error", "occurs", "." ]
private void triggerJob() throws Exception { System.out.println( "Triggering test job in Quartz scheduler: " + SCHEDULER_OBJECT_NAME ); TriggerJobRequest request = new TriggerJobRequest() .withConnection( SCHEDULER_CONNECTION ) .withJobName( "SampleQuartzServiceClientTestJob" ) .withJobGroupName( "test" ) .withJobDataMap( new QuartzJobDataMap() .withEntry( new QuartzJobDataMapEntry() .withName( "newTestKey" ) .withValue( "newTestValue" ) ) ); TriggerJobResponse response = client.triggerJob( request ); System.out.println( "Successfully triggered job: " + request.getJobGroupName() + '/' + request.getJobName() ); }
[ "private", "void", "triggerJob", "(", ")", "throws", "Exception", "{", "System", ".", "out", ".", "println", "(", "\"Triggering test job in Quartz scheduler: \"", "+", "SCHEDULER_OBJECT_NAME", ")", ";", "TriggerJobRequest", "request", "=", "new", "TriggerJobRequest", "(", ")", ".", "withConnection", "(", "SCHEDULER_CONNECTION", ")", ".", "withJobName", "(", "\"SampleQuartzServiceClientTestJob\"", ")", ".", "withJobGroupName", "(", "\"test\"", ")", ".", "withJobDataMap", "(", "new", "QuartzJobDataMap", "(", ")", ".", "withEntry", "(", "new", "QuartzJobDataMapEntry", "(", ")", ".", "withName", "(", "\"newTestKey\"", ")", ".", "withValue", "(", "\"newTestValue\"", ")", ")", ")", ";", "TriggerJobResponse", "response", "=", "client", ".", "triggerJob", "(", "request", ")", ";", "System", ".", "out", ".", "println", "(", "\"Successfully triggered job: \"", "+", "request", ".", "getJobGroupName", "(", ")", "+", "'/'", "+", "request", ".", "getJobName", "(", ")", ")", ";", "}" ]
Triggers the added job test/SampleQuartzServiceClientTestJob in the Quartz scheduler.
[ "Triggers", "the", "added", "job", "test", "/", "SampleQuartzServiceClientTestJob", "in", "the", "Quartz", "scheduler", "." ]
[]
[]
{ "returns": [], "raises": [], "params": [], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 3238, 918, 3080, 2278, 1435, 203, 1377, 1216, 1185, 203, 225, 288, 203, 565, 2332, 18, 659, 18, 8222, 12, 315, 6518, 310, 1842, 1719, 316, 4783, 27202, 8129, 30, 315, 397, 348, 15023, 1506, 654, 67, 9422, 67, 1985, 11272, 203, 203, 565, 11321, 16568, 590, 273, 394, 11321, 16568, 1435, 203, 3639, 263, 1918, 1952, 12, 348, 15023, 1506, 654, 67, 15461, 262, 203, 203, 3639, 263, 1918, 29425, 12, 315, 8504, 12099, 94, 1179, 1227, 4709, 2278, 6, 262, 203, 3639, 263, 1918, 2278, 3943, 12, 315, 3813, 6, 262, 203, 3639, 263, 1918, 2278, 31982, 12, 394, 4783, 27202, 2278, 31982, 1435, 203, 5411, 263, 1918, 1622, 12, 394, 4783, 27202, 2278, 31982, 1622, 1435, 203, 7734, 263, 1918, 461, 12, 315, 2704, 4709, 653, 6, 262, 203, 7734, 263, 1918, 620, 12, 315, 2704, 4709, 620, 6, 262, 262, 11272, 203, 203, 565, 11321, 2278, 1064, 766, 273, 1004, 18, 10668, 2278, 12, 590, 11272, 203, 203, 565, 2332, 18, 659, 18, 8222, 12, 315, 18303, 10861, 1719, 30, 315, 397, 590, 18, 588, 2278, 3943, 1435, 397, 2023, 397, 590, 18, 588, 29425, 1435, 11272, 203, 225, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,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 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 282, 380, 840, 8060, 326, 3096, 1719, 1842, 19, 8504, 12099, 94, 1179, 1227, 4709, 2278, 316, 326, 4783, 27202, 8129, 18, 203, 282, 380, 203, 282, 380, 632, 15069, 1185, 309, 392, 555, 9938, 18, 203, 282, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
aa5da3957fd36aa70b97417d3ddebc4510b21e35
quartzdesk/quartzdesk-ws-examples
ws-quartz-example-pom/v10/src/main/java/com/quartzdesk/ws_examples/ws_quartz/v10/QuartzServiceExample.java
[ "MIT" ]
Java
deleteJob
null
private void deleteJob() throws Exception { System.out.println( "Removing test job from Quartz scheduler: " + SCHEDULER_OBJECT_NAME ); DeleteJobRequest request = new DeleteJobRequest() .withConnection( SCHEDULER_CONNECTION ) .withJobName( "SampleQuartzServiceClientTestJob" ) .withJobGroupName( "test" ); DeleteJobResponse response = client.deleteJob( request ); System.out.println( "Successfully deleted job: " + request.getJobGroupName() + '/' + request.getJobName() ); }
/** * Deletes the added job test/SampleQuartzServiceClientTestJob from the Quartz scheduler. * * @throws Exception if an error occurs. */
Deletes the added job test/SampleQuartzServiceClientTestJob from the Quartz scheduler. @throws Exception if an error occurs.
[ "Deletes", "the", "added", "job", "test", "/", "SampleQuartzServiceClientTestJob", "from", "the", "Quartz", "scheduler", ".", "@throws", "Exception", "if", "an", "error", "occurs", "." ]
private void deleteJob() throws Exception { System.out.println( "Removing test job from Quartz scheduler: " + SCHEDULER_OBJECT_NAME ); DeleteJobRequest request = new DeleteJobRequest() .withConnection( SCHEDULER_CONNECTION ) .withJobName( "SampleQuartzServiceClientTestJob" ) .withJobGroupName( "test" ); DeleteJobResponse response = client.deleteJob( request ); System.out.println( "Successfully deleted job: " + request.getJobGroupName() + '/' + request.getJobName() ); }
[ "private", "void", "deleteJob", "(", ")", "throws", "Exception", "{", "System", ".", "out", ".", "println", "(", "\"Removing test job from Quartz scheduler: \"", "+", "SCHEDULER_OBJECT_NAME", ")", ";", "DeleteJobRequest", "request", "=", "new", "DeleteJobRequest", "(", ")", ".", "withConnection", "(", "SCHEDULER_CONNECTION", ")", ".", "withJobName", "(", "\"SampleQuartzServiceClientTestJob\"", ")", ".", "withJobGroupName", "(", "\"test\"", ")", ";", "DeleteJobResponse", "response", "=", "client", ".", "deleteJob", "(", "request", ")", ";", "System", ".", "out", ".", "println", "(", "\"Successfully deleted job: \"", "+", "request", ".", "getJobGroupName", "(", ")", "+", "'/'", "+", "request", ".", "getJobName", "(", ")", ")", ";", "}" ]
Deletes the added job test/SampleQuartzServiceClientTestJob from the Quartz scheduler.
[ "Deletes", "the", "added", "job", "test", "/", "SampleQuartzServiceClientTestJob", "from", "the", "Quartz", "scheduler", "." ]
[]
[]
{ "returns": [], "raises": [], "params": [], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 3238, 918, 1430, 2278, 1435, 203, 1377, 1216, 1185, 203, 225, 288, 203, 565, 2332, 18, 659, 18, 8222, 12, 315, 18939, 1842, 1719, 628, 4783, 27202, 8129, 30, 315, 397, 348, 15023, 1506, 654, 67, 9422, 67, 1985, 11272, 203, 203, 565, 2504, 16568, 590, 273, 394, 2504, 16568, 1435, 203, 3639, 263, 1918, 1952, 12, 348, 15023, 1506, 654, 67, 15461, 262, 203, 203, 3639, 263, 1918, 29425, 12, 315, 8504, 12099, 94, 1179, 1227, 4709, 2278, 6, 262, 203, 3639, 263, 1918, 2278, 3943, 12, 315, 3813, 6, 11272, 203, 203, 565, 2504, 2278, 1064, 766, 273, 1004, 18, 3733, 2278, 12, 590, 11272, 203, 203, 565, 2332, 18, 659, 18, 8222, 12, 315, 18303, 4282, 1719, 30, 315, 397, 590, 18, 588, 2278, 3943, 1435, 397, 2023, 397, 590, 18, 588, 29425, 1435, 11272, 203, 225, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 282, 380, 17973, 326, 3096, 1719, 1842, 19, 8504, 12099, 94, 1179, 1227, 4709, 2278, 628, 326, 4783, 27202, 8129, 18, 203, 282, 380, 203, 282, 380, 632, 15069, 1185, 309, 392, 555, 9938, 18, 203, 282, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
a1ff87fa716c4c97e02f35632fba01b72ff1abb8
InnovateUKGitHub/innovation-funding-service
ifs-web-service/ifs-project-setup-mgt-service/src/main/java/org/innovateuk/ifs/project/activitylog/populator/ActivityLogUrlHelper.java
[ "MIT" ]
Java
linkInvalidIfOrganisationRemoved
null
public static boolean linkInvalidIfOrganisationRemoved(ActivityLogResource log) { return log.getOrganisation() != null && log.getActivityType() != ActivityType.ORGANISATION_REMOVED && log.getActivityType() != ActivityType.ORGANISATION_ADDED; }
/** * Determines whether the link is invalid once an organisation is removed. * @param log * @return */
Determines whether the link is invalid once an organisation is removed. @param log @return
[ "Determines", "whether", "the", "link", "is", "invalid", "once", "an", "organisation", "is", "removed", ".", "@param", "log", "@return" ]
public static boolean linkInvalidIfOrganisationRemoved(ActivityLogResource log) { return log.getOrganisation() != null && log.getActivityType() != ActivityType.ORGANISATION_REMOVED && log.getActivityType() != ActivityType.ORGANISATION_ADDED; }
[ "public", "static", "boolean", "linkInvalidIfOrganisationRemoved", "(", "ActivityLogResource", "log", ")", "{", "return", "log", ".", "getOrganisation", "(", ")", "!=", "null", "&&", "log", ".", "getActivityType", "(", ")", "!=", "ActivityType", ".", "ORGANISATION_REMOVED", "&&", "log", ".", "getActivityType", "(", ")", "!=", "ActivityType", ".", "ORGANISATION_ADDED", ";", "}" ]
Determines whether the link is invalid once an organisation is removed.
[ "Determines", "whether", "the", "link", "is", "invalid", "once", "an", "organisation", "is", "removed", "." ]
[]
[ { "param": "log", "type": "ActivityLogResource" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "log", "type": "ActivityLogResource", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 760, 1250, 1692, 1941, 2047, 6001, 304, 10742, 10026, 12, 6193, 1343, 1420, 613, 13, 288, 203, 3639, 327, 613, 18, 588, 6001, 304, 10742, 1435, 480, 446, 203, 7734, 597, 613, 18, 588, 6193, 559, 1435, 480, 9621, 559, 18, 25071, 1258, 5127, 2689, 67, 11122, 12135, 203, 7734, 597, 613, 18, 588, 6193, 559, 1435, 480, 9621, 559, 18, 25071, 1258, 5127, 2689, 67, 1880, 7660, 31, 203, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 377, 380, 30778, 2856, 326, 1692, 353, 2057, 3647, 392, 15501, 10742, 353, 3723, 18, 203, 377, 380, 632, 891, 613, 203, 377, 380, 632, 2463, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
2e8c600d4d4ec8d6e8ce34f6d7ceb3dfbbd78d4f
InnovateUKGitHub/innovation-funding-service
ifs-registration-service/src/main/java/org/innovateuk/ifs/shibboleth/api/services/IdentityServices.java
[ "MIT" ]
Java
testPasswordPolicy
null
@PostConstruct public void testPasswordPolicy() { if (ldapProperties.getRequireValidPPolicy()) { try { getPwdLockoutDuration(); } catch (PasswordPolicyException e) { throw new RuntimeException(e); } } }
/** * checks that the password policy can be retrieved from the LDAP server. If the 'requireValidPPolicy' * flag is true, the application will only start if it can successfully retrieve and parse the password lockout time */
checks that the password policy can be retrieved from the LDAP server. If the 'requireValidPPolicy' flag is true, the application will only start if it can successfully retrieve and parse the password lockout time
[ "checks", "that", "the", "password", "policy", "can", "be", "retrieved", "from", "the", "LDAP", "server", ".", "If", "the", "'", "requireValidPPolicy", "'", "flag", "is", "true", "the", "application", "will", "only", "start", "if", "it", "can", "successfully", "retrieve", "and", "parse", "the", "password", "lockout", "time" ]
@PostConstruct public void testPasswordPolicy() { if (ldapProperties.getRequireValidPPolicy()) { try { getPwdLockoutDuration(); } catch (PasswordPolicyException e) { throw new RuntimeException(e); } } }
[ "@", "PostConstruct", "public", "void", "testPasswordPolicy", "(", ")", "{", "if", "(", "ldapProperties", ".", "getRequireValidPPolicy", "(", ")", ")", "{", "try", "{", "getPwdLockoutDuration", "(", ")", ";", "}", "catch", "(", "PasswordPolicyException", "e", ")", "{", "throw", "new", "RuntimeException", "(", "e", ")", ";", "}", "}", "}" ]
checks that the password policy can be retrieved from the LDAP server.
[ "checks", "that", "the", "password", "policy", "can", "be", "retrieved", "from", "the", "LDAP", "server", "." ]
[]
[]
{ "returns": [], "raises": [], "params": [], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 632, 3349, 7249, 203, 565, 1071, 918, 1842, 3913, 2582, 1435, 288, 203, 3639, 309, 261, 14394, 2297, 18, 588, 8115, 1556, 52, 2582, 10756, 288, 203, 5411, 775, 288, 203, 7734, 1689, 3623, 2531, 659, 5326, 5621, 203, 5411, 289, 1044, 261, 3913, 2582, 503, 425, 13, 288, 203, 7734, 604, 394, 3235, 12, 73, 1769, 203, 5411, 289, 203, 3639, 289, 203, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 377, 380, 4271, 716, 326, 2201, 3329, 848, 506, 10295, 628, 326, 11916, 1438, 18, 971, 326, 296, 6528, 1556, 52, 2582, 11, 203, 377, 380, 2982, 353, 638, 16, 326, 2521, 903, 1338, 787, 309, 518, 848, 4985, 4614, 471, 1109, 326, 2201, 2176, 659, 813, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
2e8c600d4d4ec8d6e8ce34f6d7ceb3dfbbd78d4f
InnovateUKGitHub/innovation-funding-service
ifs-registration-service/src/main/java/org/innovateuk/ifs/shibboleth/api/services/IdentityServices.java
[ "MIT" ]
Java
unlockAccount
null
public void unlockAccount(final UUID uuid) { final Attributes lockAttributes = getPwdAccountLockedTimeAttributes(uuid); if (lockAttributes != null && lockAttributes.size() > 0) { ContextExecutor executor = new ContextExecutor() { @Override public Object executeWithContext(DirContext dc) throws NamingException { if (lockAttributes.size() > 0) { // there's one or more lockedUntil attrib in this user - remove them all dc.modifyAttributes(new LdapName("uid=" + uuid.toString()), DirContext.REMOVE_ATTRIBUTE, lockAttributes); } return null; } }; ldapTemplate.executeReadWrite(executor); } }
/** * Unlock an account which has been locked with the pwdAccountLockedTime operational attribute. * This removes the attribute if it's been set. * @param uuid the user LDAP uid * */
Unlock an account which has been locked with the pwdAccountLockedTime operational attribute. This removes the attribute if it's been set. @param uuid the user LDAP uid
[ "Unlock", "an", "account", "which", "has", "been", "locked", "with", "the", "pwdAccountLockedTime", "operational", "attribute", ".", "This", "removes", "the", "attribute", "if", "it", "'", "s", "been", "set", ".", "@param", "uuid", "the", "user", "LDAP", "uid" ]
public void unlockAccount(final UUID uuid) { final Attributes lockAttributes = getPwdAccountLockedTimeAttributes(uuid); if (lockAttributes != null && lockAttributes.size() > 0) { ContextExecutor executor = new ContextExecutor() { @Override public Object executeWithContext(DirContext dc) throws NamingException { if (lockAttributes.size() > 0) { dc.modifyAttributes(new LdapName("uid=" + uuid.toString()), DirContext.REMOVE_ATTRIBUTE, lockAttributes); } return null; } }; ldapTemplate.executeReadWrite(executor); } }
[ "public", "void", "unlockAccount", "(", "final", "UUID", "uuid", ")", "{", "final", "Attributes", "lockAttributes", "=", "getPwdAccountLockedTimeAttributes", "(", "uuid", ")", ";", "if", "(", "lockAttributes", "!=", "null", "&&", "lockAttributes", ".", "size", "(", ")", ">", "0", ")", "{", "ContextExecutor", "executor", "=", "new", "ContextExecutor", "(", ")", "{", "@", "Override", "public", "Object", "executeWithContext", "(", "DirContext", "dc", ")", "throws", "NamingException", "{", "if", "(", "lockAttributes", ".", "size", "(", ")", ">", "0", ")", "{", "dc", ".", "modifyAttributes", "(", "new", "LdapName", "(", "\"uid=\"", "+", "uuid", ".", "toString", "(", ")", ")", ",", "DirContext", ".", "REMOVE_ATTRIBUTE", ",", "lockAttributes", ")", ";", "}", "return", "null", ";", "}", "}", ";", "ldapTemplate", ".", "executeReadWrite", "(", "executor", ")", ";", "}", "}" ]
Unlock an account which has been locked with the pwdAccountLockedTime operational attribute.
[ "Unlock", "an", "account", "which", "has", "been", "locked", "with", "the", "pwdAccountLockedTime", "operational", "attribute", "." ]
[ "// there's one or more lockedUntil attrib in this user - remove them all" ]
[ { "param": "uuid", "type": "UUID" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "uuid", "type": "UUID", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 918, 7186, 3032, 12, 6385, 5866, 3822, 13, 288, 203, 3639, 727, 9055, 2176, 2498, 273, 1689, 3623, 3032, 8966, 950, 2498, 12, 7080, 1769, 203, 3639, 309, 261, 739, 2498, 480, 446, 597, 2176, 2498, 18, 1467, 1435, 405, 374, 13, 288, 203, 5411, 1772, 6325, 6601, 273, 394, 1772, 6325, 1435, 288, 203, 203, 7734, 632, 6618, 203, 7734, 1071, 1033, 1836, 4772, 12, 1621, 1042, 6744, 13, 1216, 26890, 288, 203, 10792, 309, 261, 739, 2498, 18, 1467, 1435, 405, 374, 13, 288, 203, 13491, 368, 1915, 1807, 1245, 578, 1898, 8586, 9716, 5885, 316, 333, 729, 300, 1206, 2182, 777, 203, 13491, 6744, 18, 17042, 2498, 12, 2704, 18053, 461, 2932, 1911, 1546, 397, 3822, 18, 10492, 1435, 3631, 8446, 1042, 18, 22122, 67, 11616, 16, 2176, 2498, 1769, 203, 10792, 289, 203, 10792, 327, 446, 31, 203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 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 377, 380, 3967, 392, 2236, 1492, 711, 2118, 8586, 598, 326, 14720, 3032, 8966, 950, 1674, 287, 1566, 18, 203, 377, 380, 1220, 7157, 326, 1566, 309, 518, 1807, 2118, 444, 18, 203, 377, 380, 632, 891, 3822, 326, 729, 11916, 4555, 203, 377, 380, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
fad209a0f5b2bce73a2a9d8d37ed072bcbd23243
InnovateUKGitHub/innovation-funding-service
ifs-data-layer/ifs-data-service/src/main/java/org/innovateuk/ifs/token/transactional/TokenServiceImpl.java
[ "MIT" ]
Java
handleExtraAttributes
null
@Override @Transactional public ServiceResult<ApplicationResource> handleExtraAttributes(Token token) { ServiceResult<ApplicationResource> applicationResourceServiceResult = null; JsonNode extraInfo = token.getExtraInfo(); if (User.class.getName().equals(token.getClassName()) && extraInfo.has("competitionId")) { Long competitionId = extraInfo.get("competitionId").asLong(); Long organisationId = extraInfo.get("organisationId").asLong(); if (competitionId != null && competitionId != 0L && organisationId != null && organisationId != 0) { applicationResourceServiceResult = applicationService.createApplicationByApplicationNameForUserIdAndCompetitionId("", competitionId, token.getClassPk(), organisationId); } } return applicationResourceServiceResult; }
/** * if there are extra attributes in the token, then maybe we need to create a new application, or add the user to a application. * * @return */
if there are extra attributes in the token, then maybe we need to create a new application, or add the user to a application. @return
[ "if", "there", "are", "extra", "attributes", "in", "the", "token", "then", "maybe", "we", "need", "to", "create", "a", "new", "application", "or", "add", "the", "user", "to", "a", "application", ".", "@return" ]
@Override @Transactional public ServiceResult<ApplicationResource> handleExtraAttributes(Token token) { ServiceResult<ApplicationResource> applicationResourceServiceResult = null; JsonNode extraInfo = token.getExtraInfo(); if (User.class.getName().equals(token.getClassName()) && extraInfo.has("competitionId")) { Long competitionId = extraInfo.get("competitionId").asLong(); Long organisationId = extraInfo.get("organisationId").asLong(); if (competitionId != null && competitionId != 0L && organisationId != null && organisationId != 0) { applicationResourceServiceResult = applicationService.createApplicationByApplicationNameForUserIdAndCompetitionId("", competitionId, token.getClassPk(), organisationId); } } return applicationResourceServiceResult; }
[ "@", "Override", "@", "Transactional", "public", "ServiceResult", "<", "ApplicationResource", ">", "handleExtraAttributes", "(", "Token", "token", ")", "{", "ServiceResult", "<", "ApplicationResource", ">", "applicationResourceServiceResult", "=", "null", ";", "JsonNode", "extraInfo", "=", "token", ".", "getExtraInfo", "(", ")", ";", "if", "(", "User", ".", "class", ".", "getName", "(", ")", ".", "equals", "(", "token", ".", "getClassName", "(", ")", ")", "&&", "extraInfo", ".", "has", "(", "\"competitionId\"", ")", ")", "{", "Long", "competitionId", "=", "extraInfo", ".", "get", "(", "\"competitionId\"", ")", ".", "asLong", "(", ")", ";", "Long", "organisationId", "=", "extraInfo", ".", "get", "(", "\"organisationId\"", ")", ".", "asLong", "(", ")", ";", "if", "(", "competitionId", "!=", "null", "&&", "competitionId", "!=", "0L", "&&", "organisationId", "!=", "null", "&&", "organisationId", "!=", "0", ")", "{", "applicationResourceServiceResult", "=", "applicationService", ".", "createApplicationByApplicationNameForUserIdAndCompetitionId", "(", "\"\"", ",", "competitionId", ",", "token", ".", "getClassPk", "(", ")", ",", "organisationId", ")", ";", "}", "}", "return", "applicationResourceServiceResult", ";", "}" ]
if there are extra attributes in the token, then maybe we need to create a new application, or add the user to a application.
[ "if", "there", "are", "extra", "attributes", "in", "the", "token", "then", "maybe", "we", "need", "to", "create", "a", "new", "application", "or", "add", "the", "user", "to", "a", "application", "." ]
[]
[ { "param": "token", "type": "Token" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "token", "type": "Token", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 632, 6618, 203, 565, 632, 3342, 287, 203, 565, 1071, 1956, 1253, 32, 3208, 1420, 34, 1640, 7800, 2498, 12, 1345, 1147, 13, 288, 203, 3639, 1956, 1253, 32, 3208, 1420, 34, 2521, 1420, 1179, 1253, 273, 446, 31, 203, 203, 3639, 18157, 2870, 966, 273, 1147, 18, 588, 7800, 966, 5621, 203, 3639, 309, 261, 1299, 18, 1106, 18, 17994, 7675, 14963, 12, 2316, 18, 588, 3834, 10756, 597, 2870, 966, 18, 5332, 2932, 31942, 608, 548, 6, 3719, 288, 203, 5411, 3407, 25163, 608, 548, 273, 2870, 966, 18, 588, 2932, 31942, 608, 548, 20387, 345, 3708, 5621, 203, 5411, 3407, 15501, 10742, 548, 273, 2870, 966, 18, 588, 2932, 22543, 10742, 548, 20387, 345, 3708, 5621, 203, 5411, 309, 261, 31942, 608, 548, 480, 446, 597, 25163, 608, 548, 480, 374, 48, 597, 15501, 10742, 548, 480, 446, 597, 15501, 10742, 548, 480, 374, 13, 288, 203, 7734, 2521, 1420, 1179, 1253, 273, 2521, 1179, 18, 2640, 3208, 858, 3208, 461, 1290, 10502, 1876, 2945, 278, 608, 548, 2932, 3113, 25163, 608, 548, 16, 1147, 18, 588, 797, 7789, 9334, 15501, 10742, 548, 1769, 203, 5411, 289, 203, 3639, 289, 203, 203, 3639, 327, 2521, 1420, 1179, 1253, 31, 203, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 377, 380, 309, 1915, 854, 2870, 1677, 316, 326, 1147, 16, 1508, 6944, 732, 1608, 358, 752, 279, 394, 2521, 16, 578, 527, 326, 729, 358, 279, 2521, 18, 203, 377, 380, 203, 377, 380, 632, 2463, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
07284ea0b27f246c348b8bb0db74ce554b5f0697
InnovateUKGitHub/innovation-funding-service
ifs-data-layer/ifs-data-service/src/main/java/org/innovateuk/ifs/application/security/ApplicationSecurityHelper.java
[ "MIT" ]
Java
canViewApplication
null
public boolean canViewApplication(long applicationId, UserResource user) { return isInternal(user) || hasProcessRole(applicationId, user) || isInterviewAssessor(applicationId, user) || isExternalFinance(applicationId, user) || isMonitoringOfficerForProjectLinkedToApplication(applicationId, user.getId()) || isStakeHolder(applicationId, user) || isSupporterForApplication(applicationId, user.getId()) || isLinkedToProject(applicationId, user); }
/** * This method can be used anywhere giving permission for a user to see an application and related data. */
This method can be used anywhere giving permission for a user to see an application and related data.
[ "This", "method", "can", "be", "used", "anywhere", "giving", "permission", "for", "a", "user", "to", "see", "an", "application", "and", "related", "data", "." ]
public boolean canViewApplication(long applicationId, UserResource user) { return isInternal(user) || hasProcessRole(applicationId, user) || isInterviewAssessor(applicationId, user) || isExternalFinance(applicationId, user) || isMonitoringOfficerForProjectLinkedToApplication(applicationId, user.getId()) || isStakeHolder(applicationId, user) || isSupporterForApplication(applicationId, user.getId()) || isLinkedToProject(applicationId, user); }
[ "public", "boolean", "canViewApplication", "(", "long", "applicationId", ",", "UserResource", "user", ")", "{", "return", "isInternal", "(", "user", ")", "||", "hasProcessRole", "(", "applicationId", ",", "user", ")", "||", "isInterviewAssessor", "(", "applicationId", ",", "user", ")", "||", "isExternalFinance", "(", "applicationId", ",", "user", ")", "||", "isMonitoringOfficerForProjectLinkedToApplication", "(", "applicationId", ",", "user", ".", "getId", "(", ")", ")", "||", "isStakeHolder", "(", "applicationId", ",", "user", ")", "||", "isSupporterForApplication", "(", "applicationId", ",", "user", ".", "getId", "(", ")", ")", "||", "isLinkedToProject", "(", "applicationId", ",", "user", ")", ";", "}" ]
This method can be used anywhere giving permission for a user to see an application and related data.
[ "This", "method", "can", "be", "used", "anywhere", "giving", "permission", "for", "a", "user", "to", "see", "an", "application", "and", "related", "data", "." ]
[]
[ { "param": "applicationId", "type": "long" }, { "param": "user", "type": "UserResource" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "applicationId", "type": "long", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "user", "type": "UserResource", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 1250, 848, 1767, 3208, 12, 5748, 31499, 16, 2177, 1420, 729, 13, 288, 203, 3639, 327, 353, 3061, 12, 1355, 13, 203, 3639, 747, 711, 2227, 2996, 12, 3685, 548, 16, 729, 13, 203, 3639, 747, 353, 2465, 1945, 2610, 403, 280, 12, 3685, 548, 16, 729, 13, 203, 3639, 747, 353, 6841, 6187, 1359, 12, 3685, 548, 16, 729, 13, 203, 3639, 747, 353, 18410, 7210, 21349, 1290, 4109, 13174, 774, 3208, 12, 3685, 548, 16, 729, 18, 26321, 10756, 203, 3639, 747, 353, 510, 911, 6064, 12, 3685, 548, 16, 729, 13, 203, 3639, 747, 353, 3088, 7988, 1290, 3208, 12, 3685, 548, 16, 729, 18, 26321, 10756, 203, 3639, 747, 353, 13174, 774, 4109, 12, 3685, 548, 16, 729, 1769, 203, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 377, 380, 1220, 707, 848, 506, 1399, 25651, 21057, 4132, 364, 279, 729, 358, 2621, 392, 2521, 471, 3746, 501, 18, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
cc2c44e440a693b9e2edf1720573a40ceaaf6c92
InnovateUKGitHub/innovation-funding-service
ifs-data-layer/ifs-data-service/src/main/java/org/innovateuk/ifs/project/spendprofile/transactional/ProcurementMilestonesSpendProfileFigureDistributer.java
[ "MIT" ]
Java
assertTotalsEqual
null
private void assertTotalsEqual(List<BigInteger> milestoneTotalsPerMonth, SpendProfileCostCategorySummaries costCategorySummaries){ BigInteger milestoneTotal = milestoneTotalsPerMonth.stream().reduce(BigInteger::add).orElse(ZERO); BigInteger categoriesTotal = costCategorySummaries.getCosts().stream().map(SpendProfileCostCategorySummary::getTotal).reduce(BigDecimal::add).orElse(BigDecimal.ZERO).toBigIntegerExact(); if (!milestoneTotal.equals(categoriesTotal)){ throw new IllegalStateException("Categories Total: " + categoriesTotal + " is not equal to Milestones Total: " + milestoneTotal); } }
/** * This should be enforced by the system * @param milestoneTotalsPerMonth * @param costCategorySummaries */
This should be enforced by the system @param milestoneTotalsPerMonth @param costCategorySummaries
[ "This", "should", "be", "enforced", "by", "the", "system", "@param", "milestoneTotalsPerMonth", "@param", "costCategorySummaries" ]
private void assertTotalsEqual(List<BigInteger> milestoneTotalsPerMonth, SpendProfileCostCategorySummaries costCategorySummaries){ BigInteger milestoneTotal = milestoneTotalsPerMonth.stream().reduce(BigInteger::add).orElse(ZERO); BigInteger categoriesTotal = costCategorySummaries.getCosts().stream().map(SpendProfileCostCategorySummary::getTotal).reduce(BigDecimal::add).orElse(BigDecimal.ZERO).toBigIntegerExact(); if (!milestoneTotal.equals(categoriesTotal)){ throw new IllegalStateException("Categories Total: " + categoriesTotal + " is not equal to Milestones Total: " + milestoneTotal); } }
[ "private", "void", "assertTotalsEqual", "(", "List", "<", "BigInteger", ">", "milestoneTotalsPerMonth", ",", "SpendProfileCostCategorySummaries", "costCategorySummaries", ")", "{", "BigInteger", "milestoneTotal", "=", "milestoneTotalsPerMonth", ".", "stream", "(", ")", ".", "reduce", "(", "BigInteger", "::", "add", ")", ".", "orElse", "(", "ZERO", ")", ";", "BigInteger", "categoriesTotal", "=", "costCategorySummaries", ".", "getCosts", "(", ")", ".", "stream", "(", ")", ".", "map", "(", "SpendProfileCostCategorySummary", "::", "getTotal", ")", ".", "reduce", "(", "BigDecimal", "::", "add", ")", ".", "orElse", "(", "BigDecimal", ".", "ZERO", ")", ".", "toBigIntegerExact", "(", ")", ";", "if", "(", "!", "milestoneTotal", ".", "equals", "(", "categoriesTotal", ")", ")", "{", "throw", "new", "IllegalStateException", "(", "\"Categories Total: \"", "+", "categoriesTotal", "+", "\" is not equal to Milestones Total: \"", "+", "milestoneTotal", ")", ";", "}", "}" ]
This should be enforced by the system @param milestoneTotalsPerMonth @param costCategorySummaries
[ "This", "should", "be", "enforced", "by", "the", "system", "@param", "milestoneTotalsPerMonth", "@param", "costCategorySummaries" ]
[]
[ { "param": "milestoneTotalsPerMonth", "type": "List<BigInteger>" }, { "param": "costCategorySummaries", "type": "SpendProfileCostCategorySummaries" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "milestoneTotalsPerMonth", "type": "List<BigInteger>", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "costCategorySummaries", "type": "SpendProfileCostCategorySummaries", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 3238, 918, 1815, 31025, 5812, 12, 682, 32, 24198, 34, 28664, 31025, 2173, 5445, 16, 348, 1302, 4029, 8018, 4457, 15944, 6991, 4457, 15944, 15329, 203, 3639, 10246, 28664, 5269, 273, 28664, 31025, 2173, 5445, 18, 3256, 7675, 12498, 12, 24198, 2866, 1289, 2934, 280, 12427, 12, 24968, 1769, 203, 3639, 10246, 6477, 5269, 273, 6991, 4457, 15944, 18, 588, 21420, 7675, 3256, 7675, 1458, 12, 27223, 4029, 8018, 4457, 4733, 2866, 588, 5269, 2934, 12498, 12, 29436, 2866, 1289, 2934, 280, 12427, 12, 29436, 18, 24968, 2934, 869, 24198, 14332, 5621, 203, 3639, 309, 16051, 81, 18270, 5269, 18, 14963, 12, 8995, 5269, 3719, 95, 203, 5411, 604, 394, 5477, 2932, 10487, 10710, 30, 315, 397, 6477, 5269, 397, 315, 353, 486, 3959, 358, 490, 14849, 5322, 10710, 30, 315, 397, 28664, 5269, 1769, 203, 3639, 289, 203, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 377, 380, 1220, 1410, 506, 570, 19778, 635, 326, 2619, 203, 377, 380, 632, 891, 28664, 31025, 2173, 5445, 203, 377, 380, 632, 891, 6991, 4457, 15944, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
cc2c44e440a693b9e2edf1720573a40ceaaf6c92
InnovateUKGitHub/innovation-funding-service
ifs-data-layer/ifs-data-service/src/main/java/org/innovateuk/ifs/project/spendprofile/transactional/ProcurementMilestonesSpendProfileFigureDistributer.java
[ "MIT" ]
Java
adjustedCosts
null
private List<OtherAndVat> adjustedCosts(List<OtherAndVat> costsToAdjust, SpendProfileCostCategorySummaries costCategorySummaries){ BigInteger correctVatTotal = cost(costCategorySummaries, VAT).getTotal().toBigIntegerExact(); BigInteger correctOtherCostsTotal = cost(costCategorySummaries, OTHER_COSTS).getTotal().toBigIntegerExact(); BigInteger currentVatTotal = costsToAdjust.stream().map(otherAndVat -> otherAndVat.vat).reduce(BigInteger::add).orElse(ZERO); BigInteger currentOtherCostsTotal = costsToAdjust.stream().map(otherAndVat -> otherAndVat.otherCosts).reduce(BigInteger::add).orElse(ZERO); if (!correctVatTotal.subtract(currentVatTotal).equals(currentOtherCostsTotal.subtract(correctOtherCostsTotal))){ // We should never get here because it would mean that the total milestones do not add up to the total of // the categories and this should be enforced. However we check to be sure. throw new IllegalStateException("The absolute amount we have to change other costs and vat by is not the same"); } return adjustedCosts(costsToAdjust, correctVatTotal.subtract(currentVatTotal)); }
/** * There are many different ways in which we could adjust costs but however it is done, the totals per a month must * stay the same. * This means if we add to other costs whe must take away from vat and vice versa. * * @param costsToAdjust * @param costCategorySummaries * @return */
There are many different ways in which we could adjust costs but however it is done, the totals per a month must stay the same. This means if we add to other costs whe must take away from vat and vice versa.
[ "There", "are", "many", "different", "ways", "in", "which", "we", "could", "adjust", "costs", "but", "however", "it", "is", "done", "the", "totals", "per", "a", "month", "must", "stay", "the", "same", ".", "This", "means", "if", "we", "add", "to", "other", "costs", "whe", "must", "take", "away", "from", "vat", "and", "vice", "versa", "." ]
private List<OtherAndVat> adjustedCosts(List<OtherAndVat> costsToAdjust, SpendProfileCostCategorySummaries costCategorySummaries){ BigInteger correctVatTotal = cost(costCategorySummaries, VAT).getTotal().toBigIntegerExact(); BigInteger correctOtherCostsTotal = cost(costCategorySummaries, OTHER_COSTS).getTotal().toBigIntegerExact(); BigInteger currentVatTotal = costsToAdjust.stream().map(otherAndVat -> otherAndVat.vat).reduce(BigInteger::add).orElse(ZERO); BigInteger currentOtherCostsTotal = costsToAdjust.stream().map(otherAndVat -> otherAndVat.otherCosts).reduce(BigInteger::add).orElse(ZERO); if (!correctVatTotal.subtract(currentVatTotal).equals(currentOtherCostsTotal.subtract(correctOtherCostsTotal))){ throw new IllegalStateException("The absolute amount we have to change other costs and vat by is not the same"); } return adjustedCosts(costsToAdjust, correctVatTotal.subtract(currentVatTotal)); }
[ "private", "List", "<", "OtherAndVat", ">", "adjustedCosts", "(", "List", "<", "OtherAndVat", ">", "costsToAdjust", ",", "SpendProfileCostCategorySummaries", "costCategorySummaries", ")", "{", "BigInteger", "correctVatTotal", "=", "cost", "(", "costCategorySummaries", ",", "VAT", ")", ".", "getTotal", "(", ")", ".", "toBigIntegerExact", "(", ")", ";", "BigInteger", "correctOtherCostsTotal", "=", "cost", "(", "costCategorySummaries", ",", "OTHER_COSTS", ")", ".", "getTotal", "(", ")", ".", "toBigIntegerExact", "(", ")", ";", "BigInteger", "currentVatTotal", "=", "costsToAdjust", ".", "stream", "(", ")", ".", "map", "(", "otherAndVat", "->", "otherAndVat", ".", "vat", ")", ".", "reduce", "(", "BigInteger", "::", "add", ")", ".", "orElse", "(", "ZERO", ")", ";", "BigInteger", "currentOtherCostsTotal", "=", "costsToAdjust", ".", "stream", "(", ")", ".", "map", "(", "otherAndVat", "->", "otherAndVat", ".", "otherCosts", ")", ".", "reduce", "(", "BigInteger", "::", "add", ")", ".", "orElse", "(", "ZERO", ")", ";", "if", "(", "!", "correctVatTotal", ".", "subtract", "(", "currentVatTotal", ")", ".", "equals", "(", "currentOtherCostsTotal", ".", "subtract", "(", "correctOtherCostsTotal", ")", ")", ")", "{", "throw", "new", "IllegalStateException", "(", "\"The absolute amount we have to change other costs and vat by is not the same\"", ")", ";", "}", "return", "adjustedCosts", "(", "costsToAdjust", ",", "correctVatTotal", ".", "subtract", "(", "currentVatTotal", ")", ")", ";", "}" ]
There are many different ways in which we could adjust costs but however it is done, the totals per a month must stay the same.
[ "There", "are", "many", "different", "ways", "in", "which", "we", "could", "adjust", "costs", "but", "however", "it", "is", "done", "the", "totals", "per", "a", "month", "must", "stay", "the", "same", "." ]
[ "// We should never get here because it would mean that the total milestones do not add up to the total of", "// the categories and this should be enforced. However we check to be sure." ]
[ { "param": "costsToAdjust", "type": "List<OtherAndVat>" }, { "param": "costCategorySummaries", "type": "SpendProfileCostCategorySummaries" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "costsToAdjust", "type": "List<OtherAndVat>", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "costCategorySummaries", "type": "SpendProfileCostCategorySummaries", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 3238, 987, 32, 8290, 1876, 15706, 34, 13940, 21420, 12, 682, 32, 8290, 1876, 15706, 34, 6991, 11634, 10952, 16, 348, 1302, 4029, 8018, 4457, 15944, 6991, 4457, 15944, 15329, 203, 3639, 10246, 3434, 15706, 5269, 273, 6991, 12, 12398, 4457, 15944, 16, 776, 789, 2934, 588, 5269, 7675, 869, 24198, 14332, 5621, 203, 3639, 10246, 3434, 8290, 21420, 5269, 273, 6991, 12, 12398, 4457, 15944, 16, 22478, 67, 28343, 55, 2934, 588, 5269, 7675, 869, 24198, 14332, 5621, 203, 3639, 10246, 783, 15706, 5269, 273, 6991, 11634, 10952, 18, 3256, 7675, 1458, 12, 3011, 1876, 15706, 317, 1308, 1876, 15706, 18, 25012, 2934, 12498, 12, 24198, 2866, 1289, 2934, 280, 12427, 12, 24968, 1769, 203, 3639, 10246, 783, 8290, 21420, 5269, 273, 6991, 11634, 10952, 18, 3256, 7675, 1458, 12, 3011, 1876, 15706, 317, 1308, 1876, 15706, 18, 3011, 21420, 2934, 12498, 12, 24198, 2866, 1289, 2934, 280, 12427, 12, 24968, 1769, 203, 3639, 309, 16051, 6746, 15706, 5269, 18, 1717, 1575, 12, 2972, 15706, 5269, 2934, 14963, 12, 2972, 8290, 21420, 5269, 18, 1717, 1575, 12, 6746, 8290, 21420, 5269, 3719, 15329, 203, 5411, 368, 1660, 1410, 5903, 336, 2674, 2724, 518, 4102, 3722, 716, 326, 2078, 312, 14849, 5322, 741, 486, 527, 731, 358, 326, 2078, 434, 203, 5411, 368, 326, 6477, 471, 333, 1410, 506, 570, 19778, 18, 10724, 732, 866, 358, 506, 3071, 18, 203, 5411, 604, 394, 5477, 2932, 1986, 4967, 3844, 732, 1240, 358, 2549, 1308, 22793, 471, 17359, 635, 353, 486, 326, 1967, 8863, 203, 3639, 289, 203, 3639, 327, 13940, 21420, 12, 12398, 11634, 10952, 16, 3434, 15706, 5269, 18, 1717, 1575, 12, 2972, 15706, 5269, 10019, 203, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 377, 380, 6149, 854, 4906, 3775, 16226, 316, 1492, 732, 3377, 5765, 22793, 1496, 14025, 518, 353, 2731, 16, 326, 19489, 1534, 279, 3138, 1297, 203, 377, 380, 23449, 326, 1967, 18, 203, 377, 380, 1220, 4696, 309, 732, 527, 358, 1308, 22793, 341, 580, 1297, 4862, 10804, 628, 17359, 471, 31842, 14690, 69, 18, 203, 377, 380, 203, 377, 380, 632, 891, 6991, 11634, 10952, 203, 377, 380, 632, 891, 6991, 4457, 15944, 203, 377, 380, 632, 2463, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
ce733ae5b3eedde3aece789def14ffca32dca139
InnovateUKGitHub/innovation-funding-service
ifs-data-layer/ifs-data-service/src/main/java/org/innovateuk/ifs/organisation/transactional/CompaniesHouseApiServiceImpl.java
[ "MIT" ]
Java
restGet
T
protected <T> T restGet(String path, Class<T> c, Map<String, Object> variables) { try { return adaptor.restGetEntity(companiesHouseUrl + path, c, variables).getBody(); } catch (HttpClientErrorException | HttpServerErrorException e) { LOG.error(e); return null; } }
/** * Method to the pass query variable separately rather than passing as part of the path. * This allows the proper encoding of the query values by the default URLComponentBuild used by the * Rest Template. * * @param path - URL path * @param c - Return class type * @param <T> - Return data type from the method * @return */
Method to the pass query variable separately rather than passing as part of the path. This allows the proper encoding of the query values by the default URLComponentBuild used by the Rest Template. @param path - URL path @param c - Return class type @param - Return data type from the method @return
[ "Method", "to", "the", "pass", "query", "variable", "separately", "rather", "than", "passing", "as", "part", "of", "the", "path", ".", "This", "allows", "the", "proper", "encoding", "of", "the", "query", "values", "by", "the", "default", "URLComponentBuild", "used", "by", "the", "Rest", "Template", ".", "@param", "path", "-", "URL", "path", "@param", "c", "-", "Return", "class", "type", "@param", "-", "Return", "data", "type", "from", "the", "method", "@return" ]
protected <T> T restGet(String path, Class<T> c, Map<String, Object> variables) { try { return adaptor.restGetEntity(companiesHouseUrl + path, c, variables).getBody(); } catch (HttpClientErrorException | HttpServerErrorException e) { LOG.error(e); return null; } }
[ "protected", "<", "T", ">", "T", "restGet", "(", "String", "path", ",", "Class", "<", "T", ">", "c", ",", "Map", "<", "String", ",", "Object", ">", "variables", ")", "{", "try", "{", "return", "adaptor", ".", "restGetEntity", "(", "companiesHouseUrl", "+", "path", ",", "c", ",", "variables", ")", ".", "getBody", "(", ")", ";", "}", "catch", "(", "HttpClientErrorException", "|", "HttpServerErrorException", "e", ")", "{", "LOG", ".", "error", "(", "e", ")", ";", "return", "null", ";", "}", "}" ]
Method to the pass query variable separately rather than passing as part of the path.
[ "Method", "to", "the", "pass", "query", "variable", "separately", "rather", "than", "passing", "as", "part", "of", "the", "path", "." ]
[]
[ { "param": "path", "type": "String" }, { "param": "c", "type": "Class<T>" }, { "param": "variables", "type": "Map<String, Object>" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "path", "type": "String", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "c", "type": "Class<T>", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "variables", "type": "Map<String, Object>", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 4750, 411, 56, 34, 399, 3127, 967, 12, 780, 589, 16, 1659, 32, 56, 34, 276, 16, 1635, 32, 780, 16, 1033, 34, 3152, 13, 288, 203, 3639, 775, 288, 203, 5411, 327, 9087, 18, 8792, 967, 1943, 12, 2919, 27891, 44, 3793, 1489, 397, 589, 16, 276, 16, 3152, 2934, 588, 2250, 5621, 203, 3639, 289, 1044, 261, 11895, 10009, 571, 2541, 8777, 503, 425, 13, 288, 203, 5411, 2018, 18, 1636, 12, 73, 1769, 203, 5411, 327, 446, 31, 203, 3639, 289, 203, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 377, 380, 2985, 358, 326, 1342, 843, 2190, 18190, 9178, 2353, 9588, 487, 1087, 434, 326, 589, 18, 203, 377, 380, 1220, 5360, 326, 5338, 2688, 434, 326, 843, 924, 635, 326, 805, 1976, 1841, 3116, 1399, 635, 326, 203, 377, 380, 6320, 5035, 18, 203, 377, 380, 203, 377, 380, 632, 891, 589, 300, 1976, 589, 203, 377, 380, 632, 891, 276, 565, 300, 2000, 667, 618, 203, 377, 380, 632, 891, 411, 56, 34, 225, 300, 2000, 501, 618, 628, 326, 707, 203, 377, 380, 632, 2463, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
ce733ae5b3eedde3aece789def14ffca32dca139
InnovateUKGitHub/innovation-funding-service
ifs-data-layer/ifs-data-service/src/main/java/org/innovateuk/ifs/organisation/transactional/CompaniesHouseApiServiceImpl.java
[ "MIT" ]
Java
organisationSearchUrlVariables
null
private Map<String, Object> organisationSearchUrlVariables(String searchWord) { Map<String, Object> variables = new HashMap<>(); variables.put(ITEMS_PER_PAGE_KEY, SEARCH_ITEMS_MAX); variables.put(SEARCH_WORD_KEY, searchWord); return variables; }
/** * Method to build the query variable map. The keys in the map must match the * keys defined in the URL path 'COMPANIES_HOUSE_SEARCH_PATH'. * * @param searchWord * @return {@link Map} */
Method to build the query variable map. The keys in the map must match the keys defined in the URL path 'COMPANIES_HOUSE_SEARCH_PATH'. @param searchWord @return Map
[ "Method", "to", "build", "the", "query", "variable", "map", ".", "The", "keys", "in", "the", "map", "must", "match", "the", "keys", "defined", "in", "the", "URL", "path", "'", "COMPANIES_HOUSE_SEARCH_PATH", "'", ".", "@param", "searchWord", "@return", "Map" ]
private Map<String, Object> organisationSearchUrlVariables(String searchWord) { Map<String, Object> variables = new HashMap<>(); variables.put(ITEMS_PER_PAGE_KEY, SEARCH_ITEMS_MAX); variables.put(SEARCH_WORD_KEY, searchWord); return variables; }
[ "private", "Map", "<", "String", ",", "Object", ">", "organisationSearchUrlVariables", "(", "String", "searchWord", ")", "{", "Map", "<", "String", ",", "Object", ">", "variables", "=", "new", "HashMap", "<", ">", "(", ")", ";", "variables", ".", "put", "(", "ITEMS_PER_PAGE_KEY", ",", "SEARCH_ITEMS_MAX", ")", ";", "variables", ".", "put", "(", "SEARCH_WORD_KEY", ",", "searchWord", ")", ";", "return", "variables", ";", "}" ]
Method to build the query variable map.
[ "Method", "to", "build", "the", "query", "variable", "map", "." ]
[]
[ { "param": "searchWord", "type": "String" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "searchWord", "type": "String", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 3238, 1635, 32, 780, 16, 1033, 34, 15501, 10742, 2979, 1489, 6158, 12, 780, 1623, 3944, 13, 288, 203, 3639, 1635, 32, 780, 16, 1033, 34, 3152, 273, 394, 4317, 29667, 5621, 203, 3639, 3152, 18, 458, 12, 29887, 67, 3194, 67, 11219, 67, 3297, 16, 24053, 67, 29887, 67, 6694, 1769, 203, 3639, 3152, 18, 458, 12, 17251, 67, 7952, 67, 3297, 16, 1623, 3944, 1769, 203, 3639, 327, 3152, 31, 203, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 377, 380, 2985, 358, 1361, 326, 843, 2190, 852, 18, 1021, 1311, 316, 326, 852, 1297, 845, 326, 203, 377, 380, 1311, 2553, 316, 326, 1976, 589, 296, 10057, 1258, 8805, 67, 7995, 8001, 67, 17251, 67, 4211, 10332, 203, 377, 380, 203, 377, 380, 632, 891, 1623, 3944, 203, 377, 380, 632, 2463, 8901, 1232, 1635, 97, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]