query
stringlengths
7
33.1k
document
stringlengths
7
335k
metadata
dict
negatives
listlengths
3
101
negative_scores
listlengths
3
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
TODO Autogenerated method stub
public static void main(String[] args) { ResourceBundle configuracion = ResourceBundle.getBundle("configuracion.properties"); String usuario = configuracion.getString("login"); String password = configuracion.getString("clave"); System.out.println("valores obtenidos:"+usuario+"--"+password); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
TODO Autogenerated method stub
@Override public int sequence() { return 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
ADICIONAR EMPRESA Combo de listagem dos estados que lista todos estados
public List<SelectItem> getEstados() throws ClassNotFoundException, SQLException{ List<SelectItem> retorno = new LinkedList<SelectItem>(); for(TB_UF estado : ufDAO.listarTodos()){ retorno.add(new SelectItem(estado, estado.getNOME_UF())); } return retorno; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void carregaEstadoSelecionado(String nome) throws SQLException{\n String sql = \"SELECT * FROM tb_estados\"; \n PreparedStatement preparador = Conexao.conectar().prepareStatement(sql);\n ResultSet rs = preparador.executeQuery();\n //passando valores ...
[ "0.7545824", "0.73836637", "0.7369149", "0.7083712", "0.69266", "0.68924344", "0.6892204", "0.67629236", "0.67565405", "0.66982085", "0.66821665", "0.66028416", "0.6565804", "0.6546086", "0.65169644", "0.6506896", "0.64904016", "0.64022446", "0.6385165", "0.63660073", "0.6360...
0.66711825
11
Popula combo cidades de acordo com o estado selecionado
public List<SelectItem> getCidades() throws ClassNotFoundException, SQLException{ List<SelectItem> retorno = new LinkedList<SelectItem>(); if(flagEstadoSelecionado){ for(TB_CIDADES cidade : cidadeDAO.listarCidadesPorIdUF(estadoSelecionado.getID_UF())) retorno.add(new SelectItem(cidade, cidade.getNOME_...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void combo() {\n cargaCombo(combo_habitacion, \"SELECT hh.descripcion\\n\" +\n \"FROM huespedes h\\n\" +\n \"LEFT JOIN estadia_huespedes eh ON eh.huespedes_id = h.id\\n\" +\n \"LEFT J...
[ "0.77590466", "0.75764143", "0.74860466", "0.7298097", "0.7237055", "0.723324", "0.72120047", "0.7198809", "0.71946794", "0.71941435", "0.7152424", "0.7117318", "0.71088743", "0.70838606", "0.70748484", "0.7028201", "0.7023203", "0.70034486", "0.699046", "0.69250524", "0.6922...
0.6236416
92
Returns the remainder of 'reader' as a string, closing it when done.
public static String readFully(Reader reader) throws IOException { try { StringWriter writer = new StringWriter(); char[] buffer = new char[1024]; int count; while ((count = reader.read(buffer)) != -1) { writer.write(buffer, 0, count); } return writer.toString(); } finally { reader.close();...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static String getString(Reader reader) {\n StringBuffer buf = new StringBuffer();\n char[] buffer = new char[1024];\n int count;\n try {\n while ((count = reader.read(buffer)) != -1) {\n buf.append(buffer, 0, count);\n }\n } catch (IOException e) {\n return null;\n }...
[ "0.7598298", "0.68845993", "0.6679152", "0.6657902", "0.6644316", "0.6644316", "0.6482999", "0.6392372", "0.6258061", "0.6241162", "0.6229719", "0.6190207", "0.61830074", "0.6137014", "0.6115781", "0.6096509", "0.60175663", "0.5987121", "0.59604806", "0.5952931", "0.5927848",...
0.75710344
1
Returns the ASCII characters up to but not including the next "\r\n", or "\n".
public static String readAsciiLine(InputStream in) throws IOException { // TODO: support UTF-8 here instead StringBuilder result = new StringBuilder(80); while (true) { int c = in.read(); if (c == -1) { throw new EOFException(); } else if (c == '\n') { break; } result.append((char) c); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static void getNonBlank() throws IOException{\n while(curr_char == 32)\n {\n curr_char = pbIn.read();\n }\n }", "private String readStringUntil0x() throws IOException {\n String thisLine = \"\";\n int ch;\n while ((ch = ins.read()) != -1) {\n if (ch != 0x0) {\n ...
[ "0.63273174", "0.61041546", "0.59768367", "0.59725696", "0.5896164", "0.5831526", "0.5788474", "0.57611084", "0.574291", "0.5717369", "0.5685016", "0.56420463", "0.55684406", "0.5557532", "0.5526444", "0.54951894", "0.5482825", "0.547007", "0.54234356", "0.5412055", "0.540075...
0.55046624
15
Closes 'closeable', ignoring any checked exceptions. Does nothing if 'closeable' is null.
public static void closeQuietly(Closeable closeable) { if (closeable != null) { try { closeable.close(); } catch (RuntimeException rethrown) { throw rethrown; } catch (Exception ignored) { } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static final void safeClose(Object closeable) {\n try {\n if (closeable != null) {\n if (closeable instanceof Closeable) ((Closeable) closeable).close();\n else if (closeable instanceof AutoCloseable) ((AutoCloseable) closeable).close();\n else ...
[ "0.7851926", "0.75352407", "0.74449706", "0.72656643", "0.7217342", "0.71863425", "0.7105893", "0.7079648", "0.67490846", "0.6739129", "0.6655201", "0.6564664", "0.6438115", "0.63986874", "0.636958", "0.636958", "0.636958", "0.636958", "0.636958", "0.636958", "0.636958", "0...
0.76467425
1
Computes the initial size and collects garbage as a part of opening the cache. Dirty entries are assumed to be inconsistent and will be deleted.
private void processJournal() throws IOException { deleteIfExists(journalFileTmp); for (Iterator<Entry> i = lruEntries.values().iterator(); i.hasNext(); ) { Entry entry = i.next(); if (entry.currentEditor == null) { for (int t = 0; t < valueCount; t++) { size += entry.lengths[t]; } } else { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic long getCacheSize() {\n\t\treturn 0;\n\t}", "private void ensureCapacity() {\r\n\t\t\tdouble loadFactor = getLoadFactor();\r\n\r\n\t\t\tif (loadFactor >= CAPACITY_THRESHOLD)\r\n\t\t\t\trehash();\r\n\t\t}", "private void flushCache()\n {\n Entry<Integer, String> eldestEntry;\n ...
[ "0.6861188", "0.6722663", "0.6715408", "0.67127305", "0.6655129", "0.65707386", "0.65160316", "0.6499546", "0.6493266", "0.63642216", "0.63457346", "0.6332803", "0.6330877", "0.6330068", "0.6244113", "0.6237054", "0.6226454", "0.62193847", "0.6202122", "0.6151945", "0.6143668...
0.0
-1
Creates a new journal that omits redundant information. This replaces the current journal if it exists.
private synchronized void rebuildJournal() throws IOException { if (journalWriter != null) { journalWriter.close(); } Writer writer = new BufferedWriter(new FileWriter(journalFileTmp), IO_BUFFER_SIZE); writer.write(MAGIC); writer.write("\n"); writer.write(VERSION_1); writer.write("\n"); writer.write...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addItem(RpgJournal journal){\n boolean journalExists = false;\n for(int i = 0; i < journals.size(); i++){\n if(journal.getId().equals(journals.get(i).getId()))\n journalExists = true;\n }\n\n if(!journalExists){\n journals.add(journal);\n...
[ "0.5567089", "0.546708", "0.5453828", "0.53358084", "0.5072631", "0.50654244", "0.5039111", "0.503623", "0.50177014", "0.49444032", "0.48982322", "0.47783685", "0.46806824", "0.46548715", "0.46490365", "0.46479112", "0.46404928", "0.45874", "0.45748228", "0.45707104", "0.4477...
0.528048
4
Returns the directory where this cache stores its data.
public File getDirectory() { return directory; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected File getCacheDirectory() {\n \t\treturn Activator.getDefault().getStateLocation().append(\"cache\").toFile(); //$NON-NLS-1$\n \t}", "@Override\r\n\tpublic File getCacheDir() {\r\n\t\treturn CommonUtil.getCacheDir();\r\n\t}", "public File getLocalCacheDirectory() {\n return pathsProvider.getLocalAc...
[ "0.8200023", "0.789051", "0.77999634", "0.7445608", "0.7373118", "0.73676383", "0.7304824", "0.72837543", "0.7207879", "0.71918017", "0.7153751", "0.71361136", "0.7113249", "0.709274", "0.70898324", "0.7079653", "0.70266837", "0.6984843", "0.69388103", "0.69264597", "0.691710...
0.62492716
63
Returns the maximum number of bytes that this cache should use to store its data.
public long maxSize() { return maxSize; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public final synchronized int getMaximumSize() {\n\t\treturn cacheSize;\n\t}", "public int getCacheMaxSizeKB() {\n return (cacheHandler.getMaxCacheSizeKB());\n }", "public int maximumSizeInBytes() {\n return maximumSizeInBytes;\n }", "public int getMaximumCacheSize() {\n return thi...
[ "0.8501158", "0.82318324", "0.7935563", "0.76729214", "0.76586497", "0.75193053", "0.7388594", "0.738536", "0.7376586", "0.73523176", "0.73308146", "0.730422", "0.72742397", "0.72415215", "0.72415215", "0.72415215", "0.7220198", "0.7203834", "0.7203834", "0.7191739", "0.71782...
0.72950596
12
Returns the number of bytes currently being used to store the values in this cache. This may be greater than the max size if a background deletion is pending.
public synchronized long size() { return size; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public final synchronized int getMaximumSize() {\n\t\treturn cacheSize;\n\t}", "int getSize() {\n synchronized (lock) {\n return cache.size();\n }\n }", "public int getCacheMaxSizeKB() {\n return (cacheHandler.getMaxCacheSizeKB());\n }", "public int size() {\n pro...
[ "0.78360605", "0.7537864", "0.7535879", "0.74551857", "0.7362541", "0.73616815", "0.72642595", "0.7225465", "0.719003", "0.7132777", "0.7132598", "0.70923793", "0.70833236", "0.7083106", "0.69942474", "0.69812644", "0.69747376", "0.6967212", "0.6945122", "0.69352925", "0.6928...
0.67935145
32
We only rebuild the journal when it will halve the size of the journal and eliminate at least 2000 ops.
private boolean journalRebuildRequired() { final int REDUNDANT_OP_COMPACT_THRESHOLD = 2000; return redundantOpCount >= REDUNDANT_OP_COMPACT_THRESHOLD && redundantOpCount >= lruEntries.size(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private synchronized void rebuildJournal() throws IOException {\n\t\tif (journalWriter != null) {\n\t\t\tjournalWriter.close();\n\t\t}\n\n\t\tWriter writer = new BufferedWriter(new FileWriter(journalFileTmp), IO_BUFFER_SIZE);\n\t\twriter.write(MAGIC);\n\t\twriter.write(\"\\n\");\n\t\twriter.write(VERSION_1);\n\t\t...
[ "0.6649425", "0.66069835", "0.560765", "0.5460151", "0.52692515", "0.5066824", "0.5035168", "0.5030134", "0.5029576", "0.50090635", "0.50070053", "0.4992917", "0.49808818", "0.4940399", "0.49257824", "0.49241835", "0.49198815", "0.49004173", "0.4899449", "0.48893097", "0.4887...
0.6770914
0
Returns true if this cache has been closed.
public boolean isClosed() { return journalWriter == null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean isClosed() {\n\t\tsynchronized (closed) {\n\t\t\treturn closed;\n\t\t}\n\t}", "public synchronized boolean isClosed() {\r\n\t\treturn closed;\r\n\t}", "public boolean isClosed() {\n\t\treturn (dbConnection == null);\n\t}", "public boolean isClosed() {\n return this.closed.get();\n }"...
[ "0.7578989", "0.75510734", "0.7464385", "0.7437531", "0.7397473", "0.7330908", "0.7182599", "0.71800166", "0.7140397", "0.70899475", "0.7086092", "0.7083895", "0.70634544", "0.7054311", "0.7046921", "0.70398873", "0.70320565", "0.7012113", "0.6955326", "0.6955326", "0.6927858...
0.71351135
9
Force buffered operations to the filesystem.
public synchronized void flush() throws IOException { checkNotClosed(); trimToSize(); journalWriter.flush(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void flushBuffer() throws IOException {\n\n }", "@Override\n\tpublic void flushBuffer() throws IOException {\n\t}", "public void flush() throws IOException {\n // nothing to do with cached bytes\n }", "public synchronized void flush() throws java.io.IOException { throw new Runt...
[ "0.6660231", "0.66189384", "0.6555017", "0.65389675", "0.65255004", "0.64684", "0.6458419", "0.6458419", "0.6458419", "0.64552236", "0.64552236", "0.64552236", "0.6355665", "0.6344866", "0.62948686", "0.627767", "0.62343335", "0.62137353", "0.61932695", "0.6185402", "0.618232...
0.5956608
45
Closes this cache. Stored values will remain on the filesystem.
public synchronized void close() throws IOException { if (journalWriter == null) { return; // already closed } for (Entry entry : new ArrayList<Entry>(lruEntries.values())) { if (entry.currentEditor != null) { entry.currentEditor.abort(); } } trimToSize(); journalWriter.close(); journalWriter...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void close() throws IOException {\n maxStreamPos = cache.length();\n\n seek(maxStreamPos);\n flushBefore(maxStreamPos);\n super.close();\n cache.close();\n cache = null;\n cacheFile.delete();\n cacheFile = null;\n stream.flush();\n stream...
[ "0.7609852", "0.74119043", "0.7352454", "0.6974696", "0.66416943", "0.66053295", "0.65700436", "0.6537089", "0.64975005", "0.64959407", "0.6435021", "0.64160746", "0.6353265", "0.6335836", "0.6334791", "0.6314373", "0.6239817", "0.623755", "0.62282133", "0.62029994", "0.61913...
0.59953856
56
Closes the cache and deletes all of its stored values. This will delete all files in the cache directory including files that weren't created by the cache.
public void delete() throws IOException { close(); deleteContents(directory); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public synchronized void deleteCache() {\n\n for (final File f : Constants.CACHE_LOCATION.listFiles()) {\n if (!f.isDirectory()) {\n f.delete();\n }\n }\n\n logsByCharacterMap = Collections.emptyMap();\n }", "public static void clear() {\n\t\tmemoryCac...
[ "0.75569254", "0.7154876", "0.71484786", "0.7110767", "0.7092915", "0.7056921", "0.70186824", "0.6867069", "0.67497694", "0.66438174", "0.66426134", "0.66102856", "0.6554545", "0.65385103", "0.65365356", "0.64785063", "0.6456542", "0.64073676", "0.63742954", "0.63735557", "0....
0.0
-1
Returns an editor for this snapshot's entry, or null if either the entry has changed since this snapshot was created or if another edit is in progress.
public Editor edit() throws IOException { return DiskLruCache.this.edit(key, sequenceNumber); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected MigrationEditorOperation getEditor() {\n IEditorPart editorPart = PluginUtil.getActiveEditor();\n if (editorPart instanceof MigrationEditorOperation) {\n return (MigrationEditorOperation) editorPart;\n }\n return null;\n }", "public Editor getEditor() {\n ...
[ "0.7127147", "0.67674273", "0.6492621", "0.6382462", "0.63730854", "0.6159649", "0.6093516", "0.6028866", "0.60180414", "0.59560347", "0.59560347", "0.5906322", "0.5896462", "0.5884741", "0.58688855", "0.5866238", "0.58499223", "0.575714", "0.5657488", "0.5642413", "0.5642400...
0.50464684
58
Returns an unbuffered input stream to read the last committed value, or null if no value has been committed.
public InputStream newInputStream(int index) throws IOException { synchronized (DiskLruCache.this) { if (entry.currentEditor != this) { throw new IllegalStateException(); } if (!entry.readable) { return null; } return new FileInputStream(entry.getCleanFile(index)); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public InputStream getStream() throws ValueFormatException,\n RepositoryException {\n return null;\n }", "public synchronized Object \n read() \n throws PipeException \n {\n if (!connected) {\n throw new PipeException(\"Pipe not connected\");\n } else if (...
[ "0.56349325", "0.529443", "0.51824003", "0.5133739", "0.513344", "0.5078014", "0.50581294", "0.50581294", "0.50448257", "0.5028552", "0.5011505", "0.5009704", "0.5005368", "0.49971822", "0.49910283", "0.49832138", "0.49730796", "0.49570617", "0.4949065", "0.49458084", "0.4943...
0.0
-1
Returns the last committed value as a string, or null if no value has been committed.
public String getString(int index) throws IOException { InputStream in = newInputStream(index); return in != null ? inputStreamToString(in) : null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getLastCommit() {\n return getCellContent(LAST_COMMIT);\n }", "public String getLastReleaseValue() {\n \treturn resolver.getLastReleaseValue();\n }", "public String getLastOperation()\n {\n if (!getCvpOperation().isNull())\n {\n com.sybase.afx.json.Json...
[ "0.692228", "0.66395646", "0.6457605", "0.6320048", "0.6216864", "0.61954564", "0.6169907", "0.61368006", "0.609998", "0.6096557", "0.60634184", "0.5949371", "0.58984196", "0.58883935", "0.5886832", "0.58703583", "0.58673316", "0.5858014", "0.58333844", "0.5829411", "0.574638...
0.0
-1
Commits this edit so it is visible to readers. This releases the edit lock so another edit may be started on the same key.
public void commit() throws IOException { if (hasErrors) { completeEdit(this, false); remove(entry.key); // the previous entry is stale } else { completeEdit(this, true); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void commit() {\n doCommit();\n }", "public void commit() {\n\t\tcommitted = true;\n\t}", "public void commit() {\n tryCommit(true);\n }", "public void commit () throws IOException {\n log.info(\"Internal committing index ... \");\n this.writer().commit();\n commitCo...
[ "0.6265113", "0.6154873", "0.61537516", "0.60995036", "0.5995161", "0.5974802", "0.5960929", "0.5923481", "0.59010583", "0.589396", "0.58489877", "0.58411086", "0.58404374", "0.582278", "0.5793463", "0.57428306", "0.5679688", "0.5679688", "0.5679688", "0.5679688", "0.5679688"...
0.7418504
0
Aborts this edit. This releases the edit lock so another edit may be started on the same key.
public void abort() throws IOException { completeEdit(this, false); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void abort() {\n isAborted = true;\n cancelCommands();\n cancel(true);\n }", "protected void cancel() {\n abort();\n if(cancelAction != null) {\n cancelAction.accept(getObject());\n }\n }", "public void abort() {\n if (null == putMethod) ...
[ "0.6659315", "0.64067286", "0.63418186", "0.62977487", "0.62977487", "0.6171196", "0.60722893", "0.60550934", "0.604998", "0.6045554", "0.60235137", "0.6020639", "0.60157776", "0.60032487", "0.59511477", "0.5909415", "0.58994305", "0.5894848", "0.5872943", "0.5852604", "0.584...
0.7255199
0
Set lengths using decimal numbers like "10123".
private void setLengths(String[] strings) throws IOException { if (strings.length != valueCount) { throw invalidLengths(strings); } try { for (int i = 0; i < strings.length; i++) { lengths[i] = Long.parseLong(strings[i]); } } catch (NumberFormatException e) { throw invalidLengths(strin...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void setLength( long length );", "void setLength(int length);", "public void setLength(long length);", "public void setLength(long length);", "public void setLength(double length){this.length=length;}", "public void setLength(double len) throws IllegalArgumentException\n {\n if (len<0) throw ne...
[ "0.6745118", "0.66928756", "0.65375197", "0.65375197", "0.6475718", "0.6376495", "0.6373268", "0.63224375", "0.62975025", "0.62665826", "0.6234995", "0.6195181", "0.61534935", "0.60189396", "0.5974213", "0.59739244", "0.5962491", "0.59416145", "0.59342945", "0.59166354", "0.5...
0.617456
12
set CA cert in chain
public static void main(String[] args) throws Exception { File f = new File(System.getProperty("test.src", "."), CA); FileInputStream fis = new FileInputStream(f); CertificateFactory fac = CertificateFactory.getInstance("X.509"); Certificate cacert = fac.generateCertificate(fis); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void assignCAPath()\n {\n this.caPath = CA_PATH.get(conf);\n\n if (CA_PATH_ENV.get(conf) != null) {\n String envVarTlsCAPath = System.getenv(CA_PATH_ENV.get(conf));\n if (envVarTlsCAPath != null) {\n this.caPath = envVarTlsCAPath;\n }\n }\n }", "public v...
[ "0.6536759", "0.61586666", "0.5863336", "0.5798228", "0.57451296", "0.5705473", "0.5673754", "0.56547457", "0.5610016", "0.55805343", "0.55674547", "0.5511671", "0.5488636", "0.54463106", "0.54388463", "0.539568", "0.5370848", "0.53283185", "0.5327289", "0.53093415", "0.53059...
0.0
-1
/ Persist a new employee to the Data Source and then updated associated data/tables.
public Employee saveNewEmployee(EmployeeDto newEmpDto) { Employee newEmp = null; Department d = deptRepo.findByDeptName(newEmpDto.getDeptName()); RoleAndSeniority ras = rasRepo.findRoleAndSeniority(newEmpDto.getRoleName(), newEmpDto.getSeniority()); if(employeeDataIsOk(ras, newEmpDto)) { newEmp = GenericB...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void addEmployee(Employee employee) {\n\t\tem.getTransaction().begin();\n\t\tem.persist(employee);\n\t\tem.getTransaction().commit();\n\t\tSystem.out.println(\"Data Added successfully\");\n\t\tlogger.log(Level.INFO, \"Data Added successfully\");\n\n\t}", "@Transactional\n\t\tpublic void save...
[ "0.7428786", "0.7417229", "0.73598254", "0.73548853", "0.7290273", "0.72468287", "0.71933967", "0.7169913", "0.715422", "0.7101616", "0.70663786", "0.7052697", "0.7042109", "0.7035223", "0.6971944", "0.6953513", "0.69420683", "0.68893933", "0.68846077", "0.688065", "0.6870497...
0.60934705
79
/ Validate employee data.
private boolean employeeDataIsOk(RoleAndSeniority ras, EmployeeDto newEmpDto) { if(employeeSalaryInTheCorrectRange(ras, newEmpDto.getSalary()) && employeeSsnValid(newEmpDto) && employeeNameValid(newEmpDto) && employeeDobValid(newEmpDto)) { return true; } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean validateEmployeeId(String employeeId);", "public Employee validate() throws ValidationException {\n\n\n nameValidator();\n roleValidator();\n\n if (validationException.isEmpty()) return employee;\n throw validationException;\n }", "private boolean isProblemData(Employee e...
[ "0.69547", "0.6939943", "0.68840605", "0.68132186", "0.6760784", "0.67521137", "0.6629106", "0.6576908", "0.6529794", "0.6417282", "0.63920194", "0.6182638", "0.61780983", "0.61163557", "0.60891175", "0.6070678", "0.60449964", "0.5992763", "0.59564215", "0.5926435", "0.590984...
0.65630704
8
/ Check that the salary is above min salary and below max salary.
public boolean employeeSalaryInTheCorrectRange(RoleAndSeniority ras, BigDecimal salary) { Seniority s = rasRepo.findSeniority(ras.getRasId()); return (salary.compareTo(s.getSalaryMin()) >= 0) ? (salary.compareTo(s.getSalaryMax()) <= 0) ? true : false : false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static boolean checkPlayerSalary(double playerSalary){\r\n return maxPlayerSalary >= playerSalary && playerSalary >= minPlayerSalary;\r\n }", "public static boolean checkRefereeSalary(double playerSalary){\r\n return maxRefereeSalary >= playerSalary && playerSalary >= minRefereeSalary;\r\...
[ "0.7350722", "0.70286596", "0.6098469", "0.57731235", "0.5748972", "0.568298", "0.5678547", "0.56683904", "0.56274635", "0.56203693", "0.5613473", "0.5609708", "0.5597532", "0.55970246", "0.5593428", "0.55907905", "0.55682933", "0.554323", "0.55286014", "0.5507718", "0.547748...
0.6854404
2
/ Basic check to see if there is some sort of name.
private boolean employeeNameValid(EmployeeDto newEmpDto) { int nameLen = (newEmpDto.getFirstName().length() + newEmpDto.getLastName().length()); return (nameLen >= 2) ? true : false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boo...
[ "0.7877861", "0.7877861", "0.7877861", "0.7877861", "0.7877861", "0.7877861", "0.7877861", "0.7877861", "0.7877861", "0.7877861", "0.7877861", "0.7877861", "0.7877861", "0.7877861", "0.7877861", "0.7877861", "0.7877861", "0.7877861", "0.7877861", "0.7877861", "0.7877861", "...
0.0
-1
/ Basic check to see if DOB is less than the current date.
private boolean employeeDobValid(EmployeeDto newEmpDto) { return (newEmpDto.getDob().compareTo(Calendar.getInstance()) < 0) ? true : false ; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static boolean checkDate(LocalDate birthDate, LocalDate currentDate) {\n if(birthDate.isBefore(currentDate)){\r\n return true;\r\n }else{\r\n return false;\r\n }\r\n }", "public boolean checkDate(){\n Calendar c = Calendar.getInstance();\n Date c...
[ "0.69384867", "0.69097245", "0.6697705", "0.65930706", "0.6565833", "0.6481176", "0.64679927", "0.6269142", "0.6192289", "0.61524606", "0.6097031", "0.6043087", "0.6029816", "0.6020692", "0.59966105", "0.5990284", "0.59748584", "0.59565383", "0.5941219", "0.5939367", "0.59022...
0.56771314
33
/ Check that the ssn doesn't already exist. A null result indicates that the ssn doesn't exist so it's ok to insert.
private boolean employeeSsnValid(EmployeeDto newEmpDto) { return (empRepo.findEmployeeBySsn(newEmpDto.getSsn()) == null) ? true : false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean hasSsn();", "@Override\n\tpublic void validateAndPersistSSN(String ssn) throws InvalidSSNException {\n\t\tSSNValidatorData validatorData = SSNValidatorHelper.parseSSN(ssn);\n\t\tvalidateSSN(validatorData);\n\t\t// Step-2: validate ssn against stored SSN values.\n\t\tvalidateWithStoredSSN(validatorData);\...
[ "0.6335213", "0.6169005", "0.61523664", "0.58761376", "0.5680606", "0.56579584", "0.56442815", "0.55775833", "0.54398245", "0.54081446", "0.53687423", "0.5339488", "0.53013045", "0.5230796", "0.52056366", "0.52032787", "0.51827854", "0.51790816", "0.51710117", "0.51642376", "...
0.5919981
3
/ Record an employee's absenteeism.
public EmployeeAbsent recordEmployeeAbsent(Employee emp, LocalDate startDate, LocalDate endDate, String reason) { EmployeeAbsent empAbs = null; AbsentYear absYear = findAbsentYear(emp, startDate); long numDays = calculateNumberOfDaysAbsentInclusive(startDate, endDate); if(numDays > 0 ) { if(checksForAnnualLe...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void createemployee(Employeee em) {\n\t\temployeerepo.save(em);\n\t}", "public double getDayAbsent() {\n return dayAbsent;\n }", "public void setDayAbsent(double dayAbsent) {\n this.dayAbsent = dayAbsent;\n }", "public boolean addEmp(Employee e) {\n\t\treturn edao.create(e);\n\t\t\...
[ "0.59655267", "0.5828149", "0.57795507", "0.5716831", "0.5702289", "0.55770355", "0.55539036", "0.55532086", "0.5547574", "0.5540602", "0.547454", "0.5468894", "0.5452636", "0.5449464", "0.5438027", "0.54360294", "0.54360294", "0.54273987", "0.5413949", "0.54137033", "0.54108...
0.6839533
0
Find the year for an employee's absenteeism.
private AbsentYear findAbsentYear(Employee emp, LocalDate startDate) { AbsentYear absentYear = absYearRepo.findByEmployeeAndYear(emp, (short)startDate.getYear()); if(absentYear == null) { absentYear = createAbsentYear(emp, startDate); } return absentYear; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic int fetchYearOfAnEmployee(int clockNum) {\n\t\treturn exemptTeamMemberDAO.fetchYearOfAnEmployee(clockNum);\r\n\t}", "public Date getEyear() {\n return eyear;\n }", "public int getEndingYear()\n {\n return -1;\n }", "public int getUpperYear()\r\n {\r\n return g...
[ "0.6955972", "0.6601619", "0.648026", "0.64592457", "0.6448192", "0.64356667", "0.63486373", "0.62450004", "0.623225", "0.6186267", "0.61789507", "0.61093986", "0.609798", "0.60654193", "0.6051711", "0.60332155", "0.60042053", "0.5947552", "0.59316456", "0.5899441", "0.589630...
0.7275158
0
/ There's not a record for the employee, for this year so create one.
private AbsentYear createAbsentYear(Employee emp, LocalDate startDate) { AbsentYear absentYear = new AbsentYear(); absentYear.setEmployee(emp); absentYear.setYear((short)startDate.getYear()); absYearRepo.save(absentYear); return absentYear; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void createEmployee(Employee newEmployee) {\n\t\tif(false == this.employee.contains(newEmployee)) {\n\t\t\tthis.employee.add(newEmployee);\n\t\t}\n\t}", "@Override\n\tpublic void createEmployee(Employee e) {\n\t\t\n\t}", "public void createemployee(Employeee em) {\n\t\temployeerepo.save(em);\n\t}", "p...
[ "0.64258236", "0.62532836", "0.60133016", "0.5993771", "0.5980154", "0.59607375", "0.58467764", "0.58455145", "0.58429474", "0.5830485", "0.5829694", "0.57945186", "0.576561", "0.57488227", "0.5723109", "0.5719238", "0.5703909", "0.5695705", "0.568018", "0.564806", "0.5602308...
0.7186221
0
/ Calculates the number of business days between 2 dates (inclusive). Doesn't work for public holidays.
public long calculateNumberOfDaysAbsentInclusive(LocalDate startDate, LocalDate endDate) { long businessDays = 0; long numDaysBetween = ChronoUnit.DAYS.between(startDate, endDate); if(numDaysBetween > 0) { businessDays = IntStream.iterate(0, i -> i + 1).limit(numDaysBetween).mapToObj(startDate::plusDays) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test \n\tpublic void testDaysBetween2() {\n\t\tDaysBetween d = new DaysBetween();\n\t\tLocalDate currentDate = LocalDate.now();\n\t\tLocalDate eventDate = LocalDate.of(2020, Month.OCTOBER, 20);\n\t\tlong days = d.CountDaysBetween(currentDate, eventDate);\n\t\t\n\t}", "@SuppressWarnings(\"unchecked\")\n\t@Overri...
[ "0.6983989", "0.69461745", "0.686179", "0.68577135", "0.65874076", "0.64883614", "0.6473815", "0.6348795", "0.634873", "0.63160247", "0.6278746", "0.6277451", "0.62307864", "0.6193914", "0.618769", "0.61434686", "0.61391836", "0.60739475", "0.60301363", "0.60250366", "0.59897...
0.76024675
0
/ Is the reason for being absent annual leave.
private boolean checksForAnnualLeaveAreOk(String reason, AbsentYear absYear, long numDaysRequested, int empId) { if(reason.compareTo("Annual Leave") == 0) { return (checkAnnualLeaveRequest(absYear, numDaysRequested, empId)) ? true : false; } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private boolean checkEmployeesAnnualLeaveRecordForYear(AbsentYear absYear, long numDaysRequested, int empId) {\n\t\tlong numDaysAbsent = empAbsentRepo.numDaysEmployeeHasBeenAbsent(absYear.getYear(), empId, \"Annual Leave\");\n\t\tlong annualLeave = rasRepo.findSeniority(empId).getHolidayEntitlement();\n\t\tlong di...
[ "0.6387893", "0.6347486", "0.6101597", "0.607877", "0.6072421", "0.606245", "0.60065615", "0.58402663", "0.581347", "0.57953715", "0.5767579", "0.57498145", "0.5735196", "0.57159644", "0.57034844", "0.5698867", "0.56587565", "0.56423736", "0.56396663", "0.55858135", "0.558257...
0.66806203
0
/ Calculate if the requested amount of annual leave exceeds allowance. Return true if request OK.
public boolean checkAnnualLeaveRequest(AbsentYear absYear, long numDaysRequested, int empId) { if(employeeDoesNotHaveAnAbsentRecordForThisYear(absYear, empId)) { return true; } return checkEmployeesAnnualLeaveRecordForYear(absYear, numDaysRequested, empId); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private boolean checkEmployeesAnnualLeaveRecordForYear(AbsentYear absYear, long numDaysRequested, int empId) {\n\t\tlong numDaysAbsent = empAbsentRepo.numDaysEmployeeHasBeenAbsent(absYear.getYear(), empId, \"Annual Leave\");\n\t\tlong annualLeave = rasRepo.findSeniority(empId).getHolidayEntitlement();\n\t\tlong di...
[ "0.69880086", "0.6900238", "0.60956454", "0.6008511", "0.5889435", "0.5861255", "0.57449114", "0.5718201", "0.5703148", "0.564089", "0.55983335", "0.5596105", "0.5535848", "0.5524403", "0.5513108", "0.54748076", "0.5462105", "0.54602623", "0.5454861", "0.54527897", "0.5422936...
0.64524335
2
/ Check to see if the employee has a record for this year. If the employee does not have a record the annual leave request can be granted.
private boolean employeeDoesNotHaveAnAbsentRecordForThisYear(AbsentYear absYear, int empId) { List<EmployeeAbsent> empAbs = empAbsentRepo.findEmployeeAbsentRecordsForYear(absYear.getYear(), empId); return (empAbs.isEmpty()) ? true : false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private boolean checkEmployeesAnnualLeaveRecordForYear(AbsentYear absYear, long numDaysRequested, int empId) {\n\t\tlong numDaysAbsent = empAbsentRepo.numDaysEmployeeHasBeenAbsent(absYear.getYear(), empId, \"Annual Leave\");\n\t\tlong annualLeave = rasRepo.findSeniority(empId).getHolidayEntitlement();\n\t\tlong di...
[ "0.770876", "0.7208955", "0.6648866", "0.6069489", "0.6069489", "0.60637677", "0.60637677", "0.59506303", "0.5900087", "0.57852274", "0.57540846", "0.571709", "0.56844604", "0.56844604", "0.56583965", "0.56515086", "0.5610875", "0.5605964", "0.5597493", "0.5483247", "0.548211...
0.6954536
2
/ Find out how many days annual leave the employee has taken for the year. If the number of days requested are greater than those remaining, deny request.
private boolean checkEmployeesAnnualLeaveRecordForYear(AbsentYear absYear, long numDaysRequested, int empId) { long numDaysAbsent = empAbsentRepo.numDaysEmployeeHasBeenAbsent(absYear.getYear(), empId, "Annual Leave"); long annualLeave = rasRepo.findSeniority(empId).getHolidayEntitlement(); long diff = (annualLeav...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean checkAnnualLeaveRequest(AbsentYear absYear, long numDaysRequested, int empId) {\n\t\tif(employeeDoesNotHaveAnAbsentRecordForThisYear(absYear, empId)) {\n\t\t\treturn true;\n\t\t}\n\t\treturn checkEmployeesAnnualLeaveRecordForYear(absYear, numDaysRequested, empId);\n\t}", "private boolean checksFor...
[ "0.6754973", "0.6595075", "0.6221165", "0.6007309", "0.59440476", "0.5868369", "0.5855765", "0.58114403", "0.5755022", "0.5717272", "0.5696322", "0.5692726", "0.5689371", "0.5625729", "0.5614003", "0.5610303", "0.56015146", "0.5572734", "0.5557366", "0.55572206", "0.5535293",...
0.72310954
0
Calling Student delete method to delete current record using Student ID.
@Override public void onClick(View view) { StudentDelete(TempItem); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void deleteStudentById(long id) {\n\t\t\n\t}", "public void deleteStudent(Student student) {\n\t\t\r\n\t}", "public void delete(Student student) {\t\t\r\n\t\tdao.deleteStudent(student.getSid());\r\n\t}", "public void deleteStudent(){\r\n\t\t\r\n\t}", "@Override\n public void delStude...
[ "0.8572016", "0.8486165", "0.8367399", "0.82720816", "0.8209931", "0.82081074", "0.80941236", "0.8000932", "0.79250264", "0.78670007", "0.78669876", "0.782822", "0.78249115", "0.782414", "0.78153574", "0.77909327", "0.77885234", "0.77782", "0.77683115", "0.7758584", "0.772663...
0.6639518
58
Method to Delete Student Record
public void StudentDelete(final String StudentID) { class StudentDeleteClass extends AsyncTask<String, Void, String> { @Override protected void onPreExecute() { super.onPreExecute(); progressDialog2 = ProgressDialog.show(ShowSingleRecordActivity.this, "...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void deleteStudent(Student student) {\n\t\t\r\n\t}", "public void deleteStudent(){\r\n\t\t\r\n\t}", "public void delete(Student student) {\t\t\r\n\t\tdao.deleteStudent(student.getSid());\r\n\t}", "public void deleteStudent(String rollNo) {\n\t\t\r\n\t}", "@Override\n public void delStudent(Studen...
[ "0.87169796", "0.8594744", "0.83516455", "0.833085", "0.8292515", "0.81734836", "0.8170303", "0.816031", "0.802532", "0.7957974", "0.7953217", "0.79116225", "0.7847637", "0.78341794", "0.7748315", "0.7706405", "0.76984555", "0.76552266", "0.76440275", "0.760089", "0.7538444",...
0.0
-1
Method to show current record Current Selected Record
public void HttpWebCall(final String PreviousListViewClickedItem){ class HttpWebCallFunction extends AsyncTask<String,Void,String> { @Override protected void onPreExecute() { super.onPreExecute(); pDialog = ProgressDialog.show(ShowSingleRecordActivity.t...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void onViewPatient() {\n\t\tint selectedRowIndex = tablePatients.getSelectedRow();\n\n\t\tif (selectedRowIndex < 0)\n\t\t\t// No row has been selected\n\t\t\treturn;\n\n\t\t// Gets the patient ID\n\t\tbyte[] patientId = (byte[]) tablePatients.getValueAt(selectedRowIndex, PatientTable.ID);\n\n\t\t// Sets th...
[ "0.6353002", "0.63041836", "0.6277208", "0.6223154", "0.6172879", "0.60970414", "0.60651577", "0.60206395", "0.6002706", "0.5992625", "0.59198856", "0.5909685", "0.58585304", "0.5856723", "0.5767907", "0.57591283", "0.5757797", "0.57364017", "0.5732765", "0.573127", "0.571154...
0.0
-1
Setting Student Name, Phone Number, Class into TextView after done all process .
@Override protected void onPostExecute(Void result) { NAME.setText(NameHolder); PHONE_NUMBER.setText(NumberHolder); CLASS.setText(ClassHolder); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void fillInCurrentStudentInfo() {\n // Extract info from Student object\n String name = WordUtils.capitalizeFully(mCurrentStudent.getName());\n int sex = mCurrentStudent.getSex();\n mStudentBirthdate = mCurrentStudent.getBirthdate();\n int grade = mCurrentStudent.getGrade...
[ "0.6911725", "0.68805146", "0.6758189", "0.6564742", "0.65262026", "0.63850635", "0.6371538", "0.6314243", "0.63141644", "0.6253381", "0.6211403", "0.62070644", "0.61968964", "0.60729235", "0.60540074", "0.6010791", "0.59751934", "0.59569705", "0.5900244", "0.5884277", "0.583...
0.6251936
10
TODO: move this method out to a separate class
private String getMonth(Date date) { LocalDate localDate = date.toInstant().atZone(ZoneId.systemDefault()).toLocalDate(); Month month = localDate.getMonth(); return month.name(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "@Override\n public int describeContents() { return 0; }", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "private stendhal() {\n\t}", "protected MetadataUGWD() {/* intentionally empty block *...
[ "0.5363488", "0.52307516", "0.5203955", "0.51826704", "0.51699096", "0.5126624", "0.5090826", "0.5071691", "0.5068145", "0.5055004", "0.50507754", "0.49952278", "0.49952278", "0.49952278", "0.49952278", "0.49952278", "0.49952278", "0.49852672", "0.4969129", "0.49511415", "0.4...
0.0
-1
TODO: move this method out to a separate class
private String getYear(Date date) { LocalDate localDate = date.toInstant().atZone(ZoneId.systemDefault()).toLocalDate(); Integer yearAsInt = localDate.getYear(); return String.valueOf(yearAsInt); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "@Override\n public int describeContents() { return 0; }", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "private stendhal() {\n\t}", "protected MetadataUGWD() {/* intentionally empty block *...
[ "0.53625983", "0.5230878", "0.52022296", "0.51815885", "0.51681226", "0.5125691", "0.5090042", "0.50705045", "0.5066872", "0.5055177", "0.5050123", "0.49932656", "0.49932656", "0.49932656", "0.49932656", "0.49932656", "0.49932656", "0.49843156", "0.49685976", "0.4951069", "0....
0.0
-1
/ compiled from: Proguard
public interface T { File T(String str); void T(); boolean T(String str, Bitmap bitmap) throws IOException; boolean T(String str, InputStream inputStream, Tr.T t) throws IOException; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public synchronized void a(com.umeng.commonsdk.proguard.f r9) {\n /*\n r8 = this;\n monitor-enter(r8);\n r0 = \"UMSysLocation\";\n r1 = 1;\n r2 = new java.lang.Object[r1];\t Catch:{ all -> 0x00c8 }\n r3 = \"getSystemLocation\";\n r4 = 0;\n r2[r4] = r3;...
[ "0.55802613", "0.5539073", "0.54817873", "0.5477881", "0.5476527", "0.5425943", "0.53528875", "0.5347903", "0.53287023", "0.5326589", "0.5322581", "0.5309605", "0.5271268", "0.5259931", "0.5247718", "0.52468586", "0.52427876", "0.5232762", "0.52188414", "0.51883596", "0.51852...
0.0
-1
FrmBuscaPrestamo frm = new FrmBuscaPrestamo(); dkpEscritorio.add(frm); frm.setVisible(true);
public void mniBuscarPrestamoActionPerformed(ActionEvent e) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void showFrmMantenerEmpleado(){\n this.mFrmMantenerEmpleado.setVisible(true);\n }", "public FrmBusquedas() {\n initComponents();\n jButton3.setVisible(true);\n Dimension desktopSize = VistaPrincipal.jDesktopPane1.getSize();\n Dimension jInternalFrameSize = this.getSiz...
[ "0.78674334", "0.76156837", "0.755884", "0.7546597", "0.7520951", "0.7476467", "0.74400693", "0.74254525", "0.7405911", "0.7336052", "0.72752315", "0.7207058", "0.71929586", "0.7187887", "0.71814054", "0.71698385", "0.71669555", "0.71635103", "0.7152389", "0.7148019", "0.7144...
0.0
-1
[E0] [A0..BF] [80..BF] [E1..EF] [80..BF] [80..BF]
private static boolean isMalformed3(int b1, int b2, int b3) { return (b1 == (byte) 0xe0 && (b2 & 0xe0) == 0x80) || (b2 & 0xc0) != 0x80 || (b3 & 0xc0) != 0x80; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "A6E(int i) {\n this.A00 = i;\n }", "@Test(timeout = 4000)\n public void test04() throws Throwable {\n DefaultNucleotideCodec defaultNucleotideCodec0 = DefaultNucleotideCodec.INSTANCE;\n byte[] byteArray0 = new byte[9];\n defaultNucleotideCodec0.getUngappedLength(byteArray0);\n by...
[ "0.56606364", "0.55779004", "0.5451697", "0.53635234", "0.53592974", "0.5324024", "0.5306386", "0.52798116", "0.52772796", "0.5256659", "0.52495307", "0.5242374", "0.52237195", "0.521681", "0.5203255", "0.5202699", "0.51826644", "0.51824516", "0.5155868", "0.5132563", "0.5132...
0.0
-1
[F0] [90..BF] [80..BF] [80..BF] [F1..F3] [80..BF] [80..BF] [80..BF] [F4] [80..8F] [80..BF] [80..BF] only check 80be range here, the [0xf0,0x80...] and [0xf4,0x90...] will be checked by Surrogate.neededFor(uc)
private static boolean isMalformed4(int b2, int b3, int b4) { return (b2 & 0xc0) != 0x80 || (b3 & 0xc0) != 0x80 || (b4 & 0xc0) != 0x80; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n @Tag(\"bm1000\")\n public void testFFFFF800() {\n CuteNetlibCase.doTest(\"FFFFF800.SIF\", \"555679.5648174941\", \"1858776.4328128027\", NumberContext.of(7, 4));\n }", "@Test void testHexCharLiteralOutsideRangeFails() {\n final String sql = \"^_unicode'cg'^XCF\";\n final String expe...
[ "0.5758858", "0.5634631", "0.56013244", "0.5390082", "0.5307624", "0.5285176", "0.5276353", "0.52712387", "0.52667314", "0.5249467", "0.5236006", "0.5198131", "0.5197494", "0.5181549", "0.51696163", "0.5165474", "0.5111947", "0.5106236", "0.50959885", "0.5072329", "0.504432",...
0.0
-1
This method is optimized for ASCII input.
private CoderResult decodeArrayLoop(ByteBuffer src, CharBuffer dst) { byte[] srcArray = src.array(); int srcPosition = src.arrayOffset() + src.position(); int srcLength = src.arrayOffset() + src.limit(); char[] destArray = dst.array(); int destPosition = dst.arrayOffset() + dst....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void parseInput() throws InvalidArgumentValueException {\n\t\t\n\t\t\n\t\ttry {\n\t\t\tstringArgBytes = stringToArrayOfByte(stringText.getText());\n\t\t} catch (NumberFormatException e) {\n\n\t\t\tthrow new InvalidArgumentValueException(\n\t\t\t\t\t\"This string cannot be converted to ASCII for...
[ "0.6446954", "0.62292933", "0.61711824", "0.59582084", "0.5951612", "0.59379715", "0.5906261", "0.5815829", "0.5785889", "0.57521677", "0.5738557", "0.57267356", "0.5716099", "0.5702226", "0.5660068", "0.5653789", "0.5650589", "0.5645895", "0.5644456", "0.5639252", "0.5626065...
0.0
-1
Methods: Getter method for the COM property "Application"
@DISPID(1000) //= 0x3e8. The runtime will prefer the VTID if present @VTID(7) word._Application application();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@VTID(12)\r\n @ReturnValue(type=NativeType.Dispatch)\r\n com4j.Com4jObject getApplication();", "@DISPID(148)\n @PropGet\n excel._Application getApplication();", "@DISPID(148)\n @PropGet\n com.exceljava.com4j.excel._Application getApplication();", "public String getApplication() {\r\n\t\treturn applicat...
[ "0.8436414", "0.7911141", "0.7875809", "0.78544605", "0.78495836", "0.778835", "0.7618604", "0.75866824", "0.7549122", "0.7549122", "0.7549122", "0.7549122", "0.75064427", "0.7501411", "0.74937034", "0.74443465", "0.7432374", "0.7196444", "0.7090742", "0.7086743", "0.7028636"...
0.72774047
17
Getter method for the COM property "Creator"
@DISPID(1001) //= 0x3e9. The runtime will prefer the VTID if present @VTID(8) int creator();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getCreator() {\n return getProperty(Property.CREATOR);\n }", "public String getCreator()\n\t{\n\t\treturn null;\n\t}", "public String getCreator() {\r\n return creator;\r\n }", "public String getCreator() {\r\n return creator;\r\n }", "public String getCreator() {\n ...
[ "0.81792843", "0.78855383", "0.7723479", "0.7723479", "0.76988494", "0.7687096", "0.76671296", "0.76671296", "0.76671296", "0.76671296", "0.76671296", "0.76671296", "0.76671296", "0.76671296", "0.76671296", "0.7580854", "0.74214125", "0.73774475", "0.7290068", "0.7186391", "0...
0.67691106
34
Getter method for the COM property "Parent"
@DISPID(1002) //= 0x3ea. The runtime will prefer the VTID if present @VTID(9) @ReturnValue(type=NativeType.Dispatch) com4j.Com4jObject parent();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@VTID(9)\r\n @ReturnValue(type=NativeType.Dispatch)\r\n com4j.Com4jObject getParent();", "@DISPID(150)\n @PropGet\n com4j.Com4jObject getParent();", "@DISPID(150)\n @PropGet\n com4j.Com4jObject getParent();", "@VTID(9)\n @ReturnValue(type=NativeType.Dispatch)\n com4j.Com4jObject getParent();", "@VT...
[ "0.81647867", "0.81635064", "0.81635064", "0.8093195", "0.8093195", "0.8093195", "0.8093195", "0.7820495", "0.77545613", "0.7717162", "0.76970285", "0.76970285", "0.76970285", "0.7685946", "0.7662928", "0.76436096", "0.76198393", "0.7584784", "0.75573677", "0.75491166", "0.75...
0.75643355
18
Getter method for the COM property "FavoriteService"
@DISPID(1003) //= 0x3eb. The runtime will prefer the VTID if present @VTID(13) java.lang.String favoriteService();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@DISPID(1003) //= 0x3eb. The runtime will prefer the VTID if present\r\n @VTID(14)\r\n void favoriteService(\r\n java.lang.String prop);", "public boolean isFavorite() {\n return isFavorite;\n }", "public boolean isFavorite() {\n return isFavorite;\n }", "@Override\n\tpublic boolean ...
[ "0.6801835", "0.61999094", "0.61999094", "0.5968714", "0.59155285", "0.5814761", "0.57918936", "0.5767522", "0.5708536", "0.5708536", "0.5708536", "0.5707747", "0.5707747", "0.5707747", "0.5682373", "0.56493026", "0.5643999", "0.5641149", "0.56168306", "0.56069213", "0.560634...
0.74971217
0
Setter method for the COM property "FavoriteService"
@DISPID(1003) //= 0x3eb. The runtime will prefer the VTID if present @VTID(14) void favoriteService( java.lang.String prop);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@DISPID(1003) //= 0x3eb. The runtime will prefer the VTID if present\r\n @VTID(13)\r\n java.lang.String favoriteService();", "@Override\n\tpublic void setFavorite(boolean value) {\n\t\tthis.isFavorite = value;\n\t}", "public void setFavorite(boolean favorite) {\n isFavorite = favorite;\n }", "pub...
[ "0.66174114", "0.6566632", "0.653563", "0.6487979", "0.6297217", "0.621457", "0.60498005", "0.5977077", "0.5971354", "0.596261", "0.5954286", "0.59383696", "0.5931519", "0.5820356", "0.57811135", "0.577833", "0.57709396", "0.5768284", "0.5768284", "0.5737622", "0.57295007", ...
0.7181765
0
if we create a new game, delete the old save_game file
@Override public void handle(ActionEvent e) { File f = new File("save_game.dat"); f.delete(); humanTurn = true; start(primaryStage); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void saveGame() {\n\t\tmanager.saveGame();\n\t}", "private void saveGame(){\n\t\t\n\t}", "void saveGame() throws IOException, Throwable {\n Save save = new Save(\"01\");\n save.addToSaveGame(objectsToSave());\n save.saveGame();\n }", "public void save(){\r\n\t\ttry {\r\n\t\t\tg...
[ "0.70587635", "0.6960186", "0.6877483", "0.67412066", "0.6733246", "0.66870165", "0.66529644", "0.66306514", "0.6591572", "0.6577898", "0.6562573", "0.6532904", "0.65088826", "0.6473307", "0.63936853", "0.63642746", "0.6363538", "0.6316868", "0.6307638", "0.6299433", "0.62835...
0.6370181
15
See the class javadoc for this class: it shows the syntax supported in the configuration params.
@Override public void onRepositoryInitialized(String dataSourceName, String repositoryName, ServiceBindingType sbt, List<Field> fields, List<Property> properties) throws Exception { if (properties == null || properties.isEmpty()) { logger.warn("No...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getSyntax(){\n\t\treturn syntax;\n\t}", "public String getSyntax() {\n return syntax;\n }", "@NotNull\n String getSyntax();", "@Override\r\n\tpublic String getFormat() {\r\n\t\treturn \"java\";\r\n\t}", "String getExampleParameters();", "public String configurationInfo();", "Syntax g...
[ "0.6444194", "0.6255276", "0.6220834", "0.5768367", "0.57495666", "0.5711459", "0.55307764", "0.5494919", "0.54494405", "0.5374763", "0.53542894", "0.53465754", "0.53124326", "0.52367556", "0.51359105", "0.5109411", "0.51017874", "0.5101079", "0.50912243", "0.5078564", "0.505...
0.0
-1
Returns a string representation of a resource available to the current class.
private String getStringFromResource(String resourcePath) { String str = ""; ClassLoader classloader = getClass().getClassLoader(); if (classloader == null) { return str; } if (logger.isTraceEnabled()) { URL resourceurl = classloader.getResource(resourcePa...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@JsonIgnore\n public String getResource() {\n return this.resource;\n }", "abstract public String asString(final A resource);", "public String toString() {\r\n\r\n\t\tStringBuilder buffer = new StringBuilder();\r\n\r\n\t\tbuffer.append(\"iddiaryresource=[\").append(iddiaryresource).append(\"] \");...
[ "0.69880867", "0.69617414", "0.6830508", "0.6822778", "0.67659646", "0.67637163", "0.6643988", "0.6594528", "0.6573533", "0.6536199", "0.6478594", "0.6457977", "0.64239717", "0.6413809", "0.640413", "0.64032066", "0.63956606", "0.6354115", "0.63316876", "0.63247186", "0.63238...
0.0
-1
Returns a string representation of the contents of an input stream.
private String stringFromInputStream(InputStream instream) throws IOException { StringBuilder sb = new StringBuilder(""); if (instream == null) { logger.warn("Input stream is null."); return sb.toString(); } BufferedReader bufreader = new BufferedReader(new InputS...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private String readStream(InputStream in) {\n try {\n ByteArrayOutputStream bo = new ByteArrayOutputStream();\n int i = in.read();\n while(i != -1) {\n bo.write(i);\n i = in.read();\n }\n return bo.toString();\n } ca...
[ "0.7846848", "0.7582624", "0.7481981", "0.7458483", "0.7438558", "0.74164504", "0.7372809", "0.7297833", "0.7261581", "0.72384", "0.7227836", "0.7227836", "0.7192695", "0.7178013", "0.71317047", "0.7122579", "0.7110187", "0.7100672", "0.71000767", "0.70520484", "0.7048218", ...
0.68654567
33
Accela Automation File: IModelIdGenerator.java Accela, Inc. Copyright (C): 2009 Description: TODO Notes: $Id: IModelIdGenerator.java 138537 20090710 02:16:46Z ACHIEVO\michael.mao $ Revision History &lt;Date&gt;,&lt;Who&gt;,&lt;What&gt; Mar 23, 2009jebel.qinInitial.
public interface IModelGenerator { public static final String MAIN_MODEL = "mainModel"; public static final String CURRENT_DATE = "currentDate"; /** * Generate whole entity with cascade all. Include all sub entities, such as EmbeddedId, and Embedded class. * * @param entity domain model entity */ public vo...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void AutoID() {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }", "private static int generateId() {\n\t\treturn ++sId;\n\t}", "public interface IDGenerator {\n /**\n * Return the name of the ID seq...
[ "0.6681154", "0.65529406", "0.6454353", "0.63970584", "0.63952184", "0.630346", "0.62410676", "0.62360215", "0.62275106", "0.61683714", "0.61496735", "0.6146445", "0.6106157", "0.61051214", "0.6104795", "0.60992545", "0.6079371", "0.60689", "0.6046159", "0.6046159", "0.604615...
0.64931464
2
Generate whole entity with cascade all. Include all sub entities, such as EmbeddedId, and Embedded class.
public void generate(Object entity) throws AAException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface IModelGenerator\n{\n\tpublic static final String MAIN_MODEL = \"mainModel\";\n\tpublic static final String CURRENT_DATE = \"currentDate\";\n\t/**\n\t * Generate whole entity with cascade all. Include all sub entities, such as EmbeddedId, and Embedded class.\n\t * \n\t * @param entity domain model ...
[ "0.5601284", "0.5481174", "0.52181286", "0.51945096", "0.51939636", "0.515072", "0.5139001", "0.5083502", "0.50665724", "0.49217978", "0.48960388", "0.48816594", "0.4873781", "0.48523155", "0.48424837", "0.48422986", "0.48287275", "0.481233", "0.4804366", "0.4779279", "0.4778...
0.51561064
5
Generate whole entity with cascade all. Include all sub entities, such as EmbeddedId, and Embedded class.
public void generate(Object entity, Context ormContext) throws AAException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface IModelGenerator\n{\n\tpublic static final String MAIN_MODEL = \"mainModel\";\n\tpublic static final String CURRENT_DATE = \"currentDate\";\n\t/**\n\t * Generate whole entity with cascade all. Include all sub entities, such as EmbeddedId, and Embedded class.\n\t * \n\t * @param entity domain model ...
[ "0.5601645", "0.5218284", "0.5194089", "0.5193244", "0.5157464", "0.5151276", "0.5140509", "0.50818735", "0.5067849", "0.4921244", "0.48955974", "0.48819003", "0.48745114", "0.4852256", "0.48441646", "0.48441607", "0.48309097", "0.48136234", "0.48052204", "0.47801965", "0.478...
0.5482599
1
Method that encrypts an individual digit
private char convert(char Char) { int num = (int) Char; num = (num - '0' + 7) % 10; // Subtracts '0' to get the integer value and the // rest is as instructed Char = (char) (num + '0'); // Translates it back to ASCII value by adding '0' return Char; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "char cipher(int charToCipher);", "String encryption(Long key, String encryptionContent);", "Encryption encryption();", "public CryptObject encrypt(BigIntegerMod message);", "public CryptObject encrypt(BigIntegerMod message, BigIntegerMod r);", "private String encrypt (String password){\r\n String ...
[ "0.67022693", "0.65623057", "0.6507466", "0.63074106", "0.63027155", "0.6244026", "0.6210289", "0.61372507", "0.6116333", "0.6106638", "0.60619384", "0.6038953", "0.60321367", "0.5976206", "0.5941573", "0.5939309", "0.5926407", "0.58856636", "0.5875937", "0.5859108", "0.58488...
0.0
-1
wrap sole group match in specified html tag of class
public static String wrapInTag(String source, String match, String tag, String className) { Matcher matcher = Pattern.compile(match).matcher(source); StringBuilder sb = new StringBuilder(); String wrapFmt = className.isEmpty() ? "<%1$s>%3$s</%1$s>" : "<%1$s class=\"%2$s\">%3$s</%1$s>"; int matchEnd = -1; try ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void replaceRegex() {\n int index = -1;\n for (int i = 0; i < regex.elist.size(); i++) {\n if (regex.elist.get(i).isShareableUnit) {\n ElementShareableUnit share = (ElementShareableUnit) regex.elist.get(i);\n if (share.share == this) {\n ind...
[ "0.52316386", "0.5097963", "0.5004166", "0.49573094", "0.47689217", "0.46867514", "0.46574262", "0.46001026", "0.45247468", "0.4507569", "0.4454156", "0.4436429", "0.4418134", "0.4365708", "0.43482655", "0.4333554", "0.4256548", "0.42508695", "0.42443615", "0.42441753", "0.42...
0.66467774
0
transform tags content into several tags made of source tag's split content e.g. "tok1, tok2, tok3" > "tok1, tok2, tok3"
public static String splitTagContents(String source, String tagName, String splitRegex) { String regexBody = String.format("<(?<tagDefinition>%s[^<>]*)>[^<>]+((?<delimiter>%s)[^<>]+)+</%1$s>", tagName, splitRegex); regexBody = Strings.getValidPatternOrFailAnyMatch(regexBody); if (!source.matche...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static List<XMLTag> processTags(String line, int index, int length) {\n List<XMLTag> tempTags = new ArrayList<>();\n\n XMLTag xmlTag = new XMLTag();\n String value = line;\n\n xmlTag.setLine(index + 1);\n\n if (hasTag(value)) {\n // has a tag\n while...
[ "0.60084295", "0.58829343", "0.56477123", "0.5485509", "0.5237322", "0.5096884", "0.5003122", "0.4970288", "0.4959589", "0.49548158", "0.49441087", "0.49441087", "0.4888941", "0.48044407", "0.47910252", "0.47511664", "0.47338122", "0.4732108", "0.4731486", "0.47281072", "0.47...
0.650477
0
Calculates the area of a triangle
public void calcArea(){ double p=(side1+side2+side3)/2; area=p*(p-side1)*(p-side2)*(p-side3); area=Math.sqrt(area); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public double TriangleAreaCal()\n\t{\n\t\tdouble x;\n\t\tx = Math.toRadians(60);\n\t\tdouble area = (Math.pow(this.length, 2) * Math.sin(x))/2;\n\t\treturn area;\n\t}", "double area() {\n System.out.println(\"Inside Area for Triangle.\");\n return dim1 * dim2 / 2;\n }", "public static double a...
[ "0.83209693", "0.80640775", "0.80503815", "0.8042826", "0.7797992", "0.76550996", "0.75900036", "0.7588481", "0.75729185", "0.7560489", "0.7498061", "0.74617887", "0.7344327", "0.73176587", "0.72922015", "0.7283809", "0.72772354", "0.72772354", "0.72772354", "0.72772354", "0....
0.7392346
12
Calculates the perimeter of a triangle
public void calcPerimeter(){ perimeter=side1+side2+side3; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void triangle(){\n Shape triangle = new Shape();\n triangle.addPoint(new Point(0,0));\n triangle.addPoint(new Point(6,0));\n triangle.addPoint(new Point(3,6));\n for (Point p : triangle.getPoints()){\n System.out.println(p);\n }\n double peri = get...
[ "0.8094488", "0.78208756", "0.7767403", "0.77446735", "0.7524237", "0.7514086", "0.7514086", "0.7514086", "0.7514086", "0.7466762", "0.7443338", "0.7399907", "0.7399907", "0.7381949", "0.7377746", "0.7374211", "0.7330418", "0.7327246", "0.731683", "0.73092026", "0.73092026", ...
0.75113344
9
Log.d(TAG, "onTouch(" + v + ", " + event + ")");
@Override public boolean onTouch(View v, MotionEvent event) { return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void touchEvent(MotionEvent event);", "@Override\n public void onTouch(int index) {\n }", "@Override\r\n public boolean onTouch(View v, MotionEvent event) {\n\treturn mGestureDetector.onTouchEvent(event);\r\n }", "@Override\r\n\tpublic boolean onTou...
[ "0.76598275", "0.74571663", "0.7399561", "0.73216367", "0.72721994", "0.7266024", "0.71225375", "0.71000606", "0.704064", "0.7029857", "0.70136607", "0.7009925", "0.6984459", "0.6984459", "0.6983439", "0.69665134", "0.6966362", "0.69462144", "0.69462144", "0.69462144", "0.693...
0.68898726
27
Simple cache listener interface that will notify on either EXPIRE events or EVICT events. The former will be for elements that have been hanging around for too long; the latter will be for elements that get booted in order to make room for additional elements (LRU).
public static interface CacheListener<T> { /** * An entry has outlived its "time-to-live. * * @param key entry key of element being removed */ void expiredElement(T key); /** * An entry has been removed to make room for additional elements ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void notifyElementEvicted(Ehcache cache, Element element) {\r\n //noop\r\n }", "@Test\n\tpublic void test3() throws InterruptedException {\n\t\tDeadElementCallBack<String, Integer> callback = new DeadElementCallBack<String, Integer>() {\n\n\t\t\t@Override\n\t\t\tpublic void notify(String key, In...
[ "0.66830796", "0.6508848", "0.6340679", "0.6175407", "0.5979635", "0.59617186", "0.58759695", "0.5851739", "0.5777608", "0.57132775", "0.57022065", "0.5684688", "0.5663291", "0.56623834", "0.56037384", "0.5579443", "0.55773133", "0.5563825", "0.5563758", "0.55454254", "0.5497...
0.745853
0
An entry has outlived its "timetolive.
void expiredElement(T key);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private boolean isExpired(CacheableObject value) {\n if (value == null) {\n return false;\n } else {\n return System.currentTimeMillis() - value.createTime > timeToLive;\n }\n }", "@Override\r\n\t\tprotected boolean removeEldestEntry(java.util.Map.Entry<K, com.vip.ut...
[ "0.649122", "0.6348532", "0.6069591", "0.59472847", "0.5899759", "0.5799858", "0.5793902", "0.57722294", "0.56730115", "0.563813", "0.5604212", "0.5602229", "0.5525346", "0.54732245", "0.54674155", "0.5456715", "0.5454076", "0.54228514", "0.53944457", "0.5382566", "0.5382566"...
0.49949747
89
An entry has been removed to make room for additional elements
void evictedElement(T key);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static public void removeEntry(Entry entry){ getEntryList().removeEntry(entry); }", "@Override\n\t\t\t\tpublic void remove() {\n\t\t\t\t\t\n\t\t\t\t}", "@Override\n\t\tpublic void remove() {\n\t\t\t\n\t\t}", "@Override\n\t\tpublic void remove() {\n\t\t\t\n\t\t}", "private void removeEntry(CacheEntry entr...
[ "0.6898805", "0.6747958", "0.6740799", "0.6740799", "0.67309904", "0.6660401", "0.6657034", "0.6645803", "0.6645803", "0.6619513", "0.6610351", "0.65975714", "0.6556812", "0.6551671", "0.6551671", "0.6551671", "0.6551671", "0.6551671", "0.6551671", "0.6551671", "0.6551671", ...
0.0
-1
Force a shutdown of all scheduled tasks
public static void shutdown() { logger.warn("Attempting to shut down scheduled LRU cache tasks ..."); scheduler.shutdown(); try { if (! scheduler.awaitTermination(1000, TimeUnit.MILLISECONDS)) { logger.warn("Attempting to force shut down scheduled LRU cache tasks ..."...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void forceShutdown()\n {\n taskExecutor.shutdownNow();\n differencingDone.signalAll();\n completed.signalAll();\n }", "public void shutdown() {\n\t\tfinal List<Runnable> tasks = updater.shutdownNow();\n\t\tif (null == tasks) return;\n\t\tfor (final Runnable t : tasks)\n\t\t\tt.r...
[ "0.7646104", "0.7469352", "0.73373944", "0.7068141", "0.6926492", "0.6909417", "0.6865892", "0.67980593", "0.67771435", "0.67008173", "0.66897184", "0.6670631", "0.6584885", "0.65757567", "0.65399903", "0.6538437", "0.6538437", "0.6538437", "0.6538437", "0.6507811", "0.649259...
0.7543445
1
Create a new LRU cache with a "timetolive" of 10 minutes (600 seconds), and a 30 second delay in cleaning up expired values.
public MyLRUCache(int cacheSizeLimit) { this(cacheSizeLimit, 600); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public MyLRUCache(int cacheSizeLimit, int timeToLive) {\n this(cacheSizeLimit, timeToLive, 30);\n }", "public MyLRUCache(int cacheSizeLimit, int timeToLive, int cleanupDelay) {\n if (cacheSizeLimit <= 0) {\n throw new IllegalArgumentException(\"Cache-Size-Limit value must be > 0\");\n...
[ "0.73002505", "0.7275628", "0.6891372", "0.6070027", "0.6039302", "0.592517", "0.58324826", "0.5776685", "0.5753996", "0.5741087", "0.57349676", "0.57104784", "0.5669032", "0.5647223", "0.56358004", "0.56300974", "0.56046945", "0.55795217", "0.556906", "0.55258554", "0.551737...
0.6351543
3
Create a new LRU cache with a given "timetolive" in seconds, and a 30 second delay in cleaning up expired values.
public MyLRUCache(int cacheSizeLimit, int timeToLive) { this(cacheSizeLimit, timeToLive, 30); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public MyLRUCache(int cacheSizeLimit, int timeToLive, int cleanupDelay) {\n if (cacheSizeLimit <= 0) {\n throw new IllegalArgumentException(\"Cache-Size-Limit value must be > 0\");\n } else if (timeToLive <= 0) {\n throw new IllegalArgumentException(\"Time-To-Live value must be ...
[ "0.69431204", "0.66277087", "0.5620287", "0.5603576", "0.5424078", "0.5352819", "0.53049994", "0.5292617", "0.5264843", "0.52628773", "0.5224772", "0.5211039", "0.51778626", "0.5121198", "0.5116158", "0.5070813", "0.5068059", "0.50195897", "0.4996834", "0.49645385", "0.495043...
0.7172085
0
Create a new LRU cache with a given "timetolive" in seconds. If a client wants a nonexpiring cache, simply use the default "LRUCache". A negative or zero value for the "cacheSizeLimit", "timeToLive" or "cleanupDelay" will result in an exception.
public MyLRUCache(int cacheSizeLimit, int timeToLive, int cleanupDelay) { if (cacheSizeLimit <= 0) { throw new IllegalArgumentException("Cache-Size-Limit value must be > 0"); } else if (timeToLive <= 0) { throw new IllegalArgumentException("Time-To-Live value must be > 0"); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public MyLRUCache(int cacheSizeLimit, int timeToLive) {\n this(cacheSizeLimit, timeToLive, 30);\n }", "@SuppressWarnings({\"CallToThreadStartDuringObjectConstruction\", \"SleepWhileInLoop\"})\n public MemoryCache(long timeToLive, final long timerInterval, int maxItems) {\n this.timeToLive = t...
[ "0.77957803", "0.653686", "0.6355042", "0.60015225", "0.5867542", "0.5779585", "0.5762066", "0.56275594", "0.5597484", "0.55494297", "0.5518889", "0.5485803", "0.54313236", "0.541524", "0.53762096", "0.5373898", "0.5317905", "0.527785", "0.52653044", "0.521337", "0.5207582", ...
0.7136526
1
Retrieves an entry from the cache, regardless of its "Expired" status.
public V get(K key) { CacheableObject cObj; synchronized(theLock) { cObj = valueMap.get(key); } return cObj == null ? null : cObj.cachedObject; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Object get(String key) {\n\n CacheObject cacheObject = cache.get(key).get();\n if (!cacheObject.isExpired()) {\n cacheObject.updateUseTime();\n return cacheObject.getValue();\n } else {\n cache.remove(key);\n queue.add(cacheObject);\n ...
[ "0.74555403", "0.7291132", "0.695521", "0.6945402", "0.68400556", "0.6814867", "0.6814306", "0.6752627", "0.67244124", "0.6706891", "0.65965295", "0.6549518", "0.6490905", "0.6466669", "0.6460047", "0.63738453", "0.63622206", "0.6301591", "0.6269601", "0.6264993", "0.62283665...
0.58756363
41
Retrieves an entry from the cache. The retrieved entry becomes the MRU (most recently used) entry.
public V getIfNotExpired(K key) { CacheableObject cObj; synchronized(theLock) { cObj = valueMap.get(key); } if (null != cObj) { if (isExpired(cObj)) { synchronized(theLock) { currentCacheSize -= cObj.containmentCount; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic V retrieve(K key) {\n\t\tcheckNullKey(key);\n\t\treadLock.lock();\n\t\ttry {\n\t\t\treturn cache.get(key);\n\t\t} finally {\n\t\t\treadLock.unlock();\n\t\t}\n\t}", "public Object get(Object key) {\n Entry entry = this.cache.get(key);\n\n if (entry == null)\n return nu...
[ "0.7722205", "0.741517", "0.7173657", "0.7120456", "0.70929754", "0.69727343", "0.6935124", "0.6770678", "0.6677737", "0.66736865", "0.66284287", "0.6590365", "0.65826434", "0.6577476", "0.6568203", "0.6530237", "0.64758664", "0.64202726", "0.6392457", "0.63405895", "0.633438...
0.0
-1
Adds an entry to this cache. If the cache is full, the LRU (least recently used) entry is dropped.
public void put(K key, V value, int containedObjectCount) { synchronized(theLock) { if (! valueMap.containsKey(key)) { currentCacheSize += containedObjectCount; } valueMap.put(key, new CacheableObject(value, containedObjectCount)); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic V add(K key, V value) {\n\t\tcheckNullKey(key);\n\t\tcheckNullValue(value);\n\t\twriteLock.lock();\n\t\ttry {\n\t\t\treturn cache.put(key, value);\n\t\t} finally {\n\t\t\twriteLock.unlock();\n\t\t}\n\t}", "public boolean add(E anEntry){\n if (size == capacity){\n reallocate(...
[ "0.6788811", "0.65870726", "0.6531386", "0.643955", "0.63973343", "0.6283783", "0.6264583", "0.6222436", "0.6183346", "0.6132765", "0.6095157", "0.60531867", "0.60494494", "0.6028545", "0.60135144", "0.59964806", "0.5984853", "0.5979338", "0.59614605", "0.5933111", "0.5919192...
0.0
-1
Remove an entry from the cache, returning the object to which it was associated.
public V remove(K key) { CacheableObject cObj; synchronized(theLock) { cObj = valueMap.remove(key); if (null != cObj) { currentCacheSize -= cObj.containmentCount; } } return (cObj == null) ? null : cObj.cachedObject; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public T remove(Object entry) {\n return null;\n }", "final CacheData<K, V> removeEntry(final Object key) {\r\n // find the place to put it and stuff it in, overwriting what was\r\n // previously there\r\n // synchronization is not needed here, if this value changes to null\r\n ...
[ "0.72286934", "0.70595056", "0.6967132", "0.6647923", "0.6592157", "0.6448426", "0.63981956", "0.6384716", "0.6382446", "0.63500947", "0.63464767", "0.63034", "0.62992084", "0.62956566", "0.62035686", "0.61993724", "0.6195639", "0.6183713", "0.61533356", "0.61313826", "0.6092...
0.6866013
3
Return the number of nonexpired values in the cache.
public int size() { int size = 0; Collection<CacheableObject> values = new HashSet<CacheableObject>(); synchronized(theLock) { values.addAll(valueMap.values()); } for (CacheableObject cObj : values) { if (! this.isExpired(cObj)) { size++;...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Long get_cachetotnonstoreablemisses() throws Exception {\n\t\treturn this.cachetotnonstoreablemisses;\n\t}", "public int getNumCacheMiss() {\n return cacheHandler.getCountCacheMiss();\n }", "int getCachedCount();", "public int getMissCountExpired() {\n return missCountExpired;\n }"...
[ "0.7507637", "0.74986273", "0.73533326", "0.723693", "0.7171973", "0.70934397", "0.7051619", "0.69373566", "0.69037694", "0.6897482", "0.68918234", "0.68408483", "0.6822333", "0.6755612", "0.67415935", "0.6720332", "0.6693073", "0.6691998", "0.6650096", "0.6601531", "0.653143...
0.7400878
2
Determines if the cache contains the given key.
public boolean containsKey(K key) { synchronized(theLock) { return valueMap.containsKey(key) && ! isExpired(valueMap.get(key)); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean isKeyInCache(Object key);", "public boolean containsKey(String key) {\n return cacheMap.containsKey(key);\n }", "public boolean containsKey(Object key)\n {\n // check if the cache needs flushing\n checkFlush();\n\n return getEntryInternal(key) != null;\n }",...
[ "0.8567934", "0.84595925", "0.83952695", "0.81236374", "0.8085732", "0.7983572", "0.79581034", "0.79381233", "0.78731084", "0.7845138", "0.78394747", "0.7828512", "0.7822464", "0.7763877", "0.7715903", "0.76962364", "0.7684427", "0.7680729", "0.7680729", "0.7674717", "0.76735...
0.71044534
88
Returns a Map that contains a copy of all cache entries that aren't expired. NOTE: This is a potentially expensive operation and should be avoided at all costs.
public Map<K,V> getMap() { Map<K,V> results = new HashMap<K,V>(valueMap.size()); synchronized(theLock) { for (Map.Entry<K,CacheableObject> entry : valueMap.entrySet()) { if (! isExpired(entry.getValue())) { results.put(entry.getKey(), entry.getValue().cac...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Map<Long, Set<E>> getExpiryMap() {\n return Collections.unmodifiableMap(expiryMap);\n }", "@Bean\n public ExpiringMap<String, Integer> cacheMap() {\n final ExpiringMap<String, Integer> map = ExpiringMap.builder().expiration(1, TimeUnit.MINUTES).build();\n return map;\n }", ...
[ "0.7157262", "0.6553892", "0.6511355", "0.6317043", "0.6227059", "0.62204957", "0.6127921", "0.60282254", "0.60179013", "0.60090566", "0.60066986", "0.59967804", "0.59182346", "0.5878738", "0.58650005", "0.58117443", "0.56926435", "0.56854147", "0.56626594", "0.562788", "0.56...
0.7678634
0
Determine if a value has expired, i.e., become stale.
private boolean isExpired(CacheableObject value) { if (value == null) { return false; } else { return System.currentTimeMillis() - value.createTime > timeToLive; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean isExpired() {\n return getExpiration() <= System.currentTimeMillis() / 1000L;\n }", "public boolean isExpired() {\n return System.currentTimeMillis() > this.expiry;\n }", "public boolean isExpired() {\n return age() > this.timeout;\n }", "public boolean isExpired(...
[ "0.7636791", "0.7562505", "0.75412065", "0.7527448", "0.7513616", "0.74793494", "0.74588525", "0.7457113", "0.74314547", "0.74195695", "0.74195695", "0.7401423", "0.73087585", "0.730105", "0.72718096", "0.7248409", "0.7217545", "0.721732", "0.71225417", "0.70729995", "0.70521...
0.73793817
12
Remove all expired entries from the underlying map. This process runs on a separate thread, and cedes control of lock between each attempt to remove a value from the map.
private void removeExpired() { Map<K,CacheableObject> removeMap = new HashMap<K,CacheableObject>(valueMap.size()/2); List<CacheListener<K>> tempListeners = new ArrayList<CacheListener<K>>(); // Retrieve a list of everything that's to be removed synchronized(theLock) { for (M...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void removeEvicted() {\n Map<K,CacheableObject> removeMap = new HashMap<K,CacheableObject>(valueMap.size()/2);\n List<CacheListener<K>> tempListeners = new ArrayList<CacheListener<K>>();\n\n // Retrieve a list of everything that's to be removed\n synchronized(theLock) {\n ...
[ "0.7501489", "0.7221725", "0.6955618", "0.68983024", "0.6648819", "0.66183096", "0.6614208", "0.65244883", "0.6291263", "0.62525344", "0.6196266", "0.60892946", "0.6055079", "0.6035226", "0.6020409", "0.6004831", "0.59932154", "0.5984052", "0.5969334", "0.5968375", "0.5967299...
0.83857185
0
Remove all evicted entries from the underlying map. This process runs on a separate thread, and cedes control of lock between each attempt to remove a value from the map.
private void removeEvicted() { Map<K,CacheableObject> removeMap = new HashMap<K,CacheableObject>(valueMap.size()/2); List<CacheListener<K>> tempListeners = new ArrayList<CacheListener<K>>(); // Retrieve a list of everything that's to be removed synchronized(theLock) { remove...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void cleanup() {\n\t\tTreeSet<CacheEntry> entries = new TreeSet<CacheEntry>(map.values());\n\t\tint i = region.getItemsToEvict();\n\t\tIterator<CacheEntry> it = entries.iterator();\n\t\twhile (it.hasNext() && i > 0) {\n\t\t\tremoveEntry(it.next());\n\t\t\ti--;\n\t\t}\n\t}", "private void removeExpired() ...
[ "0.7617415", "0.75162446", "0.69230074", "0.68351656", "0.6503041", "0.64147115", "0.63659525", "0.63646597", "0.63117194", "0.6255561", "0.6242259", "0.62097704", "0.6195071", "0.61820006", "0.6172103", "0.6165012", "0.6157947", "0.61208797", "0.6103504", "0.60952824", "0.60...
0.82827514
0
Default constructor for movement controller.
public MovementController(Creature owner) { super(owner); _movementCompleted = null; _movementFailed = null; _destinationLocation = null; _waypoints = new ConcurrentLinkedQueue<>(); _movementTick = System.currentTimeMillis(); _movementTask ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected WorldController() {\n\t\tthis(new Rectangle(0,0,DEFAULT_WIDTH,DEFAULT_HEIGHT), \n\t\t\t\tnew Vector2(0,DEFAULT_GRAVITY));\n\t}", "public CourtMovement() {\r\n\t\tsuper();\r\n\t\tstart = 0;\r\n\t\tend = 0;\r\n\t}", "public DirectionController() {\n }", "public Controller() {\n\t\tthis(null);\n\t}...
[ "0.7307293", "0.7088126", "0.68986106", "0.6737575", "0.67217034", "0.6694231", "0.6664438", "0.6612738", "0.6607113", "0.65199476", "0.65199476", "0.6500844", "0.64918137", "0.6468153", "0.64328444", "0.64171255", "0.64046043", "0.63754606", "0.63597417", "0.6345644", "0.634...
0.69292593
2
Checks if owner of this controller can move to specified location.
@Override public boolean canMove(double x, double y) { return !getOwner().isDead(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private boolean canMove(Location location) {\n if (location == null) return false;\n return location.getWorld().intersects(this, Util.getRectangle(location, size)) == null && location.getY() >= 0 && location.getX() >= 0;\n }", "public boolean canMove (Location loc) {\n Grid<Actor> gr = getGri...
[ "0.73611975", "0.7309263", "0.71969664", "0.68539244", "0.6613799", "0.6579334", "0.6495462", "0.6474171", "0.63481754", "0.6318447", "0.62440026", "0.6242544", "0.62338406", "0.62330127", "0.6231069", "0.62303317", "0.62196964", "0.6125927", "0.61117065", "0.6110149", "0.608...
0.6358539
8
Starts moving the character to specified destination.
@Override public void startMove(Collection<Location> destinations, Callable<Boolean> onEnd, Consumer<Method> onExit, ENaviType naviType) { cancelMoveTask(); if (destinations.isEmpty()) { onMovementComplete(); return; } synchronized (_mutex) { _mov...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract void move( char direction );", "public void move(String direction);", "public void move(String direction) {\n \n }", "public void startMoving ()\n {\n if (canMove()) {\n ((Mobile)_actor).setDirection(_actor.getRotation());\n _actor.set(Mobile.MOVING);...
[ "0.6609744", "0.6565297", "0.64367324", "0.6266246", "0.6204821", "0.6145887", "0.6144462", "0.61431843", "0.61402917", "0.6096609", "0.5991871", "0.5957105", "0.5932433", "0.5920227", "0.58923304", "0.58857816", "0.5884283", "0.58714306", "0.5844598", "0.5814474", "0.5807676...
0.0
-1
Starts moving the character to specified destination.
@Override public void startMove(Location destination, Callable<Boolean> movementCompleted, Consumer<Method> movementFailed, ENaviType naviType, boolean moveStraight) { cancelMoveTask(); if (destination == null || !destination.isValid()) { onMovementComplete(); return; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract void move( char direction );", "public void move(String direction);", "public void move(String direction) {\n \n }", "public void startMoving ()\n {\n if (canMove()) {\n ((Mobile)_actor).setDirection(_actor.getRotation());\n _actor.set(Mobile.MOVING);...
[ "0.6610274", "0.6567127", "0.643831", "0.6267136", "0.6206476", "0.61468875", "0.6145195", "0.6143968", "0.6142812", "0.60981166", "0.5993006", "0.59591544", "0.5935157", "0.5922302", "0.5895253", "0.5888659", "0.588658", "0.5874023", "0.5845852", "0.5815178", "0.58103454", ...
0.0
-1
Starts moving the character to specified destination.
@Override public void startFollow(Creature target, Callable<Boolean> onEnd, Consumer<Method> onExit, ENaviType naviType) { cancelMoveTask(); if (!target.getLocation().isValid()) { onMovementComplete(); return; } synchronized (_mutex) { _movementCo...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract void move( char direction );", "public void move(String direction);", "public void move(String direction) {\n \n }", "public void startMoving ()\n {\n if (canMove()) {\n ((Mobile)_actor).setDirection(_actor.getRotation());\n _actor.set(Mobile.MOVING);...
[ "0.6610274", "0.6567127", "0.643831", "0.6267136", "0.6206476", "0.61468875", "0.6145195", "0.6143968", "0.6142812", "0.60981166", "0.5993006", "0.59591544", "0.5935157", "0.5922302", "0.5895253", "0.5888659", "0.588658", "0.5874023", "0.5845852", "0.5815178", "0.58103454", ...
0.0
-1
Using Runnable to avoid it from getting stuck and to be able to make it cancellable.
@Override public void run() { updateMovement(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void run() {\n }", "@Override\n public void run() {\n }", "public void run() {\n // no-op.\n }", "@Override\n public void run() {\n ...
[ "0.6707942", "0.6707942", "0.6696447", "0.66653806", "0.66653806", "0.66653806", "0.6663817", "0.6663817", "0.6653595", "0.6653595", "0.6653595", "0.6653595", "0.6653595", "0.6653595", "0.6653595", "0.66514355", "0.66514355", "0.6649358", "0.66451687", "0.66451687", "0.664263...
0.0
-1
Private task that updates the movement of current Creature.
private void updateMovement() { if (_movementTask == null) { return; } if (getOwner().isDead() || _followTarget != null && _followTarget.isDead()) { cancelMoveTask2(true); return; } // Movement is invalid! Queue a new movement and wait again!...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void run() {\n updateMovement();\n }", "public void updatemove() {\n\t\tmove = new Movement(getX(), getY(),dungeon,this);\n\t\t//System.out.println(\"Updated\");\n\t\tnotifys();\n\t\tif(this.getInvincible()) {\n\t\t\tsteptracer++;\n\t\t}\n\t\tdungeon.checkGoal();\n\t}", "public ...
[ "0.68343645", "0.6301684", "0.60743135", "0.60702306", "0.6070025", "0.6046484", "0.60330206", "0.59209824", "0.58736694", "0.5856078", "0.5840566", "0.583608", "0.5833726", "0.5815882", "0.5777243", "0.5773958", "0.57726383", "0.5744203", "0.57348806", "0.57201594", "0.57159...
0.69226795
0
Sends a vehicle movement update whenever player moves.
private void notifyVehicleMovement() { if (getOwner() != null && getOwner().isVehicle() && getOwner().getOwner() != null && getOwner().getOwner().isPlayer()) { // getOwner().sendBroadcastPacket(new SMMoveNonPlayer(getOwner())); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void update(){\n\t\tupdatePlayerPosition();\n\t\thandleCollisions();\n\t}", "public void update(Player player) {\n\t\t\n\t}", "protected void doMovement(Player player, float modifier) {\n\t\tplayer.getLocation().x += player.getVelocity().x * modifier;\n\t\tplayer.getLocation().y += player.getVelocity()....
[ "0.6830276", "0.67994", "0.6632154", "0.6630143", "0.65937024", "0.65763766", "0.65624475", "0.65612936", "0.6481873", "0.64620256", "0.6458017", "0.64538527", "0.64456445", "0.64386106", "0.64332914", "0.6404847", "0.64014417", "0.6372405", "0.6365488", "0.6332998", "0.63033...
0.6729636
2
Notifies current game sector if movement should be started or stopped.
private void notifySector(boolean movementStart) { GameSector gameSector = getOwner().getLocation().getGameSector(); if (gameSector != null && gameSector.hasActiveNeighbours()) { if (movementStart) { // getOwner().sendBroadcastPacket(new SMStartCharacterMoving(getOwner())); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void update() {\n\t\tcanBuild = true;\n\t\tfor (Ship s : SceneManager.sm.currSector.ships) {\n\t\t\tif (!s.isPlayer) {\n\t\t\t\tif (s.cm.distanceTo(p.cm) < 2500) {\n\t\t\t\t\tcanBuild = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (SceneManager.sm.endSector.clear && SceneManage...
[ "0.56184053", "0.55551684", "0.5514953", "0.5320478", "0.5312309", "0.52830076", "0.5265114", "0.526215", "0.52349156", "0.5212018", "0.52060467", "0.51497376", "0.5143562", "0.5128458", "0.5128246", "0.51190865", "0.51190734", "0.5118269", "0.5116647", "0.51015884", "0.50901...
0.7786479
0
Checks if the controller is currently moving.
@Override public boolean isMoving() { return _movementTask != null && !_movementTask.isDone(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public final boolean isMoving() {\r\n\t\treturn moveStart > 0;\r\n\t}", "public boolean isMoving() {\n return this.movementComposer.isMoving();\n }", "public boolean isMoving() {\n\t\treturn moveProgress > 0;\n\t}", "public boolean isMoving() {\n\t\treturn state.getDirection() != Direction.STATIONA...
[ "0.79315466", "0.7867975", "0.7668762", "0.76511407", "0.7638439", "0.76132464", "0.7595488", "0.71758044", "0.70856535", "0.69435483", "0.6883029", "0.682089", "0.6738206", "0.67149615", "0.663417", "0.6631971", "0.66233015", "0.6550735", "0.65495545", "0.6501427", "0.645796...
0.7387545
7
Returns the location from where the character has started moving.
@Override public Location getOrigin() { return getOwner().getLocation(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Point getCharacterPosition() {\n\t\treturn this.characterPosition;\n\t}", "org.mojolang.mojo.lang.Position getStartPosition();", "public ImPoint getCurrentLoc() {\n \treturn this.startLoc;\n }", "public Location getStartingLocation() {\r\n return startingLocation;\r\n }", "public Poi...
[ "0.69069374", "0.6892559", "0.680781", "0.6780766", "0.6735798", "0.6695824", "0.66135955", "0.66135955", "0.6601196", "0.65500176", "0.65474975", "0.65394145", "0.6536451", "0.65173584", "0.64987683", "0.6477596", "0.64448714", "0.6437707", "0.6435641", "0.6428883", "0.64142...
0.0
-1
Returns the destination to where the character is currently moving.
@Override public Location getDestination() { return _destinationLocation != null ? _destinationLocation : getOrigin(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public double getDestinationY() {\n return myMovable.getDestinationY();\n }", "public Coordinate getDestination() {\n return cDestination;\n }", "@Override\n public Point3D getDestination() {\n return myMovable.getDestination();\n }", "@Override\n\tpublic Direc...
[ "0.66449594", "0.6592417", "0.64727926", "0.643999", "0.6437682", "0.6338454", "0.6337497", "0.6332478", "0.6262462", "0.62379265", "0.6229875", "0.62092817", "0.61704445", "0.61626554", "0.61461294", "0.61456245", "0.6127986", "0.6106735", "0.60792625", "0.6065521", "0.60458...
0.632252
8
Cancels a movement task, when no movement is needed, or we need to forcibly stop a moving player.
@Override public void cancelMoveTask() { if (_movementTask != null) { cancelMoveTask2(true); _movementTask = null; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void cancelMoveTask2(boolean shouldNotifySector) {\n if (_movementTask != null && !_movementTask.isDone()) {\n _movementTask.cancel(true);\n\n if (shouldNotifySector) {\n notifySector(false);\n }\n }\n }", "public void cancelTask(){\n\t\tif...
[ "0.71123904", "0.6521165", "0.62326336", "0.602829", "0.60156786", "0.6001275", "0.5947565", "0.59130037", "0.58070284", "0.5802636", "0.5800809", "0.5747992", "0.57057047", "0.56949866", "0.5656076", "0.560652", "0.5603663", "0.5592073", "0.55868506", "0.5581986", "0.5559482...
0.8219835
0
Cancels a movement task that is currently running and notifies the game sector that the movement has stopped.
private void cancelMoveTask2(boolean shouldNotifySector) { if (_movementTask != null && !_movementTask.isDone()) { _movementTask.cancel(true); if (shouldNotifySector) { notifySector(false); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void cancelMoveTask() {\n if (_movementTask != null) {\n cancelMoveTask2(true);\n _movementTask = null;\n }\n }", "public void cancelTask(){\n\t\tif(main.teleporting.containsKey(teleporter.getName())){\n\t\t\tmain.teleporting.remove(teleporter.getName(...
[ "0.77014697", "0.7047064", "0.6810064", "0.68091977", "0.6670438", "0.64990056", "0.6460903", "0.62465364", "0.6239907", "0.62169915", "0.61857265", "0.6181793", "0.61694854", "0.6105565", "0.6065903", "0.5989621", "0.59438396", "0.59438396", "0.5940969", "0.5906966", "0.5898...
0.7055079
1
An event fired whenever movement controller has finished the task.
private void onMovementComplete() { Callable<Boolean> movementCompleted; Consumer<Method> movementFailed; synchronized (_mutex) { movementCompleted = _movementCompleted; movementFailed = _movementFailed; _movementCompleted = null; _movementFailed...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void onMoveGestureEnded()\n\t{\n\t\tfireEvent(TiC.EVENT_MOVE_END, null);\n\t}", "public void notifyMoveAnimationFinished();", "@Override\n\tpublic void onMoveCompleted(MoveEvent arg0) {\n\t\t\n\t}", "public void taskFinished(BuildEvent event) {\n }", "@Override\n\tprotected void done()\n\t{\n\t\t...
[ "0.6688537", "0.6556762", "0.6491812", "0.62030685", "0.6135386", "0.6100619", "0.6023432", "0.5983751", "0.59458697", "0.5945389", "0.5901922", "0.58683884", "0.58616817", "0.5852403", "0.58259064", "0.5788937", "0.57792413", "0.57681876", "0.57501847", "0.57430756", "0.5716...
0.7269688
0
Override the paint() method
@Override public void paint(Graphics g) { plotSampleData((Graphics2D) g); plotClusters((Graphics2D) g); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\t\tpublic void paint(Graphics g) {\n\t\t\tsuper.paint(g);\r\n\t\t}", "@Override\n public void paint(Graphics g) {\n }", "@Override\r\n\tpublic void paintComponent(Graphics g) {\n\t\tsuper.paintComponent(g);\r\n\t\t\tthis.draw(g);\r\n\t\t\r\n\t\r\n\t}", "@Override\n public void paintCompone...
[ "0.7996027", "0.78912514", "0.7787825", "0.76258636", "0.7601909", "0.75625473", "0.7547896", "0.749573", "0.7492491", "0.7473082", "0.74621457", "0.74507713", "0.7441813", "0.7441522", "0.73847806", "0.72576725", "0.7250057", "0.72494197", "0.7241189", "0.7241189", "0.722544...
0.0
-1