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 is called when a player sends a trade offer to another player
boolean canAcceptTrade();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void sendTradeOffer(TradeOffer offer) {\n\t\t\r\n\t}", "public void onTradeRequest(String name)\n {\n\t\tif(traded_ammount > 0)\n\t\t{\n\t\t\ttraded_ammount = 0;\n\t\t\ttime = System.currentTimeMillis();\n\t\t}\n\t\tint[] player = getPlayerByName(name);\n\t\tint player_id = getPlayerPID(...
[ "0.7713557", "0.6549637", "0.65041673", "0.65005296", "0.6342156", "0.63386405", "0.6324665", "0.6261402", "0.6217509", "0.61885715", "0.61619663", "0.61352044", "0.61249435", "0.61028004", "0.60991496", "0.6096352", "0.6080009", "0.6074526", "0.6068551", "0.60147184", "0.599...
0.0
-1
This method is called each time the dice is rolled
boolean CanRollNumber();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void Roll() // Roll() method\n {\n // Roll the dice by setting each of the dice to be\n // \ta random number between 1 and 6.\n die1Rand = (int)(Math.random()*6) + 1;\n die2Rand = (int)(Math.random()*6) + 1;\n }", "private static void roll()\n {...
[ "0.8097287", "0.79941094", "0.78701645", "0.77440614", "0.7687683", "0.7651825", "0.76280093", "0.76153487", "0.7601151", "0.755615", "0.7543682", "0.7520768", "0.7491037", "0.7464755", "0.74555576", "0.74460095", "0.740893", "0.739138", "0.73882544", "0.7351157", "0.7339408"...
0.0
-1
This method is called when a player tries to build a road
boolean CanBuyRoad();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void buildRoad() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void playRoadBuildingCard() {\n\t\t\r\n\t}", "@Override\n\tpublic void execute() {\n\t\t\n\t\tif (GamesHandler.test) {\n\t\t\tserverModel = ServerFacadeTest.getSingleton().getGameModel(gameID);\n\t\t} else {\n\t\t\tserverModel = Ser...
[ "0.7142645", "0.65781045", "0.6388299", "0.63792795", "0.63259727", "0.62553763", "0.62180495", "0.6087949", "0.60822177", "0.60560316", "0.6018821", "0.5923121", "0.5911318", "0.58971167", "0.5882591", "0.5880048", "0.58739173", "0.58549887", "0.5847164", "0.5845303", "0.583...
0.0
-1
This method is called when a player tries to build a settlement
boolean CanBuySettlement();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void buildSettlement() {\r\n\t\t// client.setCurrentPhase(Constants.PHASE_3);\r\n\t\tlastSettlementNode = clickedNode;\r\n\t\tMessage message = new Message(clickedNode, true, null);\r\n\t\tsendMessage(message);\r\n\t}", "@Override\r\n\tpublic void buildSettlement() {\n\t\t\r\n\t}", "@Override\n\tpublic...
[ "0.6905986", "0.6708167", "0.6226878", "0.62015516", "0.6091646", "0.60734856", "0.6024153", "0.60189784", "0.59815854", "0.59489954", "0.5928802", "0.5924167", "0.58962303", "0.5873603", "0.5847583", "0.58343214", "0.58265233", "0.5825289", "0.5817068", "0.58165425", "0.5815...
0.0
-1
This method is called when a player tries to build a city
boolean CanBuyCity();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void createNewCity()\r\n {\r\n int currentPlayer = worldPanel.getCurrentPlayer();\r\n int currentUnit = worldPanel.getCurrentUnit();\r\n boolean canBuild = false;\r\n\r\n if(currentPlayer == 1)\r\n {\r\n int unitType = worldPanel....
[ "0.78899527", "0.699828", "0.6765818", "0.61841965", "0.6099458", "0.60949284", "0.6059709", "0.60111487", "0.6008716", "0.599806", "0.598924", "0.59667647", "0.59414655", "0.59377784", "0.59320474", "0.5915583", "0.58199364", "0.57818264", "0.5771182", "0.56956935", "0.56946...
0.0
-1
This method is called when a player attempts to offer a trade
boolean CanOfferTrade(Resources offer);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void acceptTrade(boolean willAccept) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void onTrade(Trade trade) throws Exception {\n\t\t\r\n\t}", "@Override\r\n\tpublic void sendTradeOffer(TradeOffer offer) {\n\t\t\r\n\t}", "public void onTradeRequest(String name)\n {\n\t\tif(traded_ammount >...
[ "0.69478184", "0.6846601", "0.6817913", "0.668391", "0.6607297", "0.64670646", "0.64543295", "0.6444483", "0.63942736", "0.6336666", "0.62673473", "0.6259579", "0.62162846", "0.6167848", "0.6167186", "0.6141412", "0.61393183", "0.61264956", "0.6118133", "0.6113514", "0.610534...
0.0
-1
This method is called when a player attempts to perform a Maritime Trade
boolean CanMaritimeTrade(int ratio, String inputResource, String outResource);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void botTrading(){\n if(game.isCardPositive(game.getHighestSharePriceStock())){\n int numShares = player.getFunds()/(game.getHighestSharePriceStock().getSharePrice()+3);\n player.getShares().set(game.getIndex(game.getHighestSharePriceStock()), player.getShares().get(game.getInd...
[ "0.62243253", "0.61569524", "0.59674215", "0.5841733", "0.5797932", "0.5793388", "0.564205", "0.5616023", "0.5615112", "0.5610372", "0.5533093", "0.552664", "0.5515148", "0.5506361", "0.55047464", "0.5498274", "0.54584813", "0.5456778", "0.54503125", "0.5446954", "0.54456735"...
0.0
-1
This method is called when the player tries to finish his/her turn
boolean CanFinishTurn();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void finishTurn();", "public void onTurnEnd() {\n\n\t}", "private void endTurn() {\n currentTurn = getNextPlayer();\n }", "@Override\r\n\tpublic void endTurn() {\n\t\t\r\n\t}", "void completeTurn() {\n\n\t\tremoveNotification();\n\n\t\tString matchId = match.getMatchId();// The Id for our match\n...
[ "0.8182448", "0.78526485", "0.78338456", "0.77988285", "0.77884233", "0.7643885", "0.7619921", "0.7546022", "0.7537432", "0.75345474", "0.7428385", "0.742653", "0.73896384", "0.73629993", "0.7354133", "0.73430645", "0.7326622", "0.7310322", "0.7306047", "0.7253087", "0.722563...
0.725753
19
This method is called when a player tries to buy a development card
boolean CanBuyDevCard();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void buyDevCard();", "void askBuyDevCards();", "@Override\r\n\tpublic void buyCard() {\n\t\t\r\n\t}", "void askDevCardProduction();", "public void buyDevCard() throws ClientException{\n\n\t\t\tresources.setOre(resources.getOre() -1 );\n\t\t\tresources.setWheat(resources.getWheat() -1 );\n\t\t\tresources.se...
[ "0.81889224", "0.8034391", "0.795498", "0.77532846", "0.7122994", "0.70682305", "0.6976465", "0.68119144", "0.66997373", "0.66941535", "0.66726124", "0.66404784", "0.6561023", "0.6549275", "0.65154725", "0.64428157", "0.64287287", "0.64172333", "0.6381977", "0.6377715", "0.63...
0.7218869
4
This method is called when a player tries to play a development card
boolean CanUseYearOfPlenty(String resource1, String resource2);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void playCard() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void playMonumentCard() {\n\t\t\r\n\t}", "@Override\n\tpublic void playCard() {\n\t\t\n\t}", "@Override\r\n\tpublic void playSoldierCard() {\n\t\t\r\n\t}", "public void playCard(ActionCard card, Integer selectedPlayer)\n {\n ...
[ "0.7410453", "0.73236656", "0.7311895", "0.72207314", "0.7068116", "0.7020802", "0.69322014", "0.67434806", "0.67256624", "0.6723173", "0.67121774", "0.66599023", "0.6587916", "0.6584277", "0.6574833", "0.6503764", "0.6488757", "0.6448004", "0.6388153", "0.63467383", "0.63144...
0.0
-1
This method is called when a player tries to play a development card
boolean CanUseRoadBuilder(EdgeLocation spot1, EdgeLocation spot2);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void playCard() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void playMonumentCard() {\n\t\t\r\n\t}", "@Override\n\tpublic void playCard() {\n\t\t\n\t}", "@Override\r\n\tpublic void playSoldierCard() {\n\t\t\r\n\t}", "public void playCard(ActionCard card, Integer selectedPlayer)\n {\n ...
[ "0.7410453", "0.73236656", "0.7311895", "0.72207314", "0.7068116", "0.7020802", "0.69322014", "0.67434806", "0.67256624", "0.6723173", "0.67121774", "0.66599023", "0.6587916", "0.6584277", "0.6574833", "0.6503764", "0.6488757", "0.6448004", "0.6388153", "0.63467383", "0.63144...
0.0
-1
This method is called when a player tries to play a development card
boolean CanUseSoldier(int victimIndex, HexLocation location);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void playCard() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void playMonumentCard() {\n\t\t\r\n\t}", "@Override\n\tpublic void playCard() {\n\t\t\n\t}", "@Override\r\n\tpublic void playSoldierCard() {\n\t\t\r\n\t}", "public void playCard(ActionCard card, Integer selectedPlayer)\n {\n ...
[ "0.74089664", "0.7322171", "0.7310715", "0.7220169", "0.7067883", "0.7021363", "0.6930099", "0.6741363", "0.67259586", "0.6723835", "0.67106855", "0.66596425", "0.6587131", "0.65860456", "0.65746415", "0.6503048", "0.6490332", "0.6446939", "0.638743", "0.63460165", "0.6315701...
0.0
-1
This method is called when a player tries to play a development card
boolean CanUseMonopoly(String resource);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void playCard() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void playMonumentCard() {\n\t\t\r\n\t}", "@Override\n\tpublic void playCard() {\n\t\t\n\t}", "@Override\r\n\tpublic void playSoldierCard() {\n\t\t\r\n\t}", "public void playCard(ActionCard card, Integer selectedPlayer)\n {\n ...
[ "0.7410453", "0.73236656", "0.7311895", "0.72207314", "0.7068116", "0.7020802", "0.69322014", "0.67434806", "0.67256624", "0.6723173", "0.67121774", "0.66599023", "0.6587916", "0.6584277", "0.6574833", "0.6503764", "0.6488757", "0.6448004", "0.6388153", "0.63467383", "0.63144...
0.0
-1
This method is called when a player tries to play a development card
boolean CanUseMonument();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void playCard() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void playMonumentCard() {\n\t\t\r\n\t}", "@Override\n\tpublic void playCard() {\n\t\t\n\t}", "@Override\r\n\tpublic void playSoldierCard() {\n\t\t\r\n\t}", "public void playCard(ActionCard card, Integer selectedPlayer)\n {\n ...
[ "0.7410453", "0.73236656", "0.7311895", "0.72207314", "0.7068116", "0.7020802", "0.69322014", "0.67434806", "0.67256624", "0.6723173", "0.67121774", "0.66599023", "0.6587916", "0.6584277", "0.6574833", "0.6503764", "0.6488757", "0.6448004", "0.6388153", "0.63467383", "0.63144...
0.0
-1
This method is called whenever the user is trying to place a road on the map. It is called by the view for each "mouse move" event. The returned value tells the view whether or not to allow the road to be placed at the specified location.
boolean canPlaceRoad(EdgeLocation edgeLoc, boolean free);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract boolean canMoveTo(Case Location);", "boolean hasLocationView();", "@Override\n public void onLongPress(MotionEvent event) { Place a new Route Point\n //\n switch (event.getActionMasked())\n {\n case MotionEvent.ACTION_DOWN:\n {\n //Lo...
[ "0.6190127", "0.60914785", "0.59469396", "0.56219566", "0.560707", "0.5565275", "0.5510716", "0.5503927", "0.54991776", "0.5476892", "0.54726803", "0.5467092", "0.5458098", "0.5441365", "0.5436802", "0.5436802", "0.54323167", "0.5399614", "0.5396097", "0.53689545", "0.5359404...
0.55679333
5
This method is called whenever the user is trying to place a settlement on the map. It is called by the view for each "mouse move" event. The returned value tells the view whether or not to allow the settlement to be placed at the specified location.
boolean canPlaceSettlement(VertexLocation vertLoc, boolean free);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean placementDone() {return placedShips == 4;}", "private boolean setLocationInformation() {\n try {\n this.mPostModel.setLocationPost(mAutoCompleteTextView.getText().toString());\n\n if (StringEmptyUtil.isEmptyString(this.mPostModel.getLocationPost())) {\n ...
[ "0.58723503", "0.58652383", "0.5848905", "0.584043", "0.5796616", "0.57201415", "0.56346184", "0.5596099", "0.55000377", "0.54906386", "0.54875946", "0.54753363", "0.54663223", "0.5425419", "0.53845865", "0.53710073", "0.53704035", "0.53695786", "0.53544", "0.5351273", "0.533...
0.5108485
51
This method is called whenever the user is trying to place a city on the map. It is called by the view for each "mouse move" event. The returned value tells the view whether or not to allow the city to be placed at the specified location.
boolean canPlaceCity(VertexLocation vertLoc);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private boolean setLocationInformation() {\n try {\n this.mPostModel.setLocationPost(mAutoCompleteTextView.getText().toString());\n\n if (StringEmptyUtil.isEmptyString(this.mPostModel.getLocationPost())) {\n Toast.makeText(getApplicationContext(), \"Please Select Locatio...
[ "0.60897565", "0.60882235", "0.5928262", "0.58356744", "0.5800231", "0.56732696", "0.56549007", "0.55974495", "0.55681306", "0.55681306", "0.55088454", "0.55013674", "0.5498982", "0.54872763", "0.5479692", "0.5441052", "0.5440585", "0.5424474", "0.541707", "0.53928256", "0.53...
0.61517507
0
This method is called whenever the user is trying to place the robber on the map. It is called by the view for each "mouse move" event. The returned value tells the view whether or not to allow the robber to be placed at the specified location.
boolean canPlaceRobber(HexLocation hexLoc);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract boolean canMoveTo(Case Location);", "boolean hasLocationView();", "@Override\n public void handle(MouseEvent event) {\n if( robberWillMove ){\n System.out.println(\"robber1\");\n robberWillMove = false;\n ...
[ "0.576041", "0.56302834", "0.55882454", "0.5565032", "0.55487114", "0.5527839", "0.55080086", "0.54497415", "0.5445263", "0.5436804", "0.53996104", "0.5374246", "0.5365637", "0.53655976", "0.5353175", "0.53456044", "0.5336818", "0.5334478", "0.53336763", "0.53302366", "0.5325...
0.5340813
16
This method is called by the Rob View when a player to rob is selected via a button click.
void robPlayer(HexLocation location, int victimIndex);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void playerSelectionMade(View v) {\n final Animation animAlpha = AnimationUtils.loadAnimation(this, R.anim.anim_alpha);\n v.startAnimation(animAlpha);\n\n Intent intent = new Intent(this, GameResultActivity.class);\n intent.putExtra(PLAYER_CHOICE, v.getId());\n startActivi...
[ "0.67666024", "0.66001713", "0.64756614", "0.62566674", "0.6243526", "0.6223801", "0.6218044", "0.6174477", "0.6146875", "0.6126521", "0.6114122", "0.61120456", "0.606602", "0.60535794", "0.60449916", "0.60423654", "0.60404706", "0.60321486", "0.6016603", "0.60135096", "0.600...
0.0
-1
This method determines if the turn belongs to this client
boolean isPlayerTurn();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private boolean isPlayerTurn(Move move) {\n return this.turn == move.getPlayer().getId();\n }", "public boolean hasTurn() {\n\t\treturn world.getCurrentPlayer() == this;\n\t}", "public boolean isMyTurn() {\n if (gameStatus == null || userId == null) return false;\n return userId.equals(gameSt...
[ "0.69363666", "0.6920336", "0.6766549", "0.6738518", "0.65428054", "0.64512706", "0.63330007", "0.62992036", "0.6240861", "0.6179695", "0.6162671", "0.6131642", "0.61183816", "0.61183643", "0.61015636", "0.6091689", "0.60843456", "0.6078007", "0.60545146", "0.60453594", "0.60...
0.6491043
5
This method determines if this play can discard cards
boolean CanDiscardCards(Resources resources);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void discardRestrictedCards()\n\t{\n\t\tif (playerList.size() == 2)\n\t\t{\n\t\t\tfor(Card card : restrictedCard2PlayerList)\n\t\t\t{\n\t\t\t\tswitch (card.getType())\n\t\t\t\t{\n\t\t\t\t\tcase GreenPlayerCard:\n\t\t\t\t\tcase BrownPlayerCard:\n\t\t\t\t\t\tCard playerCardMatch = board.getPlayerCardDeck().p...
[ "0.7015899", "0.6935595", "0.68347025", "0.67247874", "0.6617679", "0.65309227", "0.6527584", "0.651128", "0.64799064", "0.6388165", "0.6387383", "0.63749623", "0.63695216", "0.6357576", "0.6294641", "0.62675786", "0.6243509", "0.6240876", "0.6213516", "0.61943203", "0.618607...
0.7941984
0
This method determines if the specified player can be robbed at that location
boolean canRobPlayer(HexLocation location, int victimIndex);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract boolean isPossible(Player p);", "public boolean playerCanMove(Player playerObject) {\n for (int r = 0; r < Board.MAX_ROW; r++) {\n for (int c = 0; c < Board.MAX_COLUMN; c++) {\n Slot slotFrom = boardObject.getSlot(r, c);\n Slot slotRight = boardObject.getSlot(r,...
[ "0.6784996", "0.66966975", "0.6610399", "0.66079587", "0.6577588", "0.6554382", "0.65305436", "0.6418675", "0.64179105", "0.638676", "0.63809043", "0.6364759", "0.63444173", "0.63130474", "0.63128734", "0.6305462", "0.6240213", "0.6237142", "0.6231426", "0.6199423", "0.618827...
0.7187453
0
This method plays the soldier card to the specified player at the specified hex
void playSoldierCard(int victimIndex, HexLocation location);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void playCard(int player, int card) {\n }", "@Override\r\n\tpublic void playSoldierCard() {\n\t\t\r\n\t}", "public void playCard(IPlayer owner){\n // Wont play card unless a player has it\n if(command == \"Move1\"){\n owner.Move(owner.getPlayerDir());\n }\n else...
[ "0.68067044", "0.67178345", "0.64125335", "0.6090674", "0.60166043", "0.5978308", "0.59529674", "0.59362435", "0.59237355", "0.59050363", "0.59035116", "0.58760244", "0.58626485", "0.58375514", "0.58215606", "0.5802511", "0.5737191", "0.57217455", "0.57195824", "0.5718634", "...
0.71448743
0
This method plays the year of plenty card, getting the specified resources
void playYearOfPlentyCard(String resource1, String resource2);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void playYearOfPlentyCard(ResourceType resource1, ResourceType resource2) {\n\t\t\r\n\t}", "void playMonopolyCard(String resource);", "private Type stealResource() {\n \t\tint count = getResourceCount();\n \t\tif (count <= 0)\n \t\t\treturn null;\n \n \t\t// pick random card\n \t\tint sel...
[ "0.7175711", "0.6201515", "0.59286296", "0.5725953", "0.56418747", "0.55599546", "0.5547289", "0.5542553", "0.5530005", "0.5517389", "0.5510473", "0.5430729", "0.5416794", "0.5401354", "0.5391617", "0.5370163", "0.53271735", "0.5303579", "0.5233618", "0.5214909", "0.5212625",...
0.74979097
0
This method plays the road card at the specified edge of the two neighboring hexes
void playRoadCard(EdgeLocation spot1, EdgeLocation spot2);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void turnOverItself() {\n byte tmp = leftEdge;\n leftEdge = reversedRightEdge;\n reversedRightEdge = tmp;\n\n tmp = rightEdge;\n rightEdge = reversedLeftEdge;\n reversedLeftEdge = tmp;\n\n tmp = topEdge;\n topEdge = reversedTopEdge;\n reversedT...
[ "0.5958205", "0.55195135", "0.55147934", "0.5483428", "0.5472401", "0.543024", "0.54229194", "0.5411092", "0.5379298", "0.5369804", "0.53471196", "0.52863085", "0.5278603", "0.5246391", "0.52261966", "0.52227694", "0.5211774", "0.5198082", "0.5194969", "0.51838744", "0.517795...
0.7664279
0
This method plays the monopoly card with the specified resource
void playMonopolyCard(String resource);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void playMonopolyCard(ResourceType resource) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void playMonumentCard() {\n\t\t\r\n\t}", "void playYearOfPlentyCard(String resource1, String resource2);", "void playMonumentCard();", "@Override\r\n\tpublic void playCard() {\n\t\t\r\n\t}", "@Overr...
[ "0.8530414", "0.6911832", "0.6850692", "0.68193793", "0.6788403", "0.6648909", "0.6409819", "0.63713765", "0.6245908", "0.6097065", "0.6043358", "0.5986052", "0.5968067", "0.5960509", "0.58825934", "0.5873875", "0.58692724", "0.5855021", "0.58454293", "0.5841722", "0.5762964"...
0.88526666
0
This method plays the monument card, awarding the player a victory point
void playMonumentCard();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void playMonumentCard() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void playCard() {\n\t\t\r\n\t}", "@Override\n\tpublic void playCard() {\n\t\t\n\t}", "public void playCard(int player, int card) {\n }", "public void play() {\n if (!isHungry()) {\n hunger += 2;\n ...
[ "0.7530404", "0.71190685", "0.70147943", "0.6733652", "0.6594264", "0.6582272", "0.65600216", "0.6535958", "0.64662343", "0.64598936", "0.64315057", "0.6426759", "0.6369454", "0.63611525", "0.6331183", "0.6313886", "0.6310145", "0.6302573", "0.6291464", "0.6285605", "0.626819...
0.76656497
0
This method rolls the number from two dice
void rollNumber(int d1, int d2);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void roll()\n {\n rand = (int)(((Math.random())*6)+1); // dice roll #1\n rand2 = (int)(((Math.random())*6)+1);// dice roll #2\n }", "public int rollDice() {\n\t\td1 = r.nextInt(6) + 1;\n\t\td2 = r.nextInt(6) + 1;\n\t\trepaint();\n\t\treturn d1 + d2;\n\t}", "public int rollDic...
[ "0.7819411", "0.78117454", "0.7642116", "0.75803536", "0.7529968", "0.73638344", "0.71493125", "0.70836896", "0.7081325", "0.70570517", "0.70195234", "0.70057267", "0.6991893", "0.6988611", "0.69662887", "0.69522464", "0.6942807", "0.6934831", "0.6907386", "0.6904062", "0.689...
0.802979
0
This method sends a chat to the server
void sendChat(SendChatParam param);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void sendChat(String message) {\r\n connection.chat(message);\r\n }", "public void doSendMsg() {\n FacesContext fctx = FacesContext.getCurrentInstance();\n HttpSession sess = (HttpSession) fctx.getExternalContext().getSession(false);\n SEHRMessagingListener chatHdl = (SEHRMessagingListe...
[ "0.7628014", "0.7407859", "0.71892", "0.71652734", "0.7069431", "0.695136", "0.6913647", "0.686098", "0.68382424", "0.68312824", "0.6799741", "0.6721857", "0.6697873", "0.6693136", "0.6648641", "0.6633893", "0.6626203", "0.6612095", "0.6609891", "0.65818286", "0.657663", "0...
0.7444409
1
This method accepts or declines a trade
void acceptTrade(boolean accept);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void acceptTrade(boolean willAccept) {\n\t\t\r\n\t}", "@Override\n\tpublic void satisfyTrade(TickEvent<Trade> tradeEvent) throws TradeException {\n\n\t}", "boolean canAcceptTrade();", "@Override\r\n\tpublic void onTrade(Trade trade) throws Exception {\n\t\t\r\n\t}", "void confirmRealW...
[ "0.69427556", "0.6506025", "0.6381478", "0.6356175", "0.63299465", "0.6268397", "0.625594", "0.6236207", "0.62029046", "0.61764795", "0.61277926", "0.6044551", "0.59901506", "0.59639466", "0.59622985", "0.5856048", "0.5850192", "0.5835535", "0.5787222", "0.57804835", "0.57761...
0.68045074
1
This method discards the cards as specified by the params
void discardCards(Resources resources);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void discard(){\n for(int i = 1 ; i <= 110 ; i++) cardDeck.remove(i);\n }", "public void discardAll()\n\t{\n\t\thand = new Card[12];\n\t\tnumCards = 0;\n\t}", "private void discardRestrictedCards()\n\t{\n\t\tif (playerList.size() == 2)\n\t\t{\n\t\t\tfor(Card card : restrictedCard2PlayerList)\n...
[ "0.7733731", "0.7394855", "0.7391059", "0.7121058", "0.69007474", "0.6841378", "0.68393594", "0.6829219", "0.6826293", "0.6796913", "0.6793262", "0.6734885", "0.67186517", "0.6679165", "0.64350754", "0.63829434", "0.63813126", "0.63046384", "0.62907016", "0.6259853", "0.62598...
0.7676681
1
This method builds a road specified by the edge and if it is free or not
void buildRoad(EdgeLocation edge, boolean free);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean build(Edge edge) {\n \t\tif (edge == null || !canBuild(edge))\n \t\t\treturn false;\n \n \t\t// check resources\n \t\tboolean free = board.isSetupPhase() || board.isProgressPhase();\n \t\tif (!free && !affordRoad())\n \t\t\treturn false;\n \n \t\tif (!edge.build(this))\n \t\t\treturn false;\n \n \t\...
[ "0.73367894", "0.72880596", "0.6776586", "0.64847475", "0.6469233", "0.6181518", "0.61467266", "0.6118292", "0.6103762", "0.5849501", "0.57624626", "0.5748484", "0.5582643", "0.5566905", "0.5561306", "0.5467064", "0.5454378", "0.54215276", "0.5418249", "0.5412767", "0.5400076...
0.88825244
0
This method builds a settlement specified by the vertex and if it is free or not
void buildSettlement(VertexLocation vert, boolean free);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean canPlaceSettlement(VertexLocation vertLoc, boolean free);", "public void buySettlement(Vertex vertex) throws CannotBuyException, InsufficientPlayerResourcesException, AllPiecesPlayedException{\n\t\t if(canDoBuySettlement() == false) {\n\t\t\t throw new CannotBuyException(\"Cannot Buy Settlement, poss...
[ "0.72249085", "0.64920884", "0.6375447", "0.60469097", "0.59374624", "0.57366276", "0.56565166", "0.55207956", "0.54561526", "0.54504997", "0.5348297", "0.53109473", "0.5236293", "0.51943105", "0.51198536", "0.5116829", "0.5109746", "0.5064432", "0.49680948", "0.49464983", "0...
0.8720108
0
This method builds a city specified by the vertex
void buildCity(VertexLocation vert);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void placeCity(VertexLocation vertLoc) {\n\t\t\r\n\t}", "private void setStartingVertexCity(CityByDegrees vertexCity) {\r\n\t\tthis.startingVertexCity = vertexCity;\r\n\t}", "private void buildCity() {\r\n\t\tMessage message = new Message(clickedNode, true, null);\r\n\t\tsendMessage(messa...
[ "0.7024829", "0.6939623", "0.67519474", "0.6652785", "0.6632132", "0.65873766", "0.6489061", "0.6361162", "0.63373053", "0.63138384", "0.6307286", "0.6255368", "0.6209794", "0.6180402", "0.61000776", "0.6057489", "0.60038406", "0.59972644", "0.57844913", "0.573472", "0.573392...
0.90960175
0
This method offers a trade from one player to another
void offerTrade(int receiver, Resources resources);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n protected void trade(){\n // An example of a random trade proposal: offer peasants in exchange of soldiers\n // Pick the id of the potential partner (without checking if it is my neighbor)\n double pertnerID = (new Random()).nextInt(42)+1;\n trade[0] = pertnerID;\n ...
[ "0.688767", "0.6849008", "0.66313815", "0.65472335", "0.6437681", "0.643095", "0.6399759", "0.6343951", "0.6338334", "0.6306611", "0.6259827", "0.6259542", "0.61734444", "0.6169373", "0.6161404", "0.61536133", "0.6125308", "0.61242956", "0.61241233", "0.607988", "0.6075197", ...
0.66665095
2
This method initiates a maritime trade
void maritimeTrade(int ratio, String inputResource, String outResource);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Trade() {\n\t}", "@Override\r\n\tpublic void onStartTrading() throws Exception {\n\t\t\r\n\t}", "@Override\n protected void trade(){\n // An example of a random trade proposal: offer peasants in exchange of soldiers\n // Pick the id of the potential partner (without checking if it is my...
[ "0.5891969", "0.5778467", "0.55708385", "0.5494991", "0.5389259", "0.5375252", "0.5365509", "0.53645813", "0.5329264", "0.5294067", "0.5282879", "0.52729726", "0.52723444", "0.5261153", "0.5254951", "0.52547556", "0.5240131", "0.52302426", "0.52127326", "0.5205251", "0.519885...
0.0
-1
This method finishes the current players turn
void finishTurn();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void endTurn() {\n currentTurn = getNextPlayer();\n }", "void completeTurn() {\n\n\t\tremoveNotification();\n\n\t\tString matchId = match.getMatchId();// The Id for our match\n\t\tString pendingParticipant = GPGHelper.getOpponentId(\n\t\t\t\tgameHelper.getApiClient(), match);// We set who's tur...
[ "0.80029964", "0.78962535", "0.78022313", "0.7672266", "0.75888157", "0.75019765", "0.74538356", "0.7395462", "0.7340072", "0.73360986", "0.7321251", "0.7309589", "0.7290722", "0.72741866", "0.7245821", "0.72278816", "0.71930754", "0.71845657", "0.7181388", "0.71602243", "0.7...
0.82035047
0
Purchases a random devcard from the deck
void buyDevCard();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Card dealCard() {\n int randPos = random.nextInt(51 - 0 + 1);\n Card rand = deck[randPos];\n return rand;\n\n }", "public Deck randomShuffle(){\n\t\tshuffleOnceRandom();\n\t\tshuffleOnceRandom();\n\t\treturn ourDeck;\n\t}", "void askBuyDevCards();", "public void generateDeck() ...
[ "0.6402746", "0.63565457", "0.61112624", "0.606732", "0.60554516", "0.60552853", "0.6038885", "0.5939981", "0.59166855", "0.58998233", "0.5899593", "0.5857056", "0.58561355", "0.58493483", "0.58283335", "0.5816443", "0.57683116", "0.57634854", "0.5760739", "0.57569027", "0.57...
0.6354236
2
Creates an instance which sources data from the given snapshot link.
public SnapshotYieldCurveDataProviderFn(SnapshotLink<YieldCurveDataSnapshot> snapshotLink) { _snapshotLink = ArgumentChecker.notNull(snapshotLink, "snapshotLink"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Snapshot create();", "public SnapshotFeedReader(String feedurl) {\n super(feedurl);\n this.feed = new SnapshotFeed();\n this.links = new HashSet<AtomLink>();\n }", "Snapshot create(Context context);", "CreateSnapshotResult createSnapshot(CreateSnapshotRequest createSnapshotRequest);", "@O...
[ "0.6022321", "0.5725303", "0.5364308", "0.51819026", "0.50457394", "0.4968858", "0.49288094", "0.4925532", "0.4860215", "0.4778555", "0.4775774", "0.475067", "0.47100314", "0.4694196", "0.46812594", "0.4608459", "0.4597371", "0.45966113", "0.45805866", "0.45741922", "0.455354...
0.527498
3
Create a Java program and name it Double Comparison. Declare 2 double values and if value of first variable is higher then the second, print "Double value __ is larger than __ ." Otherwise print...
public static void main(String[] args) { double num1=18.6, num2=11.5; if(num1>num2) { System.out.println("Double value "+num1+" is larger than "+num2); }else { System.out.println("Double value "+num1+" is smaller than "+num2); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String[] args) {\n\t\n\tScanner scan=new Scanner(System.in);\n\tSystem.out.println(\"2 sayi giriniz\");\n\tdouble sayi1 = scan.nextDouble();\n\tdouble sayi2 = scan.nextDouble();\n\t\n\tdouble sonuc= sayi1 > sayi2 ? sayi1 :sayi2;\n\tSystem.out.println(sonuc);\n\t\n\tscan.close();\n}", "pub...
[ "0.67858917", "0.6729956", "0.6417047", "0.6371006", "0.6357657", "0.6353547", "0.63514817", "0.63384354", "0.6316506", "0.6240018", "0.62322533", "0.62153697", "0.61912876", "0.6147311", "0.6144911", "0.614079", "0.60867435", "0.60823536", "0.60761225", "0.60561335", "0.6052...
0.822975
0
In here i've created a method named doSomething as mentioned in question
public void doSomething(){ // now in here calling doMore(); doMore(); System.out.println("-----------"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void doSomething() {\n \n }", "public void doSomething() {\n\t}", "@Override\n\tpublic void doIt() {\n\t\t\n\t}", "@Override\n\tpublic void doSomething() {\n\t\tSystem.out.println(\"业务操作\");\n\t}", "protected void doSomethingElse()\r\n {\r\n \r\n }", "abstract public T doSom...
[ "0.79993516", "0.7827778", "0.73071975", "0.7277868", "0.7209273", "0.7125634", "0.7011162", "0.686575", "0.6760912", "0.6703463", "0.6673637", "0.6564401", "0.65586233", "0.65177494", "0.648622", "0.6467106", "0.6353585", "0.6245127", "0.6239128", "0.61965674", "0.61863124",...
0.6925622
7
In here i've created a another method void doMore() as mentioned in question
public void doMore(){ /** * ArithmeticExceptiont this exception occurs when an integer is * divided by zero. * * */ int number=500/0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void doSomething(){\n\t\t// now in here calling doMore();\n\t\tdoMore();\n\t\tSystem.out.println(\"-----------\");\n\t\t\n\t\t\t\n\t\t}", "@Override\n public void onLoadMore() {\n }", "@Override\r\n\tpublic void onLoadMore() {\n\t}", "@Override\r\n\tpublic void onLoadMore() {\n\r\n\t}", ...
[ "0.7534166", "0.65239495", "0.6493768", "0.6399896", "0.6398378", "0.61969", "0.6088587", "0.6079048", "0.60585636", "0.6057", "0.5958327", "0.5958327", "0.593081", "0.5926142", "0.5887422", "0.5885088", "0.58778393", "0.5802473", "0.57918656", "0.57727385", "0.57068896", "...
0.605102
10
maximum health a ship box can have, 1 or 2 Class Methods No argument constructor
public Ship(){ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static int maxHealth(int health){\r\n int mHealth = 0;\r\n mHealth = health + 5;\r\n return mHealth; \r\n }", "public int getMaxHealth();", "public int getMaxHealth()\r\n\t{\r\n\t\treturn MaxHealth;\r\n\t}", "@Override\n public int maxHealth() {\n return 25;\n ...
[ "0.6973766", "0.6845458", "0.6531191", "0.6510701", "0.63303655", "0.6317338", "0.62393844", "0.6227016", "0.61976963", "0.6176762", "0.61182714", "0.60922223", "0.608329", "0.60698056", "0.6065036", "0.6065036", "0.6065036", "0.6065036", "0.6065036", "0.6065036", "0.6065036"...
0.0
-1
Sets the size of the ship, ex: Cruiser = 5, Torpedo boat = 4. . .
public void setSize(int size){ this.shipSize = size; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public final void testSetSize() {\n int expRes = 5;\n int falseEnter = -4;\n ship.setSize(falseEnter);\n int result = this.ship.getSize();\n assertEquals(expRes, result);\n falseEnter = -1;\n ship.setSize(falseEnter);\n result = this.ship.getSize()...
[ "0.7535432", "0.72171664", "0.714449", "0.70080775", "0.6964712", "0.6951602", "0.6945788", "0.6942869", "0.6940322", "0.6937139", "0.6914531", "0.6892714", "0.68882585", "0.68882585", "0.6860129", "0.68567747", "0.6854659", "0.68143165", "0.68143165", "0.68143165", "0.681431...
0.8668133
0
Returns the size of the ship
public int getSize(){ return shipSize; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getShipLength() {\n return shipLength;\n }", "@Override\r\n\tpublic int getPegCount() {\r\n\t\tint shipSize = 3;\r\n\t\treturn shipSize;\r\n\t}", "godot.wire.Wire.Vector2 getSize();", "public int getSize() {\n\t\treturn WORLD_SIZE;\n\t}", "godot.wire.Wire.Vector3 getSize();", "public...
[ "0.82752883", "0.73726314", "0.69691896", "0.68864167", "0.688091", "0.68529874", "0.6836948", "0.67788154", "0.67656267", "0.67540294", "0.6752939", "0.67513746", "0.67356306", "0.67283016", "0.6719101", "0.6708274", "0.66986364", "0.6695221", "0.6684675", "0.665435", "0.665...
0.90871423
0
Returns the position of the ship's bow
public Point getPosition(){ return position; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Integer getBPos();", "public static int getBukkitPosition(int x,int y){\n return ((y-1)*9)+x-1;\n }", "public Ship getShip() {\r\n\t\treturn ship;\r\n\t}", "public Ship getShip() {\r\n\t\treturn ship;\r\n\t}", "godot.wire.Wire.Vector2 getPosition();", "private Point2D getBoardPosition() {\n ...
[ "0.66414726", "0.661949", "0.65853286", "0.65853286", "0.6475606", "0.6433899", "0.6417146", "0.64107865", "0.6385716", "0.63819426", "0.636556", "0.6336614", "0.6304589", "0.6302232", "0.63017404", "0.62566346", "0.6235268", "0.6229852", "0.62197363", "0.62139255", "0.620209...
0.0
-1
Takes the direction as an argument and checks for validity and sets then sets the direction
public void setDirection(char dir) throws IllegalArgumentException { if (dir == 'N' || dir == 'n'){ this.direction = 'n'; } else if (dir == 'E' || dir == 'e'){ this.direction = 'e'; } else if (dir == 'S' || dir == 's'){ this.direction = 's'; } else if (dir == 'W' || dir == 'w'){ this.direction = 'w'; } else { throw new IllegalArgumentException(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setDirection(double direction) {\n\t\tif (direction <= MAX_DIRECTION && direction >= MIN_DIRECTION) {\n\t\t\tthis.direction = direction;\n\t\t} else if (direction > MAX_DIRECTION) { \n\t\t\t//this.direction = MIN_DIRECTION + (MAX_DIRECTION - direction);\n\t\t\tthis.direction %= MIN_DIRECTION ;\n\t\t\ti...
[ "0.7889339", "0.7592094", "0.7382291", "0.73481864", "0.72258425", "0.7206741", "0.7168206", "0.713036", "0.7114941", "0.70870805", "0.7070447", "0.7011955", "0.694994", "0.6947363", "0.69455975", "0.69455975", "0.69455975", "0.69134897", "0.6873748", "0.6862667", "0.68256503...
0.7083529
10
Returns the direction of the ship, in lower case
public char getDirection(){ return direction; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "String getDirection();", "public String getDirection(){\n\t\tif(this.toRight)\n\t\t\treturn \"RIGHT\";\n\t\telse\n\t\t\treturn \"LEFT\";\n\t}", "public String getDirection() {\n return this.direction;\n }", "public String getDirection() {\r\n return direction;\r\n }", "int getDirection(...
[ "0.7397278", "0.68103534", "0.66412306", "0.66397506", "0.66171557", "0.66137445", "0.6515727", "0.6478717", "0.6466164", "0.6451282", "0.6377158", "0.6348123", "0.62851876", "0.62219346", "0.62121755", "0.61858916", "0.61739814", "0.61166847", "0.6099289", "0.6076696", "0.60...
0.65668297
6
Takes no argument and sets the damage of each block to 1 (untouched)
public void resetDamage(int maxDamage){ this.maxHealth = maxDamage; this.shipDamage = new int[this.shipSize]; for (int i = 0; i < this.shipDamage.length; i++){ this.shipDamage[i] = maxDamage; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void applyDamage(int damage)\r\n\t{\r\n\r\n\t}", "private void takeDamage(int damage){ health -= damage;}", "@Override\r\n\tpublic void damage(float amount) {\n\t\t\r\n\t}", "public void setBorderDamagePerBlock(double damage)\n {\n borderDamagePerBlock = damage;\n }", "public void takeD...
[ "0.68035835", "0.6792174", "0.66737014", "0.6671937", "0.66372085", "0.6573638", "0.65702784", "0.65630454", "0.64672965", "0.6443013", "0.64327824", "0.6425508", "0.6381946", "0.6376565", "0.6368834", "0.63355637", "0.63169444", "0.6315228", "0.6281007", "0.6235436", "0.6199...
0.0
-1
Takes no arguments and returns an array containing the states of each block of the ship
public int[] getDamage(){ return shipDamage; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public long[] getState() {\n return new long[] {(long)Cg0, (long)Cg1, (long)Cg2,\n (long)Cg3, (long)Cg4, (long)Cg5};\n }", "public int [][] getState() {\n return stateArray;\n }", "public double[] getState(){\n if (AgentType.Abstraction == SimpleExperiment.activeAgent...
[ "0.6364879", "0.63023245", "0.6092061", "0.6014711", "0.6011321", "0.6008842", "0.6003559", "0.59003687", "0.58754456", "0.58576626", "0.5829526", "0.57795376", "0.5729798", "0.56857413", "0.566747", "0.565266", "0.5644729", "0.564054", "0.5606842", "0.5602364", "0.5601665", ...
0.0
-1
TODO receive mine damage
public boolean receiveDamage(Point damLoc, char damType) throws IllegalArgumentException { Point[] shipCoordinates = this.getShipCoordinates(); boolean shipDamaged = false; for (int i = 0; i < shipCoordinates.length; i++){ if (shipCoordinates[i].equals(damLoc)){ switch(damType){ case 't': shipDamaged = this.applyTorDamage(i); break; case 'g': shipDamaged = this.applyGunDamage(i); break; case 'm': shipDamaged = this.applyMineDamage(); break; default: throw new IllegalArgumentException (); } } } return shipDamaged; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void damage(){\n\n LevelMap.getLevel().damage(dmg);\n //System.out.println(\"died\");\n setDie();\n }", "public int giveDamage();", "@Override\r\n\tpublic void damage(float amount) {\n\t\t\r\n\t}", "@Override\n\tpublic void takeDamage(double damage) {\n\n\t}", "public int ma...
[ "0.6851247", "0.6705425", "0.6686184", "0.65720767", "0.6533823", "0.6513867", "0.65130293", "0.650961", "0.647972", "0.64730346", "0.6464171", "0.6412588", "0.6375703", "0.6375703", "0.6375703", "0.6375703", "0.6375703", "0.6372611", "0.6372541", "0.6364834", "0.63643914", ...
0.0
-1
Takes a point as the new position, checks validity and then sets the point of the new bow
public void setPosition(Point newPosition)throws IllegalArgumentException { if (newPosition.x < 0 || newPosition.y < 0 || newPosition.x > 30 || newPosition.y > 30){ throw new IllegalArgumentException(); } else { this.position = newPosition; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract void setPoint(Point p);", "void setPosition(Point point);", "public void setPosition(Point newPosition);", "public void setPosition(Point position);", "public T setPoint(@NonNull PointF point) {\n return setPoint(point.x, point.y);\n }", "public void setPoint(double point){\r\n ...
[ "0.6995137", "0.69459265", "0.66794264", "0.6445827", "0.6364032", "0.62413704", "0.62245905", "0.6180951", "0.6102255", "0.6090253", "0.6036176", "0.6016229", "0.60110027", "0.6006816", "0.60063654", "0.5977398", "0.59733444", "0.5936558", "0.59358096", "0.59333366", "0.5933...
0.5779632
31
Fetch and store information into the database.
@Override public JsonObjectRequest fetchData(AppDatabase database) { // create the JSON request for courses offered by each school return new JsonObjectRequest (Request.Method.GET, "https://data.gov.sg/api/action/datastore_search?resource_id=3bb9e6b0-6865-4a55-87ba-cc380bc4df39&limit=500000", null, new Response.Listener<JSONObject>() { @Override public void onResponse(JSONObject response) { try { // parse results as json array JSONArray allSchoolToCourseAsJSONArray = getResultsAsJSONArray(response); // get each entry in results and store in database parseJSONArrayAndStoreInDatabase(database, allSchoolToCourseAsJSONArray); } catch (JSONException e) { e.printStackTrace(); } } }, new Response.ErrorListener() { @Override public void onErrorResponse(VolleyError error) { // TODO: Handle error System.out.println("Rabak la bro: " + error.toString()); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void getDataFromDB() {\n ArrayList<ArtworkData> artworkData = getArtworksFromDatabase();\n if (artworkData.size() <= 0) {\n // there is no data in local DB, error\n onErrorReceived();\n } else {\n sendArtworkData(artworkData);\n }\n }", "pri...
[ "0.6163843", "0.5927853", "0.5801698", "0.5726887", "0.563628", "0.56225365", "0.5620925", "0.561441", "0.5599612", "0.5579809", "0.55701345", "0.5552106", "0.55396616", "0.5510327", "0.5494719", "0.5466773", "0.5440931", "0.5440193", "0.5439379", "0.5412184", "0.53959435", ...
0.0
-1
Retourne la distance euclidienne entre deux noeuds
public static double getDistance(Node a, Node b) { return Math.abs(a.getX() - b.getX()) + Math.abs(a.getY() - b.getY()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private double calculeDistanceLinaire(int[] tableauDeIntRandom) {\n double resultat = 0;\n for (int i = 0; i < tableauDeIntRandom.length; i++) {\n resultat += Math.abs(tableauDeIntRandom[i] - tableauDeIntRandom[(i + 1) % tableauDeIntRandom.length]);\n }\n return resultat;\n ...
[ "0.6705288", "0.65619457", "0.65435994", "0.6443384", "0.64287657", "0.63994974", "0.6370745", "0.6344169", "0.6336382", "0.6335547", "0.6326058", "0.6308336", "0.6294328", "0.62919813", "0.62898195", "0.62819904", "0.6273587", "0.6254345", "0.62510544", "0.6240372", "0.62227...
0.0
-1
TODO Autogenerated method stub
@Override public void onScrollStateChanged(AbsListView view, int scrollState) { this.currentScrollState = scrollState; try { isScrollCompleted(); } catch (Exception ex) { } }
{ "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 onScroll(AbsListView view, int firstVisibleItem, int visibleItemCount, int totalItemCount) { this.currentFirstVisibleItem = firstVisibleItem; this.currentVisibleItemCount = visibleItemCount; this.totalItem = totalItemCount; try { isScrollCompleted(); } catch (Exception ex) { } }
{ "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: rename to setAllProducts
public void setAllProducts(List<Product> products) { for (Product product : products) { this.products.put(product.getId(), product); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void getAllProducts() {\n }", "public void setProducts(List<Product> products) {\n this.products = products;\n }", "private void loadProducts() {\n\t\tproduct1 = new Product();\n\t\tproduct1.setId(1L);\n\t\tproduct1.setName(HP);\n\t\tproduct1.setDescription(HP);\n\t\tproduct1.setPrice(BigD...
[ "0.7379823", "0.7155914", "0.68135995", "0.66628635", "0.6619061", "0.6589379", "0.6569644", "0.6538741", "0.64784694", "0.64582646", "0.64566594", "0.644385", "0.63869", "0.6361422", "0.6361008", "0.63591146", "0.6352004", "0.6322327", "0.63147944", "0.6312612", "0.6301014",...
0.68487144
2
/ TODO: rename to getAllProducts
public List<Product> getAllProducts() { return new ArrayList<Product>(this.products.values()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void getAllProducts() {\n }", "List<Product> getAllProducts();", "List<Product> getAllProducts();", "List<Product> getAllProducts();", "List<Product> retrieveProducts();", "@Override\r\n\tpublic List<Product> getAllProducts() {\n\t\treturn dao.getAllProducts();\r\n\t}", "public List<Product>...
[ "0.8682658", "0.85834545", "0.85834545", "0.85834545", "0.8149862", "0.8092503", "0.80238146", "0.80238146", "0.8022991", "0.8000854", "0.7986676", "0.7975639", "0.79701287", "0.7967392", "0.7912052", "0.7896949", "0.7803486", "0.7803486", "0.77484167", "0.7747321", "0.768867...
0.73954076
32
input 21462675756 output : 21462675756
public static void main(String[] args) { String input = "21462675756"; System.out.println(createString(input)); int a[] = { 1, 2, 3, 7, 5 }; int b[] = {1, 4, 20, 3, 10, 5}; // sortAndRemoveDuplicates(a); // shiftelements(a, 2); subArrayWithGivenSum(a, 12); subArrayWithGivenSum(b, 33); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String[] args) throws IOException {\r\n\t long a = 1182312000;\r\n\t System.out.println((a<<1) + 57596000);\r\n\t System.out.println(Long.MAX_VALUE);\r\n }", "public static void main(String args[] ) throws Exception {\n Scanner in = new Scanner(System.in);\n \n String...
[ "0.6410471", "0.63607025", "0.63229114", "0.62054634", "0.6184625", "0.6175383", "0.6098209", "0.6026053", "0.60103047", "0.5961886", "0.5947119", "0.5911927", "0.5896705", "0.58939964", "0.5869418", "0.5864519", "0.5847303", "0.5834319", "0.58321834", "0.57860273", "0.577742...
0.6182498
5
Creates new form LoginPage
public LoginPage() { initComponents(); Point center = GraphicsEnvironment.getLocalGraphicsEnvironment().getCenterPoint(); int windowWidth = this.getWidth(); int windowHeight = this.getHeight(); this.setBounds(center.x - windowWidth / 2, center.y - windowHeight / 2, windowWidth, windowHeight); this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); this.setVisible(true); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public LoginPage goToLoginPage() {\n loginButton.click();\n return new LoginPage();\n }", "NewAccountPage openNewAccountPage();", "public LoginPage(){\n\t\tPageFactory.initElements(driver, this);\n\t\t\n\t}", "public LoginPage() {\n }", "public LoginPage(){\n\t\tPageFactory.initElements...
[ "0.7168578", "0.70983094", "0.70101553", "0.70043707", "0.69167566", "0.6892679", "0.68264717", "0.68264717", "0.68202186", "0.6750295", "0.6722954", "0.6720724", "0.66444165", "0.6623645", "0.65569925", "0.6484977", "0.64452696", "0.63838017", "0.63757974", "0.6347774", "0.6...
0.0
-1
for testing purposes until we can figure out how to mock firebase
public RegistrationInteractor(String s){ this.theUser = new User(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private FirebaseUtil(){}", "private FirebaseDAO() {}", "public static void setupFirebase(Context context) {\n // initialised Firebase\n com.firebase.client.Firebase.setAndroidContext(context);\n }", "private void initFirebase() {\n FirebaseApp.initializeApp(this);\n firebaseDat...
[ "0.738583", "0.66798776", "0.66244763", "0.6611554", "0.6572415", "0.65126055", "0.6214612", "0.6167451", "0.61543226", "0.6137463", "0.6028123", "0.6026762", "0.5989772", "0.5968806", "0.59356654", "0.58465886", "0.5839321", "0.58181375", "0.5808987", "0.58020693", "0.577224...
0.0
-1
write your code here
public void push(int element) { stack1.push(element); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void logic(){\r\n\r\n\t}", "public static void generateCode()\n {\n \n }", "@Override\n\tprotected void logic() {\n\n\t}", "private static void cajas() {\n\t\t\n\t}", "void pramitiTechTutorials() {\n\t\n}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\r\n\tpub...
[ "0.61019534", "0.6054925", "0.58806974", "0.58270746", "0.5796887", "0.56999695", "0.5690986", "0.56556827", "0.5648637", "0.5640487", "0.56354505", "0.56032085", "0.56016207", "0.56006724", "0.5589654", "0.5583692", "0.55785793", "0.55733466", "0.5560209", "0.55325305", "0.5...
0.0
-1
write your code here
public int pop() { if(!stack2.isEmpty()) return stack2.pop(); else { while(!stack1.isEmpty()) { stack2.push(stack1.pop()); } return stack2.pop(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void logic(){\r\n\r\n\t}", "public static void generateCode()\n {\n \n }", "@Override\n\tprotected void logic() {\n\n\t}", "private static void cajas() {\n\t\t\n\t}", "void pramitiTechTutorials() {\n\t\n}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\r\n\tpub...
[ "0.61019534", "0.6054925", "0.58806974", "0.58270746", "0.5796887", "0.56999695", "0.5690986", "0.56556827", "0.5648637", "0.5640487", "0.56354505", "0.56032085", "0.56016207", "0.56006724", "0.5589654", "0.5583692", "0.55785793", "0.55733466", "0.5560209", "0.55325305", "0.5...
0.0
-1
write your code here
public int top() { if(!stack2.isEmpty()) { Integer k = stack2.pop(); stack2.push(k); return k; } else { while(!stack1.isEmpty()) { stack2.push(stack1.pop()); } Integer k = stack2.pop(); stack2.push(k); return k; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void logic(){\r\n\r\n\t}", "public static void generateCode()\n {\n \n }", "@Override\n\tprotected void logic() {\n\n\t}", "private static void cajas() {\n\t\t\n\t}", "void pramitiTechTutorials() {\n\t\n}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\r\n\tpub...
[ "0.61019534", "0.6054925", "0.58806974", "0.58270746", "0.5796887", "0.56999695", "0.5690986", "0.56556827", "0.5648637", "0.5640487", "0.56354505", "0.56032085", "0.56016207", "0.56006724", "0.5589654", "0.5583692", "0.55785793", "0.55733466", "0.5560209", "0.55325305", "0.5...
0.0
-1
mission 1 O(1)// ////////////// DON'T DELETE THIS CONSTRUCTOR ////////////////
public DataStructure() { this.minx = null; this.maxx = null; this.miny = null; this.maxy = null; this.current = null; size = 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Constructor(){\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "protected abstract void construct();", "public Pleasure() {\r\n\t\t}", "private SingleObject()\r\n {\r\n }", "private UniqueChromosomeReconstructor() { }", "public Self__1() {\n }", "public CacheFIFO()\r\n/* 16: */ ...
[ "0.65910375", "0.65763575", "0.6469908", "0.6437401", "0.6423403", "0.63889414", "0.6357021", "0.63138175", "0.6313734", "0.628148", "0.62486213", "0.62165296", "0.6201551", "0.61874926", "0.6170071", "0.6166342", "0.6162597", "0.6162597", "0.6150684", "0.6107513", "0.6038195...
0.0
-1
mission 2 O(n) //
@Override public void addPoint(Point point) { if (size==0){ current = new Container(point,null,null,null,null); this.minx=current; this.maxx=current; this.miny=current; this.maxy=current; this.size=1; } else{ int counter=0; Container toAdd; //---------------------find the right place in order,axis x---------------// this.current = this.minx; Point currentData = this.current.getData(); while (counter<this.size-1 && currentData.getX() < point.getX()){ // counter<=this.size => this.current.getNext()!=null this.current = this.current.getNextX(); currentData = this.current.getData(); counter++; } if (currentData.getX() < point.getX()){ toAdd = new Container(point,this.current,this.current.getNextX(),null,null); if (this.current.getNextX()!=null) this.current.getNextX().setPrevX(toAdd); this.current.setNextX(toAdd); counter++; } else { toAdd = new Container(point,this.current.getPrevX(),this.current,null,null); if (this.current.getPrevX()!=null) this.current.getPrevX().setNextX(toAdd); this.current.setPrevX(toAdd); } if (counter==0) this.minx=toAdd; if (counter==this.size) this.maxx=toAdd; //----------------------find the right place in order,axis y----------------// counter=0; currentData = this.miny.getData(); this.current = this.miny; while (counter<this.size-1 && currentData.getY() < point.getY()){ this.current = this.current.getNextY(); currentData = this.current.getData(); counter++; } if (currentData.getY() < point.getY()){ toAdd.setY(this.current, this.current.getNextY()); if (this.current.getNextY()!=null) this.current.getNextY().setPrevY(toAdd); this.current.setNextY(toAdd); counter++; }else { toAdd.setY(this.current.getPrevY(), this.current); if (this.current.getPrevY()!=null) this.current.getPrevY().setNextY(toAdd); this.current.setPrevY(toAdd); } if (counter==0) this.miny=toAdd; if (counter==this.size) this.maxy=toAdd; this.size++; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static int f2(int N) { \n int x = 0; //O(1)\n for(int i = 0; i < N; i++) // O(n)\n // O(n)`\n for(int j = 0; j < i; j++) \n x++;\n return x;\n }", "public static int f1(int N) {\n int x = 0; //O(1)\n for(int i = 0; i < N; i++...
[ "0.7396602", "0.6926155", "0.66727793", "0.6604036", "0.6139762", "0.61213535", "0.60339177", "0.6024553", "0.59879553", "0.59857476", "0.59813523", "0.5978266", "0.59459406", "0.58895546", "0.58704984", "0.584019", "0.58024865", "0.58018345", "0.5766866", "0.5747929", "0.572...
0.0
-1
// mission 3 O(n) //
public Point[] getPointsInRangeRegAxis(int min, int max, Boolean axis) { int Number = NumInRangeAxis(min, max, axis); //how much points are there ? Point[] pointsInRange = new Point[Number]; if (Number==0) return pointsInRange; int i = 0; if (axis){ this.current=this.minx; while (i<Number){ if (this.current.getData().getX()>=min && this.current.getData().getX()<=max){ pointsInRange[i]=this.current.getData(); i++;} this.current=this.current.getNextX(); } } else { this.current=this.miny; while (i<Number){ if (this.current.getData().getY()>=min && this.current.getData().getY()<=max){ pointsInRange[i]=this.current.getData(); i++;} this.current=this.current.getNextY(); } } return pointsInRange; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static int f2(int N) { \n int x = 0; //O(1)\n for(int i = 0; i < N; i++) // O(n)\n // O(n)`\n for(int j = 0; j < i; j++) \n x++;\n return x;\n }", "public int[] fix34(int[] nums) {\r\n\tint i=0; // O(1)\r\n while(i<nums.length && nums[i]!=...
[ "0.64969844", "0.64588165", "0.62250316", "0.6131948", "0.60594136", "0.59865105", "0.5944839", "0.59432524", "0.5887996", "0.5870389", "0.5859284", "0.57878405", "0.5781826", "0.5779588", "0.5773686", "0.576751", "0.56769997", "0.56659925", "0.56458205", "0.5637843", "0.5590...
0.0
-1
Aid Function how much points are in the bounds//
private int NumInRangeAxis(int min, int max, Boolean axis){ int counter = 0; boolean stop = false; if (this.size==0) return 0; if (axis){ //axis x if (min>this.maxx.getData().getX() || max<this.minx.getData().getX()) stop=true; this.current=this.minx; while (!stop && this.current!=null){ if (this.current.getData().getX()>=min && this.current.getData().getX() <=max) counter++; if (this.current.getData().getX() >= max) stop=true; this.current=this.current.getNextX(); }} else { //axis y if (min>this.maxy.getData().getY() || max<this.miny.getData().getY()) stop=true; this.current=this.miny; while (!stop && this.current!=null){ if (this.current.getData().getY()>=min && this.current.getData().getY() <=max) counter++; if (this.current.getData().getY() >= max) stop=true; this.current=this.current.getNextY(); }} return counter; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getBound();", "int getBoundsX();", "int getNeedPoints();", "private double getRangeCenter(int lowerBound, int upperBound) {\n return (lowerBound + upperBound) / 2.0;\n }", "public boolean detectBound(){\n if(posX < 10){\n posX = 10;\n velX = 0;\n accX ...
[ "0.7466469", "0.6804313", "0.66710603", "0.65437573", "0.65197855", "0.6437915", "0.64104193", "0.6403869", "0.6401772", "0.63834834", "0.63724655", "0.63149256", "0.63075733", "0.63020647", "0.63020647", "0.6240427", "0.6235785", "0.6217505", "0.6211271", "0.61762375", "0.61...
0.0
-1
// mission 4 O(n) same logic as mission 3//
public Point[] getPointsInRangeOppAxis(int min, int max, Boolean axis) { int Number = NumInRangeAxis(min, max, axis); Point[] pointsInRange = new Point[Number]; if (Number==0) return pointsInRange; int i = 0; if (axis){ // sorted by axis y this.current=this.miny; while (i<Number){ if (this.current.getData().getX()>=min && this.current.getData().getX() <=max){ pointsInRange[i]=this.current.getData(); i++;} this.current=this.current.getNextY(); } } else {// sorted by axis x this.current=this.minx; while (i<Number){ if (this.current.getData().getY()>=min && this.current.getData().getY() <=max){ pointsInRange[i]=this.current.getData(); i++;} this.current=this.current.getNextX(); } } return pointsInRange; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int[] fix34(int[] nums) {\r\n\tint i=0; // O(1)\r\n while(i<nums.length && nums[i]!=3) // O(n)\r\n i++; // n+1\r\n int j=i; // O(1)\r\n while(j+1<nums.length && nums[j+1]!=4) // O(n)\r\n j++; // n+1\r\n while(i<nums.length){ // O(n)\r\n if(nums[i]==3){ // O(1)\r\n int temp=nums[i+1]; // O(...
[ "0.60769004", "0.58962506", "0.5826095", "0.57471436", "0.564394", "0.5643363", "0.56391907", "0.5626346", "0.56199795", "0.5591683", "0.55422413", "0.5525774", "0.5525542", "0.55214757", "0.5514189", "0.5504412", "0.5476177", "0.5460131", "0.5437553", "0.54373896", "0.543337...
0.0
-1
// mission 5 O(1)//
public double getDensity() { double widthX = this.maxx.getData().getX()-this.minx.getData().getX(); double widthY = this.maxy.getData().getY()-this.miny.getData().getY(); return (this.size)/(widthX * widthY); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private int e(amj paramamj)\r\n/* 202: */ {\r\n/* 203:221 */ alq localalq = paramamj.b();\r\n/* 204:222 */ int i = paramamj.b;\r\n/* 205: */ \r\n/* 206:224 */ int j = d(paramamj);\r\n/* 207:225 */ if (j < 0) {\r\n/* 208:226 */ j = j();\r\n/* 209: */ }\r\n/* 210:228 */ i...
[ "0.62750584", "0.59749866", "0.5870791", "0.57973725", "0.5751836", "0.57138026", "0.5643832", "0.56160057", "0.55788326", "0.5560758", "0.55513334", "0.55231345", "0.5503651", "0.5502847", "0.5496296", "0.5481784", "0.54813325", "0.54794115", "0.5468744", "0.5459127", "0.545...
0.0
-1
// mission 6 O(|A|),A is the numbers of points to erase//
public void narrowRange(int min, int max, Boolean axis) { int counter=0; // how much points we erasing total ? boolean erasingAll=false; // if we eventually erasing all the database // by axis X-----------------------------------------// if (axis){ this.current = this.minx; while (!erasingAll && this.current.getData().getX()<min){ narrowOppPoint(this.current,axis); // deleting this point in y axis this.current = this.current.getNextX(); counter++; if (this.current==null) //if we get to the edge of the DS erasingAll=true; } if (!erasingAll) this.current.setPrevX(null); this.minx = this.current; // the actual erasing //---// this.current = this.maxx; while (!erasingAll && this.current.getData().getX() > max){ narrowOppPoint(this.current,axis); this.current = this.current.getPrevX(); counter++; if (this.current==null) //if we get to the edge of the DS erasingAll=true; } if (!erasingAll) this.current.setNextX(null); this.maxx = this.current; //the actual erasing } // by axis Y -----------------------------------------------------------// else{ this.current = this.miny; while (!erasingAll && this.current.getData().getY()<min){ narrowOppPoint(this.current,axis); this.current = this.current.getNextY(); counter++; if (this.current==null) //if we get to the edge of the DS erasingAll=true; } if (!erasingAll) this.current.setPrevY(null); this.miny = this.current; //the actual erasing //--// this.current = this.maxy; while (!erasingAll && this.current.getData().getY() > max){ narrowOppPoint(this.current,axis); this.current = this.current.getPrevY(); counter++; if (this.current==null) //if we get to the edge of the DS erasingAll=true; } if (!erasingAll) this.current.setNextY(null); this.maxy = this.current; //the actual erasing } this.size = this.size - counter; // Update the size of the DS }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void erase();", "synchronized protected void removePoint(final int index) {\n \t\t// check preconditions:\n \t\tif (index < 0) {\n \t\t\treturn;\n \t\t} else if (n_points - 1 == index) {\n \t\t\t//last point out\n \t\t\tn_points--;\n \t\t} else {\n \t\t\t//one point out (but not the last)\n \t\t\t--n_points;\n \...
[ "0.6384145", "0.6053335", "0.59204835", "0.5826101", "0.5751348", "0.5745018", "0.55886936", "0.55694276", "0.55619186", "0.5560873", "0.5545191", "0.5526922", "0.55241853", "0.550532", "0.54843885", "0.54773366", "0.5473004", "0.54663235", "0.54356056", "0.54215527", "0.5418...
0.0
-1
// mission 7 O(1)//
public Boolean getLargestAxis() { double widthX = this.maxx.getData().getX()-this.minx.getData().getX(); double widthY = this.maxy.getData().getY()-this.miny.getData().getY(); return (widthX > widthY); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private int e(amj paramamj)\r\n/* 202: */ {\r\n/* 203:221 */ alq localalq = paramamj.b();\r\n/* 204:222 */ int i = paramamj.b;\r\n/* 205: */ \r\n/* 206:224 */ int j = d(paramamj);\r\n/* 207:225 */ if (j < 0) {\r\n/* 208:226 */ j = j();\r\n/* 209: */ }\r\n/* 210:228 */ i...
[ "0.6238564", "0.61389905", "0.59912705", "0.59226453", "0.58908445", "0.5878164", "0.5793167", "0.57386255", "0.5705054", "0.57037485", "0.56654197", "0.56287295", "0.56252605", "0.56233007", "0.56138843", "0.56085974", "0.55992347", "0.55688804", "0.55630255", "0.55549055", ...
0.0
-1
// mission 8 O(n)//
public Container getMedian(Boolean axis) { int Number = (this.size)/2 ; if (axis){ this.current = this.minx; while (Number>0){ this.current=this.current.getNextX(); Number--; } } else{ this.current = this.miny; while (Number>0){ this.current=this.current.getNextY(); Number--; } } return this.current; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static int f2(int N) { \n int x = 0; //O(1)\n for(int i = 0; i < N; i++) // O(n)\n // O(n)`\n for(int j = 0; j < i; j++) \n x++;\n return x;\n }", "public static int f1(int N) {\n int x = 0; //O(1)\n for(int i = 0; i < N; i++...
[ "0.665431", "0.6478027", "0.6263234", "0.62300843", "0.6183434", "0.6161432", "0.6010909", "0.59628373", "0.5912911", "0.5821763", "0.5781815", "0.5779863", "0.5766134", "0.56854767", "0.5682253", "0.5674304", "0.56674445", "0.5603618", "0.5594077", "0.55774456", "0.55641735"...
0.0
-1
// mission 9 //
public Point[] nearestPairInStrip(Container container, double width, Boolean axis) { double leftGap,rightGap; int minIndex; int numInStrip = 0; this.current = container; Point currentData = this.current.getData(); if (axis){ //width of the strip by axis leftGap = currentData.getX() + (width/2); rightGap = currentData.getX() - (width/2);} else{ leftGap = container.getData().getY() + (width/2); rightGap = container.getData().getY() - (width/2);} // we count the number of points in the strip with aid function Point[] setup = {new Point(0, 0)}; Point[] strip = NumInStripAxis(container,rightGap,leftGap,axis,setup); // return in strip[0].getX() the num of points in the strip numInStrip = strip[0].getX(); // number of points in the strip minIndex = numInStrip - strip[0].getY(); // index in the array that we will find the min there, later on Point[] insert = new Point[numInStrip]; // build array in this size // insert the right points to the array if (numInStrip>=2){ insert[0] = new Point(numInStrip, 1); // to insert points to the array we need thus values in [0] strip = NumInStripAxis(container,rightGap,leftGap,axis,insert); // O(numInStrip) - the array is not sorted yet }else return null; // there is less then 2 points in the strip // now we sort the "strip" array if (numInStrip*Math.log10(numInStrip)/Math.log10(2)<this.size){// sort by O(numInStrip*log(numInStrip)) if (axis) {Arrays.sort(strip, new CompareY());} // if the strip width is axis x then sort by Y else {Arrays.sort(strip, new CompareX());} }else{ // sort by O(n) int min,max; if (axis){//X if (numInStrip==this.size){ min = this.minx.getData().getX(); max = this.maxx.getData().getX();} else{// if we don't have this.size points in our strip min = strip[minIndex].getX(); max = strip[0].getX();} // when we build the array the max point in the axis will be in the 0 index } else{ //Y if (numInStrip==this.size){ min = this.miny.getData().getY(); max = this.maxy.getData().getY();} else{// if we don't have all the data structure in our strip min = strip[minIndex].getY(); max = strip[0].getY(); // when we build the array the max point in the axis will be in the 0 index } } strip = getPointsInRangeOppAxis(min, max, axis); // O(n) - to sorted this "strip" array } // now we want to know which of the points is the nearest points in the "strip" array if (strip.length>=2) return nearestPointInArray(strip); else return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void mo21877s() {\n }", "void mo41083a();", "void mo310e();", "public void mo21795T() {\n }", "void mo119581a();", "private void kk12() {\n\n\t}", "void mo37810a();", "public void mo21791P() {\n }", "public void mo21878t() {\n }", "void mo17012c();", "public void mo21794S() {...
[ "0.63093895", "0.6296552", "0.62288725", "0.6193015", "0.6189889", "0.61892146", "0.61822665", "0.61693984", "0.61672705", "0.61655", "0.6143048", "0.6129655", "0.61274403", "0.6118696", "0.6116993", "0.610924", "0.61073405", "0.60935706", "0.60934174", "0.6090066", "0.608669...
0.0
-1
Aid Function calculate the nearest point O(sizeOftheArray) ,min sizeOftheArray=2 //
private Point[] nearestPointInArray(Point[] strip){ int j = 1; // with each point we measure the distance with the following 6 point's Point[] currentMinPoints = {strip[0],strip[1]}; double currentMinDistance = Distance(currentMinPoints[0], currentMinPoints[1]); double currentDistance; for (int i=0; i< strip.length; i++){ while (j<8 && i+j < strip.length){ currentDistance = Distance(strip[i], strip[i+j]); if (currentDistance<currentMinDistance){ currentMinDistance = currentDistance; currentMinPoints[0] = strip[i]; currentMinPoints[1] = strip[i+j]; } j++; } j=1; } return currentMinPoints; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Point[] nearestPair() {\n\t\t\tPoint[] Answer = new Point[2];\n\t\t\tif (this.size<2)\treturn null; //step 1\n\t\t\tif (this.size==2){\n\t\t\t\tAnswer[0]=this.minx.getData();\n\t\t\t\tAnswer[1]=this.maxx.getData();\n\t\t\t\treturn Answer;\t\t\t\n\t\t\t}\n\t\t\tdouble MinDistance=-1; // for sure it will be c...
[ "0.6635072", "0.61888695", "0.6142773", "0.6098727", "0.60667753", "0.59069383", "0.58801174", "0.5865531", "0.58468115", "0.5839513", "0.5808318", "0.58025277", "0.5791157", "0.5777135", "0.57690144", "0.57616043", "0.57563424", "0.57332885", "0.571779", "0.5686548", "0.5684...
0.6417323
1
Aid Function calculate the Distance between 2 point O(1)//
private double Distance(Point first, Point second){ // distance between two points return Math.sqrt(Math.pow(second.getY()-first.getY(),2) + Math.pow(second.getX()-first.getX(),2)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int distance(Coord coord1, Coord coord2);", "public static double getDist(int id1, int id2) {\n\t\tArrayList<Double> gA1 = geneAttributes.get(id1);\n\t\tArrayList<Double> gA2 = geneAttributes.get(id2);\n\t\tdouble dist = 0;\n\t\tfor(int i=0;i<gA1.size();i++) {\n\t\t\tdist += ( (gA1.get(i) - gA2.get(i)) * ...
[ "0.69384915", "0.6927092", "0.6844633", "0.68221384", "0.67649156", "0.6743448", "0.6743139", "0.66938716", "0.6669573", "0.66636485", "0.6648481", "0.66471577", "0.66119236", "0.65966773", "0.65924066", "0.6566044", "0.65622336", "0.6551025", "0.654481", "0.6537926", "0.6532...
0.6753979
5
Aid Function build an array with the points in the strip O(numInStrip)//
private Point[] NumInStripAxis(Container container,double min, double max, Boolean axis, Point[] strip){ int counter = strip[0].getX(); int insert = strip[0].getY(); // the parameter tell us if we want to count the number of the points or insert them. int minIndex; // for later on, we want to know the index of the min point in the axis if (axis){ //axis x this.current=container; while (this.current!=null && this.current.getData().getX()>min){ if (insert==1){ strip[counter-1]=this.current.getData(); counter--; } else counter++; this.current=this.current.getPrevX(); } minIndex=counter; this.current=container.getNextX(); while (this.current!=null && this.current.getData().getX()<max){ if (insert==1){ strip [counter-1]=this.current.getData(); counter--; } else counter++; this.current=this.current.getNextX(); } } else { //axis y this.current=container; while (this.current!=null && this.current.getData().getY()>min){ if (insert==1){ strip [counter-1]=this.current.getData(); counter--; } else counter++; this.current=this.current.getPrevY(); } minIndex=counter; this.current=container.getNextY(); while (this.current!=null && this.current.getData().getY()<max){ if (insert==1){ strip [counter-1]=this.current.getData(); counter--; } else counter++; this.current=this.current.getNextY(); } } if (insert!=1) //we count the number of points in the strip and calculate the min index for later strip[0]=new Point(counter,minIndex); return strip; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int[] makeIndicesForTriangleStrip() {\n int[] indices = new int[getNoOfIndices()];\n int index = 0;\n for (int vIndex = 1; vIndex <= verticalResolution; vIndex++)\n for (int hIndex = 0; hIndex < horizontalResolution; hIndex++) {\n indices[index] = ((vIndex-1) *...
[ "0.5750628", "0.5666743", "0.54876655", "0.5126647", "0.50980264", "0.5082301", "0.5035888", "0.50358737", "0.49519736", "0.49361452", "0.49088386", "0.4903456", "0.4858342", "0.48358923", "0.48279396", "0.48261014", "0.48232424", "0.48206806", "0.47991073", "0.47911933", "0....
0.5550075
2
// mission 10 //
public Point[] nearestPair() { Point[] Answer = new Point[2]; if (this.size<2) return null; //step 1 if (this.size==2){ Answer[0]=this.minx.getData(); Answer[1]=this.maxx.getData(); return Answer; } double MinDistance=-1; // for sure it will be change in the next section, just for avoid warrning. double MinDistanceInStrip=-1; Point[] MinPointsLeft = new Point[2]; Point[] MinPointsRight = new Point[2]; Point[] MinPointsInStrip = new Point[2]; // around the median boolean LargestAxis = getLargestAxis(); //step 2 Container median = getMedian(LargestAxis); //step 3 if (LargestAxis){// step 4 - calling the recursive function nearestPairRec MinPointsLeft = nearestPairRec(getPointsInRangeRegAxis(this.minx.getData().getX(), median.getData().getX(),LargestAxis), LargestAxis); MinPointsRight =nearestPairRec(getPointsInRangeRegAxis(median.getNextX().getData().getX(), this.maxx.getData().getX(),LargestAxis), LargestAxis); } else{ MinPointsLeft = nearestPairRec(getPointsInRangeRegAxis(this.miny.getData().getY(), median.getData().getY(),LargestAxis), LargestAxis); MinPointsRight =nearestPairRec(getPointsInRangeRegAxis(median.getNextY().getData().getY(), this.maxy.getData().getY(),LargestAxis), LargestAxis); } //step 5 if (MinPointsLeft!=null && MinPointsRight!=null){ if (Distance(MinPointsLeft[0], MinPointsLeft[1]) > Distance(MinPointsRight[0], MinPointsRight[1])){ MinDistance = Distance(MinPointsRight[0], MinPointsRight[1]); Answer = MinPointsRight; }else{ MinDistance = Distance(MinPointsLeft[0], MinPointsLeft[1]); Answer = MinPointsLeft; } } else if (MinPointsLeft!=null) { MinDistance = Distance(MinPointsLeft[0], MinPointsLeft[1]); Answer = MinPointsLeft; } else if (MinPointsRight!=null){ MinDistance = Distance(MinPointsRight[0], MinPointsRight[1]); Answer = MinPointsRight; } //step 6 - nearest point around the median if (MinDistance==-1) MinDistance=0; MinPointsInStrip = nearestPairInStrip(median, MinDistance*2, LargestAxis); if (MinPointsInStrip != null){ MinDistanceInStrip = Distance(MinPointsInStrip[0], MinPointsInStrip[1]); if (MinDistanceInStrip < MinDistance) return MinPointsInStrip; } return Answer; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Mission createMission();", "void mo310e();", "void mo37810a();", "public void mo21877s() {\n }", "void mo41083a();", "public void mo21795T() {\n }", "void mo119581a();", "void mo17012c();", "public static void createMissions() {\n allMissions.addMission(airport, \"Find your boardingpas...
[ "0.6220456", "0.60012305", "0.59437615", "0.5940899", "0.5885935", "0.588389", "0.58160317", "0.57945824", "0.57730865", "0.57676786", "0.57596856", "0.57574105", "0.5748787", "0.57356036", "0.57189536", "0.5714192", "0.5710568", "0.5689444", "0.56810206", "0.5678759", "0.566...
0.0
-1
Aid Function Recursive //
private Point[] nearestPairRec(Point[] range, boolean axis) { Point[] Answer = new Point[2]; if (range.length < 4) return nearestPair3Points(range); Point[] MinPointsLeft = new Point[2]; Point[] MinPointsRight = new Point[2]; Point[] MinPointsInStrip = new Point[2]; double MinDistance = -1; //it will be change for sure, because we pass the array only if it containes 4 points and above. double MinDistanceInStrip; //step 4 if (axis){ MinPointsLeft = nearestPairRec(getPointsInRangeRegAxis(range[0].getX(), range[(range.length)/2].getX(), axis), axis); MinPointsRight =nearestPairRec(getPointsInRangeRegAxis(range[((range.length)/2)+1].getX(), range[range.length-1].getX() ,axis), axis); } else{ MinPointsLeft = nearestPairRec(getPointsInRangeRegAxis(range[0].getY(), range[(range.length)/2].getY(), axis), axis); MinPointsRight =nearestPairRec(getPointsInRangeRegAxis(range[((range.length)/2)+1].getY(), range[range.length-1].getY() ,axis), axis); } //step 5 if (MinPointsLeft!=null && MinPointsRight!=null){ if (Distance(MinPointsLeft[0], MinPointsLeft[1]) > Distance(MinPointsRight[0], MinPointsRight[1])){ MinDistance = Distance(MinPointsRight[0], MinPointsRight[1]); Answer = MinPointsRight; }else{ MinDistance = Distance(MinPointsLeft[0], MinPointsLeft[1]); Answer = MinPointsLeft; } }else if (MinPointsLeft!=null && MinPointsRight==null) { MinDistance = Distance(MinPointsLeft[0], MinPointsLeft[1]); Answer = MinPointsLeft; }else if (MinPointsRight!=null && MinPointsLeft==null){ MinDistance = Distance(MinPointsRight[0], MinPointsRight[1]); Answer = MinPointsRight; } //step 6 find the nearest point around the median int upper; int lower; if (MinDistance==-1) MinDistance = 0; if (axis){ upper = (int) (range[(range.length)/2].getX()+MinDistance); lower = (int) (range[(range.length)/2].getX()-MinDistance); } else{ upper = (int) (range[(range.length)/2].getY()+MinDistance); lower = (int) (range[(range.length)/2].getY()-MinDistance); } range = getPointsInRangeOppAxis(lower, upper, axis); if (range.length>=2) MinPointsInStrip = nearestPointInArray(range); if (MinPointsInStrip[0]!=null){ MinDistanceInStrip = Distance(MinPointsInStrip[0], MinPointsInStrip[1]); if (MinDistanceInStrip < MinDistance) return MinPointsInStrip; } return Answer; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int getAid();", "private int root(int i) {\n while(id[i]!=i){\n i = id[i];\n }\n return i;\n }", "void id(int id, id id, int id) {}", "private int root(int i) {\n while (i != id[i]) {\n i = id[i];\n }\n return i;\n }", "int getAId();", "public void inOrde...
[ "0.5752261", "0.55906713", "0.5569327", "0.5437755", "0.5358243", "0.53217286", "0.5250887", "0.52422035", "0.5228659", "0.5160622", "0.51552117", "0.5145885", "0.5125668", "0.5117902", "0.5110255", "0.5086806", "0.50854164", "0.50768536", "0.50503916", "0.50308645", "0.50217...
0.0
-1
Aid Function return the nearest points in max 3 point//
private Point[] nearestPair3Points(Point[] range) { if (range.length < 2) return null; if (range.length == 2) return range; //else - its mean that we have 3 points in the array Point[] Answer = new Point[2]; double currentMinDistance = Distance(range[0], range[1]); Answer[0]= range[0]; Answer[1]= range[1]; if (Distance(range[0], range[2]) < currentMinDistance){ currentMinDistance = Distance(range[0], range[2]); Answer[0]= range[0]; Answer[1]= range[2]; } if (Distance(range[1], range[2]) < currentMinDistance){ Answer[0]= range[1]; Answer[1]= range[2]; } return Answer; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private GeoPoint getClosestPoint(List<GeoPoint> points) {\r\n\t\tGeoPoint closestPoint = null;\r\n\t\tdouble distance = Double.MAX_VALUE;\r\n\r\n\t\tPoint3D P0 = _scene.get_camera().get_p0();\r\n\r\n\t\tfor (GeoPoint i : points) {\r\n\t\t\tdouble tempDistance = i.point.distance(P0);\r\n\t\t\tif (tempDistance < dis...
[ "0.61878496", "0.58817744", "0.580779", "0.566227", "0.5630367", "0.5605174", "0.5602393", "0.55880713", "0.55682623", "0.55344236", "0.55286413", "0.55230755", "0.55149126", "0.55052716", "0.54715765", "0.5437966", "0.54154545", "0.5411211", "0.5371219", "0.53674966", "0.535...
0.6021589
1
Get all the fotografias.
Page<Fotografia> findAll(Pageable pageable);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@GET\n @Path(\"/mostrarOrdenadasFS\")\n @Produces({\"application/json\"})\n public List<Fotografia> fotoUsuarioOrdenadaFS(){\n int idUser = 1;\n return fotografiaEJB.FotoUsuarioOrdenadasFS(idUser);\n }", "@GetMapping(\"/familles\")\n public List<FamilleDTO> getAllFamilles() {\n ...
[ "0.7002351", "0.67218024", "0.6680692", "0.66763836", "0.6532965", "0.64726615", "0.6457687", "0.6400378", "0.6365489", "0.63409644", "0.63188833", "0.63034266", "0.62960184", "0.62678856", "0.6202135", "0.61823314", "0.61759746", "0.61641705", "0.61468524", "0.6141856", "0.6...
0.62001234
15
Get all the fotografias with eager load of manytomany relationships.
Page<Fotografia> findAllWithEagerRelationships(Pageable pageable);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic List<Film> findAllFilms() {\n\t\treturn filmRepository.findAll();\r\n\t}", "Page<Fotografia> findAll(Pageable pageable);", "public List<Medico> findAll() {\n\t\treturn medicoMapper.findAll();\n\t}", "@Override\n\tpublic List<Provincia> fiindAll() {\n\t\treturn provincieRepository.findAl...
[ "0.5733244", "0.5564955", "0.5508136", "0.54690206", "0.5410369", "0.5398999", "0.5385024", "0.53801006", "0.5362727", "0.5361579", "0.5342562", "0.53385925", "0.53123164", "0.53000647", "0.52777106", "0.5261997", "0.5255466", "0.5242534", "0.52176875", "0.520907", "0.5185945...
0.6834874
0
Get the "id" fotografia.
Optional<Fotografia> findOne(Long id);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java....
[ "0.74847764", "0.74847764", "0.74847764", "0.74847764", "0.74847764", "0.74847764", "0.74847764", "0.74847764", "0.74847764", "0.74847764", "0.74847764", "0.74847764", "0.74847764", "0.74847764", "0.74847764", "0.74847764", "0.74847764", "0.74847764", "0.74847764", "0.7412225",...
0.0
-1
Delete the "id" fotografia.
void delete(Long id);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void delete(String id);", "public void delete(String id);", "public void delete(String id);", "public void delete(String id);", "public void delete(String id);", "public void deleteById(String id);", "public void delete(Integer id);", "public void delete(Integer id);", "public void delete(In...
[ "0.77795", "0.77795", "0.77795", "0.77795", "0.77795", "0.7708823", "0.7688643", "0.7688643", "0.7688643", "0.7664635", "0.76206714", "0.76206714", "0.76206714", "0.76206714", "0.76206714", "0.76206714", "0.76206714", "0.76206714", "0.76206714", "0.76206714", "0.761965", "0...
0.0
-1
This method was generated by MyBatis Generator. This method corresponds to the database table core.report_metadata
public ReportMetadataExample() { oredCriteria = new ArrayList<Criteria>(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "TableReportMetadata getReportMetadata(String reportId);", "public abstract List<ColumnSpecification> metadata();", "@Override\r\n\t\tpublic DatabaseMetaData getMetaData() throws SQLException {\n\t\t\treturn null;\r\n\t\t}", "@Override\n\tpublic JDBCMetaData getMetaData() throws SQLException {\n\t\treturn nul...
[ "0.720387", "0.60612166", "0.5897073", "0.5817371", "0.58169", "0.5653088", "0.5575094", "0.5565293", "0.5523116", "0.55214834", "0.5424825", "0.5421459", "0.5377486", "0.534678", "0.5342339", "0.53190213", "0.5239825", "0.5236659", "0.5227619", "0.513109", "0.5122094", "0....
0.47236001
61
This method was generated by MyBatis Generator. This method corresponds to the database table core.report_metadata
public void setOrderByClause(String orderByClause) { this.orderByClause = orderByClause; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "TableReportMetadata getReportMetadata(String reportId);", "public abstract List<ColumnSpecification> metadata();", "@Override\r\n\t\tpublic DatabaseMetaData getMetaData() throws SQLException {\n\t\t\treturn null;\r\n\t\t}", "@Override\n\tpublic JDBCMetaData getMetaData() throws SQLException {\n\t\treturn nul...
[ "0.720387", "0.60612166", "0.5897073", "0.5817371", "0.58169", "0.5653088", "0.5575094", "0.5565293", "0.5523116", "0.55214834", "0.5424825", "0.5421459", "0.5377486", "0.534678", "0.5342339", "0.53190213", "0.5239825", "0.5236659", "0.5227619", "0.513109", "0.5122094", "0....
0.0
-1
This method was generated by MyBatis Generator. This method corresponds to the database table core.report_metadata
public String getOrderByClause() { return orderByClause; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "TableReportMetadata getReportMetadata(String reportId);", "public abstract List<ColumnSpecification> metadata();", "@Override\r\n\t\tpublic DatabaseMetaData getMetaData() throws SQLException {\n\t\t\treturn null;\r\n\t\t}", "@Override\n\tpublic JDBCMetaData getMetaData() throws SQLException {\n\t\treturn nul...
[ "0.720387", "0.60612166", "0.5897073", "0.5817371", "0.58169", "0.5653088", "0.5575094", "0.5565293", "0.5523116", "0.55214834", "0.5424825", "0.5421459", "0.5377486", "0.534678", "0.5342339", "0.53190213", "0.5239825", "0.5236659", "0.5227619", "0.513109", "0.5122094", "0....
0.0
-1
This method was generated by MyBatis Generator. This method corresponds to the database table core.report_metadata
public void setDistinct(boolean distinct) { this.distinct = distinct; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "TableReportMetadata getReportMetadata(String reportId);", "public abstract List<ColumnSpecification> metadata();", "@Override\r\n\t\tpublic DatabaseMetaData getMetaData() throws SQLException {\n\t\t\treturn null;\r\n\t\t}", "@Override\n\tpublic JDBCMetaData getMetaData() throws SQLException {\n\t\treturn nul...
[ "0.7202898", "0.60632956", "0.58984065", "0.58183134", "0.5817594", "0.56543213", "0.5574047", "0.5565886", "0.5524865", "0.55226165", "0.5423179", "0.5421737", "0.5379457", "0.5348147", "0.5343479", "0.5319976", "0.5241551", "0.5238874", "0.5229574", "0.5133239", "0.5122431"...
0.0
-1
This method was generated by MyBatis Generator. This method corresponds to the database table core.report_metadata
public boolean isDistinct() { return distinct; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "TableReportMetadata getReportMetadata(String reportId);", "public abstract List<ColumnSpecification> metadata();", "@Override\r\n\t\tpublic DatabaseMetaData getMetaData() throws SQLException {\n\t\t\treturn null;\r\n\t\t}", "@Override\n\tpublic JDBCMetaData getMetaData() throws SQLException {\n\t\treturn nul...
[ "0.720387", "0.60612166", "0.5897073", "0.5817371", "0.58169", "0.5653088", "0.5575094", "0.5565293", "0.5523116", "0.55214834", "0.5424825", "0.5421459", "0.5377486", "0.534678", "0.5342339", "0.53190213", "0.5239825", "0.5236659", "0.5227619", "0.513109", "0.5122094", "0....
0.0
-1
This method was generated by MyBatis Generator. This method corresponds to the database table core.report_metadata
public List<Criteria> getOredCriteria() { return oredCriteria; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "TableReportMetadata getReportMetadata(String reportId);", "public abstract List<ColumnSpecification> metadata();", "@Override\r\n\t\tpublic DatabaseMetaData getMetaData() throws SQLException {\n\t\t\treturn null;\r\n\t\t}", "@Override\n\tpublic JDBCMetaData getMetaData() throws SQLException {\n\t\treturn nul...
[ "0.720387", "0.60612166", "0.5897073", "0.5817371", "0.58169", "0.5653088", "0.5575094", "0.5565293", "0.5523116", "0.55214834", "0.5424825", "0.5421459", "0.5377486", "0.534678", "0.5342339", "0.53190213", "0.5239825", "0.5236659", "0.5227619", "0.513109", "0.5122094", "0....
0.0
-1
This method was generated by MyBatis Generator. This method corresponds to the database table core.report_metadata
public void or(Criteria criteria) { oredCriteria.add(criteria); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "TableReportMetadata getReportMetadata(String reportId);", "public abstract List<ColumnSpecification> metadata();", "@Override\r\n\t\tpublic DatabaseMetaData getMetaData() throws SQLException {\n\t\t\treturn null;\r\n\t\t}", "@Override\n\tpublic JDBCMetaData getMetaData() throws SQLException {\n\t\treturn nul...
[ "0.720387", "0.60612166", "0.5897073", "0.5817371", "0.58169", "0.5653088", "0.5575094", "0.5565293", "0.5523116", "0.55214834", "0.5424825", "0.5421459", "0.5377486", "0.534678", "0.5342339", "0.53190213", "0.5239825", "0.5236659", "0.5227619", "0.513109", "0.5122094", "0....
0.0
-1
This method was generated by MyBatis Generator. This method corresponds to the database table core.report_metadata
public Criteria or() { Criteria criteria = createCriteriaInternal(); oredCriteria.add(criteria); return criteria; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "TableReportMetadata getReportMetadata(String reportId);", "public abstract List<ColumnSpecification> metadata();", "@Override\r\n\t\tpublic DatabaseMetaData getMetaData() throws SQLException {\n\t\t\treturn null;\r\n\t\t}", "@Override\n\tpublic JDBCMetaData getMetaData() throws SQLException {\n\t\treturn nul...
[ "0.7202898", "0.60632956", "0.58984065", "0.58183134", "0.5817594", "0.56543213", "0.5574047", "0.5565886", "0.5524865", "0.55226165", "0.5423179", "0.5421737", "0.5379457", "0.5348147", "0.5343479", "0.5319976", "0.5241551", "0.5238874", "0.5229574", "0.5133239", "0.5122431"...
0.0
-1
This method was generated by MyBatis Generator. This method corresponds to the database table core.report_metadata
public Criteria createCriteria() { Criteria criteria = createCriteriaInternal(); if (oredCriteria.size() == 0) { oredCriteria.add(criteria); } return criteria; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "TableReportMetadata getReportMetadata(String reportId);", "public abstract List<ColumnSpecification> metadata();", "@Override\r\n\t\tpublic DatabaseMetaData getMetaData() throws SQLException {\n\t\t\treturn null;\r\n\t\t}", "@Override\n\tpublic JDBCMetaData getMetaData() throws SQLException {\n\t\treturn nul...
[ "0.720387", "0.60612166", "0.5897073", "0.5817371", "0.58169", "0.5653088", "0.5575094", "0.5565293", "0.5523116", "0.55214834", "0.5424825", "0.5421459", "0.5377486", "0.534678", "0.5342339", "0.53190213", "0.5239825", "0.5236659", "0.5227619", "0.513109", "0.5122094", "0....
0.0
-1
This method was generated by MyBatis Generator. This method corresponds to the database table core.report_metadata
protected Criteria createCriteriaInternal() { Criteria criteria = new Criteria(); return criteria; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "TableReportMetadata getReportMetadata(String reportId);", "public abstract List<ColumnSpecification> metadata();", "@Override\r\n\t\tpublic DatabaseMetaData getMetaData() throws SQLException {\n\t\t\treturn null;\r\n\t\t}", "@Override\n\tpublic JDBCMetaData getMetaData() throws SQLException {\n\t\treturn nul...
[ "0.720387", "0.60612166", "0.5897073", "0.5817371", "0.58169", "0.5653088", "0.5575094", "0.5565293", "0.5523116", "0.55214834", "0.5424825", "0.5421459", "0.5377486", "0.534678", "0.5342339", "0.53190213", "0.5239825", "0.5236659", "0.5227619", "0.513109", "0.5122094", "0....
0.0
-1
This method was generated by MyBatis Generator. This method corresponds to the database table core.report_metadata
public void clear() { oredCriteria.clear(); orderByClause = null; distinct = false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "TableReportMetadata getReportMetadata(String reportId);", "public abstract List<ColumnSpecification> metadata();", "@Override\r\n\t\tpublic DatabaseMetaData getMetaData() throws SQLException {\n\t\t\treturn null;\r\n\t\t}", "@Override\n\tpublic JDBCMetaData getMetaData() throws SQLException {\n\t\treturn nul...
[ "0.720387", "0.60612166", "0.5897073", "0.5817371", "0.58169", "0.5653088", "0.5575094", "0.5565293", "0.5523116", "0.55214834", "0.5424825", "0.5421459", "0.5377486", "0.534678", "0.5342339", "0.53190213", "0.5239825", "0.5236659", "0.5227619", "0.513109", "0.5122094", "0....
0.0
-1
Constructor for the c lass
public MultiThreadController(IWarehouse w, Map<IGridRobot, GridCell> map, IPathPlanner p){ this.robot2dest = map; this.warehouse = w; this.pathplanner = p; if(this.robot2dest == null || this.warehouse == null || this.pathplanner == null){ throw new IllegalArgumentException(); } this.c = new Counter<IWarehouse>(this); this.warehouse.subscribe(c); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Constructor() {\r\n\t\t \r\n\t }", "public Constructor(){\n\t\t\n\t}", "public Cgg_jur_anticipo(){}", "public Coche() {\n super();\n }", "public CyanSus() {\n\n }", "public Clade() {}", "public Cohete() {\n\n\t}", "public CSSTidier() {\n\t}", "public Chauffeur() {\r\n\t}", "public PSRelation...
[ "0.8074113", "0.78651935", "0.75311315", "0.75268525", "0.73410815", "0.72299063", "0.7089077", "0.7079425", "0.70634925", "0.7044512", "0.6971069", "0.6961904", "0.6924417", "0.6906384", "0.6881015", "0.6878406", "0.68781674", "0.6876841", "0.6872309", "0.6868231", "0.684896...
0.0
-1
Moves all robots to their destinations and returns the number of total steps taken
public int startMoving() throws RobotCrashException{ //holds direction to step in Direction direction; //holds the robot about to move IGridRobot robot; //holds the return of pathplanner Entry<IGridRobot, Direction> toMove; //The task that will be run in a new thread Task runnable; //Pool of threads ExecutorService es = new ScheduledThreadPoolExecutor(this.robot2dest.size()); //Holds the gridcell a robot is about to step to GridCell newCell; //A map of currently moving robots Map<IGridRobot, Direction> movingBots; int steps = 0; //Keep moving robots until the number that reached the destination //is equal to the number of robots we are moving while(this.c.getCount() < this.robot2dest.size()){ toMove = this.pathplanner.nextStep(this.warehouse, this.robot2dest); if(toMove != null){ robot = toMove.getKey(); direction = toMove.getValue(); newCell = GridRobot.oneCellOver(robot.getLocation(), direction); //Check if the robot is about to crash into another robot for(IGridRobot r : this.robot2dest.keySet()){ if(newCell.equals(r.getLocation())){ throw new RobotCrashException(); } } //Check if they are stepping onto where another robot is stepping movingBots = warehouse.getRobotsInMotion(); for(IGridRobot r : movingBots.keySet()){ if(GridRobot.oneCellOver(r.getLocation(), movingBots.get(r)).equals(newCell)){ throw new RobotCrashException(); } } //Move the robot in a new thread this.warehouse.addMovingRobot(robot, direction); steps++; runnable = new Task(robot, direction); CompletableFuture.runAsync(runnable, es); } } return steps; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int totalSteps() {\n return moves.size();\n }", "private void StepForRobot() { \r\n\r\n\t\tIterator<Robot> itr = rob.iterator();\r\n\t\twhile(itr.hasNext()) {\r\n\r\n\t\t\tRobot r = itr.next();\r\n\t\t\tFruit fDest = null;\r\n\t\t\tdouble maxSum = 0;\r\n\t\t\tnode_data v = null;\r\n\t\t\tIterato...
[ "0.7029393", "0.6312764", "0.62660044", "0.6235145", "0.6185689", "0.61645675", "0.6123366", "0.60798717", "0.6046514", "0.5960815", "0.59380805", "0.5931586", "0.5922367", "0.58945596", "0.58928007", "0.58893883", "0.58270025", "0.5826163", "0.57929623", "0.57906705", "0.578...
0.5980031
9
A getter for the warehouse
public IWarehouse getWarehouse(){ return this.warehouse; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getWarehouseid() {\n return warehouseid;\n }", "public String getWarehouseID() {\r\n\t\treturn this.name;\r\n\t}", "public Integer getWarehouseid() {\n return warehouseid;\n }", "public Integer getWarehousesnumber() {\n return warehousesnumber;\n }", "@Override\n...
[ "0.7691885", "0.74666", "0.7438418", "0.7113794", "0.7060306", "0.7013395", "0.6928033", "0.68249345", "0.68130577", "0.6793522", "0.6771546", "0.64760184", "0.64537984", "0.6403153", "0.6403153", "0.6403153", "0.62867695", "0.6244369", "0.61683476", "0.61401415", "0.6006341"...
0.85849625
0
A getter for the robot2dest
public Map<IGridRobot, GridCell> getRobot2Dest(){ return this.robot2dest; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Destination getDestination();", "public Room getDestination() {\n return toRoom;\n }", "String getDest();", "public Coordinate getDestination() {\n return cDestination;\n }", "@Override\n\tpublic String getDest() {\n\t\treturn dest;\n\t}", "public Object getDestination() {\n/* 339 */ ...
[ "0.66289634", "0.6605907", "0.65203965", "0.64711154", "0.64440113", "0.6434345", "0.6421757", "0.6381867", "0.6380403", "0.63483274", "0.6345102", "0.63162655", "0.63060355", "0.6280355", "0.6251337", "0.6208025", "0.6207595", "0.6199655", "0.6189937", "0.6166031", "0.615178...
0.7369565
0
Obtiene el nombre del proyecto
public String getNombre() { return nombre; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "java.lang.String getProjectName();", "String getProjectName();", "public static String getName() {\n\t\treturn ProjectMain._name;\n\t}", "private String getSimplicityProjectName() {\n return properties.getProperty(\"simplicity.starter.projectName\");\n }", "public String getProjectName() { return...
[ "0.69750535", "0.68752605", "0.68371063", "0.6778379", "0.6546513", "0.6546513", "0.65101445", "0.6500836", "0.6358117", "0.63520074", "0.6309388", "0.63090366", "0.6301331", "0.6248439", "0.6150765", "0.6140678", "0.61084044", "0.6098592", "0.6095646", "0.6093734", "0.609373...
0.0
-1