query
stringlengths
7
33.1k
document
stringlengths
7
335k
metadata
dict
negatives
listlengths
3
101
negative_scores
listlengths
3
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
TODO Autogenerated method stub
public List<NameValuePair> AddtripObject(String vehicle_registration_number,String destination_station, String vehicle_owner_phone_number,String customer_company_name, String customer_name,String customer_phone_number,String driver_phone_number) { List<NameValuePair> nameValuePairs = new ArrayList<NameValuePair>(); try { nameValuePairs.add(new BasicNameValuePair("vehicle_registration_number",vehicle_registration_number)); nameValuePairs.add(new BasicNameValuePair("destination_station",destination_station)); nameValuePairs.add(new BasicNameValuePair("driver_phone_number",driver_phone_number)); nameValuePairs.add(new BasicNameValuePair("vehicle_owner_phone_number",vehicle_owner_phone_number)); nameValuePairs.add(new BasicNameValuePair("customer_company_name",customer_company_name)); nameValuePairs.add(new BasicNameValuePair("customer_name",customer_name)); nameValuePairs.add(new BasicNameValuePair("customer_phone_number",customer_phone_number)); } catch (Exception e) { //TODO e.printStackTrace(); } return nameValuePairs; }
{ "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
This method stores numbers of images of the sprite(frog)
public Image frogImg(int num){ frog = new Image[8]; frog[0] = new Image("file:src/main/resources/Img/froggerUp.png", FrogImgSize, FrogImgSize, true, true); frog[1] = new Image("file:src/main/resources/Img/froggerLeft.png", FrogImgSize, FrogImgSize, true, true); frog[2] = new Image("file:src/main/resources/Img/froggerDown.png", FrogImgSize, FrogImgSize, true, true); frog[3] = new Image("file:src/main/resources/Img/froggerRight.png", FrogImgSize, FrogImgSize, true, true); frog[4] = new Image("file:src/main/resources/Img/froggerUpJump.png", FrogImgSize, FrogImgSize, true, true); frog[5] = new Image("file:src/main/resources/Img/froggerLeftJump.png", FrogImgSize, FrogImgSize, true, true); frog[6] = new Image("file:src/main/resources/Img/froggerDownJump.png", FrogImgSize, FrogImgSize, true, true); frog[7] = new Image("file:src/main/resources/Img/froggerRightJump.png", FrogImgSize, FrogImgSize, true, true); return frog[num]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int getSpriteArraySize();", "private void setSpritesCount(int count) {\n this.count = count;\n }", "public int getimagecounter() {\n\t\treturn imagecounter;\r\n\t}", "@Override\n\tpublic void draw(GraphicsContext gc) {\n\t\t\tgc.drawImage(image.get(n), x, y);\n\t\tn++;\n\t\tif (n>=15) n=0;\n\t}", ...
[ "0.7021473", "0.67985064", "0.66510284", "0.6413966", "0.64049214", "0.6352883", "0.63261104", "0.63066465", "0.6297193", "0.6289773", "0.6276759", "0.62702286", "0.6264539", "0.6237135", "0.62326604", "0.6219452", "0.618622", "0.61841255", "0.6155936", "0.6149659", "0.614211...
0.6044924
29
This method allows player to control the sprite with keyboard Mainly keys W,A,S,D
public void keyListener() { setOnKeyPressed(event -> { if(death) {} else { if (event.getCode() == KeyCode.W || event.getCode() == KeyCode.UP) { move(0, -movementY); setImage(frogImg(4)); addPoints(10); } if (event.getCode() == KeyCode.A || event.getCode() == KeyCode.LEFT) { move(-movementX, 0); setImage(frogImg(5)); } if (event.getCode() == KeyCode.S || event.getCode() == KeyCode.DOWN) { move(0, movementY); setImage(frogImg(6)); addPoints(-10); } if (event.getCode() == KeyCode.D || event.getCode() == KeyCode.RIGHT) { move(movementX, 0); setImage(frogImg(7)); } } }); setOnKeyReleased(event -> { if (death) {} else { if (event.getCode() == KeyCode.W || event.getCode() == KeyCode.UP) { addPoints(10); setImage(frogImg(0)); move(0, -movementY); } if (event.getCode() == KeyCode.A || event.getCode() == KeyCode.LEFT) { move(-movementX, 0); setImage(frogImg(1)); } if (event.getCode() == KeyCode.S || event.getCode() == KeyCode.DOWN) { move(0, movementY); setImage(frogImg(2)); addPoints(-10); } if (event.getCode() == KeyCode.D || event.getCode() == KeyCode.RIGHT) { move(movementX, 0); setImage(frogImg(3)); } } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void keyPressed(KeyEvent e) {\n\t\tif(e.getKeyCode() == KeyEvent.VK_RIGHT) {\n\t\t\tplayer.right = true; \n\t\t}\n\t\telse if(e.getKeyCode() == KeyEvent.VK_LEFT) {\n\t\t\tplayer.left = true; \n\t\t}\n\t\t\n\t\tif(e.getKeyCode() == KeyEvent.VK_Z) {\n\t\t\tplayer.shoot = true;\n\t\t}\n\t\t\n\t\ti...
[ "0.7181216", "0.71622664", "0.7138272", "0.70942473", "0.7046905", "0.6987309", "0.6951331", "0.69462615", "0.6924583", "0.6909033", "0.68843913", "0.6856126", "0.6846084", "0.68162787", "0.6797619", "0.6795276", "0.67288655", "0.6698005", "0.6685812", "0.66747665", "0.665940...
0.0
-1
This method set sprite's level
public void setFrogLevel(int level){ this.frogLevel = level; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void setLevel(int level) {\n if (level > 1) {\n this.level = level;\n scaleUp();\n percentageScaling();\n }\n }", "public static void setLevel(int level) {\n Game.level = level;\n movingSpeed = level * 5;\n }", "public voi...
[ "0.7011013", "0.69330883", "0.683288", "0.6813023", "0.67816436", "0.6773782", "0.667888", "0.6638715", "0.66318655", "0.65560246", "0.6544203", "0.65336776", "0.652142", "0.65097076", "0.6483534", "0.64641076", "0.645861", "0.644931", "0.6442073", "0.64386845", "0.64057744",...
0.0
-1
This method reposition the sprite to it's spawn location
public void frogReposition() { setY(FrogPositionY); setX(FrogPositionX); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void respawn(Vector2 spawnPos){\n position.x = spawnPos.x;\n position.y = spawnPos.y;\n }", "void ship_respawn() {\n ship.resetPosition();\n ship_image_view.setX(ship.x_position); // Update the ship image position\n }", "final protected void setSpawnPosition(in...
[ "0.7526972", "0.6915623", "0.6900574", "0.6867881", "0.6746487", "0.6560797", "0.64923656", "0.6489056", "0.64331454", "0.64232135", "0.64059675", "0.6397656", "0.63733613", "0.63157976", "0.6288064", "0.62787676", "0.6248798", "0.6204451", "0.6190968", "0.6167969", "0.614656...
0.589299
41
This method display the animation of the sprite when the sprite intersect with different object Different animation will show, if intersect with different object ( water or car)
public void frogDeath(long now, String type) { String car = "car"; String water = "water"; death = true; final Image[] cardeath = new Image[4]; cardeath[0] = new Image("file:src/main/resources/Img/cardeath1.png", FrogImgSize, FrogImgSize, true, true); cardeath[1] = new Image("file:src/main/resources/Img/cardeath2.png", FrogImgSize, FrogImgSize, true, true); cardeath[2] = new Image("file:src/main/resources/Img/cardeath3.png", FrogImgSize, FrogImgSize, true, true); cardeath[3] = new Image("file:src/main/resources/Img/cardeath3.png", FrogImgSize, FrogImgSize, true, true); final Image[] waterdeath = new Image[4]; waterdeath[0] = new Image("file:src/main/resources/Img/waterdeath1.png", FrogImgSize, FrogImgSize, true, true); waterdeath[1] = new Image("file:src/main/resources/Img/waterdeath2.png", FrogImgSize, FrogImgSize, true, true); waterdeath[2] = new Image("file:src/main/resources/Img/waterdeath3.png", FrogImgSize, FrogImgSize, true, true); waterdeath[3] = new Image("file:src/main/resources/Img/wwaterdeath4.png", FrogImgSize, FrogImgSize, true, true); Image[] array = new Image[4]; if (type == car) array = cardeath; if (type == water) array = waterdeath; if ((now) % 15 == 0) { this.DeathAnimationTime++; } if (DeathAnimationTime == 1) { setImage(array[0]); } if (DeathAnimationTime == 3) { setImage(array[1]); } if (DeathAnimationTime == 5) { setImage(array[2]); } if (DeathAnimationTime == 7) { setImage(array[3]); } if (DeathAnimationTime == 9) { this.lives -= 1; frogReposition(); intersectCar = false; intersectWater = false; this.DeathAnimationTime = 0; setImage(frog[0]); death = false; addPoints(-100); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void collision(GameObjectContainer<GameObject> object) {\n \tGameObject renderObject = null;\r\n\t\tfor (int i = 0; i < object.getSize(); i++) {\r\n\t\t\trenderObject = object.iterator().next();\r\n\r\n\t\t\tif (renderObject.getType() == \"BLOCK\") {\r\n\t\t\t\tif (this.getBoundsInParent().intersects(re...
[ "0.63925886", "0.59388083", "0.579286", "0.57673347", "0.57483387", "0.5743549", "0.5743256", "0.5656718", "0.5655287", "0.56240475", "0.55897087", "0.55645096", "0.5563416", "0.55573785", "0.5533956", "0.5521477", "0.5505765", "0.5455898", "0.5440336", "0.54037845", "0.53715...
0.0
-1
This method prevent the sprite move out of the window
public void checkIsFrogAtTheEdge() { if (getY()<0 || getY()>800) { setY(FrogPositionY); } if (getX()<-20) { move(movementX*2, 0); } else if (getX()>600) { move(-movementX*2, 0); } if (getY()<130 && ! ((getIntersectingObjects(End.class).size() >= 1))) { move(0, movementY*2); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void doMove() {\n if (((-Transform.getOffsetTranslation().getX() - (Game.getWindowWidth()) < getPosition().getX()\n && (-Transform.getOffsetTranslation().getX() + (Game.getWindowWidth() * 2)) > getPosition().getX()\n && (-Transform.getOffsetTranslation().g...
[ "0.6909506", "0.66293454", "0.65116227", "0.6503227", "0.64617735", "0.63481945", "0.6342362", "0.63342714", "0.63285595", "0.62715995", "0.62700677", "0.62608737", "0.6241361", "0.61838716", "0.61708415", "0.61249024", "0.61232966", "0.61182344", "0.61178267", "0.6105328", "...
0.0
-1
This method record the points of the score
public void addPoints(int point){ this.points += point; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void addPointsToScore(int points) {\n score += points;\n }", "public void awardPoints(int points)\n {\n score += points ;\n }", "public int returnPoints()\n {\n return score ;\n }", "public void addPoints(int earnedPoints) {score = score + earnedPoints;}", "@Override\n\tpublic v...
[ "0.74951524", "0.72201025", "0.71608865", "0.6964736", "0.69054556", "0.68773574", "0.6843254", "0.67044055", "0.66542864", "0.6630524", "0.65954703", "0.65853065", "0.6582997", "0.65801424", "0.6569261", "0.6433011", "0.64060974", "0.6362772", "0.63508725", "0.63508725", "0....
0.5984127
79
This method shown what happen if intersect with the 'end'(cavelike image)
public void IntersectEnd() { if (getIntersectingObjects(End.class).get(0).isEnd()) { this.end--; addPoints(-100); } points+=100; getIntersectingObjects(End.class).get(0).setEnd(); frogReposition(); this.end++; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n\t\tpublic void testIntersectAtEndPoints2(){\n\t\t\tGenericLineSegmentsIntersect v=new GenericLineSegmentsIntersect();\n\t\t\tint[][] lines={\n\t\t\t\t\t{1,5,5,1},\n\t\t\t\t\t{1,4,5,0},\n\t\t\t\t\t{2,2,6,10}\n\t\t\t};\n\n\t\t\tassertTrue(v.intersects(lines));\n\t\t}", "public CFWRect intersectsLine( CFWPo...
[ "0.6267102", "0.6260333", "0.6254047", "0.6170025", "0.60478145", "0.6001644", "0.59186727", "0.5885705", "0.5854712", "0.5854365", "0.5802306", "0.57977706", "0.5762833", "0.57475007", "0.5730222", "0.57144636", "0.56484365", "0.56184244", "0.5600271", "0.5586908", "0.558690...
0.63815135
0
This method update the sprite according to frame at the moment of the time
@Override public void act(long now) { checkIsFrogAtTheEdge(); if (getIntersectingObjects(Car.class).size() >= 1 || getIntersectingObjects(Truck.class).size() >= 1 || getIntersectingObjects(LongTruck.class).size() >= 1) { intersectCar = true; } else if (getIntersectingObjects(Log.class).size() >= 1 && !death) { move(frogSpeed.ObjSpeed(frogLevel, 6), 0); } else if (getIntersectingObjects(LongLog.class).size() >= 1 && !death) { move(frogSpeed.ObjSpeed(frogLevel, 8), 0); } else if (getIntersectingObjects(Turtle.class).size() >= 1) { move(frogSpeed.ObjSpeed(frogLevel, 7), 0); } else if (getIntersectingObjects(WetTurtle.class).size() >= 1){ if (getIntersectingObjects(WetTurtle.class).get(0).isSunk()) { intersectWater = true; } else { move(frogSpeed.ObjSpeed(frogLevel, 7), 0); } } else if (getIntersectingObjects(End.class).size() >= 1) { IntersectEnd(); } else if (getY() < waterPositionY) { intersectWater = true; } getlives(); CheckIntersect(intersectCar, intersectWater, now); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void updateSprite(){\n //facing front\n getImage().clear();\n getImage().drawImage(SHEET,-(frame%SHEET_W)*SPRITE_W,0);\n if(!goLeft) getImage().mirrorHorizontally();\n if (iframes>0&&iframes%10<5) setImage(SpriteHelper.makeWhite( getImage()));\n else frame = frame ...
[ "0.76569957", "0.7622563", "0.7322635", "0.72036314", "0.71564484", "0.70850056", "0.7039907", "0.70009094", "0.6959935", "0.69314975", "0.6872378", "0.6813356", "0.67761993", "0.6766921", "0.67569846", "0.67489153", "0.6725608", "0.6720523", "0.6720459", "0.67022264", "0.669...
0.0
-1
This method check if the this sprite(frog) has intersected with other object
public void CheckIntersect(boolean intersectCar, boolean intersectWater, long now) { if(intersectCar) frogDeath(now, "car"); if(intersectWater) frogDeath(now, "water"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean isIntersecting(GameObject other){\n if(other.isSolid()&&this.solid){\n return RectF.intersects(other.getHitBox(),this.hitBox);//|| hitBox.contains(other.getHitBox())||other.getHitBox().contains(this.hitBox)\n }\n return false;\n }", "public boolean intersects(Bas...
[ "0.77678156", "0.7451469", "0.742569", "0.73156726", "0.73071253", "0.7292519", "0.72765267", "0.72224593", "0.71936154", "0.7086726", "0.7033293", "0.6994861", "0.6993341", "0.6963451", "0.694705", "0.6942861", "0.6936319", "0.689588", "0.6884441", "0.68836623", "0.6840082",...
0.0
-1
check if the player has achieved the objectives
public boolean getStop() { return end == 5; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean checkIfPlayerHoldsExplosive () { return noOfExplosives > 0; }", "private void checkLoosePLayer(){\n if (hero.getHp()<=0){\n loose();\n }\n\n }", "public boolean isAchieved(){\n\t\treturn achieved;\n\t}", "public boolean checkToProceed(){\n return getGame().ge...
[ "0.7303071", "0.7069867", "0.68497133", "0.6785094", "0.67638475", "0.6731815", "0.6649283", "0.66449046", "0.66347814", "0.65772194", "0.6531889", "0.6514382", "0.65075207", "0.6497888", "0.64934385", "0.64922684", "0.6487405", "0.6464523", "0.64511836", "0.64410704", "0.643...
0.0
-1
Get the points of the player
public int getPoints() { return points; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getPoints ( Player player );", "public int getPlayPoints() {\n return localPlayPoints;\n }", "int getPoints();", "public int getPointsP() {\r\n\r\n pointsP = getPointsPlayer() + getPointsPlayer2();\r\n\r\n if (pointsP >= 10) {\r\n pointsP -= 10;\r\n ...
[ "0.8072532", "0.7291605", "0.7255843", "0.7204441", "0.71293527", "0.7128984", "0.7113684", "0.7113684", "0.7105069", "0.7105069", "0.7105069", "0.7105069", "0.7103077", "0.7070905", "0.70576316", "0.70497924", "0.703608", "0.6977547", "0.6976483", "0.69721854", "0.69668484",...
0.69393235
22
Check if player has used up sprite's lives
public boolean gameOver(){ return this.lives < 1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int isSafe(){\n int nbEnnemies = 0;\n List<Player> players = state.getPlayers();\n Player currentPlayer = state.getCurrentPlayer();\n for(Player p : players){\n if(!p.equals(currentPlayer)) {\n nbEnnemies += currentPlayerReachable(state.getCurrentPlayer(...
[ "0.7050848", "0.7034838", "0.6987766", "0.69729465", "0.66896796", "0.6661809", "0.66566217", "0.65582246", "0.6549221", "0.6546515", "0.6523835", "0.651429", "0.6499591", "0.64845884", "0.6475847", "0.6425787", "0.64110893", "0.6409328", "0.6402792", "0.6395389", "0.6393786"...
0.687652
4
Get the 'lives' of the sprite
public int getlives(){ return this.lives; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getLength () { return spriteLength; }", "ArrayList<Sprite> getSpriteArray();", "public final int getLives() {\n\t\treturn lives;\n\t}", "int getSpriteArraySize();", "public int lives() {\r\n return lifeStates.head().lives();\r\n }", "public Sprite getSprite()\n\t{\n\t\treturn sprite;...
[ "0.646422", "0.61013675", "0.5961367", "0.59082323", "0.588685", "0.5831268", "0.5821047", "0.5781629", "0.5736407", "0.5733711", "0.57204366", "0.57070524", "0.57070524", "0.56990707", "0.5671868", "0.5651936", "0.56401867", "0.56394875", "0.55974895", "0.55947626", "0.55803...
0.6578836
0
This method is use to reset the sprite back to initial state
public void reset(){ frogReposition(); lives = 5; end = 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void resetSprites() {\n\t\tSPRITE_LIST.clear();\n\t}", "public void reset() {\r\n this.x = resetX;\r\n this.y = resetY;\r\n state = 0;\r\n }", "public void reset()\n\t{\n\t\t\n\t\tif (lifeCount > 1)\n\t\t{\n\t\t\tthis.setCollisionOn(false);\n\t\t\tthis.setEingabe(false);\n\t\t\tt...
[ "0.78719443", "0.78012955", "0.74752885", "0.74217355", "0.7409548", "0.73901254", "0.7385633", "0.7363323", "0.73587793", "0.7329521", "0.7320422", "0.7309152", "0.72757554", "0.72626925", "0.72297424", "0.7227972", "0.7227362", "0.7173375", "0.71656823", "0.7148677", "0.713...
0.67411107
67
Test the property 'type'
@Test public void typeTest() { // TODO: test type }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void test_getType() {\n assertEquals(\"'type' value should be properly retrieved.\", type, instance.getType());\n }", "protected abstract boolean isSupportedTestType(Properties prop);", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean has...
[ "0.7718088", "0.7159945", "0.6523786", "0.6523786", "0.6523786", "0.6523786", "0.6523786", "0.6523786", "0.6523786", "0.6523786", "0.6523786", "0.6523786", "0.6523786", "0.6523786", "0.6523786", "0.6523786", "0.6523786", "0.6523786", "0.6523786", "0.6523786", "0.6523786", "...
0.6537111
3
Test the property 'title'
@Test public void titleTest() { // TODO: test title }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void assertTitle(final String title);", "boolean hasTitle();", "public void testGetSetTitle() {\n exp = new Experiment(\"10\");\n exp.setTitle(\"test\");\n assertEquals(\"test/set title does not work\", \"test\", exp.getTitle());\n }", "public void validateTitle()\r\n\t{\r\n\t\...
[ "0.76258165", "0.75384986", "0.7513237", "0.7495337", "0.74719113", "0.73645324", "0.7319108", "0.7302665", "0.72511905", "0.72304493", "0.72076654", "0.71960944", "0.71933275", "0.71859205", "0.7157751", "0.71317613", "0.7122924", "0.71143085", "0.71122307", "0.71036696", "0...
0.7130197
16
Test the property 'status'
@Test public void statusTest() { // TODO: test status }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Boolean getStatus() {return status;}", "boolean hasStatus();", "boolean hasStatus();", "boolean hasStatus();", "boolean hasStatus();", "boolean hasStatus();", "boolean hasStatus();", "boolean hasStatus();", "boolean hasStatus();", "boolean hasStatus();", "boolean hasStatus();", "boolea...
[ "0.76989675", "0.74008524", "0.74008524", "0.74008524", "0.74008524", "0.74008524", "0.74008524", "0.74008524", "0.74008524", "0.74008524", "0.74008524", "0.74008524", "0.74008524", "0.74008524", "0.74008524", "0.74008524", "0.74008524", "0.74008524", "0.74008524", "0.74008524"...
0.69896114
47
Test the property 'details'
@Test public void detailsTest() { // TODO: test details }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getDetails() {\n return this.details;\n }", "public void setDetails(String details) {\n this.details = details;\n }", "public String getDetails() {\n return details;\n }", "public void setDetails(String details) {\n\t\tthis.details = details;\n\t}", "@Override\n\...
[ "0.74203336", "0.7279267", "0.71734315", "0.71271026", "0.7098786", "0.7023407", "0.7023407", "0.70023185", "0.6981249", "0.69794893", "0.6931168", "0.6931168", "0.6890928", "0.685429", "0.685429", "0.68241715", "0.68241715", "0.68241715", "0.68241715", "0.6817622", "0.679132...
0.66731024
22
Test the property 'instance'
@Test public void instanceTest() { // TODO: test instance }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean hasInstance();", "@Test\n public void testGetInstance() throws Exception {\n HealthRecordController copy1 = HealthRecordController.getInstance();\n assert(HealthRecordController.getInstance() != null);\n assert(copy1 == HealthRecordController.getInstance());\n }", "@java.lang...
[ "0.66532195", "0.64099646", "0.6408215", "0.64074206", "0.6309724", "0.62918997", "0.626523", "0.62395585", "0.6234945", "0.6207778", "0.61605096", "0.61511546", "0.61398244", "0.6132428", "0.6131864", "0.6102573", "0.6099932", "0.6075622", "0.6066422", "0.596465", "0.5960139...
0.6896057
0
TODO Autogenerated method stub
@Override public String toString() { return "userName " + this.userName + ", pasword " + this.passWord + "sex " + userSex.name(); }
{ "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
Testing the class that returns an instance of a database Connection object. Checks if the Connection instance is null. That means that the connection is not successful and something is wrong.
@Test public void testGetDbInstance(){ Connection c = DatabaseConnect.getInstance(); assertTrue(c != null); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n\tpublic void testGetConnection() throws SQLException\n\t{\n\t\tassertTrue(DatabaseGateway.getConnection() != null);\n\t}", "@Test\n public void testConstructorConnection() {\n assertEquals(connection, dao.getDatabaseConnection());\n }", "@Test\n public void testGetConnection() {\n ...
[ "0.78950167", "0.7868624", "0.7649766", "0.72005457", "0.7138938", "0.71035576", "0.7052825", "0.69132626", "0.6909213", "0.68644255", "0.6859444", "0.68344355", "0.6831693", "0.67891157", "0.67840636", "0.669029", "0.6676925", "0.66523427", "0.65980846", "0.6575021", "0.6541...
0.7767737
2
Updating the account record for the specific account id with the new balance with Sanity check
@Transactional(isolation = Isolation.SERIALIZABLE) public void updateAccountBalance(Long accountId, Double newBalance) { Account account =accountRepository.findById(accountId) .orElseThrow(() -> new AccountNotFoundException("Account not found")); account.setBalance(newBalance); accountRepository.save(account); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void updateAccount(int id, double accountBalance, String account) {\n // Update only the required keys\n sql = \"UPDATE CashiiDB2 \" + \"SET \" + account + \" ='\" + accountBalance + \"' WHERE AccountNum in ('\" + id + \"')\";\n try {\n st.executeUpdate(sql);\n } catch (SQLEx...
[ "0.7941501", "0.77335745", "0.7642741", "0.76132643", "0.738528", "0.7360158", "0.73273164", "0.71828693", "0.71067506", "0.70349187", "0.7026426", "0.69675463", "0.681478", "0.68035233", "0.67393106", "0.6719202", "0.6716613", "0.66764766", "0.6669151", "0.66624075", "0.6656...
0.72649556
7
Check available balance of the account
@Transactional(readOnly = true) public boolean checkAvailableBalance(Long accountId, Double amount) { return getAccountBalance(accountId) < amount; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void checkBalance()\n\t{\n\t\tList<Account> accounts = Main.aDao.getAllAccounts(this.loggedIn.getUserId());\n\t\tdouble accountsTotal = 0;\n\t\t\n\t\tfor(Account a : accounts)\n\t\t{\n\t\t\taccountsTotal += a.getBalance();\n\t\t}\n\t\t\n\t\tSystem.out.println(\"Total funds available across all accounts:\\n\...
[ "0.83035403", "0.7642473", "0.72523975", "0.71771765", "0.71666414", "0.69082737", "0.6775751", "0.6711617", "0.6694238", "0.6615132", "0.6593064", "0.6547686", "0.6537332", "0.6523708", "0.65100425", "0.649842", "0.649842", "0.6464181", "0.64549243", "0.64464766", "0.6420594...
0.7152121
5
This method do both debit and credit transaction as per the request data. If the requested data contains debit as transaction type the transaction will debit. And, if the requested data contains credit as transaction type it will be credit transaction.
public void makeTransaction(Transaction transaction) throws BalanceNotAvailableException, TransactionIdNotUniqueException, TransactionTypeInCorrectException { if (checkTransactionId(transaction.getTransactionId())) { throw new TransactionIdNotUniqueException("Transaction Id should be unique"); } else if (transaction.getTransactionType().equalsIgnoreCase("debit")) { if (checkAvailableBalance(transaction.getAccountId(), transaction.getAmount())) { throw new BalanceNotAvailableException("Balance Not Available"); } updateAccountBalance(transaction.getAccountId(), getAccountBalance(transaction.getAccountId()) - transaction.getAmount()); transactionRepository.save(transaction); } else if (transaction.getTransactionType().equalsIgnoreCase("credit")) { updateAccountBalance(transaction.getAccountId(), getAccountBalance(transaction.getAccountId()) + transaction.getAmount()); transactionRepository.save(transaction); } else { throw new TransactionTypeInCorrectException("Transaction type should be debit or credit"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean debit(TransactionRequest transaction) throws ebank.InsufficientBalanceException,ebank.CardNumberException, SQLException, ClassNotFoundException;", "@ApiOperation(value = \"This end point will allow user to perform a debit transaction on their wallet\", response = Wallet.class)\n\t@PostMapping(\"/txn/debi...
[ "0.6899956", "0.65329784", "0.63463074", "0.6224422", "0.6071603", "0.60580873", "0.59640765", "0.5941383", "0.5869693", "0.57725745", "0.57573384", "0.5754943", "0.5725757", "0.5713487", "0.5673777", "0.5661515", "0.5634616", "0.5634015", "0.561148", "0.5608153", "0.55551076...
0.56944895
14
this comes from the request side but usually represents a dead channel
@Override public void errorReceived(String msg, Exception t) { abort(); // abort() calls sendError() which calls unregister() // so don't bother // unregister(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void communicationChannelBroken() {\n\n }", "@Override\n public void channelActive(ChannelHandlerContext ctx) throws Exception {\n super.channelActive(ctx);\n \n }", "@Override\n\tpublic void channelIn...
[ "0.67739916", "0.670909", "0.6658206", "0.6654782", "0.6623819", "0.66229934", "0.6596791", "0.655772", "0.6510236", "0.65058184", "0.6478751", "0.6462697", "0.64125913", "0.63898027", "0.63029855", "0.628535", "0.620156", "0.61651474", "0.614389", "0.614389", "0.6126655", ...
0.0
-1
/ renamed from: a
private final Single<TabSource> m39397a(MainPage mainPage) { switch (C9424c.f31575a[mainPage.ordinal()]) { case 1: mainPage = Single.a(TabSource.ACCOUNT); C2668g.a(mainPage, "Single.just(TabSource.ACCOUNT)"); return mainPage; case 2: mainPage = Single.a(TabSource.RECS); C2668g.a(mainPage, "Single.just(TabSource.RECS)"); return mainPage; case 3: return m39398b(); case 4: mainPage = Single.a(TabSource.ACTIVITY); C2668g.a(mainPage, "Single.just(TabSource.ACTIVITY)"); return mainPage; case 5: mainPage = Single.a(TabSource.DISCOVERY); C2668g.a(mainPage, "Single.just(TabSource.DISCOVERY)"); return mainPage; default: throw new NoWhenBranchMatchedException(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface C4521a {\n /* renamed from: a */\n void mo12348a();\n }", "public interface C1423a {\n /* renamed from: a */\n void mo6888a(int i);\n }", "interface bxc {\n /* renamed from: a */\n void mo2508a(bxb bxb);\n}", "interface C33292a {\n /* renamed fr...
[ "0.6249595", "0.6242955", "0.61393225", "0.6117684", "0.61140615", "0.60893875", "0.6046927", "0.60248226", "0.60201806", "0.59753186", "0.5947817", "0.5912414", "0.5883872", "0.5878469", "0.587005", "0.58678955", "0.58651674", "0.5857262", "0.58311176", "0.58279663", "0.5827...
0.0
-1
/ renamed from: b
private final Single<TabSource> m39398b() { Single<TabSource> d = RxJavaInteropExtKt.toV1Observable(this.f31574b.observe(), BackpressureStrategy.LATEST).c(1).a().d(new C13217b(this)); C2668g.a(d, "matchSubscreensTracker\n …ubscreenToTabSource(it) }"); return d; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void mo2508a(bxb bxb);", "@Override\n public void func_104112_b() {\n \n }", "@Override\n public void b() {\n }", "public interface C19351a {\n /* renamed from: b */\n void mo30633b(int i, String str, byte[] bArr);\n }", "@Override\n\tpublic void b2() {\n\t\t\n\t}", "v...
[ "0.64558864", "0.6283203", "0.6252635", "0.6250949", "0.6244743", "0.6216273", "0.6194491", "0.6193556", "0.61641675", "0.6140157", "0.60993093", "0.60974354", "0.6077849", "0.6001867", "0.5997364", "0.59737104", "0.59737104", "0.5905105", "0.5904295", "0.58908087", "0.588663...
0.0
-1
/ renamed from: a
private final TabSource m39394a(Subscreen subscreen) { switch (C9424c.f31576b[subscreen.ordinal()]) { case 1: return TabSource.ACTIVITY; case 2: return TabSource.MESSAGES; default: throw new NoWhenBranchMatchedException(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface C4521a {\n /* renamed from: a */\n void mo12348a();\n }", "public interface C1423a {\n /* renamed from: a */\n void mo6888a(int i);\n }", "interface bxc {\n /* renamed from: a */\n void mo2508a(bxb bxb);\n}", "interface C33292a {\n /* renamed fr...
[ "0.62497115", "0.6242887", "0.61394435", "0.61176854", "0.6114027", "0.60893", "0.6046901", "0.6024682", "0.60201293", "0.5975212", "0.59482527", "0.59121317", "0.5883635", "0.587841", "0.58703005", "0.5868436", "0.5864884", "0.5857492", "0.58306104", "0.5827752", "0.58272064...
0.0
-1
TODO Autogenerated method stub
@Override public void handlerFault(String msg) { System.out.println("Emailing the error " +msg); }
{ "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
Agrega marcador aobre posicion
private void agregarMarcador(double lat, double lon) { LatLng coord = new LatLng(lat, lon); CameraUpdate miUbi = CameraUpdateFactory.newLatLngZoom(coord, 16); if (mPrueba != null) mPrueba.remove(); mPrueba = mMap.addMarker(new MarkerOptions() .position(coord) .title("Reporte") .snippet("Reportar")); mPrueba.setDraggable(true); mPrueba.setTag(0); mMap.animateCamera(miUbi); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Posicion posicionAlDesarmarMenasor(Posicion posicion) {\n\t\t\t\tPosicion posAux;\n\t\t\t\ttry{\n\t\t\t\t\tposAux=new Posicion(posicion.getFila(),posicion.getColumna()-2);\n\t\t\t\t}catch(ErrorPosicionInvalida e){\n\t\t\t\t\tposAux=new Posicion(posicion.getFila(),posicion.getColumna()+1);\n\t\t\t\t}\n\t\t\...
[ "0.67552775", "0.6316757", "0.6281596", "0.6240726", "0.6235424", "0.6200949", "0.61771834", "0.6147352", "0.61412054", "0.61371225", "0.6097323", "0.60509527", "0.60214454", "0.60153276", "0.6009133", "0.59940284", "0.5972928", "0.5972206", "0.59709525", "0.59709525", "0.595...
0.54385585
93
Inflate the menu; this adds items to the action bar if it is present.
@Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.opciones_principal, menu); return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tMenuInflater inflater = getMenuInflater();\n \tinflater.inflate(R.menu.main_activity_actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {...
[ "0.724863", "0.7203384", "0.7197011", "0.71784776", "0.71090055", "0.7040796", "0.7039464", "0.7013998", "0.70109546", "0.6982435", "0.6946134", "0.6939684", "0.6935636", "0.69193685", "0.69193685", "0.6892893", "0.6884914", "0.68768066", "0.68763", "0.68635243", "0.68635243"...
0.0
-1
Handle action bar item clicks here. The action bar will automatically handle clicks on the Home/Up button, so long as you specify a parent activity in AndroidManifest.xml.
@Override public boolean onOptionsItemSelected(MenuItem item) { int id = item.getItemId(); //noinspection SimplifiableIfStatement if (id == R.id.action_settings) { return true; } return super.onOptionsItemSelected(item); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean onOptionsItemSelected(MenuItem item) { Handle action bar item clicks here. The action bar will\n // automatically handle clicks on the Home/Up button, so long\n // as you specify a parent activity in AndroidManifest.xml.\n\n //\n // HANDLE BACK BUTTON\n ...
[ "0.79039484", "0.78061193", "0.7765948", "0.772676", "0.76312095", "0.76217103", "0.75842994", "0.7530533", "0.748778", "0.7458179", "0.7458179", "0.7438179", "0.74213266", "0.7402824", "0.7391232", "0.73864055", "0.7378979", "0.73700106", "0.7362941", "0.73555434", "0.734530...
0.0
-1
Handle navigation view item clicks here.
@SuppressWarnings("StatementWithEmptyBody") @Override public boolean onNavigationItemSelected(MenuItem item) { int id = item.getItemId(); Button reporte = (Button) findViewById(R.id.button9); if (id == R.id.nav_report) { mMap.clear(); reporte.setVisibility(View.VISIBLE); agregarMarcador(posX, posY); } else if (id == R.id.nav_mLugares) { new Thread(new Runnable() { @Override public void run() { misReportes(); runOnUiThread(new Runnable() { @Override public void run() { mMap.clear(); misMarcadores(); } }); } }).start(); }/* else if (id == R.id.nav_slideshow) { } else if (id == R.id.nav_manage) { } else if (id == R.id.nav_share) { } else if (id == R.id.nav_send) { }*/ DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout); drawer.closeDrawer(GravityCompat.START); return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void onNavigationItemClicked(Element element);", "@Override\n public void onClick(View view) { listener.onItemClick(view, getPosition()); }", "void onDialogNavigationItemClicked(Element element);", "@Override\n public void onClick(View view) {\n itemInterface.OnItemClickedListener(tr...
[ "0.7882029", "0.7235578", "0.6987005", "0.69458413", "0.6917864", "0.6917864", "0.6883472", "0.6875181", "0.68681556", "0.6766498", "0.67418456", "0.67207", "0.6716157", "0.6713947", "0.6698189", "0.66980195", "0.66793925", "0.66624063", "0.66595167", "0.6646381", "0.6641224"...
0.0
-1
Default constructor for player
public Player(){ default_init(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Player(){}", "public Player(){}", "public Player() {\t\n\t}", "public Player() {}", "public Player() {}", "public Player() {}", "public Player() {}", "public Player() {\n this(\"\", \"\", \"\");\n }", "public Player(){\r\n\r\n }", "public Player(){\n\n }", "public Abstrac...
[ "0.8741055", "0.8741055", "0.86036736", "0.8596959", "0.8596959", "0.8596959", "0.8596959", "0.8475882", "0.8435791", "0.8401393", "0.8335466", "0.8283448", "0.80054766", "0.7964496", "0.7919893", "0.7917908", "0.7807834", "0.778589", "0.7780201", "0.77786666", "0.77736944", ...
0.8609861
2
Initialises all defaults for the player
private void default_init(){ id = 0; xPos = 0; yPos = 0; hp = 100; name=""; character_id = 1; weapons = new ArrayList<>(); weaponEntryTracker = new LinkedList<>(); isJumping = false; isFalling = false; initial_y= -1; stateOfMovement = 0; for(int i = 0; i < 3; i++){ this.weapons.add(new Pair<>(NO_WEAPON_ID, (short) 0)); } this.weapons.set(0,new Pair<>(PISTOL_ID,DEFAULT_PISTOL_AMMO)); currentWeapon = this.weapons.get(0); bulletsFired = new ArrayList<>(); shootingDirection = 1; energy = 0; sprint = false; score = 0; roundsWon = 0; ready = false; audioHandler = new AudioHandler(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Player(){\n default_init();\n }", "public void initPlayer();", "public static void init()\n {\n all = new HashMap<String, Player>();\n all.put(\"oli\", new Player(null));\n }", "void initializePlayer();", "private void initVars(){\n this.dice = new Dice();\n ...
[ "0.7280511", "0.7280047", "0.7088572", "0.7011876", "0.68636733", "0.6843378", "0.6840524", "0.6802228", "0.67798215", "0.67643195", "0.6725063", "0.67188966", "0.6699058", "0.6577474", "0.65359193", "0.65357447", "0.6513288", "0.6479414", "0.6457315", "0.6442749", "0.6436157...
0.6799173
8
Constructor used by networking to rebuild player object after it has been sent via network
public Player(byte id, short xPos, short yPos, byte hp, String name, ArrayList<Pair<Byte, Short>> weapons, ArrayList<Bullet> bullets, LinkedList<Byte> trakedWeapons, boolean jumpState, boolean fallState, short initial_y, byte currentWeapon,short currWeaponammo, short shootingDirection, boolean sprint, int score, byte roundsWon, boolean ready,int stateOfMovement,byte charId){ this.id =id; this.score = score; this.ready = ready; this.xPos = xPos; this.yPos = yPos; this.hp = hp; this.weapons = weapons; this.name = name; character_id = 1; this.weaponEntryTracker = trakedWeapons; this.isJumping=jumpState; this.isFalling=fallState; this.bulletsFired = bullets; this.currentWeapon = new Pair<>(currentWeapon,currWeaponammo); this.initial_y = initial_y; this.shootingDirection = shootingDirection; this.sprint = sprint; this.roundsWon = roundsWon; this.stateOfMovement = stateOfMovement; this.character_id = charId; audioHandler = new AudioHandler(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Player(){\n reset();\n }", "public Player() {\t\n\t}", "public Player(){}", "public Player(){}", "public Multi_Player()\r\n {\r\n \r\n }", "public Player() {}", "public Player() {}", "public Player() {}", "public Player() {}", "Player(String playerName) {\n this.p...
[ "0.70515364", "0.70152855", "0.6987408", "0.6987408", "0.6950799", "0.68929946", "0.68929946", "0.68929946", "0.68929946", "0.6877821", "0.68577933", "0.6848003", "0.6842951", "0.68145907", "0.6810061", "0.67826194", "0.6757031", "0.67513615", "0.67326516", "0.67140406", "0.6...
0.0
-1
Initialises player health, bullets and movement before each round of the game starts
public void init(){ hp = DEFAULT_MAX_HEALTH; bulletsFired = new ArrayList<>(); initial_y = -1; //Sets the byte to identify the state of movement //For animation purposes in the renderer //0 = stationary //1 = jumping //2 = moving left //3 = jumping left //4 = right //5 = Jumping right //6 = crouching //8 = crouching left //10 = crouching right stateOfMovement = 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void default_init(){\n id = 0;\n xPos = 0;\n yPos = 0;\n hp = 100;\n name=\"\";\n character_id = 1;\n weapons = new ArrayList<>();\n weaponEntryTracker = new LinkedList<>();\n isJumping = false;\n isFalling = false;\n initial_y= -...
[ "0.7248329", "0.7196519", "0.70506215", "0.6946902", "0.6941218", "0.69139606", "0.6888378", "0.6865154", "0.68583405", "0.683504", "0.67911327", "0.6753073", "0.67371607", "0.67192125", "0.67011297", "0.66919625", "0.6660937", "0.6660587", "0.66473234", "0.66277695", "0.6619...
0.79875875
0
Returns the id of the players character model
public byte get_charId(){ return character_id; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "java.lang.String getPlayerId();", "int getPlayerId();", "int getPlayerId();", "public int getPlayerId();", "public int getId() {\n return playerId;\n }", "long getPlayerId();", "public int getIdPlayer() {\n\t\treturn idPlayer;\n\t}", "public String getId() {\n\t\treturn this.playerid;\n\t}"...
[ "0.7420317", "0.7215148", "0.7215148", "0.71404237", "0.7039048", "0.69845617", "0.68315434", "0.67993015", "0.67654234", "0.6568335", "0.6560086", "0.6557631", "0.6550926", "0.65470785", "0.65261537", "0.65110636", "0.6501861", "0.64693004", "0.64677083", "0.6451552", "0.645...
0.6009473
36
Sets the id of the players character model
public void set_charId(byte id){ character_id = id; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void setPlayerId(int playerId);", "void setId(int id);", "void setId(String id);", "void setId(String id);", "void setId(String id);", "public Builder setPlayerId(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000002;\n...
[ "0.7129093", "0.618539", "0.6114669", "0.6114669", "0.6114669", "0.6094238", "0.607753", "0.6058667", "0.6056796", "0.6056796", "0.6044399", "0.603847", "0.603847", "0.5986423", "0.5968069", "0.596702", "0.5967015", "0.59414196", "0.59243464", "0.5916519", "0.5914464", "0.5...
0.6397576
1
Sets the direction of where the player is facing
public void setShootingDirection(short x){ this.shootingDirection = x; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void setFacing(Direction dir)\n {\n facing = dir;\n if(!userHoldingLeftXOrRight)\n {\n setStandingAnim();\n }\n }", "public static void setDirection(float x, float y) {\n PlayerDirectionSystem.directionX = x;\r\n PlayerDirectionSyst...
[ "0.7393117", "0.7303915", "0.7242024", "0.723651", "0.7129278", "0.7126441", "0.71252173", "0.71175575", "0.709564", "0.70395285", "0.6935842", "0.6934721", "0.68832123", "0.6843268", "0.6760004", "0.6714024", "0.67050207", "0.66982067", "0.66979057", "0.66969305", "0.6685713...
0.0
-1
Returns the direction of where the player is facing
public short getShootingDirection() { return shootingDirection; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public float getDirection();", "default Vector3 getDirection() {\r\n return Vector3.fromXYZ(getDirX(), getDirY(), getDirZ());\r\n }", "public double direction(){\n return Math.atan2(this.y, this.x);\n }", "public final Vector3f getDirection() {\r\n return direction;\r\n }", "p...
[ "0.7501941", "0.7375129", "0.73027635", "0.7295794", "0.7233421", "0.71741503", "0.71581316", "0.6975815", "0.69367826", "0.6922909", "0.6850767", "0.68499106", "0.68391585", "0.6803168", "0.6772096", "0.6747539", "0.6706063", "0.67022395", "0.6670714", "0.66635627", "0.66585...
0.0
-1
Sets the health value of the player
public void setHp(byte hp){ this.hp = hp; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setHealth(double h){\n health = h;\n }", "public void setHealth(int health)\r\n {\r\n this.health = health;\r\n }", "public void setHealth(double Health){\r\n health = Health;\r\n }", "public void SetHealth(int h)\n{\n\thealth=h;\n}", "private void setHealth(Player p,...
[ "0.77879965", "0.76852864", "0.7672885", "0.7631767", "0.7588944", "0.75707036", "0.7552027", "0.7538839", "0.7491915", "0.74061394", "0.73894876", "0.7287584", "0.7283912", "0.704905", "0.70440584", "0.7017057", "0.6851332", "0.68341714", "0.6771623", "0.6708324", "0.6650379...
0.6096549
52
Sets the coordinates of the player
public void setCoord(short xPos , short yPos ){ this.xPos = xPos; this.yPos = yPos; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void setPosition(double xPos, double yPos);", "public void setPosition(float x, float y);", "void setPos(float x, float y);", "public void setPosition(int x, int y) {\n this.coordX = x;\n this.coordY = y;\n }", "public void setLocation(float x, float y);", "private void setupPlayerPositi...
[ "0.7309773", "0.72914237", "0.7239412", "0.7037831", "0.70024896", "0.6890936", "0.68672085", "0.6863433", "0.6863396", "0.6857855", "0.6841608", "0.683448", "0.6833041", "0.6817613", "0.68125576", "0.680582", "0.68042237", "0.67955166", "0.67900944", "0.67800367", "0.6753029...
0.66740817
27
Sets the sprint state of the player
public void setSprint(boolean s){ this.sprint = s; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setState(PlayerState state) {\n this.state = state;\n }", "public void setPlayerState(boolean state)\n\t{\n\t\tthis.blnPlayerState = state;\n\t\t\n\t}", "public void setState(Player player) {\n\t\tstate = player;\n\t\tstateChanged();\n\t}", "public void setPlayerState(PlayerState player...
[ "0.689119", "0.68767214", "0.68718225", "0.6694096", "0.65995044", "0.65132535", "0.6492202", "0.6425598", "0.60954136", "0.6044789", "0.6033919", "0.6033246", "0.6006027", "0.5998501", "0.5995776", "0.59820837", "0.5942468", "0.59360874", "0.59300977", "0.5929049", "0.592678...
0.7350181
0
Returns the sprint state of the player
public boolean isSprinting(){ return this.sprint; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getPlayerState() {\n String playerState = name + \" \" + actionArray[0] \n + \" \" + actionArray[1] + \" \" + actionArray[2] + \" \" + colorID + \" \";\n return playerState;\n }", "public Player getState() {\n\t\treturn state;\n\t}", "public boolean getPlayerState(...
[ "0.7170017", "0.69233364", "0.68635213", "0.67622364", "0.6735815", "0.6603657", "0.65078723", "0.6307158", "0.6273208", "0.6230812", "0.620942", "0.61823356", "0.6172349", "0.6092564", "0.59955597", "0.5980871", "0.5941962", "0.5928151", "0.5924722", "0.58898205", "0.5877351...
0.6474505
7
Adds a weapon to the players inventory
public void addWeapon(Pair<Byte,Short> weapon){ //Total number of weapons player can carry is 5 (inc. default weapon) //If player has <3 weapons, simply add weapon. //Otherwise, first remove oldest weapon in inventory then add at that //position. //oldest weapon tracked by linked list of weapon entries. if(this.weapons.size() < 3) { this.weapons.add(weapon); this.weaponEntryTracker.add((byte) this.weapons.indexOf(weapon)); }else{ //Checks for duplicates, if duplicate weapons //found, new weapons ammo is just added to the current //weapon already in inventory for(Pair<Byte,Short> w : this.weapons){ if(Objects.equals(w.getKey(), weapon.getKey())){ if(weaponEntryTracker.size() == 1){ weaponEntryTracker = new LinkedList<>(); } else{ for(int tracker : weaponEntryTracker){ if(tracker == this.weapons.indexOf(w)){ weaponEntryTracker.remove((Integer) tracker); } } } Pair<Byte,Short> newWeapon = new Pair<>(weapon.getKey(), (short) (w.getValue()+weapon.getValue())); if(this.currentWeapon == w){ this.setCurrentWeapon(newWeapon); } this.weapons.set(this.weapons.indexOf(w),newWeapon); weaponEntryTracker.add((byte) this.weapons.indexOf(newWeapon)); return; } } //check for any no weapon entries - indicates //player dropped weapon. for(Pair<Byte,Short> w : this.weapons){ if(w.getKey() == NO_WEAPON_ID){ this.weapons.set(this.weapons.indexOf(w),weapon); this.weaponEntryTracker.add((byte) this.weapons.indexOf(weapon)); return; } } //If no null entries are found, remove oldest weapon int oldestWeapon = this.weaponEntryTracker.poll(); byte oldestWeaponKey = this.weapons.get(oldestWeapon).getKey(); this.weapons.set(oldestWeapon, weapon); this.weaponEntryTracker.add((byte) this.weapons.indexOf(weapon)); if(oldestWeaponKey == currentWeapon.getKey()){ setCurrentWeapon(weapon); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addToInventory(IWeapon weapon){\n if (weaponsInventory.size() < 12) {\n this.weaponsInventory.add(weapon);\n lenInventory += 1;\n }\n }", "public void add(Weapon weapon) {\n\t\tweaponList.add(weapon);\n\t}", "public void addWeapon(Weapon weapon) {\n setAttack(getAttack() + w...
[ "0.8111338", "0.75425047", "0.74859816", "0.7381317", "0.73747534", "0.7310421", "0.72963125", "0.722041", "0.7203253", "0.7149243", "0.7070038", "0.68522644", "0.6800515", "0.67557937", "0.66680324", "0.6666397", "0.6655016", "0.66265804", "0.6604687", "0.6601192", "0.656120...
0.7062099
11
Removes weapon found at given position in the players inventory
public void removeWeapon(int weaponPosition){ //Set the weapon entry to null and //remove the index from the entry tracker weapons.set(weaponPosition,new Pair<>(NO_WEAPON_ID, (short) 0)); weaponEntryTracker.remove((Integer) weaponPosition); switch(weaponPosition) { case 1: System.out.println("Position is 1"); setCurrentWeapon(getWeapons().get(0)); break; case 2: System.out.println("Position is 2"); if (getWeapons().get(1).getKey() != NO_WEAPON_ID) { System.out.println("Weapon at 1"); setCurrentWeapon(getWeapons().get(1)); } else { System.out.println("Weapon at 2"); setCurrentWeapon(getWeapons().get(0)); } break; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Weapon removeWeapon(int position, int row, int col)\r\n\t{\r\n\t\tif(row < rows && row >= 0 && col < columns && col >= 0)\r\n\t\t\treturn cells[row][col].removeWeapon(position);\r\n\t\treturn null;\r\n\t}", "public void removeWeapon(Weapon w) {\n try {\n this.validChoice(w);\n ...
[ "0.69935524", "0.67478645", "0.66559243", "0.66171104", "0.65868545", "0.65731734", "0.6569775", "0.65337783", "0.6524572", "0.6481212", "0.6416219", "0.6347981", "0.63363075", "0.6289892", "0.62489146", "0.6228824", "0.6216696", "0.61584413", "0.6152073", "0.61295474", "0.61...
0.7606236
0
Returns the health value of the player
public byte getHp(){ return hp; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getHealth() {\n return getStat(health);\n }", "Float getHealth();", "public static int getHealth()\r\n\t{\r\n\t\treturn health;\r\n\t}", "public float getHealth(){\n return health.getHealth();\n }", "public int getHealth() {\n return this.health;\n }", "public int getHe...
[ "0.7847566", "0.7772136", "0.77366406", "0.7668886", "0.75850827", "0.7572119", "0.75577027", "0.7549857", "0.7528112", "0.7523155", "0.7522444", "0.7491254", "0.7489919", "0.7478377", "0.7474593", "0.74410766", "0.74410766", "0.74264735", "0.7415858", "0.739176", "0.73738146...
0.0
-1
Returns the id of the player
public byte getId(){ return id; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "java.lang.String getPlayerId();", "int getPlayerId();", "int getPlayerId();", "long getPlayerId();", "public int getPlayerId();", "public int getId() {\n return playerId;\n }", "public String getId() {\n\t\treturn this.playerid;\n\t}", "public int getIdPlayer() {\n\t\treturn idPlayer;\n\t}"...
[ "0.8986274", "0.87600195", "0.87600195", "0.859782", "0.8464242", "0.83920294", "0.83486235", "0.82608086", "0.8212873", "0.8139817", "0.8134184", "0.8123571", "0.79780465", "0.7972089", "0.7934156", "0.7934156", "0.7913852", "0.78766316", "0.7864046", "0.7840039", "0.7830924...
0.0
-1
Sets the id of the player
public void setId(byte id){this.id = id;}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void setPlayerId(int playerId);", "public void setPlayerId(String s) {\n\t\tplayerId = s;\n\t}", "public Builder setPlayerId(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000002;\n playerId_ = value;\n onChange...
[ "0.82654625", "0.7616792", "0.7325812", "0.7317543", "0.73157847", "0.70914096", "0.69375896", "0.6902238", "0.6880101", "0.6844163", "0.68259686", "0.68147624", "0.6767519", "0.6767519", "0.6750037", "0.6723529", "0.66955596", "0.6688523", "0.6676683", "0.66757023", "0.66757...
0.0
-1
Returns the x coordinate of the player
public short getXPos(){ return xPos; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getPlayerX() {\n return playerX;\n }", "public final int getPositionX() {\r\n return (int) position.x();\r\n }", "public float getPositionX() {return this.position.getX();}", "double getPositionX();", "double getPositionX();", "double getPositionX();", "public float getX(...
[ "0.82353586", "0.7799148", "0.7754791", "0.7611311", "0.7611311", "0.7611311", "0.76007175", "0.7598927", "0.75954", "0.75651264", "0.75255615", "0.75215685", "0.75012565", "0.74996984", "0.7499542", "0.7495908", "0.74912", "0.74632215", "0.7460829", "0.7460829", "0.7445861",...
0.0
-1
Returns the y coordinate of the player
public short getYPos(){ return yPos; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public final int getY()\n\t{\n\t\treturn pos.y;\n\t}", "public double getPlayerYPos() {\r\n return jumper.getYposition();\r\n }", "public Point getXyLocation() {\n return playerxy;\n }", "public int getY() {\n return (int) yPos;\n }", "public int getY() {\n synchronized...
[ "0.8056229", "0.80185825", "0.80178726", "0.7923404", "0.7905833", "0.7857787", "0.7841382", "0.7818493", "0.77975947", "0.7795626", "0.77571076", "0.7741205", "0.77316403", "0.7718371", "0.7710892", "0.770845", "0.7707489", "0.7691192", "0.76806164", "0.76806164", "0.7670386...
0.0
-1
Returns the list of weapons in the players inventory
public ArrayList<Pair<Byte, Short>> getWeapons() { return weapons; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<CardWeapon> getWeapons() {\n return weapons;\n }", "public Vector<EntityWeapon> getWeaponList();", "public List<IWeapon> getWeaponsInventory(){\n return weaponsInventory;\n }", "public Weapon[] getWeapons(){\n\t\tSystem.out.println(\"Creating Weapons...\");\n\t\tfor(int i=0; i<board...
[ "0.7383703", "0.7334437", "0.73196834", "0.73028183", "0.7288731", "0.725551", "0.70240325", "0.68986124", "0.6822582", "0.6745469", "0.6662299", "0.645705", "0.64345515", "0.63568515", "0.6353218", "0.6263774", "0.6223705", "0.620685", "0.61922866", "0.61826515", "0.613987",...
0.71034986
6
Returns the players the current weapon
public Pair<Byte,Short> getCurrentWeapon(){ return this.currentWeapon; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getWeapon() {\n return weapon1;\n }", "public Weapon getWeapon(){\n return this.weaponPos;\n }", "public List<CardWeapon> getWeapons() {\n return weapons;\n }", "public Vector<EntityWeapon> getWeaponList();", "public Weapon getWeapon() {\n\t\treturn weapon;\n\t}"...
[ "0.7264906", "0.7192496", "0.7186042", "0.71088386", "0.7056424", "0.6995492", "0.69537044", "0.69418675", "0.6901539", "0.6808184", "0.67971355", "0.67832875", "0.6781226", "0.672919", "0.6695176", "0.6661268", "0.6660214", "0.65884274", "0.65364283", "0.6527571", "0.6511832...
0.69242394
8
Sets the players current weapon
public void setCurrentWeapon(Pair<Byte,Short> weapon){ currentWeapon = weapon; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setWeapon(int weapon)\n\t{\n\t\tthis.weapon = weapon;\n\t}", "public void setEquippedWeapon(String w)\n\t{\n\t\tstrEquippedWeapon = w;\n\t\t\n\t}", "private void setWeapons()\n {\n sewers.setWeapon(woodSword);\n promenade.setWeapon(woodSword);\n depths.setWeapon(rustedSword);\n ...
[ "0.788474", "0.7398572", "0.7216115", "0.6995609", "0.69676083", "0.6890988", "0.68407184", "0.6785024", "0.67615086", "0.67583436", "0.6745955", "0.66746354", "0.65761876", "0.6535986", "0.6511023", "0.64366776", "0.6421407", "0.64186573", "0.640123", "0.639851", "0.6395537"...
0.80616504
0
Returns the list of bullets fired by the player
public ArrayList<Bullet> getBulletsFired(){ return this.bulletsFired; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<AProjectile> getBullets() {\n return bullets;\n }", "public void shootBullet( ){\n bulletsFired.add(new Bullet((short)(this.xPos + BOX_HEIGHT), (short)((this.getYPos() + (BOX_HEIGHT+15))), this.xPos, this.id, (byte) 0, (byte) 0, shootingDirection, currentWeapon.getKey()));\n\n byte ...
[ "0.7503106", "0.69647115", "0.68986726", "0.68692166", "0.6623103", "0.6561516", "0.6539329", "0.6537995", "0.6455395", "0.63713306", "0.6340942", "0.6333236", "0.6267861", "0.6259567", "0.6258408", "0.6137854", "0.6120344", "0.6103753", "0.6098526", "0.60929537", "0.60669535...
0.7662464
0
Shoots a bullet. Adds a new bullet to the arraylist of bullets that the player has fired in game. Sets coordinates based on players current position and the damage based on the players currently selected weapon.
public void shootBullet( ){ bulletsFired.add(new Bullet((short)(this.xPos + BOX_HEIGHT), (short)((this.getYPos() + (BOX_HEIGHT+15))), this.xPos, this.id, (byte) 0, (byte) 0, shootingDirection, currentWeapon.getKey())); byte weaponFired = currentWeapon.getKey(); switch (weaponFired){ case PISTOL_ID: bulletsFired.get(bulletsFired.size()-1).setDmg(DEFAULT_DMG); bulletsFired.get(bulletsFired.size()-1).setRange(DEFAULT_RANGE); audioHandler.updateSFXVolume(audioHandler.getSoundEffectVolume()); audioHandler.playSoundEffect(audioHandler.pistolSound); break; case MACHINEGUN_ID: bulletsFired.get(bulletsFired.size()-1).setDmg(MACHINEGUN_DMG); bulletsFired.get(bulletsFired.size()-1).setRange(MACHINEGUN_RANGE); audioHandler.updateSFXVolume(audioHandler.getSoundEffectVolume()); audioHandler.playSoundEffect(audioHandler.machineGunSound); break; case SHOTGUN_ID: bulletsFired.get(bulletsFired.size()-1).setDmg(SHOTGUN_DMG); bulletsFired.get(bulletsFired.size()-1).setRange(SHOTGUN_RANGE); audioHandler.updateSFXVolume(audioHandler.getSoundEffectVolume()); audioHandler.playSoundEffect(audioHandler.shotgunSound); break; case SNIPER_ID: bulletsFired.get(bulletsFired.size()-1).setDmg(SNIPER_DMG); bulletsFired.get(bulletsFired.size()-1).setRange(SNIPER_RANGE); audioHandler.updateSFXVolume(audioHandler.getSoundEffectVolume()); audioHandler.playSoundEffect(audioHandler.machineGunSound); break; case UZI_ID: bulletsFired.get(bulletsFired.size()-1).setDmg(UZI_DMG); bulletsFired.get(bulletsFired.size()-1).setRange(UZI_RANGE); audioHandler.updateSFXVolume(audioHandler.getSoundEffectVolume()); audioHandler.playSoundEffect(audioHandler.machineGunSound); break; case AI_WEAPON_ID: bulletsFired.get(bulletsFired.size()-1).setDmg(AI_DMG); bulletsFired.get(bulletsFired.size()-1).setRange(DEFAULT_RANGE); System.out.println("Bullet sound " + audioHandler.getSoundEffectVolume()); audioHandler.updateSFXVolume(audioHandler.getSoundEffectVolume()); audioHandler.playSoundEffect(audioHandler.pistolSound); break; default: bulletsFired.get(bulletsFired.size()-1).setDmg(DEFAULT_DMG); bulletsFired.get(bulletsFired.size()-1).setRange(DEFAULT_RANGE); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void shoot(){\n int bulletPosX = posX;\n int bulletPosY = posY;\n int bulletVelX = 0;\n int bulletVelY = -9;\n //add the new bullets to the array of bullets\n bullets.add(new Bullet(bulletPosX,bulletPosY,bulletVelX,bulletVelY,0,attack));\n }", "private void sho...
[ "0.87389165", "0.8098181", "0.7947561", "0.79287493", "0.78681195", "0.75584286", "0.75192106", "0.7500536", "0.7468025", "0.74177754", "0.7370644", "0.7283561", "0.72748095", "0.7233559", "0.71109265", "0.71045965", "0.70600533", "0.70493686", "0.69732124", "0.69471556", "0....
0.8292506
1
Returns whether the player is alive
public boolean isAlive(){ if(this.hp <= 0){ return false; } else{ return true; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean isPlayerAlive() {\r\n\t\treturn !(this.getRobotsAlive().isEmpty());\r\n\t}", "public boolean isAlive(){\r\n if (currHP > 0){\r\n return true;\r\n }\r\n return false;\r\n }", "public boolean alive() {\r\n\t\treturn myHP > 0;\r\n\t}", "public boolean isAlive() ...
[ "0.83900934", "0.79833716", "0.797492", "0.7942476", "0.79322314", "0.7660454", "0.76170504", "0.76170504", "0.7569009", "0.7555264", "0.75543976", "0.7552341", "0.7548542", "0.75320584", "0.753164", "0.75310117", "0.7525018", "0.7525018", "0.7523748", "0.7517384", "0.7514024...
0.78898036
5
Returns the score the of the player
public int getScore(){ return this.score; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static int getPlayerScore()\r\n\t{\r\n\t\treturn playerScore;\r\n\t}", "public int getPlayerScore();", "public int getPlayerScore(){\n\t\treturn playerScore;\n\t}", "public int getScore(){\n\t\treturn playerScore;\n\t}", "@Override\n public int getScore(String username) throws RemoteException {\n ...
[ "0.86622626", "0.8512299", "0.851152", "0.8505501", "0.79400545", "0.7858375", "0.7816581", "0.77734965", "0.773027", "0.77111894", "0.7655125", "0.7570255", "0.7561302", "0.7553569", "0.7536138", "0.7532888", "0.75245965", "0.75245965", "0.7513824", "0.7513824", "0.75010073"...
0.0
-1
Sets the score of the player
public void setScore(int score) { this.score = score; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void setPlayerScore(int score)\r\n\t{\r\n\t\tGame.playerScore = score;\r\n\t}", "public void setScore(){\n\t\t//get player's score and change it to the string\n\t\tthis.scoreLabel.setSize(scoreLabel.getPreferredSize().width, \n\t\t\t\tscoreLabel.getPreferredSize().height);\n\t\tthis.scoreLabel.setT...
[ "0.85214853", "0.82473797", "0.8034446", "0.8034446", "0.803155", "0.8014329", "0.7975591", "0.7975591", "0.7975591", "0.7975591", "0.7969885", "0.79654765", "0.7940658", "0.79304403", "0.79076517", "0.78843445", "0.785871", "0.7853194", "0.7849127", "0.7843356", "0.7838645",...
0.7996108
6
Returns the number of rounds the player has won
public byte getRoundsWon(){ return this.roundsWon; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getTotalOfwins() {\n return statistics.get(TypeOfGames.SIMGAME).getNumberOfWins()\n + statistics.get(TypeOfGames.EASYCOMPUTERGAME).getNumberOfWins()\n + statistics.get(TypeOfGames.HARDCOMPUTERGAME).getNumberOfWins();\n }", "public int getWins() {\n return...
[ "0.76428825", "0.75364196", "0.75128007", "0.7371336", "0.7345458", "0.7237661", "0.7182672", "0.71484476", "0.71176195", "0.71172065", "0.7072398", "0.70695853", "0.70686305", "0.706661", "0.7005998", "0.6951441", "0.69399834", "0.6917369", "0.69112796", "0.6911266", "0.6903...
0.0
-1
Sets the number of the rounds the player has won
public void setRoundsWon(byte roundsWon){ this.roundsWon=roundsWon; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setWins() {\r\n this.wins++;\r\n }", "public void setWins(int wins) {\n if (wins > 0) {\n this.wins = wins;\n }\n }", "public void setWins(int value) {\n this.wins = value;\n }", "public void setRoundNum(int roundNum){\n gameRounds = roundNum...
[ "0.77711844", "0.76894516", "0.76633626", "0.74821097", "0.74382126", "0.718933", "0.71781534", "0.7015893", "0.68634665", "0.67676204", "0.6712907", "0.6711283", "0.669758", "0.6639395", "0.66321313", "0.66145456", "0.6576929", "0.65343165", "0.64773995", "0.64465934", "0.64...
0.68835586
8
Returns the players state of movement
public int getStateOfMovement(){ return stateOfMovement; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Player getState() {\n\t\treturn state;\n\t}", "public PlayerState getPlayerState() {\r\n return playerState;\r\n }", "public boolean getPlayerState()\n\t{\n\t\treturn blnPlayerState;\n\t\t\n\t}", "public String getPlayerState() {\n String playerState = name + \" \" + actionArray[0] \n...
[ "0.72836167", "0.71546906", "0.7140662", "0.7121212", "0.7116435", "0.7081303", "0.6984136", "0.6980493", "0.69785833", "0.66366035", "0.6593406", "0.6575819", "0.6575513", "0.6567006", "0.6550409", "0.6451895", "0.6422045", "0.64166373", "0.6405671", "0.63964915", "0.6388137...
0.7739871
0
Sets the state of movement of the player
public void setStateOfMovement(int movementState){stateOfMovement = movementState; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void setMoving(boolean isMoving);", "public void setState(PlayerState state) {\n this.state = state;\n }", "public void setMovementState(int movementState) {\n this.movementState = movementState;\n }", "void playerMove(State state);", "protected void setMove(int t){\r\n\t\tthis.move = t...
[ "0.7366184", "0.710763", "0.7076585", "0.7045339", "0.7009661", "0.6925734", "0.69209445", "0.68722165", "0.68065125", "0.6773396", "0.6762134", "0.66918933", "0.6630298", "0.6584571", "0.65765435", "0.6558435", "0.6543376", "0.6530387", "0.64886886", "0.64869803", "0.6472444...
0.75667256
0
Returns the jump state of the player
public boolean isJumping() { return isJumping; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean isJumping(){\n if (jumpState == 2)\n return true;\n return false;\n\n}", "public Image getJump(int player, boolean ep)\t{if (player==1) return jump1; else return jump2;}", "public int getJumpValue() { \n return jumpValue; \n }", "public void actionPerformed(Action...
[ "0.70153505", "0.6797767", "0.67201656", "0.6560546", "0.65402377", "0.6474318", "0.64573246", "0.64065784", "0.63948596", "0.63645977", "0.63050014", "0.6198078", "0.6143", "0.6142151", "0.6098166", "0.60653514", "0.6038968", "0.6032606", "0.60296255", "0.6020745", "0.601441...
0.65699834
3
Sets the jump state of the player
public void setJumping(boolean jumping) { isJumping = jumping; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void jump() {\n jumped = true;\n teleport = true;\n waste = true;\n }", "public void setJumpState(int n)\n{\n jumpState=n;\n}", "public void actionPerformed(ActionEvent e)\n {\n if(jumpState != 2){\n //if the player is not jumping t...
[ "0.78441197", "0.7709302", "0.75153774", "0.7187586", "0.708002", "0.7010652", "0.69975275", "0.69068277", "0.6894087", "0.68048644", "0.67962", "0.676354", "0.67060953", "0.66938686", "0.66670185", "0.6622797", "0.66224164", "0.6598354", "0.6588374", "0.65539473", "0.6522696...
0.7386672
3
Returns the fall state of the player
public boolean isFalling() { return isFalling; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean getPlayerState()\n\t{\n\t\treturn blnPlayerState;\n\t\t\n\t}", "public PlayerState getPlayerState() {\r\n return playerState;\r\n }", "public Image getFall(int player, int fallNum, boolean ep)\n\t{\n\t\tif (player==1)\n\t\t{\n\t\t\tif (fallNum==1) return fall1;\n\t\t\telse if (fallNum=...
[ "0.6291176", "0.6264602", "0.62386775", "0.6224191", "0.6196817", "0.6172906", "0.61598366", "0.6095763", "0.60487986", "0.5988376", "0.5885873", "0.57935685", "0.5792012", "0.5765029", "0.5735945", "0.5714439", "0.57045746", "0.5678986", "0.5637723", "0.5637632", "0.56160414...
0.0
-1
Sets the fall state of the player
public void setFalling(boolean falling) { isFalling = falling; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void fall() {\n\t\t// getSpeed().setY(-stats.getGRAVITY());\n\t\tsetBlock_up(false);\n\t}", "public void fall() {\n\t\tthis.notJumping();\n\t\tthis.setForcedToStop(false);\n\t\tthis.setOnTheEdge(false);\n\t\tthis.setCornerToClimb(null);\n\t\tthis.setCornerToClimbDown(null);\n\t\tthis.setFallDistance(0);\n...
[ "0.7207397", "0.7202812", "0.64876384", "0.64284915", "0.64160156", "0.640627", "0.63818026", "0.6266404", "0.6053146", "0.6042203", "0.6006367", "0.5978971", "0.5967471", "0.59636664", "0.58964187", "0.5873364", "0.58459795", "0.5844038", "0.5842338", "0.57010883", "0.568654...
0.6430655
3
Returns the initial y coordinate of the player before jumping
public short getInitial_y() { return initial_y; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public double getPlayerYPos() {\r\n return jumper.getYposition();\r\n }", "public int jump() {\n if (Ylocation > 475) {\n Ylocation -= Ydir;\n }\n\n return Ylocation;\n }", "public int getY(){\n\t\tif(!resetCoordinates()) return 10000;\n\t\treturn Math.round(robot.transl...
[ "0.7722281", "0.75346714", "0.6879033", "0.6759988", "0.67086947", "0.6699062", "0.6699062", "0.6699062", "0.66833377", "0.6646508", "0.6587263", "0.65187764", "0.65078104", "0.6502836", "0.64986986", "0.648866", "0.64882547", "0.64753425", "0.64631367", "0.64631367", "0.6461...
0.65316254
11
Sets the initial y coordinate of the player before jumping
public void setInitial_y(short initial_y) { this.initial_y = initial_y; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void setPlayerYRelative(int y) {\n }", "public void resetY() {this.startY = 11.3f;}", "public void move() {\r\n if (y > HEIGHT)\r\n y = initialY;\r\n y = y + speed;\r\n }", "public void setY(int value)\n\t{\n\t\tgetWorldPosition().setY(value);\n\t}", "public void setY(int y){...
[ "0.73083436", "0.70399725", "0.69835347", "0.6956866", "0.68965375", "0.68323416", "0.6807363", "0.6797008", "0.6753178", "0.67398226", "0.6675412", "0.6669998", "0.66595846", "0.6634662", "0.6610753", "0.6609717", "0.65933657", "0.6575031", "0.656443", "0.65459275", "0.65108...
0.68409276
5
Increases the players energy value by the given value
public void addEnergy(int e){ if(e + energy < 0) energy = 0; else if(e + energy > MAX_ENERGY) energy = MAX_ENERGY; else energy += e; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void increaseEnergy(int energy){\r\n\t\tthis.energy = this.energy + energy;\r\n\t}", "@Override\n public void updateEnergy(int p, Racer player) {\n\n super.updateEnergy(p, player);\n player.setEnergy(player.getEnergy() * 2);\n }", "public void setEnergy(double energy) { this.energy =...
[ "0.7408215", "0.71346873", "0.6895312", "0.6791471", "0.6752839", "0.6595865", "0.6591334", "0.6483862", "0.641139", "0.6409345", "0.6364211", "0.6338739", "0.6329947", "0.63195765", "0.63043", "0.6290573", "0.6289955", "0.62557155", "0.62259054", "0.62084806", "0.61980736", ...
0.69182885
2
Returns the name of the player
public String getName(){ return this.name; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getName()\r\n\t{\r\n\t\treturn this.playerName;\r\n\t}", "String getPlayerName();", "public String getName(){\r\n\t\treturn playerName;\r\n\t}", "public String getPlayerName() {\n return props.getProperty(\"name\");\n }", "public String getPlayerName() {\n\t\tString name = super.get...
[ "0.8804421", "0.875385", "0.87389326", "0.86752605", "0.86129934", "0.8601486", "0.857343", "0.8497836", "0.8449493", "0.84320855", "0.84320855", "0.84203905", "0.84157753", "0.8413658", "0.8396076", "0.8381853", "0.8368563", "0.8336539", "0.83281153", "0.831601", "0.825189",...
0.0
-1
Returns the energy value of the player
public int getEnergy(){ return energy; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getEnergy()\n {\n return energy;\n }", "public int getEnergy() {\n return energy;\n }", "public double getEnergy() { return energy; }", "public double getEnergy() {\n\t\treturn energy;\n\t}", "int getEnergy();", "protected int getEnergy() {\n\t\treturn energy;\n\t}", "...
[ "0.75455433", "0.7523258", "0.74903387", "0.7396932", "0.73682845", "0.7345549", "0.73443776", "0.7296895", "0.72731876", "0.7268924", "0.7265415", "0.72168046", "0.72105336", "0.68754554", "0.67598367", "0.6583299", "0.6583124", "0.6574731", "0.6539274", "0.64759755", "0.646...
0.7160086
13
Returns the weapon entry tracker list
public LinkedList<Byte> getWeaponEntry(){ return this.weaponEntryTracker; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Vector<EntityWeapon> getWeaponList();", "private Set<BoardObject> createWeapons(){\r\n\t\tSet<BoardObject> weaps = new HashSet<BoardObject>();\r\n\r\n\t\tweaps.add(new BoardObject(getImage(\"xboardObjects/revolver1.png\"), new Coordinate(3,12), \"Revolver\"));\r\n\t\tweaps.add(new BoardObject(getImage(\"x...
[ "0.63146985", "0.5881597", "0.58690715", "0.58273333", "0.579003", "0.5767179", "0.57567614", "0.5717267", "0.56674117", "0.5654588", "0.5654171", "0.5643158", "0.56050956", "0.55837166", "0.5565178", "0.5510716", "0.5496435", "0.5494807", "0.5486252", "0.54337996", "0.538225...
0.71061265
0
Returns the current state of the player
public String toString(){ String s = "id: " + Byte.toString(id) + " "; s+= "name: "+name+ " "; s+= "hp: " + Byte.toString(hp) + " "; s+= "xPos: " + Short.toString(xPos)+" "; s+= "yPos: " + Short.toString(yPos)+"\n"; for (Pair<Byte,Short> pair : weapons){ s+= "weaponId: " + Byte.toString(pair.getKey()) + " " + "ammo: " + Short.toString(pair.getValue())+'\n'; } s+= "Bullets fired:"+'\n'; for(Bullet b : bulletsFired){ s+= b.toString()+'\n'; } s+= "Weapons tracked:"+'\n'; for(Byte b : weaponEntryTracker){ s+= Byte.toString(b)+'\n'; } s+= "initial y: " +Short.toString(initial_y)+'\n'; s+= "current weapon: " + Byte.toString(currentWeapon.getKey()) + " ammo: " + Short.toString(currentWeapon.getValue())+'\n'; s+= "shooting direction: " +Short.toString(shootingDirection)+'\n'; return s; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Player getState() {\n\t\treturn state;\n\t}", "public String getPlayerState() {\n String playerState = name + \" \" + actionArray[0] \n + \" \" + actionArray[1] + \" \" + actionArray[2] + \" \" + colorID + \" \";\n return playerState;\n }", "public PlayerState getPlayerSt...
[ "0.839302", "0.8231771", "0.8215764", "0.80978733", "0.8060585", "0.793714", "0.7443073", "0.72387475", "0.707327", "0.7049288", "0.7000623", "0.6961289", "0.6926758", "0.6862818", "0.6832052", "0.682592", "0.682592", "0.682592", "0.682592", "0.682592", "0.682592", "0.68257...
0.0
-1
Sets the list of bullets the player has fired to a new list
public void setBulletsFired(ArrayList<Bullet> bullets) { if(!bulletsFired.isEmpty()) { //System.out.println(bullets.get(0).getxPos() != bulletsFired.get(0).getxPos()); this.bulletsFired = bullets; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void fireBullet() {\n\r\n\t\tif (count > 0)\r\n\t\t\treturn;\r\n\t\t// ...and if all the bullets aren't currently in use...\r\n\t\tint slot = getAvailableBullet();\r\n\t\tif (slot < 0)\r\n\t\t\treturn;\r\n\t\t// ...then launch a new bullet\r\n\t\tbullets[slot].setLocation(locX, locY);\r\n\t\tbullets[slot].setDirec...
[ "0.7314514", "0.73011893", "0.7095746", "0.7068389", "0.7017956", "0.70089376", "0.6722573", "0.6714708", "0.6676434", "0.66594297", "0.6625457", "0.65867317", "0.6546839", "0.64326304", "0.64260817", "0.6379523", "0.63538074", "0.62845963", "0.62782705", "0.6253134", "0.6244...
0.7407921
0
returns the ready status of the player
public String getStatus() { return ready ? "ready" : "not ready"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void checkRemotePlayerReady(){\n String data = getJSON(hostUrl + \"retrieve_remote_ready.php?matchId=\" + matchId\n + \"&player=\" + oppositePlayer, 2000);\n\n System.out.println(\"Ready: \" + data);\n\n // Get first character, as, for some reason, it ret...
[ "0.7777028", "0.73835117", "0.7251595", "0.7251595", "0.72469693", "0.72469693", "0.72469693", "0.72405744", "0.7232229", "0.7188222", "0.701899", "0.7007982", "0.7001933", "0.6981615", "0.6975739", "0.69394016", "0.69307727", "0.6886278", "0.687719", "0.68702596", "0.6860004...
0.69703555
15
Created by Administrator on 2017/11/14.
public interface UserOrderContract { interface Model { } interface View extends BaseOrderContract.View { /** * 数据获取成功 * * @param dataBeans */ void onGetListDataSuccess(List<UserOrderBean.DataBean> dataBeans); /** * 数据获取失败 * * @param msg 提示信息 */ void onGetListDataFailed(String msg); } interface Presenter extends BaseOrderContract.Presenter{ void getListDataFromNet(String uid, String index, String item); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private stendhal() {\n\t}", "@Override\n public void perish() {\n \n }", "@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\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Over...
[ "0.626697", "0.60767996", "0.58441424", "0.5842022", "0.5812405", "0.57734215", "0.57637656", "0.57396454", "0.56949025", "0.56949025", "0.56936073", "0.5683786", "0.5679852", "0.5678133", "0.5674515", "0.56714344", "0.56699324", "0.56699324", "0.5660867", "0.56582", "0.56330...
0.0
-1
get system current setting language. zh_CN, zh_TW etc.
public static Locale systemSettingLanguage() { // define return result Locale _ret = Locale.ENGLISH; // get default locale Locale _defaultLocale = Locale.getDefault(); // check language and country if (Locale.CHINESE.toString().equalsIgnoreCase( _defaultLocale.getLanguage())) { if ("CN".equalsIgnoreCase(_defaultLocale.getCountry())) { _ret = Locale.SIMPLIFIED_CHINESE; } else { _ret = Locale.TRADITIONAL_CHINESE; } } return _ret; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private String getSystemLanguage() {\n String language;\n if (System.getProperty(COUNTRY) == null) {\n language = System.getProperty(LANGUAGE);\n } else {\n language = System.getProperty(LANGUAGE) + \"-\"\n + System.getProperty(COUNTRY).toLowerCase(Loca...
[ "0.8088205", "0.80278593", "0.7643848", "0.76180035", "0.76180035", "0.75533193", "0.75533193", "0.75533193", "0.7455723", "0.74516726", "0.7314016", "0.7304287", "0.72865963", "0.7268784", "0.72179604", "0.7110397", "0.7088461", "0.70660067", "0.704864", "0.6969596", "0.6964...
0.8189694
0
get device id. IMEI(15bits) for GSM or WCDMA, MEID(14bits) for CDMA
public static String deviceId() { // return device id return getTelephonyManager().getDeviceId(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getDeviceId() {\n String info = \"\";\n try {\n Uri queryurl = Uri.parse(REGINFO_URL + CHUNLEI_ID);\n ContentResolver resolver = mContext.getContentResolver();\n info = resolver.getType(queryurl);\n if (null == info && null != mContext) {\n ...
[ "0.73739004", "0.7319825", "0.72449744", "0.7210673", "0.71921265", "0.7180565", "0.7119717", "0.7094825", "0.70701706", "0.6928318", "0.6865942", "0.680697", "0.6800966", "0.679977", "0.67775214", "0.67556775", "0.67493546", "0.670919", "0.670919", "0.6678004", "0.6566153", ...
0.6587626
20
get sim serial number, ICCID(20bits)
public static String simSerialNumber() { // return sim serial number return getTelephonyManager().getSimSerialNumber(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "java.lang.String getSerialNumber();", "java.lang.String getSerialNumber();", "java.lang.String getSerial();", "String getSerial();", "Integer getCCPID();", "String getCCSID();", "public static String getIccid() {\n\t\treturn null;\n\t}", "public String getDeviceId() {\n //TelephonyManager tm =...
[ "0.7191308", "0.7191308", "0.7014634", "0.6885748", "0.67015296", "0.65971226", "0.65904313", "0.652406", "0.6511594", "0.6402503", "0.63778996", "0.6372338", "0.6341703", "0.6339693", "0.6237346", "0.6235826", "0.6230206", "0.6201878", "0.6198837", "0.618638", "0.61622816", ...
0.7000247
3
get wlan mac address
public static String wlanMacAddress() { String _ret = null; // get wifi manager WifiManager _wifiManager = (WifiManager) CTApplication.getContext() .getSystemService(Context.WIFI_SERVICE); // check wifi manager and return waln mac address if (null != _wifiManager) { // check the wifi state if (!_wifiManager.isWifiEnabled()) { // open the wlan _wifiManager.setWifiEnabled(true); // get wlan mac address(has 3-5 seconds delay) _ret = _wifiManager.getConnectionInfo().getMacAddress(); // close the wlan _wifiManager.setWifiEnabled(false); } else { // get wlan mac address _ret = _wifiManager.getConnectionInfo().getMacAddress(); } } return _ret; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getWlanMacAddress() {\n WifiManager wifiManager = (WifiManager) mContext.getSystemService(Context.WIFI_SERVICE);\n WifiInfo wifiInfo = wifiManager.getConnectionInfo();\n\n String macAddress = wifiInfo == null ? null : wifiInfo.getMacAddress();\n return !TextUtils.isEmpty(m...
[ "0.8292737", "0.81544304", "0.80333096", "0.7813034", "0.76514596", "0.75927633", "0.7585045", "0.7495249", "0.7308721", "0.73031205", "0.72450054", "0.71222675", "0.7065716", "0.7046785", "0.7040433", "0.7027845", "0.6964163", "0.69638425", "0.6938394", "0.6923879", "0.69238...
0.84924185
0
get bluetooth mac address
public static String bluetoothMacAddress() { String _ret = null; // get a handle to the default local Bluetooth adapter BluetoothAdapter _localBluetoothAdapter = BluetoothAdapter .getDefaultAdapter(); // check default local bluetooth adapter and return bluetooth mac // address if (null != _localBluetoothAdapter) { // check the bluetooth state if (!_localBluetoothAdapter.isEnabled()) { // open the bluetooth _localBluetoothAdapter.enable(); // get default local bluetooth mac address(has 1-2 seconds // delay) _ret = _localBluetoothAdapter.getAddress(); // close the bluetooth _localBluetoothAdapter.disable(); } else { // get default local bluetooth mac address _ret = _localBluetoothAdapter.getAddress(); } } return _ret; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getMac(){\n WifiManager manager = (WifiManager) context.getApplicationContext().getSystemService(Context.WIFI_SERVICE);\n WifiInfo info = manager.getConnectionInfo();\n return info.getMacAddress();\n }", "private static String getMacAddress(Context context) {\n // and...
[ "0.7819292", "0.75928503", "0.7571852", "0.7503415", "0.7422607", "0.7394143", "0.7353765", "0.7349749", "0.73239934", "0.73050547", "0.7295647", "0.7295647", "0.7295308", "0.7271584", "0.72567075", "0.72565097", "0.72385514", "0.72146964", "0.7088931", "0.707524", "0.7061499...
0.8534456
0
get combined unique id(had been md5)
public static String combinedUniqueId() { // generate combined unique id using device id, pseudo unique id and // android id String _combinedUniqueId = deviceId() + pseudoUniqueId() + androidId(); Log.d(LOG_TAG, "The combined unique id = " + _combinedUniqueId); return StringUtils.md5(_combinedUniqueId); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "String uniqueId();", "String getUniqueId();", "String getUniqueID();", "public String gerarUID() {\n //String id1 = UUID.randomUUID().toString().replace(\"-\", \"\");\n String id1 = UUID.randomUUID().toString();\n return id1;\n }", "private String creatUniqueID(){\n long ID =...
[ "0.7532869", "0.73161167", "0.7133858", "0.7094323", "0.70608187", "0.70330316", "0.701277", "0.69711924", "0.69447863", "0.691133", "0.68662184", "0.68592215", "0.68314403", "0.68023986", "0.6746904", "0.6738211", "0.6722472", "0.6667449", "0.66659445", "0.6657272", "0.66485...
0.7880299
0
generate pseudo unique id(13bits)
private static String pseudoUniqueId() { // decimal final Integer DECIMAL = 10; // return the android device some common info(board, brand, CPU type + // ABI convention, device, display, host, id, manufacturer, model, // product, tags, type and user) combined string return new StringBuilder().append(Build.BOARD.length() % DECIMAL) .append(Build.BRAND.length() % DECIMAL) .append(Build.CPU_ABI.length() % DECIMAL) .append(Build.DEVICE.length() % DECIMAL) .append(Build.DISPLAY.length() % DECIMAL) .append(Build.HOST.length() % DECIMAL) .append(Build.ID.length() % DECIMAL) .append(Build.MANUFACTURER.length() % DECIMAL) .append(Build.MODEL.length() % DECIMAL) .append(Build.PRODUCT.length() % DECIMAL) .append(Build.TAGS.length() % DECIMAL) .append(Build.TYPE.length() % DECIMAL) .append(Build.USER.length() % DECIMAL).toString(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private String creatUniqueID(){\n long ID = System.currentTimeMillis();\n return Long.toString(ID).substring(9,13);\n }", "public int genID() {\n int uid = this.hashCode();\n if (uid < 0) {\n uid = Math.abs(uid);\n uid = uid * 15551;\n }\n return...
[ "0.7766663", "0.7714384", "0.7698985", "0.7643245", "0.76427305", "0.7600994", "0.75455755", "0.74979836", "0.7485211", "0.7467025", "0.7386768", "0.7376032", "0.7305149", "0.7278746", "0.72648877", "0.7259326", "0.72558814", "0.7237492", "0.7228962", "0.7225431", "0.7182109"...
0.6725374
63
The main for this class
public static void main (String args[]) { int playerId; String name; players = new Player [GameData.NUM_PLAYERS_PLUS_NEUTRALS]; // display blank board ui.displayMap(); // get player names for (playerId=0; playerId<GameData.NUM_PLAYERS; playerId++) { ui.displayString("Enter the name of Player " + (playerId+1)); name = ui.getCommand(); ui.displayString("> " + name); ui.displayString(name + "'s colour is "+ PlayerColourString(playerId) + "\n"); players[playerId]= new Player(playerId, name); } //Set the neutral names for(; playerId<GameData.NUM_PLAYERS_PLUS_NEUTRALS; playerId++) { players[playerId]= new Player( playerId, PlayerColourString(playerId) + " Neutral"); ui.displayString(players[playerId].getName() + "'s colour is "+ PlayerColourString(playerId) + "\n"); } Territory.initialiseTerritories(playerId, board, players, deckOfCards); // display map ui.displayMap(); Reinforcements.setUpArmies(players, ui, board); Turn.turn(players, board, ui, deckOfCards); return; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Main() {\n\n super();\n }", "public Main() {\r\n\t\tsuper();\r\n\t\tinitialize();\r\n\r\n\t}", "public static void main() {\n \n }", "public Main() {\n\t\tsuper();\n\t}", "public Main() {\n \n \n }", "private Main ()\n {\n super ();\n }", "publi...
[ "0.80435586", "0.79647374", "0.7927693", "0.78521025", "0.7772681", "0.7671922", "0.76132405", "0.7521429", "0.7510775", "0.7413783", "0.7411721", "0.7398342", "0.7357508", "0.731046", "0.731046", "0.72614235", "0.7229629", "0.7158718", "0.7158718", "0.7143846", "0.7133976", ...
0.0
-1
Description:Samples A Bit from Bernoulli with Restriction of 20Bit Exponent
private static int bernoulli(long result, long fractionOfExponent, double[][] exponentialDistribution) { /* * * Computes the Actual Bernoulli Parameter = exp (-t / f) * Yields A Fraction of 2^62, to Keep Only 62 Bits of Precision in This Implementation * */ double bernoulliParameter = 4611686018427387904.0; for (long i = 0, j = fractionOfExponent; i < 3; i++, j >>= 5) { bernoulliParameter *= exponentialDistribution[(int)i][(int)(j & 31)]; } /* Sample from Bernoulli of bernoulliParameter */ return (int)(((result & 0x3FFFFFFFFFFFFFFFL) - Math.round(bernoulliParameter)) >>> 63); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "double sample();", "public BernoulliDistribution(){\n\t\tthis(0.5);\n\t}", "public void randomiseBinary()\r\n\t{\r\n\t\tfor (int i = 0; i < binary.length; i++)\r\n\t\t\tbinary[i] = Math.random() >= 0.5;\r\n\t}", "public BernoulliDistribution(double p){\n\t\tsuper(1, p);\n\t}", "@Test\n public void testZ...
[ "0.6040454", "0.5915275", "0.57593286", "0.56670713", "0.56547123", "0.5547262", "0.5543663", "0.551752", "0.54150623", "0.5382826", "0.53419113", "0.52654886", "0.5246545", "0.52244407", "0.52217656", "0.5221326", "0.5221183", "0.52032995", "0.51869595", "0.5161789", "0.5149...
0.681178
0
compiles a single java source file, and resolve references
public Header [] compilationUnit(Header [] loaded, final int depth) { try { this.depth = depth; String trunc = sources.getPath(); list = loaded == null?new Header[0]:loaded; countToken = 0; Find.notePass(null); lookAhead(); // read package name String myPackage = null; if (nextSymbol == Keyword.PACKAGESY) { lookAhead(); myPackage = qualident(); matchKeyword(Keyword.SEMICOLONSY); } Header header = new Header(new File(Parser.jdkSource).getPath(), trunc, myPackage, depth); Vector imported = new Vector(); imported.add("java.lang."); // read import statements while (nextSymbol == Keyword.IMPORTSY) imported.add(importDeclaration()); header.imports = new String[imported.size()]; for(int l = 0; l < imported.size(); l++) header.imports[l] = (String)imported.get(l); trunc = trunc.substring(0, sources.getPath().lastIndexOf(".java")); String basename = trunc.substring(trunc.lastIndexOf('\\') + 1); scopeStack = header.scopes; while(nextSymbol != Keyword.EOFSY) typeDeclaration(header.base, basename); matchKeyword(Keyword.EOFSY); if (Errors.count() != 0) return null; // write valid header header.write(trunc + ".h"); // append compiled file to list Header [] newList = new Header[(list != null?list.length:0) + 1]; for(int i = 0; i < newList.length - 1; i++) newList[i] = list[i]; newList[newList.length - 1] = header; list = newList; connectClasses(list); // resolve superclasses and interfaces for(int i = 0; i < header.scopes.size() && list != null; i++) { Vector v = new Vector(); Scope scope = (Scope)header.scopes.get(i); for(Iterator iter = scope.iterator(); iter.hasNext();) { Basic b = (Basic)iter.next(); if (b instanceof ClassType) v = getExtendImplement((ClassType)b); } while(v.size() > 0 && list != null) { connectClasses(list); list = loadSource((String)v.get(0), list, header, force); v.remove(0); } } if (Errors.count() != 0 || header.depth > 0 || list == null) return list; // process imports for(int i = 0; i < imported.size() && list != null; i++) { String st = (String)imported.get(i); if (!st.endsWith(".")) { connectClasses(list); list = loadSource(st.substring(st.lastIndexOf('.') + 1), list, header, force); } } if (Errors.count() != 0 || header.depth > 0 || list == null) return list; connectClasses(list); // process unresolved references for(int i = 0; i < header.scopes.size() && list != null; i++) { Scope scope = (Scope)header.scopes.get(i); Iterator step = scope.iterator(); while(step.hasNext() && list != null) { Basic x = (Basic)step.next(); if (x instanceof ClassType) { boolean inner = false; ClassType y = (ClassType)x; while(y.unresolved.size() > 0 && list != null) { Iterator it = y.unresolved.iterator(); if (!it.hasNext()) break; String name = (String)it.next(); it = null; y.unresolved.remove(name); String [] s = name.split("\\."); Scope [] z = null; z = Find.find(s[0], scope, true); if (z.length == 0) { list = loadSource(s[0], list, header, force); connectClasses(list); } try { if (s.length > 1) { ClassType [] classes = null; classes = Find.findClass(s[0], 0, scope); if (classes.length == 0) { classes = new ClassType[1]; classes[0] = y; } for(int k = 1; k < s.length && classes.length > 0; k++) { Basic[] b = classes[0].scope.get(s[k]); for (int j = 0; j < b.length; j++) if (b[j] instanceof VariableType) { VariableType v = (VariableType) b[j]; if (v.type.type == Keyword.NONESY) { classes = Find.findClass(v.type.ident.string, 0, scope); if (classes.length == 0) { y.unresolved.add(v.type.ident.string); //y.unresolved.add(name); } } else classes = new ClassType[0]; break; } else if (b[j] instanceof MethodType) { MethodType v = (MethodType) b[j]; if (v.type.type == Keyword.NONESY) { classes = Find.findClass(v.type.ident.string, 0, scope); if (classes.length == 0) { y.unresolved.add(v.type.ident.string); //y.unresolved.add(name); } } else classes = new ClassType[0]; break; } else if (b[j] instanceof ClassType) { classes = new ClassType[1]; classes[0] = (ClassType) b[j]; break; } } } } catch(Exception ee){error("nullpointer " + s[0] + '.' + s[1]);} } } } } if (depth > 0) return list; if (Errors.count() != 0 || list == null) return null; connectClasses(list); Find.notePass(this); // resolve operator tree to Forth-code FileOutputStream file = null, starter = null; try { file = new FileOutputStream(header.name.substring(0, header.name.lastIndexOf('.')) + ".fs"); starter = new FileOutputStream(header.name.substring(0, header.name.lastIndexOf('.')) + ".start.fs"); System.out.println("translate " + header.name); for(int k = 0; k < header.scopes.size(); k++) { Scope scope = (Scope)header.scopes.get(k); boolean module = (k == 0); for(Iterator iter = scope.iterator(); iter.hasNext();) { Basic b = (Basic)iter.next(); if (b instanceof ClassType && (b.modify & Keyword.INTERFACESY.value) == 0) { if (gc.startsWith("m")) CodeRCmodified.codeClass( (ClassType) b, file, starter, module); else Code3color.codeClass( (ClassType) b, file, starter, module); module = false; } } } file.close(); starter.close(); } catch(IOException ex1) { ex1.printStackTrace(); } Find.notePass(this); } catch(Exception failed) { error(failed.getMessage() + " aborted"); } return (Errors.count() != 0)?null:list; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void compileToJava();", "private static void compileFile(String path) throws IOException {\n File f = new File(path);\n JavaCompiler compiler = ToolProvider.getSystemJavaCompiler();\n StandardJavaFileManager fileManager = compiler.getStandardFileManager(null, null, null);\n File[] fil...
[ "0.7577716", "0.67316514", "0.66414785", "0.6333154", "0.63189644", "0.6256858", "0.6254533", "0.6232894", "0.6139368", "0.61387044", "0.6110356", "0.6008719", "0.5975524", "0.58748376", "0.5823361", "0.58140075", "0.57494515", "0.57279146", "0.56896037", "0.5658057", "0.5635...
0.5700729
18
extract names of superclass and implemented interfaces
private Vector getExtendImplement(ClassType c) { String st; Vector v = new Vector(); if (c.extend.name != null && c.extend.scope == null) { st = c.extend.name.string; if (!c.unresolved.contains(st)) for(Iterator iter = c.unresolved.iterator(); iter.hasNext();) { String s = (String)iter.next(); if (s.endsWith('.' + st)) { st = s; break; } } v.add(st); } for(int j = 0; j < c.implement.length; j++) if (c.implement[j].scope == null) { st = c.implement[j].name.string; if (!c.unresolved.contains(st)) for(Iterator iter = c.unresolved.iterator(); iter.hasNext();) { String s = (String)iter.next(); if (s.endsWith('.' + st)) { st = s; break; } } if (!v.contains(st)) v.add(st); } return v; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "String getInterfaces();", "char[][] getInterfaceNames();", "String[] getImplementedInterfacesAsDisplayStrings();", "public String[] getInterfaces() {\n return m_classBuilder.getInterfaces();\n }", "TypeInfo[] interfaces();", "public Collection<ClassTranslator> getInterfaces();", "public Strin...
[ "0.72670364", "0.7024988", "0.69442004", "0.66271675", "0.64971316", "0.62296915", "0.61741936", "0.61617064", "0.61105233", "0.591801", "0.58865654", "0.58704823", "0.5829475", "0.57658213", "0.5755797", "0.5747834", "0.5718753", "0.56863725", "0.5658786", "0.5658007", "0.56...
0.52808046
47
load header of dependent file or compile dependend file
private Header [] loadSource(String name, Header [] list, Header header, final boolean force) { int pos; int depth = header.depth; File file = null; name = name.trim(); for(pos = 0; pos < list.length && list[pos] != header; pos++); String path = list[pos].name.substring(0, list[pos].name.lastIndexOf('\\')); // look in sdk's root directory if ((file = getFile(Parser.jdkSource, name)) != null) { if (Parser.jdkSource.compareToIgnoreCase(path) != 0) depth++; } // look in package if (file == null) { file = getFile(path, name); } // look in imports for (int j = 0; j < header.imports.length && file == null; j++) { String st = header.imports[j]; int last = st.lastIndexOf('.') + 1; if (st.substring(last).compareToIgnoreCase(name) == 0) st = st.substring(0, last); if (st.endsWith(".")) st = st.substring(0, st.length() - 1); for (int k = -1; (k = st.indexOf('.')) >= 0; ) st = st.substring(0, k) + '\\' + st.substring(k + 1); st = jdkSource + '\\' + st; file = getFile(st, name); if (file != null) depth++; } if (file != null) { String st = file.getAbsolutePath(); // already loaded? for(int k = 0; k < list.length; k++) if (list[k].name.compareToIgnoreCase(st) == 0) { file = null; return list; } if (file != null) { File desc = new File(st.substring(0, st.lastIndexOf('.') + 1) + 'h'); File fs = new File(st.substring(0, st.lastIndexOf('.') + 1) + "fs"); st = file.getAbsolutePath(); for(int i = 0; i < built.size(); i++) if (((String)built.get(i)).compareToIgnoreCase(st) == 0) { file = desc; break; } if ((!desc.exists() || !fs.exists() || fs.length() == 0 || fs.lastModified() < file.lastModified() || force) && file != desc) { Header [] hh = new Pass(file, built, force, gc).compilationUnit(list, depth); // compile return hh; } else { Header [] newList = new Header[list.length + 1]; for (int k = 0; k < newList.length - 1; k++) newList[k] = list[k]; System.out.println(desc.getAbsolutePath() + " will be read!"); newList[newList.length - 1] = new Header(desc.getAbsolutePath(), depth); // load header list = newList; } } } return list; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void loadHeader() {\n\r\n\t}", "public IAstPreprocessorIncludeDirective findInclude(ISourceFile file);", "public IAstSourceFile findIncludeFile(String string);", "public IAstSourceFile findIncludeFile(ISourceFile file);", "public abstract Source load(ModuleName name);", "private voi...
[ "0.61738837", "0.5491321", "0.54609156", "0.5425098", "0.52702194", "0.52270097", "0.5190344", "0.5170032", "0.51681507", "0.513696", "0.511333", "0.51109356", "0.5080972", "0.50544715", "0.5048561", "0.49672383", "0.49489698", "0.49324995", "0.49305457", "0.49224353", "0.488...
0.558238
1
open specified file, if exists
private File getFile(String path, String name) { File file = null; boolean found = false; String ext = ""; for (int i = 0; i < name.length(); i++) ext += "" + ( (name.charAt(i) == '.') ? '\\' : name.charAt(i)); while(ext.length() > 0 && !found) { file = new File(path + "\\" + ext + ".java"); found = file != null && file.exists() && file.isFile(); ext = ext.substring(0, Math.max(0, ext.lastIndexOf('\\'))); } return (found)?file:null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void open(String fileName);", "File openFile();", "public void openFile()\r\n {\r\n try // open file\r\n {\r\n input = new RandomAccessFile( \"clients.dat\", \"r\" );\r\n } // end try\r\n catch ( IOException ioException )\r\n {\r\n System.err.println( \"File does not ...
[ "0.6979032", "0.6837421", "0.67282075", "0.65236646", "0.6451785", "0.64071685", "0.63758934", "0.6257852", "0.6219995", "0.61905336", "0.6167947", "0.6111698", "0.6065013", "0.6020558", "0.6015075", "0.6002783", "0.5973121", "0.5964091", "0.59279716", "0.5922598", "0.5898148...
0.0
-1
load header named name
public Header [] addHeader(Header [] list, String name) { String st = null; for(int i = 0; i < built.size(); i++, st = null) { st = (String)built.get(i); String tail = st.substring(st.lastIndexOf('\\') + 1); tail = tail.substring(0, tail.indexOf('.')); if (tail.compareToIgnoreCase(name) == 0) break; } if (st != null) { Header [] newList = new Header[list.length + 1]; for (int k = 0; k < newList.length - 1; k++) newList[k] = list[k]; st = st.substring(0, st.lastIndexOf('.')) + ".h"; System.out.println("loading " + st); newList[newList.length - 1] = new Header(st, depth + 1); // load header list = newList; connectClasses(list); } return list; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void loadHeader() {\n\r\n\t}", "String getHeader(String headerName);", "boolean containsHeader(String name);", "@Override\n\tpublic boolean containsHeader(String name) {\n\t\treturn false;\n\t}", "public Header getHeaderByKey(String key);", "public String getHeader(final String name...
[ "0.7109423", "0.70059943", "0.64828336", "0.6147106", "0.6119875", "0.61061525", "0.6008269", "0.594876", "0.5908488", "0.5876897", "0.5852707", "0.58284414", "0.5823311", "0.5799816", "0.5788495", "0.57615453", "0.5759766", "0.57588685", "0.57494164", "0.5748105", "0.5733760...
0.6171575
3
try to reduce number of unresolved references in loaded and compiled sources
private void connectClasses(Header [] list) { Vector queue; Vector garbage = new Vector(); Find.setCrossreference(list); for(int i = 0; list != null && i < list.length; i++) { queue = list[i].scopes; for(int j = 0; j < queue.size(); j++) for(Iterator iter = ((Scope)queue.get(j)).iterator(); iter.hasNext();) { Iterator a = null; Basic x = (Basic)iter.next(); if (x instanceof ClassType) { ClassType y = (ClassType)x; ClassType [] z; boolean done = false; String st = null; if (y.extend != null && y.extend.name != null && y.extend.scope == null) { // look for superclass st = y.extend.name.string; for(a = y.unresolved.iterator(); a.hasNext();) { String s = (String)a.next(); if (s.endsWith('.' + st)) { st = s; break; } } z = Find.findClass(st, 0, y.scope); for(int k = 0; k < z.length; k++) if (z[k].scope.javaPath("").endsWith(st) || z[k].scope.buildPath("").endsWith(st)) { y.extend = z[k]; garbage.add(st); done = true; } } for(int k = 0; k < y.implement.length; k++) if (y.implement[k].name != null && y.implement[k].scope == null) { // look for interface st = y.implement[k].name.string; for(a = y.unresolved.iterator(); a.hasNext();) { String s = (String)a.next(); if (s.endsWith('.' + st)) { st = s; break; } } done = false; z = Find.findClass(st, 0, y.scope); for(int l = 0; l < z.length && !done; l++) if (z[l].scope.javaPath("").endsWith(st) || z[l].scope.buildPath("").endsWith(st)) { y.implement[k] = z[l]; garbage.add(st); done = true; break; } } a = null; while(garbage.size() > 0) { st = (String)garbage.get(0); garbage.remove(0); y.unresolved.remove(st); } } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void doUnloading() {\n stopJit();\n // Do multiple GCs to prevent rare flakiness if some other thread is keeping the\n // classloader live.\n for (int i = 0; i < 5; ++i) {\n Runtime.getRuntime().gc();\n }\n startJit();\n }", "protected void method_2241() {\r\n // $FF: ...
[ "0.5855714", "0.58275753", "0.5778467", "0.57646245", "0.570275", "0.5668533", "0.5655039", "0.5630103", "0.5624753", "0.55769354", "0.55769354", "0.55578065", "0.5509325", "0.54942036", "0.54883903", "0.5457668", "0.54342145", "0.5429356", "0.5419641", "0.54177815", "0.54167...
0.0
-1
"import" ident qualifiedImport ';'
private String importDeclaration() { String handle; matchKeyword(Keyword.IMPORTSY); handle = nextToken.string; matchKeyword(Keyword.IDENTSY); handle = qualifiedImport(handle); matchKeyword(Keyword.SEMICOLONSY); return handle; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "ImportDeclaration createImportDeclaration();", "Import getImport();", "Import createImport();", "Import createImport();", "public final void importDeclaration() throws RecognitionException {\n int importDeclaration_StartIndex = input.index();\n try { dbg.enterRule(getGrammarFileName(), \"impo...
[ "0.7297213", "0.6927376", "0.6869112", "0.6869112", "0.6726019", "0.65833557", "0.6527192", "0.6387113", "0.63391083", "0.6320513", "0.61759996", "0.615494", "0.6150417", "0.6132946", "0.6132816", "0.6125451", "0.61242175", "0.6068295", "0.6054266", "0.6037715", "0.60300815",...
0.7769017
0
[ modifiers ] ( classDeclaration | interfaceDeclaration )
private void classOrInterfaceDeclaration(Modifier modifier, Scope scope, String basename) { for(int x; (x = classModifier()) != 0; modifier.add(x)); if (nextSymbol == Keyword.CLASSSY) classDeclaration(modifier, scope, basename); else if (nextSymbol == Keyword.INTERFACESY) interfaceDeclaration(modifier, scope, basename); else { error("Keyword " + Keyword.CLASSSY.string + " or " + Keyword.INTERFACESY.string + " expected, not " + nextToken.string); lookAhead(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface ClassDeclaring extends SymDeclaring {\n public ModsAttrs getMods();\n}", "public interface IClass extends IVisible, IMetaDataListHolder, INamableNode, IAsDocHolder, ICommentHolder\n{\n /**\n * @return\n */\n List< IAttribute > getAttributes();\n\n /**\n * @return\n */\n doub...
[ "0.73354304", "0.6807213", "0.6725895", "0.6576674", "0.6572468", "0.64241594", "0.6405288", "0.6379699", "0.63604915", "0.6260103", "0.61969733", "0.6107958", "0.608032", "0.6071477", "0.59817153", "0.59410524", "0.59347016", "0.591614", "0.5879841", "0.5869939", "0.5747583"...
0.7595943
0
( basicType | qualident ) bracketsOpt
private Type type() { Type t = new Type(); t.ident = nextToken; t.type = basicType(); if (t.type == Keyword.NONESY) { unresolved.add(t.ident.string = qualident()); } else t.ident.string = null; t.dim = bracketsOpt(); return t; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Keyword basicType()\r\n {\r\n Keyword x = Keyword.NONESY;\r\n\r\n if (typeKW.contains(nextSymbol))\r\n {\r\n x = nextSymbol;\r\n lookAhead();\r\n }\r\n\r\n return x;\r\n }", "@Override\r\n public DSCP opBrackets() {\r\n /*put codegen here.*/\r\n return elem...
[ "0.53828233", "0.5248631", "0.52035296", "0.51779157", "0.5121753", "0.51214796", "0.5098495", "0.50723284", "0.4999124", "0.49503645", "0.4935717", "0.49148068", "0.49064595", "0.4879312", "0.48409843", "0.48174262", "0.481043", "0.48070893", "0.47988924", "0.4793367", "0.47...
0.5172428
4
( NONESY | typeKW )
private Keyword basicType() { Keyword x = Keyword.NONESY; if (typeKW.contains(nextSymbol)) { x = nextSymbol; lookAhead(); } return x; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract boolean isKeyword();", "void setTypeKeyword(String keyword) {\n this.fTypeKeyword = keyword;\n }", "boolean isTypeKey(String key);", "public Rule nonFunctionTypes()\n \t{\n \t\treturn sequence(\n \t\t\t\t// Don't allow simpleMap starting with '|' as this confuses with closinf Functi...
[ "0.58210975", "0.57967234", "0.547723", "0.5416261", "0.53778636", "0.53186935", "0.5282334", "0.52204984", "0.5171363", "0.51595783", "0.51573145", "0.51208764", "0.51208764", "0.50908846", "0.50637645", "0.50481313", "0.50438434", "0.5031178", "0.5022374", "0.5022374", "0.5...
0.72760373
0
[ FINALSY ] type variableDeclaratorId
private Parameter formalParameter() { Parameter x = new Parameter(); x.modify = 0; if (nextSymbol == Keyword.FINALSY) { x.modify = nextSymbol.value; lookAhead(); } x.type = type(); variableDeclaratorId(x); return x; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ASTVariableDeclaratorId getVarId() {\n return (ASTVariableDeclaratorId) getChild(1);\n }", "public final ValidateStateTransitionsParser.variableDeclarator_return variableDeclarator() throws RecognitionException {\r\n ValidateStateTransitionsParser.variableDeclarator_return retval = new Va...
[ "0.7659708", "0.7142", "0.70279026", "0.6801516", "0.6639072", "0.6546117", "0.6392432", "0.6263727", "0.59979224", "0.5995941", "0.5956525", "0.5853122", "0.58315855", "0.582818", "0.5782395", "0.5778353", "0.5762873", "0.5761587", "0.5759909", "0.5746865", "0.5721012", "0...
0.0
-1