id
int32
0
165k
repo
stringlengths
7
58
path
stringlengths
12
218
func_name
stringlengths
3
140
original_string
stringlengths
73
34.1k
language
stringclasses
1 value
code
stringlengths
73
34.1k
code_tokens
list
docstring
stringlengths
3
16k
docstring_tokens
list
sha
stringlengths
40
40
url
stringlengths
105
339
45,300
lightblue-platform/lightblue-migrator
migrator/src/main/java/com/redhat/lightblue/migrator/Controller.java
Controller.getMigrationConfiguration
public MigrationConfiguration getMigrationConfiguration(String configurationName) throws IOException, LightblueException { DataFindRequest findRequest = new DataFindRequest("migrationConfiguration", null); findRequest.where(Query.and( Query.withValue("configurationName", Quer...
java
public MigrationConfiguration getMigrationConfiguration(String configurationName) throws IOException, LightblueException { DataFindRequest findRequest = new DataFindRequest("migrationConfiguration", null); findRequest.where(Query.and( Query.withValue("configurationName", Quer...
[ "public", "MigrationConfiguration", "getMigrationConfiguration", "(", "String", "configurationName", ")", "throws", "IOException", ",", "LightblueException", "{", "DataFindRequest", "findRequest", "=", "new", "DataFindRequest", "(", "\"migrationConfiguration\"", ",", "null", ...
Read a configuration from the database whose name matches the the given configuration name
[ "Read", "a", "configuration", "from", "the", "database", "whose", "name", "matches", "the", "the", "given", "configuration", "name" ]
ec20748557b40d1f7851e1816d1b76dae48d2027
https://github.com/lightblue-platform/lightblue-migrator/blob/ec20748557b40d1f7851e1816d1b76dae48d2027/migrator/src/main/java/com/redhat/lightblue/migrator/Controller.java#L92-L102
45,301
lightblue-platform/lightblue-migrator
migrator/src/main/java/com/redhat/lightblue/migrator/Controller.java
Controller.loadMigrationConfiguration
public MigrationConfiguration loadMigrationConfiguration(String migrationConfigurationId) throws IOException, LightblueException { DataFindRequest findRequest = new DataFindRequest("migrationConfiguration", null); findRequest.where(Query.withValue("_id", Query.eq, migrationConfigurationId));...
java
public MigrationConfiguration loadMigrationConfiguration(String migrationConfigurationId) throws IOException, LightblueException { DataFindRequest findRequest = new DataFindRequest("migrationConfiguration", null); findRequest.where(Query.withValue("_id", Query.eq, migrationConfigurationId));...
[ "public", "MigrationConfiguration", "loadMigrationConfiguration", "(", "String", "migrationConfigurationId", ")", "throws", "IOException", ",", "LightblueException", "{", "DataFindRequest", "findRequest", "=", "new", "DataFindRequest", "(", "\"migrationConfiguration\"", ",", ...
Load migration configuration based on its id
[ "Load", "migration", "configuration", "based", "on", "its", "id" ]
ec20748557b40d1f7851e1816d1b76dae48d2027
https://github.com/lightblue-platform/lightblue-migrator/blob/ec20748557b40d1f7851e1816d1b76dae48d2027/migrator/src/main/java/com/redhat/lightblue/migrator/Controller.java#L107-L114
45,302
lightblue-platform/lightblue-migrator
migrator/src/main/java/com/redhat/lightblue/migrator/Controller.java
Controller.createControllers
public void createControllers(MigrationConfiguration[] configurations) throws Exception { for (MigrationConfiguration cfg : configurations) { MigrationProcess process = migrationMap.get(cfg.get_id()); if (process == null) { LOGGER.debug("Creating a controller thread for c...
java
public void createControllers(MigrationConfiguration[] configurations) throws Exception { for (MigrationConfiguration cfg : configurations) { MigrationProcess process = migrationMap.get(cfg.get_id()); if (process == null) { LOGGER.debug("Creating a controller thread for c...
[ "public", "void", "createControllers", "(", "MigrationConfiguration", "[", "]", "configurations", ")", "throws", "Exception", "{", "for", "(", "MigrationConfiguration", "cfg", ":", "configurations", ")", "{", "MigrationProcess", "process", "=", "migrationMap", ".", ...
Creates controller threads for migrators and consistency checkers based on the configuration loaded from the db. For each configuration item, a migrator controller thread is created and started. Once created, each thread manages its own lifecycle. If the corresponding configuration is removed, thread terminates, or i...
[ "Creates", "controller", "threads", "for", "migrators", "and", "consistency", "checkers", "based", "on", "the", "configuration", "loaded", "from", "the", "db", "." ]
ec20748557b40d1f7851e1816d1b76dae48d2027
https://github.com/lightblue-platform/lightblue-migrator/blob/ec20748557b40d1f7851e1816d1b76dae48d2027/migrator/src/main/java/com/redhat/lightblue/migrator/Controller.java#L154-L176
45,303
wuman/orientdb-android
core/src/main/java/com/orientechnologies/orient/core/type/tree/provider/OMVRBTreeRIDEntryProvider.java
OMVRBTreeRIDEntryProvider.getKeyAt
public OIdentifiable getKeyAt(final int iIndex) { if (rids != null && rids[iIndex] != null) return rids[iIndex]; final ORecordId rid = itemFromStream(iIndex); if (rids != null) rids[iIndex] = rid; return rid; }
java
public OIdentifiable getKeyAt(final int iIndex) { if (rids != null && rids[iIndex] != null) return rids[iIndex]; final ORecordId rid = itemFromStream(iIndex); if (rids != null) rids[iIndex] = rid; return rid; }
[ "public", "OIdentifiable", "getKeyAt", "(", "final", "int", "iIndex", ")", "{", "if", "(", "rids", "!=", "null", "&&", "rids", "[", "iIndex", "]", "!=", "null", ")", "return", "rids", "[", "iIndex", "]", ";", "final", "ORecordId", "rid", "=", "itemFrom...
Lazy unmarshall the RID if not in memory.
[ "Lazy", "unmarshall", "the", "RID", "if", "not", "in", "memory", "." ]
ff9b17e4349f26168b2d0c4facb1a18cbfbe8cf0
https://github.com/wuman/orientdb-android/blob/ff9b17e4349f26168b2d0c4facb1a18cbfbe8cf0/core/src/main/java/com/orientechnologies/orient/core/type/tree/provider/OMVRBTreeRIDEntryProvider.java#L86-L96
45,304
wuman/orientdb-android
core/src/main/java/com/orientechnologies/orient/core/metadata/OMetadata.java
OMetadata.close
public void close() { if (indexManager != null) indexManager.flush(); if (schema != null) schema.close(); if (security != null) security.close(); }
java
public void close() { if (indexManager != null) indexManager.flush(); if (schema != null) schema.close(); if (security != null) security.close(); }
[ "public", "void", "close", "(", ")", "{", "if", "(", "indexManager", "!=", "null", ")", "indexManager", ".", "flush", "(", ")", ";", "if", "(", "schema", "!=", "null", ")", "schema", ".", "close", "(", ")", ";", "if", "(", "security", "!=", "null",...
Closes internal objects
[ "Closes", "internal", "objects" ]
ff9b17e4349f26168b2d0c4facb1a18cbfbe8cf0
https://github.com/wuman/orientdb-android/blob/ff9b17e4349f26168b2d0c4facb1a18cbfbe8cf0/core/src/main/java/com/orientechnologies/orient/core/metadata/OMetadata.java#L144-L151
45,305
soi-toolkit/soi-toolkit-mule
commons/components/commons-mule/src/main/java/org/soitoolkit/commons/mule/rest/RestClient.java
RestClient.doHttpSendRequest
public MuleMessage doHttpSendRequest(String url, String method, String payload, String contentType) { Map<String, String> properties = new HashMap<String, String>(); properties.put("http.method", method); properties.put("Content-Type", contentType); MuleMessage response = send(url, payload,...
java
public MuleMessage doHttpSendRequest(String url, String method, String payload, String contentType) { Map<String, String> properties = new HashMap<String, String>(); properties.put("http.method", method); properties.put("Content-Type", contentType); MuleMessage response = send(url, payload,...
[ "public", "MuleMessage", "doHttpSendRequest", "(", "String", "url", ",", "String", "method", ",", "String", "payload", ",", "String", "contentType", ")", "{", "Map", "<", "String", ",", "String", ">", "properties", "=", "new", "HashMap", "<", "String", ",", ...
Perform a HTTP call sending information to the server using POST or PUT @param url @param method, e.g. "POST" or "PUT" @param payload @param contentType @return @throws MuleException
[ "Perform", "a", "HTTP", "call", "sending", "information", "to", "the", "server", "using", "POST", "or", "PUT" ]
e891350dbf55e6307be94d193d056bdb785b37d3
https://github.com/soi-toolkit/soi-toolkit-mule/blob/e891350dbf55e6307be94d193d056bdb785b37d3/commons/components/commons-mule/src/main/java/org/soitoolkit/commons/mule/rest/RestClient.java#L159-L168
45,306
soi-toolkit/soi-toolkit-mule
commons/components/commons-mule/src/main/java/org/soitoolkit/commons/mule/rest/RestClient.java
RestClient.doHttpReceiveRequest
public MuleMessage doHttpReceiveRequest(String url, String method, String acceptConentType, String acceptCharSet) { Map<String, String> properties = new HashMap<String, String>(); properties.put("http.method", method); properties.put("Accept", acceptConentType); properties.put("Accept-...
java
public MuleMessage doHttpReceiveRequest(String url, String method, String acceptConentType, String acceptCharSet) { Map<String, String> properties = new HashMap<String, String>(); properties.put("http.method", method); properties.put("Accept", acceptConentType); properties.put("Accept-...
[ "public", "MuleMessage", "doHttpReceiveRequest", "(", "String", "url", ",", "String", "method", ",", "String", "acceptConentType", ",", "String", "acceptCharSet", ")", "{", "Map", "<", "String", ",", "String", ">", "properties", "=", "new", "HashMap", "<", "St...
Perform a HTTP call receiving information from the server using GET or DELETE @param url @param method, e.g. "GET" or "DELETE" @param acceptConentType @param acceptCharSet @return @throws MuleException
[ "Perform", "a", "HTTP", "call", "receiving", "information", "from", "the", "server", "using", "GET", "or", "DELETE" ]
e891350dbf55e6307be94d193d056bdb785b37d3
https://github.com/soi-toolkit/soi-toolkit-mule/blob/e891350dbf55e6307be94d193d056bdb785b37d3/commons/components/commons-mule/src/main/java/org/soitoolkit/commons/mule/rest/RestClient.java#L180-L190
45,307
RestComm/jasn
asn-impl/src/main/java/org/mobicents/protocols/asn/AsnOutputStream.java
AsnOutputStream.toByteArray
public byte[] toByteArray() { if (this.pos == this.length) return this.buffer; else { byte[] res = new byte[this.pos]; System.arraycopy(this.buffer, 0, res, 0, this.pos); return res; } }
java
public byte[] toByteArray() { if (this.pos == this.length) return this.buffer; else { byte[] res = new byte[this.pos]; System.arraycopy(this.buffer, 0, res, 0, this.pos); return res; } }
[ "public", "byte", "[", "]", "toByteArray", "(", ")", "{", "if", "(", "this", ".", "pos", "==", "this", ".", "length", ")", "return", "this", ".", "buffer", ";", "else", "{", "byte", "[", "]", "res", "=", "new", "byte", "[", "this", ".", "pos", ...
Returns the written to the stream data as a byte array @return
[ "Returns", "the", "written", "to", "the", "stream", "data", "as", "a", "byte", "array" ]
3b2ec7709ba27f888114eaf47e2cd51ed8042e65
https://github.com/RestComm/jasn/blob/3b2ec7709ba27f888114eaf47e2cd51ed8042e65/asn-impl/src/main/java/org/mobicents/protocols/asn/AsnOutputStream.java#L64-L73
45,308
RestComm/jasn
asn-impl/src/main/java/org/mobicents/protocols/asn/AsnOutputStream.java
AsnOutputStream.write
@Override public void write(byte[] b, int off, int len) { this.checkIncreaseArray(len); System.arraycopy(b, off, this.buffer, this.pos, len); this.pos += len; }
java
@Override public void write(byte[] b, int off, int len) { this.checkIncreaseArray(len); System.arraycopy(b, off, this.buffer, this.pos, len); this.pos += len; }
[ "@", "Override", "public", "void", "write", "(", "byte", "[", "]", "b", ",", "int", "off", ",", "int", "len", ")", "{", "this", ".", "checkIncreaseArray", "(", "len", ")", ";", "System", ".", "arraycopy", "(", "b", ",", "off", ",", "this", ".", "...
Writes a byte array content into the stream @param b @param off @param len
[ "Writes", "a", "byte", "array", "content", "into", "the", "stream" ]
3b2ec7709ba27f888114eaf47e2cd51ed8042e65
https://github.com/RestComm/jasn/blob/3b2ec7709ba27f888114eaf47e2cd51ed8042e65/asn-impl/src/main/java/org/mobicents/protocols/asn/AsnOutputStream.java#L123-L128
45,309
RestComm/jasn
asn-impl/src/main/java/org/mobicents/protocols/asn/AsnOutputStream.java
AsnOutputStream.writeTag
public void writeTag(int tagClass, boolean primitive, int tag) throws AsnException { if (tag < 0) throw new AsnException("Tag must not be negative"); if (tag <= 30) { int toEncode = (tagClass & 0x03) << 6; toEncode |= (primitive ? 0 : 1) << 5; toEncode |= tag & 0x1F; this.write(toEn...
java
public void writeTag(int tagClass, boolean primitive, int tag) throws AsnException { if (tag < 0) throw new AsnException("Tag must not be negative"); if (tag <= 30) { int toEncode = (tagClass & 0x03) << 6; toEncode |= (primitive ? 0 : 1) << 5; toEncode |= tag & 0x1F; this.write(toEn...
[ "public", "void", "writeTag", "(", "int", "tagClass", ",", "boolean", "primitive", ",", "int", "tag", ")", "throws", "AsnException", "{", "if", "(", "tag", "<", "0", ")", "throw", "new", "AsnException", "(", "\"Tag must not be negative\"", ")", ";", "if", ...
Writes a tag field into the atream @param tagClass @param primitive @param tag @throws AsnException
[ "Writes", "a", "tag", "field", "into", "the", "atream" ]
3b2ec7709ba27f888114eaf47e2cd51ed8042e65
https://github.com/RestComm/jasn/blob/3b2ec7709ba27f888114eaf47e2cd51ed8042e65/asn-impl/src/main/java/org/mobicents/protocols/asn/AsnOutputStream.java#L149-L188
45,310
RestComm/jasn
asn-impl/src/main/java/org/mobicents/protocols/asn/AsnOutputStream.java
AsnOutputStream.writeLength
public void writeLength(int v) throws IOException { if (v == Tag.Indefinite_Length) { this.write(0x80); return; } else if (v > 0x7F) { int count; byte[] buf = new byte[4]; if ((v & 0xFF000000) > 0) { buf[0] = (byte)((v >> 24) & 0xFF); ...
java
public void writeLength(int v) throws IOException { if (v == Tag.Indefinite_Length) { this.write(0x80); return; } else if (v > 0x7F) { int count; byte[] buf = new byte[4]; if ((v & 0xFF000000) > 0) { buf[0] = (byte)((v >> 24) & 0xFF); ...
[ "public", "void", "writeLength", "(", "int", "v", ")", "throws", "IOException", "{", "if", "(", "v", "==", "Tag", ".", "Indefinite_Length", ")", "{", "this", ".", "write", "(", "0x80", ")", ";", "return", ";", "}", "else", "if", "(", "v", ">", "0x7...
Write the length field into the stream Use Tag.Indefinite_Length for writing the indefinite length @param v @throws IOException
[ "Write", "the", "length", "field", "into", "the", "stream", "Use", "Tag", ".", "Indefinite_Length", "for", "writing", "the", "indefinite", "length" ]
3b2ec7709ba27f888114eaf47e2cd51ed8042e65
https://github.com/RestComm/jasn/blob/3b2ec7709ba27f888114eaf47e2cd51ed8042e65/asn-impl/src/main/java/org/mobicents/protocols/asn/AsnOutputStream.java#L197-L240
45,311
RestComm/jasn
asn-impl/src/main/java/org/mobicents/protocols/asn/AsnOutputStream.java
AsnOutputStream.FinalizeContent
public void FinalizeContent( int lenPos ) { if (lenPos == Tag.Indefinite_Length) { this.write(0); this.write(0); } else { int length = this.pos - lenPos - 1; if (length <= 0x7F) { this.buffer[lenPos] = (byte) length; } else { int count; byte[] buf = new byte[4]; ...
java
public void FinalizeContent( int lenPos ) { if (lenPos == Tag.Indefinite_Length) { this.write(0); this.write(0); } else { int length = this.pos - lenPos - 1; if (length <= 0x7F) { this.buffer[lenPos] = (byte) length; } else { int count; byte[] buf = new byte[4]; ...
[ "public", "void", "FinalizeContent", "(", "int", "lenPos", ")", "{", "if", "(", "lenPos", "==", "Tag", ".", "Indefinite_Length", ")", "{", "this", ".", "write", "(", "0", ")", ";", "this", ".", "write", "(", "0", ")", ";", "}", "else", "{", "int", ...
This method must be invoked after finishing the content writing @param lenPos This parameter is the the return value of the StartContentDefiniteLength() or StartContentIndefiniteLength() methods
[ "This", "method", "must", "be", "invoked", "after", "finishing", "the", "content", "writing" ]
3b2ec7709ba27f888114eaf47e2cd51ed8042e65
https://github.com/RestComm/jasn/blob/3b2ec7709ba27f888114eaf47e2cd51ed8042e65/asn-impl/src/main/java/org/mobicents/protocols/asn/AsnOutputStream.java#L279-L323
45,312
RestComm/jasn
asn-impl/src/main/java/org/mobicents/protocols/asn/AsnOutputStream.java
AsnOutputStream._getByte
private static byte _getByte(int startIndex, BitSetStrictLength set) throws AsnException { int count = 8; byte data = 0; // if (set.length() - 1 < startIndex) { // throw new AsnException(); // } while (count > 0) { if (set.length() - 1 < startIndex) { break; } else { boolean ...
java
private static byte _getByte(int startIndex, BitSetStrictLength set) throws AsnException { int count = 8; byte data = 0; // if (set.length() - 1 < startIndex) { // throw new AsnException(); // } while (count > 0) { if (set.length() - 1 < startIndex) { break; } else { boolean ...
[ "private", "static", "byte", "_getByte", "(", "int", "startIndex", ",", "BitSetStrictLength", "set", ")", "throws", "AsnException", "{", "int", "count", "=", "8", ";", "byte", "data", "=", "0", ";", "//\t\tif (set.length() - 1 < startIndex) {\r", "//\t\t\tthrow new ...
Attepts to read up to 8 bits and store into byte. If less is found, only those are returned @param startIndex @param set @return @throws AsnException
[ "Attepts", "to", "read", "up", "to", "8", "bits", "and", "store", "into", "byte", ".", "If", "less", "is", "found", "only", "those", "are", "returned" ]
3b2ec7709ba27f888114eaf47e2cd51ed8042e65
https://github.com/RestComm/jasn/blob/3b2ec7709ba27f888114eaf47e2cd51ed8042e65/asn-impl/src/main/java/org/mobicents/protocols/asn/AsnOutputStream.java#L589-L614
45,313
wuman/orientdb-android
core/src/main/java/com/orientechnologies/orient/core/cache/OAbstractRecordCache.java
OAbstractRecordCache.startup
public void startup() { underlying.startup(); OProfiler.getInstance().registerHookValue(profilerPrefix + "enabled", new OProfilerHookValue() { public Object getValue() { return isEnabled(); } }); OProfiler.getInstance().registerHookValue(profilerPrefix + "current", new OPr...
java
public void startup() { underlying.startup(); OProfiler.getInstance().registerHookValue(profilerPrefix + "enabled", new OProfilerHookValue() { public Object getValue() { return isEnabled(); } }); OProfiler.getInstance().registerHookValue(profilerPrefix + "current", new OPr...
[ "public", "void", "startup", "(", ")", "{", "underlying", ".", "startup", "(", ")", ";", "OProfiler", ".", "getInstance", "(", ")", ".", "registerHookValue", "(", "profilerPrefix", "+", "\"enabled\"", ",", "new", "OProfilerHookValue", "(", ")", "{", "public"...
All operations running at cache initialization stage
[ "All", "operations", "running", "at", "cache", "initialization", "stage" ]
ff9b17e4349f26168b2d0c4facb1a18cbfbe8cf0
https://github.com/wuman/orientdb-android/blob/ff9b17e4349f26168b2d0c4facb1a18cbfbe8cf0/core/src/main/java/com/orientechnologies/orient/core/cache/OAbstractRecordCache.java#L136-L156
45,314
loldevs/riotapi
spectator/src/main/java/net/boreeas/riotapi/spectator/GameEncryptionData.java
GameEncryptionData.getCipher
public Cipher getCipher() throws GeneralSecurityException { Cipher cipher = Cipher.getInstance("Blowfish/ECB/PKCS5Padding"); cipher.init(Cipher.DECRYPT_MODE, new SecretKeySpec(key, "Blowfish")); return cipher; }
java
public Cipher getCipher() throws GeneralSecurityException { Cipher cipher = Cipher.getInstance("Blowfish/ECB/PKCS5Padding"); cipher.init(Cipher.DECRYPT_MODE, new SecretKeySpec(key, "Blowfish")); return cipher; }
[ "public", "Cipher", "getCipher", "(", ")", "throws", "GeneralSecurityException", "{", "Cipher", "cipher", "=", "Cipher", ".", "getInstance", "(", "\"Blowfish/ECB/PKCS5Padding\"", ")", ";", "cipher", ".", "init", "(", "Cipher", ".", "DECRYPT_MODE", ",", "new", "S...
Creates a cipher for decrypting data with the specified key. @return A Blowfish/ECB/PKCS5Padding cipher in decryption mode. @throws GeneralSecurityException
[ "Creates", "a", "cipher", "for", "decrypting", "data", "with", "the", "specified", "key", "." ]
0b8aac407aa5289845f249024f9732332855544f
https://github.com/loldevs/riotapi/blob/0b8aac407aa5289845f249024f9732332855544f/spectator/src/main/java/net/boreeas/riotapi/spectator/GameEncryptionData.java#L41-L46
45,315
loldevs/riotapi
spectator/src/main/java/net/boreeas/riotapi/spectator/GameEncryptionData.java
GameEncryptionData.getEncryptionCipher
public Cipher getEncryptionCipher() throws GeneralSecurityException { Cipher cipher = Cipher.getInstance("Blowfish/ECB/PKCS5Padding"); cipher.init(Cipher.ENCRYPT_MODE, new SecretKeySpec(key, "Blowfish")); return cipher; }
java
public Cipher getEncryptionCipher() throws GeneralSecurityException { Cipher cipher = Cipher.getInstance("Blowfish/ECB/PKCS5Padding"); cipher.init(Cipher.ENCRYPT_MODE, new SecretKeySpec(key, "Blowfish")); return cipher; }
[ "public", "Cipher", "getEncryptionCipher", "(", ")", "throws", "GeneralSecurityException", "{", "Cipher", "cipher", "=", "Cipher", ".", "getInstance", "(", "\"Blowfish/ECB/PKCS5Padding\"", ")", ";", "cipher", ".", "init", "(", "Cipher", ".", "ENCRYPT_MODE", ",", "...
Creates a cipher for encrypting data with the specified key. @return A Blowfish/ECB/PKCS5Padding cipher in encryption mode. @throws GeneralSecurityException
[ "Creates", "a", "cipher", "for", "encrypting", "data", "with", "the", "specified", "key", "." ]
0b8aac407aa5289845f249024f9732332855544f
https://github.com/loldevs/riotapi/blob/0b8aac407aa5289845f249024f9732332855544f/spectator/src/main/java/net/boreeas/riotapi/spectator/GameEncryptionData.java#L53-L58
45,316
wuman/orientdb-android
core/src/main/java/com/orientechnologies/orient/core/sql/OCommandExecutorSQLDropClass.java
OCommandExecutorSQLDropClass.execute
public Object execute(final Map<Object, Object> iArgs) { if (className == null) throw new OCommandExecutionException("Cannot execute the command because it has not been parsed yet"); final ODatabaseRecord database = getDatabase(); final OClass oClass = database.getMetadata().getSchema().getClass...
java
public Object execute(final Map<Object, Object> iArgs) { if (className == null) throw new OCommandExecutionException("Cannot execute the command because it has not been parsed yet"); final ODatabaseRecord database = getDatabase(); final OClass oClass = database.getMetadata().getSchema().getClass...
[ "public", "Object", "execute", "(", "final", "Map", "<", "Object", ",", "Object", ">", "iArgs", ")", "{", "if", "(", "className", "==", "null", ")", "throw", "new", "OCommandExecutionException", "(", "\"Cannot execute the command because it has not been parsed yet\"",...
Execute the DROP CLASS.
[ "Execute", "the", "DROP", "CLASS", "." ]
ff9b17e4349f26168b2d0c4facb1a18cbfbe8cf0
https://github.com/wuman/orientdb-android/blob/ff9b17e4349f26168b2d0c4facb1a18cbfbe8cf0/core/src/main/java/com/orientechnologies/orient/core/sql/OCommandExecutorSQLDropClass.java#L77-L118
45,317
wuman/orientdb-android
commons/src/main/java/com/orientechnologies/common/collection/OCompositeKey.java
OCompositeKey.compareTo
public int compareTo(final OCompositeKey otherKey) { final Iterator<Object> inIter = keys.iterator(); final Iterator<Object> outIter = otherKey.keys.iterator(); while (inIter.hasNext() && outIter.hasNext()) { final Object inKey = inIter.next(); final Object outKey = outIter.next(); ...
java
public int compareTo(final OCompositeKey otherKey) { final Iterator<Object> inIter = keys.iterator(); final Iterator<Object> outIter = otherKey.keys.iterator(); while (inIter.hasNext() && outIter.hasNext()) { final Object inKey = inIter.next(); final Object outKey = outIter.next(); ...
[ "public", "int", "compareTo", "(", "final", "OCompositeKey", "otherKey", ")", "{", "final", "Iterator", "<", "Object", ">", "inIter", "=", "keys", ".", "iterator", "(", ")", ";", "final", "Iterator", "<", "Object", ">", "outIter", "=", "otherKey", ".", "...
Performs partial comparison of two composite keys. Two objects will be equal if the common subset of their keys is equal. For example if first object contains two keys and second contains four keys then only first two keys will be compared. @param otherKey Key to compare. @return a negative integer, zero, or a posit...
[ "Performs", "partial", "comparison", "of", "two", "composite", "keys", "." ]
ff9b17e4349f26168b2d0c4facb1a18cbfbe8cf0
https://github.com/wuman/orientdb-android/blob/ff9b17e4349f26168b2d0c4facb1a18cbfbe8cf0/commons/src/main/java/com/orientechnologies/common/collection/OCompositeKey.java#L104-L124
45,318
wuman/orientdb-android
core/src/main/java/com/orientechnologies/orient/core/command/OBasicCommandContext.java
OBasicCommandContext.getVariables
public Map<String, Object> getVariables() { final HashMap<String, Object> map = new HashMap<String, Object>(); if (inherited != null) map.putAll(inherited.getVariables()); if (variables != null) map.putAll(variables); return map; }
java
public Map<String, Object> getVariables() { final HashMap<String, Object> map = new HashMap<String, Object>(); if (inherited != null) map.putAll(inherited.getVariables()); if (variables != null) map.putAll(variables); return map; }
[ "public", "Map", "<", "String", ",", "Object", ">", "getVariables", "(", ")", "{", "final", "HashMap", "<", "String", ",", "Object", ">", "map", "=", "new", "HashMap", "<", "String", ",", "Object", ">", "(", ")", ";", "if", "(", "inherited", "!=", ...
Returns a read-only map with all the variables.
[ "Returns", "a", "read", "-", "only", "map", "with", "all", "the", "variables", "." ]
ff9b17e4349f26168b2d0c4facb1a18cbfbe8cf0
https://github.com/wuman/orientdb-android/blob/ff9b17e4349f26168b2d0c4facb1a18cbfbe8cf0/core/src/main/java/com/orientechnologies/orient/core/command/OBasicCommandContext.java#L46-L53
45,319
dmfs/jdav
src/org/dmfs/dav/rfc4918/PropStat.java
PropStat.getPropertyValue
@SuppressWarnings("unchecked") public <T> T getPropertyValue(ElementDescriptor<T> property) { if (mProperties == null) { return null; } return (T) mProperties.get(property); }
java
@SuppressWarnings("unchecked") public <T> T getPropertyValue(ElementDescriptor<T> property) { if (mProperties == null) { return null; } return (T) mProperties.get(property); }
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "<", "T", ">", "T", "getPropertyValue", "(", "ElementDescriptor", "<", "T", ">", "property", ")", "{", "if", "(", "mProperties", "==", "null", ")", "{", "return", "null", ";", "}", "return", "...
Returns the value of a property in this propstat element. @param property the {@link XmlElementDescriptor} of the property to return. @return the value of the property or <code>null</code> if there is no property of this name.
[ "Returns", "the", "value", "of", "a", "property", "in", "this", "propstat", "element", "." ]
a619d85423210a283b3eb1fba9abda4fdc894969
https://github.com/dmfs/jdav/blob/a619d85423210a283b3eb1fba9abda4fdc894969/src/org/dmfs/dav/rfc4918/PropStat.java#L185-L193
45,320
dmfs/jdav
src/org/dmfs/dav/rfc4791/MkCalendar.java
MkCalendar.clear
public <T> void clear(ElementDescriptor<T> property) { if (mSet != null) { mSet.remove(property); } }
java
public <T> void clear(ElementDescriptor<T> property) { if (mSet != null) { mSet.remove(property); } }
[ "public", "<", "T", ">", "void", "clear", "(", "ElementDescriptor", "<", "T", ">", "property", ")", "{", "if", "(", "mSet", "!=", "null", ")", "{", "mSet", ".", "remove", "(", "property", ")", ";", "}", "}" ]
Remove a property from the initial values. @param property The {@link ElementDescriptor} of the property.
[ "Remove", "a", "property", "from", "the", "initial", "values", "." ]
a619d85423210a283b3eb1fba9abda4fdc894969
https://github.com/dmfs/jdav/blob/a619d85423210a283b3eb1fba9abda4fdc894969/src/org/dmfs/dav/rfc4791/MkCalendar.java#L146-L152
45,321
wuman/orientdb-android
core/src/main/java/com/orientechnologies/orient/core/db/document/ODatabaseDocumentTx.java
ODatabaseDocumentTx.countClass
public long countClass(final String iClassName) { final OClass cls = getMetadata().getSchema().getClass(iClassName); if (cls == null) throw new IllegalArgumentException("Class '" + iClassName + "' not found in database"); return cls.count(); }
java
public long countClass(final String iClassName) { final OClass cls = getMetadata().getSchema().getClass(iClassName); if (cls == null) throw new IllegalArgumentException("Class '" + iClassName + "' not found in database"); return cls.count(); }
[ "public", "long", "countClass", "(", "final", "String", "iClassName", ")", "{", "final", "OClass", "cls", "=", "getMetadata", "(", ")", ".", "getSchema", "(", ")", ".", "getClass", "(", "iClassName", ")", ";", "if", "(", "cls", "==", "null", ")", "thro...
Returns the number of the records of the class iClassName.
[ "Returns", "the", "number", "of", "the", "records", "of", "the", "class", "iClassName", "." ]
ff9b17e4349f26168b2d0c4facb1a18cbfbe8cf0
https://github.com/wuman/orientdb-android/blob/ff9b17e4349f26168b2d0c4facb1a18cbfbe8cf0/core/src/main/java/com/orientechnologies/orient/core/db/document/ODatabaseDocumentTx.java#L417-L424
45,322
wuman/orientdb-android
core/src/main/java/com/orientechnologies/orient/core/serialization/serializer/binary/OBinarySerializerFactory.java
OBinarySerializerFactory.getObjectSerializer
public OBinarySerializer<?> getObjectSerializer(final byte identifier) { OBinarySerializer<?> impl = serializerIdMap.get(identifier); if (impl == null) { final Class<? extends OBinarySerializer<?>> cls = serializerClassesIdMap.get(identifier); if (cls != null) try { impl = cl...
java
public OBinarySerializer<?> getObjectSerializer(final byte identifier) { OBinarySerializer<?> impl = serializerIdMap.get(identifier); if (impl == null) { final Class<? extends OBinarySerializer<?>> cls = serializerClassesIdMap.get(identifier); if (cls != null) try { impl = cl...
[ "public", "OBinarySerializer", "<", "?", ">", "getObjectSerializer", "(", "final", "byte", "identifier", ")", "{", "OBinarySerializer", "<", "?", ">", "impl", "=", "serializerIdMap", ".", "get", "(", "identifier", ")", ";", "if", "(", "impl", "==", "null", ...
Obtain OBinarySerializer instance by it's id. @param identifier is serializes identifier. @return OBinarySerializer instance.
[ "Obtain", "OBinarySerializer", "instance", "by", "it", "s", "id", "." ]
ff9b17e4349f26168b2d0c4facb1a18cbfbe8cf0
https://github.com/wuman/orientdb-android/blob/ff9b17e4349f26168b2d0c4facb1a18cbfbe8cf0/core/src/main/java/com/orientechnologies/orient/core/serialization/serializer/binary/OBinarySerializerFactory.java#L108-L120
45,323
wuman/orientdb-android
core/src/main/java/com/orientechnologies/orient/core/storage/impl/local/ODataLocal.java
ODataLocal.addRecord
public long addRecord(final ORecordId iRid, final byte[] iContent) throws IOException { if (iContent.length == 0) // AVOID UNUSEFUL CREATION OF EMPTY RECORD: IT WILL BE CREATED AT FIRST UPDATE return -1; final int recordSize = iContent.length + RECORD_FIX_SIZE; acquireExclusiveLock();...
java
public long addRecord(final ORecordId iRid, final byte[] iContent) throws IOException { if (iContent.length == 0) // AVOID UNUSEFUL CREATION OF EMPTY RECORD: IT WILL BE CREATED AT FIRST UPDATE return -1; final int recordSize = iContent.length + RECORD_FIX_SIZE; acquireExclusiveLock();...
[ "public", "long", "addRecord", "(", "final", "ORecordId", "iRid", ",", "final", "byte", "[", "]", "iContent", ")", "throws", "IOException", "{", "if", "(", "iContent", ".", "length", "==", "0", ")", "// AVOID UNUSEFUL CREATION OF EMPTY RECORD: IT WILL BE CREATED AT ...
Add the record content in file. @param iContent The content to write @return The record offset. @throws IOException
[ "Add", "the", "record", "content", "in", "file", "." ]
ff9b17e4349f26168b2d0c4facb1a18cbfbe8cf0
https://github.com/wuman/orientdb-android/blob/ff9b17e4349f26168b2d0c4facb1a18cbfbe8cf0/core/src/main/java/com/orientechnologies/orient/core/storage/impl/local/ODataLocal.java#L187-L205
45,324
wuman/orientdb-android
core/src/main/java/com/orientechnologies/orient/core/storage/impl/local/ODataLocal.java
ODataLocal.getRecord
public byte[] getRecord(final long iPosition) throws IOException { if (iPosition == -1) return null; acquireSharedLock(); try { final long[] pos = getRelativePosition(iPosition); final OFile file = files[(int) pos[0]]; final int recordSize = file.readInt(pos[1]); ...
java
public byte[] getRecord(final long iPosition) throws IOException { if (iPosition == -1) return null; acquireSharedLock(); try { final long[] pos = getRelativePosition(iPosition); final OFile file = files[(int) pos[0]]; final int recordSize = file.readInt(pos[1]); ...
[ "public", "byte", "[", "]", "getRecord", "(", "final", "long", "iPosition", ")", "throws", "IOException", "{", "if", "(", "iPosition", "==", "-", "1", ")", "return", "null", ";", "acquireSharedLock", "(", ")", ";", "try", "{", "final", "long", "[", "]"...
Returns the record content from file. @throws IOException
[ "Returns", "the", "record", "content", "from", "file", "." ]
ff9b17e4349f26168b2d0c4facb1a18cbfbe8cf0
https://github.com/wuman/orientdb-android/blob/ff9b17e4349f26168b2d0c4facb1a18cbfbe8cf0/core/src/main/java/com/orientechnologies/orient/core/storage/impl/local/ODataLocal.java#L212-L246
45,325
wuman/orientdb-android
core/src/main/java/com/orientechnologies/orient/core/storage/impl/local/ODataLocal.java
ODataLocal.getRecordSize
public int getRecordSize(final long iPosition) throws IOException { acquireSharedLock(); try { final long[] pos = getRelativePosition(iPosition); final OFile file = files[(int) pos[0]]; return file.readInt(pos[1]); } finally { releaseSharedLock(); } }
java
public int getRecordSize(final long iPosition) throws IOException { acquireSharedLock(); try { final long[] pos = getRelativePosition(iPosition); final OFile file = files[(int) pos[0]]; return file.readInt(pos[1]); } finally { releaseSharedLock(); } }
[ "public", "int", "getRecordSize", "(", "final", "long", "iPosition", ")", "throws", "IOException", "{", "acquireSharedLock", "(", ")", ";", "try", "{", "final", "long", "[", "]", "pos", "=", "getRelativePosition", "(", "iPosition", ")", ";", "final", "OFile"...
Returns the record size. @throws IOException
[ "Returns", "the", "record", "size", "." ]
ff9b17e4349f26168b2d0c4facb1a18cbfbe8cf0
https://github.com/wuman/orientdb-android/blob/ff9b17e4349f26168b2d0c4facb1a18cbfbe8cf0/core/src/main/java/com/orientechnologies/orient/core/storage/impl/local/ODataLocal.java#L253-L265
45,326
wuman/orientdb-android
core/src/main/java/com/orientechnologies/orient/core/storage/impl/local/ODataLocal.java
ODataLocal.setRecord
public long setRecord(final long iPosition, final ORecordId iRid, final byte[] iContent) throws IOException { acquireExclusiveLock(); try { long[] pos = getRelativePosition(iPosition); final OFile file = files[(int) pos[0]]; final int recordSize = file.readInt(pos[1]); final in...
java
public long setRecord(final long iPosition, final ORecordId iRid, final byte[] iContent) throws IOException { acquireExclusiveLock(); try { long[] pos = getRelativePosition(iPosition); final OFile file = files[(int) pos[0]]; final int recordSize = file.readInt(pos[1]); final in...
[ "public", "long", "setRecord", "(", "final", "long", "iPosition", ",", "final", "ORecordId", "iRid", ",", "final", "byte", "[", "]", "iContent", ")", "throws", "IOException", "{", "acquireExclusiveLock", "(", ")", ";", "try", "{", "long", "[", "]", "pos", ...
Set the record content in file. @param iPosition The previous record's offset @param iContent The content to write @return The new record offset or the same received as parameter is the old space was reused. @throws IOException
[ "Set", "the", "record", "content", "in", "file", "." ]
ff9b17e4349f26168b2d0c4facb1a18cbfbe8cf0
https://github.com/wuman/orientdb-android/blob/ff9b17e4349f26168b2d0c4facb1a18cbfbe8cf0/core/src/main/java/com/orientechnologies/orient/core/storage/impl/local/ODataLocal.java#L292-L333
45,327
wuman/orientdb-android
core/src/main/java/com/orientechnologies/orient/core/storage/impl/local/ODataLocal.java
ODataLocal.getHolesList
public List<ODataHoleInfo> getHolesList() { acquireSharedLock(); try { final List<ODataHoleInfo> holes = new ArrayList<ODataHoleInfo>(); final int tot = holeSegment.getHoles(); for (int i = 0; i < tot; ++i) { final ODataHoleInfo h = holeSegment.getHole(i); if (h != n...
java
public List<ODataHoleInfo> getHolesList() { acquireSharedLock(); try { final List<ODataHoleInfo> holes = new ArrayList<ODataHoleInfo>(); final int tot = holeSegment.getHoles(); for (int i = 0; i < tot; ++i) { final ODataHoleInfo h = holeSegment.getHole(i); if (h != n...
[ "public", "List", "<", "ODataHoleInfo", ">", "getHolesList", "(", ")", "{", "acquireSharedLock", "(", ")", ";", "try", "{", "final", "List", "<", "ODataHoleInfo", ">", "holes", "=", "new", "ArrayList", "<", "ODataHoleInfo", ">", "(", ")", ";", "final", "...
Returns the list of holes as pair of position & ppos @throws IOException
[ "Returns", "the", "list", "of", "holes", "as", "pair", "of", "position", "&", "ppos" ]
ff9b17e4349f26168b2d0c4facb1a18cbfbe8cf0
https://github.com/wuman/orientdb-android/blob/ff9b17e4349f26168b2d0c4facb1a18cbfbe8cf0/core/src/main/java/com/orientechnologies/orient/core/storage/impl/local/ODataLocal.java#L375-L393
45,328
amsa-code/risky
geo-analyzer/src/main/java/au/gov/amsa/geo/model/Bounds.java
Bounds.betweenLongitudes
private static boolean betweenLongitudes(double topLeftLon, double bottomRightLon, double lon) { if (topLeftLon <= bottomRightLon) return lon >= topLeftLon && lon <= bottomRightLon; else return lon >= topLeftLon || lon <= bottomRightLon; }
java
private static boolean betweenLongitudes(double topLeftLon, double bottomRightLon, double lon) { if (topLeftLon <= bottomRightLon) return lon >= topLeftLon && lon <= bottomRightLon; else return lon >= topLeftLon || lon <= bottomRightLon; }
[ "private", "static", "boolean", "betweenLongitudes", "(", "double", "topLeftLon", ",", "double", "bottomRightLon", ",", "double", "lon", ")", "{", "if", "(", "topLeftLon", "<=", "bottomRightLon", ")", "return", "lon", ">=", "topLeftLon", "&&", "lon", "<=", "bo...
Returns true if and only if lon is between the longitudes topLeftLon and bottomRightLon. @param topLeftLon must be between -180 and 180 @param bottomRightLon must be between -180 and 180 @param lon must be between -180 and 180 @return
[ "Returns", "true", "if", "and", "only", "if", "lon", "is", "between", "the", "longitudes", "topLeftLon", "and", "bottomRightLon", "." ]
13649942aeddfdb9210eec072c605bc5d7a6daf3
https://github.com/amsa-code/risky/blob/13649942aeddfdb9210eec072c605bc5d7a6daf3/geo-analyzer/src/main/java/au/gov/amsa/geo/model/Bounds.java#L68-L73
45,329
dmfs/jdav
src/org/dmfs/dav/rfc4918/Response.java
Response.getPropertyStatus
public int getPropertyStatus(ElementDescriptor<?> descriptor) { PropStat propStat = mPropStatByProperty.get(descriptor); if (propStat == null) { return STATUS_NONE; } return propStat.getStatusCode(); }
java
public int getPropertyStatus(ElementDescriptor<?> descriptor) { PropStat propStat = mPropStatByProperty.get(descriptor); if (propStat == null) { return STATUS_NONE; } return propStat.getStatusCode(); }
[ "public", "int", "getPropertyStatus", "(", "ElementDescriptor", "<", "?", ">", "descriptor", ")", "{", "PropStat", "propStat", "=", "mPropStatByProperty", ".", "get", "(", "descriptor", ")", ";", "if", "(", "propStat", "==", "null", ")", "{", "return", "STAT...
Return the status of a specific property. @param descriptor The {@link XmlElementDescriptor} of the property. @return The status of the property or {@link #STATUS_NONE} if the property was not found.
[ "Return", "the", "status", "of", "a", "specific", "property", "." ]
a619d85423210a283b3eb1fba9abda4fdc894969
https://github.com/dmfs/jdav/blob/a619d85423210a283b3eb1fba9abda4fdc894969/src/org/dmfs/dav/rfc4918/Response.java#L335-L344
45,330
dmfs/jdav
src/org/dmfs/dav/rfc4918/Response.java
Response.getPropertyValue
public <T> T getPropertyValue(ElementDescriptor<T> descriptor) { PropStat propStat = mPropStatByProperty.get(descriptor); if (propStat == null) { return null; } return propStat.getPropertyValue(descriptor); }
java
public <T> T getPropertyValue(ElementDescriptor<T> descriptor) { PropStat propStat = mPropStatByProperty.get(descriptor); if (propStat == null) { return null; } return propStat.getPropertyValue(descriptor); }
[ "public", "<", "T", ">", "T", "getPropertyValue", "(", "ElementDescriptor", "<", "T", ">", "descriptor", ")", "{", "PropStat", "propStat", "=", "mPropStatByProperty", ".", "get", "(", "descriptor", ")", ";", "if", "(", "propStat", "==", "null", ")", "{", ...
Get the value of a specific property. @param descriptor The {@link XmlElementDescriptor} of the property to return. @return The property value, may be <code>null</code> if the property was not present or didn't contain any value (because it had a non- {@link HttpStatus#OK} status).
[ "Get", "the", "value", "of", "a", "specific", "property", "." ]
a619d85423210a283b3eb1fba9abda4fdc894969
https://github.com/dmfs/jdav/blob/a619d85423210a283b3eb1fba9abda4fdc894969/src/org/dmfs/dav/rfc4918/Response.java#L355-L364
45,331
wuman/orientdb-android
core/src/main/java/com/orientechnologies/orient/core/index/OIndexes.java
OIndexes.getFactories
private static synchronized Set<OIndexFactory> getFactories() { if (FACTORIES == null) { final Iterator<OIndexFactory> ite = lookupProviderWithOrientClassLoader(OIndexFactory.class,orientClassLoader); final Set<OIndexFactory> factories = new HashSet<OIndexFactory>(); while (ite.hasNext()) { factories.a...
java
private static synchronized Set<OIndexFactory> getFactories() { if (FACTORIES == null) { final Iterator<OIndexFactory> ite = lookupProviderWithOrientClassLoader(OIndexFactory.class,orientClassLoader); final Set<OIndexFactory> factories = new HashSet<OIndexFactory>(); while (ite.hasNext()) { factories.a...
[ "private", "static", "synchronized", "Set", "<", "OIndexFactory", ">", "getFactories", "(", ")", "{", "if", "(", "FACTORIES", "==", "null", ")", "{", "final", "Iterator", "<", "OIndexFactory", ">", "ite", "=", "lookupProviderWithOrientClassLoader", "(", "OIndexF...
Cache a set of all factories. we do not use the service loader directly since it is not concurrent. @return Set<OIndexFactory>
[ "Cache", "a", "set", "of", "all", "factories", ".", "we", "do", "not", "use", "the", "service", "loader", "directly", "since", "it", "is", "not", "concurrent", "." ]
ff9b17e4349f26168b2d0c4facb1a18cbfbe8cf0
https://github.com/wuman/orientdb-android/blob/ff9b17e4349f26168b2d0c4facb1a18cbfbe8cf0/core/src/main/java/com/orientechnologies/orient/core/index/OIndexes.java#L69-L81
45,332
wuman/orientdb-android
core/src/main/java/com/orientechnologies/orient/core/record/ORecordAbstract.java
ORecordAbstract.addListener
public void addListener(final ORecordListener iListener) { if (_listeners == null) _listeners = Collections.newSetFromMap(new WeakHashMap<ORecordListener, Boolean>()); _listeners.add(iListener); }
java
public void addListener(final ORecordListener iListener) { if (_listeners == null) _listeners = Collections.newSetFromMap(new WeakHashMap<ORecordListener, Boolean>()); _listeners.add(iListener); }
[ "public", "void", "addListener", "(", "final", "ORecordListener", "iListener", ")", "{", "if", "(", "_listeners", "==", "null", ")", "_listeners", "=", "Collections", ".", "newSetFromMap", "(", "new", "WeakHashMap", "<", "ORecordListener", ",", "Boolean", ">", ...
Add a listener to the current document to catch all the supported events. @see ORecordListener @param iListener ODocumentListener implementation
[ "Add", "a", "listener", "to", "the", "current", "document", "to", "catch", "all", "the", "supported", "events", "." ]
ff9b17e4349f26168b2d0c4facb1a18cbfbe8cf0
https://github.com/wuman/orientdb-android/blob/ff9b17e4349f26168b2d0c4facb1a18cbfbe8cf0/core/src/main/java/com/orientechnologies/orient/core/record/ORecordAbstract.java#L357-L362
45,333
soi-toolkit/soi-toolkit-mule
tools/soitoolkit-generator/soitoolkit-generator-eclipse-plugin/soitoolkit-generator-plugin/src/org/soitoolkit/tools/generator/plugin/createcomponent/CreateComponentUtil.java
CreateComponentUtil.getComponentProjectName
public static String getComponentProjectName(int componentType, String groupId, String artifactId) { IModel m = ModelFactory.newModel(groupId, artifactId, null, null, MuleVersionEnum.MAIN_MULE_VERSION, null, null); String projectFolderName = null; ComponentEnum compEnum = ComponentEnum.get(componentType); switc...
java
public static String getComponentProjectName(int componentType, String groupId, String artifactId) { IModel m = ModelFactory.newModel(groupId, artifactId, null, null, MuleVersionEnum.MAIN_MULE_VERSION, null, null); String projectFolderName = null; ComponentEnum compEnum = ComponentEnum.get(componentType); switc...
[ "public", "static", "String", "getComponentProjectName", "(", "int", "componentType", ",", "String", "groupId", ",", "String", "artifactId", ")", "{", "IModel", "m", "=", "ModelFactory", ".", "newModel", "(", "groupId", ",", "artifactId", ",", "null", ",", "nu...
public static final int IM_SCHEMA_COMPONENT = 3;
[ "public", "static", "final", "int", "IM_SCHEMA_COMPONENT", "=", "3", ";" ]
e891350dbf55e6307be94d193d056bdb785b37d3
https://github.com/soi-toolkit/soi-toolkit-mule/blob/e891350dbf55e6307be94d193d056bdb785b37d3/tools/soitoolkit-generator/soitoolkit-generator-eclipse-plugin/soitoolkit-generator-plugin/src/org/soitoolkit/tools/generator/plugin/createcomponent/CreateComponentUtil.java#L31-L47
45,334
lightblue-platform/lightblue-migrator
facade/src/main/java/com/redhat/lightblue/migrator/facade/ConsistencyChecker.java
ConsistencyChecker.checkConsistency
protected boolean checkConsistency(Object o1, Object o2) { return checkConsistency(o1, o2, null, null); }
java
protected boolean checkConsistency(Object o1, Object o2) { return checkConsistency(o1, o2, null, null); }
[ "protected", "boolean", "checkConsistency", "(", "Object", "o1", ",", "Object", "o2", ")", "{", "return", "checkConsistency", "(", "o1", ",", "o2", ",", "null", ",", "null", ")", ";", "}" ]
convenience method for unit testing
[ "convenience", "method", "for", "unit", "testing" ]
ec20748557b40d1f7851e1816d1b76dae48d2027
https://github.com/lightblue-platform/lightblue-migrator/blob/ec20748557b40d1f7851e1816d1b76dae48d2027/facade/src/main/java/com/redhat/lightblue/migrator/facade/ConsistencyChecker.java#L189-L191
45,335
lightblue-platform/lightblue-migrator
facade/src/main/java/com/redhat/lightblue/migrator/facade/ConsistencyChecker.java
ConsistencyChecker.checkConsistency
public boolean checkConsistency(final Object legacyEntity, final Object lightblueEntity, final String methodName, MethodCallStringifier callToLogInCaseOfInconsistency) { if (legacyEntity == null && lightblueEntity == null) { return true; } if (callToLogInCaseOfInconsistency == null...
java
public boolean checkConsistency(final Object legacyEntity, final Object lightblueEntity, final String methodName, MethodCallStringifier callToLogInCaseOfInconsistency) { if (legacyEntity == null && lightblueEntity == null) { return true; } if (callToLogInCaseOfInconsistency == null...
[ "public", "boolean", "checkConsistency", "(", "final", "Object", "legacyEntity", ",", "final", "Object", "lightblueEntity", ",", "final", "String", "methodName", ",", "MethodCallStringifier", "callToLogInCaseOfInconsistency", ")", "{", "if", "(", "legacyEntity", "==", ...
Check that objects are equal using org.skyscreamer.jsonassert library. @param legacyEntity object returned from legacy call @param lightblueEntity object returned from lightblue call @param methodName the method name @param callToLogInCaseOfInconsistency the call including parameters @return
[ "Check", "that", "objects", "are", "equal", "using", "org", ".", "skyscreamer", ".", "jsonassert", "library", "." ]
ec20748557b40d1f7851e1816d1b76dae48d2027
https://github.com/lightblue-platform/lightblue-migrator/blob/ec20748557b40d1f7851e1816d1b76dae48d2027/facade/src/main/java/com/redhat/lightblue/migrator/facade/ConsistencyChecker.java#L202-L271
45,336
wuman/orientdb-android
core/src/main/java/com/orientechnologies/orient/core/sql/OCommandExecutorSQLInsert.java
OCommandExecutorSQLInsert.execute
public Object execute(final Map<Object, Object> iArgs) { if (newRecords == null) throw new OCommandExecutionException("Cannot execute the command because it has not been parsed yet"); final OCommandParameters commandParameters = new OCommandParameters(iArgs); if (indexName != null) { fina...
java
public Object execute(final Map<Object, Object> iArgs) { if (newRecords == null) throw new OCommandExecutionException("Cannot execute the command because it has not been parsed yet"); final OCommandParameters commandParameters = new OCommandParameters(iArgs); if (indexName != null) { fina...
[ "public", "Object", "execute", "(", "final", "Map", "<", "Object", ",", "Object", ">", "iArgs", ")", "{", "if", "(", "newRecords", "==", "null", ")", "throw", "new", "OCommandExecutionException", "(", "\"Cannot execute the command because it has not been parsed yet\""...
Execute the INSERT and return the ODocument object created.
[ "Execute", "the", "INSERT", "and", "return", "the", "ODocument", "object", "created", "." ]
ff9b17e4349f26168b2d0c4facb1a18cbfbe8cf0
https://github.com/wuman/orientdb-android/blob/ff9b17e4349f26168b2d0c4facb1a18cbfbe8cf0/core/src/main/java/com/orientechnologies/orient/core/sql/OCommandExecutorSQLInsert.java#L176-L218
45,337
wuman/orientdb-android
object/src/main/java/com/orientechnologies/orient/object/db/graph/OGraphVertex.java
OGraphVertex.link
@SuppressWarnings("unchecked") public OGraphEdge link(final OGraphVertex iTargetVertex, final String iClassName) { if (iTargetVertex == null) throw new IllegalArgumentException("Missed the target vertex"); // CREATE THE EDGE BETWEEN ME AND THE TARGET final OGraphEdge edge = new OGraphEdge(database, iCl...
java
@SuppressWarnings("unchecked") public OGraphEdge link(final OGraphVertex iTargetVertex, final String iClassName) { if (iTargetVertex == null) throw new IllegalArgumentException("Missed the target vertex"); // CREATE THE EDGE BETWEEN ME AND THE TARGET final OGraphEdge edge = new OGraphEdge(database, iCl...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "OGraphEdge", "link", "(", "final", "OGraphVertex", "iTargetVertex", ",", "final", "String", "iClassName", ")", "{", "if", "(", "iTargetVertex", "==", "null", ")", "throw", "new", "IllegalArgumentExcept...
Create a link between the current vertex and the target one. The link is of type iClassName. @param iTargetVertex Target vertex where to create the connection @param iClassName The name of the class to use for the Edge @return The new edge created
[ "Create", "a", "link", "between", "the", "current", "vertex", "and", "the", "target", "one", ".", "The", "link", "is", "of", "type", "iClassName", "." ]
ff9b17e4349f26168b2d0c4facb1a18cbfbe8cf0
https://github.com/wuman/orientdb-android/blob/ff9b17e4349f26168b2d0c4facb1a18cbfbe8cf0/object/src/main/java/com/orientechnologies/orient/object/db/graph/OGraphVertex.java#L90-L120
45,338
wuman/orientdb-android
object/src/main/java/com/orientechnologies/orient/object/db/graph/OGraphVertex.java
OGraphVertex.unlink
public OGraphVertex unlink(final OGraphVertex iTargetVertex) { if (iTargetVertex == null) throw new IllegalArgumentException("Missed the target vertex"); unlink(database, document, iTargetVertex.getDocument()); return this; }
java
public OGraphVertex unlink(final OGraphVertex iTargetVertex) { if (iTargetVertex == null) throw new IllegalArgumentException("Missed the target vertex"); unlink(database, document, iTargetVertex.getDocument()); return this; }
[ "public", "OGraphVertex", "unlink", "(", "final", "OGraphVertex", "iTargetVertex", ")", "{", "if", "(", "iTargetVertex", "==", "null", ")", "throw", "new", "IllegalArgumentException", "(", "\"Missed the target vertex\"", ")", ";", "unlink", "(", "database", ",", "...
Remove the link between the current vertex and the target one. @param iTargetVertex Target vertex where to remove the connection @return Current vertex (useful for fluent calls)
[ "Remove", "the", "link", "between", "the", "current", "vertex", "and", "the", "target", "one", "." ]
ff9b17e4349f26168b2d0c4facb1a18cbfbe8cf0
https://github.com/wuman/orientdb-android/blob/ff9b17e4349f26168b2d0c4facb1a18cbfbe8cf0/object/src/main/java/com/orientechnologies/orient/object/db/graph/OGraphVertex.java#L140-L147
45,339
wuman/orientdb-android
object/src/main/java/com/orientechnologies/orient/object/db/graph/OGraphVertex.java
OGraphVertex.hasInEdges
public boolean hasInEdges() { final Set<ODocument> docs = document.field(OGraphDatabase.VERTEX_FIELD_IN); return docs != null && !docs.isEmpty(); }
java
public boolean hasInEdges() { final Set<ODocument> docs = document.field(OGraphDatabase.VERTEX_FIELD_IN); return docs != null && !docs.isEmpty(); }
[ "public", "boolean", "hasInEdges", "(", ")", "{", "final", "Set", "<", "ODocument", ">", "docs", "=", "document", ".", "field", "(", "OGraphDatabase", ".", "VERTEX_FIELD_IN", ")", ";", "return", "docs", "!=", "null", "&&", "!", "docs", ".", "isEmpty", "(...
Returns true if the vertex has at least one incoming edge, otherwise false.
[ "Returns", "true", "if", "the", "vertex", "has", "at", "least", "one", "incoming", "edge", "otherwise", "false", "." ]
ff9b17e4349f26168b2d0c4facb1a18cbfbe8cf0
https://github.com/wuman/orientdb-android/blob/ff9b17e4349f26168b2d0c4facb1a18cbfbe8cf0/object/src/main/java/com/orientechnologies/orient/object/db/graph/OGraphVertex.java#L152-L155
45,340
wuman/orientdb-android
object/src/main/java/com/orientechnologies/orient/object/db/graph/OGraphVertex.java
OGraphVertex.hasOutEdges
public boolean hasOutEdges() { final Set<ODocument> docs = document.field(OGraphDatabase.VERTEX_FIELD_OUT); return docs != null && !docs.isEmpty(); }
java
public boolean hasOutEdges() { final Set<ODocument> docs = document.field(OGraphDatabase.VERTEX_FIELD_OUT); return docs != null && !docs.isEmpty(); }
[ "public", "boolean", "hasOutEdges", "(", ")", "{", "final", "Set", "<", "ODocument", ">", "docs", "=", "document", ".", "field", "(", "OGraphDatabase", ".", "VERTEX_FIELD_OUT", ")", ";", "return", "docs", "!=", "null", "&&", "!", "docs", ".", "isEmpty", ...
Returns true if the vertex has at least one outgoing edge, otherwise false.
[ "Returns", "true", "if", "the", "vertex", "has", "at", "least", "one", "outgoing", "edge", "otherwise", "false", "." ]
ff9b17e4349f26168b2d0c4facb1a18cbfbe8cf0
https://github.com/wuman/orientdb-android/blob/ff9b17e4349f26168b2d0c4facb1a18cbfbe8cf0/object/src/main/java/com/orientechnologies/orient/object/db/graph/OGraphVertex.java#L160-L163
45,341
wuman/orientdb-android
object/src/main/java/com/orientechnologies/orient/object/db/graph/OGraphVertex.java
OGraphVertex.getInEdges
public Set<OGraphEdge> getInEdges(final String iEdgeLabel) { Set<OGraphEdge> temp = in != null ? in.get() : null; if (temp == null) { if (iEdgeLabel == null) temp = new HashSet<OGraphEdge>(); in = new SoftReference<Set<OGraphEdge>>(temp); final Set<Object> docs = document.field(OGraphDatabase...
java
public Set<OGraphEdge> getInEdges(final String iEdgeLabel) { Set<OGraphEdge> temp = in != null ? in.get() : null; if (temp == null) { if (iEdgeLabel == null) temp = new HashSet<OGraphEdge>(); in = new SoftReference<Set<OGraphEdge>>(temp); final Set<Object> docs = document.field(OGraphDatabase...
[ "public", "Set", "<", "OGraphEdge", ">", "getInEdges", "(", "final", "String", "iEdgeLabel", ")", "{", "Set", "<", "OGraphEdge", ">", "temp", "=", "in", "!=", "null", "?", "in", ".", "get", "(", ")", ":", "null", ";", "if", "(", "temp", "==", "null...
Returns the incoming edges of current node having the requested label. If there are no edged, then an empty set is returned.
[ "Returns", "the", "incoming", "edges", "of", "current", "node", "having", "the", "requested", "label", ".", "If", "there", "are", "no", "edged", "then", "an", "empty", "set", "is", "returned", "." ]
ff9b17e4349f26168b2d0c4facb1a18cbfbe8cf0
https://github.com/wuman/orientdb-android/blob/ff9b17e4349f26168b2d0c4facb1a18cbfbe8cf0/object/src/main/java/com/orientechnologies/orient/object/db/graph/OGraphVertex.java#L175-L206
45,342
wuman/orientdb-android
object/src/main/java/com/orientechnologies/orient/object/db/graph/OGraphVertex.java
OGraphVertex.browseOutEdgesVertexes
@SuppressWarnings("unchecked") public Set<OGraphVertex> browseOutEdgesVertexes() { final Set<OGraphVertex> resultset = new HashSet<OGraphVertex>(); Set<OGraphEdge> temp = out != null ? out.get() : null; if (temp == null) { final Set<OIdentifiable> docEdges = (Set<OIdentifiable>) document.field(OGraph...
java
@SuppressWarnings("unchecked") public Set<OGraphVertex> browseOutEdgesVertexes() { final Set<OGraphVertex> resultset = new HashSet<OGraphVertex>(); Set<OGraphEdge> temp = out != null ? out.get() : null; if (temp == null) { final Set<OIdentifiable> docEdges = (Set<OIdentifiable>) document.field(OGraph...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "Set", "<", "OGraphVertex", ">", "browseOutEdgesVertexes", "(", ")", "{", "final", "Set", "<", "OGraphVertex", ">", "resultset", "=", "new", "HashSet", "<", "OGraphVertex", ">", "(", ")", ";", "Se...
Returns the set of Vertexes from the outgoing edges. It avoids to unmarshall edges.
[ "Returns", "the", "set", "of", "Vertexes", "from", "the", "outgoing", "edges", ".", "It", "avoids", "to", "unmarshall", "edges", "." ]
ff9b17e4349f26168b2d0c4facb1a18cbfbe8cf0
https://github.com/wuman/orientdb-android/blob/ff9b17e4349f26168b2d0c4facb1a18cbfbe8cf0/object/src/main/java/com/orientechnologies/orient/object/db/graph/OGraphVertex.java#L254-L276
45,343
wuman/orientdb-android
object/src/main/java/com/orientechnologies/orient/object/db/graph/OGraphVertex.java
OGraphVertex.browseInEdgesVertexes
@SuppressWarnings("unchecked") public Set<OGraphVertex> browseInEdgesVertexes() { final Set<OGraphVertex> resultset = new HashSet<OGraphVertex>(); Set<OGraphEdge> temp = in != null ? in.get() : null; if (temp == null) { final Set<ODocument> docEdges = (Set<ODocument>) document.field(OGraphDatabase.VE...
java
@SuppressWarnings("unchecked") public Set<OGraphVertex> browseInEdgesVertexes() { final Set<OGraphVertex> resultset = new HashSet<OGraphVertex>(); Set<OGraphEdge> temp = in != null ? in.get() : null; if (temp == null) { final Set<ODocument> docEdges = (Set<ODocument>) document.field(OGraphDatabase.VE...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "Set", "<", "OGraphVertex", ">", "browseInEdgesVertexes", "(", ")", "{", "final", "Set", "<", "OGraphVertex", ">", "resultset", "=", "new", "HashSet", "<", "OGraphVertex", ">", "(", ")", ";", "Set...
Returns the set of Vertexes from the incoming edges. It avoids to unmarshall edges.
[ "Returns", "the", "set", "of", "Vertexes", "from", "the", "incoming", "edges", ".", "It", "avoids", "to", "unmarshall", "edges", "." ]
ff9b17e4349f26168b2d0c4facb1a18cbfbe8cf0
https://github.com/wuman/orientdb-android/blob/ff9b17e4349f26168b2d0c4facb1a18cbfbe8cf0/object/src/main/java/com/orientechnologies/orient/object/db/graph/OGraphVertex.java#L281-L302
45,344
wuman/orientdb-android
object/src/main/java/com/orientechnologies/orient/object/db/graph/OGraphVertex.java
OGraphVertex.unlink
public static void unlink(final ODatabaseGraphTx iDatabase, final ODocument iSourceVertex, final ODocument iTargetVertex) { if (iTargetVertex == null) throw new IllegalArgumentException("Missed the target vertex"); if (iDatabase.existsUserObjectByRID(iSourceVertex.getIdentity())) { // WORK ALSO WITH IN ...
java
public static void unlink(final ODatabaseGraphTx iDatabase, final ODocument iSourceVertex, final ODocument iTargetVertex) { if (iTargetVertex == null) throw new IllegalArgumentException("Missed the target vertex"); if (iDatabase.existsUserObjectByRID(iSourceVertex.getIdentity())) { // WORK ALSO WITH IN ...
[ "public", "static", "void", "unlink", "(", "final", "ODatabaseGraphTx", "iDatabase", ",", "final", "ODocument", "iSourceVertex", ",", "final", "ODocument", "iTargetVertex", ")", "{", "if", "(", "iTargetVertex", "==", "null", ")", "throw", "new", "IllegalArgumentEx...
Unlinks all the edges between iSourceVertex and iTargetVertex @param iDatabase @param iSourceVertex @param iTargetVertex
[ "Unlinks", "all", "the", "edges", "between", "iSourceVertex", "and", "iTargetVertex" ]
ff9b17e4349f26168b2d0c4facb1a18cbfbe8cf0
https://github.com/wuman/orientdb-android/blob/ff9b17e4349f26168b2d0c4facb1a18cbfbe8cf0/object/src/main/java/com/orientechnologies/orient/object/db/graph/OGraphVertex.java#L395-L472
45,345
dmfs/jdav
src/org/dmfs/dav/rfc6578/SyncCollection.java
SyncCollection.limitNumberOfResults
public SyncCollection limitNumberOfResults(int limit) { if (limit > 0) { addLimit(WebDavSearch.NRESULTS, limit); } else { removeLimit(WebDavSearch.NRESULTS); } return this; }
java
public SyncCollection limitNumberOfResults(int limit) { if (limit > 0) { addLimit(WebDavSearch.NRESULTS, limit); } else { removeLimit(WebDavSearch.NRESULTS); } return this; }
[ "public", "SyncCollection", "limitNumberOfResults", "(", "int", "limit", ")", "{", "if", "(", "limit", ">", "0", ")", "{", "addLimit", "(", "WebDavSearch", ".", "NRESULTS", ",", "limit", ")", ";", "}", "else", "{", "removeLimit", "(", "WebDavSearch", ".", ...
Limit the number of results in the response, if supported by the server. A non-positive value will remove the limit. <p> <strong>Note:</strong> At present it's recommended to not use this feature. There are only a few servers that support it and some of them are broken and may return wrong results. </p> @param limit ...
[ "Limit", "the", "number", "of", "results", "in", "the", "response", "if", "supported", "by", "the", "server", ".", "A", "non", "-", "positive", "value", "will", "remove", "the", "limit", "." ]
a619d85423210a283b3eb1fba9abda4fdc894969
https://github.com/dmfs/jdav/blob/a619d85423210a283b3eb1fba9abda4fdc894969/src/org/dmfs/dav/rfc6578/SyncCollection.java#L183-L194
45,346
dmfs/jdav
src/org/dmfs/dav/rfc6578/SyncCollection.java
SyncCollection.getNumberOfResultsLimit
public int getNumberOfResultsLimit() { if (mLimit == null) { return 0; } Integer limit = (Integer) mLimit.get(WebDavSearch.NRESULTS); return limit == null ? 0 : limit; }
java
public int getNumberOfResultsLimit() { if (mLimit == null) { return 0; } Integer limit = (Integer) mLimit.get(WebDavSearch.NRESULTS); return limit == null ? 0 : limit; }
[ "public", "int", "getNumberOfResultsLimit", "(", ")", "{", "if", "(", "mLimit", "==", "null", ")", "{", "return", "0", ";", "}", "Integer", "limit", "=", "(", "Integer", ")", "mLimit", ".", "get", "(", "WebDavSearch", ".", "NRESULTS", ")", ";", "return...
Returns the limit for the number of results in this request. @return The limit or 0 if there is no limit.
[ "Returns", "the", "limit", "for", "the", "number", "of", "results", "in", "this", "request", "." ]
a619d85423210a283b3eb1fba9abda4fdc894969
https://github.com/dmfs/jdav/blob/a619d85423210a283b3eb1fba9abda4fdc894969/src/org/dmfs/dav/rfc6578/SyncCollection.java#L202-L210
45,347
dmfs/jdav
src/org/dmfs/dav/rfc6578/SyncCollection.java
SyncCollection.addLimit
private <T> void addLimit(ElementDescriptor<T> descriptor, T limit) { if (mLimit == null) { mLimit = new HashMap<ElementDescriptor<?>, Object>(6); } mLimit.put(descriptor, limit); }
java
private <T> void addLimit(ElementDescriptor<T> descriptor, T limit) { if (mLimit == null) { mLimit = new HashMap<ElementDescriptor<?>, Object>(6); } mLimit.put(descriptor, limit); }
[ "private", "<", "T", ">", "void", "addLimit", "(", "ElementDescriptor", "<", "T", ">", "descriptor", ",", "T", "limit", ")", "{", "if", "(", "mLimit", "==", "null", ")", "{", "mLimit", "=", "new", "HashMap", "<", "ElementDescriptor", "<", "?", ">", "...
Add a limit to the request. @param descriptor The {@link ElementDescriptor} of the limit element. @param limit The limit value.
[ "Add", "a", "limit", "to", "the", "request", "." ]
a619d85423210a283b3eb1fba9abda4fdc894969
https://github.com/dmfs/jdav/blob/a619d85423210a283b3eb1fba9abda4fdc894969/src/org/dmfs/dav/rfc6578/SyncCollection.java#L221-L228
45,348
loldevs/riotapi
spectator/src/main/java/net/boreeas/riotapi/spectator/MappedDataCache.java
MappedDataCache.put
public void put(K k, V v) { cache.put(k, v); acquireLock(k).countDown(); }
java
public void put(K k, V v) { cache.put(k, v); acquireLock(k).countDown(); }
[ "public", "void", "put", "(", "K", "k", ",", "V", "v", ")", "{", "cache", ".", "put", "(", "k", ",", "v", ")", ";", "acquireLock", "(", "k", ")", ".", "countDown", "(", ")", ";", "}" ]
Caches the given mapping and releases all waiting locks. @param k The key to store. @param v The value to store.
[ "Caches", "the", "given", "mapping", "and", "releases", "all", "waiting", "locks", "." ]
0b8aac407aa5289845f249024f9732332855544f
https://github.com/loldevs/riotapi/blob/0b8aac407aa5289845f249024f9732332855544f/spectator/src/main/java/net/boreeas/riotapi/spectator/MappedDataCache.java#L56-L59
45,349
loldevs/riotapi
spectator/src/main/java/net/boreeas/riotapi/spectator/MappedDataCache.java
MappedDataCache.get
public V get(K k) throws InterruptedException { await(k); return cache.get(k); }
java
public V get(K k) throws InterruptedException { await(k); return cache.get(k); }
[ "public", "V", "get", "(", "K", "k", ")", "throws", "InterruptedException", "{", "await", "(", "k", ")", ";", "return", "cache", ".", "get", "(", "k", ")", ";", "}" ]
Retrieve the value associated with the given key, blocking as long as necessary. @param k The key. @return The value associated with the key. @throws InterruptedException
[ "Retrieve", "the", "value", "associated", "with", "the", "given", "key", "blocking", "as", "long", "as", "necessary", "." ]
0b8aac407aa5289845f249024f9732332855544f
https://github.com/loldevs/riotapi/blob/0b8aac407aa5289845f249024f9732332855544f/spectator/src/main/java/net/boreeas/riotapi/spectator/MappedDataCache.java#L67-L70
45,350
loldevs/riotapi
spectator/src/main/java/net/boreeas/riotapi/spectator/MappedDataCache.java
MappedDataCache.get
public V get(K k, long timeout, TimeUnit unit) throws InterruptedException, TimeoutException { await(k, timeout, unit); return cache.get(k); }
java
public V get(K k, long timeout, TimeUnit unit) throws InterruptedException, TimeoutException { await(k, timeout, unit); return cache.get(k); }
[ "public", "V", "get", "(", "K", "k", ",", "long", "timeout", ",", "TimeUnit", "unit", ")", "throws", "InterruptedException", ",", "TimeoutException", "{", "await", "(", "k", ",", "timeout", ",", "unit", ")", ";", "return", "cache", ".", "get", "(", "k"...
Retrieve the value associated with the given key, blocking as long as necessary up to the specified maximum. @param k The key. @param timeout The length of the timeout. @param unit The time unit of the timeout. @return The value associated with the key. @throws InterruptedException @throws TimeoutException
[ "Retrieve", "the", "value", "associated", "with", "the", "given", "key", "blocking", "as", "long", "as", "necessary", "up", "to", "the", "specified", "maximum", "." ]
0b8aac407aa5289845f249024f9732332855544f
https://github.com/loldevs/riotapi/blob/0b8aac407aa5289845f249024f9732332855544f/spectator/src/main/java/net/boreeas/riotapi/spectator/MappedDataCache.java#L81-L85
45,351
loldevs/riotapi
spectator/src/main/java/net/boreeas/riotapi/spectator/MappedDataCache.java
MappedDataCache.await
public void await(K k, long timeout, TimeUnit unit) throws InterruptedException, TimeoutException { if (!acquireLock(k).await(timeout, unit)) { throw new TimeoutException("Wait time for retrieving value for key " + k + " exceeded " + timeout + " " + unit); } }
java
public void await(K k, long timeout, TimeUnit unit) throws InterruptedException, TimeoutException { if (!acquireLock(k).await(timeout, unit)) { throw new TimeoutException("Wait time for retrieving value for key " + k + " exceeded " + timeout + " " + unit); } }
[ "public", "void", "await", "(", "K", "k", ",", "long", "timeout", ",", "TimeUnit", "unit", ")", "throws", "InterruptedException", ",", "TimeoutException", "{", "if", "(", "!", "acquireLock", "(", "k", ")", ".", "await", "(", "timeout", ",", "unit", ")", ...
Waits until the key has been assigned a value, up to the specified maximum. @param k THe key to wait for. @param timeout The maximum time to wait. @param unit The time unit of the timeout. @throws InterruptedException @throws TimeoutException
[ "Waits", "until", "the", "key", "has", "been", "assigned", "a", "value", "up", "to", "the", "specified", "maximum", "." ]
0b8aac407aa5289845f249024f9732332855544f
https://github.com/loldevs/riotapi/blob/0b8aac407aa5289845f249024f9732332855544f/spectator/src/main/java/net/boreeas/riotapi/spectator/MappedDataCache.java#L104-L108
45,352
soi-toolkit/soi-toolkit-mule
commons/components/commons-mule/src/main/java/org/soitoolkit/commons/mule/sftp/SftpUtil.java
SftpUtil.initEndpointDirectories
public static void initEndpointDirectories(MuleContext muleContext, String[] serviceNames, String[] endpointNames) throws Exception { // Stop all named services (either Flows or services List<Lifecycle> services = new ArrayList<Lifecycle>(); for (String serviceName : serviceNames) { try { Lifecycle servic...
java
public static void initEndpointDirectories(MuleContext muleContext, String[] serviceNames, String[] endpointNames) throws Exception { // Stop all named services (either Flows or services List<Lifecycle> services = new ArrayList<Lifecycle>(); for (String serviceName : serviceNames) { try { Lifecycle servic...
[ "public", "static", "void", "initEndpointDirectories", "(", "MuleContext", "muleContext", ",", "String", "[", "]", "serviceNames", ",", "String", "[", "]", "endpointNames", ")", "throws", "Exception", "{", "// Stop all named services (either Flows or services", "List", ...
Initiates a list of sftp-endpoint-directories. Ensures that affected services are stopped during the initiation. @param serviceNames @param endpointNames @param muleContext @throws Exception
[ "Initiates", "a", "list", "of", "sftp", "-", "endpoint", "-", "directories", ".", "Ensures", "that", "affected", "services", "are", "stopped", "during", "the", "initiation", "." ]
e891350dbf55e6307be94d193d056bdb785b37d3
https://github.com/soi-toolkit/soi-toolkit-mule/blob/e891350dbf55e6307be94d193d056bdb785b37d3/commons/components/commons-mule/src/main/java/org/soitoolkit/commons/mule/sftp/SftpUtil.java#L69-L99
45,353
soi-toolkit/soi-toolkit-mule
commons/components/commons-mule/src/main/java/org/soitoolkit/commons/mule/sftp/SftpUtil.java
SftpUtil.getSftpClient
static protected SftpClient getSftpClient(MuleContext muleContext, String endpointName) throws IOException { ImmutableEndpoint endpoint = getImmutableEndpoint(muleContext, endpointName); try { SftpClient sftpClient = SftpConnectionFactory.createClient(endpoint); return sftpClient; } catch (Excepti...
java
static protected SftpClient getSftpClient(MuleContext muleContext, String endpointName) throws IOException { ImmutableEndpoint endpoint = getImmutableEndpoint(muleContext, endpointName); try { SftpClient sftpClient = SftpConnectionFactory.createClient(endpoint); return sftpClient; } catch (Excepti...
[ "static", "protected", "SftpClient", "getSftpClient", "(", "MuleContext", "muleContext", ",", "String", "endpointName", ")", "throws", "IOException", "{", "ImmutableEndpoint", "endpoint", "=", "getImmutableEndpoint", "(", "muleContext", ",", "endpointName", ")", ";", ...
Returns a SftpClient that is logged in to the sftp server that the endpoint is configured against. @param muleContext @param endpointName @return @throws IOException
[ "Returns", "a", "SftpClient", "that", "is", "logged", "in", "to", "the", "sftp", "server", "that", "the", "endpoint", "is", "configured", "against", "." ]
e891350dbf55e6307be94d193d056bdb785b37d3
https://github.com/soi-toolkit/soi-toolkit-mule/blob/e891350dbf55e6307be94d193d056bdb785b37d3/commons/components/commons-mule/src/main/java/org/soitoolkit/commons/mule/sftp/SftpUtil.java#L208-L244
45,354
soi-toolkit/soi-toolkit-mule
commons/components/commons-mule/src/main/java/org/soitoolkit/commons/mule/sftp/SftpUtil.java
SftpUtil.recursiveDelete
static protected void recursiveDelete(MuleContext muleContext, SftpClient sftpClient, String endpointName, String relativePath) throws IOException { EndpointURI endpointURI = getImmutableEndpoint(muleContext, endpointName).getEndpointURI(); String path = endpointURI.getPath() + relativePath; try { // Ensure t...
java
static protected void recursiveDelete(MuleContext muleContext, SftpClient sftpClient, String endpointName, String relativePath) throws IOException { EndpointURI endpointURI = getImmutableEndpoint(muleContext, endpointName).getEndpointURI(); String path = endpointURI.getPath() + relativePath; try { // Ensure t...
[ "static", "protected", "void", "recursiveDelete", "(", "MuleContext", "muleContext", ",", "SftpClient", "sftpClient", ",", "String", "endpointName", ",", "String", "relativePath", ")", "throws", "IOException", "{", "EndpointURI", "endpointURI", "=", "getImmutableEndpoin...
Deletes a directory with all its files and sub-directories. The reason it do a "chmod 700" before the delete is that some tests changes the permission, and thus we have to restore the right to delete it... @param muleClient @param endpointName @param relativePath @throws IOException
[ "Deletes", "a", "directory", "with", "all", "its", "files", "and", "sub", "-", "directories", ".", "The", "reason", "it", "do", "a", "chmod", "700", "before", "the", "delete", "is", "that", "some", "tests", "changes", "the", "permission", "and", "thus", ...
e891350dbf55e6307be94d193d056bdb785b37d3
https://github.com/soi-toolkit/soi-toolkit-mule/blob/e891350dbf55e6307be94d193d056bdb785b37d3/commons/components/commons-mule/src/main/java/org/soitoolkit/commons/mule/sftp/SftpUtil.java#L263-L302
45,355
wuman/orientdb-android
core/src/main/java/com/orientechnologies/orient/core/type/tree/OMVRBTreeEntryPersistent.java
OMVRBTreeEntryPersistent.save
public OMVRBTreeEntryPersistent<K, V> save() throws OSerializationException { if (!dataProvider.isEntryDirty()) return this; final boolean isNew = dataProvider.getIdentity().isNew(); // FOR EACH NEW LINK, SAVE BEFORE if (left != null && left.dataProvider.getIdentity().isNew()) { if...
java
public OMVRBTreeEntryPersistent<K, V> save() throws OSerializationException { if (!dataProvider.isEntryDirty()) return this; final boolean isNew = dataProvider.getIdentity().isNew(); // FOR EACH NEW LINK, SAVE BEFORE if (left != null && left.dataProvider.getIdentity().isNew()) { if...
[ "public", "OMVRBTreeEntryPersistent", "<", "K", ",", "V", ">", "save", "(", ")", "throws", "OSerializationException", "{", "if", "(", "!", "dataProvider", ".", "isEntryDirty", "(", ")", ")", "return", "this", ";", "final", "boolean", "isNew", "=", "dataProvi...
Assures that all the links versus parent, left and right are consistent.
[ "Assures", "that", "all", "the", "links", "versus", "parent", "left", "and", "right", "are", "consistent", "." ]
ff9b17e4349f26168b2d0c4facb1a18cbfbe8cf0
https://github.com/wuman/orientdb-android/blob/ff9b17e4349f26168b2d0c4facb1a18cbfbe8cf0/core/src/main/java/com/orientechnologies/orient/core/type/tree/OMVRBTreeEntryPersistent.java#L156-L201
45,356
wuman/orientdb-android
core/src/main/java/com/orientechnologies/orient/core/type/tree/OMVRBTreeEntryPersistent.java
OMVRBTreeEntryPersistent.delete
public OMVRBTreeEntryPersistent<K, V> delete() throws IOException { if (dataProvider != null) { pTree.removeNodeFromMemory(this); pTree.removeEntry(dataProvider.getIdentity()); // EARLY LOAD LEFT AND DELETE IT RECURSIVELY if (getLeft() != null) ((OMVRBTreeEntryPersistent<K, V...
java
public OMVRBTreeEntryPersistent<K, V> delete() throws IOException { if (dataProvider != null) { pTree.removeNodeFromMemory(this); pTree.removeEntry(dataProvider.getIdentity()); // EARLY LOAD LEFT AND DELETE IT RECURSIVELY if (getLeft() != null) ((OMVRBTreeEntryPersistent<K, V...
[ "public", "OMVRBTreeEntryPersistent", "<", "K", ",", "V", ">", "delete", "(", ")", "throws", "IOException", "{", "if", "(", "dataProvider", "!=", "null", ")", "{", "pTree", ".", "removeNodeFromMemory", "(", "this", ")", ";", "pTree", ".", "removeEntry", "(...
Delete all the nodes recursively. IF they are not loaded in memory, load all the tree. @throws IOException
[ "Delete", "all", "the", "nodes", "recursively", ".", "IF", "they", "are", "not", "loaded", "in", "memory", "load", "all", "the", "tree", "." ]
ff9b17e4349f26168b2d0c4facb1a18cbfbe8cf0
https://github.com/wuman/orientdb-android/blob/ff9b17e4349f26168b2d0c4facb1a18cbfbe8cf0/core/src/main/java/com/orientechnologies/orient/core/type/tree/OMVRBTreeEntryPersistent.java#L208-L228
45,357
wuman/orientdb-android
core/src/main/java/com/orientechnologies/orient/core/type/tree/OMVRBTreeEntryPersistent.java
OMVRBTreeEntryPersistent.disconnect
protected int disconnect(final boolean iForceDirty, final int iLevel) { if (dataProvider == null) // DIRTY NODE, JUST REMOVE IT return 1; int totalDisconnected = 0; final ORID rid = dataProvider.getIdentity(); boolean disconnectedFromParent = false; if (parent != null) { ...
java
protected int disconnect(final boolean iForceDirty, final int iLevel) { if (dataProvider == null) // DIRTY NODE, JUST REMOVE IT return 1; int totalDisconnected = 0; final ORID rid = dataProvider.getIdentity(); boolean disconnectedFromParent = false; if (parent != null) { ...
[ "protected", "int", "disconnect", "(", "final", "boolean", "iForceDirty", ",", "final", "int", "iLevel", ")", "{", "if", "(", "dataProvider", "==", "null", ")", "// DIRTY NODE, JUST REMOVE IT\r", "return", "1", ";", "int", "totalDisconnected", "=", "0", ";", "...
Disconnect the current node from others. @param iForceDirty Force disconnection also if the record it's dirty @param iLevel @return count of nodes that has been disconnected
[ "Disconnect", "the", "current", "node", "from", "others", "." ]
ff9b17e4349f26168b2d0c4facb1a18cbfbe8cf0
https://github.com/wuman/orientdb-android/blob/ff9b17e4349f26168b2d0c4facb1a18cbfbe8cf0/core/src/main/java/com/orientechnologies/orient/core/type/tree/OMVRBTreeEntryPersistent.java#L238-L312
45,358
wuman/orientdb-android
core/src/main/java/com/orientechnologies/orient/core/type/tree/OMVRBTreeEntryPersistent.java
OMVRBTreeEntryPersistent.setValue
public V setValue(final V iValue) { V oldValue = getValue(); int index = tree.getPageIndex(); if (dataProvider.setValueAt(index, iValue)) markDirty(); return oldValue; }
java
public V setValue(final V iValue) { V oldValue = getValue(); int index = tree.getPageIndex(); if (dataProvider.setValueAt(index, iValue)) markDirty(); return oldValue; }
[ "public", "V", "setValue", "(", "final", "V", "iValue", ")", "{", "V", "oldValue", "=", "getValue", "(", ")", ";", "int", "index", "=", "tree", ".", "getPageIndex", "(", ")", ";", "if", "(", "dataProvider", ".", "setValueAt", "(", "index", ",", "iVal...
Invalidate serialized Value associated in order to be re-marshalled on the next node storing.
[ "Invalidate", "serialized", "Value", "associated", "in", "order", "to", "be", "re", "-", "marshalled", "on", "the", "next", "node", "storing", "." ]
ff9b17e4349f26168b2d0c4facb1a18cbfbe8cf0
https://github.com/wuman/orientdb-android/blob/ff9b17e4349f26168b2d0c4facb1a18cbfbe8cf0/core/src/main/java/com/orientechnologies/orient/core/type/tree/OMVRBTreeEntryPersistent.java#L551-L559
45,359
wuman/orientdb-android
enterprise/src/main/java/com/orientechnologies/orient/enterprise/channel/binary/OChannelBinaryProtocol.java
OChannelBinaryProtocol.readIdentifiable
public static OIdentifiable readIdentifiable(final OChannelBinaryClient network) throws IOException { final int classId = network.readShort(); if (classId == RECORD_NULL) return null; if (classId == RECORD_RID) { return network.readRID(); } else { final ORecordInternal<?> reco...
java
public static OIdentifiable readIdentifiable(final OChannelBinaryClient network) throws IOException { final int classId = network.readShort(); if (classId == RECORD_NULL) return null; if (classId == RECORD_RID) { return network.readRID(); } else { final ORecordInternal<?> reco...
[ "public", "static", "OIdentifiable", "readIdentifiable", "(", "final", "OChannelBinaryClient", "network", ")", "throws", "IOException", "{", "final", "int", "classId", "=", "network", ".", "readShort", "(", ")", ";", "if", "(", "classId", "==", "RECORD_NULL", ")...
SENT AS SHORT AS FIRST PACKET AFTER SOCKET CONNECTION
[ "SENT", "AS", "SHORT", "AS", "FIRST", "PACKET", "AFTER", "SOCKET", "CONNECTION" ]
ff9b17e4349f26168b2d0c4facb1a18cbfbe8cf0
https://github.com/wuman/orientdb-android/blob/ff9b17e4349f26168b2d0c4facb1a18cbfbe8cf0/enterprise/src/main/java/com/orientechnologies/orient/enterprise/channel/binary/OChannelBinaryProtocol.java#L93-L111
45,360
lightblue-platform/lightblue-migrator
migrator/src/main/java/com/redhat/lightblue/migrator/Utils.java
Utils.getDocumentIdMap
public static Map<Identity, JsonNode> getDocumentIdMap(List<JsonNode> list, List<String> identityFields) { Map<Identity, JsonNode> map = new HashMap<>(); if (list != null) { LOGGER.debug("Getting doc IDs for {} docs, fields={}", list.size(), identityFields); for (JsonNode node : ...
java
public static Map<Identity, JsonNode> getDocumentIdMap(List<JsonNode> list, List<String> identityFields) { Map<Identity, JsonNode> map = new HashMap<>(); if (list != null) { LOGGER.debug("Getting doc IDs for {} docs, fields={}", list.size(), identityFields); for (JsonNode node : ...
[ "public", "static", "Map", "<", "Identity", ",", "JsonNode", ">", "getDocumentIdMap", "(", "List", "<", "JsonNode", ">", "list", ",", "List", "<", "String", ">", "identityFields", ")", "{", "Map", "<", "Identity", ",", "JsonNode", ">", "map", "=", "new",...
Build an id-doc map from a list of docs
[ "Build", "an", "id", "-", "doc", "map", "from", "a", "list", "of", "docs" ]
ec20748557b40d1f7851e1816d1b76dae48d2027
https://github.com/lightblue-platform/lightblue-migrator/blob/ec20748557b40d1f7851e1816d1b76dae48d2027/migrator/src/main/java/com/redhat/lightblue/migrator/Utils.java#L76-L87
45,361
lightblue-platform/lightblue-migrator
migrator/src/main/java/com/redhat/lightblue/migrator/Utils.java
Utils.fastCompareDocs
public static boolean fastCompareDocs(JsonNode sourceDocument, JsonNode destinationDocument, List<String> exclusionPaths, boolean ignoreTimestampMSDiffs) { try { JsonDiff diff = new JsonDiff(); diff.setOption(JsonDiff.Option.ARRAY_ORDER_INSIGNIFICANT); diff.setOption(JsonDiff...
java
public static boolean fastCompareDocs(JsonNode sourceDocument, JsonNode destinationDocument, List<String> exclusionPaths, boolean ignoreTimestampMSDiffs) { try { JsonDiff diff = new JsonDiff(); diff.setOption(JsonDiff.Option.ARRAY_ORDER_INSIGNIFICANT); diff.setOption(JsonDiff...
[ "public", "static", "boolean", "fastCompareDocs", "(", "JsonNode", "sourceDocument", ",", "JsonNode", "destinationDocument", ",", "List", "<", "String", ">", "exclusionPaths", ",", "boolean", "ignoreTimestampMSDiffs", ")", "{", "try", "{", "JsonDiff", "diff", "=", ...
Compare two docs fast if they are the same, excluding exclusions @return true if documents are different
[ "Compare", "two", "docs", "fast", "if", "they", "are", "the", "same", "excluding", "exclusions" ]
ec20748557b40d1f7851e1816d1b76dae48d2027
https://github.com/lightblue-platform/lightblue-migrator/blob/ec20748557b40d1f7851e1816d1b76dae48d2027/migrator/src/main/java/com/redhat/lightblue/migrator/Utils.java#L132-L155
45,362
wuman/orientdb-android
core/src/main/java/com/orientechnologies/orient/core/storage/impl/local/ODataLocalHole.java
ODataLocalHole.createHole
public synchronized void createHole(final long iRecordOffset, final int iRecordSize) throws IOException { final long timer = OProfiler.getInstance().startChrono(); // IN MEMORY final int recycledPosition; final ODataHoleInfo hole; if (!freeHoles.isEmpty()) { // RECYCLE THE FIRST FREE H...
java
public synchronized void createHole(final long iRecordOffset, final int iRecordSize) throws IOException { final long timer = OProfiler.getInstance().startChrono(); // IN MEMORY final int recycledPosition; final ODataHoleInfo hole; if (!freeHoles.isEmpty()) { // RECYCLE THE FIRST FREE H...
[ "public", "synchronized", "void", "createHole", "(", "final", "long", "iRecordOffset", ",", "final", "int", "iRecordSize", ")", "throws", "IOException", "{", "final", "long", "timer", "=", "OProfiler", ".", "getInstance", "(", ")", ".", "startChrono", "(", ")"...
Appends the hole to the end of the segment. @throws IOException
[ "Appends", "the", "hole", "to", "the", "end", "of", "the", "segment", "." ]
ff9b17e4349f26168b2d0c4facb1a18cbfbe8cf0
https://github.com/wuman/orientdb-android/blob/ff9b17e4349f26168b2d0c4facb1a18cbfbe8cf0/core/src/main/java/com/orientechnologies/orient/core/storage/impl/local/ODataLocalHole.java#L98-L130
45,363
wuman/orientdb-android
core/src/main/java/com/orientechnologies/orient/core/storage/impl/local/ODataLocalHole.java
ODataLocalHole.getHole
public synchronized ODataHoleInfo getHole(final int iPosition) { final ODataHoleInfo hole = availableHolesList.get(iPosition); if (hole.dataOffset == -1) return null; return hole; }
java
public synchronized ODataHoleInfo getHole(final int iPosition) { final ODataHoleInfo hole = availableHolesList.get(iPosition); if (hole.dataOffset == -1) return null; return hole; }
[ "public", "synchronized", "ODataHoleInfo", "getHole", "(", "final", "int", "iPosition", ")", "{", "final", "ODataHoleInfo", "hole", "=", "availableHolesList", ".", "get", "(", "iPosition", ")", ";", "if", "(", "hole", ".", "dataOffset", "==", "-", "1", ")", ...
Fills the holes information into OPhysicalPosition object given as parameter. @return true, if it's a valid hole, otherwise false @throws IOException
[ "Fills", "the", "holes", "information", "into", "OPhysicalPosition", "object", "given", "as", "parameter", "." ]
ff9b17e4349f26168b2d0c4facb1a18cbfbe8cf0
https://github.com/wuman/orientdb-android/blob/ff9b17e4349f26168b2d0c4facb1a18cbfbe8cf0/core/src/main/java/com/orientechnologies/orient/core/storage/impl/local/ODataLocalHole.java#L216-L221
45,364
wuman/orientdb-android
core/src/main/java/com/orientechnologies/orient/core/storage/impl/local/ODataLocalHole.java
ODataLocalHole.updateHole
public synchronized void updateHole(final ODataHoleInfo iHole, final long iNewDataOffset, final int iNewRecordSize) throws IOException { final long timer = OProfiler.getInstance().startChrono(); final boolean offsetChanged = iNewDataOffset != iHole.dataOffset; final boolean sizeChanged = iNewRec...
java
public synchronized void updateHole(final ODataHoleInfo iHole, final long iNewDataOffset, final int iNewRecordSize) throws IOException { final long timer = OProfiler.getInstance().startChrono(); final boolean offsetChanged = iNewDataOffset != iHole.dataOffset; final boolean sizeChanged = iNewRec...
[ "public", "synchronized", "void", "updateHole", "(", "final", "ODataHoleInfo", "iHole", ",", "final", "long", "iNewDataOffset", ",", "final", "int", "iNewRecordSize", ")", "throws", "IOException", "{", "final", "long", "timer", "=", "OProfiler", ".", "getInstance"...
Update hole data @param iUpdateFromMemory @throws IOException
[ "Update", "hole", "data" ]
ff9b17e4349f26168b2d0c4facb1a18cbfbe8cf0
https://github.com/wuman/orientdb-android/blob/ff9b17e4349f26168b2d0c4facb1a18cbfbe8cf0/core/src/main/java/com/orientechnologies/orient/core/storage/impl/local/ODataLocalHole.java#L230-L264
45,365
wuman/orientdb-android
core/src/main/java/com/orientechnologies/orient/core/storage/impl/local/ODataLocalHole.java
ODataLocalHole.deleteHole
public synchronized void deleteHole(int iHolePosition) throws IOException { // IN MEMORY final ODataHoleInfo hole = availableHolesList.get(iHolePosition); availableHolesBySize.remove(hole); availableHolesByPosition.remove(hole); hole.dataOffset = -1; freeHoles.add(iHolePosition); ...
java
public synchronized void deleteHole(int iHolePosition) throws IOException { // IN MEMORY final ODataHoleInfo hole = availableHolesList.get(iHolePosition); availableHolesBySize.remove(hole); availableHolesByPosition.remove(hole); hole.dataOffset = -1; freeHoles.add(iHolePosition); ...
[ "public", "synchronized", "void", "deleteHole", "(", "int", "iHolePosition", ")", "throws", "IOException", "{", "// IN MEMORY\r", "final", "ODataHoleInfo", "hole", "=", "availableHolesList", ".", "get", "(", "iHolePosition", ")", ";", "availableHolesBySize", ".", "r...
Delete the hole @param iRemoveAlsoFromMemory @throws IOException
[ "Delete", "the", "hole" ]
ff9b17e4349f26168b2d0c4facb1a18cbfbe8cf0
https://github.com/wuman/orientdb-android/blob/ff9b17e4349f26168b2d0c4facb1a18cbfbe8cf0/core/src/main/java/com/orientechnologies/orient/core/storage/impl/local/ODataLocalHole.java#L273-L285
45,366
wuman/orientdb-android
object/src/main/java/com/orientechnologies/orient/object/iterator/graph/OGraphElementIterator.java
OGraphElementIterator.getObject
protected T getObject() { final T object; if (reusedObject != null) { // REUSE THE SAME RECORD AFTER HAVING RESETTED IT object = reusedObject; object.reset(); } else // CREATE A NEW ONE object = (T) database.newInstance(className); return object; }
java
protected T getObject() { final T object; if (reusedObject != null) { // REUSE THE SAME RECORD AFTER HAVING RESETTED IT object = reusedObject; object.reset(); } else // CREATE A NEW ONE object = (T) database.newInstance(className); return object; }
[ "protected", "T", "getObject", "(", ")", "{", "final", "T", "object", ";", "if", "(", "reusedObject", "!=", "null", ")", "{", "// REUSE THE SAME RECORD AFTER HAVING RESETTED IT\r", "object", "=", "reusedObject", ";", "object", ".", "reset", "(", ")", ";", "}",...
Returns the object to use for the operation. @return
[ "Returns", "the", "object", "to", "use", "for", "the", "operation", "." ]
ff9b17e4349f26168b2d0c4facb1a18cbfbe8cf0
https://github.com/wuman/orientdb-android/blob/ff9b17e4349f26168b2d0c4facb1a18cbfbe8cf0/object/src/main/java/com/orientechnologies/orient/object/iterator/graph/OGraphElementIterator.java#L111-L121
45,367
loldevs/riotapi
xmpp/src/main/java/net/boreeas/xmpp/XmppClient.java
XmppClient.sha1
@SneakyThrows(IOException.class) public static String sha1(String input) throws NoSuchAlgorithmException { MessageDigest mDigest = MessageDigest.getInstance("SHA1"); byte[] result = mDigest.digest(input.getBytes("UTF-8")); String resultString = String.format("%040x", new BigInteger(1, result)); return resultSt...
java
@SneakyThrows(IOException.class) public static String sha1(String input) throws NoSuchAlgorithmException { MessageDigest mDigest = MessageDigest.getInstance("SHA1"); byte[] result = mDigest.digest(input.getBytes("UTF-8")); String resultString = String.format("%040x", new BigInteger(1, result)); return resultSt...
[ "@", "SneakyThrows", "(", "IOException", ".", "class", ")", "public", "static", "String", "sha1", "(", "String", "input", ")", "throws", "NoSuchAlgorithmException", "{", "MessageDigest", "mDigest", "=", "MessageDigest", ".", "getInstance", "(", "\"SHA1\"", ")", ...
Calculates the SHA1 Digest of a given input. @param input the input @return the string @throws NoSuchAlgorithmException the no such algorithm exception
[ "Calculates", "the", "SHA1", "Digest", "of", "a", "given", "input", "." ]
0b8aac407aa5289845f249024f9732332855544f
https://github.com/loldevs/riotapi/blob/0b8aac407aa5289845f249024f9732332855544f/xmpp/src/main/java/net/boreeas/xmpp/XmppClient.java#L151-L157
45,368
wuman/orientdb-android
core/src/main/java/com/orientechnologies/orient/core/tx/OTransactionNoTx.java
OTransactionNoTx.saveRecord
public void saveRecord(final ORecordInternal<?> iRecord, final String iClusterName, final OPERATION_MODE iMode, final ORecordCallback<? extends Number> iCallback) { try { database.executeSaveRecord(iRecord, iClusterName, iRecord.getVersion(), iRecord.getRecordType(), true, iMode, iCallback); } c...
java
public void saveRecord(final ORecordInternal<?> iRecord, final String iClusterName, final OPERATION_MODE iMode, final ORecordCallback<? extends Number> iCallback) { try { database.executeSaveRecord(iRecord, iClusterName, iRecord.getVersion(), iRecord.getRecordType(), true, iMode, iCallback); } c...
[ "public", "void", "saveRecord", "(", "final", "ORecordInternal", "<", "?", ">", "iRecord", ",", "final", "String", "iClusterName", ",", "final", "OPERATION_MODE", "iMode", ",", "final", "ORecordCallback", "<", "?", "extends", "Number", ">", "iCallback", ")", "...
Update the record. @param iCallback
[ "Update", "the", "record", "." ]
ff9b17e4349f26168b2d0c4facb1a18cbfbe8cf0
https://github.com/wuman/orientdb-android/blob/ff9b17e4349f26168b2d0c4facb1a18cbfbe8cf0/core/src/main/java/com/orientechnologies/orient/core/tx/OTransactionNoTx.java#L69-L83
45,369
wuman/orientdb-android
core/src/main/java/com/orientechnologies/orient/core/tx/OTransactionNoTx.java
OTransactionNoTx.deleteRecord
public void deleteRecord(final ORecordInternal<?> iRecord, final OPERATION_MODE iMode) { if (!iRecord.getIdentity().isPersistent()) return; try { database.executeDeleteRecord(iRecord, iRecord.getVersion(), true, true, iMode); } catch (Exception e) { // REMOVE IT FROM THE CACHE TO A...
java
public void deleteRecord(final ORecordInternal<?> iRecord, final OPERATION_MODE iMode) { if (!iRecord.getIdentity().isPersistent()) return; try { database.executeDeleteRecord(iRecord, iRecord.getVersion(), true, true, iMode); } catch (Exception e) { // REMOVE IT FROM THE CACHE TO A...
[ "public", "void", "deleteRecord", "(", "final", "ORecordInternal", "<", "?", ">", "iRecord", ",", "final", "OPERATION_MODE", "iMode", ")", "{", "if", "(", "!", "iRecord", ".", "getIdentity", "(", ")", ".", "isPersistent", "(", ")", ")", "return", ";", "t...
Deletes the record.
[ "Deletes", "the", "record", "." ]
ff9b17e4349f26168b2d0c4facb1a18cbfbe8cf0
https://github.com/wuman/orientdb-android/blob/ff9b17e4349f26168b2d0c4facb1a18cbfbe8cf0/core/src/main/java/com/orientechnologies/orient/core/tx/OTransactionNoTx.java#L88-L104
45,370
wuman/orientdb-android
core/src/main/java/com/orientechnologies/orient/core/command/OCommandRequestTextAbstract.java
OCommandRequestTextAbstract.execute
@SuppressWarnings("unchecked") public <RET> RET execute(final Object... iArgs) { setParameters(iArgs); return (RET) ODatabaseRecordThreadLocal.INSTANCE.get().getStorage().command(this); }
java
@SuppressWarnings("unchecked") public <RET> RET execute(final Object... iArgs) { setParameters(iArgs); return (RET) ODatabaseRecordThreadLocal.INSTANCE.get().getStorage().command(this); }
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "<", "RET", ">", "RET", "execute", "(", "final", "Object", "...", "iArgs", ")", "{", "setParameters", "(", "iArgs", ")", ";", "return", "(", "RET", ")", "ODatabaseRecordThreadLocal", ".", "INSTANC...
Delegates the execution to the configured command executor.
[ "Delegates", "the", "execution", "to", "the", "configured", "command", "executor", "." ]
ff9b17e4349f26168b2d0c4facb1a18cbfbe8cf0
https://github.com/wuman/orientdb-android/blob/ff9b17e4349f26168b2d0c4facb1a18cbfbe8cf0/core/src/main/java/com/orientechnologies/orient/core/command/OCommandRequestTextAbstract.java#L57-L61
45,371
wuman/orientdb-android
core/src/main/java/com/orientechnologies/orient/core/index/OIndexMVRBTreeAbstract.java
OIndexMVRBTreeAbstract.getEntriesBetween
public Collection<ODocument> getEntriesBetween(final Object iRangeFrom, final Object iRangeTo) { return getEntriesBetween(iRangeFrom, iRangeTo, true); }
java
public Collection<ODocument> getEntriesBetween(final Object iRangeFrom, final Object iRangeTo) { return getEntriesBetween(iRangeFrom, iRangeTo, true); }
[ "public", "Collection", "<", "ODocument", ">", "getEntriesBetween", "(", "final", "Object", "iRangeFrom", ",", "final", "Object", "iRangeTo", ")", "{", "return", "getEntriesBetween", "(", "iRangeFrom", ",", "iRangeTo", ",", "true", ")", ";", "}" ]
Returns a set of documents with key between the range passed as parameter. Range bounds are included. @param iRangeFrom Starting range @param iRangeTo Ending range @see #getEntriesBetween(Object, Object, boolean) @return
[ "Returns", "a", "set", "of", "documents", "with", "key", "between", "the", "range", "passed", "as", "parameter", ".", "Range", "bounds", "are", "included", "." ]
ff9b17e4349f26168b2d0c4facb1a18cbfbe8cf0
https://github.com/wuman/orientdb-android/blob/ff9b17e4349f26168b2d0c4facb1a18cbfbe8cf0/core/src/main/java/com/orientechnologies/orient/core/index/OIndexMVRBTreeAbstract.java#L287-L289
45,372
wuman/orientdb-android
core/src/main/java/com/orientechnologies/orient/core/index/OIndexMVRBTreeAbstract.java
OIndexMVRBTreeAbstract.rebuild
public long rebuild(final OProgressListener iProgressListener) { long documentIndexed = 0; final boolean intentInstalled = getDatabase().declareIntent(new OIntentMassiveInsert()); acquireExclusiveLock(); try { try { map.clear(); } catch (Exception e) { // IGNORE E...
java
public long rebuild(final OProgressListener iProgressListener) { long documentIndexed = 0; final boolean intentInstalled = getDatabase().declareIntent(new OIntentMassiveInsert()); acquireExclusiveLock(); try { try { map.clear(); } catch (Exception e) { // IGNORE E...
[ "public", "long", "rebuild", "(", "final", "OProgressListener", "iProgressListener", ")", "{", "long", "documentIndexed", "=", "0", ";", "final", "boolean", "intentInstalled", "=", "getDatabase", "(", ")", ".", "declareIntent", "(", "new", "OIntentMassiveInsert", ...
Populates the index with all the existent records. Uses the massive insert intent to speed up and keep the consumed memory low.
[ "Populates", "the", "index", "with", "all", "the", "existent", "records", ".", "Uses", "the", "massive", "insert", "intent", "to", "speed", "up", "and", "keep", "the", "consumed", "memory", "low", "." ]
ff9b17e4349f26168b2d0c4facb1a18cbfbe8cf0
https://github.com/wuman/orientdb-android/blob/ff9b17e4349f26168b2d0c4facb1a18cbfbe8cf0/core/src/main/java/com/orientechnologies/orient/core/index/OIndexMVRBTreeAbstract.java#L351-L430
45,373
wuman/orientdb-android
enterprise/src/main/java/com/orientechnologies/orient/enterprise/channel/binary/OChannelBinaryClient.java
OChannelBinaryClient.isConnected
public boolean isConnected() { if (socket != null && socket.isConnected() && !socket.isInputShutdown() && !socket.isOutputShutdown()) return true; return false; }
java
public boolean isConnected() { if (socket != null && socket.isConnected() && !socket.isInputShutdown() && !socket.isOutputShutdown()) return true; return false; }
[ "public", "boolean", "isConnected", "(", ")", "{", "if", "(", "socket", "!=", "null", "&&", "socket", ".", "isConnected", "(", ")", "&&", "!", "socket", ".", "isInputShutdown", "(", ")", "&&", "!", "socket", ".", "isOutputShutdown", "(", ")", ")", "ret...
Tells if the channel is connected. @return true if it's connected, otherwise false.
[ "Tells", "if", "the", "channel", "is", "connected", "." ]
ff9b17e4349f26168b2d0c4facb1a18cbfbe8cf0
https://github.com/wuman/orientdb-android/blob/ff9b17e4349f26168b2d0c4facb1a18cbfbe8cf0/enterprise/src/main/java/com/orientechnologies/orient/enterprise/channel/binary/OChannelBinaryClient.java#L88-L92
45,374
wuman/orientdb-android
object/src/main/java/com/orientechnologies/orient/object/enhancement/OObjectProxyMethodHandler.java
OObjectProxyMethodHandler.detach
public void detach(Object self) throws NoSuchMethodException, IllegalAccessException, InvocationTargetException { for (String fieldName : doc.fieldNames()) { Object value = getValue(self, fieldName, false, null); if (value instanceof OLazyObjectMultivalueElement) ((OLazyObjectMultivalueElement) value).detac...
java
public void detach(Object self) throws NoSuchMethodException, IllegalAccessException, InvocationTargetException { for (String fieldName : doc.fieldNames()) { Object value = getValue(self, fieldName, false, null); if (value instanceof OLazyObjectMultivalueElement) ((OLazyObjectMultivalueElement) value).detac...
[ "public", "void", "detach", "(", "Object", "self", ")", "throws", "NoSuchMethodException", ",", "IllegalAccessException", ",", "InvocationTargetException", "{", "for", "(", "String", "fieldName", ":", "doc", ".", "fieldNames", "(", ")", ")", "{", "Object", "valu...
Method that detaches all fields contained in the document to the given object @param self :- The object containing this handler instance @throws InvocationTargetException @throws IllegalAccessException @throws NoSuchMethodException
[ "Method", "that", "detaches", "all", "fields", "contained", "in", "the", "document", "to", "the", "given", "object" ]
ff9b17e4349f26168b2d0c4facb1a18cbfbe8cf0
https://github.com/wuman/orientdb-android/blob/ff9b17e4349f26168b2d0c4facb1a18cbfbe8cf0/object/src/main/java/com/orientechnologies/orient/object/enhancement/OObjectProxyMethodHandler.java#L110-L119
45,375
wuman/orientdb-android
object/src/main/java/com/orientechnologies/orient/object/enhancement/OObjectProxyMethodHandler.java
OObjectProxyMethodHandler.attach
public void attach(Object self) throws IllegalArgumentException, IllegalAccessException, NoSuchMethodException, InvocationTargetException { for (Class<?> currentClass = self.getClass(); currentClass != Object.class;) { if (Proxy.class.isAssignableFrom(currentClass)) { currentClass = currentClass.getSupercla...
java
public void attach(Object self) throws IllegalArgumentException, IllegalAccessException, NoSuchMethodException, InvocationTargetException { for (Class<?> currentClass = self.getClass(); currentClass != Object.class;) { if (Proxy.class.isAssignableFrom(currentClass)) { currentClass = currentClass.getSupercla...
[ "public", "void", "attach", "(", "Object", "self", ")", "throws", "IllegalArgumentException", ",", "IllegalAccessException", ",", "NoSuchMethodException", ",", "InvocationTargetException", "{", "for", "(", "Class", "<", "?", ">", "currentClass", "=", "self", ".", ...
Method that attaches all data contained in the object to the associated document @param self :- The object containing this handler instance @throws IllegalAccessException @throws IllegalArgumentException @throws InvocationTargetException @throws NoSuchMethodException
[ "Method", "that", "attaches", "all", "data", "contained", "in", "the", "object", "to", "the", "associated", "document" ]
ff9b17e4349f26168b2d0c4facb1a18cbfbe8cf0
https://github.com/wuman/orientdb-android/blob/ff9b17e4349f26168b2d0c4facb1a18cbfbe8cf0/object/src/main/java/com/orientechnologies/orient/object/enhancement/OObjectProxyMethodHandler.java#L132-L151
45,376
Putnami/putnami-web-toolkit
core/src/main/java/fr/putnami/pwt/core/theme/client/DefaultIE8ThemeController.java
DefaultIE8ThemeController.ensureRespondJsScriptElement
private void ensureRespondJsScriptElement() { if (this.respondJsScript == null) { this.respondJsScript = Document.get().createScriptElement(); this.respondJsScript.setSrc(GWT.getModuleBaseForStaticFiles() + DefaultIE8ThemeController.RESPOND_JS_LOCATION); this.respondJsScript.setType("text/javascript"); } ...
java
private void ensureRespondJsScriptElement() { if (this.respondJsScript == null) { this.respondJsScript = Document.get().createScriptElement(); this.respondJsScript.setSrc(GWT.getModuleBaseForStaticFiles() + DefaultIE8ThemeController.RESPOND_JS_LOCATION); this.respondJsScript.setType("text/javascript"); } ...
[ "private", "void", "ensureRespondJsScriptElement", "(", ")", "{", "if", "(", "this", ".", "respondJsScript", "==", "null", ")", "{", "this", ".", "respondJsScript", "=", "Document", ".", "get", "(", ")", ".", "createScriptElement", "(", ")", ";", "this", "...
Ensure respond js script element.
[ "Ensure", "respond", "js", "script", "element", "." ]
129aa781d1bda508e579d194693ca3034b4d470b
https://github.com/Putnami/putnami-web-toolkit/blob/129aa781d1bda508e579d194693ca3034b4d470b/core/src/main/java/fr/putnami/pwt/core/theme/client/DefaultIE8ThemeController.java#L50-L56
45,377
NetsOSS/embedded-jetty
src/main/java/eu/nets/oss/jetty/EmbeddedSpringWsBuilder.java
EmbeddedSpringWsBuilder.createMessageDispatcherServlet
public static MessageDispatcherServlet createMessageDispatcherServlet(Class... contextConfigLocation) { StringBuilder items = new StringBuilder(); for (Class aClass : contextConfigLocation) { items.append( aClass.getName()); items.append(","); } MessageDispatcherS...
java
public static MessageDispatcherServlet createMessageDispatcherServlet(Class... contextConfigLocation) { StringBuilder items = new StringBuilder(); for (Class aClass : contextConfigLocation) { items.append( aClass.getName()); items.append(","); } MessageDispatcherS...
[ "public", "static", "MessageDispatcherServlet", "createMessageDispatcherServlet", "(", "Class", "...", "contextConfigLocation", ")", "{", "StringBuilder", "items", "=", "new", "StringBuilder", "(", ")", ";", "for", "(", "Class", "aClass", ":", "contextConfigLocation", ...
Creates a spring-ws message dispatcher servlet @param contextConfigLocation The spring configuration classes @return A message dispatcher servlet based on the supplied configuration
[ "Creates", "a", "spring", "-", "ws", "message", "dispatcher", "servlet" ]
c2535867ad4887c4a43a8aa7f95b711ff54c8542
https://github.com/NetsOSS/embedded-jetty/blob/c2535867ad4887c4a43a8aa7f95b711ff54c8542/src/main/java/eu/nets/oss/jetty/EmbeddedSpringWsBuilder.java#L20-L31
45,378
amsa-code/risky
ais/src/main/java/au/gov/amsa/ais/Communications.java
Communications.getReceivedStations
@VisibleForTesting static Integer getReceivedStations(AisExtractor extractor, int slotTimeout, int startIndex) { if (slotTimeout == 3 || slotTimeout == 5 || slotTimeout == 7) return extractor.getValue(startIndex + 5, startIndex + 19); else return null; }
java
@VisibleForTesting static Integer getReceivedStations(AisExtractor extractor, int slotTimeout, int startIndex) { if (slotTimeout == 3 || slotTimeout == 5 || slotTimeout == 7) return extractor.getValue(startIndex + 5, startIndex + 19); else return null; }
[ "@", "VisibleForTesting", "static", "Integer", "getReceivedStations", "(", "AisExtractor", "extractor", ",", "int", "slotTimeout", ",", "int", "startIndex", ")", "{", "if", "(", "slotTimeout", "==", "3", "||", "slotTimeout", "==", "5", "||", "slotTimeout", "==",...
Returns received stations as per 1371-4.pdf. @param extractor @param slotTimeout @param startIndex @return
[ "Returns", "received", "stations", "as", "per", "1371", "-", "4", ".", "pdf", "." ]
13649942aeddfdb9210eec072c605bc5d7a6daf3
https://github.com/amsa-code/risky/blob/13649942aeddfdb9210eec072c605bc5d7a6daf3/ais/src/main/java/au/gov/amsa/ais/Communications.java#L48-L55
45,379
amsa-code/risky
ais/src/main/java/au/gov/amsa/ais/Communications.java
Communications.getHourUtc
private static Integer getHourUtc(AisExtractor extractor, int slotTimeout, int startIndex) { if (slotTimeout == 1) { // skip the msb bit int hours = extractor.getValue(startIndex + 5, startIndex + 10); return hours; } else return null; }
java
private static Integer getHourUtc(AisExtractor extractor, int slotTimeout, int startIndex) { if (slotTimeout == 1) { // skip the msb bit int hours = extractor.getValue(startIndex + 5, startIndex + 10); return hours; } else return null; }
[ "private", "static", "Integer", "getHourUtc", "(", "AisExtractor", "extractor", ",", "int", "slotTimeout", ",", "int", "startIndex", ")", "{", "if", "(", "slotTimeout", "==", "1", ")", "{", "// skip the msb bit", "int", "hours", "=", "extractor", ".", "getValu...
Returns hour UTC as per 1371-4.pdf. @param extractor @param slotTimeout @param startIndex @return
[ "Returns", "hour", "UTC", "as", "per", "1371", "-", "4", ".", "pdf", "." ]
13649942aeddfdb9210eec072c605bc5d7a6daf3
https://github.com/amsa-code/risky/blob/13649942aeddfdb9210eec072c605bc5d7a6daf3/ais/src/main/java/au/gov/amsa/ais/Communications.java#L82-L90
45,380
amsa-code/risky
ais/src/main/java/au/gov/amsa/ais/Communications.java
Communications.getMinuteUtc
private static Integer getMinuteUtc(AisExtractor extractor, int slotTimeout, int startIndex) { if (slotTimeout == 1) { // skip the msb bit int minutes = extractor.getValue(startIndex + 10, startIndex + 17); return minutes; } else return null; }
java
private static Integer getMinuteUtc(AisExtractor extractor, int slotTimeout, int startIndex) { if (slotTimeout == 1) { // skip the msb bit int minutes = extractor.getValue(startIndex + 10, startIndex + 17); return minutes; } else return null; }
[ "private", "static", "Integer", "getMinuteUtc", "(", "AisExtractor", "extractor", ",", "int", "slotTimeout", ",", "int", "startIndex", ")", "{", "if", "(", "slotTimeout", "==", "1", ")", "{", "// skip the msb bit", "int", "minutes", "=", "extractor", ".", "get...
Returns minute UTC as per 1371-4.pdf. @param extractor @param slotTimeout @param startIndex @return
[ "Returns", "minute", "UTC", "as", "per", "1371", "-", "4", ".", "pdf", "." ]
13649942aeddfdb9210eec072c605bc5d7a6daf3
https://github.com/amsa-code/risky/blob/13649942aeddfdb9210eec072c605bc5d7a6daf3/ais/src/main/java/au/gov/amsa/ais/Communications.java#L100-L108
45,381
amsa-code/risky
ais/src/main/java/au/gov/amsa/ais/Communications.java
Communications.getSlotOffset
private static Integer getSlotOffset(AisExtractor extractor, int slotTimeout, int startIndex) { if (slotTimeout == 0) return extractor.getValue(startIndex + 5, startIndex + 19); else return null; }
java
private static Integer getSlotOffset(AisExtractor extractor, int slotTimeout, int startIndex) { if (slotTimeout == 0) return extractor.getValue(startIndex + 5, startIndex + 19); else return null; }
[ "private", "static", "Integer", "getSlotOffset", "(", "AisExtractor", "extractor", ",", "int", "slotTimeout", ",", "int", "startIndex", ")", "{", "if", "(", "slotTimeout", "==", "0", ")", "return", "extractor", ".", "getValue", "(", "startIndex", "+", "5", "...
Returns slot offset as per 1371-4.pdf. @param extractor @param slotTimeout @param startIndex @return
[ "Returns", "slot", "offset", "as", "per", "1371", "-", "4", ".", "pdf", "." ]
13649942aeddfdb9210eec072c605bc5d7a6daf3
https://github.com/amsa-code/risky/blob/13649942aeddfdb9210eec072c605bc5d7a6daf3/ais/src/main/java/au/gov/amsa/ais/Communications.java#L118-L124
45,382
amsa-code/risky
ais/src/main/java/au/gov/amsa/ais/AisExtractor.java
AisExtractor.getValue
public synchronized int getValue(int from, int to) { try { // is synchronized so that values of bitSet and calculated can be // lazily // calculated and safely published (thread safe). SixBit.convertSixBitToBits(message, padBits, bitSet, calculated, from, to); ...
java
public synchronized int getValue(int from, int to) { try { // is synchronized so that values of bitSet and calculated can be // lazily // calculated and safely published (thread safe). SixBit.convertSixBitToBits(message, padBits, bitSet, calculated, from, to); ...
[ "public", "synchronized", "int", "getValue", "(", "int", "from", ",", "int", "to", ")", "{", "try", "{", "// is synchronized so that values of bitSet and calculated can be", "// lazily", "// calculated and safely published (thread safe).", "SixBit", ".", "convertSixBitToBits", ...
Returns an unsigned integer value using the bits from character position start to position stop in the decoded message. @param from @param to @return
[ "Returns", "an", "unsigned", "integer", "value", "using", "the", "bits", "from", "character", "position", "start", "to", "position", "stop", "in", "the", "decoded", "message", "." ]
13649942aeddfdb9210eec072c605bc5d7a6daf3
https://github.com/amsa-code/risky/blob/13649942aeddfdb9210eec072c605bc5d7a6daf3/ais/src/main/java/au/gov/amsa/ais/AisExtractor.java#L62-L72
45,383
amsa-code/risky
ais/src/main/java/au/gov/amsa/ais/AisExtractor.java
AisExtractor.getSignedValue
public synchronized int getSignedValue(int from, int to) { try { // is synchronized so that values of bitSet and calculated can be // lazily // calculated and safely published (thread safe). SixBit.convertSixBitToBits(message, padBits, bitSet, calculated, from, to...
java
public synchronized int getSignedValue(int from, int to) { try { // is synchronized so that values of bitSet and calculated can be // lazily // calculated and safely published (thread safe). SixBit.convertSixBitToBits(message, padBits, bitSet, calculated, from, to...
[ "public", "synchronized", "int", "getSignedValue", "(", "int", "from", ",", "int", "to", ")", "{", "try", "{", "// is synchronized so that values of bitSet and calculated can be", "// lazily", "// calculated and safely published (thread safe).", "SixBit", ".", "convertSixBitToB...
Returns a signed integer value using the bits from character position start to position stop in the decoded message. @param from @param to @return
[ "Returns", "a", "signed", "integer", "value", "using", "the", "bits", "from", "character", "position", "start", "to", "position", "stop", "in", "the", "decoded", "message", "." ]
13649942aeddfdb9210eec072c605bc5d7a6daf3
https://github.com/amsa-code/risky/blob/13649942aeddfdb9210eec072c605bc5d7a6daf3/ais/src/main/java/au/gov/amsa/ais/AisExtractor.java#L82-L92
45,384
wealthfront/kawala
kawala-common/src/main/java/com/kaching/platform/common/reflect/ReflectUtils.java
ReflectUtils.getField
public static Object getField(Object obj, String name) { try { Class<? extends Object> klass = obj.getClass(); do { try { Field field = klass.getDeclaredField(name); field.setAccessible(true); return field.get(obj); } catch (NoSuchFieldException e) { ...
java
public static Object getField(Object obj, String name) { try { Class<? extends Object> klass = obj.getClass(); do { try { Field field = klass.getDeclaredField(name); field.setAccessible(true); return field.get(obj); } catch (NoSuchFieldException e) { ...
[ "public", "static", "Object", "getField", "(", "Object", "obj", ",", "String", "name", ")", "{", "try", "{", "Class", "<", "?", "extends", "Object", ">", "klass", "=", "obj", ".", "getClass", "(", ")", ";", "do", "{", "try", "{", "Field", "field", ...
Gets a field from an object. @param obj object from which to read the field @param name the field name to read
[ "Gets", "a", "field", "from", "an", "object", "." ]
acf24b7a9ef6e2f0fc1e862d44cfa4dcc4da8f6e
https://github.com/wealthfront/kawala/blob/acf24b7a9ef6e2f0fc1e862d44cfa4dcc4da8f6e/kawala-common/src/main/java/com/kaching/platform/common/reflect/ReflectUtils.java#L30-L50
45,385
amsa-code/risky
geo-analyzer/src/main/java/au/gov/amsa/util/navigation/Position.java
Position.getDistanceToKm
public final double getDistanceToKm(Position position) { double lat1 = toRadians(lat); double lat2 = toRadians(position.lat); double lon1 = toRadians(lon); double lon2 = toRadians(position.lon); double deltaLon = lon2 - lon1; double cosLat2 = cos(lat2); double cosLat1 = cos(lat1); double sinLat1 = sin(l...
java
public final double getDistanceToKm(Position position) { double lat1 = toRadians(lat); double lat2 = toRadians(position.lat); double lon1 = toRadians(lon); double lon2 = toRadians(position.lon); double deltaLon = lon2 - lon1; double cosLat2 = cos(lat2); double cosLat1 = cos(lat1); double sinLat1 = sin(l...
[ "public", "final", "double", "getDistanceToKm", "(", "Position", "position", ")", "{", "double", "lat1", "=", "toRadians", "(", "lat", ")", ";", "double", "lat2", "=", "toRadians", "(", "position", ".", "lat", ")", ";", "double", "lon1", "=", "toRadians", ...
returns distance between two WGS84 positions according to Vincenty's formula from Wikipedia @param position @return
[ "returns", "distance", "between", "two", "WGS84", "positions", "according", "to", "Vincenty", "s", "formula", "from", "Wikipedia" ]
13649942aeddfdb9210eec072c605bc5d7a6daf3
https://github.com/amsa-code/risky/blob/13649942aeddfdb9210eec072c605bc5d7a6daf3/geo-analyzer/src/main/java/au/gov/amsa/util/navigation/Position.java#L270-L286
45,386
amsa-code/risky
geo-analyzer/src/main/java/au/gov/amsa/util/navigation/Position.java
Position.getDistanceKmToPath
public final double getDistanceKmToPath(Position p1, Position p2) { double d = radiusEarthKm * asin(sin(getDistanceToKm(p1) / radiusEarthKm) * sin(toRadians(getBearingDegrees(p1) - p1.getBearingDegrees(p2)))); return abs(d); }
java
public final double getDistanceKmToPath(Position p1, Position p2) { double d = radiusEarthKm * asin(sin(getDistanceToKm(p1) / radiusEarthKm) * sin(toRadians(getBearingDegrees(p1) - p1.getBearingDegrees(p2)))); return abs(d); }
[ "public", "final", "double", "getDistanceKmToPath", "(", "Position", "p1", ",", "Position", "p2", ")", "{", "double", "d", "=", "radiusEarthKm", "*", "asin", "(", "sin", "(", "getDistanceToKm", "(", "p1", ")", "/", "radiusEarthKm", ")", "*", "sin", "(", ...
calculates the distance of a point to the great circle path between p1 and p2. Formula from: http://www.movable-type.co.uk/scripts/latlong.html @param p1 @param p2 @return
[ "calculates", "the", "distance", "of", "a", "point", "to", "the", "great", "circle", "path", "between", "p1", "and", "p2", "." ]
13649942aeddfdb9210eec072c605bc5d7a6daf3
https://github.com/amsa-code/risky/blob/13649942aeddfdb9210eec072c605bc5d7a6daf3/geo-analyzer/src/main/java/au/gov/amsa/util/navigation/Position.java#L341-L347
45,387
soi-toolkit/soi-toolkit-mule
tools/soitoolkit-generator/soitoolkit-generator/src/main/java/org/soitoolkit/tools/generator/model/ModelFactory.java
ModelFactory.setModelClass
@SuppressWarnings("unchecked") public static void setModelClass(Class<?> modelClass) throws IllegalArgumentException { if (!DefaultModelImpl.class.isAssignableFrom(modelClass)) { throw new IllegalArgumentException("Modelclass, " + modelClass.getName() + ", is not a subtype of " + DefaultModelImpl.class.getN...
java
@SuppressWarnings("unchecked") public static void setModelClass(Class<?> modelClass) throws IllegalArgumentException { if (!DefaultModelImpl.class.isAssignableFrom(modelClass)) { throw new IllegalArgumentException("Modelclass, " + modelClass.getName() + ", is not a subtype of " + DefaultModelImpl.class.getN...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "static", "void", "setModelClass", "(", "Class", "<", "?", ">", "modelClass", ")", "throws", "IllegalArgumentException", "{", "if", "(", "!", "DefaultModelImpl", ".", "class", ".", "isAssignableFrom", ...
Register a custom model class, must be a subclass to DefaultModelImpl. @param modelClass @throws IllegalArgumentException if supplied class is not a subclass of DefaultModelImpl
[ "Register", "a", "custom", "model", "class", "must", "be", "a", "subclass", "to", "DefaultModelImpl", "." ]
e891350dbf55e6307be94d193d056bdb785b37d3
https://github.com/soi-toolkit/soi-toolkit-mule/blob/e891350dbf55e6307be94d193d056bdb785b37d3/tools/soitoolkit-generator/soitoolkit-generator/src/main/java/org/soitoolkit/tools/generator/model/ModelFactory.java#L49-L55
45,388
soi-toolkit/soi-toolkit-mule
tools/soitoolkit-generator/soitoolkit-generator/src/main/java/org/soitoolkit/tools/generator/model/ModelFactory.java
ModelFactory.resetModelClass
public static void resetModelClass() { ModelFactory.modelClass = DefaultModelImpl.class; System.err.println("[INFO] Reset model-class: " + ModelFactory.modelClass.getName()); }
java
public static void resetModelClass() { ModelFactory.modelClass = DefaultModelImpl.class; System.err.println("[INFO] Reset model-class: " + ModelFactory.modelClass.getName()); }
[ "public", "static", "void", "resetModelClass", "(", ")", "{", "ModelFactory", ".", "modelClass", "=", "DefaultModelImpl", ".", "class", ";", "System", ".", "err", ".", "println", "(", "\"[INFO] Reset model-class: \"", "+", "ModelFactory", ".", "modelClass", ".", ...
Reset model class to the default class. @param modelClass @throws IllegalArgumentException if supplied class is not a subclass of DefaultModelImpl
[ "Reset", "model", "class", "to", "the", "default", "class", "." ]
e891350dbf55e6307be94d193d056bdb785b37d3
https://github.com/soi-toolkit/soi-toolkit-mule/blob/e891350dbf55e6307be94d193d056bdb785b37d3/tools/soitoolkit-generator/soitoolkit-generator/src/main/java/org/soitoolkit/tools/generator/model/ModelFactory.java#L81-L84
45,389
soi-toolkit/soi-toolkit-mule
tools/soitoolkit-generator/soitoolkit-generator/src/main/java/org/soitoolkit/tools/generator/model/ModelFactory.java
ModelFactory.newModel
public static IModel newModel(String groupId, String artifactId, String version, String service, MuleVersionEnum muleVersion, TransportEnum inboundTransport, TransportEnum outboundTransport, TransformerEnum transformerType) { return doCreateNewModel(groupId, artifactId, version, service, muleVersion, null, null, inbo...
java
public static IModel newModel(String groupId, String artifactId, String version, String service, MuleVersionEnum muleVersion, TransportEnum inboundTransport, TransportEnum outboundTransport, TransformerEnum transformerType) { return doCreateNewModel(groupId, artifactId, version, service, muleVersion, null, null, inbo...
[ "public", "static", "IModel", "newModel", "(", "String", "groupId", ",", "String", "artifactId", ",", "String", "version", ",", "String", "service", ",", "MuleVersionEnum", "muleVersion", ",", "TransportEnum", "inboundTransport", ",", "TransportEnum", "outboundTranspo...
Constructor-method to use when services with inbound and outbound services @param groupId @param artifactId @param version @param service @return the new model instance
[ "Constructor", "-", "method", "to", "use", "when", "services", "with", "inbound", "and", "outbound", "services" ]
e891350dbf55e6307be94d193d056bdb785b37d3
https://github.com/soi-toolkit/soi-toolkit-mule/blob/e891350dbf55e6307be94d193d056bdb785b37d3/tools/soitoolkit-generator/soitoolkit-generator/src/main/java/org/soitoolkit/tools/generator/model/ModelFactory.java#L95-L97
45,390
wuman/orientdb-android
nativeos/src/main/java/com/orientechnologies/nio/MemoryLocker.java
MemoryLocker.lockMemory
public static void lockMemory(boolean useSystemJNADisabled) { if (useSystemJNADisabled) disableUsingSystemJNA(); try { int errorCode = MemoryLockerLinux.INSTANCE.mlockall(MemoryLockerLinux.LOCK_CURRENT_MEMORY); if (errorCode != 0) { final String errorMessage; int lastE...
java
public static void lockMemory(boolean useSystemJNADisabled) { if (useSystemJNADisabled) disableUsingSystemJNA(); try { int errorCode = MemoryLockerLinux.INSTANCE.mlockall(MemoryLockerLinux.LOCK_CURRENT_MEMORY); if (errorCode != 0) { final String errorMessage; int lastE...
[ "public", "static", "void", "lockMemory", "(", "boolean", "useSystemJNADisabled", ")", "{", "if", "(", "useSystemJNADisabled", ")", "disableUsingSystemJNA", "(", ")", ";", "try", "{", "int", "errorCode", "=", "MemoryLockerLinux", ".", "INSTANCE", ".", "mlockall", ...
This method locks memory to prevent swapping. This method provide information about success or problems with locking memory. You can reed console output to know if memory locked successfully or not. If system error occurred such as permission any specific exception will be thrown. @param useSystemJNADisabled if this p...
[ "This", "method", "locks", "memory", "to", "prevent", "swapping", ".", "This", "method", "provide", "information", "about", "success", "or", "problems", "with", "locking", "memory", ".", "You", "can", "reed", "console", "output", "to", "know", "if", "memory", ...
ff9b17e4349f26168b2d0c4facb1a18cbfbe8cf0
https://github.com/wuman/orientdb-android/blob/ff9b17e4349f26168b2d0c4facb1a18cbfbe8cf0/nativeos/src/main/java/com/orientechnologies/nio/MemoryLocker.java#L61-L101
45,391
wuman/orientdb-android
commons/src/main/java/com/orientechnologies/common/collection/OMVRBTreeEntry.java
OMVRBTreeEntry.getFirstInMemory
public OMVRBTreeEntry<K, V> getFirstInMemory() { OMVRBTreeEntry<K, V> node = this; OMVRBTreeEntry<K, V> prev = this; while (node != null) { prev = node; node = node.getPreviousInMemory(); } return prev; }
java
public OMVRBTreeEntry<K, V> getFirstInMemory() { OMVRBTreeEntry<K, V> node = this; OMVRBTreeEntry<K, V> prev = this; while (node != null) { prev = node; node = node.getPreviousInMemory(); } return prev; }
[ "public", "OMVRBTreeEntry", "<", "K", ",", "V", ">", "getFirstInMemory", "(", ")", "{", "OMVRBTreeEntry", "<", "K", ",", "V", ">", "node", "=", "this", ";", "OMVRBTreeEntry", "<", "K", ",", "V", ">", "prev", "=", "this", ";", "while", "(", "node", ...
Returns the first Entry only by traversing the memory, or null if no such.
[ "Returns", "the", "first", "Entry", "only", "by", "traversing", "the", "memory", "or", "null", "if", "no", "such", "." ]
ff9b17e4349f26168b2d0c4facb1a18cbfbe8cf0
https://github.com/wuman/orientdb-android/blob/ff9b17e4349f26168b2d0c4facb1a18cbfbe8cf0/commons/src/main/java/com/orientechnologies/common/collection/OMVRBTreeEntry.java#L59-L69
45,392
wuman/orientdb-android
commons/src/main/java/com/orientechnologies/common/collection/OMVRBTreeEntry.java
OMVRBTreeEntry.getPreviousInMemory
public OMVRBTreeEntry<K, V> getPreviousInMemory() { OMVRBTreeEntry<K, V> t = this; OMVRBTreeEntry<K, V> p = null; if (t.getLeftInMemory() != null) { p = t.getLeftInMemory(); while (p.getRightInMemory() != null) p = p.getRightInMemory(); } else { p = t.getParentInMemor...
java
public OMVRBTreeEntry<K, V> getPreviousInMemory() { OMVRBTreeEntry<K, V> t = this; OMVRBTreeEntry<K, V> p = null; if (t.getLeftInMemory() != null) { p = t.getLeftInMemory(); while (p.getRightInMemory() != null) p = p.getRightInMemory(); } else { p = t.getParentInMemor...
[ "public", "OMVRBTreeEntry", "<", "K", ",", "V", ">", "getPreviousInMemory", "(", ")", "{", "OMVRBTreeEntry", "<", "K", ",", "V", ">", "t", "=", "this", ";", "OMVRBTreeEntry", "<", "K", ",", "V", ">", "p", "=", "null", ";", "if", "(", "t", ".", "g...
Returns the previous of the current Entry only by traversing the memory, or null if no such.
[ "Returns", "the", "previous", "of", "the", "current", "Entry", "only", "by", "traversing", "the", "memory", "or", "null", "if", "no", "such", "." ]
ff9b17e4349f26168b2d0c4facb1a18cbfbe8cf0
https://github.com/wuman/orientdb-android/blob/ff9b17e4349f26168b2d0c4facb1a18cbfbe8cf0/commons/src/main/java/com/orientechnologies/common/collection/OMVRBTreeEntry.java#L74-L91
45,393
wuman/orientdb-android
commons/src/main/java/com/orientechnologies/common/collection/OMVRBTreeEntry.java
OMVRBTreeEntry.linearSearch
private V linearSearch(final K iKey) { V value = null; int i = 0; tree.pageItemComparator = -1; for (int s = getSize(); i < s; ++i) { if (tree.comparator != null) tree.pageItemComparator = tree.comparator.compare(getKeyAt(i), iKey); else tree.pageItemComparator = ((Co...
java
private V linearSearch(final K iKey) { V value = null; int i = 0; tree.pageItemComparator = -1; for (int s = getSize(); i < s; ++i) { if (tree.comparator != null) tree.pageItemComparator = tree.comparator.compare(getKeyAt(i), iKey); else tree.pageItemComparator = ((Co...
[ "private", "V", "linearSearch", "(", "final", "K", "iKey", ")", "{", "V", "value", "=", "null", ";", "int", "i", "=", "0", ";", "tree", ".", "pageItemComparator", "=", "-", "1", ";", "for", "(", "int", "s", "=", "getSize", "(", ")", ";", "i", "...
Linear search inside the node @param iKey Key to search @return Value if found, otherwise null and the tree.pageIndex updated with the closest-after-first position valid for further inserts.
[ "Linear", "search", "inside", "the", "node" ]
ff9b17e4349f26168b2d0c4facb1a18cbfbe8cf0
https://github.com/wuman/orientdb-android/blob/ff9b17e4349f26168b2d0c4facb1a18cbfbe8cf0/commons/src/main/java/com/orientechnologies/common/collection/OMVRBTreeEntry.java#L208-L230
45,394
wuman/orientdb-android
commons/src/main/java/com/orientechnologies/common/collection/OMVRBTreeEntry.java
OMVRBTreeEntry.binarySearch
private V binarySearch(final K iKey) { int low = 0; int high = getSize() - 1; int mid = 0; while (low <= high) { mid = (low + high) >>> 1; Object midVal = getKeyAt(mid); if (tree.comparator != null) tree.pageItemComparator = tree.comparator.compare((K) midVal, iKey)...
java
private V binarySearch(final K iKey) { int low = 0; int high = getSize() - 1; int mid = 0; while (low <= high) { mid = (low + high) >>> 1; Object midVal = getKeyAt(mid); if (tree.comparator != null) tree.pageItemComparator = tree.comparator.compare((K) midVal, iKey)...
[ "private", "V", "binarySearch", "(", "final", "K", "iKey", ")", "{", "int", "low", "=", "0", ";", "int", "high", "=", "getSize", "(", ")", "-", "1", ";", "int", "mid", "=", "0", ";", "while", "(", "low", "<=", "high", ")", "{", "mid", "=", "(...
Binary search inside the node @param iKey Key to search @return Value if found, otherwise null and the tree.pageIndex updated with the closest-after-first position valid for further inserts.
[ "Binary", "search", "inside", "the", "node" ]
ff9b17e4349f26168b2d0c4facb1a18cbfbe8cf0
https://github.com/wuman/orientdb-android/blob/ff9b17e4349f26168b2d0c4facb1a18cbfbe8cf0/commons/src/main/java/com/orientechnologies/common/collection/OMVRBTreeEntry.java#L240-L272
45,395
wuman/orientdb-android
commons/src/main/java/com/orientechnologies/common/collection/OMVRBTreeEntry.java
OMVRBTreeEntry.compareTo
public int compareTo(final OMVRBTreeEntry<K, V> o) { if (o == null) return 1; if (o == this) return 0; if (getSize() == 0) return -1; if (o.getSize() == 0) return 1; if (tree.comparator != null) return tree.comparator.compare(getFirstKey(), o.getFirstKey()); ...
java
public int compareTo(final OMVRBTreeEntry<K, V> o) { if (o == null) return 1; if (o == this) return 0; if (getSize() == 0) return -1; if (o.getSize() == 0) return 1; if (tree.comparator != null) return tree.comparator.compare(getFirstKey(), o.getFirstKey()); ...
[ "public", "int", "compareTo", "(", "final", "OMVRBTreeEntry", "<", "K", ",", "V", ">", "o", ")", "{", "if", "(", "o", "==", "null", ")", "return", "1", ";", "if", "(", "o", "==", "this", ")", "return", "0", ";", "if", "(", "getSize", "(", ")", ...
Compares two nodes by their first keys.
[ "Compares", "two", "nodes", "by", "their", "first", "keys", "." ]
ff9b17e4349f26168b2d0c4facb1a18cbfbe8cf0
https://github.com/wuman/orientdb-android/blob/ff9b17e4349f26168b2d0c4facb1a18cbfbe8cf0/commons/src/main/java/com/orientechnologies/common/collection/OMVRBTreeEntry.java#L307-L320
45,396
lightblue-platform/lightblue-migrator
migrator/src/main/java/com/redhat/lightblue/migrator/ConsistencyCheckerController.java
ConsistencyCheckerController.parsePeriod
public static long parsePeriod(String periodStr) { PeriodFormatter fmt = PeriodFormat.getDefault(); Period p = fmt.parsePeriod(periodStr); return p.toStandardDuration().getMillis(); }
java
public static long parsePeriod(String periodStr) { PeriodFormatter fmt = PeriodFormat.getDefault(); Period p = fmt.parsePeriod(periodStr); return p.toStandardDuration().getMillis(); }
[ "public", "static", "long", "parsePeriod", "(", "String", "periodStr", ")", "{", "PeriodFormatter", "fmt", "=", "PeriodFormat", ".", "getDefault", "(", ")", ";", "Period", "p", "=", "fmt", ".", "parsePeriod", "(", "periodStr", ")", ";", "return", "p", ".",...
Returns the period in msecs
[ "Returns", "the", "period", "in", "msecs" ]
ec20748557b40d1f7851e1816d1b76dae48d2027
https://github.com/lightblue-platform/lightblue-migrator/blob/ec20748557b40d1f7851e1816d1b76dae48d2027/migrator/src/main/java/com/redhat/lightblue/migrator/ConsistencyCheckerController.java#L55-L59
45,397
lightblue-platform/lightblue-migrator
migrator/src/main/java/com/redhat/lightblue/migrator/ConsistencyCheckerController.java
ConsistencyCheckerController.getEndDate
public Date getEndDate(Date startDate, long period) { long now = getNow().getTime(); long endDate = startDate.getTime() + period; if (now - period > endDate) { return new Date(endDate); } else { return null; } }
java
public Date getEndDate(Date startDate, long period) { long now = getNow().getTime(); long endDate = startDate.getTime() + period; if (now - period > endDate) { return new Date(endDate); } else { return null; } }
[ "public", "Date", "getEndDate", "(", "Date", "startDate", ",", "long", "period", ")", "{", "long", "now", "=", "getNow", "(", ")", ".", "getTime", "(", ")", ";", "long", "endDate", "=", "startDate", ".", "getTime", "(", ")", "+", "period", ";", "if",...
Returns the end date given the start date end the period. The end date is startDate+period, but only if endDate is at least one period ago. That is, we always leave the last incomplete period unprocessed. Override this to control the job generation algorithm
[ "Returns", "the", "end", "date", "given", "the", "start", "date", "end", "the", "period", ".", "The", "end", "date", "is", "startDate", "+", "period", "but", "only", "if", "endDate", "is", "at", "least", "one", "period", "ago", ".", "That", "is", "we",...
ec20748557b40d1f7851e1816d1b76dae48d2027
https://github.com/lightblue-platform/lightblue-migrator/blob/ec20748557b40d1f7851e1816d1b76dae48d2027/migrator/src/main/java/com/redhat/lightblue/migrator/ConsistencyCheckerController.java#L68-L76
45,398
lightblue-platform/lightblue-migrator
migrator/src/main/java/com/redhat/lightblue/migrator/ConsistencyCheckerController.java
ConsistencyCheckerController.createJobs
protected List<MigrationJob> createJobs(Date startDate, Date endDate, ActiveExecution ae) throws Exception { List<MigrationJob> ret = new ArrayList<MigrationJob>(); LOGGER.debug("Creating the migrator to setup new jobs"); // We setup a new migration job MigrationJob mj = new MigrationJob...
java
protected List<MigrationJob> createJobs(Date startDate, Date endDate, ActiveExecution ae) throws Exception { List<MigrationJob> ret = new ArrayList<MigrationJob>(); LOGGER.debug("Creating the migrator to setup new jobs"); // We setup a new migration job MigrationJob mj = new MigrationJob...
[ "protected", "List", "<", "MigrationJob", ">", "createJobs", "(", "Date", "startDate", ",", "Date", "endDate", ",", "ActiveExecution", "ae", ")", "throws", "Exception", "{", "List", "<", "MigrationJob", ">", "ret", "=", "new", "ArrayList", "<", "MigrationJob",...
Create a migration job or jobs to process records created between the given dates. startDate is inclusive, end date is exclusive
[ "Create", "a", "migration", "job", "or", "jobs", "to", "process", "records", "created", "between", "the", "given", "dates", ".", "startDate", "is", "inclusive", "end", "date", "is", "exclusive" ]
ec20748557b40d1f7851e1816d1b76dae48d2027
https://github.com/lightblue-platform/lightblue-migrator/blob/ec20748557b40d1f7851e1816d1b76dae48d2027/migrator/src/main/java/com/redhat/lightblue/migrator/ConsistencyCheckerController.java#L90-L109
45,399
wuman/orientdb-android
core/src/main/java/com/orientechnologies/orient/core/storage/fs/OMMapManagerNew.java
OMMapManagerNew.searchAmongExisting
private OMMapBufferEntry[] searchAmongExisting(OFileMMap file, final OMMapBufferEntry[] fileEntries, final long beginOffset, final int size) { if (fileEntries.length == 0) { return EMPTY_BUFFER_ENTRIES; } final OMMapBufferEntry lastEntry = fileEntries[fileEntries.length - 1]; if (las...
java
private OMMapBufferEntry[] searchAmongExisting(OFileMMap file, final OMMapBufferEntry[] fileEntries, final long beginOffset, final int size) { if (fileEntries.length == 0) { return EMPTY_BUFFER_ENTRIES; } final OMMapBufferEntry lastEntry = fileEntries[fileEntries.length - 1]; if (las...
[ "private", "OMMapBufferEntry", "[", "]", "searchAmongExisting", "(", "OFileMMap", "file", ",", "final", "OMMapBufferEntry", "[", "]", "fileEntries", ",", "final", "long", "beginOffset", ",", "final", "int", "size", ")", "{", "if", "(", "fileEntries", ".", "len...
This method search in already mapped entries to find if necessary entry is already mapped and can be returned. @param file to search mapped entry for it. @param fileEntries already mapped entries. @param beginOffset position in file that should be mmaped. @param size size that should be mmaped. @return {@code EMPTY_BU...
[ "This", "method", "search", "in", "already", "mapped", "entries", "to", "find", "if", "necessary", "entry", "is", "already", "mapped", "and", "can", "be", "returned", "." ]
ff9b17e4349f26168b2d0c4facb1a18cbfbe8cf0
https://github.com/wuman/orientdb-android/blob/ff9b17e4349f26168b2d0c4facb1a18cbfbe8cf0/core/src/main/java/com/orientechnologies/orient/core/storage/fs/OMMapManagerNew.java#L188-L245