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
Uses removeMRFiles but will first list the files to be deleted and will then ask for conformation.
public static boolean removeMRFilesInteractivelyFromDB( ArrayList entries_todelete ) { // String reply = "bogus"; boolean status; General.showOutput("Entries to delete: [" + entries_todelete.size() + "]"); General.showOutput("Entries to delete: " + entries_todelete.toString() ); General.showWarning("answering yes to the following question will lead to"); General.showWarning("deleting work that might not be recovered!"); String prompt = "Delete ALL the MR files for the above entries from the DB?"; if ( Strings.getInputBoolean( in, prompt ) ) { General.showOutput("Deleting the annotated MR files listed above."); status = removeMRFilesFromDB( entries_todelete ); if ( ! status ) { General.showError("in MRAnnotate.removeMRFilesInteractively found:"); General.showError("Deleting the annotated MR files failed."); return false; } } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static boolean removeMRFilesInteractively( String dir, ArrayList entries_todelete ) {\n \n// String reply = \"bogus\";\n boolean status;\n \n General.showOutput(\"Entries to delete: [\" + entries_todelete.size() + \"]\");\n General.showOutput(\"Entries to...
[ "0.65396726", "0.6352614", "0.6048669", "0.59721357", "0.5945105", "0.5917453", "0.59125966", "0.574722", "0.5708152", "0.57081187", "0.565496", "0.5654443", "0.5643784", "0.56397754", "0.562812", "0.56139934", "0.56137455", "0.5613269", "0.5607443", "0.5604167", "0.55915177"...
0.6377753
1
Will look for all files named xxxx.mr in the given directory and those for which xxxx seems to be a valid PDB code will use them as an PDB MR file. It will issue warnings for files ending with .mr for which xxxx doesn't seem to be a PDB code.
public static ArrayList getEntriesFromMRFiles( String dir ) { ArrayList entries = new ArrayList(); File rdir = new File( dir ); String[] mr_files = rdir.list( new FilenameFilter() { public boolean accept(File d, String name) { return name.endsWith( ".mr" ); } }); if (mr_files == null) { General.showWarning("Found NO entries on file in directory: " + dir); return (entries); } File f; String fname, entry_code; // Check if the code conforms for (int i=0; i<mr_files.length; i++) { f = new File(mr_files[i]); fname = f.getPath(); entry_code = fname.substring(0,4); // Check whether that's reasonable by matching against reg.exp. if ( Wattos.Utils.Strings.is_pdb_code( entry_code ) ) { entries.add( entry_code ); } else { General.showWarning("Skipping this file."); General.showWarning("String for filename ["+fname+ "] doesn't look like a pdb code: " + entry_code); } } Collections.sort(entries); return (entries); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void processDirectory(String dirName, DraftStatus minimalDraftStatus)\n throws IOException, ParseException {\n File dir = new File(outputDir + dirName);\n if (!dir.exists()) {\n dir.mkdirs();\n }\n SupplementalDataInfo sdi = SupplementalDataInfo.getInstance(Cldr...
[ "0.47929156", "0.4763515", "0.47578984", "0.47503415", "0.4713239", "0.45593682", "0.45391962", "0.4524681", "0.45153102", "0.4500489", "0.44661888", "0.4458026", "0.44425064", "0.44390818", "0.44231704", "0.44222873", "0.43957707", "0.43921617", "0.43875164", "0.43733227", "...
0.6249276
0
Will look for all mrfiles in the database that have the standard details: mrfile.details = SQL_Episode_II.FILE_DETAIL_CLASSIFIED
public static ArrayList getEntriesFromClassifiedMRFiles() { ArrayList entries = sql_epiII.getPDBIdFromMRFileByDetail( SQL_Episode_II.FILE_DETAIL_CLASSIFIED ); if (entries == null) { General.showError("getting entry codes from the db."); return (entries); } Collections.sort(entries); return (entries); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void findRecordings(){\n File[] files = new File(\"Concatenated/\").listFiles();\n _records.clear();\n _versionNum = 1;\n for (File file : files){\n if (file.isFile()){\n String nameOnFile = file.getName().substring(file.getName().lastIndexOf('_')+1,fil...
[ "0.5650874", "0.5439893", "0.52184105", "0.51727515", "0.50775486", "0.50757295", "0.5037671", "0.49760124", "0.49760124", "0.49604475", "0.48777038", "0.4877627", "0.48600304", "0.48305312", "0.48153985", "0.47890744", "0.47831324", "0.4780414", "0.4745086", "0.47294384", "0...
0.586193
0
/ Empty temporary tables; and check if they exist.
public static boolean emptyTempTables() { ArrayList temp_tables = new ArrayList(); // Since the mrblock depends on mrfile it actually // could be skipped but this way the program will also // check if the tables exist and give an error back if any doesn't. temp_tables.add( "mrfile" ); temp_tables.add( "mrblock" ); boolean status = sql_epiII.emptyTables( temp_tables, false ); return status; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void clearTables() {\r\n // your code here\r\n\t\ttry {\r\n\t\t\tdeleteReservationStatement.executeUpdate();\r\n\t\t\tdeleteBookingStatement.executeUpdate();\r\n\t\t\tdeleteUserStatement.executeUpdate();\r\n\t\t} catch (SQLException e){\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n }", "public void...
[ "0.64837235", "0.6454828", "0.6381821", "0.6366281", "0.6323993", "0.6272614", "0.62721854", "0.61971706", "0.61720806", "0.6133721", "0.6114087", "0.6094756", "0.60741985", "0.59984976", "0.5991789", "0.5975096", "0.5908187", "0.5892527", "0.58536005", "0.57388806", "0.57311...
0.77326787
0
Loop to convert desired list of entries in db to db, possibly overwritten existing data. This method uses transaction management.
public static ArrayList doLoop(Globals g, Classification classification, int star_version) { // boolean testing = g.getValueBoolean( "testing" ); boolean do_incremental_only = Strings.getInputBoolean( in, "Do incremental conversions only(y) or do all classified mr files (n)? :"); ArrayList entries_ref = null; ArrayList entries_user = new ArrayList(); // Reset this to get info from original table. sql_epiII.SQL_table_prefix = ""; if ( do_incremental_only ) { int max_number_days_old = Strings.getInputInt( in, "Enter the maximum number of days the entries may be old? :", null); entries_ref = getEntriesFromClassifiedMRFilesNewerThanDays( max_number_days_old ); } else { // Get the entry list in db entries_ref = getEntriesFromClassifiedMRFiles(); } sql_epiII.SQL_table_prefix = "temp_"; if ( entries_ref.size() < 1 ) { General.showOutput("None to do so returning now to main loop." ); return entries_ref; } General.showOutput("Possible entries include:" + entries_ref ); // Get the entries to do boolean single_do = Strings.getInputBoolean( in, "Do one entry(y) or consecutive entries(n)?"); String pdb_entry_id = ""; ArrayList entries_togo = new ArrayList(); boolean use_all = Strings.getInputBoolean(in, "Use all from above (y) or specify your own list(n)"); if ( ! use_all ) { String user_entry_list_string = Strings.getInputString(in, "Enter list of entries space/comma separated: ", null ); user_entry_list_string = user_entry_list_string.replace(',', ' '); // just for the heck of it. General.showDebug("Transformed to : " +user_entry_list_string); StringTokenizer tokens = new StringTokenizer( user_entry_list_string, " "); while ( tokens.hasMoreTokens() ) { pdb_entry_id = tokens.nextToken(); // Skip those that are not valid or present. if ( ! Strings.is_pdb_code(pdb_entry_id) ) { General.showWarning("Entry code given doesn't look like a PDB code"); continue; } if ( ! entries_ref.contains(pdb_entry_id) ) { General.showWarning("Entry doesn't seem to exist in the archive given."); continue; } entries_user.add( pdb_entry_id ); } } // Pick the entry to do (first) while ( ! Strings.is_pdb_code(pdb_entry_id) ) { pdb_entry_id = Strings.getInputString( in, "Give entry code (e.g.: 1brv) to do (or . for first): ", null ); if ( pdb_entry_id.equals(".") ) { pdb_entry_id = (String) entries_ref.get(0); } if ( ! Strings.is_pdb_code(pdb_entry_id) ) { General.showWarning("Entry code given doesn't look like a PDB code"); pdb_entry_id = ""; } if ( ! entries_ref.contains(pdb_entry_id) ) { General.showWarning("Entry doesn't seem to exist in the archive given."); pdb_entry_id = ""; } } // Just do this single one if ( single_do ) { entries_togo.add(pdb_entry_id); } else // Select all the entries following, starting with the one selected { // Get all entries possible or those specified by the user. if ( use_all ) { entries_togo.addAll(entries_ref); } else { entries_togo.addAll(entries_user); } // Set the selected one to the first position General.rotateCollectionToFirst(entries_togo, pdb_entry_id); // Remove the last element until done. int entries_togo_max = Strings.getInputInt( in, "Give maximum number of entries to do (0-" + entries_togo.size() + ") : ", null ); while ( entries_togo.size() > entries_togo_max ) { entries_togo.remove(entries_togo.size()-1); } General.showOutput("Entry series in the order they will be presented:"); General.showOutput(entries_togo.toString()); } boolean status = true; // Finally actually do this set. int j = 0; for (Iterator i=entries_togo.iterator(); i.hasNext();) { pdb_entry_id = i.next().toString(); General.showOutput("\n\nDoing entry " + pdb_entry_id + " " + j++); status = doEntry(pdb_entry_id, g, classification, star_version); if ( ! status ) { General.showError("doEntry failed, skipping remaining entries"); break; } } if ( ! status ) { return null; } else { return entries_togo; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@SuppressWarnings({ \"unchecked\", \"rawtypes\" })\n\tpublic void migrateDataByBatch() {\n\t\tpool = new HTablePool(conf, 1024);\n\t\tSQLExporter sqlExporter = \n\t\t\tnew SQLExporter(url, username, password, catalog);\n\t\twhile(sqlExporter.hasNextDataTable()) {\n\t\t\tEntry entry = sqlExporter.next();\n\t\t\tStr...
[ "0.69899154", "0.6453737", "0.641134", "0.60848916", "0.6084824", "0.60553277", "0.58690834", "0.582298", "0.5819185", "0.5807919", "0.5802641", "0.5798538", "0.5773959", "0.57079077", "0.5705839", "0.56697536", "0.56533873", "0.56395805", "0.5615198", "0.56139195", "0.558897...
0.0
-1
The entry point for the program java Xmx256m Wattos.Episode_II.MRConvert.
public static void main(String[] args) { // Change some of the standard settings defined in the Globals class Globals g = new Globals(); g.showMap(); sql_epiII = new SQL_Episode_II( g ); // General.verbosity = General.verbosityDebug; General.showOutput("Opened an sql connection:" + sql_epiII ); // Read in the classifications possible for annotation. classi = new Classification(); if (!classi.readFromCsvFile("Data/classification.csv")){ General.showError("in MRAnnotate.main found:"); General.showError("reading classification file."); System.exit(1); } /** Very simple loop as a menu. *Start over every time a sequence of entries has been done. *Very fast though to get the info again so not a performance issue. */ in = new BufferedReader(new InputStreamReader(System.in)); do { // Work on temporary tables. // This is the way to indicate on which set of tables to operate on. // The string below indicates it will be the temporary tables. sql_epiII.SQL_table_prefix = "temp_"; // Perhaps something left over so empty it. This will also check // to see if tables exist. boolean status = emptyTempTables(); if ( ! status ) { General.showError("trying to empty the temporary db tables."); System.exit(1); } int star_version = NmrStar.STAR_VERSION_DEFAULT; General.showOutput("Using NMR-STAR version: " + NmrStar.STAR_VERSION_NAMES[star_version]); ArrayList entries_done = doLoop(g, classi, star_version); if ( entries_done == null ) { General.showError("in doLoop."); continue; } if ( entries_done.size() == 0 ) { General.showWarning("no entries done."); continue; } General.showOutput("Done entries: " + entries_done.size()); // In 1 transaction with a try/catch construct for safety sql_epiII.setAutoCommit(false); boolean transaction_status; try { // -1- delete the old converted MR files if any sql_epiII.SQL_table_prefix = ""; transaction_status = sql_epiII.deleteFilesNotClassified( entries_done ); sql_epiII.SQL_table_prefix = "temp_"; if ( transaction_status ) { General.showDebug("-2- Copy temporary content to regular tables."); transaction_status = sql_epiII.copyFromSpecialToRegularTables(); if ( ! transaction_status ) { General.showError("trying to copy data from temporary to regular db tables."); } } else { General.showError("trying to delete old converted files from the regular db tables."); } if ( ! transaction_status ) { throw new Exception(); } } catch ( Exception e ) //every possible exception { General.showThrowable(e); // Rollback the transaction if previous steps where not successful. General.showError("Will try to roll back the transaction."); transaction_status = sql_epiII.rollbackTransaction(); if ( ! transaction_status ) { General.showError("rolling back the transaction. Aborting program."); break; } } // Reset commit so the doLoop can be quick. sql_epiII.setAutoCommit(true); General.showDebug("-3- Delete temporary content."); status = emptyTempTables(); if ( ! status ) { General.showError("trying to empty the temporary db tables."); break; } } while ( Strings.getInputBoolean(in, "Start again?") ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void run(String[] args) throws Exception\r\n {\r\n String inFileName = null;\r\n String outFileName = null;\r\n\r\n String alternateMzXmlDir = null;\r\n\r\n HashMap<Character,IsotopicLabel> labels = new HashMap<Character,IsotopicLabel>();\r\n\r\n char labeledResi...
[ "0.5517744", "0.53912574", "0.5305346", "0.52889204", "0.5230876", "0.52289724", "0.5070303", "0.50652325", "0.50649863", "0.5046793", "0.49997336", "0.499683", "0.4989147", "0.49664226", "0.4960489", "0.49524528", "0.49419385", "0.493402", "0.4895537", "0.48795742", "0.48622...
0.5248592
4
Creates a new Location similar to the first argument but calculates and stores the distance from the first to the second argument.
public CFLocation(Location location, Location distanceTo) { super(location); this.distance = location.distanceTo(distanceTo); this.index = NO_INDEX; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Location createLocation();", "Location createLocation();", "Location createLocation();", "public static int dist(Location loc1, Location loc2)\n\t{\n\t\treturn Math.abs(loc1.x - loc2.x) + Math.abs(loc1.y - loc2.y);\n\t}", "public static int distance(Location l1, Location l2) {\r\n\t\treturn (int) (Math.pow...
[ "0.63258207", "0.63258207", "0.63258207", "0.610777", "0.597234", "0.5943302", "0.58674186", "0.58437014", "0.57636225", "0.57194257", "0.567761", "0.56742334", "0.5651992", "0.56425184", "0.5611348", "0.5570508", "0.55555123", "0.5521835", "0.5516992", "0.5512287", "0.551027...
0.58082265
8
if the drawer is not showing
@Override public boolean onCreateOptionsMenu(Menu menu) { if (!fragmentNavigationDrawer.isDrawerOpen()) restoreActionBar(); return true; // return super.onCreateOptionsMenu(menu); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private boolean isDrawerOpen() {\n return mDrawerLayout != null && mDrawerLayout.isDrawerOpen(Gravity.LEFT);\n }", "@Override\n\t\t\tpublic void onDrawerOpened() {\n\t\t\t\tshowDown();\n\t\t\t}", "@Override\n\t\t\tpublic void onDrawerOpened() {\n\t\t\t\tbottomLayout.setVisibility(View.INVISIBLE);\n\t...
[ "0.72370064", "0.6938734", "0.69182134", "0.68762994", "0.67787904", "0.67731714", "0.67731714", "0.67731714", "0.67731714", "0.6746964", "0.6707873", "0.6696173", "0.6658199", "0.6587322", "0.6545412", "0.6495904", "0.6456638", "0.6456638", "0.6421169", "0.63851154", "0.6375...
0.0
-1
Handle action bar item clicks here. The action bar will automatically handle clicks on the Home/Up button, so long as you specify a parent activity in AndroidManifest.xml.
@Override public boolean onOptionsItemSelected(MenuItem item) { return super.onOptionsItemSelected(item); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean onOptionsItemSelected(MenuItem item) { Handle action bar item clicks here. The action bar will\n // automatically handle clicks on the Home/Up button, so long\n // as you specify a parent activity in AndroidManifest.xml.\n\n //\n // HANDLE BACK BUTTON\n ...
[ "0.79041183", "0.7805934", "0.77659106", "0.7727251", "0.7631684", "0.7621701", "0.75839096", "0.75300384", "0.74873656", "0.7458051", "0.7458051", "0.7438486", "0.742157", "0.7403794", "0.7391802", "0.73870087", "0.7379108", "0.7370295", "0.7362194", "0.7355759", "0.73454577...
0.0
-1
Created by lipenghui on 2017/1/10.
public interface SayHelloInterface { String sayHello(String text); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "private stendhal() {\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "private static void cajas() {\n\t\t\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpubli...
[ "0.5994932", "0.59472734", "0.5807083", "0.5775633", "0.5733542", "0.57287294", "0.57287294", "0.5725936", "0.56622934", "0.5594499", "0.55875134", "0.55866706", "0.55736345", "0.55620617", "0.5548187", "0.55418384", "0.5539918", "0.5538614", "0.55330986", "0.55224425", "0.55...
0.0
-1
Metodos sobrecargados utilizados para la insercion de un nuevo objeto a la BD. Reciben el objeto/registro que se desea Insertar.
public long Create(Estado estado ){ SQLiteDatabase sqLiteDatabase = conn.getWritableDatabase(); return sqLiteDatabase.insert("estados", null, estado.toContentValues()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void insertarcola(){\n Cola_banco nuevo=new Cola_banco();// se declara nuestro metodo que contendra la cola\r\n System.out.println(\"ingrese el nombre que contendra la cola: \");// se pide el mensaje desde el teclado\r\n nuevo.nombre=teclado.next();// se ingresa nuestro datos por consola yse almace...
[ "0.689253", "0.68358797", "0.6819401", "0.67231685", "0.6693144", "0.6625733", "0.6573372", "0.65551764", "0.6521586", "0.6510672", "0.6504964", "0.6495675", "0.6492221", "0.646006", "0.64311296", "0.64259493", "0.64244294", "0.64139897", "0.64043826", "0.6401931", "0.639896"...
0.0
-1
Metodos para leer infromacion de la BD. Reciben la llave primaria del registro que se desea buscar.
public Estado ReadEstado(int estadoID){ SQLiteDatabase sqLiteDatabase = conn.getReadableDatabase(); String query = "select * from estados WHERE estadoID=?"; Cursor c= sqLiteDatabase.rawQuery(query, new String[]{String.valueOf(estadoID)}); if (c.moveToFirst()) return new Estado(estadoID,c.getString(c.getColumnIndex("descripcion"))); return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getClaveEntidad() {\n return claveEntidad;\n }", "public void limpiarProcesoBusqueda() {\r\n parametroEstado = 1;\r\n parametroNombre = null;\r\n parametroApellido = null;\r\n parametroDocumento = null;\r\n parametroTipoDocumento = null;\r\n parametr...
[ "0.5943768", "0.56734395", "0.5627233", "0.558856", "0.5561196", "0.5560026", "0.5556294", "0.5504555", "0.54765606", "0.546879", "0.54631567", "0.5428852", "0.5421949", "0.5398215", "0.5373424", "0.53709984", "0.5366772", "0.53643906", "0.5363476", "0.5359507", "0.5357471", ...
0.0
-1
Metodos utilizados para actualizar la BD Reciben la llave primaria de la tabla en cuestion y un objeto con los parametros que se desean cambiar.
public int UpdateEstado(Estado estado,int estadoID){ SQLiteDatabase sqLiteDatabase = conn.getWritableDatabase(); return sqLiteDatabase.update("estados",estado.toContentValues(),"estadoID LIKE ?",new String[]{String.valueOf(estadoID)}); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public RespuestaBD modificarRegistro(int codigoFlujo, int secuencia, int servicioInicio, int accion, int codigoEstado, int servicioDestino, String nombreProcedimiento, String correoDestino, String enviar, String mismoProveedor, String mismomismoCliente, String estado, int caracteristica, int caracteristicaValor, i...
[ "0.6462359", "0.62291074", "0.5720851", "0.5679863", "0.5641551", "0.56190354", "0.56078666", "0.5589841", "0.55891985", "0.5579275", "0.5577087", "0.55767316", "0.55068237", "0.54993826", "0.5498415", "0.5440386", "0.5420917", "0.54194623", "0.5418597", "0.54180443", "0.5412...
0.0
-1
Metodos Utilizados para eliminar informacion de la BD Reciben la llave primaria del objeto que se desea eliminar
public int DeleteEstado(int estadoID){ SQLiteDatabase sqLiteDatabase = conn.getWritableDatabase(); return sqLiteDatabase.delete("estados","estodoID LIKE ?",new String[]{String.valueOf(estadoID)}); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic boolean eliminar(Connection connection, Object DetalleSolicitud) {\n\t\tString query = \"DELETE FROM detallesolicitudes WHERE sysPK = ?\";\n\t\ttry {\t\n\t\t\tDetalleSolicitud detalleSolicitud = (DetalleSolicitud)DetalleSolicitud;\n\t\t\tPreparedStatement preparedStatement = (PreparedStatement)...
[ "0.6688904", "0.66344196", "0.6634264", "0.65652055", "0.6534405", "0.65097386", "0.6482333", "0.6464003", "0.64617985", "0.6454946", "0.64077455", "0.6398838", "0.63747597", "0.6367739", "0.6364108", "0.6351493", "0.632504", "0.6324321", "0.62984633", "0.6283566", "0.6282885...
0.0
-1
Query data from MySQL
public String query(String key) { Connection conn = null; PreparedStatement stmt = null; try { conn = cpds.getConnection(); String sql = "SELECT text FROM q2 WHERE `idtag` = '" + key + "'"; stmt = conn.prepareStatement(sql); ResultSet rs = stmt.executeQuery(); String result = null; if (rs.next()) { result = rs.getString("text"); } return result; } catch (SQLException e) { e.printStackTrace(); } finally { if (stmt != null) { try { stmt.close(); } catch (SQLException e) { e.printStackTrace(); } } if (conn != null) { try { conn.close(); } catch (SQLException e) { e.printStackTrace(); } } } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Query query();", "private ResultSet GetData(String query){\n\t\ttry{\n\t\t\tstat = connection.createStatement();\n\t\t\treturn stat.executeQuery(query);\n\t\t}catch (Exception e) {\n\t\t\tSystem.out.println(e);\n\t\t\treturn null;\n\t\t}\n\t}", "public interface MySQLDBQuery {\n\n\tString QUERY_ADD_SLOT = \"in...
[ "0.68144995", "0.64632994", "0.61922455", "0.6177322", "0.61145556", "0.61048514", "0.60969985", "0.6067207", "0.6054325", "0.6010599", "0.5961111", "0.59004855", "0.58632284", "0.58486", "0.58434415", "0.577774", "0.5748068", "0.57215893", "0.57202977", "0.57047516", "0.5702...
0.52877
91
Created by user on 01.08.16.
public interface YandexArtistApi { String URL = "http://download.cdn.yandex.net/"; @GET("mobilization-2016/artists.json") Call<List<YandexArtistResponse>> getListArtist(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "private stendhal() {\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "public fina...
[ "0.57326156", "0.5727071", "0.5629875", "0.56236124", "0.5575975", "0.5575975", "0.55601376", "0.5526954", "0.5509042", "0.5500754", "0.5494295", "0.5472373", "0.54676", "0.54404557", "0.54404557", "0.54404557", "0.54404557", "0.54404557", "0.5436941", "0.54243743", "0.541857...
0.0
-1
TODO Autogenerated method stub
@Override public boolean isBusy() throws DeviceException { return false; }
{ "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
int INVITE_AUIDO = 1;//only audio int INVITE_VIDEO = 2;//only video int INVITE_MUTI = 3;//both audio and video
@Override public void onInvite(final int type, final boolean isOpen) { runOnUiThread(new Runnable() { @Override public void run() { postInvite(type, isOpen); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface ReceiveAdvertisementType\n {\n /**\n * sms\n */\n String BY_SMS = \"0\";\n\n /**\n * email\n */\n String BY_EMAIL = \"1\";\n }", "interface Player {\n /**\n * player playing as hare\n */\n int PLAYER_...
[ "0.57542336", "0.5592919", "0.55905986", "0.55620146", "0.54989856", "0.5471836", "0.5394735", "0.53533536", "0.53280485", "0.5312774", "0.5288948", "0.5288027", "0.527282", "0.5271873", "0.5265699", "0.525569", "0.52547634", "0.52061343", "0.5192172", "0.5150595", "0.5113335...
0.0
-1
cmd 1:start, 2: stop, 3: abort
@Override public void onLottery(int cmd, String info) { toastMsg("抽奖\n指令:" + (cmd == 1 ? "开始" : (cmd == 2 ? "结束" : "取消")) + "\n结果:" + info); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void stopped();", "void stop();", "void stop();", "void stop();", "void stop();", "void stop();", "void stop();", "void stop();", "void stop();", "void stop();", "void stop();", "void stop();", "void stop();", "void stop();", "void stop();", "void stop();", "void stop();", ...
[ "0.6049024", "0.60237074", "0.60237074", "0.60237074", "0.60237074", "0.60237074", "0.60237074", "0.60237074", "0.60237074", "0.60237074", "0.60237074", "0.60237074", "0.60237074", "0.60237074", "0.60237074", "0.60237074", "0.60237074", "0.60237074", "0.60125613", "0.59908056",...
0.0
-1
toastMsg("onScreenStatus isAs = " + isAs);
@Override public void onScreenStatus(boolean isAs) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void showToast(String value);", "public boolean isShowToast()\r\n {\r\n return myShowToast;\r\n }", "void showToast(String message);", "void showToast(String message);", "void toast(int resId);", "public void alertUser(int status){\r\n\r\n }", "void onMessageToast(String string);", "p...
[ "0.63599706", "0.63599557", "0.63006586", "0.63006586", "0.62095124", "0.614648", "0.6127007", "0.60437435", "0.60437435", "0.596177", "0.59470564", "0.59325516", "0.5931804", "0.5904271", "0.5904271", "0.5904271", "0.58795184", "0.58728683", "0.58573437", "0.5840294", "0.578...
0.69046247
0
TODO Autogenerated method stub
@Override public void onCameraNotify(int notify) { }
{ "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 void onRedBagTip(RewardResult arg0) { }
{ "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.66713095", "0.6567948", "0.652319", "0.648097", "0.64770466", "0.64586824", "0.64132667", "0.6376419", "0.62759", "0.62545097", "0.62371093", "0.62237984", "0.6201738", "0.619477", "0.619477", "0.61924416", "0.61872935", "0.6173417", "0.613289", "0.6127952", "0.6080854", ...
0.0
-1
TODO Autogenerated method stub
@Override public void onRewordEnable(boolean arg0, boolean arg1) { }
{ "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 void onThirdVote(String arg0) { }
{ "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 protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_identify); initView(); timeCount = new TimeCount(60000, 1000, agin); setEditChanged(); setListener(); timeCount.start(); }
{ "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 void onTextChanged(CharSequence arg0, int arg1, int arg2, int arg3) { }
{ "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.66713095", "0.6567948", "0.652319", "0.648097", "0.64770466", "0.64586824", "0.64132667", "0.6376419", "0.62759", "0.62545097", "0.62371093", "0.62237984", "0.6201738", "0.619477", "0.619477", "0.61924416", "0.61872935", "0.6173417", "0.613289", "0.6127952", "0.6080854", ...
0.0
-1
TODO Autogenerated method stub
@Override public void beforeTextChanged(CharSequence arg0, int arg1, int arg2, int arg3) { }
{ "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
public static void main(String[] args) { int[][] maps = { {1,0,1,1,1}, {1,0,1,0,1}, {1,0,1,1,1}, {1,1,1,0,1}, {0,0,0,0,1} }; System.out.println(solution(maps)); }
{ "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
Checks whether an inventory is valid. For the check to return true it must: 1) Exist; it cannot be null. 2) Have slots.
public static boolean isValidInventory(final Inventory inventory) { if (inventory == null) { return false; } if (inventory.getSize() < 1) { return false; } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean isItemValidForSlot(int p_94041_1_, ItemStack p_94041_2_)\n {\n return true;\n }", "@Override\n\tpublic boolean isItemValidForSlot(int p_94041_1_, ItemStack p_94041_2_) {\n\t\treturn true;\n\t}", "public static boolean isValidInventory(final ItemStack[] inventory) {\n if (inve...
[ "0.7373194", "0.72145176", "0.7180513", "0.7070173", "0.7061817", "0.6961236", "0.6945313", "0.69093704", "0.6894716", "0.68371326", "0.66406786", "0.6570922", "0.6533641", "0.65170264", "0.65122694", "0.6504145", "0.63689584", "0.6329226", "0.63124114", "0.6311172", "0.62648...
0.7509425
0
Checks whether an inventory is valid. For this check to return true it must: 1) Exist; it cannot be null. 2) Have elements. (Null elements are counted.)
public static boolean isValidInventory(final ItemStack[] inventory) { if (inventory == null) { return false; } if (inventory.length < 1) { return false; } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean isFull(){\n\t\tfor(int i = 0; i < INVENTORY_SLOTS; i++){\n\t\t\tif(inventoryItems[i] == null){\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "public static boolean isValidInventory(final Inventory inventory) {\n if (inventory == null) {\n return false;\n ...
[ "0.7091034", "0.70574063", "0.69521445", "0.6875585", "0.67426056", "0.6593444", "0.65839016", "0.6461781", "0.63883513", "0.63832515", "0.6367358", "0.6343354", "0.62962776", "0.6209375", "0.613085", "0.6116828", "0.60444176", "0.6030244", "0.6026377", "0.60034835", "0.59608...
0.6814296
4
Duplicates an inventory contents. See Inventory::getContents Items Duplicates an inventory in array form via Inventory.getContents() Items that do not fulfill the requirements of isValidItem() are replaced with null.
public static ItemStack[] duplicateInventory(final ItemStack[] inventory) { if (isValidInventory(inventory)) { ItemStack[] duplicate = new ItemStack[inventory.length]; for (int i = 0; i < inventory.length; i++) { if (ItemAPI.isValidItem(inventory[i])) { duplicate[i] = inventory[i].clone(); } } return duplicate; } return new ItemStack[0]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "default Collection<ItemStack> getContentsSimulated() {\n\t\treturn this.getContents().values().stream().map(ItemStack::copy).collect(Collectors.toList());\n\t}", "private Inventory clone_inv(Inventory inv_original, String title) {\n // Copy name, size and other stuff\n Inventory inv = createInvento...
[ "0.60234576", "0.5848233", "0.5565454", "0.5464573", "0.5371011", "0.5309753", "0.5296734", "0.52806735", "0.5165767", "0.5150483", "0.5148123", "0.51321226", "0.51196176", "0.5070655", "0.5048638", "0.5010307", "0.50003374", "0.49727684", "0.4971765", "0.49537215", "0.493839...
0.7091674
0
Swaps the contents of two inventories. Throws if either inventory is null. Throws if either inventory has no space for the other inventory's items. Items that do not fulfill the requirements of isValidItem() are replaced with null.
public static void swapInventoryContents(final Inventory inventory1, final Inventory inventory2) throws InvalidParameterException, NotEnoughSpaceException { if (inventory1 == null) { throw new InvalidParameterException("Cannot swap contents, inventory1 is null."); } if (inventory2 == null) { throw new InvalidParameterException("Cannot swap contents, inventory2 is null."); } ItemStack[] contents1 = Arrays.stream(inventory1.getContents()).filter(ItemAPI::isValidItem).toArray(ItemStack[]::new); ItemStack[] contents2 = Arrays.stream(inventory2.getContents()).filter(ItemAPI::isValidItem).toArray(ItemStack[]::new); if (contents1.length > inventory2.getSize()) { throw new NotEnoughSpaceException("Cannot swap contents, inventory2 doesn't have enough space for inventory1's items."); } if (contents2.length > inventory1.getSize()) { throw new NotEnoughSpaceException("Cannot swap contents, inventory1 doesn't have enough space for inventory2's items."); } inventory1.clear(); inventory2.clear(); inventory1.setContents(contents2); inventory2.setContents(contents1); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void inventoryTransaction(final Inventory inventory1, final ItemStack[] items1, final Inventory inventory2, final ItemStack[] items2) throws InvalidParameterException, FailedTransactionException {\n if (!isValidInventory(inventory1)) {\n throw new InvalidParameterException(\"Cannot ...
[ "0.6634399", "0.6618912", "0.6260327", "0.61508006", "0.57647896", "0.5513971", "0.5466108", "0.54033166", "0.54013425", "0.53946894", "0.5334176", "0.5308927", "0.52133566", "0.51929426", "0.51768476", "0.5150068", "0.5140028", "0.51239747", "0.5108385", "0.5098427", "0.5053...
0.75517523
0
Checks whether an inventory has the required amount of a specific item. The amount on the given item stack is ignored, please use the amount parameter. Returns false if the inventory not valid. Returns false if the item is not valid. Returns false if the amount is zero or below.
@SuppressWarnings("deprecation") public static boolean hasRequiredItem(final Inventory inventory, final ItemStack item, final int amount) { if (!isValidInventory(inventory)) { return false; } if (!ItemAPI.isValidItem(item)) { return false; } int count = 0; for (ItemStack currentItem : inventory.getContents()) { if (ItemAPI.isSimilarItem(currentItem, item)) { count += currentItem.getAmount(); if (count >= amount) { return true; } } } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static boolean containsAmount(Inventory i, Material material, int amount) {\n ItemStack[] contents = i.getContents();\n int count = 0;\n for (ItemStack item : contents) {\n if (item != null && item.getData().getItemType().equals(material)) {\n count = count + i...
[ "0.7114904", "0.69657856", "0.6910004", "0.6740161", "0.66707337", "0.66247916", "0.6619918", "0.6615574", "0.66001517", "0.6546586", "0.65432024", "0.6509283", "0.64781743", "0.6430944", "0.635889", "0.6328561", "0.6318365", "0.63113314", "0.6254592", "0.6247156", "0.6232199...
0.76389444
0
Safely removes an item stack from an inventory. It is recommended that this function be called from a synchronous scheduler. The inventory will be restored to its previous state if an error occurs.
public static void removeItemFromInventory(final Inventory inventory, final ItemStack item) throws InvalidParameterException, FailedTransactionException { if (!isValidInventory(inventory)) { throw new InvalidParameterException("Cannot remove item from an invalid inventory."); } if (!ItemAPI.isValidItem(item)) { throw new InvalidParameterException("Cannot remove an invalid item from an inventory."); } if (!hasRequiredItem(inventory, item, item.getAmount())) { throw new FailedTransactionException("That inventory does not have the amount of times to remove."); } ItemStack[] savedInventory = duplicateInventory(inventory.getContents()); try { int remaining = item.getAmount(); for (int i = 0; i < inventory.getSize(); i++) { ItemStack currentItem = inventory.getItem(i); if (ItemAPI.isSimilarItem(currentItem, item)) { int currentItemAmount = currentItem.getAmount(); // If this item can satisfy the remaining amount with some left over // then lower the amount of that item and break out of the loop if (currentItemAmount > remaining) { currentItem.setAmount(currentItemAmount - remaining); remaining = 0; break; } // If this item can satisfy the remaining amount exactly // then remove the item from the inventory and break out of the loop else if (currentItemAmount == remaining) { inventory.setItem(i, null); remaining = 0; break; } // Otherwise this item still leaves some remaining, so // remove the item from the inventory and reduce the remaining else { inventory.setItem(i, null); remaining -= currentItemAmount; } } } if (remaining != 0) { throw new FailedTransactionException("Was not able to remove the exact amount of that item!"); } } catch (FailedTransactionException exception) { // Restore the inventory to its previous state inventory.setContents(savedInventory); throw exception; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean removeItemStack(ItemStack itemStack) {\n boolean success = false;\n\n if (this.ITEMS.contains(itemStack)) {\n this.ITEMS.remove(itemStack);\n success = true;\n } else {\n boolean containItem = false;\n int index = 0;\n\n for...
[ "0.63847023", "0.62713206", "0.6239218", "0.612747", "0.6086902", "0.60573584", "0.60212535", "0.60026765", "0.5956383", "0.59411126", "0.590932", "0.5852704", "0.5850167", "0.58173245", "0.5782623", "0.57805", "0.5777131", "0.5770483", "0.5677582", "0.56739813", "0.5673005",...
0.5966401
8
Safely adds an item to an inventory. It is recommended that this function be called from a synchronous scheduler. The inventory will be restored to its previous state if an error occurs. Throws if the inventory is not valid. Throws if the item is not valid. Throws if there isn't enough room to add the item in its entirety.
public static void addItemToInventory(final Inventory inventory, final ItemStack item) throws InvalidParameterException, FailedTransactionException { if (!isValidInventory(inventory)) { throw new InvalidParameterException("Cannot add item from an invalid inventory."); } if (!ItemAPI.isValidItem(item)) { throw new InvalidParameterException("Cannot add an invalid item from an inventory."); } ItemStack[] savedInventory = duplicateInventory(inventory.getContents()); Map<Integer, ItemStack> remaining = inventory.addItem(item); if (!remaining.isEmpty()) { // Restore the inventory to its previous state inventory.setContents(savedInventory); throw new FailedTransactionException("Was unable to put that item in that inventory."); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addItem(Item itemToAdd){\n\t\tif(!isFull()){\n\t\t\tint index = findFreeSlot();\n\t\t\tinventoryItems[index] = itemToAdd;\n\t\t}\n\t\telse{\n\t\t\tSystem.out.println(\"Inventory full.\");\n\t\t}\n\t\t\n\t}", "public void addItem(Item item)\n\t{\n\t\tif(inventory.size()<=9)\n\t\t\tinventory.add(item);...
[ "0.71333504", "0.70780945", "0.688425", "0.6825277", "0.675303", "0.6678856", "0.66336924", "0.6599533", "0.65718114", "0.6528571", "0.65161437", "0.64479065", "0.6433823", "0.6412779", "0.6403529", "0.639812", "0.6393919", "0.63921076", "0.6348557", "0.6309574", "0.6250647",...
0.7332396
0
Performs a transaction between two inventories. It is recommended that this function be called from a synchronous scheduler. Both inventories will be restored to their previous states if an error occurs. Items in item1 will be moved from inventory1 to inventory2. Items in item2 will be moved from inventory2 to inventory1. Throws if either inventory is invalid. Throws if either item arrays are null. Throws if either item arrays contain invalid items.
public static void inventoryTransaction(final Inventory inventory1, final ItemStack[] items1, final Inventory inventory2, final ItemStack[] items2) throws InvalidParameterException, FailedTransactionException { if (!isValidInventory(inventory1)) { throw new InvalidParameterException("Cannot perform transaction, inventory1 is invalid."); } if (items1 == null) { throw new InvalidParameterException("Cannot perform transaction, items1 is null."); } if (!isValidInventory(inventory2)) { throw new InvalidParameterException("Cannot perform transaction, inventory2 is invalid."); } if (items2 == null) { throw new InvalidParameterException("Cannot perform transaction, items2 is null."); } if (!ItemAPI.isValidItemSet(items1)) { throw new InvalidParameterException("Cannot perform transaction, items1 contains an invalid item!"); } if (!ItemAPI.isValidItemSet(items2)) { throw new InvalidParameterException("Cannot perform transaction, items2 contains an invalid item!"); } ItemStack[] savedInventory1 = duplicateInventory(inventory1.getContents()); ItemStack[] savedInventory2 = duplicateInventory(inventory2.getContents()); try { // Remove items1 from inventory1 for (ItemStack item : items1) { removeItemFromInventory(inventory1, item); } // Remove items2 from inventory2 for (ItemStack item : items2) { removeItemFromInventory(inventory2, item); } // Add items2 to inventory1 for (ItemStack item : items2) { addItemToInventory(inventory1, item); } // Add items1 to inventory2 for (ItemStack item : items1) { addItemToInventory(inventory2, item); } } catch (FailedTransactionException exception) { // Restore the inventory to its previous state inventory1.setContents(savedInventory1); inventory2.setContents(savedInventory2); throw exception; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void swapInventoryContents(final Inventory inventory1, final Inventory inventory2) throws InvalidParameterException, NotEnoughSpaceException {\n if (inventory1 == null) {\n throw new InvalidParameterException(\"Cannot swap contents, inventory1 is null.\");\n }\n if (in...
[ "0.62253386", "0.56192875", "0.55810654", "0.55585414", "0.55552375", "0.53128433", "0.519307", "0.51704645", "0.5150922", "0.51459515", "0.51220196", "0.50949824", "0.50724655", "0.5046526", "0.5022872", "0.50227535", "0.49831626", "0.49595097", "0.49574062", "0.48358166", "...
0.7829067
0
TODO Autogenerated method stub
@Override public void frases() { this.frase.add("Não há que ser forte. Há que ser flexível."); this.frase.add("Gente todo dia arruma os cabelos, por que não o coração?"); this.frase.add("Há três coisas que jamais voltam; a flecha lançada, a palavra dita e a oportunidade perdida."); this.frase.add("Melhor pensar alto do que não pensar nada."); this.frase.add("A juventude não é uma época da vida, é um estado de espírito."); this.frase.add(" Podemos escolher o que semear, mas somos obrigados a colher o que plantamos."); this.frase.add("Dê toda a atenção para a formação dos teus filhos, sobretudo por exemplos de tua própria vida."); }
{ "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
A constructor that takes in an int[] and creates HuffmanNodes and places the nodes in a priority queue according to their frequency.
public HuffmanCode(int[] frequencies) { Queue<HuffmanNode> nodeFrequencies = new PriorityQueue<HuffmanNode>(); for (int i = 0; i < frequencies.length; i++) { if (frequencies[i] > 0) { nodeFrequencies.add(new HuffmanNode(frequencies[i], (char) i)); } } nodeFrequencies = ArrayHuffmanCodeCreator(nodeFrequencies); this.front = nodeFrequencies.peek(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Queue<HuffmanNode> ArrayHuffmanCodeCreator(Queue<HuffmanNode> frequencies) {\n while (frequencies.size() > 1) {\n HuffmanNode first = frequencies.poll();\n HuffmanNode second = frequencies.poll();\n HuffmanNode tempNode = new \n HuffmanNode(first.g...
[ "0.7056172", "0.7016122", "0.697307", "0.6940457", "0.67499167", "0.6717505", "0.6680176", "0.66192216", "0.64550686", "0.6441307", "0.64000976", "0.6394858", "0.63871115", "0.6377602", "0.6373346", "0.6324038", "0.6317852", "0.63057417", "0.62746555", "0.62224776", "0.622230...
0.7987007
0
A constructor that takes in a scanner. Assumes it's reading in a previously constructed, legal code file. Also assumes the Scanner is not null.
public HuffmanCode(Scanner input) { this.front = new HuffmanNode(); while (input.hasNextLine()) { int character = Integer.parseInt(input.nextLine()); String location = input.nextLine(); ScannerHuffmanCodeCreator(this.front, location, (char) character); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Scanner(String source) {\n // The source code read in from stdin is stored here as a char array\n // TODO: if source is empty in Sc.java do something??\n this.source = source.toCharArray();\n this.position = 0;\n this.size = source.length();\n this.comments = false;\n this.depth = 0;\n ...
[ "0.7014511", "0.6879627", "0.6802315", "0.66840094", "0.6677422", "0.6646458", "0.6641576", "0.6641576", "0.66351813", "0.65603954", "0.65603954", "0.65603954", "0.65603954", "0.65603954", "0.65603954", "0.65603954", "0.65603954", "0.65241545", "0.65241545", "0.65241545", "0....
0.0
-1
A private helper method that is called when the Scanner constructor is used. Creates a Huffman tree. Takes in a HuffmanNodenode, a string and a character.
private void ScannerHuffmanCodeCreator(HuffmanNode node, String s, char c) { if (s.length() == 1) { if (s.charAt(0) == '0') { node.left = new HuffmanNode(c); } else { node.right = new HuffmanNode(c); } } else { if (s.charAt(0) == '0') { if (node.left == null && node.right == null) { node.left = new HuffmanNode(); } ScannerHuffmanCodeCreator(node.left, s.substring(1), c); } else { if (node.right == null && node.right == null) { node.right = new HuffmanNode(); } ScannerHuffmanCodeCreator(node.right, s.substring(1), c); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Huffman(String input) {\n\t\t\n\t\tthis.input = input;\n\t\tmapping = new HashMap<>();\n\t\t\n\t\t//first, we create a map from the letters in our string to their frequencies\n\t\tMap<Character, Integer> freqMap = getFreqs(input);\n\n\t\t//we'll be using a priority queue to store each node with its frequenc...
[ "0.7609883", "0.7273075", "0.7256497", "0.7162151", "0.7020763", "0.70153683", "0.7004681", "0.6926964", "0.6910097", "0.68125015", "0.6712049", "0.6711897", "0.6623984", "0.660072", "0.6549731", "0.65246934", "0.6457774", "0.6449233", "0.6443494", "0.6418679", "0.641247", ...
0.7782593
0
A private helper method that is called when the int[] constructor is used. Creates a Huffman tree. Takes in a priorityQueue and returns a priorityQueue.
private Queue<HuffmanNode> ArrayHuffmanCodeCreator(Queue<HuffmanNode> frequencies) { while (frequencies.size() > 1) { HuffmanNode first = frequencies.poll(); HuffmanNode second = frequencies.poll(); HuffmanNode tempNode = new HuffmanNode(first.getFrequency() + second.getFrequency()); tempNode.left = first; tempNode.right = second; frequencies.add(tempNode); } return frequencies; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void constructTree(){\n PriorityQueue<HCNode> queue=new PriorityQueue<HCNode>();\n \n for(int i=0;i<MAXSIZE;i++){\n if(NOZERO){\n if(occTable[i]!=0){\n HCNode nnode=new HCNode(\"\"+(char)(i-DIFF),occTable[i], null);\n queue...
[ "0.76917744", "0.7231746", "0.7230042", "0.71714216", "0.6979571", "0.6922152", "0.6911023", "0.6869594", "0.66579276", "0.6577282", "0.65756583", "0.6573262", "0.6568137", "0.65517724", "0.6538524", "0.6522274", "0.64288795", "0.639482", "0.63582", "0.6346758", "0.62173307",...
0.71393865
4
A private helper method that takes in a HuffmanNode, a string and a PrintStream.
private void HuffmanPrinter(HuffmanNode node, String s, PrintStream output) { if (node.left == null) { output.println((byte) node.getData()); output.println(s); } else { HuffmanPrinter(node.left, s + 0, output); HuffmanPrinter(node.right, s + 1, output); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void translate(BitInputStream input, PrintStream output) {\n HuffmanNode node = this.front;\n while (input.hasNextBit()) {\n while (node.left != null && node.right != null) {\n if (input.nextBit() == 0) {\n node = node.left;\n } else...
[ "0.62411076", "0.619404", "0.5917807", "0.5876027", "0.57467264", "0.56327957", "0.5612778", "0.5608742", "0.5545321", "0.54995924", "0.54772437", "0.54707575", "0.5468135", "0.5462839", "0.54598665", "0.5445449", "0.543713", "0.53886694", "0.5366488", "0.535873", "0.53241", ...
0.7799173
0
A method that takes in a PrintStream and saves the HuffmanCode to a file.
public void save(PrintStream output) { HuffmanPrinter(this.front, "", output); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void printSaving(File savingsFile){\n clearFile(savingsFile);\n try{\n BufferedWriter output = new BufferedWriter(new FileWriter(savingsFile,true));\n output.write(\"Using HuffmanCompressor saves \"+ ((Integer)(savings)).toString()+\" \"+\"bits\");\n output.close();\n }\n catch(IO...
[ "0.6449896", "0.6358293", "0.6333043", "0.6228915", "0.62154514", "0.6022257", "0.6016767", "0.5928565", "0.5925787", "0.5871344", "0.5811741", "0.57862985", "0.57544416", "0.5719812", "0.5704972", "0.5697623", "0.56838447", "0.5672839", "0.56532276", "0.5640772", "0.55501384...
0.73016447
0
A method that takes in a BitInputStream and a PrintStream. Reads bits from the BitInputStream and translates them using the HuffmanTree and prints those characters to the PrintStream.
public void translate(BitInputStream input, PrintStream output) { HuffmanNode node = this.front; while (input.hasNextBit()) { while (node.left != null && node.right != null) { if (input.nextBit() == 0) { node = node.left; } else { node = node.right; } } output.print(node.getData()); node = this.front; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void HuffmanPrinter(HuffmanNode node, String s, PrintStream output) {\n if (node.left == null) {\n output.println((byte) node.getData());\n output.println(s);\n } else {\n HuffmanPrinter(node.left, s + 0, output);\n HuffmanPrinter(node.right, s + 1,...
[ "0.6384284", "0.6106384", "0.546234", "0.5339089", "0.53252816", "0.5299567", "0.52955246", "0.52486557", "0.524701", "0.5220677", "0.5129601", "0.5087297", "0.5083725", "0.5067804", "0.50657815", "0.5050523", "0.5050468", "0.5042025", "0.50313705", "0.50218636", "0.5019801",...
0.7509116
0
Instantiates a new Adresses.
public Adresses(String houseNo, String address, String postCode) { this.houseNo = houseNo; this.address = address; this.postCode = postCode; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public AdressBook() {\r\n addressEntryList = new LinkedList<>();\r\n }", "Adresse createAdresse();", "Address createAddress();", "public Address() {\n \t\n }", "public Address() {}", "public Address() {\n\t\tsuper();\n\n\t}", "public Address() {\n\t}", "public Address() {\r\n\t\tsuper...
[ "0.67018867", "0.6408339", "0.6146325", "0.6134087", "0.6061535", "0.599173", "0.59795856", "0.59685516", "0.5860405", "0.5860405", "0.5781933", "0.5713995", "0.56500036", "0.561469", "0.5596014", "0.5549257", "0.55250204", "0.5461836", "0.54302365", "0.54206735", "0.5408287"...
0.6339688
2
Created by Eigenaar on 27112016.
public interface GetPictureData { void display(); void setPictureGrade(int grade); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public final void mo51373a() {\n }", "@Override\n public void func_104112_b() {\n \n }", "@Override\n public void perish() {\n \n }", "protected boolean func_70814_o() { return true; }", "private void m50366E() {\n }", "private stendhal() {\n\t}", "public void mo3811...
[ "0.5965574", "0.5889415", "0.5880938", "0.58727217", "0.58128166", "0.57841027", "0.5732559", "0.5693256", "0.5674267", "0.56401193", "0.56401193", "0.56384593", "0.5625079", "0.5619414", "0.559308", "0.5592083", "0.55889463", "0.5578046", "0.55750257", "0.5572501", "0.555013...
0.0
-1
private long backPressedTime; private Toast backToast;
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_web_view); webView = findViewById(R.id.webView); webView.setWebViewClient(new WebViewClient()); webView.getSettings().setJavaScriptEnabled(true); webView.getSettings().setJavaScriptCanOpenWindowsAutomatically(true); // webView.setWebChromeClient(new MyCustomChromeClient(this)); // webView.setWebViewClient(new MyCustomWebViewClient(this)); // webView.clearCache(true); // webView.clearHistory(); // webView.getSettings().setJavaScriptEnabled(true); // webView.getSettings().setJavaScriptCanOpenWindowsAutomatically(true); webView.loadUrl("https://uperfect.in/"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onBackPressed() {\n if (backPressedTime + 2000 > System.currentTimeMillis()) {\n backToast.cancel();\n super.onBackPressed();\n return;\n } else {\n backToast = Toast.makeText(getBaseContext(), \"Нажмите ещё раз, чтобы выйти\", To...
[ "0.823613", "0.79881483", "0.79466784", "0.77141964", "0.7535234", "0.747327", "0.74673504", "0.74619377", "0.74445724", "0.7443834", "0.74352115", "0.7434205", "0.7423433", "0.740898", "0.740898", "0.740898", "0.740898", "0.740898", "0.740898", "0.740898", "0.740898", "0.7...
0.0
-1
Process userTags string, prepares a Tag List and set in Question.
private void assembleTags(Question question, String userTags) { if (userTags != null && !userTags.isEmpty()) { String[] tagNames = userTags.split(Constants.COMMA_DELIMITER); if (tagNames.length > 0) { List<Tag> tags = new ArrayList<Tag>(); for (String tagName : tagNames) { Tag tag = new Tag(); tag.setName(tagName); tags.add(tag); } question.setTags(tags); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private List<String> getAllTagsOfUser(Integer userId){\n \t List<String> openTags = new ArrayList<String>();\n \t DataLayerFactory factory = new DataLayerFactory(db);\n \t PostDataLayer postDataLayer = factory.createPostDataLayer();\n \t List<Question> userQuestions = postDataLayer.getQuestionsOfUs...
[ "0.5789505", "0.55778664", "0.5562045", "0.5480797", "0.5428707", "0.54199576", "0.5413593", "0.53776836", "0.5358706", "0.5356125", "0.52964133", "0.52325636", "0.5225812", "0.52230376", "0.51949334", "0.51912254", "0.5184465", "0.518152", "0.51729256", "0.5144928", "0.51227...
0.80175996
0
Get the query string for querying preferred MGI markers
public String getQuery() { /** * gets mouse marker information from MGD * includes interim and official nomenclature only */ String stmt = "select a.accID, m.symbol, m.name, m.chromosome, " + "t.name as type, a._Object_key " + "from ACC_Accession a, MRK_Marker m, MRK_Types t " + "where m._Organism_key = 1 " + "and m._Marker_Status_key = 1 " + "and m._Marker_key = a._Object_key " + "and a._MGIType_key = 2 " + "and a._LogicalDB_key = 1 " + "and a.prefixPart = 'MGI:' " + "and a.preferred = 1 " + "and m._Marker_Type_key = t._Marker_Type_key"; return stmt; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "String getQueryString ();", "java.lang.String getQuery();", "java.lang.String getQuery();", "String getQuery();", "public String getQueryString() {\n // We use the encoding which should be used according to the HTTP spec, which is UTF-8\n return getQueryString(EncoderCache.URL_ARGUMENT_ENCO...
[ "0.6105049", "0.6071015", "0.6071015", "0.6046089", "0.59510946", "0.59510946", "0.5911985", "0.59044576", "0.5850648", "0.58502704", "0.58420277", "0.57877773", "0.5715903", "0.57079595", "0.5667014", "0.5564005", "0.5560118", "0.5551356", "0.5492632", "0.54709214", "0.54614...
0.62422335
0
get a RowDataInterpreter for creating MGIMarker objects from the query results
public RowDataInterpreter getRowDataInterpreter() { class Interpreter implements RowDataInterpreter { public Object interpret(RowReference row) throws DBException { // create MGIMarker object - this sets the preferred MGI ID as // a Bucketizable ID attribute MGIMarker marker = new MGIMarker(row.getString(1)); // set the preferred MGI ID as a MGIMarker attribute marker.mgiID = row.getString(1); marker.symbol = row.getString(2); marker.name = row.getString(3); marker.chromosome = row.getString(4); marker.type = row.getString(5); marker.key = row.getInt(6); // adds the the preferred MGI ID to the set of all MGI Ids // for this MGIMarker // adds the preferred MGI ID to the Bucketizable SVASet marker.addMGIID(new SequenceAccession(marker.mgiID, SequenceAccession.MGI)); /** * obtain sequence associations AND non-preferred MGI ids for the * marker */ try { // sequences also contains non-preferred MGI IDs Vector sequences = sequenceLookup.lookup(marker.key); if (sequences == null) return marker; for (int i = 0; i < sequences.size(); i++) { SequenceAccession acc = (SequenceAccession)sequences.get(i); String seq = acc.getAccid(); String seqCategory = accidClassifier.classify(seq); if (seqCategory.equals(Constants.GENBANK)) { // set bucketizable data marker.addGenBankSequence(acc); } else if (seqCategory.equals(Constants.XM)) { // set bucketizable data marker.addXMSequence(acc); } else if (seqCategory.equals(Constants.XR)) { // set bucketizable data marker.addXRSequence(acc); } else if (seqCategory.equals(Constants.XP)) { // set bucketizable data marker.addXPSequence(acc); } else if (seqCategory.equals(Constants.NM)) { // set bucketizable data marker.addNMSequence(acc); } else if (seqCategory.equals(Constants.NR)) { // set bucketizable data marker.addNRSequence(acc); } else if (seqCategory.equals(Constants.NP)) { // set bucketizable data marker.addNPSequence(acc); } else if (seqCategory.equals(Constants.NG)) { // set bucketizable data marker.addNGSequence(acc); } else if (seqCategory.equals(Constants.NT)) { // set bucketizable data marker.addNTSequence(acc); } else if (seqCategory.equals(Constants.NW)) { // set bucketizable data marker.addNWSequence(acc); } else if (seqCategory.equals(Constants.MGIID)) { // set bucketizable data marker.addMGIID(acc); } } } catch (CacheException e) { DBExceptionFactory eFactory = new DBExceptionFactory(); DBException e2 = (DBException) eFactory.getException(DBExceptionFactory.ConfigErr, e); throw e2; } return marker; } } return new Interpreter(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static ResultInterpreter createResultInterpreter(final Intent data){\n return new ResultInterpreter(data);\n }", "protected abstract Object mapRow(ResultSet rs) throws SQLException;", "@Override\n\t\t\tpublic Tmly mapRow(ResultSet result, int i) throws SQLException {\n\t\t\t\tTmly tmly = new T...
[ "0.5782936", "0.5525723", "0.5431126", "0.53794503", "0.5374877", "0.53563267", "0.53361213", "0.5336066", "0.5292743", "0.52825373", "0.52825147", "0.52695173", "0.52642614", "0.5245048", "0.5211075", "0.5201223", "0.5156703", "0.514889", "0.5148286", "0.51132864", "0.510705...
0.7038449
0
create MGIMarker object this sets the preferred MGI ID as a Bucketizable ID attribute
public Object interpret(RowReference row) throws DBException { MGIMarker marker = new MGIMarker(row.getString(1)); // set the preferred MGI ID as a MGIMarker attribute marker.mgiID = row.getString(1); marker.symbol = row.getString(2); marker.name = row.getString(3); marker.chromosome = row.getString(4); marker.type = row.getString(5); marker.key = row.getInt(6); // adds the the preferred MGI ID to the set of all MGI Ids // for this MGIMarker // adds the preferred MGI ID to the Bucketizable SVASet marker.addMGIID(new SequenceAccession(marker.mgiID, SequenceAccession.MGI)); /** * obtain sequence associations AND non-preferred MGI ids for the * marker */ try { // sequences also contains non-preferred MGI IDs Vector sequences = sequenceLookup.lookup(marker.key); if (sequences == null) return marker; for (int i = 0; i < sequences.size(); i++) { SequenceAccession acc = (SequenceAccession)sequences.get(i); String seq = acc.getAccid(); String seqCategory = accidClassifier.classify(seq); if (seqCategory.equals(Constants.GENBANK)) { // set bucketizable data marker.addGenBankSequence(acc); } else if (seqCategory.equals(Constants.XM)) { // set bucketizable data marker.addXMSequence(acc); } else if (seqCategory.equals(Constants.XR)) { // set bucketizable data marker.addXRSequence(acc); } else if (seqCategory.equals(Constants.XP)) { // set bucketizable data marker.addXPSequence(acc); } else if (seqCategory.equals(Constants.NM)) { // set bucketizable data marker.addNMSequence(acc); } else if (seqCategory.equals(Constants.NR)) { // set bucketizable data marker.addNRSequence(acc); } else if (seqCategory.equals(Constants.NP)) { // set bucketizable data marker.addNPSequence(acc); } else if (seqCategory.equals(Constants.NG)) { // set bucketizable data marker.addNGSequence(acc); } else if (seqCategory.equals(Constants.NT)) { // set bucketizable data marker.addNTSequence(acc); } else if (seqCategory.equals(Constants.NW)) { // set bucketizable data marker.addNWSequence(acc); } else if (seqCategory.equals(Constants.MGIID)) { // set bucketizable data marker.addMGIID(acc); } } } catch (CacheException e) { DBExceptionFactory eFactory = new DBExceptionFactory(); DBException e2 = (DBException) eFactory.getException(DBExceptionFactory.ConfigErr, e); throw e2; } return marker; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public BaseStoreGrnM (java.lang.Integer id) {\n\t\tthis.setId(id);\n\t\tinitialize();\n\t}", "public void setBucketID(long param){\n localBucketIDTracker = true;\n \n this.localBucketID=param;\n ...
[ "0.5367176", "0.5286606", "0.5258712", "0.5217762", "0.5201397", "0.5186327", "0.5183147", "0.5162598", "0.50598264", "0.5032675", "0.4965666", "0.49633187", "0.49598506", "0.49389637", "0.49287075", "0.48697168", "0.48601496", "0.48180187", "0.48061123", "0.47818285", "0.477...
0.5747298
0
first touch event that is called is onDown() before all others, if return false all other listener methods get ignored returning true tells the system that the method will handle the event, otherwise it gets passed down the View hierarchy
public boolean onDown(MotionEvent e) { return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic boolean onDown(MotionEvent arg0) {\n\t\treturn false; // was false\n\t}", "@Override\n public boolean onDown(MotionEvent arg0) {\n return false;\n }", "@Override\n\t\tpublic boolean onDown(MotionEvent e) {\n\t\t\treturn false;\n\t\t}", "@Override //abstract method...
[ "0.79503226", "0.7829187", "0.781155", "0.7810086", "0.7786219", "0.7764537", "0.7762168", "0.7762168", "0.7739921", "0.7739921", "0.7739921", "0.7719159", "0.7711689", "0.7711689", "0.7711689", "0.7711689", "0.7711689", "0.7711689", "0.7711689", "0.7711689", "0.7711689", "...
0.78909814
1
onSingleTapConfirmed makes sure its just a single tap, not followed by a double tap.
public boolean onSingleTapConfirmed(MotionEvent e) { hideSystemUI(); return super.onSingleTapConfirmed(e); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean onSingleTapConfirmed(MotionEvent e) {\n return true;\n }", "@Override\n\tpublic boolean onSingleTapConfirmed(MotionEvent e) {\n\t\treturn false;\n\t}", "@Override\r\n\tpublic boolean onSingleTapConfirmed(MotionEvent e) {\n\t\treturn false;\r\n\t}", "@Overri...
[ "0.7309933", "0.7054076", "0.70464826", "0.69695866", "0.68704855", "0.6751113", "0.5998742", "0.5618855", "0.55036575", "0.53860724", "0.5328654", "0.51601905", "0.51128197", "0.5110579", "0.51069784", "0.50650245", "0.502466", "0.4974216", "0.49435872", "0.4943492", "0.4925...
0.66214764
6
onResume() is called whenever the app regains focus
protected void onResume(){ super.onResume(); hideSystemUI(); if (!coreView.isGamePaused()) //only resume game if there wasn't a manual pause prior to losing focus coreView.resume(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void onResume();", "public void onResume() {\n }", "void onResume();", "public void onResume() {\n super.onResume();\n }", "public void onResume() {\n super.onResume();\n }", "@Override\n public void onResume() {\n }", "@Override\r\n\tpublic v...
[ "0.85155416", "0.84582466", "0.84305626", "0.8205287", "0.8205287", "0.8140441", "0.8118674", "0.8118674", "0.8118674", "0.8118674", "0.8089513", "0.80394274", "0.80394274", "0.7995657", "0.7995657", "0.7995657", "0.79886484", "0.7984463", "0.79769444", "0.796233", "0.796233"...
0.0
-1
onPause() is called whenever the app loses focus (e.g. user interacts with the navigation bar or status bar, a dialog box pops up) any heavy saving should be done in onStop() (app is hidden), not onPause().
protected void onPause(){ super.onPause(); showSystemUI(); if (coreView.isRunning()) coreView.pause(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tprotected void onPause() {\n\t\t// TODO Auto-generated method stub\n\t\tsuper.onPause();\n\n\t\tsavePreferences();\n\t}", "@Override\n public void onPause() {\n AppEventsLogger.deactivateApp(this);\n isResumed = false;\n\n super.onPause();\n uiHelper.onPause();\n }"...
[ "0.8314643", "0.82946545", "0.8288962", "0.8267997", "0.8203349", "0.8198659", "0.81781334", "0.81447405", "0.811065", "0.811065", "0.811065", "0.811065", "0.811065", "0.811062", "0.8107465", "0.8107465", "0.8107465", "0.8093331", "0.8093331", "0.8093331", "0.8093331", "0.8...
0.0
-1
1) Llamamos a la otra actividad pasando un texto para editar
public void editTitle(View view) { Intent intent = new Intent(this, EditActivity.class); intent.putExtra("text", title); startActivityForResult(intent, EDIT_TITLE);//CTRL+ALT+C per canviar de 0 a una variable }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void edit() {\n\n\t}", "public String editar()\r\n/* 59: */ {\r\n/* 60: 74 */ if ((getMotivoLlamadoAtencion() != null) && (getMotivoLlamadoAtencion().getIdMotivoLlamadoAtencion() != 0)) {\r\n/* 61: 75 */ setEditado(true);\r\n/* 62: */ } else {\r\n/* 63: 77 */ addInfoMessa...
[ "0.75013167", "0.71682155", "0.70332134", "0.69384384", "0.69106907", "0.6886121", "0.66932094", "0.66799295", "0.66681623", "0.6651884", "0.6630578", "0.6601991", "0.65969235", "0.6558146", "0.65525275", "0.65299517", "0.6469202", "0.64123464", "0.64104253", "0.6394982", "0....
0.6375348
21
1) Llamamos a la otra actividad pasando un texto para editar
public void editDoc(View view) { Intent intent = new Intent(this, EditActivity.class); intent.putExtra("text", doc); startActivityForResult(intent, EDIT_DOC);//CTRL+ALT+C per canviar de 0 a una variable }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void edit() {\n\n\t}", "public String editar()\r\n/* 59: */ {\r\n/* 60: 74 */ if ((getMotivoLlamadoAtencion() != null) && (getMotivoLlamadoAtencion().getIdMotivoLlamadoAtencion() != 0)) {\r\n/* 61: 75 */ setEditado(true);\r\n/* 62: */ } else {\r\n/* 63: 77 */ addInfoMessa...
[ "0.75013167", "0.71682155", "0.70332134", "0.69384384", "0.69106907", "0.6886121", "0.66932094", "0.66799295", "0.66681623", "0.6651884", "0.6630578", "0.6601991", "0.65969235", "0.6558146", "0.65525275", "0.65299517", "0.6469202", "0.64123464", "0.64104253", "0.6394982", "0....
0.6087506
60
Interface of Data Object, which contains info from request and respond, necessary for controller and view
public interface PageParameters { String getStringParameter(String param); int getIntParameter(String param); HttpServletRequest getRequest(); HttpServletResponse getResponse(); String getMode(); int getItemsPerPage(); int getPageNumber(); int getParentId(); String getEditMode(); int getEditId(); PrintWriter getOut(); ItemType getEditItemType(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface Data {\n\n String getRequest();\n\n}", "public T getRequestData();", "public interface DataView extends View\n{\n //Returns the status of the response\n //True: successful\n //False: failed\n public boolean getResponseStatus();\n \n //Returns the response message\n publ...
[ "0.71608377", "0.6979711", "0.6674983", "0.64887714", "0.6410555", "0.6327563", "0.6327563", "0.6234516", "0.6189397", "0.6159773", "0.6140498", "0.6136001", "0.6047087", "0.5988151", "0.5948664", "0.59190685", "0.59085643", "0.5893193", "0.5892861", "0.58912945", "0.5860049"...
0.0
-1
private static Logger logger = Appctx.getLogger(GatherRDS.class.getName());
private void gather(final Session s) throws Exception { //final MeasureHandler mHandler = Appctx.getBean("measurehandler"); //final List<CacheClusterBean> cache = s.createQuery( // "from CacheClusterBean").list(); //for (final CacheClusterBean cluster : cache) { // if (!cluster.getLbStatus().endsWith("ready")) { // logger.debug("Ignoring AC " + cluster.getUserId() + " LB " // + cluster.getLoadBalancerName() + " Status " // + cluster.getLbStatus()); // continue; // } // final long acid = cluster.getAccount().getId(); // logger.debug("Gather AC " + acid + " Cluster " + // cluster.getName()); // final AccountBean acb = cluster.getAccount(); // final AccountType ac = AccountUtil.toAccount(acb); // // final DimensionBean dim = CWUtil.getDimensionBean(s, acb.getId(), // "CacheClusterId", cluster.getName(), true); // final Set<DimensionBean> dims = new HashSet<DimensionBean>(); // dims.add(dim); // BinLogDiskUsage Bytes // CPUUtilization Percent // DatabaseConnections Count // FreeableMemory Bytes // FreeStorageSpace Bytes // ReplicaLag Seconds // SwapUsage Bytes // ReadIOPS Count/Second // WriteIOPS Count/Second // ReadLatency Seconds // WriteLatency Seconds // ReadThroughput Bytes/Second // WriteThroughput Bytes/Second //} }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void logs() {\n \n }", "private DAOLogger() {\n\t}", "LogRecorder getLogRecorder();", "LogRecorder getLogRecorder();", "private void initLogger(BundleContext bc) {\n\t\tBasicConfigurator.configure();\r\n\t\tlogger = Logger.getLogger(Activator.class);\r\n\t\tLogger.getLogger(\"org.di...
[ "0.59490573", "0.58463913", "0.56806624", "0.56806624", "0.56717324", "0.5663714", "0.56099796", "0.5575531", "0.55568635", "0.55228555", "0.5490015", "0.5481035", "0.54687965", "0.5449245", "0.5443038", "0.5391712", "0.53860193", "0.53792393", "0.5367076", "0.5354926", "0.53...
0.0
-1
Metoda koja preuzima postavku OpenSkyNetwork.lozinka iz konfiguracijske datoteke
public String preuzmiPassword() { return konfiguracija.dajPostavku("OpenSkyNetwork.lozinka"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void poczatkowe_zmienne()\n {\n konfiguracja.loadProperties();\n predkosc_wroga=Integer.parseInt(konfiguracja.properties.getProperty(\"predkosc_wroga\"));\n czas_watku=Integer.parseInt(konfiguracja.properties.getProperty(\"czas_watku\"));\n punkty_poziomu=Integer.parseInt(kon...
[ "0.5290771", "0.52010334", "0.51491934", "0.51038146", "0.51016676", "0.5032046", "0.5008936", "0.49810347", "0.49703732", "0.4970352", "0.49618396", "0.49003077", "0.4878204", "0.4861584", "0.48430493", "0.48271602", "0.48145393", "0.48046696", "0.48024938", "0.47984338", "0...
0.5811314
0
Display a dialog with an edit text box. The user can enter their email and receive instructions in that email on how to recover their password. The email used must be the same email used to register.
public void forgotPassword() { new MaterialDialog.Builder(activity) .title(R.string.dialog_forgot_password_title) .content(R.string.dialog_forgot_password_content) .inputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_EMAIL_ADDRESS) .theme(Theme.LIGHT) .positiveText(R.string.dialog_forgot_password_positive_button) .negativeText(R.string.dialog_forgot_password_negative_button) .widgetColorRes(R.color.colorPrimary) .positiveColorRes(R.color.colorPrimary) .negativeColorRes(R.color.colorPrimary) .autoDismiss(false) .cancelable(false) .onAny(new MaterialDialog.SingleButtonCallback() { @Override public void onClick(@NonNull MaterialDialog dialog, @NonNull DialogAction which) { if(which == DialogAction.POSITIVE) { try { //Check if the email is valid. String email = dialog.getInputEditText().getText().toString(); if(!Patterns.EMAIL_ADDRESS.matcher(email).matches()) { //TODO send recovery instructions to reset password. dialog.dismiss(); } else { dialog.getInputEditText().setText(""); dialog.getInputEditText().setError( activity.getResources().getString (R.string.dialog_forgot_password_invalid_email)); } } catch(NullPointerException ex) { ex.printStackTrace(); dialog.dismiss(); } } else if(which == DialogAction.NEGATIVE) { dialog.dismiss(); } } }) .input(R.string.dialog_edit_text_forgot_password_hint, R.string.dialog_edit_text_forgot_password_prefill, new MaterialDialog.InputCallback() { @Override public void onInput(@NonNull MaterialDialog dialog, CharSequence input) { } }).show(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void showChangeEmailDialog() {\n if(dialog != null && dialog.isShowing()) return;\n\n LayoutInflater inflater = LayoutInflater.from(this);\n View view = inflater.inflate(R.layout.dialog_change_email, null);\n\n // The dialog that will appear\n AlertDialog.Builder builder ...
[ "0.72698617", "0.7172786", "0.7079762", "0.69807374", "0.6615299", "0.6548841", "0.65099674", "0.64980114", "0.64504874", "0.6436932", "0.6428253", "0.63865083", "0.63346684", "0.630553", "0.6291072", "0.62810004", "0.6264767", "0.6259568", "0.6256068", "0.62500596", "0.62223...
0.6738759
4
Method to get the web driver instance.
public WebDriver getWebDriver() { String driverName = getProperty("driver"); if (driverName.equals("firefox")) { driver = new FirefoxDriver(); } else if (driverName.equals("chrome")) { System.setProperty("webdriver.chrome.driver", "src\\main\\resources\\binaries\\chromedriver.exe"); driver = new ChromeDriver(); } return driver; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public WebDriver getDriver() {\n\t\tSystem.out.println(\"Inside DriverFactory.getDriver\");\n\t\tif (webDriver == null) {\n\t\t\twebDriver = launchDriver();\n\t\t}\n\t\treturn webDriver;\n\t}", "public WebDriver getWebdriver() {\n return driver.get();\n }", "public static WebDriver getDriver() {\n ...
[ "0.83622444", "0.831062", "0.826181", "0.8064571", "0.80283916", "0.80000824", "0.7965836", "0.7880296", "0.78595513", "0.78064394", "0.77831113", "0.7769205", "0.77657133", "0.7673166", "0.7673166", "0.76226366", "0.76017475", "0.756391", "0.75323963", "0.74994534", "0.74791...
0.783434
9
Method to get the properties value.
public String getProperty(String propertyName) { Properties properties = new Properties(); FileReader fileReader; try { fileReader = new FileReader(new File("src\\main\\resources\\default.properties")); properties.load(fileReader); } catch (Exception e) { e.printStackTrace(); } String value = properties.getProperty(propertyName); return value; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getProperty();", "java.lang.String getProperty();", "String getProperty();", "String getProperty();", "String getProperty();", "private String getPropertyValue() {\n return EmfPropertyHelper.getValue(itemPropertyDescriptor, eObject);\n }", "Property getProperty();", "P...
[ "0.7730787", "0.76492935", "0.7645827", "0.7645827", "0.7645827", "0.7615028", "0.7546338", "0.7546338", "0.75217324", "0.73181313", "0.7244739", "0.723052", "0.7178366", "0.71760416", "0.70534265", "0.6989808", "0.69461954", "0.6935586", "0.6933752", "0.6927686", "0.69060606...
0.0
-1
Method to log with message.
public void log(String message) { logger.info(message); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void log(Message message);", "public void log(String message) {\n\t}", "@Override\n public void log(String message) {\n }", "@Override\r\n\tprotected void logMessage(String message) {\n\t\t\r\n\t}", "public void log(String msg) {\n\n\t}", "void log(String message) {\n System....
[ "0.8298338", "0.8293636", "0.8263618", "0.7991101", "0.7916075", "0.77613705", "0.77019405", "0.76755935", "0.76727134", "0.76674277", "0.761649", "0.7579003", "0.7575794", "0.7553569", "0.75488204", "0.75371486", "0.7535349", "0.7503623", "0.74894977", "0.74800885", "0.74640...
0.73385376
25
If string is more than 10 chars ERROR
public static void main(String[] args) { Scanner scan = new Scanner(System.in); // Declare the maximum length final int maxLength = 10; // Input string System.out.println("Please, enter the word: "); String word = scan.nextLine(); // Declare length of the word int stringLength = word.length(); // Condition "Ternary' String result = (stringLength > maxLength) ? "ERROR! Wrong length of the word!" : "Great job, the length of your word is " + stringLength; System.out.println(result); // Condition "if...else" /* if (stringLength > max) { System.out.println("ERROR! Wrong length of the word!"); } else { System.out.println("Great job, the length of your word is " + stringLength); }*/ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private boolean isValidInput(String input) \r\n {\r\n\t \r\n return input!=null&&input.length()<=10;\r\n \r\n }", "private static String testString(String str, int minLen, int maxLen) throws Exception {\n if (str.length() > maxLen || str.length() < minLen) {\n throw new Exce...
[ "0.7303226", "0.65640897", "0.6530132", "0.648764", "0.64801645", "0.6361945", "0.63610214", "0.63510734", "0.63218045", "0.6282103", "0.6267675", "0.62654775", "0.62237006", "0.6152451", "0.6082005", "0.6078566", "0.60764545", "0.6040444", "0.6040444", "0.6029708", "0.601236...
0.572152
48
Initialize panel for the deck
private void initPanelDeck() { gsp.panelDeck = gsp.createPanel(100, 50, 50, 50, 0, 0, 400, 350); gsp.buttonDeck = new JButton(); gsp.setImageIcon("Deck", gsp.buttonDeck); gsp.labelLastCard = new JLabel(); gsp.updateLastCardView(); gsp.panelDeck.add(gsp.buttonDeck); gsp.panelDeck.add(gsp.labelLastCard); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void initDecks() {\n\t\tDeck[] decks = new Deck[2];\n\t\tdecks[0] = charDeck;\n\t\tdecks[1] = mainDeck;\n\n\t\tfor (int i = 0; i < decks.length; i++) {\n\t\t\tDeck d = decks[i];\n\t\t\td.setNrOfShownCards(d.getDeckSize());\n\t\t\td.setShownLines(showLines);\n\t\t\td.setLineLength(lineLength);\n\t\t\td.setH...
[ "0.719594", "0.7115909", "0.6981892", "0.6690193", "0.65887696", "0.6584487", "0.6576372", "0.65454036", "0.6539031", "0.6537882", "0.6525106", "0.65222245", "0.6518992", "0.6484119", "0.6473679", "0.6471748", "0.6470181", "0.64628476", "0.6443131", "0.6400156", "0.63925785",...
0.8333881
0
Create a measures recorder
public MeasuresRecorder(String modelName) { super(modelName); currentNanoTime = () -> timeCount; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testCreateScalableQuantizedRecorder() throws IOException, InterruptedException {\n System.out.println(\"createScalableQuantizedRecorder\");\n Object forWhat = \"test1\";\n String unitOfMeasurement = \"ms\";\n int sampleTime = 1000;\n int factor = 10;\n ...
[ "0.6406693", "0.61660236", "0.5893239", "0.58233476", "0.56421804", "0.55912757", "0.5450963", "0.5398722", "0.5398722", "0.5258127", "0.5251686", "0.5250958", "0.5247362", "0.52278805", "0.5227065", "0.5181059", "0.51592326", "0.51582366", "0.5155466", "0.51431876", "0.50841...
0.59536976
2
Start the stopwatch, to compute resolution time
public void startStopwatch() { startingTime = System.nanoTime(); currentNanoTime = () -> System.nanoTime() - startingTime; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void startTiming() {\n m_startTime = Calendar.getInstance().getTimeInMillis();\n }", "public void startTiming() {\n elapsedTime = 0;\n startTime = System.currentTimeMillis();\n }", "public void start(){\n\n stopWatchStartTimeNanoSecs = magicBean.getCurrentThreadCpuTime();\n...
[ "0.7530829", "0.74987906", "0.7429096", "0.72097605", "0.708629", "0.70358175", "0.70044726", "0.6939778", "0.67906183", "0.6716604", "0.6616879", "0.6601685", "0.6595694", "0.64617234", "0.63986164", "0.63814974", "0.6368116", "0.63566566", "0.6342598", "0.6338017", "0.63322...
0.7917915
0
Stop the stopwatch, the resolution time is fixed.
public void stopStopwatch() { timeCount = currentNanoTime.getAsLong(); currentNanoTime = () -> timeCount; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "TimeInstrument stop();", "public double getStopTime();", "private void stopTime()\n {\n timer.stop();\n }", "public void startStopwatch() {\n startingTime = System.nanoTime();\n currentNanoTime = () -> System.nanoTime() - startingTime;\n }", "public void stop(){\n\t\tthis.timer.st...
[ "0.6862102", "0.6846363", "0.677509", "0.6618924", "0.66057813", "0.65813947", "0.6554443", "0.65117437", "0.64412624", "0.63768953", "0.63549227", "0.631824", "0.63142484", "0.62955266", "0.6290528", "0.6284718", "0.62262374", "0.61774564", "0.6163874", "0.61127365", "0.6101...
0.73002553
0
// SETTERS // // indicates whether or not the optimum has been found and proved
public final void setObjectiveOptimal(boolean objectiveOptimal) { this.objectiveOptimal = objectiveOptimal; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean optimal() {\n\t\treturn optimal;\n\t}", "void setBestScore(double bestScore);", "public void useNormalVarimax(){\n this. varimaxOption = true;\n }", "public void setBestflag(Boolean bestflag) {\n this.bestflag = bestflag;\n }", "@Override\n\tpublic double getFinalBestTarg...
[ "0.72625905", "0.6952437", "0.68212485", "0.66443896", "0.64388204", "0.6429592", "0.640956", "0.64036924", "0.63240373", "0.62778276", "0.62296873", "0.62058383", "0.61300004", "0.61147934", "0.61113083", "0.61049074", "0.61007696", "0.60574347", "0.60285556", "0.6016987", "...
0.6278299
9
Reset every measure to its default value (mostly 0)
public void reset() { state = SearchState.NEW; objectiveOptimal = false; solutionCount = 0; timeCount = 0; stopStopwatch(); nodeCount = 0; backtrackCount = 0; failCount = 0; restartCount = 0; depth = 0; maxDepth = 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void reset() {\n this.count = 0;\n this.average = 0.0;\n }", "public void reset(){\n value = 0;\n }", "public void clear() {\n\t\tsample.clear();\n\t\tcount.set(0);\n\t\t_max.set(Long.MIN_VALUE);\n\t\t_min.set(Long.MAX_VALUE);\n\t\t_sum.set(0);\n\t\tvarianceM.set(-1);\n\t\tvar...
[ "0.74109083", "0.7355615", "0.7297729", "0.7166485", "0.7120414", "0.71105325", "0.7089829", "0.7070757", "0.7047723", "0.7036717", "0.70267314", "0.70260215", "0.70162404", "0.6988081", "0.69698656", "0.6929149", "0.6925678", "0.6918592", "0.69074494", "0.68974185", "0.68920...
0.0
-1
// INCREMENTERS // // increment node counter
public final void incNodeCount() { nodeCount++; if (depth > maxDepth) { maxDepth = depth; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void incrementCounter()\r\n\t{\r\n\t\tthis.counter++;\r\n\t}", "private void increase(String[] arguments) {\n\t\ttry { \n\t\t\tlastInsertedNode = null;\n\t\t\tint ID = Integer.parseInt(arguments[1]);\n\t int m = Integer.parseInt(arguments[2]);\n\t Node curr = searchID(root, ID);\n\t ...
[ "0.69665724", "0.6900605", "0.6862807", "0.6856345", "0.6847369", "0.6826346", "0.6747851", "0.6744195", "0.66414464", "0.66271424", "0.6625504", "0.6623298", "0.65871894", "0.65085447", "0.6506339", "0.64673835", "0.64673835", "0.6433586", "0.64303786", "0.63706964", "0.6344...
0.69161624
1
Update the current search state
public final void setSearchState(SearchState state) { Objects.requireNonNull(state); this.state = state; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void stateStored (Search search);", "void stateProcessed (Search search);", "void stateBacktracked (Search search);", "public void setNewSearch(String query){\n isNewSearch = true;\n this.query = query;\n }", "void stateRestored (Search search);", "@Override\n public void onSe...
[ "0.7358287", "0.70950925", "0.7090777", "0.6755598", "0.6540821", "0.65261036", "0.6417136", "0.6395046", "0.6392258", "0.6391291", "0.6355787", "0.6348667", "0.6312953", "0.6301612", "0.62922287", "0.62735707", "0.61910236", "0.6188876", "0.6187014", "0.61704767", "0.6168571...
0.6456402
6
Update the bounds managed
public final void setBoundsManager(IBoundsManager boundsManager) { Objects.requireNonNull(boundsManager); this.boundsManager = boundsManager; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void updateBounds() {\n this.setBounds(left, top, width, height);\n }", "public void updateBounds() {\n\t\tswitch (this.species){\n\t\tcase HOGCHOKER:\n\t\tcase SILVERSIDE:\n\t\tcase FLOUNDER:\n\t\t\tthis.topYBound = frameHeight / 3 * 2;\n\t\t\tthis.bottomYBound = frameHeight - imageHeight - fra...
[ "0.7865881", "0.7312695", "0.7298875", "0.7229843", "0.70382565", "0.70022863", "0.69610065", "0.69493747", "0.69141257", "0.6869181", "0.6828966", "0.6828488", "0.6811284", "0.6806402", "0.678252", "0.6752359", "0.67458767", "0.66918695", "0.66810274", "0.66757125", "0.66421...
0.0
-1
Created by linchen on 2018/5/28.
public interface ILifeCycle { <T> LifecycleTransformer<T> doBindToLifecycle(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "private stendhal() {\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n...
[ "0.5913988", "0.58691734", "0.5649032", "0.5633743", "0.5596107", "0.5596107", "0.5566582", "0.5534769", "0.5514833", "0.5503615", "0.5502001", "0.5486427", "0.5467284", "0.54659927", "0.54577184", "0.5452355", "0.54513866", "0.5435238", "0.5432725", "0.5426471", "0.5426471",...
0.0
-1
Create an instance of the Compressor $
public Compressor(int pcmId) { initCompressor(pcmId); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Compressor() {\n initCompressor(getDefaultSolenoidModule());\n }", "private CompressionTools() {}", "public CompressorSubsystem() {\r\n compressor = new Compressor(RobotMap.compressorPressureSwitch, RobotMap.compressorRelay);\r\n }", "private ZipCompressor(){}", "public static void Ini...
[ "0.7333566", "0.7134722", "0.70850956", "0.7052238", "0.6963953", "0.66428775", "0.6287318", "0.59566784", "0.57009774", "0.5618034", "0.5596793", "0.55873555", "0.5489171", "0.54784137", "0.54024106", "0.5399106", "0.5299235", "0.52781814", "0.52671504", "0.52648413", "0.522...
0.5665222
9
Create an instance of the Compressor Makes a new instance of the compressor using the default PCM ID (0). Additional modules can be supported by making a new instance and specifying the CAN ID
public Compressor() { initCompressor(getDefaultSolenoidModule()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Compressor(int pcmId) {\n initCompressor(pcmId);\n }", "public CompressorSubsystem() {\r\n compressor = new Compressor(RobotMap.compressorPressureSwitch, RobotMap.compressorRelay);\r\n }", "public RobotCompressor(){\n \n robotCompressor = new Compressor(RobotMap.PRESSURE_SWIT...
[ "0.7432922", "0.61833334", "0.5828358", "0.5600227", "0.55877185", "0.55343676", "0.534172", "0.53306025", "0.53096575", "0.52967846", "0.521635", "0.51869947", "0.51775753", "0.5173509", "0.5143683", "0.51239836", "0.5114248", "0.5096522", "0.50540423", "0.5045242", "0.50431...
0.643832
1
Start the compressor running in closed loop control mode Use the method in cases where you would like to manually stop and start the compressor for applications such as conserving battery or making sure that the compressor motor doesn't start during critical operations.
public void start() { setClosedLoopControl(true); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void Compressor_on(){\n\t\tC.setClosedLoopControl(true);\n\t\t\n\t}", "public void run() {\r\n\t\twhile(true) {\r\n\t\t\twhile(base.isEnabled()){\r\n\t\t\t\tif(pressureSwitch.get() == false){\r\n\t\t\t\t\tcompressor.set(Value.kOn);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tcompressor.set(Value.kOff);\r\n\t\t\t\t}\r\...
[ "0.68762064", "0.65492314", "0.620234", "0.61191136", "0.5877958", "0.58463377", "0.5751342", "0.5595296", "0.55283034", "0.55122536", "0.53703", "0.53480124", "0.5327063", "0.5325559", "0.5305734", "0.5242346", "0.5233142", "0.5231488", "0.5225606", "0.52184474", "0.5216", ...
0.6707797
1
Stop the compressor from running in closed loop control mode. Use the method in cases where you would like to manually stop and start the compressor for applications such as conserving battery or making sure that the compressor motor doesn't start during critical operations.
public void stop() { setClosedLoopControl(false); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setClosedLoopControl(boolean on) {\n CompressorJNI.setClosedLoopControl(m_pcm, on);\n }", "public void stop() {\n\t\tmotor1.set( Constants.CLAW_MOTOR_STOPPED );\n\t\t}", "public void stop() {\n\t\tsetPower(Motor.STOP);\r\n\t}", "public void stop() {\n climberMotors.stopMotor();\n }"...
[ "0.64918715", "0.6389063", "0.6386534", "0.6351975", "0.6334977", "0.632835", "0.63151735", "0.6281271", "0.62584376", "0.62569726", "0.62160647", "0.6207863", "0.62067264", "0.62053984", "0.6191854", "0.6190788", "0.61902094", "0.6185486", "0.61673135", "0.60901034", "0.6074...
0.72974604
0
Get the enabled status of the compressor $
public boolean enabled() { return CompressorJNI.getCompressor(m_pcm); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean CompressorFlag(){\n\t\treturn (this.GetAverageTotalCurrent() < this.compressorCurrentLimit);\n\t}", "@Override\n public Switch compressorRunningSwitch() {\n return pcm::enabled;\n }", "public boolean isCompressionEnabled() {\r\n return compressionEnabled;\r\n }", "public boolean...
[ "0.6615243", "0.6574359", "0.63191134", "0.6192489", "0.61421394", "0.61314774", "0.6129826", "0.6038159", "0.6002501", "0.60010034", "0.59675765", "0.5941851", "0.5928591", "0.59265494", "0.5926169", "0.58664787", "0.5862387", "0.5860109", "0.58564925", "0.5853725", "0.58309...
0.7514181
0
Get the current pressure switch value $
public boolean getPressureSwitchValue() { return CompressorJNI.getPressureSwitch(m_pcm); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "double getPressure();", "@Override\r\n\tpublic double pidGet() {\r\n\t\t/*switch (m_pidSource.value) {\r\n\t\tcase 1://PIDSourceParameter.kRate_val:\r\n\t\t\treturn getRate();\r\n\t\tcase 2:// PIDSourceParameter.kAngle_val:\r\n\t\t\treturn getAngle();\r\n\t\tdefault:\r\n\t\t\treturn 0.0;\r\n\t\t}*/\r\n\t\treturn...
[ "0.67877346", "0.6579711", "0.6536204", "0.6532267", "0.6491825", "0.6432208", "0.64154536", "0.6394859", "0.6390639", "0.63673955", "0.6317899", "0.6188068", "0.6188068", "0.618451", "0.6155081", "0.6129559", "0.6106289", "0.60843146", "0.6049402", "0.6040123", "0.5957799", ...
0.6517222
4
Get the current being used by the compressor $
public float getCompressorCurrent() { return CompressorJNI.getCompressorCurrent(m_pcm); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public long getCurrent() {\n return current;\n }", "public long getLastUse() {\n\t\treturn _lastused;\n\t}", "@Override\r\n\tpublic long getCurrent() {\n\t\treturn 0;\r\n\t}", "public static final native int getCurrent();", "public long getCurrent() {\n m_Runtime = Runtime.getRuntime();\n m...
[ "0.64664173", "0.62755024", "0.6269102", "0.61610985", "0.6029992", "0.60237914", "0.6022704", "0.6014284", "0.5913336", "0.58656204", "0.5853205", "0.58514684", "0.58422834", "0.58084214", "0.57902366", "0.57892317", "0.5781209", "0.5736475", "0.5726277", "0.5719803", "0.570...
0.70722383
0
Set the PCM in closed loop control mode $
public void setClosedLoopControl(boolean on) { CompressorJNI.setClosedLoopControl(m_pcm, on); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void loop() {\n left.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n right.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n\n left.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n right.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n }", "@Override\n\t\tpublic...
[ "0.62887824", "0.5978402", "0.59493065", "0.5932306", "0.59262997", "0.5899128", "0.58938766", "0.5870235", "0.5804432", "0.57985073", "0.5781264", "0.57787097", "0.57536376", "0.57345974", "0.5658862", "0.56585747", "0.56581885", "0.56075025", "0.56018543", "0.5592246", "0.5...
0.71751976
0
Gets the current operating mode of the PCM $
public boolean getClosedLoopControl() { return CompressorJNI.getClosedLoopControl(m_pcm); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int getOperatingMode();", "public String getMode()\n {\n return mode.toString();\n }", "public IoMode getMode() {\r\n\t\treturn this.mode;\r\n\t}", "public short getMode() {\n\t\treturn mMode;\n\t}", "public int getAudioMode() {\n AudioManager audio = (AudioManager) mContext.getSystemService(Co...
[ "0.78431934", "0.7202916", "0.71847385", "0.7181503", "0.71189755", "0.71087176", "0.71008885", "0.70405763", "0.6999831", "0.6965857", "0.69567025", "0.69567025", "0.6942223", "0.68931526", "0.68929994", "0.689029", "0.6873074", "0.6831941", "0.679963", "0.67854583", "0.6777...
0.0
-1
Clear ALL sticky faults inside PCM that Compressor is wired to. If a sticky fault is set, then it will be persistently cleared. Compressor drive maybe momentarily disable while flags are being cleared. Care should be taken to not call this too frequently, otherwise normal compressor functionality may be prevented. If no sticky faults are set then this call will have no effect.
public void clearAllPCMStickyFaults() { CompressorJNI.clearAllPCMStickyFaults(m_pcm); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public HardwarePneumaticsControlModule clearStickyFaults() {\n pcm.clearAllPCMStickyFaults();\n return this;\n }", "public void clearForces() {\n rBody.clearForces();\n }", "public native void clear();", "private void clearResetCache() {\n for(IoBuffer buf : resetCache) {...
[ "0.7145654", "0.5484944", "0.5422286", "0.5421864", "0.5373896", "0.53620833", "0.5351066", "0.5350885", "0.5344269", "0.5344269", "0.53347087", "0.5317269", "0.53132766", "0.5313188", "0.53128326", "0.53048724", "0.5302681", "0.528996", "0.5287852", "0.5257865", "0.52473336"...
0.7880682
0
/ compiled from: set_notify_me_
public interface FeedDbRequest { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void onHisNotify();", "@Override\r\n public void notify(Object arg) {\n }", "protected void notifyUser()\n {\n }", "void notify(Message m);", "private void notifyStakeholder(){\n }", "private void notifyAutomatically(){\n System.out.println(\"Notificando automaticamente...\");\n ...
[ "0.731297", "0.71244586", "0.6950753", "0.6949004", "0.68988895", "0.68934965", "0.6887212", "0.685578", "0.68324", "0.67119557", "0.6662894", "0.6636267", "0.6628722", "0.6611136", "0.6542909", "0.6482596", "0.64540064", "0.6435201", "0.6430523", "0.6420065", "0.641738", "...
0.0
-1
/ JADX WARNING: inconsistent code. / Code decompiled incorrectly, please refer to instructions dump.
public static void m9105b(com.facebook.api.feedcache.db.FeedDbMutationService r5) { /* L_0x0000: r1 = r5.f5242q; monitor-enter(r1); r0 = r5.f5242q; Catch:{ all -> 0x004d } r0 = r0.isEmpty(); Catch:{ all -> 0x004d } if (r0 == 0) goto L_0x0010; L_0x000b: r0 = 0; r5.f5240o = r0; Catch:{ all -> 0x004d } monitor-exit(r1); Catch:{ all -> 0x004d } return; L_0x0010: r0 = r5.f5242q; Catch:{ all -> 0x004d } r0 = r0.removeFirst(); Catch:{ all -> 0x004d } r0 = (com.facebook.api.feedcache.db.FeedDbMutationService.FeedDbRequest) r0; Catch:{ all -> 0x004d } monitor-exit(r1); Catch:{ all -> 0x004d } r1 = "FeedDbMutationService(%s)"; r2 = r0.getClass(); r2 = r2.getSimpleName(); r3 = -341619410; // 0xffffffffeba34d2e float:-3.9483876E26 double:NaN; com.facebook.tools.dextr.runtime.detour.TracerDetour.a(r1, r2, r3); r1 = -243934633; // 0xfffffffff175da57 float:-1.21740455E30 double:NaN; r1 = com.facebook.tools.dextr.runtime.detour.LoomLoggerDetour.a(r1); r2 = "FeedDbMutationService"; r3 = r0.getClass(); r3 = r3.getSimpleName(); com.facebook.loom.logger.api.LoomLogger.a(r1, r2, r3); r1 = r0 instanceof com.facebook.api.feedcache.db.FeedDbMutationService.FeedDbInsertionRequest; Catch:{ all -> 0x0134 } if (r1 == 0) goto L_0x0050; L_0x0041: r0 = (com.facebook.api.feedcache.db.FeedDbMutationService.FeedDbInsertionRequest) r0; Catch:{ all -> 0x0134 } r5.m9111a(r0); Catch:{ all -> 0x0134 } r0 = 1514815075; // 0x5a4a3e63 float:1.42316351E16 double:7.484180884E-315; com.facebook.tools.dextr.runtime.detour.TracerDetour.a(r0); goto L_0x0000; L_0x004d: r0 = move-exception; monitor-exit(r1); Catch:{ } throw r0; L_0x0050: r1 = r0 instanceof com.facebook.api.feedcache.db.FeedDbMutationService.FeedDbMutationRequest; Catch:{ } if (r1 == 0) goto L_0x0060; L_0x0054: r0 = (com.facebook.api.feedcache.db.FeedDbMutationService.FeedDbMutationRequest) r0; Catch:{ } r5.m9100a(r0); Catch:{ } r0 = 32841027; // 0x1f51d43 float:9.0040775E-38 double:1.6225623E-316; com.facebook.tools.dextr.runtime.detour.TracerDetour.a(r0); goto L_0x0000; L_0x0060: r1 = r0 instanceof com.facebook.api.feedcache.db.FeedDbMutationService.FeedDbStorySeenRequest; Catch:{ } if (r1 == 0) goto L_0x0070; L_0x0064: r0 = (com.facebook.api.feedcache.db.FeedDbMutationService.FeedDbStorySeenRequest) r0; Catch:{ } r5.m9103a(r0); Catch:{ } r0 = -150761083; // 0xfffffffff7039185 float:-2.668525E33 double:NaN; com.facebook.tools.dextr.runtime.detour.TracerDetour.a(r0); goto L_0x0000; L_0x0070: r1 = r0 instanceof com.facebook.api.feedcache.db.FeedDbMutationService.FeedDbImageCacheStateUpdateRequest; Catch:{ } if (r1 == 0) goto L_0x0080; L_0x0074: r0 = (com.facebook.api.feedcache.db.FeedDbMutationService.FeedDbImageCacheStateUpdateRequest) r0; Catch:{ } r5.m9097a(r0); Catch:{ } r0 = -1582673432; // 0xffffffffa1aa51e8 float:-1.1541328E-18 double:NaN; com.facebook.tools.dextr.runtime.detour.TracerDetour.a(r0); goto L_0x0000; L_0x0080: r1 = r0 instanceof com.facebook.api.feedcache.db.FeedDbMutationService.FeedDbSeeFirstClearRequest; Catch:{ } if (r1 == 0) goto L_0x0091; L_0x0084: r0 = (com.facebook.api.feedcache.db.FeedDbMutationService.FeedDbSeeFirstClearRequest) r0; Catch:{ } r5.m9101a(r0); Catch:{ } r0 = -1051379810; // 0xffffffffc155379e float:-13.326078 double:NaN; com.facebook.tools.dextr.runtime.detour.TracerDetour.a(r0); goto L_0x0000; L_0x0091: r1 = r0 instanceof com.facebook.api.feedcache.db.FeedDbMutationService.FeedDbCacheResultRerankRequest; Catch:{ } if (r1 == 0) goto L_0x00a2; L_0x0095: r0 = (com.facebook.api.feedcache.db.FeedDbMutationService.FeedDbCacheResultRerankRequest) r0; Catch:{ } r5.m9094a(r0); Catch:{ } r0 = -521547659; // 0xffffffffe0e9d075 float:-1.3478476E20 double:NaN; com.facebook.tools.dextr.runtime.detour.TracerDetour.a(r0); goto L_0x0000; L_0x00a2: r1 = r0 instanceof com.facebook.api.feedcache.db.FeedDbMutationService.FeedDbCacheRerankRequest; Catch:{ } if (r1 == 0) goto L_0x00b3; L_0x00a6: r0 = (com.facebook.api.feedcache.db.FeedDbMutationService.FeedDbCacheRerankRequest) r0; Catch:{ } r5.m9093a(r0); Catch:{ } r0 = -495910365; // 0xffffffffe2710223 float:-1.1114548E21 double:NaN; com.facebook.tools.dextr.runtime.detour.TracerDetour.a(r0); goto L_0x0000; L_0x00b3: r1 = r0 instanceof com.facebook.api.feedcache.db.FeedDbMutationService.FeedDbStoryImageUrlAddRequest; Catch:{ } if (r1 == 0) goto L_0x00c4; L_0x00b7: r0 = (com.facebook.api.feedcache.db.FeedDbMutationService.FeedDbStoryImageUrlAddRequest) r0; Catch:{ } r5.m9102a(r0); Catch:{ } r0 = 1956524893; // 0x749e335d float:1.0027157E32 double:9.66651735E-315; com.facebook.tools.dextr.runtime.detour.TracerDetour.a(r0); goto L_0x0000; L_0x00c4: r1 = r0 instanceof com.facebook.api.feedcache.db.FeedDbMutationService.FeedDbDeleteStoriesRequest; Catch:{ } if (r1 == 0) goto L_0x00d5; L_0x00c8: r0 = (com.facebook.api.feedcache.db.FeedDbMutationService.FeedDbDeleteStoriesRequest) r0; Catch:{ } r5.m9095a(r0); Catch:{ } r0 = 1671584920; // 0x63a25c98 float:5.990089E21 double:8.25872683E-315; com.facebook.tools.dextr.runtime.detour.TracerDetour.a(r0); goto L_0x0000; L_0x00d5: r1 = r0 instanceof com.facebook.api.feedcache.db.FeedDbMutationService.FeedDbDeleteStoryRequest; Catch:{ } if (r1 == 0) goto L_0x00e6; L_0x00d9: r0 = (com.facebook.api.feedcache.db.FeedDbMutationService.FeedDbDeleteStoryRequest) r0; Catch:{ } r5.m9096a(r0); Catch:{ } r0 = -696100424; // 0xffffffffd68259b8 float:-7.1660925E13 double:NaN; com.facebook.tools.dextr.runtime.detour.TracerDetour.a(r0); goto L_0x0000; L_0x00e6: r1 = r0 instanceof com.facebook.api.feedcache.db.FeedDbMutationService.FeedDbVpvOmnistoreSyncRequest; Catch:{ } if (r1 == 0) goto L_0x00f5; L_0x00ea: r5.m9106c(); Catch:{ } r0 = -1045059660; // 0xffffffffc1b5a7b4 float:-22.706886 double:NaN; com.facebook.tools.dextr.runtime.detour.TracerDetour.a(r0); goto L_0x0000; L_0x00f5: r1 = r0 instanceof com.facebook.api.feedcache.db.FeedDbMutationService.FeedDbLikeAndCommentCountUpdateRequest; Catch:{ } if (r1 == 0) goto L_0x0106; L_0x00f9: r0 = (com.facebook.api.feedcache.db.FeedDbMutationService.FeedDbLikeAndCommentCountUpdateRequest) r0; Catch:{ } r5.m9098a(r0); Catch:{ } r0 = 759596755; // 0x2d4686d3 float:1.1284934E-11 double:3.752906613E-315; com.facebook.tools.dextr.runtime.detour.TracerDetour.a(r0); goto L_0x0000; L_0x0106: r1 = r0 instanceof com.facebook.api.feedcache.db.FeedDbMutationService.FeedDbLiveVideoStatusUpdateRequest; Catch:{ } if (r1 == 0) goto L_0x0117; L_0x010a: r0 = (com.facebook.api.feedcache.db.FeedDbMutationService.FeedDbLiveVideoStatusUpdateRequest) r0; Catch:{ } r5.m9099a(r0); Catch:{ } r0 = -1270711073; // 0xffffffffb4427cdf float:-1.8113086E-7 double:NaN; com.facebook.tools.dextr.runtime.detour.TracerDetour.a(r0); goto L_0x0000; L_0x0117: r1 = "FeedDbMutationService"; r2 = "Mutation request is not supported: %s"; r3 = 1; r3 = new java.lang.Object[r3]; Catch:{ } r4 = 0; r0 = r0.getClass(); Catch:{ } r0 = r0.getSimpleName(); Catch:{ } r3[r4] = r0; Catch:{ } com.facebook.debug.log.BLog.c(r1, r2, r3); Catch:{ } r0 = 492192568; // 0x1d564338 float:2.8357415E-21 double:2.43175439E-315; com.facebook.tools.dextr.runtime.detour.TracerDetour.a(r0); goto L_0x0000; L_0x0134: r0 = move-exception; r1 = -693974918; // 0xffffffffd6a2c87a float:-8.9490962E13 double:NaN; com.facebook.tools.dextr.runtime.detour.TracerDetour.a(r1); throw r0; */ throw new UnsupportedOperationException("Method not decompiled: com.facebook.api.feedcache.db.FeedDbMutationService.b(com.facebook.api.feedcache.db.FeedDbMutationService):void"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void method_2241() {\r\n // $FF: Couldn't be decompiled\r\n }", "private void method_7083() {\r\n // $FF: Couldn't be decompiled\r\n }", "protected void method_2145() {\r\n // $FF: Couldn't be decompiled\r\n }", "protected void method_2247() {\r\n // $FF: Couldn't be decom...
[ "0.7616353", "0.7572131", "0.75251985", "0.74502295", "0.74494404", "0.7436729", "0.738065", "0.738065", "0.7365641", "0.73525214", "0.73411334", "0.7314028", "0.7307766", "0.7304578", "0.7273524", "0.7251268", "0.72207904", "0.71969974", "0.7176537", "0.7135733", "0.710486",...
0.0
-1
/ JADX WARNING: inconsistent code. / Code decompiled incorrectly, please refer to instructions dump.
public final void m9111a(com.facebook.api.feedcache.db.FeedDbMutationService.FeedDbInsertionRequest r4) { /* r3 = this; r0 = "FeedDbMutationService.processInsert"; r1 = 1073032506; // 0x3ff52d3a float:1.9154427 double:5.30148498E-315; com.facebook.tools.dextr.runtime.detour.TracerDetour.a(r0, r1); r0 = r3.f5229d; Catch:{ Exception -> 0x0039 } r1 = r4.f16266a; Catch:{ Exception -> 0x0039 } r0.m9176c(r1); Catch:{ Exception -> 0x0039 } r0 = r3.m9108e(); Catch:{ Exception -> 0x0039 } if (r0 == 0) goto L_0x0025; L_0x0015: r0 = r3.f5231f; Catch:{ Exception -> 0x0039 } r0 = r0.get(); Catch:{ Exception -> 0x0039 } r0 = (com.facebook.api.feedcache.omnistore.FeedUnitUpdateHandler) r0; Catch:{ Exception -> 0x0039 } r1 = r4.f16266a; Catch:{ Exception -> 0x0039 } r0.a(r1); Catch:{ Exception -> 0x0039 } r3.m9107d(); Catch:{ Exception -> 0x0039 } L_0x0025: r0 = r3.m9110g(); Catch:{ Exception -> 0x0039 } if (r0 == 0) goto L_0x0032; L_0x002b: r0 = r3.f5238m; Catch:{ Exception -> 0x0039 } r1 = r4.f16266a; Catch:{ Exception -> 0x0039 } r0.m9382a(r1, r3); Catch:{ Exception -> 0x0039 } L_0x0032: r0 = -1434301058; // 0xffffffffaa824d7e float:-2.314641E-13 double:NaN; com.facebook.tools.dextr.runtime.detour.TracerDetour.a(r0); L_0x0038: return; L_0x0039: r0 = move-exception; r1 = "FeedDbMutationService"; r2 = "Error performing insertion on feed"; com.facebook.debug.log.BLog.b(r1, r2, r0); Catch:{ all -> 0x0048 } r0 = -816361482; // 0xffffffffcf574ff6 float:-3.61234176E9 double:NaN; com.facebook.tools.dextr.runtime.detour.TracerDetour.a(r0); goto L_0x0038; L_0x0048: r0 = move-exception; r1 = -601875320; // 0xffffffffdc201c88 float:-1.80269467E17 double:NaN; com.facebook.tools.dextr.runtime.detour.TracerDetour.a(r1); throw r0; */ throw new UnsupportedOperationException("Method not decompiled: com.facebook.api.feedcache.db.FeedDbMutationService.a(com.facebook.api.feedcache.db.FeedDbMutationService$FeedDbInsertionRequest):void"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void method_2241() {\r\n // $FF: Couldn't be decompiled\r\n }", "private void method_7083() {\r\n // $FF: Couldn't be decompiled\r\n }", "protected void method_2145() {\r\n // $FF: Couldn't be decompiled\r\n }", "protected void method_2247() {\r\n // $FF: Couldn't be decom...
[ "0.7616353", "0.7572131", "0.75251985", "0.74502295", "0.74494404", "0.7436729", "0.738065", "0.738065", "0.7365641", "0.73525214", "0.73411334", "0.7314028", "0.7307766", "0.7304578", "0.7273524", "0.7251268", "0.72207904", "0.71969974", "0.7176537", "0.7135733", "0.710486",...
0.0
-1
Method to add a new doctor user
public static void adder(DoctorInformation NewUser) { int hola = 0; for (int i = 0; i < doctorsList.size(); i++) { String useremail = NewUser.getEmail(); if (useremail.equals(doctorsList.get(i).getEmail())) { if (NewUser.getPassword().equals(doctorsList.get(i).getPassword())) { doctorsList.set(i, NewUser); hola = 1; } } } if (hola == 0) { doctorsList.add(NewUser); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addUser(User user) {\n\t\t\r\n\t}", "public void addUser(User user);", "void addUser(User user);", "void addUser(User user);", "boolean addUser(int employeeId, String name, String password, String role);", "public void addUser(Customer user) {}", "public void addUser(UserModel user);", "v...
[ "0.68773425", "0.6836963", "0.68215764", "0.68215764", "0.6677276", "0.6641736", "0.6619928", "0.6565915", "0.6556858", "0.6455996", "0.6451921", "0.64460903", "0.64336634", "0.6432906", "0.6429713", "0.6429376", "0.6416519", "0.6367854", "0.63669926", "0.6356869", "0.6338962...
0.58840406
96
Methods to manage access
public void patientadder (String index, String email){ String test2 = email; for(int i = 0; i < doctorsList.size(); i++){ String test = doctorsList.get(i).getEmail(); if(test.equals(test2)){ patients.add(index); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getAccess();", "String getAccess();", "String getAccess();", "private void authorize() {\r\n\r\n\t}", "public interface AccessManager {\n\n /**\n * predefined action constants\n */\n public String READ_ACTION = javax.jcr.Session.ACTION_READ;\n public String REMOVE_ACTION = ja...
[ "0.69610965", "0.6914773", "0.6914773", "0.6755986", "0.65637577", "0.64963394", "0.64439124", "0.6396987", "0.6376031", "0.6314452", "0.63029456", "0.6206428", "0.61771905", "0.6174534", "0.6152815", "0.6084497", "0.60694915", "0.606438", "0.60581785", "0.6050271", "0.603225...
0.0
-1
TODO Autogenerated method stub
public List<Posts> listPosts() { return this.findAll(); }
{ "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
int _numberOne; String myAge; int numberTwo; int $numberThree; int 1numberFour; float number4;
public static void main(String[] args) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String[] args) {\n int static2 = 22;\n int _static = 22;\n int $tatic = 45;\n int staticVar = 23;\n\n int salary$ = 55;\n // int 1stMonthSalary = 55; --- ERROR, cannot start with number\n int $ = 10;\n int _ = 3;\n System.out.pri...
[ "0.62083155", "0.62028205", "0.6163582", "0.5933869", "0.5755221", "0.5660957", "0.56114024", "0.55304253", "0.5445901", "0.5436614", "0.54356563", "0.5411492", "0.5396258", "0.5342967", "0.53278846", "0.531972", "0.531607", "0.5316039", "0.5304297", "0.5298408", "0.5286017",...
0.0
-1
TODO Autogenerated method stub
@Override public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) { Market market = new Market(); Player player = (Player) sender; if (cmd.getName().equalsIgnoreCase(cmdPreco)) { if (args.length == 1) { int id = Util.getId(args[0]); if (id != 0) { double price = market.getPrice(id); String name = Util.getItemName(id); player.sendMessage(Util.chat("&eItem: &9" + name + "\n&ePreço: &a" + price)); return true; } player.sendMessage(Util.chat("&cParâmetros inválidos: /preço [id] ou <nome do item>")); return true; } player.sendMessage(Util.chat("&cSem parâmetro: /preço [id] ou <nome do item>")); return true; } if (cmd.getName().equalsIgnoreCase(cmdAddItem)) { if (args.length == 1) { int id = Util.getId(args[0]); if (id != 0) { if (!market.itemExist(id)) { market.addItem(id); player.sendMessage( Util.chat("&eItem &c[&f" + id + "&c] &9" + Util.getItemName(id) + " &aAdicionado!")); return true; } else { player.sendMessage(Util.chat("&cItem já está registrado!")); return true; } } player.sendMessage(Util.chat("&cParâmetros inválidos: /additem [id] ou <nome do item>")); return true; } if (args.length == 2) { if (Util.isNumber(args[1])) { int id = Util.getId(args[0]); double price = Double.parseDouble(args[1]); if (id != 0) { if (!market.itemExist(id)) { market.addItem(id, price); player.sendMessage(Util.chat("&eItem &c[&f" + id + "&c] &9" + Util.getItemName(id) + " &aAdicionado! \n&ePreço: &f" + price)); return true; } else { player.sendMessage(Util.chat("&cItem já está registrado!")); return true; } } else { player.sendMessage( Util.chat("&cParâmetros inválidos: /additem [id] ou <nome do item> <preço>")); return true; } } player.sendMessage(Util.chat("&cParâmetros inválidos: /additem [id] ou <nome do item> <preço>")); return true; } player.sendMessage(Util.chat("&cSem parâmetros: /additem [id] ou <nome do item> <preço>")); return true; } if (cmd.getName().equalsIgnoreCase(cmdRemoveItem)) { if (args.length == 1) { int id = Util.getId(args[0]); if (id != 0 || args[0].equals("AIR")) { if (market.itemExist(id)) { market.deleteItem(id); player.sendMessage(Util.chat("&eItem &9" + Util.getItemName(id) + "&c Deletado")); return true; } else player.sendMessage(Util.chat("&cEsse item ainda não foi registrado")); return true; } player.sendMessage(Util.chat("&cParâmetros inválidos: /removeritem [id] ou <nome do item>")); return true; } player.sendMessage(Util.chat("&cSem parâmetros: /removeritem [id] ou <nome do item>")); return true; } if (cmd.getName().equalsIgnoreCase(cmdAtualizarItem)) { if (args.length == 2) { if (Util.isNumber(args[1])) { int id = Util.getId(args[0]); if (id != 0) { if (market.itemExist(id)) { double value = Double.parseDouble(args[1]); market.updateItem(id, value); player.sendMessage(Util.chat( "&eItem &9" + Util.getItemName(id) + "&a Atualizado\n&ePreço atual: &f" + value)); return true; } else { player.sendMessage(Util.chat("&cEsse item ainda não foi registrado")); return true; } } player.sendMessage( Util.chat("&cParâmetros inválidos: /atualizaritem [id] ou <nome do item> <preço>")); return true; } player.sendMessage(Util.chat("&cParâmetros inválidos: /atualizaritem [id] ou <nome do item> <preço>")); return true; } player.sendMessage(Util.chat("&cSem parâmetros: /atualizaritem [id] ou <nome do item> <preço>")); return true; } if (cmd.getName().equalsIgnoreCase(cmdListarItens)) { List<ItemStack> listItem = new ArrayList<ItemStack>(); player.sendMessage(Util.chat("&cCARREGANDO LISTA......")); listItem = market.listItens(); Map map = Util.divList(listItem, 5); if (args.length == 0) { player.sendMessage(Util.chat("&f----------&6[Lista]&7 (1/" + Util.mapKeyQuantity(map) + ")&f--------------------" + "\n&7Use /listaritems [n] para ir para pagina n \n&f----&9NOME &f----&aPREÇO &f----&cID")); listItem = (List<ItemStack>) map.get(0); for (ItemStack item : listItem) { String name = Util.getItemName(item); int id = Util.getItemId(item); double price = market.getPrice(id); player.sendMessage(Util.chat("-> &9[" + name + "] &a[" + price + "] &c[" + id + "]")); } return true; } if (args.length == 1) { int p = Integer.parseInt(args[0]); if (p <= 0) { player.sendMessage(Util.chat("&cNúmero minímo de paginas é: " + 1)); return true; } if (p <= Util.mapKeyQuantity(map)) { listItem = (List<ItemStack>) map.get(p - 1); player.sendMessage(Util.chat("&f----------&6[Lista]&7 (" + args[0] + "/" + Util.mapKeyQuantity(map) + "&f--------------------\n&f----&9NOME &f----&aPREÇO &f----&cID")); for (ItemStack item : listItem) { String name = Util.getItemName(item); int id = Util.getItemId(item); double price = market.getPrice(id); player.sendMessage(Util.chat("-> &9[" + name + "] &a[" + price + "] &c[" + id + "]")); } return true; } player.sendMessage(Util.chat("&cNúmero maximo de paginas é: " + Util.mapKeyQuantity(map))); return true; } return true; } return false; }
{ "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
Convert the given object to string with each line indented by 4 spaces (except the first line).
private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private String toIndentedString(Object object) {\n if (object == null) {\n return EndpointCentralConstants.NULL_STRING;\n }\n return object.toString().replace(EndpointCentralConstants.LINE_BREAK,\n EndpointCentralConstants.LINE_BREAK + EndpointCentralConstants.TAB_SPA...
[ "0.7885475", "0.75498515", "0.74975353", "0.7461901", "0.7461901", "0.7461901", "0.7461901", "0.7461901", "0.7461901", "0.7461901", "0.7461901", "0.7461901", "0.7461901", "0.7461901", "0.7461901", "0.7461901", "0.7461901", "0.7461901", "0.7461901", "0.7461901", "0.7461901", ...
0.0
-1
Add an observer to the list of collaborators
public void attach(Observer o);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void addObserver(IObserver observer) {\n observersList.add(observer);\n }", "public void addObservers(List<RegisterObserver> observers){\r\n registerObservers.addAll(observers);\r\n }", "@Override\n public void addObserver(Observer observer) {\n observers.add...
[ "0.7194319", "0.7190825", "0.702595", "0.7005354", "0.69775015", "0.6912637", "0.6862041", "0.68178105", "0.67973536", "0.67669815", "0.67669815", "0.66566485", "0.6650092", "0.6637183", "0.658521", "0.65652674", "0.65619093", "0.65510315", "0.6548787", "0.6536158", "0.653550...
0.0
-1
Detach an observer from the list of collaborators
public void detach(Observer o);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void detachObserver(jObserver observer);", "@Override\n void detach(Observer observer) {\n observers.remove(observer);\n }", "public void removerObservador (Observer observer){\n list.remove(observer);\n }", "public void detach(Observer observer) {\n\t\tsubscribers.remove(observ...
[ "0.7529461", "0.7329054", "0.7214712", "0.71763", "0.7175529", "0.70885164", "0.69310915", "0.690598", "0.68717563", "0.6772551", "0.6715006", "0.67050165", "0.6685041", "0.6645653", "0.65513265", "0.65363294", "0.6530866", "0.6489185", "0.6476927", "0.6469239", "0.646693", ...
0.69691944
6
Notify all observers of changes
public void notifyObservers();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void notifyObservers() {\n\t\tfor (Observer o : this.observers) {\r\n\t\t\to.update();\r\n\t\t}\r\n\t}", "@Override\n\tpublic void notifyObservers() {\n\t\tfor (Observer obs : this.observers)\n\t\t{\n\t\t\tobs.update();\n\t\t}\n\t}", "@Override\n void notifys() {\n for (Observer...
[ "0.8538108", "0.85319674", "0.85259616", "0.8514363", "0.8513845", "0.84931153", "0.8452804", "0.83783764", "0.83546394", "0.83333945", "0.8290768", "0.8257899", "0.809179", "0.80096376", "0.80096376", "0.79770905", "0.79732066", "0.78888315", "0.7869747", "0.7789245", "0.778...
0.80316484
15
Creates the scene to be put on the stage.
public Scene createScene() { myRoot = new AnchorPane(); myTabs = new TabPane(); Button newTab = new Button(CREATE_NEW_TAB); newTab.setOnAction(event -> createNewTab()); TabMainScreen mainScreen = new TabMainScreen(myResources.getString(WORKSPACE) + (myTabs.getTabs().size())); TabHelp help1 = new TabHelp(myResources.getString(BASIC_COMMANDS), HELP_TAB_TEXT1); TabHelp help2 = new TabHelp(myResources.getString(EXTENDED_COMMANDS), HELP_TAB_TEXT2); myTabs.getTabs().addAll(mainScreen.getTab(myStage), help1.getTab(), help2.getTab()); AnchorPane.setTopAnchor(myTabs, TABS_OFFSET); AnchorPane.setTopAnchor(newTab, NEWTAB_OFFSET); myRoot.getChildren().addAll(myTabs, newTab); myScene = new Scene(myRoot, windowHeight, windowWidth, Color.WHITE); return myScene; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void createScene();", "private void createScene() {\r\n imageView.setFitWidth(400);\r\n imageView.setFitHeight(300);\r\n\r\n Scene scene = new Scene(rootScene(), 700, 600);\r\n\r\n primaryStage.setTitle(TITLE);\r\n primaryStage.setScene(scene);\r\n primaryStage.sh...
[ "0.82040495", "0.79270273", "0.7686579", "0.7539898", "0.7170029", "0.71511686", "0.71265024", "0.7117881", "0.7114758", "0.7104704", "0.7054354", "0.70273155", "0.6997549", "0.6969927", "0.6941308", "0.6908016", "0.6893753", "0.68383914", "0.6804528", "0.6803587", "0.6802819...
0.72708315
4
Returns width of window
@Override public int getWidth() { return windowWidth; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected double getWindowWidth() {\n\t\treturn m_windowWidth;\n\t}", "public int getWidth(){\n Window w = vc.getFullScreenWindow();\n if(w != null){\n return w.getWidth();\n } else {\n return 0;\n }\n }", "public int getScreenWidth();", "public int getScr...
[ "0.8368821", "0.8291727", "0.78115904", "0.78115904", "0.77332616", "0.77332616", "0.77332616", "0.77332616", "0.77332616", "0.77332616", "0.77332616", "0.77332616", "0.77332616", "0.77332616", "0.77332616", "0.77332616", "0.77332616", "0.77332616", "0.77332616", "0.77332616", ...
0.84435815
0
Returns height of window
@Override public int getHeight() { return windowHeight; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected double getWindowHeight() {\n\t\treturn m_windowHeight;\n\t}", "public int getHeight(){\n Window w = vc.getFullScreenWindow();\n if(w != null){\n return w.getHeight();\n } else {\n return 0;\n }\n }", "public int getScreenHeight();", "public int g...
[ "0.8267778", "0.81390244", "0.77833027", "0.77833027", "0.7783099", "0.75810176", "0.750337", "0.74830633", "0.74510586", "0.74428093", "0.7414758", "0.7359826", "0.73325217", "0.7302093", "0.7274857", "0.72600764", "0.72600764", "0.7255768", "0.724535", "0.724535", "0.724535...
0.84161675
0