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
/this method will take our temparray variable, and mix up the card order from our gameBoard array
public void randomize(){ int random = (int) (Math.random()*36); for(int i = 0;i<7;i++){ for(int j = 0;j<36;j++){ temparray[1] = gameBoard[random]; temparray[2] = gameBoard[j]; gameBoard[j] = temparray[1]; gameBoard[random] = temparray[2]; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void ArrangeSuits() {\n if (mCardCount > 0) {\n \tCard card;\n \tCard orderedCards[];\n \torderedCards = new Card[mCardCount];\n \tint iValue;\n \tint iOrder[];\n \tint iCount = 0;\n \tiOrder = new int [mCardCount];\n \tint iMinValue = Card.HEARTS * 13 + Card.KING;\n \tiOrder[0...
[ "0.6710512", "0.64806944", "0.6360994", "0.6256885", "0.62476516", "0.6191374", "0.61662203", "0.61520517", "0.6151262", "0.61215913", "0.60578203", "0.6052593", "0.60383844", "0.6024193", "0.60076326", "0.59803677", "0.59531474", "0.59426546", "0.59392875", "0.59346175", "0....
0.6762839
0
/This method will reveal the image on our board
public void revealImage(int current){ System.out.println(gameBoard[current].getPicture()); if(clickable){ clickable = false; /*Getting the image in our ImageArray[current] and setting the image to the new image from our card Object in our gameBoard, adding the new image to the grid, to display, and using cardIndx object to store the col Index and Row Index*/ imageArr[current] = new ImageView(new Image(gameBoard[current].getPicture())); grid.add(imageArr[current], cardIndx[current].getColIndex(), cardIndx[current].getRowIndex()); if(ctr == 0){ clicked[0] = current; clickable = true; ctr++; } else{ imageArr[current] = new ImageView(new Image(gameBoard[current].getPicture())); grid.add(imageArr[current], cardIndx[current].getColIndex(), cardIndx[current].getRowIndex()); clicked[1] = current; ctr = 0; try { Thread.sleep(300); compare(); } catch (InterruptedException ex) { Logger.getLogger(MainController.class.getName()).log(Level.SEVERE, null, ex); } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void displayNewImage() {\n\t\tthis.canvas.display();\n\t}", "public void reveal() {\n revealed = true;\n }", "public void displayGivenImage() {\n\t\tthis.image.display();\n\t}", "public void displayPiece() {\n if (isOccupied())\n this.setIcon(piece.getPieceImg());\n ...
[ "0.68500394", "0.6707106", "0.6653593", "0.65331674", "0.64731413", "0.64637655", "0.64363897", "0.6431346", "0.6373164", "0.6365558", "0.6354323", "0.63442534", "0.6194137", "0.6178419", "0.61472344", "0.6139591", "0.61090314", "0.60986906", "0.60633385", "0.60597813", "0.60...
0.7331061
0
/method that Sets the background for our MainPane
public void setBackground(){ Image background = new Image("Cards/table.jpg", 192, 80, false, true); BackgroundImage backgroundImg = new BackgroundImage(background, BackgroundRepeat.REPEAT, BackgroundRepeat.REPEAT,BackgroundPosition.DEFAULT, null); mainPane.setBackground(new Background(backgroundImg)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setBg(){\n this.setBackground(color);\n }", "private void setBackground() throws IOException{\n\t\tBufferedImage backgroundBufferedImage = ImageLoader.getBufferedImage(backgroundImagePath);\n\t\tmainWindow.setBackgroundImage(backgroundBufferedImage);\n\t}", "@Override\r\n public void s...
[ "0.73641956", "0.725438", "0.6967054", "0.6902902", "0.68450713", "0.68384606", "0.67986727", "0.67673594", "0.66668135", "0.6597193", "0.65754896", "0.65544397", "0.65298975", "0.6512616", "0.6461241", "0.6423412", "0.64221674", "0.64211315", "0.63715285", "0.63590336", "0.6...
0.78057784
0
method that will test the cards and create a list of cards
public void test(){ int nCards = 52; Card deck[] = new Card[nCards]; //for loop that iterates the size of nCards(52) for(int i = 0; i<nCards;i++){ //create a new Card object, and set it equal to (i) print out the current card. deck[i] = new Card(i); System.out.print(deck[i].toString()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private List<Card> setupDeck(){\n List<Card> llist = new LinkedList<Card>();\n String[] faceCards = {\"J\",\"Q\",\"K\",\"A\"};\n String[] suits = {\"spades\",\"clubs\",\"diamonds\",\"hearts\"};\n\n for(int i=2; i<=10; i++){\n for(int j=1; j<=4; j++){\n llist.add(new Card(Integer.toString(i)...
[ "0.7541885", "0.7490522", "0.73866725", "0.7357422", "0.7333462", "0.72729456", "0.7207298", "0.7174717", "0.71592647", "0.71275616", "0.7101406", "0.70866126", "0.707942", "0.7072768", "0.70676553", "0.7046969", "0.7044521", "0.7037586", "0.6985723", "0.6967814", "0.695795",...
0.64335835
58
Initialized method used at program startup.
public void initialize() { Employee emp = new Employee("jaden Williams", "abEFc123!"); //Widget newProductTest = new Widget("iPod45", "Apple", ItemType.AUDIO); //Test widget System.out.println("Launched program"); loadDatabaseProducts(); loadDatabaseRecords(); tableViewSetup(); //Sets up table structure populateProductLineTabs(); //Populates item type dropdown populateItemQuantity(); //Populates quantity dropdown //testMultimedia(); //Testing //testProductionRecord(); //Testing text log on last page }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void initialize() {\n // empty for now\n }", "public void initialize() {\n // TODO\n }", "public void initialize()\n {\n }", "private void initialize() {\n }", "protected void initialize() {}", "protected void initialize() {}", "public void initialize() {\r\n }"...
[ "0.8457527", "0.84177774", "0.83927715", "0.83702993", "0.8356581", "0.8356581", "0.832597", "0.8314468", "0.8268121", "0.8268121", "0.8264099", "0.82560724", "0.8214869", "0.82113034", "0.82113034", "0.82113034", "0.82113034", "0.82113034", "0.82113034", "0.82113034", "0.821...
0.0
-1
Method called when add product button is pressed.
@FXML void but_AddProduct(ActionEvent event) { productLine.add(new Widget(txtProductName.getText(), txtManufacturer.getText(), choiceType.getValue())); //Adding test product in observable list productTable.setItems(productLine); //Adds product to table listProduce.setItems(productLine); //Adds product to produce list addToDatabaseProduct(); System.out.println("Product added"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addButtonClicked(){\n Products products = new Products(buckysInput.getText().toString());\n dbHandler.addProduct(products);\n printDatabase();\n }", "private void addProduct()\n {\n System.out.println(\"|➕| Add new Product:\\n\");\n System.out.println(\"|➕| En...
[ "0.82667774", "0.80675477", "0.8035202", "0.79325366", "0.7846249", "0.76192415", "0.7607995", "0.7582684", "0.7559369", "0.7527075", "0.7504955", "0.7417958", "0.73721135", "0.73527026", "0.7275268", "0.7169055", "0.7148551", "0.7144745", "0.7136924", "0.713401", "0.70922226...
0.72538656
15
Method called when login button is pressed to log employee into log page.
@FXML public void but_Login(ActionEvent event) { Employee workingEmployee = new Employee(txtEmployeeName.getText(), txtEmployeePass.getText()); //Attempts login textLog.setText( textLog.getText() + "\n" + "Employee login: " + "\n " + workingEmployee.email + "\n " + workingEmployee.username); //Logs login mainEmployee = workingEmployee; //Set attempted employee login }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void customerLoginClicked(View view){\n if(empID==null || db == null){\n return;\n }\n try{\n int eID = Integer.parseInt(empID.getText().toString());\n String password = empPass.getText().toString();\n Employee emp = db.employeeDAO().getEmploy...
[ "0.7477761", "0.7406243", "0.7290896", "0.7221134", "0.72066844", "0.7117885", "0.70414984", "0.70278555", "0.7021079", "0.70149463", "0.69687897", "0.6955941", "0.69526273", "0.6951644", "0.69417924", "0.6933005", "0.6925127", "0.69038844", "0.6885343", "0.6868261", "0.68650...
0.6906018
17
Sets up the table on the products page to load proper columns.
public void tableViewSetup() { nameColumn.setCellValueFactory(new PropertyValueFactory<>("Name")); productTable.getColumns().add(nameColumn); manuColumn.setCellValueFactory(new PropertyValueFactory<>("Manufacturer")); productTable.getColumns().add(manuColumn); typeColumn.setCellValueFactory(new PropertyValueFactory<>("Type")); productTable.getColumns().add(typeColumn); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void initialProductTable() {\r\n\t\tString sqlCommand = \"CREATE TABLE IF NOT EXISTS ProductTable (\\n\" + \"Barcode integer PRIMARY KEY,\\n\"\r\n\t\t\t\t+ \"Product_Name VARCHAR(30) NOT Null,\\n\" + \"Delivery_Time integer NOT NULL,\\n\"\r\n\t\t\t\t+ \"Quantity_In_Store integer NOT NULL,\\n\" + \"Quantity_...
[ "0.67704177", "0.6760845", "0.6674855", "0.6656427", "0.6567176", "0.65608", "0.6534493", "0.6534287", "0.6342339", "0.6260013", "0.62370557", "0.62033784", "0.617847", "0.61598283", "0.6144706", "0.612628", "0.61236477", "0.6109248", "0.60987127", "0.608552", "0.6063877", ...
0.7323484
0
When "add product" button is pressed, the input fields get sent to database to be stored.
public void addToDatabaseProduct() { // Database credentials String pass = ""; InputStream passPath = Controller.class.getResourceAsStream("/password.txt"); if (passPath == null) { System.out.println("Could not find password in resources folder"); } BufferedReader reader = new BufferedReader(new InputStreamReader(passPath)); String line = null; while (true) { try { if (!((line = reader.readLine()) != null)) { break; } } catch (IOException e) { e.printStackTrace(); } System.out.println(line); if (line != null) { pass = line; System.out.println("Password login: " + line); break; } } Connection conn = null; //Temporary PreparedStatement stmt = null; //Temporary try { // STEP 1: Register JDBC driver Class.forName("org.h2.Driver"); //STEP 2: Open a connection conn = DriverManager.getConnection("jdbc:h2:./res/HR", "", pass); final String sqlProductName = txtProductName.getText(); String sqlManufName = txtManufacturer.getText(); ItemType sqlItemType = choiceType.getValue(); stmt = conn.prepareStatement("INSERT INTO Product(type, manufacturer, name) VALUES (?, ?, ?)", Statement.RETURN_GENERATED_KEYS); stmt.setString(1, sqlItemType.toString()); stmt.setString(2, sqlManufName); stmt.setString(3, sqlProductName); stmt.executeUpdate(); stmt.close(); conn.close(); } catch (ClassNotFoundException e) { e.printStackTrace(); } catch (SQLException e) { e.printStackTrace(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addButtonClicked(){\n Products products = new Products(buckysInput.getText().toString());\n dbHandler.addProduct(products);\n printDatabase();\n }", "private void addProduct()\n {\n System.out.println(\"|➕| Add new Product:\\n\");\n System.out.println(\"|➕| En...
[ "0.8284202", "0.80395", "0.7965704", "0.7915069", "0.7681299", "0.73510265", "0.72827923", "0.7256753", "0.72337246", "0.7150723", "0.7032889", "0.69498694", "0.69469166", "0.69087833", "0.69007", "0.6895205", "0.68170375", "0.6797532", "0.67970043", "0.679311", "0.6748307", ...
0.68284786
16
Method used to add logs to the database for history.
public void addToDatabaseRecord(ProductionRecord prodRec, String empUsername) { // Database credentials String pass = ""; InputStream passPath = Controller.class.getResourceAsStream("/password.txt"); if (passPath == null) { System.out.println("Could not find password in resources folder"); } BufferedReader reader = new BufferedReader(new InputStreamReader(passPath)); String line = null; while (true) { try { if (!((line = reader.readLine()) != null)) { break; } } catch (IOException e) { e.printStackTrace(); } System.out.println(line); if (line != null) { pass = line; System.out.println("Password login: " + line); break; } } Connection conn = null; //Temporary PreparedStatement stmt = null; //Temporary try { // STEP 1: Register JDBC driver Class.forName("org.h2.Driver"); //STEP 2: Open a connection conn = DriverManager.getConnection("jdbc:h2:./res/HR", "", pass); stmt = conn.prepareStatement( "INSERT INTO Productionrecord(production_num, product_id, " + "serial_num, date_produced, username) VALUES (?, ?, ?, ?, ?)", Statement.RETURN_GENERATED_KEYS); stmt.setInt(1, prodRec.getProductionNumber()); stmt.setInt(2, prodRec.getProductID()); stmt.setString(3, prodRec.serialnumber); stmt.setDate(4, prodRec.getDateProduced()); stmt.setString(5, empUsername); stmt.executeUpdate(); stmt.close(); conn.close(); } catch (ClassNotFoundException e) { e.printStackTrace(); } catch (SQLException e) { e.printStackTrace(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void migrateLogsFromRcToDb();", "void addRecord(HistoryRecord record) throws IOException;", "private void addToHistory(String msg){\n\t\ttry{\n\t\t\tlockHistory.writeLock().lock();\n\t\t\thistory.add(msg);\n\t\t\tlogOut.write(msg);\n\t\t\tlogOut.newLine();\n\t\t\tlogOut.flush();\n\t\t} catch (IOExceptio...
[ "0.6728708", "0.66213626", "0.65432847", "0.64529574", "0.637391", "0.62503916", "0.62270933", "0.6162009", "0.6132557", "0.60836506", "0.59318113", "0.592349", "0.5915394", "0.58942056", "0.5875632", "0.5826281", "0.5819363", "0.58176327", "0.580466", "0.5794796", "0.5790513...
0.0
-1
Loads database to fill table at start of program initialization.
public void loadDatabaseProducts() { // Database credentials String pass = ""; InputStream passPath = Controller.class.getResourceAsStream("/password.txt"); if (passPath == null) { System.out.println("Could not find password in resources folder"); } BufferedReader reader = new BufferedReader(new InputStreamReader(passPath)); String line = null; while (true) { try { if (!((line = reader.readLine()) != null)) { break; } } catch (IOException e) { e.printStackTrace(); } System.out.println(line); if (line != null) { pass = line; System.out.println("Password login: " + line); break; } } Connection conn; //Connection conn = null; //Temporary Statement stmt = null; //Temporary try { // STEP 1: Register JDBC driver Class.forName("org.h2.Driver"); //STEP 2: Open a connection conn = DriverManager.getConnection("jdbc:h2:./res/HR", "", pass); //Security bug - Temporary placeholders, will be modified in future. stmt = conn.createStatement(); ResultSet rs = stmt.executeQuery( "SELECT * FROM PRODUCT"); //Temporary database testing. Will be modified in the future. while (rs.next()) { String prodName = rs.getString("NAME"); String prodManu = rs.getString("MANUFACTURER"); ItemType prodType = ItemType.valueOf(rs.getString("TYPE")); productLine .add(new Widget(prodName, prodManu, prodType)); //Adding test product in observable list } productTable.setItems(productLine); listProduce.setItems(productLine); stmt.close(); //Close conn.close(); //Close } catch (ClassNotFoundException e) { e.printStackTrace(); } catch (SQLException e) { e.printStackTrace(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void initializeDatabase() {\n\t\tArrayList<String> data = DatabaseHandler.readDatabase(DATABASE_NAME);\n\t\tAbstractSerializer serializer = new CineplexSerializer();\n\t\trecords = serializer.deserialize(data);\n\t}", "private void setupDatabase() {\r\n\t\tDatabaseHelperFactory.init(this);\r\n\t\t...
[ "0.77920645", "0.7317654", "0.73172885", "0.71900904", "0.71687675", "0.6987358", "0.6982623", "0.6972047", "0.6952112", "0.68996024", "0.688886", "0.68813527", "0.687886", "0.6840612", "0.676701", "0.6764787", "0.6713968", "0.6700186", "0.6687998", "0.66827786", "0.66668177"...
0.0
-1
When called loads logs into log tab from database.
public void loadDatabaseRecords() { // Database credentials String pass = ""; InputStream passPath = Controller.class.getResourceAsStream("/password.txt"); if (passPath == null) { System.out.println("Could not find password in resources folder"); } BufferedReader reader = new BufferedReader(new InputStreamReader(passPath)); String line = null; while (true) { try { if (!((line = reader.readLine()) != null)) { break; } } catch (IOException e) { e.printStackTrace(); } System.out.println(line); if (line != null) { pass = line; System.out.println("Password login: " + line); break; } } Connection conn; //Connection conn = null; //Temporary Statement stmt = null; //Temporary try { // STEP 1: Register JDBC driver Class.forName("org.h2.Driver"); //STEP 2: Open a connection conn = DriverManager.getConnection("jdbc:h2:./res/HR", "", pass); stmt = conn.createStatement(); ResultSet rs = stmt.executeQuery( "SELECT * FROM PRODUCTIONRECORD"); int tempCounter = 0; while (rs.next()) { String prodNum = rs.getString("PRODUCTION_NUM"); String prodID = rs.getString("PRODUCT_ID"); String prodSerialNum = rs.getString("SERIAL_NUM").toString(); String prodDate = rs.getString("DATE_PRODUCED").toString(); String empUsername = rs.getString("USERNAME").toString(); textLog.setText( textLog.getText() + "\n" + "Prod. Num: " + prodNum + " Product ID: " + prodID + " Serial Num: " + prodSerialNum + " " + prodDate + " " + empUsername); tempCounter++; } globalProductCount = tempCounter; productTable.setItems(productLine); listProduce.setItems(productLine); stmt.close(); //Close conn.close(); //Close } catch (ClassNotFoundException e) { e.printStackTrace(); } catch (SQLException e) { e.printStackTrace(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void initLog() {\n _logsList = (ListView) findViewById(R.id.lv_log);\n setupLogger();\n }", "public void setUserLogs() {\n ResultSet rs = Business.getInstance().getData().getCaseLog();\n try{\n while (rs.next()) {\n userLog.add(new UserLog(rs.ge...
[ "0.6581918", "0.6539527", "0.63777596", "0.62671804", "0.6225962", "0.6224791", "0.58520645", "0.5820723", "0.57916325", "0.5722395", "0.5679305", "0.56701356", "0.56684", "0.56462324", "0.5629396", "0.5609794", "0.5604929", "0.55923873", "0.55667686", "0.5530785", "0.5522294...
0.522944
49
On record button press on produce tab, data gets sent to log tab.
@FXML void but_RecordProduction(ActionEvent event) { for (int i = 0; i < Integer.parseInt(comboQuantity.getValue()); i++) { globalProductCount++; //Counts up product count if (mainEmployee != null) { textLog.setText(textLog.getText() + "\n" + new ProductionRecord( listProduce.getSelectionModel().getSelectedItem(), i + 1, globalProductCount) + " " + mainEmployee.username); addToDatabaseRecord( new ProductionRecord(listProduce.getSelectionModel().getSelectedItem(), i + 1, globalProductCount), mainEmployee.username); } else { textLog.setText(textLog.getText() + "\n" + new ProductionRecord( listProduce.getSelectionModel().getSelectedItem(), i + 1, globalProductCount) + " Anonymous"); addToDatabaseRecord( new ProductionRecord(listProduce.getSelectionModel().getSelectedItem(), i + 1, globalProductCount), "Anonymous"); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void record(){\n\t}", "private void testRecordButtonActionPerformed() {\n try {\n if(aspaceClient == null) {\n String host = hostTextField.getText().trim();\n String admin = adminTextField.getText();\n String adminPassword = adminPasswordTextF...
[ "0.63585424", "0.6272388", "0.6189761", "0.61501557", "0.6126215", "0.61008906", "0.60838234", "0.60321194", "0.5970602", "0.5870202", "0.5849178", "0.58334017", "0.58273107", "0.57859135", "0.5753929", "0.5730594", "0.5717324", "0.56870496", "0.5680438", "0.5665041", "0.5651...
0.5266397
65
Populates quantity dropdown on produce tab with digits 1 10.
void populateItemQuantity() { for (int i = 0; i < 10; i++) { String number = String.valueOf(i + 1); comboQuantity.getItems().add(i, number); } comboQuantity.setEditable(true); comboQuantity.getSelectionModel().selectFirst(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setQuantity(int value) {\n this.quantity = value;\n }", "public void setQuantity(int value) {\n this.quantity = value;\n }", "public void setQuantity(int value) {\n this.quantity = value;\n }", "void setDisplayQuantity(BigDecimal inDisplayQuantity);", "public void ...
[ "0.6507108", "0.6507108", "0.6507108", "0.6502553", "0.6441175", "0.6308943", "0.629538", "0.6266245", "0.62474984", "0.6240992", "0.621467", "0.61940295", "0.6179328", "0.6178381", "0.6154442", "0.61515945", "0.61515945", "0.6137845", "0.612607", "0.6116848", "0.6106844", ...
0.78491807
0
Populates all enum item types inside the itemType dropdown on products tab.
void populateProductLineTabs() { ArrayList<ItemType> typeNames = new ArrayList<ItemType>(); for (ItemType typeValue : ItemType.values()) { typeNames.add(typeValue); } System.out.println("type array size = " + typeNames.size()); for (int i = 0; i < typeNames.size(); i++) { choiceType.getItems().add(i, typeNames.get(i)); } choiceType.getSelectionModel().selectFirst(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void updateItems()\n\t{\t\n\t\tupdatePizzaTypes(items);\n\t\tupdateSidesTypes(items);\n\t\tupdateDrinksTypes(items);\n\t}", "private static void populateArtworkTypes() {\r\n if (artworkTypes.isEmpty()) {\r\n artworkTypes.add(TYPE_CLEARART);\r\n artworkTypes.add(TYPE_CLEARL...
[ "0.66239595", "0.6172185", "0.61422956", "0.6032202", "0.5915718", "0.58515155", "0.57335764", "0.57212603", "0.5640128", "0.563401", "0.5633479", "0.56245226", "0.5600215", "0.5594858", "0.5588671", "0.5579316", "0.5564107", "0.5532589", "0.5522144", "0.54897773", "0.5486771...
0.7306533
0
Testing method for multimedia methods.
public void testMultimedia() { AudioPlayer newAudioProduct = new AudioPlayer("DP-X1A", "Onkyo", "DSD/FLAC/ALAC/WAV/AIFF/MQA/Ogg-Vorbis/MP3/AAC", "M3U/PLS/WPL"); Screen newScreen = new Screen("720x480", 40, 22); MoviePlayer newMovieProduct = new MoviePlayer("DBPOWER MK101", "OracleProduction", newScreen, MonitorType.LCD); ArrayList<MultimediaControl> productList = new ArrayList<MultimediaControl>(); productList.add(newAudioProduct); productList.add(newMovieProduct); for (MultimediaControl p : productList) { System.out.println(p); p.play(); p.stop(); p.next(); p.previous(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract String playMedia ();", "public abstract void chooseMedia();", "@Test\n public void testVideoMeta() {\n // TODO: test VideoMeta\n }", "boolean hasMultimediaData();", "@Test\r\n\tpublic void testSubIdxSubtitles() throws MediaFileException{\n\t\tFile mediaFile = new File(testMedia...
[ "0.6814276", "0.6560731", "0.65226895", "0.63490385", "0.6291424", "0.61898607", "0.61568856", "0.6041464", "0.6040139", "0.60275716", "0.5980084", "0.59609294", "0.59312606", "0.58954763", "0.5871445", "0.5871304", "0.5868914", "0.5864141", "0.58593863", "0.5842458", "0.5836...
0.68692243
0
Test production record method for producing production records.
public void testProductionRecord() { // test constructor used when creating production records from user interface Integer numProduced = 3; // this will come from the combobox in the UI for (int productionRunProduct = 0; productionRunProduct < numProduced; productionRunProduct++) { ProductionRecord pr = new ProductionRecord(0); System.out.println(pr.toString()); } ProductionRecord pr = new ProductionRecord(0, 3, "1", new Date(System.currentTimeMillis())); textLog.setText(textLog.getText() + pr.toString()); textLog.setText(textLog.getText() + "\n" + pr.getProductionNumber()); textLog.setText(textLog.getText() + "\n" + pr.getProductID()); textLog.setText(textLog.getText() + "\n" + pr.getSerialnumber()); textLog.setText(textLog.getText() + "\n" + pr.getDateProduced()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int insert(MedicalOrdersExecutePlan record);", "@Test\n public void recordTypeTest() {\n // TODO: test recordType\n }", "@Test\r\n\tpublic void testAddObstetricsRecord() {\r\n\t\t\r\n\t\tSimpleDateFormat dateFormat = new SimpleDateFormat(\"yyy-MM-dd\");\r\n\t\tCalendar c = Calendar.getInstance();\...
[ "0.58890676", "0.5811554", "0.57970023", "0.5736104", "0.5718583", "0.57111824", "0.56739813", "0.5640394", "0.5625418", "0.561448", "0.5593997", "0.5584389", "0.55812037", "0.555345", "0.5539882", "0.5530972", "0.5513175", "0.54946804", "0.5489508", "0.5487188", "0.54854655"...
0.7680614
0
setting the system look and feel
public static void main(String[] args) { try { UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); } catch (ClassNotFoundException e) { e.printStackTrace(); } catch (InstantiationException e) { e.printStackTrace(); } catch (IllegalAccessException e) { e.printStackTrace(); } catch (UnsupportedLookAndFeelException e) { e.printStackTrace(); } LabelMeBrowser lmb = new LabelMeBrowser(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void setLook() {\r\n try {\r\n UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());\r\n } catch (IllegalAccessException ex) {\r\n ex.printStackTrace();\r\n } catch (UnsupportedLookAndFeelException ex) {\r\n ex.printStackTrace();\r...
[ "0.8289973", "0.7788626", "0.74332863", "0.73780847", "0.7296083", "0.7229927", "0.7215604", "0.72002083", "0.7119203", "0.7073984", "0.7045015", "0.696476", "0.69464314", "0.69321173", "0.67991877", "0.67589235", "0.6738765", "0.67011625", "0.66804844", "0.6558312", "0.64209...
0.0
-1
Creates new form GestionCurso
public GestionCurso(int admin) { Admin(admin); initComponents(); this.setLocationRelativeTo(null); MostrarCursos(); datosCombobox(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Compuesta createCompuesta();", "public creacionempresa() {\n initComponents();\n mostrardatos();\n }", "public CadastroProdutoNew() {\n initComponents();\n }", "OperacionColeccion createOperacionColeccion();", "public CatProveedores() {\n initComponents();\n cargart...
[ "0.70740974", "0.69085675", "0.65957093", "0.65801585", "0.6470982", "0.6443247", "0.643453", "0.64264256", "0.64128", "0.6401765", "0.63904905", "0.6319838", "0.6308297", "0.6294464", "0.62908936", "0.6253503", "0.6249444", "0.6232655", "0.62147105", "0.6209323", "0.62034035...
0.0
-1
Metodo para ver si el usuario posee perfil de administrador.
public boolean Admin(int admin) { this.flag = admin; if (admin == 1) { flag = 1; return true; } else { flag = 0; return false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean isAdmin();", "public boolean isAdmin();", "@Override\r\n\tprotected void verificaUtentePrivilegiato() {\n\r\n\t}", "public boolean checkAdmin()\r\n\t{\r\n\t\tboolean admin=false;\r\n\t\tint length=user_records.size();\r\n\t\tfor(int i=0;i<length;i++)\r\n\t\t{\r\n\t\t\tif(((User)user_records.get(i)).g...
[ "0.721243", "0.7142579", "0.6981658", "0.6929006", "0.6896052", "0.68310636", "0.6831055", "0.6764286", "0.6743061", "0.666359", "0.66627717", "0.65790236", "0.65057385", "0.64886904", "0.64886904", "0.6454934", "0.64296675", "0.633561", "0.63196224", "0.6318092", "0.63032806...
0.0
-1
Metodo para poblar el comboBox con los nombre de los colegios.
public void datosCombobox() { listaColegios = new ColegioDaoImp().listar(); for (Colegio colegio : listaColegios) { cbColegio.addItem(colegio.getNombre()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void llenarComboBox(){\n TipoMiembroComboBox.removeAllItems();\n TipoMiembroComboBox.addItem(\"Administrador\");\n TipoMiembroComboBox.addItem(\"Editor\");\n TipoMiembroComboBox.addItem(\"Invitado\");\n }", "public void riempiProceduraComboBox(){\n Statement stmt;\n ...
[ "0.74276567", "0.7326387", "0.72169024", "0.7189458", "0.71711504", "0.71429986", "0.70907557", "0.7047551", "0.70346725", "0.69990873", "0.6984537", "0.69395435", "0.69243443", "0.691608", "0.68680847", "0.6857114", "0.6832869", "0.6798246", "0.6776273", "0.6774462", "0.6766...
0.7825853
0
This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always regenerated by the Form Editor.
@SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { PanelTitulo = new javax.swing.JPanel(); lblAVOT = new javax.swing.JLabel(); btnInicio = new javax.swing.JButton(); PanelTabla = new javax.swing.JPanel(); jScrollPane1 = new javax.swing.JScrollPane(); tablaCursos = new javax.swing.JTable(); PanelInsertar = new javax.swing.JPanel(); txtCurso = new javax.swing.JTextField(); btnAgregarColegio = new javax.swing.JButton(); jLabel1 = new javax.swing.JLabel(); cbColegio = new javax.swing.JComboBox<>(); jLabel9 = new javax.swing.JLabel(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); setUndecorated(true); PanelTitulo.setBackground(new java.awt.Color(30, 160, 250)); lblAVOT.setBackground(new java.awt.Color(255, 255, 255)); lblAVOT.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N lblAVOT.setForeground(new java.awt.Color(255, 255, 255)); lblAVOT.setText("A.V.O.T."); btnInicio.setText("Inicio"); btnInicio.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnInicioActionPerformed(evt); } }); javax.swing.GroupLayout PanelTituloLayout = new javax.swing.GroupLayout(PanelTitulo); PanelTitulo.setLayout(PanelTituloLayout); PanelTituloLayout.setHorizontalGroup( PanelTituloLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(PanelTituloLayout.createSequentialGroup() .addContainerGap() .addComponent(lblAVOT) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(btnInicio) .addContainerGap()) ); PanelTituloLayout.setVerticalGroup( PanelTituloLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, PanelTituloLayout.createSequentialGroup() .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(PanelTituloLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(lblAVOT) .addComponent(btnInicio)) .addContainerGap()) ); PanelTabla.setBorder(javax.swing.BorderFactory.createTitledBorder("Lista Cursos")); tablaCursos.setModel(new javax.swing.table.DefaultTableModel( new Object [][] { {null, null, null, null}, {null, null, null, null}, {null, null, null, null}, {null, null, null, null} }, new String [] { "Title 1", "Title 2", "Title 3", "Title 4" } )); jScrollPane1.setViewportView(tablaCursos); javax.swing.GroupLayout PanelTablaLayout = new javax.swing.GroupLayout(PanelTabla); PanelTabla.setLayout(PanelTablaLayout); PanelTablaLayout.setHorizontalGroup( PanelTablaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(PanelTablaLayout.createSequentialGroup() .addContainerGap() .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 710, Short.MAX_VALUE) .addContainerGap()) ); PanelTablaLayout.setVerticalGroup( PanelTablaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(PanelTablaLayout.createSequentialGroup() .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE) .addContainerGap()) ); PanelInsertar.setBorder(javax.swing.BorderFactory.createTitledBorder("Agregar Curso")); btnAgregarColegio.setText("Agregar"); btnAgregarColegio.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnAgregarColegioActionPerformed(evt); } }); jLabel1.setText("Nombre Curso"); cbColegio.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "Seleccione un Colegio" })); cbColegio.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { cbColegioActionPerformed(evt); } }); jLabel9.setText("Colegio"); javax.swing.GroupLayout PanelInsertarLayout = new javax.swing.GroupLayout(PanelInsertar); PanelInsertar.setLayout(PanelInsertarLayout); PanelInsertarLayout.setHorizontalGroup( PanelInsertarLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, PanelInsertarLayout.createSequentialGroup() .addContainerGap() .addGroup(PanelInsertarLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel1) .addComponent(jLabel9)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 43, Short.MAX_VALUE) .addGroup(PanelInsertarLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(cbColegio, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(txtCurso)) .addContainerGap()) .addGroup(PanelInsertarLayout.createSequentialGroup() .addGap(109, 109, 109) .addComponent(btnAgregarColegio) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); PanelInsertarLayout.setVerticalGroup( PanelInsertarLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(PanelInsertarLayout.createSequentialGroup() .addContainerGap(128, Short.MAX_VALUE) .addGroup(PanelInsertarLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel1) .addComponent(txtCurso, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(69, 69, 69) .addGroup(PanelInsertarLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(cbColegio, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel9)) .addGap(57, 57, 57) .addComponent(btnAgregarColegio) .addGap(99, 99, 99)) ); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(PanelTitulo, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(layout.createSequentialGroup() .addContainerGap() .addComponent(PanelTabla, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(PanelInsertar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap()) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addComponent(PanelTitulo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(PanelInsertar, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(PanelTabla, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addContainerGap()) ); pack(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Form() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public frmRectangulo() {\n initComponents();\n }", "public form() {\n ...
[ "0.73191476", "0.72906625", "0.72906625", "0.72906625", "0.72860986", "0.7248112", "0.7213479", "0.72078276", "0.7195841", "0.71899796", "0.71840525", "0.7158498", "0.71477973", "0.7092748", "0.70800966", "0.70558053", "0.69871384", "0.69773406", "0.69548076", "0.69533914", "...
0.0
-1
Initialise une fenetre de jeu
public void initFenetreEcranJeu(int nbLigne, int nbColonne, boolean[] isIA) { //Creation du modele de grille AbstractModel gridModel = new GrilleModel(nbColonne,nbLigne,isIA,true); //Creation du controleur AbstractControler gameControler = new GridControler(gridModel); //Creation de notre fenetre avec le controleur en parametre VueGrid vueJeu = new VueGrid(gameControler, this, nbLigne, nbColonne); //Ajout de la fenetre comme observer de notre modele gridModel.addObserver(vueJeu); gridModel.placerinit(); gridModel.startIA(); this.setVisible(false); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public MusiqueFiducial(){\n\t\tinitialisation();\n\t}", "public static void init()\n\t{\n\t\t\n\t\tu.creerGalaxie(\"VoieLactee\", \"spirale\", 0);\n\t\tu.creerEtoile(\"Soleil\", 0, 'F', u.getGalaxie(\"VoieLactee\")); //1\n\t\tu.creerObjetFroid(\"Terre\", 150000 , 13000 , 365 , u.getObjet(1)); //2\n\n\t\tu.creerO...
[ "0.75469345", "0.69732004", "0.68334794", "0.6830181", "0.6815821", "0.67865145", "0.6782474", "0.6735157", "0.670108", "0.6694124", "0.66701764", "0.6663301", "0.66365623", "0.66365623", "0.6600992", "0.65706235", "0.65450466", "0.65353173", "0.6533477", "0.6529741", "0.6520...
0.67007935
9
This method adds the User into the Database and checks all Information
public String register() { if (password.equals(passwordConfirm)) { User newUser = new User(username, password); if (dataManager.addUser(newUser)) { FacesMessage message = new FacesMessage("User has been registered successfully."); FacesContext.getCurrentInstance().addMessage(null, message); logger.info("New user has been registered."); return "login.xhtml"; } FacesMessage message = new FacesMessage(FacesMessage.SEVERITY_ERROR, "", "A user with the same username already exists."); FacesContext.getCurrentInstance().addMessage("registration_form:username", message); } else { FacesMessage message = new FacesMessage(FacesMessage.SEVERITY_ERROR, "", "Password confirmation is incorrect."); FacesContext.getCurrentInstance().addMessage("registration_form:password_confirm", message); } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void insert() {//将数据录入数据库\n\t\tUser eb = new User();\n\t\tUserDao ed = new UserDao();\n\t\teb.setUsername(username.getText().toString().trim());\n\t\tString pass = new String(this.pass.getPassword());\n\t\teb.setPassword(pass);\n\t\teb.setName(name.getText().toString().trim());\n\t\teb.setSex(sex1.isSelect...
[ "0.7541678", "0.75332654", "0.7415367", "0.7376554", "0.7352025", "0.7343182", "0.73314804", "0.73100805", "0.7289683", "0.7272568", "0.7257319", "0.7252191", "0.7165235", "0.7160744", "0.7137231", "0.71116835", "0.710751", "0.70818126", "0.70712554", "0.7071235", "0.70665336...
0.0
-1
Returns the Username which is currently stored in this class
public String getUsername() { return username; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getUsername() {\n return username.get();\n }", "public final String getUsername() {\n return username;\n }", "java.lang.String getUsername();", "java.lang.String getUsername();", "java.lang.String getUsername();", "java.lang.String getUsername();", "java.lang.String ge...
[ "0.8630676", "0.83428234", "0.8278542", "0.8278542", "0.8278542", "0.8278542", "0.8278542", "0.8278542", "0.8278542", "0.8278542", "0.8278542", "0.8262178", "0.8209869", "0.8197861", "0.81825316", "0.8175058", "0.81572646", "0.8157224", "0.81269693", "0.8114825", "0.81094307"...
0.81309247
22
Overrides the currently Username with a new one
public void setUsername(String username) { this.username = username; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public final void setUsername(final String usernameNew) {\n this.username = usernameNew;\n }", "public void setUsername(String newUsername) throws UsernameTakenException {\n profile.setUsername(currentUser, newUsername);\n }", "void setUserName(String newName) {\r\n\t\t\tusername = newName;...
[ "0.78754056", "0.75443345", "0.74363285", "0.74186784", "0.7314477", "0.7159822", "0.7150279", "0.7149942", "0.7147307", "0.7115242", "0.7037481", "0.7008691", "0.69510347", "0.6920476", "0.6916076", "0.68797797", "0.6871323", "0.6866368", "0.68559706", "0.685592", "0.6852566...
0.64472055
79
Gets the current Password of a User
public String getPassword() { return password; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getUserPassword() {\n return sp.getString(USER_PASSWORD, null);\n }", "public String getUserPassword() {\r\n return userPassword;\r\n }", "@Override\n\tpublic String getPassword() {\n\t\treturn user.getPassword();\n\t}", "@Override\n\tpublic String getPassword() {\n\t\tretur...
[ "0.8335154", "0.80913156", "0.80669814", "0.8045559", "0.8043482", "0.7723712", "0.7638072", "0.76171917", "0.7608066", "0.7608066", "0.7608066", "0.7608066", "0.7608066", "0.7608066", "0.7608066", "0.7572453", "0.7567704", "0.75548536", "0.75548536", "0.7458556", "0.7452884"...
0.0
-1
Sets the Password of the User
public void setPassword(String password) { this.password = password; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setPassword(String pass);", "public void setPassword(java.lang.String newPassword);", "void setPassword(Password newPassword, String plainPassword) throws NoUserSelectedException;", "void setPassword(String password);", "void setPassword(String password);", "void setPassword(String password);...
[ "0.80735874", "0.8059717", "0.8014657", "0.7969345", "0.7969345", "0.7969345", "0.78679246", "0.77242726", "0.7701972", "0.7696394", "0.7653029", "0.76396793", "0.7578945", "0.75457495", "0.75141346", "0.7484184", "0.74516684", "0.74509174", "0.74452686", "0.74452114", "0.744...
0.0
-1
Gets the confirmation Field of this Class
public String getPasswordConfirm() { return passwordConfirm; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getConfirmPasswordFieldName() {\n return getStringProperty(CONFIRM_PASSWORD_FIELD_NAME_KEY);\n }", "public String getConfirmationKeyFieldName() {\n return getStringProperty(CONFIRMATION_KEY_FIELD_NAME_KEY);\n }", "public String getConfirmationNumber() {\n\t\treturn confirmatio...
[ "0.7491066", "0.74417746", "0.7144694", "0.705081", "0.70144635", "0.7007214", "0.7002134", "0.6986254", "0.6914713", "0.6824727", "0.6814245", "0.631449", "0.61618215", "0.59041333", "0.58476096", "0.5845086", "0.57848865", "0.5690267", "0.5601543", "0.56003994", "0.5597822"...
0.6807124
11
Sets the Password Confirmation
public void setPasswordConfirm(String passwordConfirm) { this.passwordConfirm = passwordConfirm; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setpasswordConfirm(String strConfirmPass){\n\t\tdriver.findElement(passwordConfirm).sendKeys(strConfirmPass);\n\t}", "public void setConfirmPassword(String confirmPassword) {\n this.confirmPassword = confirmPassword;\n }", "public String getPasswordConfirm() {\n return passwordConf...
[ "0.76606977", "0.75665176", "0.7283031", "0.722804", "0.7167293", "0.7141712", "0.68262315", "0.6656274", "0.6629615", "0.6589822", "0.6542785", "0.6525917", "0.6508535", "0.64908177", "0.64353293", "0.64195013", "0.6404883", "0.63645667", "0.635973", "0.62899214", "0.6283256...
0.7429642
2
TODO Autogenerated method stub
public static void main(String[] args) { Vector vec = new Vector<>(); Stack st = new Stack(); st.push("사과"); st.push("바나나"); st.push("수박"); vec.set(0, "a"); System.out.println(vec.get(0)); vec.set(1, "b"); System.out.println(vec.get(0)); System.out.println("st.size() : " + st.size()); for(int i=0;i<st.size();i++) { System.out.println(st.pop()); } System.out.println(st.empty()); System.out.println(st.pop());//담긴 정보를 역순으로 꺼냄. System.out.println(st.empty()); }
{ "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
create a new instance of a Virus object with the keyword: new
public static void main(String[] args) { Virus Ebola = new Virus(); // set member variables on the instance of Virus stored in Herpes Ebola.Baltimore = "V"; Ebola.Order = "Mononegavirales"; Ebola.Family = "Filoviridae"; Ebola.Genus = "Ebolavirus"; Ebola.Tropism = "Anything it can liquefy"; Ebola.HumanOnly = false; Ebola.Envelope = false; Ebola.GenomeSize = 19; // send our Car instance to a helper method to print its member variables displayVirusStats(Ebola); // test its methods Ebola.startReplication(); Ebola.notReplicating(); Ebola.getCurrentSpeed(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public VirusInfo(VirusInfo source) {\n if (source.FileName != null) {\n this.FileName = new String(source.FileName);\n }\n if (source.FilePath != null) {\n this.FilePath = new String(source.FilePath);\n }\n if (source.VirusName != null) {\n this.V...
[ "0.60539454", "0.6005622", "0.5993989", "0.5944623", "0.59413207", "0.5939952", "0.5937029", "0.593615", "0.5913557", "0.59134847", "0.59095275", "0.5718074", "0.56697196", "0.5622203", "0.55991626", "0.5574558", "0.55350447", "0.5486", "0.5479818", "0.5473957", "0.546417", ...
0.5649157
13
Instantiates a new abstract document in couch DB.
public CouchDoc() { super(); docType = getClass().getSimpleName(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public DocumentBase() {\n \n }", "public Document() {\n }", "public DocumentDao() {\n super(Document.DOCUMENT, cn.edu.nju.teamwiki.jooq.tables.pojos.Document.class);\n }", "public MyDocument() {\r\n }", "Documentable createDocumentable();", "public void newDocument();", "public OD...
[ "0.7119784", "0.7075811", "0.6981909", "0.69802916", "0.6758255", "0.668543", "0.6631462", "0.6448937", "0.6375554", "0.6257697", "0.62571007", "0.62466526", "0.62118423", "0.62094223", "0.61975986", "0.6159119", "0.61337906", "0.60703844", "0.6065997", "0.6064922", "0.603908...
0.7144285
0
Update your progress spinner here. percentDone will be between 0 and 100.
public void done(Integer percentDone) { if (percentDone == 100) { mApp.updateDialogProgress(percentDone, "Finishing.."); } else { mApp.updateDialogProgress(percentDone, "Uploading: " + percentDone + "%"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void updateProgressBar() {\n\t\tdouble current = model.scannedCounter;\n\t\tdouble total = model.fileCounter;\n\t\tdouble percentage = (double)(current/total);\n\t\t\n\t\t//Update Progress indicators\n\t\ttxtNumCompleted.setText((int) current + \" of \" + (int) total + \" Completed (\" + Math.round(percent...
[ "0.8147658", "0.770997", "0.7593983", "0.750446", "0.75041693", "0.74399847", "0.7428637", "0.74231666", "0.7355303", "0.7343656", "0.7214138", "0.7214138", "0.71662915", "0.7161115", "0.7059096", "0.7040871", "0.7033615", "0.70136577", "0.69763345", "0.6969798", "0.69130456"...
0.71592134
14
TODO Autogenerated method stub
@Override public void setRoot(BaseController root) { }
{ "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 buildStageByStyle(Stage stage, BaseController root) { }
{ "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 setTitle(String title) { }
{ "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 clearStage() { }
{ "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 BaseController getRoot() { return null; }
{ "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
/ / / /
public final BeanDefinition getBeanDefinition() /* */ { /* 53 */ return this.beanDefinition; /* */ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void divide() {\n\t\t\n\t}", "public static void slashes() {\n\t\tSystem.out.println(\"//////////////////////\");\r\n\r\n\t}", "public abstract String division();", "public void division() {\n\t\tx=1;\n\t\ty=0;\n\t\tz=x/y;\n\t\t\t\t\n\t}", "private boolean slash() {\r\n return MARK(OPERATOR) ...
[ "0.5906264", "0.55749613", "0.5428019", "0.53241616", "0.5294036", "0.527193", "0.52582306", "0.5256754", "0.51585066", "0.5141374", "0.51100975", "0.5097357", "0.5026707", "0.50235814", "0.50100124", "0.49757177", "0.4967908", "0.49668512", "0.4931213", "0.49272057", "0.4915...
0.0
-1
/ / / / / /
public boolean equals(Object obj) /* */ { /* 84 */ if (obj != this) if (!(obj instanceof BeanDefinitionResource)) break label33; label33: return ((BeanDefinitionResource)obj).beanDefinition /* */ /* 86 */ .equals(this.beanDefinition); /* */ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void divide() {\n\t\t\n\t}", "private int parent(int i){return (i-1)/2;}", "private int leftChild(int i){return 2*i+1;}", "public void zeichneQuadrate(){\n for (int i=0; i<10;i++)\n rect (50+i*25,50,25,25);\n }", "public abstract void bepaalGrootte();", "public static void bottomHalf(...
[ "0.5472371", "0.5383522", "0.52979374", "0.5293668", "0.5211566", "0.51842105", "0.5161626", "0.51377255", "0.5100369", "0.5067393", "0.5064298", "0.50376177", "0.49875325", "0.49361488", "0.49140826", "0.49058613", "0.49058613", "0.48946288", "0.48945552", "0.48931476", "0.4...
0.0
-1
/ / / / /
public int hashCode() /* */ { /* 94 */ return this.beanDefinition.hashCode(); /* */ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void divide() {\n\t\t\n\t}", "private int parent(int i){return (i-1)/2;}", "public abstract void bepaalGrootte();", "public void zeichneQuadrate(){\n for (int i=0; i<10;i++)\n rect (50+i*25,50,25,25);\n }", "public void gored() {\n\t\t\n\t}", "public static void bottomHalf() {\n\n ...
[ "0.5654086", "0.5282051", "0.5270874", "0.5268489", "0.5230159", "0.5229372", "0.5205559", "0.51923394", "0.51524484", "0.50993294", "0.50948834", "0.5071109", "0.5043058", "0.5009983", "0.5006536", "0.49739555", "0.49691963", "0.4959123", "0.49568397", "0.49425906", "0.49421...
0.0
-1
Method will replace several spaces for one
public static String trimer (String text){ return text.replaceAll("\\s+", " "); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private String replaceSpaces(String value) {\r\n\t\treturn value.replace(\" \", \"_\");\r\n\t}", "private static String clearSpaces(final String old) {\n return old.replace(\" \", \"\").replace(\"\\n\", \"\");\n }", "private String normalizeSpace(final String arg) {\n return arg.replaceAll(Con...
[ "0.76356333", "0.71835405", "0.71088135", "0.7012349", "0.6969693", "0.6812609", "0.6733112", "0.66506726", "0.6549542", "0.6506281", "0.6483739", "0.6466369", "0.6419597", "0.63816243", "0.6377193", "0.63757485", "0.6373799", "0.6371802", "0.63590443", "0.632985", "0.6308219...
0.63757503
15
Integer[] test = new Integer[5];
private static void mostOccur(int[] is) { Map<Integer, Integer> numberCount = new HashMap<>(); for (int i=0; i<is.length; i++ ) { if(null==numberCount.get(i)) { numberCount.put(i, 1); } else { numberCount.put(i, numberCount.get(i) +1); } } //Iterator<Integer> it = numberCount.keySet().iterator(); Set<Entry<Integer, Integer>> entries= numberCount.entrySet(); int maxcount=1; int maxvalue = 0; for(Entry<Integer, Integer> entry: entries) { if (entry.getValue()>maxcount) { maxcount = entry.getValue(); maxvalue = entry.getKey(); } } if(maxvalue == 0) { System.out.println("All numbers are same"); } else { System.out.println("Most occurance" + maxvalue + "and count" +maxcount); } // TODO Auto-generated method stub }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\r\n public void testPrimitiveArray()\r\n {\r\n test(int[].class);\r\n }", "Array() {\n\t\tarray = new int[0];\n\t}", "FunWithArrays(int size){\r\n\t\tnumbers = new int[size];\r\n\t}", "public void testCrearArrayNoEspecificado(int size) {\n\t\tint[] array = new int[size]; //tempLocal = 1...
[ "0.70531714", "0.6793889", "0.6716661", "0.6539252", "0.6436784", "0.6369646", "0.6334068", "0.63255715", "0.6314506", "0.6278965", "0.6261286", "0.622113", "0.6206232", "0.6177862", "0.61728245", "0.61539215", "0.6148933", "0.61451113", "0.6142796", "0.6140075", "0.608701", ...
0.0
-1
TODO Autogenerated method stub
@Override public void input(float delta) { }
{ "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 update(float delta) { }
{ "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 render3D(Shader shader, RenderingEngine engine) { }
{ "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
Joins a list with a comma and space (", ") delimiter
public static String joinList(List<String> list) { //could use String.join or Stream but I found this approach to consistantly be 150-500ns faster StringBuilder sb = new StringBuilder(list.size()); for (int z = 0; z < list.size() - 1; z++) { sb.append(list.get(z)); sb.append(',').append(' '); } sb.append(list.get(list.size() - 1)); return sb.toString(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String join() {\n String result = \"\";\n\n for(int i = 0; i < list.size(); i++) {\n result += list.get(i);\n if (i < list.size() - 1) {\n result += \", \";\n }\n }\n\n return result;\n }", "...
[ "0.74322814", "0.72151244", "0.71821564", "0.7054247", "0.6997435", "0.69068086", "0.67399114", "0.6652027", "0.6605173", "0.6409783", "0.63822097", "0.63814545", "0.63794965", "0.6361023", "0.63119775", "0.6278715", "0.6213784", "0.6133245", "0.61162853", "0.61045486", "0.60...
0.715169
3
Finds the index of a target String in a list &nbsp;&nbsp;&nbsp;&nbsp; Daniel
public static int binarySearch(List<String> list, String target, boolean ascending) { //Daniel //set the left and right to 0 and the last index of the list int left = 0; int right = list.size() - 1; //repeat while the left position is less than or equal to the right position while (left <= right) { //set the mid to the mean of left and right int mid = (left + right) / 2; //get the comparison value of the list's mid vs the target int comp = list.get(mid).compareTo(target); //if the list's value at mid is the target, return the mid if (comp == 0) { return mid; } else if (comp > 0) { //if the list's value is less than the target, move left or right whether its ascending or descending if (ascending) { right = mid - 1; } else { left = mid + 1; } } else if (comp < 0) { //if the list's value is greater than the target, move left or right whether its ascending or descending if (ascending) { left = mid + 1; } else { right = mid - 1; } } } return -1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static int indexOfName(String nameList, String name) {\r\n int idx = nameList.indexOf(name);\r\n // Calculate matching index.\r\n while (idx != -1) {\r\n if (idx == 0 || nameList.charAt(idx - 1) == ' ') {\r\n int last = idx + name.length();\r\n i...
[ "0.6529076", "0.6281499", "0.6214414", "0.6198538", "0.61483824", "0.6125881", "0.6099913", "0.60458314", "0.6043504", "0.60206485", "0.6012473", "0.59947884", "0.5853138", "0.58439124", "0.5794319", "0.5793986", "0.57769966", "0.5770663", "0.5714241", "0.5712656", "0.5707864...
0.0
-1
Constructor for the Shape object
public BuiltShape(List<IStroke> strokes, List<IShape> subShapes) { super(strokes, subShapes); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Shape()\n\t{\n\t\tinitShape();\n\t}", "public Shape() { this(X_DEFAULT, Y_DEFAULT); }", "protected Shape() {}", "public Shape() {\n\t\tthis(DEFAULT_X_POS, DEFAULT_Y_POS, DEFAULT_DELTA_X, DEFAULT_DELTA_Y, DEFAULT_WIDTH, DEFAULT_HEIGHT);\n\t}", "public NewShape() {\r\n\t\tsuper();\r\n\t}", "public C...
[ "0.8721844", "0.8564739", "0.8535654", "0.8496886", "0.80561227", "0.76693916", "0.76656955", "0.7499112", "0.7483688", "0.73794454", "0.7369391", "0.73314077", "0.73135215", "0.7265152", "0.7264983", "0.7246199", "0.72368973", "0.7228669", "0.72020936", "0.7172947", "0.71430...
0.0
-1
print bullet's position into output.csv file
public static void printBulletPos(double x, double y) { try (PrintWriter pw = new PrintWriter(new FileWriter("res/IO/output.csv", true))) { pw.append(df.format(x) + "," + df.format(y) + "\n"); } catch (IOException e) { e.printStackTrace(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void csv() throws IOException {\n\t\t\n\t\tSystem.out.println(); //spacing\\\n\t\tFileWriter f;\n\t\t\n\t\tif (bundle.getString(\"csvName\").endsWith(\".csv\")) {\n\t\t\tf = new FileWriter(bundle.getString(\"csvName\"));\n\t\t}\n\t\t\n\t\telse {\n\t\t\tf = new FileWriter(bundle.getString(\"csvName\") + \".c...
[ "0.59557", "0.5931691", "0.5894988", "0.5856055", "0.5845286", "0.5745646", "0.5741866", "0.5705297", "0.5668356", "0.5650721", "0.5551817", "0.55312943", "0.55157125", "0.5449354", "0.54387003", "0.539696", "0.53959286", "0.53878564", "0.5386139", "0.53738606", "0.5347867", ...
0.71496964
0
Load from input file
private void loadEnvironment(String filename){ // Code here to read from the file and set up the environment try (BufferedReader br = new BufferedReader(new FileReader(filename))) { String line; while((line = br.readLine()) != null) { String[] values = line.split(","); String type = values[0].replaceAll("[^a-zA-Z0-9]", ""); // remove special characters double x = Double.parseDouble(values[1]); double y = Double.parseDouble(values[2]); switch (type) { case "Zombie": Zombie zombie = new Zombie(x, y); this.zombies.put(zombie.getPosition(), zombie); break; case "Sandwich": Sandwich sandwich = new Sandwich(x, y); this.sandwiches.put(sandwich.getPosition(), sandwich); break; case "Player": this.player = new Player(x, y, Integer.parseInt(values[3])); break; case "Treasure": this.treasure = new Treasure(x, y); break; default: throw new BagelError("Unknown type: " + type); } } } catch (Exception e) { e.printStackTrace(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void load(FileInputStream input) {\n\t\t\r\n\t}", "void load(File file);", "public void load(File source);", "public void load (File file) throws Exception;", "public abstract void load() throws IOException;", "public void load (String argFileName) throws IOException;", "public void load (IFile...
[ "0.80157125", "0.7615317", "0.75221664", "0.7476933", "0.72377944", "0.7124745", "0.71165466", "0.709114", "0.698995", "0.69424576", "0.68646973", "0.6850708", "0.68163294", "0.6807395", "0.6807395", "0.6750391", "0.6736146", "0.6736146", "0.67046946", "0.66972804", "0.667712...
0.0
-1
Performs a state update.
@Override public void update(Input input) { // Logic to update the game, as per specification must go here if (this.endOfGame || input.wasPressed(Keys.ESCAPE)) { Window.close(); } else { // draw background BACKGROUND.drawFromTopLeft(0, 0); // update the frame if (tick > TICK_CYCLE) { tick = 1; // update player's state this.player.update(this); } tick++; // draw all the characters player.draw(); treasure.draw(); for (Point pos: zombies.keySet()) { Zombie zombie = zombies.get(pos); zombie.draw(); } for (Point pos: sandwiches.keySet()) { Sandwich sandwich = sandwiches.get(pos); sandwich.draw(); } if (player.getShot()) { player.getBullet().draw(); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void update( State state );", "public void updateState();", "abstract public void updateState();", "public void update(){\r\n\r\n // update curState based on inputs\r\n // Perform state-transition actions \r\n switch(curState) {\r\n${nextstatecases}\r\n default:\r\n ...
[ "0.8686546", "0.8570105", "0.8432969", "0.78515816", "0.78075385", "0.75114316", "0.74533504", "0.7439313", "0.7423129", "0.73917884", "0.7329464", "0.7291271", "0.72745913", "0.7217299", "0.7187019", "0.7173281", "0.7171262", "0.7171262", "0.71254826", "0.7121088", "0.709857...
0.0
-1
The entry point for the program.
public static void main(String[] args) throws IOException { ShadowTreasure game = new ShadowTreasure(); game.run(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main() {\n \n }", "public static void main() {\n }", "public static void main()\n\t{\n\t}", "public static void main (String []args){\n }", "public static void main(){\n\t}", "public static void main(String []args){\n\n }", "public static void main(String []args){\...
[ "0.7964974", "0.76814234", "0.7663253", "0.7610527", "0.7599025", "0.7528476", "0.7491205", "0.7491205", "0.7456127", "0.7445067", "0.7409405", "0.7394567", "0.7391319", "0.7391319", "0.73896295", "0.73827773", "0.7368514", "0.7368514", "0.7368514", "0.7368514", "0.7368514", ...
0.0
-1
/ access modifiers changed from: packageprivate
public void skipToNextPage(ExtractorInput extractorInput) throws IOException, InterruptedException { if (!skipToNextPage(extractorInput, this.payloadEndPosition)) { throw new EOFException(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private stendhal() {\n\t}", "private Rekenhulp()\n\t{\n\t}", "@Override\n protected void prot() {\n }", "public void method_4270() {}", "@Override\n public void func_104112_b() {\n \n }", "private void m50366E() {\n }", "private void kk12() {\n\n\t}", "public final void mo51373a...
[ "0.71513015", "0.6686406", "0.6558315", "0.6482832", "0.6430476", "0.63856333", "0.63838816", "0.63487375", "0.6330605", "0.62764114", "0.626384", "0.62509346", "0.6237325", "0.62340367", "0.6228612", "0.6197973", "0.6197973", "0.61952", "0.6183631", "0.61797863", "0.6157397"...
0.0
-1
/ access modifiers changed from: packageprivate
public long readGranuleOfLastPage(ExtractorInput extractorInput) throws IOException, InterruptedException { skipToNextPage(extractorInput); this.pageHeader.reset(); while ((this.pageHeader.type & 4) != 4 && extractorInput.getPosition() < this.payloadEndPosition) { this.pageHeader.populate(extractorInput, false); extractorInput.skipFully(this.pageHeader.headerSize + this.pageHeader.bodySize); } return this.pageHeader.granulePosition; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private stendhal() {\n\t}", "private Rekenhulp()\n\t{\n\t}", "@Override\n protected void prot() {\n }", "public void method_4270() {}", "@Override\n public void func_104112_b() {\n \n }", "private void m50366E() {\n }", "private void kk12() {\n\n\t}", "public final void mo51373a...
[ "0.71513015", "0.6686406", "0.6558315", "0.6482832", "0.6430476", "0.63856333", "0.63838816", "0.63487375", "0.6330605", "0.62764114", "0.626384", "0.62509346", "0.6237325", "0.62340367", "0.6228612", "0.6197973", "0.6197973", "0.61952", "0.6183631", "0.61797863", "0.6157397"...
0.0
-1
converts the native type of the importer to a general representation
Map<String, PrimitiveTypeProvider> convert(T data);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void fromNative() {\n fromNative(nativeType);\n }", "ItemImportResult convert(ImportResult importRes);", "public Object elConvertType(Object value);", "TypeImport createTypeImport();", "Datatype externalize(Datatype arg) throws IOException;", "protected Object readFixedType(BinaryReaderE...
[ "0.591095", "0.5675908", "0.5369492", "0.5364225", "0.5322501", "0.5305375", "0.52614516", "0.5252956", "0.5245165", "0.5221491", "0.5202748", "0.51841307", "0.51708955", "0.5165109", "0.5142603", "0.51267016", "0.5124322", "0.5113286", "0.51110584", "0.51008886", "0.5081038"...
0.5016541
23
Creates a new Node
private Node createNode(EventPair ep, Color c, Node parent) { Node node = new Node(); node.ID = ep.ID; node.count = ep.count; node.color = c; node.left = createNullLeaf(node); node.right = createNullLeaf(node); node.parent = parent; return node; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "TNode createTNode();", "void createNode(NodeKey key);", "public void create(NetworkNode networkNode);", "public Node createNode(String p_name) {\n\t\tNode n = new Node(p_name, this);\n\t\taddNode(n);\n\t\treturn n;\n\t}", "void createNode(String path);", "void nodeCreate( long id );", "private BTNode c...
[ "0.8188214", "0.7840141", "0.7820263", "0.7676385", "0.76512", "0.7624149", "0.75629795", "0.73833466", "0.73833466", "0.73833466", "0.73833466", "0.7327956", "0.7261824", "0.7063761", "0.7037866", "0.69451463", "0.69383675", "0.6898864", "0.6898864", "0.6893056", "0.6870757"...
0.6832005
22
Create a new null Node
private Node createNullLeaf(Node parent) { Node leaf = new Node(); leaf.color = Color.BLACK; leaf.isNull = true; leaf.parent = parent; leaf.count = Integer.MAX_VALUE; leaf.ID = Integer.MAX_VALUE; return leaf; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Node() {}", "public Node() {}", "public Node() {}", "public Node() {}", "public Node(){}", "public Node() {\n }", "public Node() {\r\n\t}", "public Node() {\r\n\t}", "public Node() {\n\t}", "public Node()\r\n {\r\n initialize(null);\r\n lbl = id;\r\n }", "TNode...
[ "0.75646275", "0.75646275", "0.75646275", "0.75646275", "0.7357001", "0.7308538", "0.730821", "0.730821", "0.719525", "0.71552277", "0.7132794", "0.707415", "0.706288", "0.70405376", "0.7031102", "0.7027576", "0.69343317", "0.69167966", "0.689596", "0.6806397", "0.6770543", ...
0.6998639
16
Show command formats and accept commands on System.in
private void showMenu() { Scanner sc = new Scanner(System.in); Arguments argument = Arguments.INVALID; System.out.println("Enter command of your choice in the correct format"); do { String command = sc.nextLine(); String[] arguments = command.split(" +"); argument = validateAndReturnType(arguments); switch(argument) { case INCREASE: increase(arguments); break; case REDUCE: reduce(arguments); break; case COUNT: count(arguments); break; case INRANGE: inRange(arguments); break; case NEXT: next(arguments); break; case PREVIOUS: previous(arguments); break; case QUIT: System.exit(0); case INVALID: System.out.println("Please enter a valid command"); break; default: System.out.println("Invalid command. Enter a command in the correct format"); } } while(argument != Arguments.QUIT); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void acceptCommands() {\n\t\tScanner input = new Scanner(System.in);\n\t\tInteractiveCommandParser commandParser = new InteractiveCommandParser(\n\t\t\t\tinput, this);\n\t\tcommandParser.readCommands(); // blocking command reader\n\t}", "@Override\r\n public void getInput() { \r\n \...
[ "0.6617311", "0.65666413", "0.6428126", "0.6397133", "0.6268789", "0.62331295", "0.6206105", "0.6170646", "0.6165398", "0.61364967", "0.6130634", "0.61150795", "0.61112624", "0.6077598", "0.6066234", "0.602722", "0.5968832", "0.5960767", "0.5958024", "0.5950219", "0.59450835"...
0.683464
0
Reads file and make EventPairList
private static void initializeEventCounter(String[] args) { File inFile = null; if (0 < args.length) { inFile = new File(args[0]); } else { System.err.println("Invalid arguments count:" + args.length); System.exit(0); } BufferedReader br = null; try { String sCurrentLine; br = new BufferedReader(new FileReader(inFile)); numberOfPairs = Integer.parseInt(br.readLine()); int readCount = 0; while ((sCurrentLine = br.readLine()) != null && readCount < numberOfPairs) { String[] pair = sCurrentLine.split(" "); if(Integer.parseInt(pair[1]) > 0) eventPairs.add(new EventPair(Integer.parseInt(pair[0]), Integer.parseInt(pair[1]))); readCount++; } } catch (IOException e) { e.printStackTrace(); } finally { try { if (br != null)br.close(); } catch (IOException ex) { ex.printStackTrace(); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<Event> fillArrayList()\r\n {\r\n List<Event> list1=new ArrayList<>();\r\n FileReader fr=null;\r\n \r\n try{\r\n \r\n fr=new FileReader(\"./event.txt\");\r\n BufferedReader bf=new BufferedReader(fr);\r\n String s;\r\n \r\n w...
[ "0.7012403", "0.6345252", "0.6256182", "0.6106577", "0.5911464", "0.588688", "0.5820832", "0.5764471", "0.5714587", "0.56852055", "0.5646854", "0.5637821", "0.56205565", "0.56127435", "0.55974597", "0.5589671", "0.55347735", "0.55261356", "0.5404252", "0.5400054", "0.5399591"...
0.607697
4
Creates a Balanced BST
private Node sortedArrayToBST(List<EventPair> allEvents, int start, int end, Node root1) { if (start > end) { return createNullLeaf(root1); } int mid = (start + end) / 2; Node node = createNode(allEvents.get(mid), Color.BLACK, root1); node.left = sortedArrayToBST(allEvents, start, mid-1, node); node.right = sortedArrayToBST(allEvents, mid+1, end, node); return node; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static BinaryTreeNode getBalancedNode() {\n BinaryTreeNode n10 = new BinaryTreeNode(10);\n BinaryTreeNode n4 = new BinaryTreeNode(4);\n BinaryTreeNode n1 = new BinaryTreeNode(1);\n BinaryTreeNode n5 = new BinaryTreeNode(5);\n BinaryTreeNode n15 = new BinaryTreeNode(15);\n ...
[ "0.70735717", "0.7058056", "0.7056638", "0.69403464", "0.69136006", "0.68965936", "0.6830822", "0.6828348", "0.68180776", "0.6779112", "0.6759093", "0.6741437", "0.6634775", "0.65798616", "0.65213895", "0.65155816", "0.64255565", "0.63421416", "0.63407093", "0.6330116", "0.63...
0.0
-1
Finds Nodes at max level
private List findDeepestNodes(Node root) { Object[] levelInformation = new Object[2]; levelInformation[0] = 0; levelInformation[1] = new ArrayList(); findDeepestNodes(root, 1, levelInformation); return (List) levelInformation[1]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int getMax_depth();", "public int\ngetNodeIndexMax();", "int maxDepth();", "public abstract int getMaxChildren();", "int getMaxLevel();", "abstract int getMaxLevel();", "public Node findMax(){\n if(root!=null){ // มี node ใน tree\n return findMax(root); // Call the recursive version\n ...
[ "0.7176836", "0.7146362", "0.71283054", "0.67607266", "0.6746229", "0.6690512", "0.66211224", "0.6513217", "0.6337186", "0.6296307", "0.6222479", "0.62199736", "0.61936986", "0.6137499", "0.6133723", "0.6106138", "0.6076332", "0.60479796", "0.6047581", "0.5983457", "0.598198"...
0.0
-1
Changes color of list of nodes
private void changeColor(List<Node> listToColor, Color red) { for(Node n: listToColor) n.color = red; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void colorNodes() {\n for (NodeImpl n : supervisedNodes) {\n colorNode(n);\n }\n }", "private void colorNode(NodeImpl node) {\n nodeColorizer.color(node);\n }", "public void nodeColor(String str) { setSelected(node_colors, str); }", "abstract Color nodeColo...
[ "0.77792364", "0.7516249", "0.73559815", "0.7035317", "0.6952689", "0.6832041", "0.67479277", "0.6673734", "0.65496767", "0.6540101", "0.64988786", "0.6482746", "0.64752156", "0.6406925", "0.6397846", "0.6378637", "0.6376738", "0.6334915", "0.63268495", "0.62856746", "0.62534...
0.8030682
0
Validates number of arguments according to type of command
private Arguments validateAndReturnType(String[] arguments) { if(arguments == null || arguments.length == 0 || arguments.length > 3) return Arguments.INVALID; String arg1 = arguments[0].toLowerCase(); if(arg1.equals("increase") || arg1.equals("reduce") || arg1.equals("inrange")){ if(arguments.length != 3) return Arguments.INVALID; else { if(arg1.equals("increase")) return Arguments.INCREASE; else if(arg1.equals("reduce")) return Arguments.REDUCE; else if(arg1.equals("inrange")) return Arguments.INRANGE; } } else if(arg1.equals("next") || arg1.equals("previous") || arg1.equals("count")) { if(arguments.length != 2) return Arguments.INVALID; else { if(arg1.equals("next")) return Arguments.NEXT; else if(arg1.equals("previous")) return Arguments.PREVIOUS; else if(arg1.equals("count")) return Arguments.COUNT; } } else if(arg1.equals("quit")) { return Arguments.QUIT; } else return Arguments.INVALID; return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void checkCmdArgs(int numberOfArgs, String[] args) {\n\t\tif (args.length != numberOfArgs) {\n\t\t\tSystem.out.println(\"Wrong number of command line arguments!\");\n\t\t\tSystem.exit(1);\n\t\t}\n\n\t}", "@Override\n protected boolean hasValidNumberOfArguments(int numberOfParametersEntered) {\n...
[ "0.757293", "0.73984313", "0.734572", "0.73071223", "0.7100211", "0.6853553", "0.6815835", "0.6792771", "0.67386174", "0.67288584", "0.6728622", "0.6710297", "0.6675773", "0.6628087", "0.6619988", "0.6507987", "0.643851", "0.64154655", "0.64095855", "0.63883287", "0.6385233",...
0.5987484
45
Print Count of provided ID
private void count(String[] arguments) { try { int ID = Integer.parseInt(arguments[1]); Node curr = searchID(root, ID); if(curr != null) System.out.printf("%d\n", curr.count); else System.out.println("0"); } catch(NumberFormatException e) { System.out.println("Argument not an Integer");; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int countByid_(long id_);", "public int counter (){\n return currentID;\n }", "public void count() {\n APIlib.getInstance().addJSLine(jsBase + \".count();\");\n }", "@Override\n\tpublic Integer count(Integer id) {\n\t\treturn chiTietDonHangRepository.count(id);\n\t}", "@D...
[ "0.68950975", "0.63320285", "0.63087994", "0.6221604", "0.622085", "0.6183034", "0.6087934", "0.6023458", "0.6022009", "0.6019673", "0.6017509", "0.5997428", "0.59301174", "0.59199077", "0.5911396", "0.58699065", "0.576944", "0.57671744", "0.57586855", "0.5756704", "0.5755700...
0.6696189
1
Seach for Node with Given ID
private Node searchID(Node root, int ID) { if(root == null || root.isNull) { return null; } else { if(root.ID > ID) { return searchID(root.left, ID); } else if(root.ID < ID) return searchID(root.right, ID); else return root; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Node searchNode(int id) {\n\t\tNode node = searchRec(root,id);\n\t\treturn node;\n\t}", "public Node find(int id) {\n return tree.find(id);\n }", "private Node findNode(Graph g, int id){\r\n for(Node n : g.getListNodes()){\r\n if (n.getId() == id){\r\n return ...
[ "0.7768351", "0.73716563", "0.73477364", "0.7195271", "0.69107634", "0.6845389", "0.68153673", "0.6807241", "0.6789337", "0.67320126", "0.6716016", "0.6628473", "0.6593913", "0.65649086", "0.6558813", "0.6465984", "0.63860524", "0.63851434", "0.63806397", "0.63734055", "0.636...
0.63777465
19
Reduce function which searches for the given ID and subtracts the count by the given value and deletes node if count goes below 1
private void reduce(String[] arguments) { try { lastDeletedNode = null; int ID = Integer.parseInt(arguments[1]); int m = Integer.parseInt(arguments[2]); Node curr = searchID(root, ID); if(curr != null) { curr.count -= m; if(curr.count > 0) System.out.printf("%d\n", curr.count); else { delete(root, ID); System.out.println("0"); } } else System.out.println("0"); } catch(NumberFormatException e) { System.out.println("Argument not an Integer"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public long delete(long id) {\n\t\tif (treeMap.containsKey(id)) {\n\t\t\tTreeSet<Long> treeSetToDelete = treeMap.get(id).descriptionSet;\n\t\t\ttreeMap.remove(id);\n\t\t\tremoveFromHashMap(id, treeSetToDelete);\n\t\t\tLong sum = (long) 0;\n\t\t\tfor (Long descId : treeSetToDelete)\n\t\t\t\tsum += descId;\n\t\t\tre...
[ "0.6055936", "0.60251147", "0.5921402", "0.54417914", "0.5420712", "0.5385718", "0.5350779", "0.53485465", "0.5340348", "0.5324799", "0.5288117", "0.5287906", "0.5286759", "0.52746296", "0.5256809", "0.52544075", "0.52544075", "0.5240879", "0.52403", "0.52292264", "0.52255666...
0.6944848
0
Delete Node with given ID by searching for it recursively
private void delete(Node curr, int ID, AtomicReference<Node> rootRef) { if(curr == null || curr.isNull) { return; } if(curr.ID == ID) { if(curr.right.isNull || curr.left.isNull) { deleteDegreeOneChild(curr, rootRef); } else { Node n = findSmallest(curr.right); curr.ID = n.ID; curr.count = n.count; delete(curr.right, n.ID, rootRef); } } if(curr.ID < ID) { delete(curr.right, ID, rootRef); } else { delete(curr.left, ID, rootRef); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void delete(int id) { \n\t\tint save = findPosition(id);\n\t\t\n\t\tif (save == numOfNode - 1) {\n\t\t\tnode [save] = null;\n\t\t\tnumOfNode--;\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t// dich dan cac node vao\n\t\tfor (int i = save; i < numOfNode - 1; i++) {\n\t\t\tnode[i] = node[i + 1];\n\t\t}\n\t\t\n\t\tnode[num...
[ "0.7153713", "0.70861316", "0.7043627", "0.69348013", "0.69101816", "0.6689449", "0.6596315", "0.65646315", "0.6555323", "0.6458471", "0.6428178", "0.6418292", "0.63942176", "0.6377273", "0.6355942", "0.63246924", "0.6291938", "0.62560314", "0.6233057", "0.6216738", "0.613261...
0.7026108
3
Find smallest node in the right subtree which will be the leftmost node
private Node findSmallest(Node curr) { Node prev = null; while(curr != null && !curr.isNull) { prev = curr; curr = curr.left; } return prev != null ? prev : curr; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Node minNode(Node node) {\n Node updt = node;\n // Finding the leftmost leaf\n while (updt.left != null) {\n updt = updt.left;\n }\n return updt;\n }", "public TreeNode smallest() {\n\t\tif(root == null) {\n\t\t\treturn null;\n\...
[ "0.7648361", "0.7640124", "0.76328903", "0.7569173", "0.74299437", "0.7423698", "0.7407427", "0.73587775", "0.7306592", "0.72847277", "0.72515523", "0.7241585", "0.7226698", "0.7200556", "0.7195094", "0.71618", "0.7125935", "0.71196187", "0.70959204", "0.70911497", "0.7081644...
0.6973778
28
Recoloring and deletion of a node that has 1 or 0 children
private void deleteDegreeOneChild(Node curr, AtomicReference<Node> rootRef) { Node child = curr.right.isNull ? curr.left : curr.right; replaceNode(curr, child, rootRef); if(curr.color == Color.BLACK) { if(child.color == Color.RED) { child.color = Color.BLACK; } else { adjustRootDeficiency(child, rootRef); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void uncolorChildren(Node node) {\r\n int children = node.getChildren().size();\r\n for (int k = 0; k < children; k++) {\r\n colorObject(\"p\" + node.getChildren().get(k).getId(), edgeColor);\r\n }\r\n }", "public void removeChildren() {\r\n this.children.clear();\r\n child...
[ "0.6886837", "0.6371702", "0.6318806", "0.6236527", "0.6187623", "0.61768115", "0.6146349", "0.6124938", "0.61199623", "0.6114553", "0.6096948", "0.6081711", "0.6063717", "0.6055702", "0.60556686", "0.6042428", "0.6020219", "0.60190904", "0.6016015", "0.6007433", "0.59820366"...
0.6745795
1
Replace 2 given nodes with each other depending on if it is right or left subtree
private void replaceNode(Node curr, Node child, AtomicReference<Node> rootRef) { child.parent = curr.parent; if(curr.parent == null) { rootRef.set(child); } else { if(isLeftChild(curr)) { curr.parent.left = child; } else { curr.parent.right = child; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private BSTNode<E> replacementSubtreeFromChildren(BSTNode<E> left,\r\n\t\t\tBSTNode<E> right) {\r\n\t\t\r\n\t\tif (left == null && right == null)\r\n\t\t\treturn null;\r\n\t\t\r\n\t\tif (left != null && right == null)\r\n\t\t\treturn left;\r\n\t\tif (left == null && right != null)\r\n\t\t\treturn right;\r\n\t\t\r\...
[ "0.6940098", "0.6822167", "0.61432135", "0.61365575", "0.6026023", "0.59851104", "0.5970814", "0.58959424", "0.58939064", "0.58906966", "0.5876114", "0.5859555", "0.58589464", "0.5854872", "0.5849592", "0.5849549", "0.58176625", "0.5808475", "0.57621676", "0.57401735", "0.567...
0.5882676
10
Change root reference if root is deleted
private void adjustRootDeficiency(Node deficientNode, AtomicReference<Node> rootRef) { if(deficientNode.parent == null) { rootRef.set(deficientNode); return; } adjustDeficientRedSiblingNode(deficientNode, rootRef); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void delete() {\n this.root = null;\n }", "private void deleteTree(tnode root){\n if (root != null)\n root = null;\n }", "public void setRootRef(Reference rootRef) {\n this.rootRef = rootRef;\n }", "public void updateDatabaseRefBackwards() {\n // we want...
[ "0.6917451", "0.6869203", "0.67716706", "0.67688346", "0.676575", "0.672081", "0.66065466", "0.6554575", "0.64103764", "0.6358321", "0.63102275", "0.62903094", "0.6261407", "0.6259472", "0.62429154", "0.6210483", "0.61859655", "0.61607337", "0.61127335", "0.6074905", "0.60738...
0.6608195
6
Do a right or a left rotate depending on if the sibling is left child or right child and proceed to further cases
private void adjustDeficientRedSiblingNode(Node deficientNode, AtomicReference<Node> rootRef) { Node sibling = getSibling(deficientNode); if(sibling.color == Color.RED) { if(isLeftChild(sibling)) { rotateRight(sibling, true); } else { rotateLeft(sibling, true); } if(sibling.parent == null) { rootRef.set(sibling); } } adjustDeficientBlackSiblingNode(deficientNode, rootRef); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private SplayNode rotateWhenXisLeftChildOfRightChild(SplayNode X)\n\t{\n\t\tX = rotateWhenLeftOfRoot(X);\n\t\t//G.setRight(X);\n\t\tX = rotateWhenRightOfRoot(X);\t\t\n\t\treturn X;\n\t}", "private SplayNode rotateWhenXisRightChildOfLeftChild(SplayNode X)\n\t{\n\t\tX = rotateWhenRightOfRoot(X);\n\t\t//G.setLeft(X...
[ "0.72173697", "0.71042514", "0.69134307", "0.69117177", "0.68537575", "0.6758016", "0.67336446", "0.6725796", "0.66538835", "0.6645693", "0.65788144", "0.65665364", "0.656531", "0.6536455", "0.6500423", "0.64900637", "0.6486682", "0.6485075", "0.6463882", "0.6460132", "0.6458...
0.0
-1
Change siblings color to become red and push the problem further up nd start checking all cases
private void adjustDeficientBlackSiblingNode(Node deficientNode, AtomicReference<Node> rootRef) { Node sibling = getSibling(deficientNode); if(deficientNode.parent.color == Color.BLACK && sibling.color == Color.BLACK && sibling.left.color == Color.BLACK && sibling.right.color == Color.BLACK) { sibling.color = Color.RED; adjustRootDeficiency(deficientNode.parent, rootRef); } else { adjustRedParentNode(deficientNode, rootRef); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void handleColors(int newElement) \n { \n // flip the colors of the node \n current.color = RED; //make current node RED \n current.leftChild.color = BLACK; //make leftChild BLACK \n current.rightChild.color = BLACK; //make rightChild BLACK \n \n //check...
[ "0.6190763", "0.59188503", "0.5837364", "0.5796091", "0.5788145", "0.56647986", "0.56470597", "0.5641603", "0.56183577", "0.55771244", "0.5519771", "0.551073", "0.550962", "0.54856837", "0.5483068", "0.5481317", "0.5475924", "0.54694", "0.54673195", "0.5434869", "0.5395247", ...
0.54591525
19
Exchange the color of parent and sibling to maintain red black tree properties
private void adjustRedParentNode(Node deficientNode, AtomicReference<Node> rootRef) { Node sibling = getSibling(deficientNode); if(deficientNode.parent.color == Color.RED && sibling.color == Color.BLACK && sibling.left.color == Color.BLACK && sibling.right.color == Color.BLACK) { sibling.color = Color.RED; deficientNode.parent.color = Color.BLACK; return; } else { adjustRedChildBlackSibling(deficientNode, rootRef); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void adjustBlackSiblingRedChild(Node deficientNode, AtomicReference<Node> rootRef) {\n\t\tNode sibling = getSibling(deficientNode);\n\t\tsibling.color = sibling.parent.color;\n\t\tsibling.parent.color = Color.BLACK;\n if(isLeftChild(deficientNode)) {\n \tsibling.right.color = Color.BLACK;\n ...
[ "0.69408596", "0.6752729", "0.6488227", "0.635423", "0.63443106", "0.62572217", "0.6212134", "0.6210272", "0.6199966", "0.61758953", "0.61163753", "0.6114347", "0.6084716", "0.60603917", "0.60085887", "0.6004235", "0.6000379", "0.59842885", "0.5960631", "0.595199", "0.5944737...
0.71321404
0
Do a rotation around sibling depending on if its a right child or left child.
private void adjustRedChildBlackSibling(Node deficientNode, AtomicReference<Node> rootRef) { Node sibling = getSibling(deficientNode); if(sibling.color == Color.BLACK) { if (isLeftChild(deficientNode) && sibling.right.color == Color.BLACK && sibling.left.color == Color.RED) { rotateRight(sibling.left, true); } else if (!isLeftChild(deficientNode) && sibling.left.color == Color.BLACK && sibling.right.color == Color.RED) { rotateLeft(sibling.right, true); } } adjustBlackSiblingRedChild(deficientNode, rootRef); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private SplayNode rotateWhenXisLeftChildOfRightChild(SplayNode X)\n\t{\n\t\tX = rotateWhenLeftOfRoot(X);\n\t\t//G.setRight(X);\n\t\tX = rotateWhenRightOfRoot(X);\t\t\n\t\treturn X;\n\t}", "private void rotate(Node<T> child, Node<T> parent) throws IllegalArgumentException {\n //right child, perform left ro...
[ "0.7194681", "0.7191127", "0.70358264", "0.6841284", "0.67913824", "0.67316973", "0.6656021", "0.6642576", "0.6637564", "0.65364987", "0.64925677", "0.64687353", "0.64673424", "0.64271367", "0.6406685", "0.6391921", "0.6353763", "0.6340983", "0.63321877", "0.63075984", "0.629...
0.0
-1
Left or right rotation centered at the parent and color changes as below
private void adjustBlackSiblingRedChild(Node deficientNode, AtomicReference<Node> rootRef) { Node sibling = getSibling(deficientNode); sibling.color = sibling.parent.color; sibling.parent.color = Color.BLACK; if(isLeftChild(deficientNode)) { sibling.right.color = Color.BLACK; rotateLeft(sibling, false); } else { sibling.left.color = Color.BLACK; rotateRight(sibling, false); } if(sibling.parent == null) { rootRef.set(sibling); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void rotateLeft(Node curr, boolean colorChangeNeeded) {\n\t\tNode parent = curr.parent;\n\t\tcurr.parent = parent.parent;\n if(parent.parent != null) {\n if(parent.parent.right == parent) {\n \tparent.parent.right = curr;\n } else {\n \tparent.parent.left ...
[ "0.6311247", "0.6265449", "0.62634593", "0.6181769", "0.6023304", "0.6007119", "0.60026526", "0.600007", "0.59733874", "0.5917059", "0.59151924", "0.5907967", "0.5828185", "0.58156395", "0.57905275", "0.5787881", "0.57858694", "0.5750646", "0.5743787", "0.5740345", "0.5732259...
0.0
-1
Increase the count of the node with given Id or insert if it doesnt exist
private void increase(String[] arguments) { try { lastInsertedNode = null; int ID = Integer.parseInt(arguments[1]); int m = Integer.parseInt(arguments[2]); Node curr = searchID(root, ID); if(curr != null) { curr.count += m; System.out.printf("%d\n", curr.count); } else { insertNode(ID, m); System.out.printf("%d\n", lastInsertedNode.count); } } catch(NumberFormatException e) { System.out.println("Argument not an Integer");; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void Increase(int key, int incVal){\n\t\tNode res = increaseKey(root,key,incVal);\n\t\tif(res==nil){\n\t\t\tinsert(key,incVal);\n\t\t\tres = getNode(root,key);\n\t\t\tSystem.out.println(res.count);\n\t\t}else{\n\t\t\n\t\t\tSystem.out.println(res.count);\n\t\t}\n\t}", "public void inc(String key) {\n ...
[ "0.63155425", "0.61664796", "0.6088119", "0.5996125", "0.59724635", "0.5872467", "0.5861303", "0.58418024", "0.5823723", "0.58142686", "0.5806739", "0.57994217", "0.57975835", "0.5792597", "0.5783106", "0.57720035", "0.5754532", "0.5745111", "0.5744401", "0.572969", "0.572074...
0.67872673
0
Recursively look for the right place to insert and do rotations and color flips to maintain properties
private Node insertNode(Node parent, Node curr, EventPair eventPair) { if(curr == null || curr.isNull) { if(parent != null) { lastInsertedNode = createNode(eventPair, Color.RED, parent); return lastInsertedNode; } else { lastInsertedNode = createNode(eventPair, Color.BLACK, parent); return lastInsertedNode; } } else { boolean toLeft = false; if(curr.ID > eventPair.ID) { Node n = insertNode(curr, curr.left, eventPair); if (n == curr.parent) return n; curr.left = n; toLeft = true; } else { Node n = insertNode(curr, curr.right, eventPair); if (n == curr.parent) return n; curr.right = n; toLeft = false; } if(toLeft) { if(curr.color == Color.RED && curr.left.color == Color.RED) { Node sibling = getSibling(curr); if(sibling == null || sibling.color == Color.BLACK) { if(isLeftChild(curr)) { rotateRight(curr, true); } else { rotateRight(curr.left, false); curr = curr.parent; rotateLeft(curr, true); } } else { curr.color = Color.BLACK; sibling.color = Color.BLACK; if(curr.parent.parent != null) { curr.parent.color = Color.RED; } } } } else { if(curr.color == Color.RED && curr.right.color == Color.RED) { Node sibling = getSibling(curr); if(sibling == null || sibling.color == Color.BLACK) { if(!isLeftChild(curr)) { rotateLeft(curr, true); } else { rotateLeft(curr.right, false); curr = curr.parent; rotateRight(curr, true); } } else { curr.color = Color.BLACK; sibling.color = Color.BLACK; if(curr.parent.parent != null) { curr.parent.color = Color.RED; } } } } } return curr; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void fixInsert(Node<E> z) {\n\t\twhile (z.getParent().getColor() == 'R') {\n\t\t\tif (z.getParent() == z.getParent().getParent().getLeftChild()) {\n\t\t\t\tNode<E> y = z.getParent().getParent().getRightChild();\n\t\t\t\t//case 1 if z.p is the root, then z.p is black\n\t\t\t\tif (y.getColor() == 'R') {\n\t\t...
[ "0.6576519", "0.6119875", "0.57789576", "0.575808", "0.5746525", "0.56303525", "0.5466985", "0.54514694", "0.5281354", "0.52758616", "0.5168111", "0.51478153", "0.51183784", "0.51009727", "0.5087714", "0.506674", "0.5045469", "0.5031672", "0.50098175", "0.49852702", "0.498178...
0.50142956
18
Rotate left centered at Node curr
private void rotateLeft(Node curr, boolean colorChangeNeeded) { Node parent = curr.parent; curr.parent = parent.parent; if(parent.parent != null) { if(parent.parent.right == parent) { parent.parent.right = curr; } else { parent.parent.left = curr; } } Node left = curr.left; curr.left = parent; parent.parent = curr; parent.right = left; if(left != null) { left.parent = parent; } if(colorChangeNeeded) { curr.color = Color.BLACK; parent.color = Color.RED; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Node rotateLeft() {\n Node right = this.rightChild;\n this.rightChild = right.leftChild;\n right.leftChild = this;\n\n this.updateHeight();\n right.updateHeight();\n\n return right;\n }", "Node leftRotate(Node x) \n { \n ...
[ "0.7467208", "0.72249115", "0.7212097", "0.7200982", "0.71949226", "0.7190225", "0.71398294", "0.7136763", "0.713255", "0.7101806", "0.7010111", "0.69917595", "0.6989154", "0.698838", "0.69838816", "0.69654644", "0.6954049", "0.6946652", "0.6933344", "0.6923265", "0.6917473",...
0.74857605
0
Rotate Right centered at Node curr
private void rotateRight(Node curr, boolean colorChangeNeeded) { Node parent = curr.parent; curr.parent = parent.parent; if(parent.parent != null) { if(parent.parent.right == parent) { parent.parent.right = curr; } else { parent.parent.left = curr; } } Node right = curr.right; curr.right = parent; parent.parent = curr; parent.left = right; if(right != null) { right.parent = parent; } if(colorChangeNeeded) { curr.color = Color.BLACK; parent.color = Color.RED; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Node rotateRight() {\n Node left = this.leftChild;\n this.leftChild = left.rightChild;\n left.rightChild = this;\n\n this.updateHeight();\n left.updateHeight();\n\n return left;\n }", "Node rightRotate(Node y) \n { \n No...
[ "0.7490163", "0.709494", "0.70303994", "0.7030096", "0.7011758", "0.7002982", "0.69964695", "0.6990941", "0.6986126", "0.69831973", "0.69172806", "0.69005346", "0.6891575", "0.6891219", "0.68372023", "0.6816789", "0.68104005", "0.6789751", "0.67766446", "0.6761528", "0.670837...
0.73693866
1
check if given node is left of its parent
private boolean isLeftChild(Node curr) { if(curr.parent.left == curr) { return true; } else { return false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract boolean hasLeftChild(Position<E> p);", "@Override\r\n\tpublic boolean hasLeftChild() {\n\t\treturn left!=null;\r\n\t}", "protected boolean isLeftChild(BTNode<E> v){\n\t\tif (isRoot(v)) return false;\n\t\treturn (v == (v.parent()).leftChild()); \n\t}", "private boolean canDoLeftFusion(TFNo...
[ "0.74117994", "0.73229104", "0.73036546", "0.70282876", "0.6877562", "0.68240595", "0.6775533", "0.6773442", "0.6773442", "0.6717809", "0.67141986", "0.6693691", "0.6677887", "0.663998", "0.6621821", "0.66167504", "0.66116863", "0.6598954", "0.6596932", "0.653637", "0.6524418...
0.7642845
0
get a non null sibling
private Node getSibling(Node curr) { Node parent = curr.parent; if(isLeftChild(curr)) { return parent.right.isNull ? null : parent.right; } else { return parent.left.isNull ? null : parent.left; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public SimpleSelector getSiblingSelector();", "HNode getPreviousSibling();", "HNode getNextSibling();", "@Override\r\n\t\tpublic Node getNextSibling()\r\n\t\t\t{\n\t\t\t\treturn null;\r\n\t\t\t}", "@Override\n\tpublic Node getNextSibling() {\n\t\treturn null;\n\t}", "public Node getSiblingNode() {\n r...
[ "0.77202976", "0.7596848", "0.7499671", "0.74274427", "0.73229694", "0.7214888", "0.71728784", "0.71042246", "0.7076151", "0.7040893", "0.69076854", "0.6806617", "0.6644479", "0.65603375", "0.65597504", "0.65326816", "0.649971", "0.6417922", "0.6336124", "0.63200045", "0.6295...
0.6939084
10
Print count of node events in range
private void inRange(String[] arguments) { try { int IDLow = Integer.parseInt(arguments[1]); int IDHigh = Integer.parseInt(arguments[2]); totalInRangeCount = 0; countInRange(root, IDLow, IDHigh); System.out.printf("%d\n",totalInRangeCount); } catch(NumberFormatException e) { System.out.println("Argument not an Integer");; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int getNodeCount();", "int getNodeCount();", "int getNodeStatusListCount();", "int getNodesCount();", "int getNodesCount();", "private int rangeCount(BSTNode node, int min, int max) {\r\n \r\n // if the node is NOT null, execute statement\r\n if (node != null) {\r\n \r\n ...
[ "0.6528702", "0.6528702", "0.6249553", "0.6224189", "0.6224189", "0.60106844", "0.59380674", "0.5855661", "0.58388424", "0.58139277", "0.57941693", "0.57875186", "0.57323605", "0.5728772", "0.57035655", "0.569783", "0.56902283", "0.5654327", "0.56392586", "0.5622169", "0.5574...
0.5653239
18
summation of counts of nodes in range
private void countInRange(Node curr, int IDLow, int IDHigh) { if(curr == null || curr.isNull) return; if(IDLow < curr.ID) countInRange(curr.left, IDLow, IDHigh); if(IDLow <= curr.ID && IDHigh >= curr.ID) totalInRangeCount += curr.count; if(IDHigh > curr.ID) countInRange(curr.right, IDLow, IDHigh); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int totalNumberOfNodes();", "int getNodesCount();", "int getNodesCount();", "int getNodeCount();", "int getNodeCount();", "private int rangeCount(BSTNode node, int min, int max) {\r\n \r\n // if the node is NOT null, execute statement\r\n if (node != null) {\r\n \r\n ...
[ "0.69355226", "0.6821367", "0.6821367", "0.6692", "0.6692", "0.65349466", "0.64173055", "0.6365155", "0.63255787", "0.63230133", "0.6286127", "0.62719727", "0.6209771", "0.61775166", "0.61713046", "0.61669445", "0.61552036", "0.6152829", "0.61506706", "0.6122215", "0.6086339"...
0.5486659
96
Print successor of given ID
private void next(String[] arguments) { try { int ID = Integer.parseInt(arguments[1]); successor = null; findSuccessor(root, ID); if(successor == null) System.out.println("0 0"); else System.out.printf("%d %d\n", successor.ID, successor.count); } catch(NumberFormatException e) { System.out.println("Argument not an Integer");; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Node findSuccessor(int id);", "public Node findSuccessor(int id) {\n\t\treturn findPredecessor(id).getSuccessor();\n\t}", "public void printSteps() {\n\t\tfor (int y = 0; y < idNode.length; y++) {\r\n\t\t\tint x=y;\r\n\t\t\tString steps = \"\" + x;\r\n\t\t\twhile (idNode[x] != x) {\r\n\t\t\t\tx = idNode...
[ "0.6388862", "0.63684785", "0.5890031", "0.56801325", "0.54649264", "0.5453916", "0.5381197", "0.53480726", "0.53443074", "0.5343011", "0.53310776", "0.52922463", "0.5283929", "0.527717", "0.52661145", "0.5253951", "0.5224086", "0.52064514", "0.5201845", "0.5173921", "0.51647...
0.6140206
2
print previous node to given ID
private void previous(String[] arguments) { try { int ID = Integer.parseInt(arguments[1]); predecessor = null; findPredecessor(root, ID); if(predecessor == null) System.out.println("0 0"); else System.out.printf("%d %d\n", predecessor.ID, predecessor.count); } catch(NumberFormatException e) { System.out.println("Argument not an Integer");; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Node setPrevNode(Node node);", "public void Previous(int key){\n\t\tif(search(key)!=nil){\n\t\t\tNode res = getPrev(root,key,nil);\n\t\t\tif(res != nil){\n\t\t\t\tSystem.out.println(res.id + \" \" + res.count);\n\t\t\t}else{\n\t\t\t\tSystem.out.println(\"0 0\");\n\t\t\t}\n\t\t}else{\n\t\t\tint prev = find...
[ "0.66706735", "0.65957165", "0.65472466", "0.6471243", "0.6375785", "0.63664687", "0.6336752", "0.6278048", "0.62750053", "0.6236637", "0.6194814", "0.6167605", "0.6166651", "0.61510843", "0.61475414", "0.6122371", "0.6108985", "0.607903", "0.60566986", "0.6008315", "0.596192...
0.65072405
3
Created by amsalaye on 27.09.2017.
public interface LoadFile { public String loadFile(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "private stendhal() {\n\t}", "public final void mo51373a() {\n }", "@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\r\n\t...
[ "0.6026409", "0.5876886", "0.5794702", "0.5727597", "0.56935066", "0.56935066", "0.56619984", "0.5625629", "0.56248957", "0.56112695", "0.5603768", "0.5601657", "0.559713", "0.5570197", "0.55515414", "0.55276316", "0.55276316", "0.55276316", "0.55276316", "0.55276316", "0.552...
0.0
-1
This database is only a cache for online data, so its upgrade policy is to simply to discard the data and start over
public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) { db.execSQL(SQL_DELETE_RECEIPTS_TABLE); db.execSQL(SQL_DELETE_LOGOTYPES_TABLE); onCreate(db); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void wipeDatabaseData() {\n\t\tdbHelper.onUpgrade(database, 0, 1);\n\t}", "void removeAllData() throws DatabaseNotAccessibleException;", "@Override\n public void reDownloadDB(String newVersion)\n {\n }", "@Override\r\n\tpublic void onUpgrade(SQLiteDatabase db, int oldVersion, int newV...
[ "0.6651103", "0.6493461", "0.6361917", "0.62000734", "0.6153752", "0.61204404", "0.60921866", "0.6032196", "0.6021139", "0.5969249", "0.592665", "0.5905009", "0.58838797", "0.5874045", "0.5865403", "0.5839596", "0.5819827", "0.5817104", "0.5808417", "0.57606304", "0.5728998",...
0.0
-1
Created by wangjichuan on 17/4/18.
public interface SchoolService { public School findById(Long id); public boolean save(School school); public List<School> list(); }
{ "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\r...
[ "0.62773645", "0.62236255", "0.60596126", "0.6043081", "0.5983559", "0.5983559", "0.5962528", "0.5925397", "0.5864218", "0.58604443", "0.585863", "0.58549935", "0.5838504", "0.5827725", "0.581192", "0.5811169", "0.58027816", "0.5782438", "0.57771355", "0.57685804", "0.5751952...
0.0
-1
Account bySignupId = accountRepository.findBySignUpId(account.getSignUpId()); bySignupId.setNickname(nicknameForm.getNickname()); accountRepository.save(bySignupId); login(bySignupId); return bySignupId;
public void updateNickname(Account account, NicknameForm nicknameForm) { account.setNickname(nicknameForm.getNickname()); accountRepository.save(account); login(account); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void saveAccount() {\n\n }", "@PostMapping(\"/addAcc\")\n public userAccount setUserAccount(@RequestBody userAccount account) {\n// System.out.println(\"Email:\"+account.getEmail());\n// System.out.println(\"username:\"+account.getUsername());\n// System.out.println(\"pass:\"+ac...
[ "0.69174236", "0.66953236", "0.6576973", "0.6449398", "0.6442507", "0.64127445", "0.6372476", "0.6336743", "0.63213235", "0.6294341", "0.6246954", "0.62169296", "0.6165305", "0.61650807", "0.61239564", "0.6114369", "0.6112284", "0.61007345", "0.61002064", "0.6095183", "0.6082...
0.5982575
29
Fin parte perfil Usuario Parte Incidencias
@SuppressWarnings("unchecked") public List<Departamento> addDepartamentos() { Query queryConsulta = em.createNamedQuery("Departamento.findAll"); List<Departamento> listaDepartamentos = (List<Departamento>) queryConsulta.getResultList(); return listaDepartamentos; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void accionUsuario() {\n\t\t\r\n\t}", "public void altaUsuario();", "@Override\r\n\tpublic void analizarUsuario() {\n\t\tfor(IAsesoria ia : usuarios) {\r\n\t\t\tia.analizarUsuario();\r\n\t\t}\t\r\n\t}", "public void subeUsuario() {\n\t\tEditText nicknameText = (EditText) findViewById(R.id.nicknameE...
[ "0.80761707", "0.7040025", "0.6990654", "0.6906975", "0.67292136", "0.67058736", "0.66607213", "0.6645702", "0.65543836", "0.65380305", "0.653527", "0.6535127", "0.651902", "0.6508909", "0.6508606", "0.6506933", "0.6501166", "0.6473068", "0.6470648", "0.646389", "0.646389", ...
0.0
-1
Fin Crear incidencia Listar incidencias
public Departamento getDepartamento(String rol, String email) { if(rol.equals("superadmin") || rol.equals("manager") || rol.equals("user")) { rol = "%"; email = "%"; } Departamento departamento = new Departamento(); try { String consulta = "select u.departamento from Usuario u where u in " +"(select g.usuario from Grupo g where " +"g.usuario.email like :email and g.rol.idrol like :rol and u.departamento is not null)"; Query queryconsulta = em.createQuery(consulta); queryconsulta.setParameter("email", email); queryconsulta.setParameter("rol", rol); departamento = (Departamento) queryconsulta.getSingleResult(); } catch (javax.persistence.NoResultException e) { // TODO: handle exception } return departamento; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void consultartiposincidentes() {\n\n db= con.getWritableDatabase();\n TipoIncidente clase_tipo_incidente= null;\n tipoincidentelist= new ArrayList<TipoIncidente>();\n //CONSULTA\n Cursor cursor=db.rawQuery(\"select codigo_incidente,tipo_incidente from \" +Utilitario.TABL...
[ "0.66084796", "0.6485477", "0.63192344", "0.62680054", "0.620065", "0.61323404", "0.60848415", "0.60303193", "0.60185343", "0.6011189", "0.5983295", "0.59817445", "0.596537", "0.5964568", "0.59628004", "0.5948695", "0.59469175", "0.59133655", "0.5863084", "0.58610564", "0.585...
0.0
-1
TODO Autogenerated method stub
public static void main(String[] args) { System.out.println("" +ToUtf8Util.toHexString("大连")); try { System.out.println("" + URLEncoder.encode("大连","utf-8")); } catch (UnsupportedEncodingException e) { // TODO Auto-generated catch block e.printStackTrace(); } }
{ "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
Creates a new dynamic sidebar with the given title.
@NotNull MutableSidebar<@NotNull ?> createSidebar(@NotNull TextModel<@NotNull Player> title);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private JPanel createPanel(String title) {\n\t\tJPanel panel = new JPanel();\n\t\tpanel.setLayout(new GridLayout(0, 1));\n\t\tpanel.setBorder(new TitledBorder(new EtchedBorder(), title));\n\t\treturn panel;\n\t}", "protected JPanel createTitledPanel(String title) {\r\n JPanel panel = new JPanel(new GridBa...
[ "0.6048729", "0.57682157", "0.57317024", "0.5576559", "0.5204918", "0.5185936", "0.51591307", "0.5067479", "0.50627226", "0.5044784", "0.50405115", "0.5008266", "0.49776042", "0.49706146", "0.49691093", "0.49613175", "0.49554658", "0.49345848", "0.49221882", "0.4889649", "0.4...
0.75809056
0
do something after api executor
default void doProcessor(URLBuilder builder, APIResult result){}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void execute() {\n\n\t}", "public void execute() {\n }", "public void execute() {\n\t\t\r\n\t}", "public void execute() {\n\t\t\r\n\t}", "public void execute() {\n\t\t\r\n\t}", "public void execute() {\r\n\t\r\n\t}", "public void execute() {\n\t\t\n\t}", "public void afterExecution(final Ob...
[ "0.6630955", "0.66198224", "0.658727", "0.658727", "0.658727", "0.65748376", "0.6510095", "0.65069014", "0.64957535", "0.64622986", "0.64622986", "0.64591175", "0.64541715", "0.6452944", "0.64378303", "0.64238507", "0.6421294", "0.6408372", "0.6408372", "0.6408372", "0.640837...
0.0
-1
Method for Surface Area
public double getSurfaceAreaB() { double valSB = (2*(lb*wb))+(2*(lb*hb))+(2*(wb*hb)); return valSB; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract float surfaceArea();", "public abstract double getSurfacearea();", "public double surfaceArea()\r\n {\r\n double surfaceArea = baseArea() + sideArea();\r\n return surfaceArea;\r\n }", "public double getSurfaceArea() {\n\n return surfaceArea;\n }", "private double Sur...
[ "0.856072", "0.84794736", "0.8028971", "0.7970885", "0.7935426", "0.7933229", "0.79259145", "0.78778", "0.77994376", "0.76781774", "0.7648069", "0.73577845", "0.7334829", "0.7293578", "0.7293578", "0.7277117", "0.7230197", "0.7230197", "0.7230197", "0.72268987", "0.71403444",...
0.0
-1
The frame to be added to the panel
public AddStationPanel(JFrame frame) { mainFrame = frame; initialize(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public FrameInsert() {\n initComponents();\n }", "public JFrame getFrame() {\r\n\t\treturn frame;\r\n\t}", "public JFrame getFrame(){\n\t\treturn this.frame;\n\t}", "public frame() {\r\n\t\tadd(createMainPanel());\r\n\t\tsetTitle(\"Lunch Date\");\r\n\t\tsetSize(FRAME_WIDTH, FRAME_HEIGHT);\r\n\r\n\t...
[ "0.7225811", "0.72172475", "0.7150737", "0.7136341", "0.7115057", "0.7111581", "0.7111581", "0.7111581", "0.7111581", "0.7089979", "0.7085861", "0.7075396", "0.7028432", "0.69945943", "0.68625736", "0.6845155", "0.683704", "0.6809114", "0.67496175", "0.6738751", "0.67372876",...
0.6695372
21
Initialize the contents of the frame.
private void initialize() { setLayout(null); JTextPane txtName = new JTextPane(); txtName.setFont(new Font("YuKyokasho Yoko", Font.BOLD, 17)); txtName.setText(""); txtName.setBounds(445, 112, 277, 42); add(txtName); txtName.setOpaque(false); JTextPane txtCoordinatelat = new JTextPane(); txtCoordinatelat.setText(""); txtCoordinatelat.setFont(new Font("YuKyokasho Yoko", Font.BOLD, 17)); txtCoordinatelat.setBounds(450, 203, 277, 42); add(txtCoordinatelat); txtCoordinatelat.addKeyListener(new KeyAdapter(){ public void keyTyped(KeyEvent e) { char c = e.getKeyChar(); if(!Character.isDigit(c)&& c!=127&& c!=8 && c!='.') { JOptionPane.showMessageDialog(null, "Please enter the number", "Warning",JOptionPane.WARNING_MESSAGE); e.consume(); } } }); txtCoordinatelat.setOpaque(false); JTextPane txtCoordinatelng = new JTextPane(); txtCoordinatelng.setText(""); txtCoordinatelng.setFont(new Font("YuKyokasho Yoko", Font.BOLD, 17)); txtCoordinatelng.setBounds(450, 304, 277, 42); add(txtCoordinatelng); txtCoordinatelng.addKeyListener(new KeyAdapter(){ public void keyTyped(KeyEvent e) { char c = e.getKeyChar(); if(!Character.isDigit(c)&& c!=127&& c!=8 && c!='.') { JOptionPane.showMessageDialog(null, "Please enter the number", "Warning",JOptionPane.WARNING_MESSAGE); e.consume(); } } }); txtCoordinatelng.setOpaque(false); JTextPane txtTotaldocks = new JTextPane(); txtTotaldocks.setText(""); txtTotaldocks.setFont(new Font("YuKyokasho Yoko", Font.BOLD, 17)); txtTotaldocks.setBounds(450, 393, 277, 42); add(txtTotaldocks); txtTotaldocks.addKeyListener(new KeyAdapter(){ public void keyTyped(KeyEvent e) { char c = e.getKeyChar(); if(!Character.isDigit(c)&& c!=127&& c!=8) { JOptionPane.showMessageDialog(null, "The number of the docks can only be a whole number", "Warning",JOptionPane.WARNING_MESSAGE); e.consume(); } } }); txtTotaldocks.setOpaque(false); /* Background pic */ ImageIcon background = new ImageIcon(getClass().getResource("/main/resources/com/team15/ebrs/images/add.png")); JLabel lblbackground = new JLabel(background); lblbackground.setBounds(0, 0, 960, 518); add(lblbackground); JButton btnNext = new JButton("Save"); btnNext.setCursor(new Cursor(Cursor.HAND_CURSOR)); btnNext.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { if(txtName.getText().equals("")||txtCoordinatelat.getText().equals("")||txtCoordinatelng.getText().equals("")||txtTotaldocks.getText().equals("")) { JOptionPane.showMessageDialog(null, "The fields cannot be empty.", "Information",JOptionPane.WARNING_MESSAGE); }else{ String stationName = txtName.getText().trim(); double coordinatelat = Double.parseDouble(txtCoordinatelat.getText().trim()); double coordinatelng = Double.parseDouble(txtCoordinatelng.getText().trim()); int total_docks = Integer.parseInt(txtTotaldocks.getText().trim()); try { DockingStation newStation = new DockingStation(stationName,coordinatelat,coordinatelng,total_docks); if(dsDAO.addDockingStation(newStation)) { JOptionPane.showMessageDialog(null, "The new station is successfully registered", "Information",JOptionPane.WARNING_MESSAGE); }else { JOptionPane.showMessageDialog(null, "Error! The station name is already registered \nPlease try another name", "Information",JOptionPane.WARNING_MESSAGE); } }catch(Exception nullPointerException ) { JOptionPane.showMessageDialog(null, "Please fill out the information"); } } } }); btnNext.setBounds(758, 419, 145, 93); add(btnNext); btnNext.setOpaque(false); mainFrame.getRootPane().setDefaultButton(btnNext); JButton btnBack = new JButton("Back"); btnBack.setCursor(new Cursor(Cursor.HAND_CURSOR)); btnBack.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { StationPanel stationScreen = new StationPanel(mainFrame); mainFrame.setContentPane(stationScreen); mainFrame.revalidate(); } }); btnBack.setBounds(0, -13, 75, 76); add(btnBack); btnBack.setOpaque(false); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public BreukFrame() {\n super();\n initialize();\n }", "public MainFrame() {\n\t\tsuper();\n\t\tinitialize();\n\t}", "private void initialize() {\n\t\tthis.setSize(211, 449);\n\t\tthis.setContentPane(getJContentPane());\n\t\tthis.setTitle(\"JFrame\");\n\t}", "public SiscobanFrame() {\r\n\t\tsuper();\r...
[ "0.77704835", "0.75652915", "0.7442664", "0.7369101", "0.7366378", "0.7358479", "0.73146075", "0.73096764", "0.72987294", "0.72978777", "0.7278321", "0.72729623", "0.7269468", "0.7269468", "0.7215727", "0.7180792", "0.71682984", "0.7140954", "0.7140953", "0.7126852", "0.71079...
0.0
-1