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
Provides a portable instance that resolves scopes in the default scope resolution strategy order.
public PreferenceScopeResolver getDefaultScopeResolver() { return scopeResolver; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Scope createScope();", "private static Scope buildScope() {\n return Scope.build(Scope.R_BASICPROFILE, Scope.W_SHARE, Scope.R_EMAILADDRESS);\n }", "private static Scope buildScope() {\n return Scope.build(Scope.R_BASICPROFILE, Scope.R_EMAILADDRESS);\n }", "private static Scope buildScope(...
[ "0.6604844", "0.60603154", "0.59060884", "0.58473116", "0.5797168", "0.5775825", "0.5730366", "0.5709139", "0.56198794", "0.56184644", "0.56117624", "0.5544311", "0.54211164", "0.5413303", "0.541095", "0.5406769", "0.5402724", "0.5330302", "0.53134066", "0.52992475", "0.52755...
0.6277271
1
Inflate the layout for this fragment
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { final View contentView = inflater.inflate(R.layout.fragment_restaurant_details_full_image, container, false); Log.d("mife","stid = " + stId); Button backBtn = (Button) contentView.findViewById(R.id.back_button); backBtn.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { if(listener != null) listener.onBack(); } }); imageView = (ImageView) contentView.findViewById(R.id.full_image); progressBar = (ProgressBar) contentView.findViewById(R.id.full_image_progressBar); st = Model.instace.getRestaurant(stId); Log.d("TAG","got restaurant name: " + st.name); if (st.imageUrl != null && !st.imageUrl.isEmpty() && !st.imageUrl.equals("")){ progressBar.setVisibility(View.VISIBLE); Model.instace.getImage(st.imageUrl, new Model.GetImageListener() { @Override public void onSuccess(Bitmap image) { imageView.setImageBitmap(image); progressBar.setVisibility(View.GONE); } @Override public void onFail() { progressBar.setVisibility(View.GONE); } }); } return contentView; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_main_allinfo, container, false);\n }", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup...
[ "0.6739604", "0.67235583", "0.6721706", "0.6698254", "0.6691869", "0.6687986", "0.66869223", "0.6684548", "0.66766286", "0.6674615", "0.66654444", "0.66654384", "0.6664403", "0.66596216", "0.6653321", "0.6647136", "0.66423255", "0.66388357", "0.6637491", "0.6634193", "0.66251...
0.0
-1
Test the effect of lock rifle
@Test void doEffectlockrifle() { ArrayList<Player> pl = new ArrayList<>(); AlphaGame g = new AlphaGame(1, pl, false, 8); setPlayers(pl); WeaponFactory wf = new WeaponFactory("lock rifle"); Weapon w = new Weapon("lock rifle", wf.getBooleans(), wf.getCosts(), wf.getRequestedNum(), wf.getApplier(), wf.getEffects(), wf.getDescriptions()); WeaponDeck wd = new WeaponDeck(); wd.getWeapons().add(w); RealPlayer p = new RealPlayer('b', "ciccia"); p.setPlayerPosition(Board.getSquare(0)); p.getPh().drawWeapon(wd, w.getName()); RealPlayer victim = new RealPlayer('y', "ciccia"); RealPlayer victim1 = new RealPlayer('y', "ciccia1"); victim.setPlayerPosition(Board.getSpawnpoint('b')); victim1.setPlayerPosition(Board.getSpawnpoint('b')); ArrayList<Player> players = new ArrayList<>(); players.add(victim); players.add(victim1); try{ p.getPh().getWeaponDeck().getWeapon(w.getName()).doEffect("base", "opt1", null, p, players, null); }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { } assertTrue(victim.getPb().countDamages() == 2 && victim.getPb().getMarkedDamages('b') == 1 && victim1.getPb().countDamages() == 0 && victim1.getPb().getMarkedDamages('b') == 1 ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n\tpublic void testTryLockAndRelockAndPass() {\n\n\t\tinstance.lock();\n\n\t\tassertTrue(instance.tryLock());\n\t}", "boolean isLocked();", "boolean isLocked();", "void m2() {\n\n boolean locked = false;\n try {\n locked = lock.tryLock(4, TimeUnit.SECONDS);\n\n //可以设...
[ "0.6956577", "0.63634", "0.63634", "0.63302654", "0.6268056", "0.61816657", "0.60957736", "0.6083817", "0.60592824", "0.60522735", "0.6002243", "0.5974185", "0.5966772", "0.59299433", "0.5926709", "0.5911928", "0.59028095", "0.588262", "0.5856875", "0.58530295", "0.5830345", ...
0.6297654
4
Test the effect of electroscythe
@Test void doEffectelectroscythe() { ArrayList<Player> pl = new ArrayList<>(); AlphaGame g = new AlphaGame(1, pl,false, 8); setPlayers(pl); WeaponFactory wf = new WeaponFactory("electroscythe"); Weapon w1 = new Weapon("electroscythe", wf.getBooleans(), wf.getCosts(), wf.getRequestedNum(), wf.getApplier(), wf.getEffects(), wf.getDescriptions()); WeaponDeck wd = new WeaponDeck(); RealPlayer p = new RealPlayer('b', "ciccia"); wd.getWeapons().add(w1); p.setPlayerPosition(Board.getSquare(0)); p.getPh().drawWeapon(wd, w1.getName()); RealPlayer victim = new RealPlayer('y', "ciccia"); victim.setPlayerPosition(Board.getSquare(0)); Terminator t = new Terminator('y', Board.getSquare(0)); t.setOwnerColor(victim.getColor()); ArrayList<Player> players = new ArrayList<>(); players.add(victim); players.add(t); try{ p.getPh().getWeaponDeck().getWeapon(w1.getName()).doEffect("alt", null, null, p, players, null); }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { } assertTrue(victim.getPb().countDamages() == 2 && t.getPb().countDamages() == 2); try{ p.getPh().getWeaponDeck().getWeapon(w1.getName()).doEffect("base", null, null, p, players, null); }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { } assertTrue(victim.getPb().countDamages() == 3 && t.getPb().countDamages() == 3); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n void doEffectheatseeker() {\n ArrayList<Player> pl = new ArrayList<>();\n AlphaGame g = new AlphaGame(1, pl,false, 8);\n WeaponFactory wf = new WeaponFactory(\"heatseeker\");\n Weapon w4 = new Weapon(\"heatseeker\", wf.getBooleans(), wf.getCosts(), wf.getRequestedNum(), wf.ge...
[ "0.6513013", "0.6471636", "0.63017446", "0.6225736", "0.6198378", "0.61634094", "0.6157128", "0.6125759", "0.6046215", "0.6044057", "0.60356396", "0.6024076", "0.5986954", "0.5943005", "0.5934991", "0.5930956", "0.5919739", "0.5912192", "0.5909032", "0.5893763", "0.5887757", ...
0.7002938
0
Test the effect of tractor beam
@Test void doEffecttractorbeam() { ArrayList<Player> pl = new ArrayList<>(); AlphaGame g = new AlphaGame(1, pl,false, 8); setPlayers(pl); WeaponFactory wf = new WeaponFactory("tractor beam"); Weapon w2 = new Weapon("tractor beam", wf.getBooleans(), wf.getCosts(), wf.getRequestedNum(), wf.getApplier(), wf.getEffects(), wf.getDescriptions()); WeaponDeck wd = new WeaponDeck(); wd.getWeapons().add(w2); RealPlayer p = new RealPlayer('b', "ciccia"); p.setPlayerPosition(Board.getSquare(0)); p.getPh().drawWeapon(wd, w2.getName()); RealPlayer victim = new RealPlayer('y', "ciccia"); victim.setPlayerPosition(Board.getSquare(6)); ArrayList<Player> players = new ArrayList<>(); players.add(victim); ArrayList<GenericSquare> s = new ArrayList<>(); s.add(Board.getSpawnpoint('b')); try { p.getPh().getWeaponDeck().getWeapon(w2.getName()).doEffect("base", null, null, p, players, s); }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { } assertTrue(players.get(0).getPb().countDamages() == 1 && players.get(0).getPlayerPosition() == Board.getSpawnpoint('b')); players.get(0).setPlayerPosition(Board.getSquare(1)); s.clear(); try{ p.getPh().getWeaponDeck().getWeapon(w2.getName()).doEffect("alt", null, null, p, players, null); }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { } assertTrue(players.get(0).getPb().countDamages() == 4 && players.get(0).getPlayerPosition() == p.getPlayerPosition()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void test() {\n // A small hard coded world for testing\n Actor[][] testWorld = new Actor[][]{\n {Actor.RED, Actor.RED, Actor.NONE},\n {Actor.NONE, Actor.BLUE, Actor.NONE},\n {Actor.RED, Actor.NONE, Actor.BLUE}\n };\n double th = 0.5; // Si...
[ "0.61324465", "0.61144584", "0.60106593", "0.5996902", "0.58406085", "0.5816999", "0.5785754", "0.577981", "0.5765163", "0.5756222", "0.57134867", "0.5712513", "0.56981397", "0.5685773", "0.5648641", "0.56469125", "0.5642927", "0.56333154", "0.5632768", "0.56234765", "0.56221...
0.6665614
0
Test the effect of furnace
@Test void doEffectfurnace() { ArrayList<Player> pl = new ArrayList<>(); AlphaGame g = new AlphaGame(1, pl,false, 8); WeaponFactory wf = new WeaponFactory("furnace"); Weapon w3 = new Weapon("furnace", wf.getBooleans(), wf.getCosts(), wf.getRequestedNum(), wf.getApplier(), wf.getEffects(), wf.getDescriptions()); WeaponDeck wd = new WeaponDeck(); wd.addWeapon(w3); RealPlayer p = new RealPlayer('b', "ciccia"); p.setPlayerPosition(Board.getSquare(0)); p.getPh().drawWeapon(wd, w3.getName()); RealPlayer victim = new RealPlayer('y', "ciccia"); victim.setPlayerPosition(Board.getSpawnpoint('r')); Terminator t = new Terminator('g', Board.getSquare(5)); t.setOwnerColor(victim.getColor()); ArrayList<GenericSquare> s = new ArrayList<>(); s.add(victim.getPlayerPosition()); try{ p.getPh().getWeaponDeck().getWeapon(w3.getName()).doEffect("base", null, null, p, null, s); }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { } assertTrue(victim.getPb().countDamages() == 1 && t.getPb().countDamages() == 1); p.setPlayerPosition(Board.getSquare(0)); victim = new RealPlayer('y', "ciccia"); victim.setPlayerPosition(Board.getSpawnpoint('r')); t = new Terminator('g', Board.getSpawnpoint('r')); t.setOwnerColor(victim.getColor()); s.clear(); s.add(Board.getSpawnpoint('r')); try{ p.getPh().getWeaponDeck().getWeapon(w3.getName()).doEffect("alt", null, null, p, null, s); }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { } assertTrue(victim.getPb().countDamages() == 1 && victim.getPb().getMarkedDamages('b')==1 && t.getPb().countDamages() == 1 && t.getPb().getMarkedDamages('b')==1); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n void doEffectheatseeker() {\n ArrayList<Player> pl = new ArrayList<>();\n AlphaGame g = new AlphaGame(1, pl,false, 8);\n WeaponFactory wf = new WeaponFactory(\"heatseeker\");\n Weapon w4 = new Weapon(\"heatseeker\", wf.getBooleans(), wf.getCosts(), wf.getRequestedNum(), wf.ge...
[ "0.69505656", "0.6691677", "0.6605662", "0.6577753", "0.6569275", "0.6561012", "0.65239453", "0.6443771", "0.6312958", "0.6238488", "0.6185087", "0.61777544", "0.6164658", "0.6162728", "0.61409146", "0.6114645", "0.6109194", "0.6108542", "0.6107606", "0.6102942", "0.606297", ...
0.7224792
0
Test the effect of heatseeker
@Test void doEffectheatseeker() { ArrayList<Player> pl = new ArrayList<>(); AlphaGame g = new AlphaGame(1, pl,false, 8); WeaponFactory wf = new WeaponFactory("heatseeker"); Weapon w4 = new Weapon("heatseeker", wf.getBooleans(), wf.getCosts(), wf.getRequestedNum(), wf.getApplier(), wf.getEffects(), wf.getDescriptions()); WeaponDeck wd = new WeaponDeck(); wd.addWeapon(w4); RealPlayer p = new RealPlayer('b', "ciccia"); wd.addWeapon(w4); p.setPlayerPosition(Board.getSquare(0)); p.getPh().drawWeapon(wd, w4.getName()); RealPlayer victim = new RealPlayer('y', "ciccia"); victim.setPlayerPosition(Board.getSquare(10)); ArrayList<Player> players = new ArrayList<>(); players.add(victim); try{ p.getPh().getWeaponDeck().getWeapon(w4.getName()).doEffect("base", null, null, p, players, null); }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { } assertTrue(victim.getPb().countDamages() == 3); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void TestGetHeatEmpty() throws Exception {\n for (int i = 0; i < HEIGHT; i++) {\n for (int j = 0; j < WIDTH; j++) {\n assertEquals(0, heatGrid.getHeat(j, i));\n }\n }\n }", "@Override\n public void drawHeatFlux() {\n }", "public void...
[ "0.61131936", "0.6051491", "0.59629977", "0.59384143", "0.5842155", "0.5839127", "0.5796354", "0.5721979", "0.5720752", "0.5638519", "0.5635622", "0.56183124", "0.56002766", "0.55936795", "0.5579792", "0.55735886", "0.5567625", "0.55433947", "0.54751086", "0.54741716", "0.546...
0.6692479
0
Test the effect of hellion
@Test void doEffecthellion() { ArrayList<Player> pl = new ArrayList<>(); AlphaGame g = new AlphaGame(1, pl,false, 8); WeaponFactory wf = new WeaponFactory("hellion"); Weapon w5 = new Weapon("hellion", wf.getBooleans(), wf.getCosts(), wf.getRequestedNum(), wf.getApplier(), wf.getEffects(), wf.getDescriptions()); WeaponDeck wd = new WeaponDeck(); wd.addWeapon(w5); RealPlayer p = new RealPlayer('b', "ciccia"); wd.addWeapon(w5); p.setPlayerPosition(Board.getSquare(0)); p.getPh().drawWeapon(wd, w5.getName()); RealPlayer victim = new RealPlayer('y', "ciccia"); victim.setPlayerPosition(Board.getSpawnpoint('b')); Terminator t = new Terminator('e', Board.getSpawnpoint('b')); t.setOwnerColor(victim.getColor()); ArrayList<Player> players = new ArrayList<>(); players.add(victim); players.add(t); try{ p.getPh().getWeaponDeck().getWeapon(w5.getName()).doEffect("base", null, null, p, players, null); }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { } assertTrue(victim.getPb().getMarkedDamages('b') == 1 && victim.getPb().countDamages() == 1 && t.getPb().getMarkedDamages('b') == 1); victim = new RealPlayer('y', "ciccia"); victim.setPlayerPosition(Board.getSpawnpoint('b')); t = new Terminator('e', Board.getSpawnpoint('b')); t.setOwnerColor(victim.getColor()); players.clear(); players.add(victim); players.add(t); try{ p.getPh().getWeaponDeck().getWeapon(w5.getName()).doEffect("alt", null, null, p, players, null); }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { } assertTrue(victim.getPb().getMarkedDamages('b') == 2 && victim.getPb().countDamages() == 1 && t.getPb().getMarkedDamages('b') == 2); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n void doEffectheatseeker() {\n ArrayList<Player> pl = new ArrayList<>();\n AlphaGame g = new AlphaGame(1, pl,false, 8);\n WeaponFactory wf = new WeaponFactory(\"heatseeker\");\n Weapon w4 = new Weapon(\"heatseeker\", wf.getBooleans(), wf.getCosts(), wf.getRequestedNum(), wf.ge...
[ "0.6705075", "0.661073", "0.6560855", "0.6545996", "0.65064305", "0.64834845", "0.6397262", "0.63521737", "0.6316536", "0.63034713", "0.62957174", "0.62872547", "0.628139", "0.627434", "0.62586254", "0.62545204", "0.6242889", "0.62294704", "0.6224482", "0.62239134", "0.621942...
0.6659962
1
Test the effect of whisper
@Test void doEffectwhisper() { ArrayList<Player> pl = new ArrayList<>(); AlphaGame g = new AlphaGame(1, pl,false, 8); WeaponFactory wf = new WeaponFactory("whisper"); Weapon w6 = new Weapon("whisper", wf.getBooleans(), wf.getCosts(), wf.getRequestedNum(), wf.getApplier(), wf.getEffects(), wf.getDescriptions()); WeaponDeck wd = new WeaponDeck(); wd.addWeapon(w6); RealPlayer p = new RealPlayer('b', "ciccia"); p.setPlayerPosition(Board.getSpawnpoint(2)); p.getPh().drawWeapon(wd, w6.getName()); RealPlayer victim = new RealPlayer('y', "ciccia"); victim.setPlayerPosition(Board.getSpawnpoint('y')); ArrayList<Player> players = new ArrayList<>(); players.add(victim); try{ p.getPh().getWeaponDeck().getWeapon(w6.getName()).doEffect("base", null, null, p, players, null); }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { } assertTrue(victim.getPb().getMarkedDamages('b') == 1 && victim.getPb().countDamages() == 3); players.get(0).setPlayerPosition(Board.getSquare(7)); try { p.getPh().getWeaponDeck().getWeapon(w6.getName()).doEffect("base", null, null, p, players, null); //"A choice of yours is wrong" }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n void doEffectheatseeker() {\n ArrayList<Player> pl = new ArrayList<>();\n AlphaGame g = new AlphaGame(1, pl,false, 8);\n WeaponFactory wf = new WeaponFactory(\"heatseeker\");\n Weapon w4 = new Weapon(\"heatseeker\", wf.getBooleans(), wf.getCosts(), wf.getRequestedNum(), wf.ge...
[ "0.6525573", "0.641462", "0.6412692", "0.61690176", "0.61123765", "0.6074047", "0.6066627", "0.60372645", "0.60290504", "0.6023386", "0.6010044", "0.6006255", "0.60006654", "0.5981128", "0.59678876", "0.5950082", "0.5939581", "0.5938959", "0.59196234", "0.5889723", "0.5888965...
0.6910876
0
Test the effect of flamethrower
@Test void doEffectflamethrower() { ArrayList<Player> pl = new ArrayList<>(); AlphaGame g = new AlphaGame(1, pl,false, 8); WeaponFactory wf = new WeaponFactory("flamethrower"); Weapon w7 = new Weapon("flamethrower", wf.getBooleans(), wf.getCosts(), wf.getRequestedNum(), wf.getApplier(), wf.getEffects(), wf.getDescriptions()); WeaponDeck wd = new WeaponDeck(); wd.addWeapon(w7); RealPlayer p = new RealPlayer('b', "ciccia"); p.setPlayerPosition(Board.getSquare(0)); p.getPh().drawWeapon(wd, w7.getName()); RealPlayer victim = new RealPlayer('y', "ciccia"); victim.setPlayerPosition(Board.getSquare(1)); Terminator t = new Terminator('e', Board.getSpawnpoint('b')); t.setOwnerColor(victim.getColor()); ArrayList<Player> players = new ArrayList<>(); players.add(victim); players.add(t); try{ p.getPh().getWeaponDeck().getWeapon(w7.getName()).doEffect("base", null, null, p, players, null); }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { } assertTrue(victim.getPb().countDamages() == 1 && t.getPb().countDamages() == 1); players.get(1).setPlayerPosition(Board.getSquare(5)); try{ p.getPh().getWeaponDeck().getWeapon(w7.getName()).doEffect("base", null, null, p, players, null); //"A choice of yours is wrong" }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { } assertTrue(victim.getPb().countDamages() == 1 && t.getPb().countDamages() == 1); players.remove(1); try { p.getPh().getWeaponDeck().getWeapon(w7.getName()).doEffect("base", null, null, p, players, null); }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { } assertTrue(victim.getPb().countDamages() == 2); victim = new RealPlayer('y', "ciccia"); victim.setPlayerPosition(Board.getSquare(1)); t = new Terminator('e', Board.getSpawnpoint('b')); t.setOwnerColor(victim.getColor()); RealPlayer p2 = new RealPlayer('v', "ciccia"); p2.setPlayerPosition(Board.getSquare(1)); ArrayList<GenericSquare> s = new ArrayList<>(); s.clear(); s.add(victim.getPlayerPosition()); s.add(t.getPlayerPosition()); try { p.getPh().getWeaponDeck().getWeapon(w7.getName()).doEffect("alt", null, null, p, null, s); }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { } assertTrue(victim.getPb().countDamages() == 2 && p2.getPb().countDamages() == 2 && t.getPb().countDamages() == 1); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n void doEffectheatseeker() {\n ArrayList<Player> pl = new ArrayList<>();\n AlphaGame g = new AlphaGame(1, pl,false, 8);\n WeaponFactory wf = new WeaponFactory(\"heatseeker\");\n Weapon w4 = new Weapon(\"heatseeker\", wf.getBooleans(), wf.getCosts(), wf.getRequestedNum(), wf.ge...
[ "0.75078773", "0.70844454", "0.69288146", "0.68909484", "0.6868791", "0.683481", "0.6809801", "0.68034554", "0.66662216", "0.66350347", "0.6621826", "0.6549085", "0.6462523", "0.6460501", "0.6448763", "0.64392805", "0.6431333", "0.6422698", "0.6408813", "0.63421464", "0.61858...
0.74369526
1
Test the effect of zx2
@Test void doEffectzx2() { ArrayList<Player> pl = new ArrayList<>(); AlphaGame g = new AlphaGame(1, pl,false, 8); WeaponFactory wf = new WeaponFactory("zx-2"); Weapon w8 = new Weapon("zx-2", wf.getBooleans(), wf.getCosts(), wf.getRequestedNum(), wf.getApplier(), wf.getEffects(), wf.getDescriptions()); WeaponDeck wd = new WeaponDeck(); wd.addWeapon(w8); RealPlayer p = new RealPlayer('b', "ciccia"); p.setPlayerPosition(Board.getSquare(0)); p.getPh().drawWeapon(wd, w8.getName()); RealPlayer victim = new RealPlayer('y', "ciccia"); victim.setPlayerPosition(Board.getSpawnpoint('b')); ArrayList<Player> players = new ArrayList<>(); players.add(victim); try{ p.getPh().getWeaponDeck().getWeapon(w8.getName()).doEffect("base", null, null, p, players, null); }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { } assertTrue(victim.getPb().countDamages() == 1 && victim.getPb().getMarkedDamages('b') == 2); victim = new RealPlayer('y', "ciccia"); victim.setPlayerPosition(Board.getSquare(1)); Terminator t = new Terminator('e', Board.getSpawnpoint('b')); t.setOwnerColor(victim.getColor()); RealPlayer victim2 = new RealPlayer('v', "ciccia"); victim2.setPlayerPosition(Board.getSpawnpoint('r')); players.clear(); players.add(victim); players.add(t); players.add(victim2); try{ p.getPh().getWeaponDeck().getWeapon(w8.getName()).doEffect("alt", null, null, p, players, null); }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { } assertTrue(victim.getPb().getMarkedDamages('b') == 1 && victim2.getPb().getMarkedDamages('b') == 1 && t.getPb().getMarkedDamages('b') == 1); players.remove(t); try{ p.getPh().getWeaponDeck().getWeapon(w8.getName()).doEffect("alt", null, null, p, players, null); }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { } assertTrue(victim.getPb().getMarkedDamages('b') == 2 && victim2.getPb().getMarkedDamages('b') == 2); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void mo27778a(boolean z, C6307c cVar, C6307c cVar2, boolean z2) {\n if (!z) {\n if (cVar instanceof C6308d) {\n switch (C66499.dbS[cVar.anw().ordinal()]) {\n case 1:\n EffectInfoModel effectInf...
[ "0.6085534", "0.59211046", "0.5912638", "0.58802426", "0.5771803", "0.5771803", "0.5770883", "0.5770883", "0.5770883", "0.5654288", "0.565239", "0.56436646", "0.56332785", "0.5629739", "0.55975705", "0.5585211", "0.55677986", "0.5560613", "0.5547705", "0.54902965", "0.5488898...
0.63282007
0
Test the effect of shotgun
@Test void doEffectshotgun() { ArrayList<Player> pl = new ArrayList<>(); AlphaGame g = new AlphaGame(1, pl,false, 8); WeaponFactory wf = new WeaponFactory("shotgun"); Weapon w9 = new Weapon("shotgun", wf.getBooleans(), wf.getCosts(), wf.getRequestedNum(), wf.getApplier(), wf.getEffects(), wf.getDescriptions()); WeaponDeck wd = new WeaponDeck(); RealPlayer p = new RealPlayer('b', "ciccia"); wd.addWeapon(w9); p.setPlayerPosition(Board.getSquare(0)); p.getPh().drawWeapon(wd, w9.getName()); RealPlayer victim = new RealPlayer('y', "ciccia"); victim.setPlayerPosition(Board.getSquare(0)); ArrayList<Player> players = new ArrayList<>(); players.add(victim); ArrayList<GenericSquare> s = new ArrayList<>(); try{ p.getPh().getWeaponDeck().getWeapon(w9.getName()).doEffect("base", null, null, p, players, null); }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { } assertTrue(victim.getPb().countDamages() == 3 && victim.getPlayerPosition() == Board.getSquare(0)); s.add(Board.getSquare(1)); try{ p.getPh().getWeaponDeck().getWeapon(w9.getName()).doEffect("base", null, null, p, players, s); }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { } assertTrue(victim.getPb().countDamages() == 6 && victim.getPlayerPosition() == Board.getSquare(1)); s.clear(); s.add(Board.getSpawnpoint('b')); try { p.getPh().getWeaponDeck().getWeapon(w9.getName()).doEffect("base", null, null, p, players, s); //A choice of yours is yours }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { } victim = new RealPlayer('y', "ciccia"); victim.setPlayerPosition(Board.getSquare(1)); players.clear(); players.add(victim); s.clear(); try { p.getPh().getWeaponDeck().getWeapon(w9.getName()).doEffect("alt", null, null, p, players, null); }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { } assertTrue(victim.getPb().countDamages() == 2); victim = new RealPlayer('y', "ciccia"); victim.setPlayerPosition(Board.getSpawnpoint('b')); players.clear(); players.add(victim); s.clear(); try{ p.getPh().getWeaponDeck().getWeapon(w9.getName()).doEffect("alt", null, null, p, players, null); //A choice of yours is wrong }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void shotgun(EntityManager manager) {\r\n if (manager.getAmmo(1) == 0 && !testMode) {\r\n changeGuns(0, manager);\r\n manager.outOfAmmo();\r\n return;\r\n }\r\n\r\n float newRotationR = rotationZ - 15;\r\n float newRotationL = rotationZ + 15;\r\n...
[ "0.7127551", "0.68553644", "0.68423575", "0.67670643", "0.66989654", "0.6557493", "0.6518867", "0.6509391", "0.6398214", "0.63786864", "0.63502204", "0.63348293", "0.62997234", "0.6271884", "0.6261458", "0.6253984", "0.62229496", "0.62072504", "0.62043", "0.6201242", "0.61834...
0.6829641
3
Test the effect of power glove
@Test void doEffectpowerglove() { ArrayList<Player> pl = new ArrayList<>(); AlphaGame g = new AlphaGame(1, pl,false, 8); WeaponFactory wf = new WeaponFactory("power glove"); Weapon w10 = new Weapon("power glove", wf.getBooleans(), wf.getCosts(), wf.getRequestedNum(), wf.getApplier(), wf.getEffects(), wf.getDescriptions()); WeaponDeck wd = new WeaponDeck(); RealPlayer p = new RealPlayer('b', "ciccia"); wd.addWeapon(w10); p.setPlayerPosition(Board.getSquare(0)); p.getPh().drawWeapon(wd, w10.getName()); RealPlayer victim = new RealPlayer('y', "ciccia"); victim.setPlayerPosition(Board.getSquare(1)); ArrayList<Player> players = new ArrayList<>(); players.add(victim); ArrayList<GenericSquare> s = new ArrayList<>(); try { p.getPh().getWeaponDeck().getWeapon(w10.getName()).doEffect("base", null, null, p, players, null); }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { } assertTrue(p.getPlayerPosition() == Board.getSquare(1) && victim.getPb().countDamages() == 1 && victim.getPb().getMarkedDamages('b') == 2); p.setPlayerPosition(Board.getSquare(0)); s.add(Board.getSquare(1)); victim = new RealPlayer('y', "ciccia"); victim.setPlayerPosition(Board.getSquare(1)); players.clear(); players.add(victim); s.add(Board.getSpawnpoint('b')); RealPlayer victim2 = new RealPlayer('v', "ciccia"); victim2.setPlayerPosition(Board.getSpawnpoint('b')); players.add(victim2); try{ p.getPh().getWeaponDeck().getWeapon(w10.getName()).doEffect("alt", null, null, p, players, s); }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { } assertTrue(p.getPlayerPosition() == Board.getSpawnpoint('b') && victim.getPb().countDamages() == 2 && victim2.getPb().countDamages() == 2); p.setPlayerPosition(Board.getSquare(0)); victim = new RealPlayer('y', "ciccia"); victim.setPlayerPosition(Board.getSpawnpoint('b')); players.clear(); players.add(victim); s.clear(); s.add(Board.getSquare(1)); s.add(Board.getSpawnpoint('b')); try{ p.getPh().getWeaponDeck().getWeapon(w10.getName()).doEffect("alt", null, null, p, players, s); }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { System.out.println("ERROR");} assertTrue(p.getPlayerPosition() == Board.getSpawnpoint('b') && victim.getPb().countDamages() == 2); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n void doEffectshockwave() {\n ArrayList<Player> pl = new ArrayList<>();\n AlphaGame g = new AlphaGame(1, pl,false, 8);\n RealPlayer b = new RealPlayer('b', \"blue\");\n RealPlayer e = new RealPlayer('e', \"emerald\");\n RealPlayer gr = new RealPlayer('g', \"grey\");\n ...
[ "0.68007326", "0.666384", "0.65094125", "0.6483104", "0.6448214", "0.6419306", "0.6401698", "0.6333632", "0.6319592", "0.62946165", "0.6275571", "0.6273486", "0.62505305", "0.62333345", "0.6202196", "0.61104286", "0.60745037", "0.60620314", "0.60389453", "0.600476", "0.592868...
0.71948075
0
Test the effect of railgun
@Test void doEffectrailgun() { ArrayList<Player> pl = new ArrayList<>(); AlphaGame g = new AlphaGame(1, pl,false, 8); WeaponFactory wf = new WeaponFactory("railgun"); Weapon w11 = new Weapon("railgun", wf.getBooleans(), wf.getCosts(), wf.getRequestedNum(), wf.getApplier(), wf.getEffects(), wf.getDescriptions()); WeaponDeck wd = new WeaponDeck(); RealPlayer p = new RealPlayer('b', "ciccia"); wd.addWeapon(w11); p.setPlayerPosition(Board.getSpawnpoint('r')); p.getPh().drawWeapon(wd, w11.getName()); RealPlayer victim = new RealPlayer('y', "ciccia"); victim.setPlayerPosition(Board.getSquare(6)); ArrayList<Player> players = new ArrayList<>(); players.add(victim); ArrayList<GenericSquare> s = new ArrayList<>(); try { p.getPh().getWeaponDeck().getWeapon(w11.getName()).doEffect("base", null, null, p, players, null); }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { } assertTrue(victim.getPb().countDamages() == 3); victim = new RealPlayer('y', "ciccia"); victim.setPlayerPosition(Board.getSquare(6)); players.clear(); players.add(victim); try{ p.getPh().getWeaponDeck().getWeapon(w11.getName()).doEffect("alt", null, null, p, players, null); }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { } assertTrue(victim.getPb().countDamages() == 2); victim = new RealPlayer('y', "ciccia"); victim.setPlayerPosition(Board.getSquare(6)); RealPlayer victim2 = new RealPlayer('v', "ciccia"); victim2.setPlayerPosition(Board.getSquare(7)); players.clear(); players.add(victim); players.add(victim2); s.clear(); try { p.getPh().getWeaponDeck().getWeapon(w11.getName()).doEffect("alt", null, null, p, players, null); }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { } assertTrue(victim.getPb().countDamages() == 2 && victim2.getPb().countDamages() == 2); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n void doEffectlockrifle() {\n ArrayList<Player> pl = new ArrayList<>();\n AlphaGame g = new AlphaGame(1, pl, false, 8);\n setPlayers(pl);\n WeaponFactory wf = new WeaponFactory(\"lock rifle\");\n Weapon w = new Weapon(\"lock rifle\", wf.getBooleans(), wf.getCosts(), wf....
[ "0.68159294", "0.6385922", "0.63547355", "0.63374805", "0.6254264", "0.62492585", "0.62215334", "0.6217067", "0.6206112", "0.6135504", "0.60567164", "0.6032784", "0.6017404", "0.6010467", "0.5997919", "0.5990492", "0.5981487", "0.59719", "0.5960768", "0.59430146", "0.5939912"...
0.69884264
0
Test the effect of shockwave
@Test void doEffectshockwave() { ArrayList<Player> pl = new ArrayList<>(); AlphaGame g = new AlphaGame(1, pl,false, 8); RealPlayer b = new RealPlayer('b', "blue"); RealPlayer e = new RealPlayer('e', "emerald"); RealPlayer gr = new RealPlayer('g', "grey"); RealPlayer v = new RealPlayer('v', "violet"); RealPlayer y = new RealPlayer('y', "yellow"); AlphaGame.getPlayers().add(b); AlphaGame.getPlayers().add(e); AlphaGame.getPlayers().add(gr); AlphaGame.getPlayers().add(v); AlphaGame.getPlayers().add(y); WeaponFactory wf = new WeaponFactory("shockwave"); Weapon w12 = new Weapon("shockwave", wf.getBooleans(), wf.getCosts(), wf.getRequestedNum(), wf.getApplier(), wf.getEffects(), wf.getDescriptions()); WeaponDeck wd = new WeaponDeck(); RealPlayer p = new RealPlayer('b', "ciccia"); wd.addWeapon(w12); p.setPlayerPosition(Board.getSquare(6)); p.getPh().drawWeapon(wd, w12.getName()); RealPlayer victim = new RealPlayer('y', "ciccia"); victim.setPlayerPosition(Board.getSquare(7)); RealPlayer victim2 = new RealPlayer('v', "ciccia"); victim2.setPlayerPosition(Board.getSquare(5)); RealPlayer victim3 = new RealPlayer('g', "ciccia"); victim3.setPlayerPosition(Board.getSquare(10)); ArrayList<Player> players = new ArrayList<>(); players.add(victim); players.add(victim2); players.add(victim3); try{ p.getPh().getWeaponDeck().getWeapon(w12.getName()).doEffect("base", null, null, p, players, null); }catch (WrongValueException | WrongPlayerException | WrongSquareException ex) { } assertTrue(victim.getPb().countDamages() == 1 && victim2.getPb().countDamages() == 1 && victim3.getPb().countDamages() == 1); victim2 = new RealPlayer('v', "ciccia"); victim2.setPlayerPosition(Board.getSquare(5)); victim3 = new RealPlayer('g', "ciccia"); victim3.setPlayerPosition(Board.getSquare(10)); players.clear(); players.add(victim2); players.add(victim3); try{ p.getPh().getWeaponDeck().getWeapon(w12.getName()).doEffect("base", null, null, p, players, null); }catch (WrongValueException | WrongPlayerException | WrongSquareException ex) { } assertTrue(victim2.getPb().countDamages() == 1 && victim3.getPb().countDamages() == 1); victim = new RealPlayer('y', "ciccia"); victim.setPlayerPosition(Board.getSquare(7)); victim2 = new RealPlayer('v', "ciccia"); victim2.setPlayerPosition(Board.getSquare(5)); victim3 = new RealPlayer('g', "ciccia"); victim3.setPlayerPosition(Board.getSquare(10)); RealPlayer victim4 = new RealPlayer('b', "ciccia"); RealPlayer victim5 = new RealPlayer('p', "ciccia"); victim4.setPlayerPosition(Board.getSquare(1)); victim5.setPlayerPosition(Board.getSquare(0)); players.clear(); try { p.getPh().getWeaponDeck().getWeapon(w12.getName()).doEffect("alt", null, null, p, null, null); }catch (WrongValueException | WrongPlayerException | WrongSquareException ex) { } assertTrue(victim.getPb().countDamages() == 1 && victim2.getPb().countDamages() == 1 && victim3.getPb().countDamages() == 1 && victim4.getPb().countDamages() == 0 && victim5.getPb().countDamages() == 0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n void doEffectheatseeker() {\n ArrayList<Player> pl = new ArrayList<>();\n AlphaGame g = new AlphaGame(1, pl,false, 8);\n WeaponFactory wf = new WeaponFactory(\"heatseeker\");\n Weapon w4 = new Weapon(\"heatseeker\", wf.getBooleans(), wf.getCosts(), wf.getRequestedNum(), wf.ge...
[ "0.6238603", "0.61168283", "0.6016527", "0.5998853", "0.59756774", "0.59462225", "0.5901402", "0.5895654", "0.5884321", "0.5833199", "0.58287567", "0.57779276", "0.5728672", "0.57279724", "0.57020247", "0.56970555", "0.56864667", "0.5671112", "0.5670704", "0.5663338", "0.5663...
0.6992896
0
Test the effect of sledgehammer
@Test void doEffectsledgehammer() { ArrayList<Player> pl = new ArrayList<>(); AlphaGame g = new AlphaGame(1, pl,false, 8); WeaponFactory wf = new WeaponFactory("sledgehammer"); Weapon w13 = new Weapon("sledgehammer", wf.getBooleans(), wf.getCosts(), wf.getRequestedNum(), wf.getApplier(), wf.getEffects(), wf.getDescriptions()); WeaponDeck wd = new WeaponDeck(); RealPlayer p = new RealPlayer('b', "ciccia"); wd.addWeapon(w13); p.setPlayerPosition(Board.getSquare(6)); p.getPh().drawWeapon(wd, w13.getName()); RealPlayer victim = new RealPlayer('y', "ciccia"); victim.setPlayerPosition(Board.getSquare(6)); ArrayList<Player> players = new ArrayList<>(); players.add(victim); try { p.getPh().getWeaponDeck().getWeapon(w13.getName()).doEffect("base", null, null, p, players, null); }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { } assertTrue(victim.getPb().countDamages() == 2); victim = new RealPlayer('y', "ciccia"); victim.setPlayerPosition(Board.getSquare(6)); players.clear(); players.add(victim); ArrayList<GenericSquare> s = new ArrayList<>(); s.add(Board.getSquare(10)); try { p.getPh().getWeaponDeck().getWeapon(w13.getName()).doEffect("alt", null, null, p, players, s); }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { } assertTrue(victim.getPb().countDamages() == 3 && victim.getPlayerPosition() == Board.getSquare(10)); victim = new RealPlayer('y', "ciccia"); victim.setPlayerPosition(Board.getSquare(6)); players.clear(); players.add(victim); s.clear(); try { p.getPh().getWeaponDeck().getWeapon(w13.getName()).doEffect("alt", null, null, p, players, null); }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { } assertTrue(victim.getPb().countDamages() == 3 && victim.getPlayerPosition() == Board.getSquare(6)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n void doEffectlockrifle() {\n ArrayList<Player> pl = new ArrayList<>();\n AlphaGame g = new AlphaGame(1, pl, false, 8);\n setPlayers(pl);\n WeaponFactory wf = new WeaponFactory(\"lock rifle\");\n Weapon w = new Weapon(\"lock rifle\", wf.getBooleans(), wf.getCosts(), wf....
[ "0.66462064", "0.64001626", "0.6252005", "0.6248623", "0.61952853", "0.6162388", "0.6133905", "0.6079631", "0.6073258", "0.60703945", "0.6067391", "0.606138", "0.6016934", "0.6007762", "0.5991941", "0.59442234", "0.594022", "0.59256494", "0.59112793", "0.58942306", "0.5893884...
0.6882243
0
Test the effect of machine gun
@Test void doEffectmachinegun() { ArrayList<Player> pl = new ArrayList<>(); AlphaGame g = new AlphaGame(1, pl,false, 8); WeaponFactory wf = new WeaponFactory("machine gun"); Weapon w14 = new Weapon("machine gun", wf.getBooleans(), wf.getCosts(), wf.getRequestedNum(), wf.getApplier(), wf.getEffects(), wf.getDescriptions()); WeaponDeck wd = new WeaponDeck(); RealPlayer p = new RealPlayer('b', "ciccia"); wd.addWeapon(w14); p.setPlayerPosition(Board.getSquare(6)); p.getPh().drawWeapon(wd, w14.getName()); RealPlayer victim = new RealPlayer('y', "ciccia"); victim.setPlayerPosition(Board.getSquare(7)); RealPlayer victim2 = new RealPlayer('v', "ciccia1"); victim2.setPlayerPosition(Board.getSquare(10)); RealPlayer victim3 = new RealPlayer('g', "ciccia2"); victim3.setPlayerPosition(Board.getSpawnpoint('y')); ArrayList<Player> players = new ArrayList<>(); players.add(victim); players.add(victim2); players.add(victim); try { p.getPh().getWeaponDeck().getWeapon(w14.getName()).doEffect("base", "opt1", null, p, players, null); }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { System.out.println("ERROR"); } assertTrue(victim.getPb().countDamages() == 2 && victim2.getPb().countDamages() == 1); players.clear(); victim = new RealPlayer('y', "ciccia"); victim.setPlayerPosition(Board.getSquare(7)); victim2 = new RealPlayer('v', "ciccia"); victim2.setPlayerPosition(Board.getSquare(10)); victim3 = new RealPlayer('g', "ciccia"); victim3.setPlayerPosition(Board.getSpawnpoint('y')); players.add(victim); players.add(victim2); players.add(victim); players.add(victim3); try { p.getPh().getWeaponDeck().getWeapon(w14.getName()).doEffect("base", "opt1", "opt2", p, players, null); }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { } assertTrue(victim.getPb().countDamages() == 2 && victim2.getPb().countDamages() == 1 && victim3.getPb().countDamages() == 1); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n void doEffectPlasmaGun() {\n ArrayList<Player> pl = new ArrayList<>();\n AlphaGame g = new AlphaGame(1, pl,false, 8);\n WeaponFactory wf = new WeaponFactory(\"plasma gun\");\n Weapon w17 = new Weapon(\"plasma gun\", wf.getBooleans(), wf.getCosts(), wf.getRequestedNum(), wf.ge...
[ "0.6839356", "0.6723382", "0.6719373", "0.6711524", "0.6680779", "0.6659921", "0.65699995", "0.64994127", "0.6467655", "0.643861", "0.643348", "0.6397402", "0.6376155", "0.63558674", "0.62849075", "0.62829584", "0.62707", "0.6229051", "0.6226822", "0.6203894", "0.61727226", ...
0.746786
0
Test the effect of thor
@Test void doEffectthor() { ArrayList<Player> pl = new ArrayList<>(); AlphaGame g = new AlphaGame(1, pl,false, 8); WeaponFactory wf = new WeaponFactory("t.h.o.r."); Weapon w15 = new Weapon("t.h.o.r.", wf.getBooleans(), wf.getCosts(), wf.getRequestedNum(), wf.getApplier(), wf.getEffects(), wf.getDescriptions()); WeaponDeck wd = new WeaponDeck(); RealPlayer p = new RealPlayer('b', "ciccia"); wd.addWeapon(w15); p.setPlayerPosition(Board.getSquare(6)); p.getPh().drawWeapon(wd, w15.getName()); RealPlayer victim = new RealPlayer('y', "ciccia"); victim.setPlayerPosition(Board.getSquare(7)); RealPlayer victim2 = new RealPlayer('v', "ciccia"); victim2.setPlayerPosition(Board.getSquare(10)); ArrayList<Player> players = new ArrayList<>(); players.add(victim); players.add(victim2); try { p.getPh().getWeaponDeck().getWeapon(w15.getName()).doEffect("base", "opt1", null, p, players, null); }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { } assertTrue(victim.getPb().countDamages() == 2 && victim2.getPb().countDamages() == 1); victim = new RealPlayer('y', "ciccia"); victim.setPlayerPosition(Board.getSquare(7)); victim2 = new RealPlayer('v', "ciccia"); victim2.setPlayerPosition(Board.getSquare(10)); RealPlayer victim3 = new RealPlayer('g', "ciccia"); victim3.setPlayerPosition(Board.getSpawnpoint('y')); players.clear(); players.add(victim); players.add(victim2); players.add(victim3); try { p.getPh().getWeaponDeck().getWeapon(w15.getName()).doEffect("base", "opt1", "opt2", p, players, null); }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { } assertTrue(victim.getPb().countDamages() == 2 && victim2.getPb().countDamages() == 1 && victim3.getPb().countDamages() == 2); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n void doEffectheatseeker() {\n ArrayList<Player> pl = new ArrayList<>();\n AlphaGame g = new AlphaGame(1, pl,false, 8);\n WeaponFactory wf = new WeaponFactory(\"heatseeker\");\n Weapon w4 = new Weapon(\"heatseeker\", wf.getBooleans(), wf.getCosts(), wf.getRequestedNum(), wf.ge...
[ "0.691624", "0.67460144", "0.6740325", "0.6724561", "0.65941125", "0.6573574", "0.6528906", "0.6515271", "0.6443362", "0.64313054", "0.6360682", "0.6359698", "0.6289327", "0.6268463", "0.62552166", "0.62278646", "0.62226", "0.621374", "0.61821866", "0.6171356", "0.61216336", ...
0.68837285
1
Test the effect of vortex cannon
@Test void doEffectvortexcannon() { ArrayList<Player> pl = new ArrayList<>(); AlphaGame g = new AlphaGame(1, pl,false, 8); WeaponFactory wf = new WeaponFactory("vortex cannon"); Weapon w16 = new Weapon("vortex cannon", wf.getBooleans(), wf.getCosts(), wf.getRequestedNum(), wf.getApplier(), wf.getEffects(), wf.getDescriptions()); WeaponDeck wd = new WeaponDeck(); RealPlayer p = new RealPlayer('b', "ciccia"); wd.addWeapon(w16); p.setPlayerPosition(Board.getSquare(6)); p.getPh().drawWeapon(wd, w16.getName()); RealPlayer victim = new RealPlayer('y', "ciccia"); victim.setPlayerPosition(Board.getSpawnpoint('y')); ArrayList<Player> players = new ArrayList<>(); players.add(victim); ArrayList<GenericSquare> s = new ArrayList<>(); s.add(Board.getSquare(10)); try{ p.getPh().getWeaponDeck().getWeapon(w16.getName()).doEffect("base", null, null, p, players, s); }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { } assertTrue(victim.getPb().countDamages() == 2 && victim.getPlayerPosition() == Board.getSquare(10)); players.clear(); s.clear(); victim = new RealPlayer('y', "ciccia"); victim.setPlayerPosition(Board.getSpawnpoint('y')); RealPlayer victim2 = new RealPlayer('v', "ciccia"); victim2.setPlayerPosition(Board.getSquare(10)); RealPlayer victim3 = new RealPlayer('g', "ciccia"); victim3.setPlayerPosition(Board.getSquare(9)); players.add(victim); players.add(victim2); players.add(victim3); s.add(Board.getSquare(10)); try { p.getPh().getWeaponDeck().getWeapon(w16.getName()).doEffect("base", "opt1", null, p, players, s); }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { } assertTrue(victim.getPb().countDamages() == 2 && victim.getPlayerPosition() == Board.getSquare(10) && victim2.getPlayerPosition() == Board.getSquare(10) && victim2.getPb().countDamages() == 1 && victim3.getPlayerPosition()==Board.getSquare(10) && victim3.getPb().countDamages()==1); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void victorTest(){\n\n victorTestController.set(0.5);\n }", "@Test\n void doEffectlockrifle() {\n ArrayList<Player> pl = new ArrayList<>();\n AlphaGame g = new AlphaGame(1, pl, false, 8);\n setPlayers(pl);\n WeaponFactory wf = new WeaponFactory(\"lock rifle\");\n ...
[ "0.636284", "0.62675285", "0.6042924", "0.6009978", "0.5929213", "0.5928843", "0.5889772", "0.5856329", "0.5818503", "0.5804775", "0.5803917", "0.57874644", "0.5784773", "0.5770671", "0.57244617", "0.5672183", "0.56684804", "0.5655056", "0.5649394", "0.56152034", "0.5606953",...
0.6536137
0
Test the effect of plasma gun
@Test void doEffectPlasmaGun() { ArrayList<Player> pl = new ArrayList<>(); AlphaGame g = new AlphaGame(1, pl,false, 8); WeaponFactory wf = new WeaponFactory("plasma gun"); Weapon w17 = new Weapon("plasma gun", wf.getBooleans(), wf.getCosts(), wf.getRequestedNum(), wf.getApplier(), wf.getEffects(), wf.getDescriptions()); WeaponDeck wd = new WeaponDeck(); RealPlayer p = new RealPlayer('b', "ciccia"); wd.addWeapon(w17); p.setPlayerPosition(Board.getSquare(6)); p.getPh().drawWeapon(wd, w17.getName()); RealPlayer victim = new RealPlayer('y', "ciccia"); victim.setPlayerPosition(Board.getSpawnpoint('y')); ArrayList<Player> players = new ArrayList<>(); players.add(victim); ArrayList<GenericSquare> s = new ArrayList<>(); try { p.getPh().getWeaponDeck().getWeapon(w17.getName()).doEffect("base", null, null, p, players, null); }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { } assertTrue(victim.getPb().countDamages() == 2); p.setPlayerPosition(Board.getSpawnpoint(2)); victim = new RealPlayer('y', "ciccia"); victim.setPlayerPosition(Board.getSpawnpoint('y')); players.clear(); players.add(victim); s.clear(); s.add(Board.getSquare(6)); try { p.getPh().getWeaponDeck().getWeapon(w17.getName()).doEffect("opt1", "base", null, p, players, s); }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { } assertTrue(victim.getPb().countDamages() == 2 && p.getPlayerPosition() == Board.getSquare(6)); p.setPlayerPosition(Board.getSquare(6)); victim = new RealPlayer('y', "ciccia"); victim.setPlayerPosition(Board.getSpawnpoint('y')); players.clear(); players.add(victim); s.clear(); s.add(Board.getSquare(1)); try { p.getPh().getWeaponDeck().getWeapon(w17.getName()).doEffect("base", "opt1", null, p, players, s); }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { } assertTrue(victim.getPb().countDamages() == 2 && p.getPlayerPosition() == Board.getSquare(1)); p.setPlayerPosition(Board.getSpawnpoint(2)); victim = new RealPlayer('y', "ciccia"); victim.setPlayerPosition(Board.getSpawnpoint('y')); players.clear(); players.add(victim); s.clear(); s.add(Board.getSquare(6)); try { p.getPh().getWeaponDeck().getWeapon(w17.getName()).doEffect("opt1", "base", "opt2", p, players, s); }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { } assertTrue(victim.getPb().countDamages() == 3 && p.getPlayerPosition() == Board.getSquare(6)); p.setPlayerPosition(Board.getSquare(6)); victim = new RealPlayer('y', "ciccia"); victim.setPlayerPosition(Board.getSpawnpoint('y')); players.clear(); players.add(victim); s.clear(); s.add(Board.getSpawnpoint('b')); try { p.getPh().getWeaponDeck().getWeapon(w17.getName()).doEffect("base", "opt2", "opt1", p, players, s); }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { } assertTrue(victim.getPb().countDamages() == 3 && p.getPlayerPosition() == Board.getSpawnpoint('b')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n void doEffectheatseeker() {\n ArrayList<Player> pl = new ArrayList<>();\n AlphaGame g = new AlphaGame(1, pl,false, 8);\n WeaponFactory wf = new WeaponFactory(\"heatseeker\");\n Weapon w4 = new Weapon(\"heatseeker\", wf.getBooleans(), wf.getCosts(), wf.getRequestedNum(), wf.ge...
[ "0.6774555", "0.6730889", "0.66886544", "0.6533481", "0.65249324", "0.6496659", "0.645041", "0.6417985", "0.63672054", "0.6354219", "0.63528556", "0.62783134", "0.6256651", "0.6226107", "0.6221529", "0.62206835", "0.61839014", "0.6148368", "0.6112601", "0.6100854", "0.6098269...
0.71252966
0
Test the effect of grenade launcher
@Test void doEffectgrenadelauncher() { ArrayList<Player> pl = new ArrayList<>(); AlphaGame g = new AlphaGame(1, pl,false, 8); WeaponFactory wf = new WeaponFactory("grenade launcher"); Weapon w18 = new Weapon("grenade launcher", wf.getBooleans(), wf.getCosts(), wf.getRequestedNum(), wf.getApplier(), wf.getEffects(), wf.getDescriptions()); WeaponDeck wd = new WeaponDeck(); RealPlayer p = new RealPlayer('b', "ciccia"); wd.addWeapon(w18); p.setPlayerPosition(Board.getSquare(6)); p.getPh().drawWeapon(wd, w18.getName()); RealPlayer victim = new RealPlayer('y', "ciccia"); victim.setPlayerPosition(Board.getSpawnpoint('y')); ArrayList<Player> players = new ArrayList<>(); players.add(victim); ArrayList<GenericSquare> s = new ArrayList<>(); s.add(Board.getSquare(10)); try { p.getPh().getWeaponDeck().getWeapon(w18.getName()).doEffect("base", null, null, p, players, s); }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { } assertTrue(victim.getPb().countDamages() == 1 && victim.getPlayerPosition() == Board.getSquare(10)); victim = new RealPlayer('y', "ciccia"); victim.setPlayerPosition(Board.getSpawnpoint('y')); players.clear(); players.add(victim); s.clear(); try { p.getPh().getWeaponDeck().getWeapon(w18.getName()).doEffect("base", null, null, p, players, null); }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { } assertTrue(victim.getPb().countDamages() == 1 && victim.getPlayerPosition() == Board.getSpawnpoint('y')); victim = new RealPlayer('y', "ciccia"); victim.setPlayerPosition(Board.getSpawnpoint('y')); RealPlayer victim2 = new RealPlayer('v', "ciccia"); victim2.setPlayerPosition(Board.getSquare(10)); RealPlayer victim3 = new RealPlayer('g', "ciccia"); victim3.setPlayerPosition(Board.getSquare(10)); players.clear(); players.add(victim); s.clear(); s.add(Board.getSquare(10)); try { p.getPh().getWeaponDeck().getWeapon(w18.getName()).doEffect("base", "opt1", null, p, players, s); }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { } assertTrue(victim.getPb().countDamages() == 1 && victim2.getPb().countDamages() == 1 && victim3.getPb().countDamages() == 1); victim = new RealPlayer('y', "ciccia"); victim.setPlayerPosition(Board.getSpawnpoint('y')); victim2 = new RealPlayer('v', "ciccia"); victim2.setPlayerPosition(Board.getSquare(10)); victim3 = new RealPlayer('g', "ciccia"); victim3.setPlayerPosition(Board.getSquare(10)); players.clear(); players.add(victim); s.clear(); s.add(Board.getSquare(10)); s.add(Board.getSquare(10)); try { p.getPh().getWeaponDeck().getWeapon(w18.getName()).doEffect("base", "opt1", null, p, players, s); }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { } assertTrue(victim.getPb().countDamages() == 2 && victim2.getPb().countDamages() == 1 && victim3.getPb().countDamages() == 1); victim = new RealPlayer('y', "ciccia"); victim.setPlayerPosition(Board.getSquare(10)); victim2 = new RealPlayer('v', "ciccia1"); victim2.setPlayerPosition(Board.getSquare(10)); players.clear(); players.add(victim); s.clear(); s.add(Board.getSquare(10)); s.add(Board.getSpawnpoint('y')); try { p.getPh().getWeaponDeck().getWeapon(w18.getName()).doEffect("opt1", "base", null, p, players, s); }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { System.out.println("ERROR");} assertTrue(victim.getPb().countDamages() == 2 && victim.getPlayerPosition() == Board.getSpawnpoint('y') && victim2.getPb().countDamages() == 1); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n void doEffectrocketlauncher() {\n ArrayList<Player> pl = new ArrayList<>();\n AlphaGame g = new AlphaGame(1, pl,false, 8);\n WeaponFactory wf = new WeaponFactory(\"rocket launcher\");\n Weapon w19 = new Weapon(\"rocket launcher\", wf.getBooleans(), wf.getCosts(), wf.getReques...
[ "0.7056705", "0.69358593", "0.6896473", "0.68418354", "0.6817561", "0.67707187", "0.67633903", "0.67139727", "0.66937137", "0.6678585", "0.65903807", "0.65305084", "0.64327633", "0.6384606", "0.63730186", "0.6349329", "0.6300619", "0.6281062", "0.61939275", "0.6122089", "0.61...
0.76409805
0
Test the effect of rocket launcher
@Test void doEffectrocketlauncher() { ArrayList<Player> pl = new ArrayList<>(); AlphaGame g = new AlphaGame(1, pl,false, 8); WeaponFactory wf = new WeaponFactory("rocket launcher"); Weapon w19 = new Weapon("rocket launcher", wf.getBooleans(), wf.getCosts(), wf.getRequestedNum(), wf.getApplier(), wf.getEffects(), wf.getDescriptions()); WeaponDeck wd = new WeaponDeck(); RealPlayer p = new RealPlayer('b', "ciccia"); wd.addWeapon(w19); p.setPlayerPosition(Board.getSquare(6)); p.getPh().drawWeapon(wd, w19.getName()); RealPlayer victim = new RealPlayer('y', "ciccia"); victim.setPlayerPosition(Board.getSpawnpoint('y')); ArrayList<Player> players = new ArrayList<>(); ArrayList<GenericSquare> s = new ArrayList<>(); players.add(victim); s.add(Board.getSquare(10)); try { p.getPh().getWeaponDeck().getWeapon(w19.getName()).doEffect("base", null, null, p, players, s); }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { } assertTrue(victim.getPb().countDamages() == 2 && victim.getPlayerPosition() == Board.getSquare(10)); victim = new RealPlayer('y', "ciccia"); victim.setPlayerPosition(Board.getSpawnpoint('y')); players.clear(); players.add(victim); s.clear(); s.add(Board.getSquare(7)); s.add(Board.getSquare(10)); try { p.getPh().getWeaponDeck().getWeapon(w19.getName()).doEffect("opt1", "base", null, p, players, s); }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { } assertTrue(victim.getPb().countDamages() == 2 && victim.getPlayerPosition() == Board.getSquare(10) && p.getPlayerPosition() == Board.getSquare(7)); p.setPlayerPosition(Board.getSquare(6)); victim = new RealPlayer('y', "ciccia"); victim.setPlayerPosition(Board.getSpawnpoint('y')); RealPlayer victim2 = new RealPlayer('v', "ciccia"); victim2.setPlayerPosition(Board.getSpawnpoint('y')); RealPlayer victim3 = new RealPlayer('g', "ciccia"); victim3.setPlayerPosition(Board.getSpawnpoint('y')); players.clear(); players.add(victim); s.clear(); s.add(Board.getSquare(7)); s.add(Board.getSquare(10)); try { p.getPh().getWeaponDeck().getWeapon(w19.getName()).doEffect("opt1", "base", "opt2", p, players, s); }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { } assertTrue(victim.getPb().countDamages() == 3 && victim.getPlayerPosition() == Board.getSquare(10) && p.getPlayerPosition() == Board.getSquare(7) && victim2.getPb().countDamages() == 1 && victim3.getPb().countDamages() == 1); p.setPlayerPosition(Board.getSquare(6)); victim = new RealPlayer('y', "ciccia"); victim.setPlayerPosition(Board.getSpawnpoint('y')); victim2 = new RealPlayer('v', "ciccia"); victim2.setPlayerPosition(Board.getSpawnpoint('y')); victim3 = new RealPlayer('g', "ciccia"); victim3.setPlayerPosition(Board.getSpawnpoint('y')); players.clear(); players.add(victim); s.clear(); s.add(Board.getSquare(10)); s.add(Board.getSquare(7)); try { p.getPh().getWeaponDeck().getWeapon(w19.getName()).doEffect("base", "opt2", "opt1", p, players, s); }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { } assertTrue(victim.getPb().countDamages() == 3 && victim.getPlayerPosition() == Board.getSquare(10) && p.getPlayerPosition() == Board.getSquare(7) && victim2.getPb().countDamages() == 1 && victim3.getPb().countDamages() == 1); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n void doEffectlockrifle() {\n ArrayList<Player> pl = new ArrayList<>();\n AlphaGame g = new AlphaGame(1, pl, false, 8);\n setPlayers(pl);\n WeaponFactory wf = new WeaponFactory(\"lock rifle\");\n Weapon w = new Weapon(\"lock rifle\", wf.getBooleans(), wf.getCosts(), wf....
[ "0.6654353", "0.6328093", "0.61770827", "0.61618686", "0.60631853", "0.60210294", "0.6016495", "0.59949374", "0.5975635", "0.5941508", "0.58954126", "0.5860763", "0.58264405", "0.58263993", "0.5821901", "0.58198786", "0.58020043", "0.57963645", "0.579289", "0.57914376", "0.57...
0.67606515
0
Test the effect of cyberblade
@Test void doEffectcyberblade(){ ArrayList<Player> pl = new ArrayList<>(); AlphaGame g = new AlphaGame(1, pl,false, 8); WeaponFactory wf = new WeaponFactory("cyberblade"); Weapon w20 = new Weapon("cyberblade", wf.getBooleans(), wf.getCosts(), wf.getRequestedNum(), wf.getApplier(), wf.getEffects(), wf.getDescriptions()); WeaponDeck wd = new WeaponDeck(); RealPlayer p = new RealPlayer('b', "ciccia"); wd.addWeapon(w20); p.setPlayerPosition(Board.getSquare(6)); p.getPh().drawWeapon(wd, w20.getName()); RealPlayer victim = new RealPlayer('y', "ciccia"); victim.setPlayerPosition(Board.getSquare(6)); ArrayList<Player> players = new ArrayList<>(); players.add(victim); try { p.getPh().getWeaponDeck().getWeapon(w20.getName()).doEffect("base", null, null, p, players, null); }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { } assertTrue(victim.getPb().countDamages()==2); victim = new RealPlayer('y', "ciccia"); victim.setPlayerPosition(Board.getSquare(6)); players.clear(); players.add(victim); ArrayList<GenericSquare> s = new ArrayList<>(); s.add(Board.getSquare(7)); try { p.getPh().getWeaponDeck().getWeapon(w20.getName()).doEffect("base", "opt1", null, p, players, s); }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { } assertTrue(victim.getPb().countDamages()==2 && p.getPlayerPosition()==Board.getSquare(7)); p.setPlayerPosition(Board.getSquare(6)); victim = new RealPlayer('y', "ciccia"); victim.setPlayerPosition(Board.getSquare(7)); players.clear(); players.add(victim); s.clear(); s.add(Board.getSquare(7)); try { p.getPh().getWeaponDeck().getWeapon(w20.getName()).doEffect("opt1", "base", null, p, players, s); }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { } assertTrue(victim.getPb().countDamages()==2 && p.getPlayerPosition()==Board.getSquare(7)); p.setPlayerPosition(Board.getSquare(6)); victim = new RealPlayer('y', "ciccia"); victim.setPlayerPosition(Board.getSquare(6)); RealPlayer victim2 = new RealPlayer('v', "ciccia"); victim2.setPlayerPosition(Board.getSquare(7)); players.clear(); players.add(victim); players.add(victim2); s.clear(); s.add(Board.getSquare(7)); try { p.getPh().getWeaponDeck().getWeapon(w20.getName()).doEffect("base", "opt1", "opt2", p, players, s); }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { } assertTrue(victim.getPb().countDamages()==2 && victim2.getPb().countDamages()==2 && p.getPlayerPosition()==Board.getSquare(7)); p.setPlayerPosition(Board.getSquare(6)); victim = new RealPlayer('y', "ciccia"); victim.setPlayerPosition(Board.getSquare(6)); victim2 = new RealPlayer('v', "ciccia"); victim2.setPlayerPosition(Board.getSquare(6)); players.clear(); players.add(victim); players.add(victim2); s.clear(); s.add(Board.getSquare(7)); try { p.getPh().getWeaponDeck().getWeapon(w20.getName()).doEffect("base", "opt2", "opt1", p, players, s); }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { } assertTrue(victim.getPb().countDamages()==2 && victim2.getPb().countDamages()==2 && p.getPlayerPosition()==Board.getSquare(7)); p.setPlayerPosition(Board.getSquare(6)); victim = new RealPlayer('y', "ciccia"); victim.setPlayerPosition(Board.getSquare(7)); victim2 = new RealPlayer('v', "ciccia"); victim2.setPlayerPosition(Board.getSquare(7)); players.clear(); players.add(victim); players.add(victim2); s.clear(); s.add(Board.getSquare(7)); try { p.getPh().getWeaponDeck().getWeapon(w20.getName()).doEffect("opt1", "base", "opt2", p, players, s); }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { } assertTrue(victim.getPb().countDamages()==2 && victim2.getPb().countDamages()==2 && p.getPlayerPosition()==Board.getSquare(7)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n void doEffectlockrifle() {\n ArrayList<Player> pl = new ArrayList<>();\n AlphaGame g = new AlphaGame(1, pl, false, 8);\n setPlayers(pl);\n WeaponFactory wf = new WeaponFactory(\"lock rifle\");\n Weapon w = new Weapon(\"lock rifle\", wf.getBooleans(), wf.getCosts(), wf....
[ "0.6661377", "0.65577024", "0.6394933", "0.639445", "0.63846445", "0.62849265", "0.6225536", "0.6189647", "0.6167439", "0.6150561", "0.6149932", "0.6145989", "0.61347926", "0.6133045", "0.61276364", "0.6089221", "0.6078973", "0.6054485", "0.60466576", "0.6018557", "0.59933645...
0.67384875
0
Test the weapon payment (grab and an effect)
@Test void pay() { ArrayList<Player> pl = new ArrayList<>(); AlphaGame g = new AlphaGame(1, pl,false, 8); WeaponFactory wf = new WeaponFactory("machine gun"); Weapon w = new Weapon("t.h.o.r.", wf.getBooleans(), wf.getCosts(), wf.getRequestedNum(), wf.getApplier(), wf.getEffects(), wf.getDescriptions()); RealPlayer p = new RealPlayer('b', "ciccia"); int[] ammo = {3, 3, 3}; p.getPb().grabAmmo(ammo); w.pay("base", p); assertTrue(p.getPb().getAmmo('b')==3 && p.getPb().getAmmo('r')==3 && p.getPb().getAmmo('y')==3); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n void doEffectlockrifle() {\n ArrayList<Player> pl = new ArrayList<>();\n AlphaGame g = new AlphaGame(1, pl, false, 8);\n setPlayers(pl);\n WeaponFactory wf = new WeaponFactory(\"lock rifle\");\n Weapon w = new Weapon(\"lock rifle\", wf.getBooleans(), wf.getCosts(), wf....
[ "0.7178357", "0.715275", "0.69907993", "0.6973652", "0.69510996", "0.6889137", "0.6875404", "0.68520224", "0.68441534", "0.67864746", "0.6740944", "0.67267436", "0.669152", "0.6680942", "0.6674214", "0.66537714", "0.65207165", "0.6502373", "0.64887685", "0.642317", "0.6406476...
0.71014875
2
TODO Autogenerated method stub
public static void main(String[] args) { int [] t = {3,4,8,1,2}; System.out.println(rotateMin(t)); //System.out.println(t); for(int i = 0 ; i < t.length ; i++) System.out.println(t[i]); }
{ "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
/ Konstruktor Eine FaehigkeitenAnzeige funtioniert wie die normale Anzeige, ist aber auf die Faehigkeiten des Spielers spezialisiert, das durch einen SpielerListener immer aktualisiert wird.
public FaehigkeitenAnzeige(int breite, int hoehe) { super(breite, hoehe); SimpleAttributeSet font = new SimpleAttributeSet(); StyleConstants.setFontSize(font, 14); document.setParagraphAttributes(0, document.getLength(), font, false); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tprotected void setListener() {\n\n\t}", "@Override\n\tprotected void setListener() {\n\n\t}", "protected Listener(){super();}", "@Override\n\tpublic void setListener() {\n\n\t}", "@Override\r\n\tpublic void setListener() {\n\r\n\t}", "@Override\r\n\tpublic void setListener() {\n\r\n\t}", "...
[ "0.6379101", "0.6379101", "0.6338172", "0.6224524", "0.609284", "0.609284", "0.609021", "0.60854334", "0.608447", "0.60310715", "0.60257286", "0.5934576", "0.58817035", "0.58708745", "0.58560866", "0.5853748", "0.58418244", "0.581806", "0.5815691", "0.5804988", "0.58012015", ...
0.0
-1
/ Methoden Fuegt einen Text ohne Zeilenumbruch hinzu und zentriert alles in der Mitte der Anzeige.
@Override public void print(String text) { super.print(text); SimpleAttributeSet sas = new SimpleAttributeSet(); StyleConstants.setAlignment(sas, StyleConstants.ALIGN_CENTER); document.setParagraphAttributes(0, document.getLength(), sas, false); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void leseTextEin()\r\n\t{\n\t\tif( this.text != \"\" )\r\n\t\t\treturn;\r\n\t\t\r\n\t StringBuffer buffer = new StringBuffer();\r\n\t BufferedReader input = null;\r\n\t \r\n\t try \r\n\t {\r\n\t \tinput = new BufferedReader( new FileReader(this.dateipfad) );\r\n\t \tString line = null; ...
[ "0.67252487", "0.6531124", "0.6425709", "0.64221615", "0.6360773", "0.6358032", "0.63437605", "0.63385725", "0.62879276", "0.61811924", "0.614487", "0.614487", "0.614487", "0.614487", "0.614487", "0.614487", "0.614487", "0.614487", "0.61303276", "0.6127706", "0.61265635", "...
0.0
-1
Listener Methode // Wird aufgerufen, wenn sich der Spieler veraendert hat und uebergibt den neuen Spieler, sodass die Anzeige aktualisiert werden kann.
@Override public void spielerUpdate(Spieler evt) { clear(); printSize("Fähigkeiten", 18); for(Faehigkeit f : evt.getFaehigkeiten()) print("\n" + f.getName()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tprotected void setListener() {\n\n\t}", "@Override\n\tprotected void setListener() {\n\n\t}", "@Override\n\tpublic void setListener() {\n\n\t}", "@Override\n\tpublic void getListener(){\n\t}", "@Override\r\n\tpublic void setListener() {\n\r\n\t}", "@Override\r\n\tpublic void setListener() {\...
[ "0.77305996", "0.77305996", "0.7649039", "0.7634729", "0.7585486", "0.7585486", "0.75800765", "0.73192704", "0.7286811", "0.72154254", "0.7074662", "0.69955474", "0.69807106", "0.69472444", "0.689409", "0.6889264", "0.6888247", "0.68882316", "0.6849847", "0.6849847", "0.68052...
0.0
-1
Build intent that displays the App settings screen.
@Override public void onClick(View view) { Intent intent = new Intent(); intent.setAction( Settings.ACTION_APPLICATION_DETAILS_SETTINGS); Uri uri = Uri.fromParts("package", BuildConfig.APPLICATION_ID, null); intent.setData(uri); intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); startActivity(intent); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@NonNull\n public static Intent getAppSettingsIntent() {\n Intent intent = new Intent();\n intent.setAction(Settings.ACTION_APPLICATION_DETAILS_SETTINGS);\n Uri uri = Uri.fromParts(\"package\", BuildConfig.APPLICATION_ID, null);\n intent.setData(uri);\n intent.setFlags(Intent....
[ "0.7738749", "0.7465045", "0.7465045", "0.7408445", "0.7408445", "0.7408445", "0.7408445", "0.73534065", "0.7351508", "0.7317926", "0.71501756", "0.71138996", "0.70963365", "0.7053092", "0.7053092", "0.7053092", "0.7053092", "0.7053092", "0.7053092", "0.6996939", "0.69910866"...
0.73430306
10
creating a client from builder
public static void main(String args[]) throws IOException{ final Client client = ClientBuilder.newClient(); final WebTarget product = client.target("http://localhost:8080/product-rs/webresources").path("/Product/Product/4/xml"); //post the message product.request("text/xml").post(Entity.xml(new Product())); System.err.println("Message Product Posted"); System.in.read(); Product p = product.request("text/xml").get(Product.class); System.err.println("Message Product Posted"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Client buildClient() {\n\t\tClient client = new Client();\n\t\tclient.setName(clientNameTextBox.getValue());\n\t\tclient.setAddress(clientAddressTextBox.getValue());\n\t\tclient.setTelephone(clientTelephoneTextBox.getValue());\n\t\treturn client;\n\t}", "Client createNewClient(Client client);", "privat...
[ "0.7631522", "0.6972662", "0.6890391", "0.68217134", "0.6732758", "0.6717528", "0.671357", "0.6655", "0.66353065", "0.6630362", "0.6622035", "0.658621", "0.6513506", "0.64689267", "0.64066076", "0.6388423", "0.6362571", "0.6336567", "0.6313505", "0.630832", "0.6304216", "0....
0.0
-1
Check whether goals are complete
public boolean isComplete() { for (GoalInterface g: goals) { if (type == GoalType.AND && !g.isComplete()) { return false; } else if (type == GoalType.OR && g.isComplete()) { return true; } } if (type == GoalType.AND) { return true; } else if (type == GoalType.OR) { return false; } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean isComplete()\n {\n return (getCount() >= getGoal());\n }", "boolean isComplete();", "boolean isComplete();", "boolean hasIsComplete();", "boolean hasIsComplete();", "protected boolean isFinished() {\n \t\n \tif(current_time >= goal) {\n \t\t\n \t\treturn true;\n ...
[ "0.7565639", "0.738259", "0.738259", "0.73190373", "0.73190373", "0.722045", "0.71825117", "0.7144451", "0.7045801", "0.7035769", "0.6965882", "0.69579613", "0.6848658", "0.68367004", "0.6832229", "0.6832038", "0.68175286", "0.68097806", "0.6804748", "0.67360795", "0.67269367...
0.7195666
6
show planet, add moon
@GetMapping("/planets/{id}") public String showPlanet(@PathVariable("id")Long id, Model model) { model.addAttribute("newMoon", new Moon()); // get a planet based on id Planet planet = pService.getPlanet(id); model.addAttribute("planet", planet); return "show.jsp"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void createPlanets()\n\t{\n\t\tdouble semimajorAxis;\n\t\tdouble eccentricityOfOrbit;\n\t\tdouble inclinationOnPlane;\n\t\tdouble perihelion;\n\t\tdouble longitudeOfAscendingNode;\n\t\tdouble meanLongitude;\n String unicode_icon;\n\t\t\n\t\tplanetList.clear();\n\t\t\n\t\t//*****************\n\t\t//c...
[ "0.65561295", "0.65198106", "0.64949", "0.61304474", "0.61014694", "0.6081983", "0.60175705", "0.6006151", "0.59938955", "0.59183204", "0.59068096", "0.588826", "0.58556896", "0.57877153", "0.5760451", "0.56831664", "0.56742966", "0.56091505", "0.5603953", "0.5586012", "0.557...
0.6977687
0
add a moon to a planet
@PostMapping("/planets/{id}/addMoon") public String addMoon(@Valid @ModelAttribute("moon")Moon newMoon, BindingResult result, RedirectAttributes rAttr, @PathVariable("id")Long id, Model model) { Planet planet = pService.getPlanet(id); if(result.hasErrors()) { model.addAttribute("planet", planet); return "show.jsp"; } else { // add the moon mService.addMoon(planet, newMoon); System.out.println(newMoon.getId()); rAttr.addFlashAttribute("success", "That's a space station"); return "redirect:/planets/" + id; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addPlanet(Planet p) {\n planet.add(p);\n }", "public void sunPlanetMoon()\n {\n removeAllObjects();\n addObject (new Body (50, 240.0, new Vector(270, 0.0), new Color(255, 216, 0)), 460, 270);\n addObject (new Body (20, 4.2, new Vector(90, 2.2), new Color(0, 124, 196)...
[ "0.70310915", "0.6927638", "0.6640359", "0.64809173", "0.6113932", "0.61052734", "0.60123044", "0.5913563", "0.5853308", "0.5772067", "0.5744638", "0.56089276", "0.560849", "0.55794424", "0.5546903", "0.5539324", "0.55374724", "0.55365014", "0.5497442", "0.54808307", "0.54663...
0.6162826
4
get a planet based on id
@PostMapping("/planets/{id}") public String updatePlanet(@Valid @ModelAttribute("planet")Planet planet, BindingResult result, @PathVariable("id")Long id, Model model) { if(result.hasErrors()) { model.addAttribute("planet", planet); return "edit.jsp"; } else { // update planet System.out.println(planet.getId()); pService.addPlanet(planet); return "redirect:/planets/" + id; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@GetMapping(\"/planets/{id}\")\n\tpublic String showPlanet(@PathVariable(\"id\")Long id, Model model) {\n\t\t\n\t\tmodel.addAttribute(\"newMoon\", new Moon());\n\t\t// get a planet based on id\n\t\tPlanet planet = pService.getPlanet(id);\n\t\tmodel.addAttribute(\"planet\", planet);\n\t\treturn \"show.jsp\";\n\t}",...
[ "0.71427715", "0.6835846", "0.6550764", "0.6455273", "0.6330879", "0.63056666", "0.6222542", "0.6173832", "0.61597717", "0.6154897", "0.61497414", "0.6140033", "0.6110576", "0.60995835", "0.6004603", "0.5998755", "0.5992562", "0.5949215", "0.59065044", "0.590353", "0.5895674"...
0.0
-1
/ This function divides a by greatest divisible power of b
private long maxDivide(long a, long b) { while (a % b == 0) { a = a / b; } return a; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static BigInteger divideAndRound(BigInteger a, BigInteger b) {\r\n BigInteger result = a.divide(b);\r\n //Case 1: Integer part of the quotient is positive, a%b*2>=b, then the float part of the quotient>=.5, therefore add 1 to quotient\r\n if(result.signum()>0 && a.mod(b).multiply(new B...
[ "0.7145682", "0.689019", "0.68142205", "0.67896116", "0.6764369", "0.67455935", "0.669452", "0.6670369", "0.6634835", "0.6622843", "0.66092104", "0.6607842", "0.65826434", "0.6574817", "0.6565644", "0.65476686", "0.654251", "0.65275097", "0.6501411", "0.6492484", "0.6487192",...
0.77230334
0
/ Function to check if a number is ugly or not
private long isUgly(long no) { no = maxDivide(no, 2); no = maxDivide(no, 3); no = maxDivide(no, 5); return (no == 1) ? 1 : 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean hasNumber();", "private static boolean validNumber(String thing) {\n\t\treturn validDouble(thing);\n\t}", "boolean hasNum();", "boolean hasNum();", "boolean hasNum();", "public boolean checkNumber() {\n\t\treturn true;\n\t}", "public static boolean isGood(int num){\r\n\t\tif ((num<0)||(num>6)){...
[ "0.69101095", "0.6786214", "0.6778155", "0.6778155", "0.6778155", "0.67738545", "0.67686397", "0.673326", "0.66869646", "0.6581339", "0.64381987", "0.6433784", "0.6300508", "0.62876844", "0.6265033", "0.6259468", "0.62462884", "0.6226382", "0.62189704", "0.62072283", "0.61919...
0.6461202
10
/ Function to get the nth ugly number
private long getNthUglyNo(long n) { long i = 1; // ugly number count long count = 1; while (n > count) { i++; if (isUgly(i) == 1) { count++; } } return i; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static int nthUglyNumber(int n) {\n if (n == 0) {\n return 1;\n }\n\n int[] dp = new int[n];\n dp[0] = 1;\n int index2 = 0, index3 = 0, index5 = 0;\n for (int i = 1; i < n; i++) {\n dp[i] = Math.min(2 * dp[index2], Math.min(3 * dp[index3], 5 *...
[ "0.7247656", "0.7143485", "0.71130717", "0.7067107", "0.69285786", "0.67396665", "0.67038065", "0.66939867", "0.6557786", "0.65480864", "0.64059746", "0.63924277", "0.6373186", "0.6372942", "0.6339125", "0.6265311", "0.62131625", "0.61878234", "0.61507094", "0.6140121", "0.60...
0.7352691
0
This is the test class which tests if the database implementation works right
@Test public void testGetGreeting() { Model model = new FileModelImplementation(); String greet = "HELLO WORLD!"; assertEquals(greet, model.getGreeting()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void shouldConnectToDB()\n {\n assertTrue(DatabaseHelper.checkConnection());\n }", "@Test\n\tpublic void testGetDbInstance(){\n\t\tConnection c = DatabaseConnect.getInstance();\n\t\tassertTrue(c != null);\t\n\t}", "public void testDbCommand() throws Exception{\n\t}", "@Test\n ...
[ "0.75985354", "0.74794954", "0.72864735", "0.72483075", "0.72246516", "0.71345603", "0.7125688", "0.7042617", "0.7027947", "0.69970936", "0.6994872", "0.6963327", "0.6950913", "0.6948853", "0.69307023", "0.69219506", "0.6906625", "0.69028944", "0.68580747", "0.6857209", "0.68...
0.0
-1
/ Takes in user input for whether or not to enable this master.
void user_in(boolean e) { this.init = true; this.enable = e; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean isMaster();", "public void setIsMaster(boolean isMaster) {\n this.isMaster = isMaster;\n }", "public boolean isMaster() {\n return this.isMaster;\n }", "void launchAsMaster();", "void setMasterMode(OrekitStepHandler handler);", "void registerMaster(ZeroconfRosMasterInfo...
[ "0.7135303", "0.68302655", "0.6620934", "0.62536556", "0.60099053", "0.5975662", "0.5961188", "0.5854194", "0.5748552", "0.57226515", "0.56325793", "0.5630225", "0.5625063", "0.5573335", "0.55382305", "0.5529764", "0.5487195", "0.54806", "0.54790443", "0.5476328", "0.54728425...
0.5060204
68
/ Constructor. Only takes in constant values.
Task(String n, int s, int c, boolean f, String m, int w) { master = m; weight = w; name = n; s_reqt = s; cmb_rec = c; fblock = f; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Constants() {\n }", "public Constant (int value){\r\n this.value = value;\r\n\r\n }", "private Const() {\n }", "private Constants() {\n }", "private Constants() {\n }", "private Constants() {\n\n }", "private Constants(){\n }", "Constructor() {\r\n\t\t \r\n\t }", ...
[ "0.7397", "0.7184975", "0.7176622", "0.70736283", "0.70736283", "0.6994586", "0.6971589", "0.69465536", "0.68780935", "0.6833098", "0.6779856", "0.67788327", "0.6763731", "0.67618376", "0.6738513", "0.66788495", "0.66584134", "0.6653414", "0.6636039", "0.66340214", "0.6631263...
0.0
-1
/ Takes in user input for possibility and preference.
void user_in(boolean po, int pr) { this.init = true; this.poss = po; this.pref = pr; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void printOption(){\r\n System.out.println(\"Select option what you want to do\");\r\n System.out.println(\"Input plain(default) / stylish / slide\");\r\n option = scan.nextLine();\r\n try{\r\n if(option.toLowerCase().equals(\"plain\")){\r\n }\r\n else if(option.toLowerCas...
[ "0.63516194", "0.6338499", "0.63262194", "0.6120784", "0.61136484", "0.61086774", "0.60310256", "0.5976261", "0.59678507", "0.5960752", "0.5953876", "0.5952975", "0.5943342", "0.59341", "0.5933728", "0.59014326", "0.58234686", "0.5816619", "0.57900053", "0.5789822", "0.578614...
0.54671705
82
Prepare intent which is triggered if the notification is selected
public void createNotification(View view) { Intent intent = new Intent(this, Status1.class); PendingIntent pIntent = PendingIntent.getActivity(this, 0, intent, 0); // Build notification // Actions are just fake Notification noti = new Notification.Builder(this) .setContentTitle("RKC App ") .setContentText("Click To Enter ").setSmallIcon(R.drawable.arc) .setContentIntent(pIntent) .addAction(R.drawable.ironman, "Back", pIntent) .addAction(R.drawable.gun, "More", pIntent) .build(); NotificationManager notificationManager = (NotificationManager) getSystemService(NOTIFICATION_SERVICE); // hide the notification after its selected noti.flags |= Notification.FLAG_AUTO_CANCEL; notificationManager.notify(0, noti); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public NotificationCompat.Builder getChannel1Notification(String message){\n\n Intent confirmIntent = new Intent(this, Alarm2Activity.class); //can create an activity here that simply says \"Take med\"\n confirmIntent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP);\n ...
[ "0.6627246", "0.65352845", "0.62471503", "0.6194007", "0.61186427", "0.61098236", "0.6103238", "0.60917985", "0.6064509", "0.6030037", "0.6030037", "0.59882826", "0.5985471", "0.59804225", "0.5974747", "0.5961424", "0.58801633", "0.5877771", "0.5856955", "0.58302253", "0.5828...
0.0
-1
Created by wchen on 3/09/2015.
public interface ISendMessage { void sendMessage(MessageOuterClass.Message message) throws Exception; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "private stendhal() {\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r...
[ "0.61467564", "0.6074052", "0.6061861", "0.60576516", "0.59773827", "0.59773827", "0.59360677", "0.5874373", "0.58708566", "0.58694535", "0.58603317", "0.585999", "0.5859408", "0.5859408", "0.5859408", "0.5859408", "0.5859408", "0.58437735", "0.58357084", "0.58337545", "0.583...
0.0
-1
private RubyId equals; RubyId will replaced by String next.
public RubyArray(Ruby ruby) { this(ruby, new ArrayList()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getId()\r\n/* 14: */ {\r\n/* 15:14 */ return this.id;\r\n/* 16: */ }", "public boolean equals(Object otherObject) {\n if (!(otherObject instanceof ID)) {\n return false;\n }\n return (this.UID.equals(otherObject.toString()));\n }", "public void testS...
[ "0.5949284", "0.59138316", "0.5830517", "0.58166313", "0.5795903", "0.5786381", "0.5781088", "0.57421666", "0.57139343", "0.5672289", "0.5647224", "0.56133926", "0.560795", "0.5605478", "0.5600248", "0.5592484", "0.55799806", "0.5571181", "0.55660164", "0.55660164", "0.556601...
0.0
-1
Getter for property list.
public ArrayList getList() { return list; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ArrayList<Property> getPropertyList()\r\n {\r\n return m_values;\r\n }", "public List<Integer> getListProperty() {\n\t\t\treturn null;\n\t\t}", "public Properties getProperties(Properties getList);", "public cto.framework.service.schema.Property[] getProperty() {\r\n cto.framework....
[ "0.7728871", "0.7464686", "0.73798764", "0.73754466", "0.73626196", "0.73548216", "0.7179856", "0.71679133", "0.708787", "0.6999583", "0.69870883", "0.69791925", "0.69696987", "0.6954842", "0.6928026", "0.69259053", "0.6850052", "0.6844339", "0.6827007", "0.6815736", "0.67190...
0.0
-1
Getter for property tmpLock.
public boolean isTmpLock() { return tmpLock; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "final public Lock test_get_lock() {\r\n\t\treturn lock_;\r\n\t}", "public Object getLock() {\n return dataLock;\n }", "public void setTmpLock(boolean tmpLock) {\n \t\tthis.tmpLock = tmpLock;\n \t}", "final Object getLockObject() {\n return timeManager;\n }", "public Lock getLock() {\n...
[ "0.68677247", "0.67367077", "0.66915464", "0.6631701", "0.65968466", "0.65040666", "0.6498231", "0.6257328", "0.62405527", "0.62325364", "0.615127", "0.6143671", "0.6143417", "0.6062843", "0.6049201", "0.6049201", "0.6049201", "0.5989141", "0.5973412", "0.59685004", "0.595931...
0.6885536
0
Setter for property tmpLock.
public void setTmpLock(boolean tmpLock) { this.tmpLock = tmpLock; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean isTmpLock() {\n \t\treturn tmpLock;\n \t}", "public void setLockFlag(Integer aLockFlag) {\n lockFlag = aLockFlag;\n }", "public void setLockFlag(Integer aLockFlag) {\n lockFlag = aLockFlag;\n }", "public void setLockFlag(Integer aLockFlag) {\n lockFlag = aLockFlag;\n...
[ "0.64586186", "0.5719128", "0.5719128", "0.5719128", "0.5711907", "0.56263477", "0.5614654", "0.5610485", "0.5598752", "0.558054", "0.5568363", "0.554182", "0.55166227", "0.5497095", "0.54940945", "0.5483981", "0.547665", "0.54550856", "0.54390925", "0.542159", "0.5411248", ...
0.8116418
0
/ if list's size is not at least 'toLength', add nil's until it is
private void autoExpand(long toLength) { list.ensureCapacity((int) toLength); for (int i = getLength(); i < toLength; i++) { list.add(getRuby().getNil()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public LinkedList filterLargerThan(int length) {\n LinkedList newLinkedList = new LinkedList();\n Node currNode = this.head;\n while(currNode.getNextNode() != null){\n if(currNode.getItem().length() <= length){\n newLinkedList.addNode(currNode.getItem());\n }\n currNode...
[ "0.64057285", "0.6192194", "0.5871035", "0.5654539", "0.5598277", "0.5540764", "0.5451127", "0.5440613", "0.54377913", "0.54016995", "0.5396675", "0.5343607", "0.52784675", "0.52469623", "0.52352786", "0.5212024", "0.5194719", "0.5188978", "0.5156442", "0.5143684", "0.5129916...
0.74800587
0
Methods of the Array Class (rb_ary_): rb_ary_new2
public static RubyArray newArray(Ruby ruby, long len) { return new RubyArray(ruby, new ArrayList((int) len)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Array createArray();", "private RubyArray(Ruby runtime, boolean objectSpace) {\n super(runtime, runtime.getArray(), objectSpace);\n }", "private RubyArray(Ruby runtime, long length) {\n super(runtime, runtime.getArray());\n checkLength(length);\n values = new IRubyObject[(in...
[ "0.7251483", "0.7148415", "0.7042217", "0.68930715", "0.6891933", "0.68485177", "0.67729133", "0.6767517", "0.67462265", "0.66325814", "0.65605396", "0.65232915", "0.651651", "0.6498409", "0.6491486", "0.6431623", "0.64079005", "0.63388914", "0.630075", "0.6283238", "0.621999...
0.65216166
12
encodes a String in base64 or its uuencode variant. appends the result of the encoding in a StringBuffer
private StringBuffer encodes( StringBuffer io2Append, String i2Encode, int iLength, char iType) { iLength = iLength < i2Encode.length() ? iLength : i2Encode.length(); io2Append.ensureCapacity( iLength * 4 / 3 + 6); int i = 0; char[] lTranslationTable = iType == 'u' ? uu_table : b64_table; char lPadding; char[] l2Encode = i2Encode.toCharArray(); if (iType == 'u') { if (iLength >= lTranslationTable.length) throw new ArgumentError(ruby, "" + iLength + " is not a correct value for the number of bytes per line in a u directive. Correct values range from 0 to " + lTranslationTable.length); io2Append.append(lTranslationTable[iLength]); lPadding = '`'; } else { lPadding = '='; } while (iLength >= 3) { char lCurChar = l2Encode[i++]; char lNextChar = l2Encode[i++]; char lNextNextChar = l2Encode[i++]; io2Append.append(lTranslationTable[077 & (lCurChar >>> 2)]); io2Append.append(lTranslationTable[077 & (((lCurChar << 4) & 060) | ((lNextChar >>> 4) & 017))]); io2Append.append(lTranslationTable[077 & (((lNextChar << 2) & 074) | ((lNextNextChar >>> 6) & 03))]); io2Append.append(lTranslationTable[077 & lNextNextChar]); iLength -= 3; } if (iLength == 2) { char lCurChar = l2Encode[i++]; char lNextChar = l2Encode[i++]; io2Append.append(lTranslationTable[077 & (lCurChar >>> 2)]); io2Append.append(lTranslationTable[077 & (((lCurChar << 4) & 060) | ((lNextChar >> 4) & 017))]); io2Append.append(lTranslationTable[077 & (((lNextChar << 2) & 074) | (('\0' >> 6) & 03))]); io2Append.append(lPadding); } else if (iLength == 1) { char lCurChar = l2Encode[i++]; io2Append.append(lTranslationTable[077 & (lCurChar >>> 2)]); io2Append.append(lTranslationTable[077 & (((lCurChar << 4) & 060) | (('\0' >>> 4) & 017))]); io2Append.append(lPadding); io2Append.append(lPadding); } io2Append.append('\n'); return io2Append; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static String encodeBase64(String stringToEncode){\r\n\t\treturn Base64.getEncoder().encodeToString(stringToEncode.getBytes());\t\r\n\t}", "public static String base64EncodeString(String input) throws Exception\n {\n return base64Encode(input.getBytes(\"UTF-8\"));\n }", "public static String base6...
[ "0.7734191", "0.7591607", "0.7481384", "0.7453484", "0.73066634", "0.72506833", "0.7200903", "0.7116869", "0.7001463", "0.6983717", "0.69651955", "0.696437", "0.6955416", "0.6857261", "0.6786565", "0.67772406", "0.6766819", "0.670649", "0.66419464", "0.6607413", "0.65736973",...
0.0
-1
encodes a String with the Quoted printable, MIME encoding (see RFC2045). appends the result of the encoding in a StringBuffer
private StringBuffer qpencode( StringBuffer io2Append, String i2Encode, int iLength) { io2Append.ensureCapacity( 1024); int lCurLineLength = 0; int lPrevChar = -1; char [] l2Encode = i2Encode.toCharArray(); try { for(int i = 0;;i++) { char lCurChar = l2Encode[i]; if ((lCurChar > 126) || (lCurChar < 32 && lCurChar != '\n' && lCurChar != '\t') || (lCurChar == '=')) { io2Append.append('='); io2Append.append(hex_table[lCurChar >> 4]); io2Append.append(hex_table[lCurChar & 0x0f]); lCurLineLength += 3; lPrevChar = -1; } else if (lCurChar == '\n') { if (lPrevChar == ' ' || lPrevChar == '\t') { io2Append.append('='); io2Append.append(lCurChar); } io2Append.append(lCurChar); lCurLineLength = 0; lPrevChar = lCurChar; } else { io2Append.append(lCurChar); lCurLineLength++; lPrevChar = lCurChar; } if (lCurLineLength > iLength) { io2Append.append('='); io2Append.append('\n'); lCurLineLength = 0; lPrevChar = '\n'; } } } catch (ArrayIndexOutOfBoundsException e) { //normal exit, this should be faster than a test at each iterations for string with more than //about 40 char } if (lCurLineLength > 0) { io2Append.append('='); io2Append.append('\n'); } return io2Append; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static String encode(String in){\n in = in.replace(\"&\", \"&amp;\");\n in = in.replace(\"\\\"\", \"&quot;\");\n in = in.replace(\"<\", \"&lt;\");\n in = in.replace(\">\", \"&gt;\");\n log.debug(\"encoded string: \" + in);\n // FIXME: Consider double-encoding & if i...
[ "0.6169829", "0.61543584", "0.61125183", "0.6103868", "0.60618424", "0.60616535", "0.605695", "0.6055874", "0.6039944", "0.5995769", "0.5933522", "0.59100294", "0.5871946", "0.5860567", "0.58194077", "0.579565", "0.5786415", "0.5783067", "0.57807505", "0.5773319", "0.5770656"...
0.5125318
94
pack_pack Template characters for Arraypack Directive Meaning Directive Meaning
public RubyString pack(RubyString iFmt) { char[] lFmt = iFmt.getValue().toCharArray(); int lFmtLength = lFmt.length; int idx = 0; int lLeftInArray = list.size(); StringBuffer lResult = new StringBuffer(); RubyObject lFrom; String lCurElemString; for(int i = 0; i < lFmtLength; ) { int lLength = 1; //first skip all spaces char lType = lFmt[i++]; if (Character.isWhitespace(lType)) continue; char lNext = i < lFmtLength ? lFmt[i] : 0; if(lNext == '!' || lNext == '_') { if (sNatStr.indexOf(lType) != -1) { lNext = ++i < lFmtLength ? lFmt[i]:0; } else throw new ArgumentError(ruby, "'" + lNext +"' allowed only after types " + sNatStr); } if (lNext == '*') { lLength = "@Xxu".indexOf(lType) == -1 ? lLeftInArray : 0; lNext = ++i < lFmtLength ? lFmt[i]:0; } else if (Character.isDigit(lNext)) { int lEndIndex = i; for (; lEndIndex < lFmtLength ; lEndIndex++) if (!Character.isDigit(lFmt[lEndIndex])) break; lLength = Integer.parseInt(new String(lFmt, i, lEndIndex-i)); //an exception may occur here if an int can't hold this but ... i = lEndIndex; lNext = i < lFmtLength ? lFmt[i] : 0; } //no else, the original value of length is correct switch(lType) { case '%': throw new ArgumentError(ruby, "% is not supported"); case 'A': case 'a': case 'Z': case 'B': case 'b': case 'H': case 'h': if (lLeftInArray-- > 0) lFrom = (RubyObject)list.get(idx++); else throw new ArgumentError(ruby, sTooFew); if(lFrom == ruby.getNil()) lCurElemString = ""; else lCurElemString = convert2String(lFrom); if (lFmt[i-1] == '*') lLength = lCurElemString.length(); switch(lType) { case 'a': case 'A': case 'Z': if ( lCurElemString.length() >= lLength) lResult.append(lCurElemString.toCharArray(), 0, lLength); else //need padding { //I'm fairly sure there is a library call to create a //string filled with a given char with a given length but I couldn't find it lResult.append(lCurElemString); lLength -= lCurElemString.length(); grow(lResult, (lType == 'a')?sNil10:sSp10 , lLength); } break; //I believe there is a bug in the b and B case we skip a char too easily case 'b': { int lByte = 0; int lIndex = 0; char lCurChar; int lPadLength = 0; if (lLength > lCurElemString.length()) { //I don't understand this, why divide by 2 lPadLength = (lLength - lCurElemString.length()+1)/2; lLength = lCurElemString.length(); } for(lIndex = 0; lIndex < lLength; ) { lCurChar = lCurElemString.charAt(lIndex++); if ((lCurChar & 1) != 0) //if the low bit of the current char is set lByte |= 128; //set the high bit of the result if ((lIndex & 7) != 0) //if the index is not a multiple of 8, we are not on a byte boundary lByte >>= 1; //shift the byte else { //we are done with one byte, append it to the result and go for the next lResult.append((char)(lByte & 0xff)); lByte = 0; } } if ((lLength & 7) != 0) //if the length is not a multiple of 8 { //we need to pad the last byte lByte >>=7 - (lLength & 7); lResult.append((char)(lByte & 0xff)); } //do some padding, I don't understand the padding strategy lLength = lResult.length(); lResult.setLength(lLength+lPadLength); } break; case 'B': { int lByte = 0; int lIndex = 0; char lCurChar; int lPadLength = 0; if (lLength > lCurElemString.length()) { //I don't understand this, why divide by 2 lPadLength = (lLength - lCurElemString.length()+1)/2; lLength = lCurElemString.length(); } for(lIndex = 0; lIndex < lLength; ) { lCurChar = lCurElemString.charAt(lIndex++); lByte |= lCurChar & 1; if ((lIndex & 7) != 0) //if the index is not a multiple of 8, we are not on a byte boundary lByte <<= 1; //shift the byte else { //we are done with one byte, append it to the result and go for the next lResult.append((char)(lByte & 0xff)); lByte = 0; } } if ((lLength & 7) != 0) //if the length is not a multiple of 8 { //we need to pad the last byte lByte <<=7 - (lLength & 7); lResult.append((char)(lByte & 0xff)); } //do some padding, I don't understand the padding strategy lLength = lResult.length(); lResult.setLength(lLength+lPadLength); } break; case 'h': { int lByte = 0; int lIndex = 0; char lCurChar; int lPadLength = 0; if (lLength > lCurElemString.length()) { //I don't undestand this why divide by 2 lPadLength = (lLength - lCurElemString.length()+1)/2; lLength = lCurElemString.length(); } for(lIndex = 0; lIndex < lLength; ) { lCurChar = lCurElemString.charAt(lIndex++); if (Character.isJavaIdentifierStart(lCurChar)) //this test may be too lax but it is the same as in MRI lByte |= (((lCurChar & 15) + 9) & 15) << 4; else lByte |= (lCurChar & 15) << 4; if ((lIndex & 1) != 0) lByte >>= 4; else { lResult.append((char)(lByte & 0xff)); lByte = 0; } } if ((lLength & 1) != 0) { lResult.append((char)(lByte & 0xff)); } //do some padding, I don't understand the padding strategy lLength = lResult.length(); lResult.setLength(lLength+lPadLength); } break; case 'H': { int lByte = 0; int lIndex = 0; char lCurChar; int lPadLength = 0; if (lLength > lCurElemString.length()) { //I don't undestand this why divide by 2 lPadLength = (lLength - lCurElemString.length()+1)/2; lLength = lCurElemString.length(); } for(lIndex = 0; lIndex < lLength;) { lCurChar = lCurElemString.charAt(lIndex++); if (Character.isJavaIdentifierStart(lCurChar)) //this test may be too lax but it is the same as in MRI lByte |= ((lCurChar & 15) + 9) & 15; else lByte |= (lCurChar & 15); if ((lIndex & 1) != 0) lByte <<= 4; else { lResult.append((char)(lByte & 0xff)); lByte = 0; } } if ((lLength & 1) != 0) { lResult.append((char)(lByte & 0xff)); } //do some padding, I don't understand the padding strategy lLength = lResult.length(); lResult.setLength(lLength+lPadLength); } break; } break; case 'x': grow(lResult, sNil10, lLength); break; case 'X': shrink(lResult, lLength); break; case '@': lLength -= lResult.length(); if (lLength > 0) grow(lResult, sNil10, lLength); lLength = -lLength; if (lLength > 0) shrink(lResult, lLength); break; case 'c': case 'C': while (lLength-- > 0) { char c; if (lLeftInArray-- > 0) lFrom = (RubyObject)list.get(idx++); else throw new ArgumentError(ruby, sTooFew); if (lFrom == ruby.getNil()) c = 0; else { c = (char)(RubyNumeric.num2long(lFrom) & 0xff); } lResult.append(c); } break; case 'u': case 'm': if (lLeftInArray-- > 0) lFrom = (RubyObject)list.get(idx++); else throw new ArgumentError(ruby, sTooFew); if(lFrom == ruby.getNil()) lCurElemString = ""; else lCurElemString = convert2String(lFrom); if (lLength <= 2) lLength = 45; else lLength = lLength / 3 * 3; for (;;) { int lTodo; encodes(lResult, lCurElemString, lLength, lType); if (lLength < lCurElemString.length()) lCurElemString = lCurElemString.substring(lLength); else break; } break; case 'M': if (lLeftInArray-- > 0) lFrom = (RubyObject)list.get(idx++); else throw new ArgumentError(ruby, sTooFew); if(lFrom == ruby.getNil()) lCurElemString = ""; else lCurElemString = convert2String(lFrom); if (lLength <= 1) lLength = 72; qpencode(lResult, lCurElemString, lLength); break; case 'U': char[] c = new char[lLength]; for(int lCurCharIdx = 0;lLength-- > 0; lCurCharIdx++) { long l; if (lLeftInArray-- > 0) lFrom = (RubyObject)list.get(idx++); else throw new ArgumentError(ruby, sTooFew); if (lFrom == ruby.getNil()) l = 0; else { l = RubyNumeric.num2long(lFrom); } c[lCurCharIdx] = (char)l; } String s = new String(c); try { lResult.append(RubyString.bytesToString(s.getBytes("UTF-8"))); } catch (java.io.UnsupportedEncodingException e) { throw new RubyBugException( "can't convert to UTF8"); } break; } } return RubyString.newString(ruby, lResult.toString()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic String pack() {\n\t\treturn \"Bpxx packingg somjkjhha\";\n\t}", "String[][] packData();", "@Override\n void pack() {\n }", "public void doPack() {\n }", "public void doPack() {\n }", "public void doPack() {\n }", "public void doPack() {\n }", "public void doPack(...
[ "0.586943", "0.5693491", "0.55870014", "0.55074906", "0.55074906", "0.55074906", "0.55074906", "0.55074906", "0.55074906", "0.53611207", "0.5239094", "0.5225836", "0.5225836", "0.51685447", "0.5150961", "0.5108147", "0.50876105", "0.50687385", "0.500217", "0.493941", "0.48990...
0.51524556
14
shrinks a stringbuffer. shrinks a stringbuffer by a number of characters.
private final StringBuffer shrink(StringBuffer i2Shrink, int iLength) { iLength = i2Shrink.length() - iLength; if (iLength < 0) throw new ArgumentError(ruby, "X outside of string" ); i2Shrink.setLength(iLength); return i2Shrink; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void clearAndResizeSbIfNeeded(StringBuilder sb0) {\n final int limit = 512;\n final int reducedSize = 64;\n\n if (sb0.capacity() > limit) {\n sb0.setLength(reducedSize);\n }\n\n sb0.delete(0, sb0.length());\n }", "private static char[] growBuffer(ch...
[ "0.6325935", "0.58377224", "0.5757932", "0.54915994", "0.5459331", "0.5416763", "0.53931695", "0.53873897", "0.5341613", "0.5294523", "0.5289197", "0.5176664", "0.5122775", "0.50949585", "0.5093577", "0.5087781", "0.5041253", "0.50149167", "0.5012334", "0.49624595", "0.493169...
0.6780265
0
grows a stringbuffer. uses the Strings to pad the buffer for a certain length
private final StringBuffer grow(StringBuffer i2Grow, String iPads, int iLength) { int lPadLength = iPads.length(); while(iLength >= lPadLength) { i2Grow.append(iPads); iLength -= lPadLength; } i2Grow.append(iPads.substring(0, iLength)); return i2Grow; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static String fillStr(String str, int len) throws IllegalArgumentException\n {\n // String buffer containing the leading zeros.\n StringBuffer leaders;\n\n // The requested length must be greater or equal to the\n // string length.\n if (len <= str.length()) {\n ...
[ "0.61975884", "0.61461735", "0.6021929", "0.60181886", "0.5871683", "0.58504367", "0.58428156", "0.58239263", "0.5801213", "0.5798729", "0.57918674", "0.5761663", "0.572815", "0.5727735", "0.57069916", "0.5679419", "0.5601913", "0.55880684", "0.5586619", "0.55743885", "0.5566...
0.6361433
0
TODO Autogenerated method stub
@Override public int describeContents() { return 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
TODO Autogenerated method stub
@Override public void writeToParcel(Parcel dest, int flags) { dest.writeLong(this.Guid); dest.writeDouble(this.Latitude); dest.writeDouble(this.Longitude); dest.writeDouble(this.Altitude); dest.writeDouble(this.Accuracy); dest.writeString(this.getCreateTimeStr()); dest.writeFloat(this.Speed); dest.writeFloat(this.Bearing); dest.writeString(this.Province); dest.writeString(this.City); dest.writeString(this.District); dest.writeString(this.Street); dest.writeString(this.StreetNum); dest.writeString(this.Address); }
{ "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
setter / getter methods
public List<OSSGroup> getGroups() { return groups; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected abstract Set method_1559();", "String setValue();", "@Override\r\n\tpublic void get() {\n\t\t\r\n\t}", "@Override\n public void get() {}", "public String setter() {\n\t\treturn prefix(\"set\");\n\t}", "public void get() {\n }", "public void setdat()\n {\n }", "public T get() {\n ...
[ "0.69448197", "0.68872625", "0.65606815", "0.6473444", "0.64172864", "0.63961643", "0.63727564", "0.6339842", "0.6287036", "0.6287036", "0.625578", "0.624935", "0.6227909", "0.6211399", "0.6200249", "0.6169744", "0.6141948", "0.6128627", "0.61268693", "0.6124412", "0.61204976...
0.0
-1
/ AlbumTrackRetrieve.getInstance().setAlbumName(album.getTitle().toString()); AlbumTrackRetrieve.getInstance().setAlbumArt(album.getAlbumImageUrl().toString()); AlbumTrackRetrieve.getInstance().setAlbumID(album.getId());
@Override public boolean onLongClick(View v) { Toast.makeText(context.getApplicationContext(), album.getTitle().toString(), Toast.LENGTH_SHORT).show(); Intent intent = new Intent(context, MainActivity.class); intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); context.startActivity(intent); return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getAlbum()\n {\n return album;\n }", "String getAlbumName()\n {\n return albumName;\n }", "private void SaveAlbum() {\n }", "public String getAlbumName()\n {\n return albumName;\n }", "public String getAlbumTitle()\r\n {\r\n return mAlbumTit...
[ "0.68133855", "0.6737527", "0.6603254", "0.643998", "0.64118755", "0.63581616", "0.62587655", "0.6211139", "0.62111235", "0.6192456", "0.61459506", "0.6127033", "0.610218", "0.60753214", "0.6058644", "0.6033847", "0.5994258", "0.59621334", "0.5960125", "0.5850765", "0.582646"...
0.0
-1
Constructor for objects of class Regras.
public Regras() { // Create a new world with 600x400 cells with a cell size of 1x1 pixels. super(1100, 457, 1); prepare(); if(MenuPrincipal.mundo == 1) //se o mundo anterior tiver sido MenuPrincipal som1 = MenuPrincipal.som2; //a música ficar com a mesma opção do mundo Menu Principal (a tocar ou sem som)} else if(MenuPrincipal.mundo == 3) //se o mundo anterior tiver sido MundoJogo som1 = MundoJogo.som3; //a música ficar com a mesma opção do mundo MundoJogo (a tocar ou sem som) imgsom2 = MenuPrincipal.imgsom1; //atualiza a imagem da coluna para ser igual à do mundo MenuPrincipal (mute/unmute) MenuPrincipal.mundo = 2; //atualizar 'mundo' para indicar que o mundo atual é o mundo Regras }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public RngObject() {\n\t\t\n\t}", "public Recursos() {\n }", "public Carrera(){\n }", "public Corrida(){\n\n }", "public DetArqueoRunt () {\r\n\r\n }", "public Corso() {\n\n }", "public Respuesta() {\n }", "public Regla2(){ /*ESTE ES EL CONSTRUCTOR POR DEFECTO */\r\n\r\n /* TODAS LAS...
[ "0.7530853", "0.7387348", "0.700266", "0.6963039", "0.69164634", "0.67613053", "0.6756664", "0.65801376", "0.6571636", "0.6568034", "0.6564922", "0.65408766", "0.6483218", "0.6481669", "0.647589", "0.6448457", "0.64373136", "0.6402018", "0.6387121", "0.6373537", "0.6361834", ...
0.68302757
5
Prepare the world for the start of the program. That is: create the initial objects and add them to the world.
private void prepare() { addObject(new TempoLimite(), 432, 207); addObject(new NumeroVidas(), 395, 278); Cliqueparajogar clique = new Cliqueparajogar(); addObject(clique, getWidth()/2, getHeight()/2); Som som = new Som(); addObject(som, getWidth() - 37, getHeight()-57); umMin ummin = new umMin(); addObject(ummin,630,206); doisMin doismin = new doisMin(); addObject(doismin,670,206); tresMin tresmin = new tresMin(); addObject(tresmin,710,206); quatroMin quatromin = new quatroMin(); addObject(quatromin,750,206); cincoMin cincomin = new cincoMin(); addObject(cincomin,790,206); umaVida umavida = new umaVida(); addObject(umavida,630,280); duasVidas duasvidas = new duasVidas(); addObject(duasvidas,670,280); tresVidas tresvidas = new tresVidas(); addObject(tresvidas,710,280); quatroVidas quatrovidas = new quatroVidas(); addObject(quatrovidas,750,280); cincoVidas cincovidas = new cincoVidas(); addObject(cincovidas,790,280); voltaratras voltar = new voltaratras(); addObject(voltar, getWidth() -37, 428); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void init() {\n\t\tworld = new World(gsm);\n\t\tworld.init();\n\t\t\n\t\tif(worldName == null){\n\t\t\tworldName = \"null\";\n\t\t\tmap_name = \"map\";\n\t\t} \n\t\tworld.generate(map_name);\n\t}", "public void initializeObliqueLaunch(){\r\n world = new Environment();\r\n cannon = ...
[ "0.70166904", "0.6886849", "0.6831166", "0.68099654", "0.6774148", "0.67214614", "0.67184246", "0.6662825", "0.6621931", "0.66100943", "0.6608217", "0.65762854", "0.65709317", "0.6520571", "0.6500255", "0.64631975", "0.6449074", "0.6428097", "0.64019275", "0.6389498", "0.6373...
0.0
-1
Add an annotation when the var/val declaration's type is implicit and inferred by the SARL compiler.
@SuppressWarnings({ "checkstyle:npathcomplexity" }) private <T extends EObject> void createImplicitVarValType(XtextResource resource, IAcceptor<? super ICodeMining> acceptor, Class<T> elementType, Function1<T, JvmTypeReference> getDeclaredTypeLambda, Function1<T, String> getInferredTypeLambda, Function1<T, XExpression> getExprLambda, Function0<Assignment> getAssignmentLambda) { final List<T> elements = EcoreUtil2.eAllOfType(resource.getContents().get(0), elementType); for (final T element : elements) { // inline annotation only for fields with no type final JvmTypeReference declaredType = getDeclaredTypeLambda.apply(element); final XExpression expr = getExprLambda != null ? getExprLambda.apply(element) : null; if (declaredType != null || (getExprLambda != null && expr == null)) { continue; } // get inferred type name from JVM element final String inferredType = getInferredTypeLambda.apply(element); if (Strings.isEmpty(inferredType)) { continue; } // find document offset for inline annotation final ICompositeNode node = NodeModelUtils.findActualNodeFor(element); final Assignment elementAssignment = getAssignmentLambda.apply(); assert elementAssignment != null; for (Iterator<INode> it = node.getAsTreeIterable().iterator(); it.hasNext();) { final INode child = it.next(); if (child != node) { final EObject grammarElement = child.getGrammarElement(); if (grammarElement instanceof RuleCall) { if (elementAssignment.equals(grammarElement.eContainer())) { final String text = this.keywords.getColonKeyword() + " " + inferredType + " "; //$NON-NLS-1$ //$NON-NLS-2$ final int offset = child.getPreviousSibling().getTotalOffset(); acceptor.accept(createNewLineContentCodeMining(offset, text)); break; } } } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void createImplicitVariableType(XtextResource resource, IAcceptor<? super ICodeMining> acceptor) {\n\t\tcreateImplicitVarValType(resource, acceptor, XtendVariableDeclaration.class,\n\t\t\tit -> it.getType(),\n\t\t\tit -> {\n\t\t\t\tLightweightTypeReference type = getLightweightType(it.getRight());\n\t\t\t\...
[ "0.5920914", "0.55864257", "0.5378528", "0.5359404", "0.5216197", "0.5096112", "0.50149214", "0.49964228", "0.49504519", "0.4935541", "0.49081543", "0.49007276", "0.4868891", "0.48673424", "0.48654562", "0.48554823", "0.48546144", "0.48542514", "0.4849557", "0.48202544", "0.4...
0.5857963
1
Replies the resolved types associated to the given object.
protected IResolvedTypes getResolvedTypes(EObject obj) { return this.typeResolver.resolveTypes(obj); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "<T> Map<String, T> resolveAll(Class<T> type);", "private void assertIsType(SymObject object) {\n assertIsOfKind(object, SymObject.KIND_TYPE,\n object.name + \" can't be resolved to a type\");\n }", "public Object resolveObject(Object obj) throws IOException;", "void resolveTypes(Symb...
[ "0.5685089", "0.5626526", "0.5296382", "0.5241729", "0.51957947", "0.515776", "0.5136826", "0.5081568", "0.5068286", "0.50229865", "0.50146353", "0.4993779", "0.49490076", "0.49334934", "0.49324405", "0.49060008", "0.48986262", "0.4896195", "0.48863474", "0.48351106", "0.4831...
0.79366946
0
Replies the inferred type for the given expression.
protected LightweightTypeReference getLightweightType(XExpression expr) { final IResolvedTypes resolvedTypes = getResolvedTypes(expr); final LightweightTypeReference expressionType = resolvedTypes.getActualType(expr); if (expr instanceof AnonymousClass) { final List<LightweightTypeReference> superTypes = expressionType.getSuperTypes(); if (superTypes.size() == 1) { return superTypes.get(0); } } return expressionType; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Expression getType();", "public Type getExpressionType();", "protected LightweightTypeReference getTypeForVariableDeclaration(XExpression expr) {\n\t\tfinal IResolvedTypes resolvedTypes = getResolvedTypes(expr);\n\t\tLightweightTypeReference actualType = resolvedTypes.getActualType(expr);\n\t\tif (actua...
[ "0.6650866", "0.6646819", "0.6115478", "0.5837612", "0.5597247", "0.5456089", "0.52601695", "0.5225917", "0.51760834", "0.5123184", "0.5103142", "0.5055334", "0.5019749", "0.49670812", "0.49286136", "0.48367852", "0.48272526", "0.4807695", "0.48015064", "0.47840416", "0.47799...
0.6186305
2
Replies the type for a variable declaration that is initialized with the given expression.
protected LightweightTypeReference getTypeForVariableDeclaration(XExpression expr) { final IResolvedTypes resolvedTypes = getResolvedTypes(expr); LightweightTypeReference actualType = resolvedTypes.getActualType(expr); if (actualType.isPrimitiveVoid()) { LightweightTypeReference expectedType = resolvedTypes.getExpectedType(expr); if (expectedType == null) { expectedType = resolvedTypes.getExpectedReturnType(expr); if (expectedType == null) { expectedType = resolvedTypes.getReturnType(expr); } } if (expectedType != null && !expectedType.isPrimitiveVoid()) { actualType = expectedType; } } return actualType; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void createImplicitVariableType(XtextResource resource, IAcceptor<? super ICodeMining> acceptor) {\n\t\tcreateImplicitVarValType(resource, acceptor, XtendVariableDeclaration.class,\n\t\t\tit -> it.getType(),\n\t\t\tit -> {\n\t\t\t\tLightweightTypeReference type = getLightweightType(it.getRight());\n\t\t\t\...
[ "0.6483848", "0.6346041", "0.63167506", "0.62840897", "0.6256522", "0.6072187", "0.6071742", "0.5997025", "0.5813108", "0.57795817", "0.57184994", "0.56658894", "0.5655373", "0.5648561", "0.5609012", "0.55998325", "0.55664307", "0.5558547", "0.55494386", "0.5539961", "0.55184...
0.640381
1
Add an annotation when the variable's type is implicit and inferred by the SARL compiler.
private void createImplicitVariableType(XtextResource resource, IAcceptor<? super ICodeMining> acceptor) { createImplicitVarValType(resource, acceptor, XtendVariableDeclaration.class, it -> it.getType(), it -> { LightweightTypeReference type = getLightweightType(it.getRight()); if (type.isAny()) { type = getTypeForVariableDeclaration(it.getRight()); } return type.getSimpleName(); }, it -> it.getRight(), () -> this.grammar.getXVariableDeclarationAccess().getRightAssignment_3_1()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@SuppressWarnings({ \"checkstyle:npathcomplexity\" })\n\tprivate <T extends EObject> void createImplicitVarValType(XtextResource resource, IAcceptor<? super ICodeMining> acceptor,\n\t\t\tClass<T> elementType,\n\t\t\tFunction1<T, JvmTypeReference> getDeclaredTypeLambda,\n\t\t\tFunction1<T, String> getInferredTypeLa...
[ "0.57278514", "0.5465309", "0.5412092", "0.53509223", "0.51466", "0.5142744", "0.51393294", "0.5083724", "0.50747645", "0.5058752", "0.5058752", "0.5052949", "0.50499827", "0.5041921", "0.4999152", "0.49761426", "0.49704346", "0.48951882", "0.48838067", "0.48601276", "0.48447...
0.5688361
1
Add an annotation when the field's type is implicit and inferred by the SARL compiler.
private void createImplicitFieldType(XtextResource resource, IAcceptor<? super ICodeMining> acceptor) { createImplicitVarValType(resource, acceptor, XtendField.class, it -> it.getType(), it -> { final JvmField inferredField = (JvmField) this.jvmModelAssocitions.getPrimaryJvmElement(it); if (inferredField == null || inferredField.getType() == null || inferredField.getType().eIsProxy()) { return null; } return inferredField.getType().getSimpleName(); }, null, () -> this.grammar.getAOPMemberAccess().getInitialValueAssignment_2_3_3_1()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean usesTypeAnnotations() {\n return true;\n }", "@PropertySetter(role = ANNOTATION)\n\t<E extends CtElement> E addAnnotation(CtAnnotation<? extends Annotation> annotation);", "public Framework_annotation<T> build_annotation();", "InstrumentedType withField(FieldDescription.Token token);...
[ "0.5999502", "0.5524654", "0.5469415", "0.54414016", "0.5369042", "0.5368594", "0.52789354", "0.5277351", "0.52771866", "0.52451473", "0.5217505", "0.5217505", "0.5205771", "0.5195253", "0.5167251", "0.516404", "0.5112338", "0.5112338", "0.50853807", "0.50628215", "0.505721",...
0.569769
1
Add an annotation when the action's return type is implicit and inferred by the SARL compiler.
@SuppressWarnings("checkstyle:npathcomplexity") private void createImplicitActionReturnType(XtextResource resource, IAcceptor<? super ICodeMining> acceptor) { final List<XtendFunction> actions = EcoreUtil2.eAllOfType(resource.getContents().get(0), XtendFunction.class); for (final XtendFunction action : actions) { // inline annotation only for methods with no return type if (action.getReturnType() != null) { continue; } // get return type name from operation final JvmOperation inferredOperation = (JvmOperation) this.jvmModelAssocitions.getPrimaryJvmElement(action); if (inferredOperation == null || inferredOperation.getReturnType() == null) { continue; } // find document offset for inline annotationn final ICompositeNode node = NodeModelUtils.findActualNodeFor(action); final Keyword parenthesis = this.grammar.getAOPMemberAccess().getRightParenthesisKeyword_2_5_6_2(); final Assignment fctname = this.grammar.getAOPMemberAccess().getNameAssignment_2_5_5(); int offsetFctname = -1; int offsetParenthesis = -1; for (Iterator<INode> it = node.getAsTreeIterable().iterator(); it.hasNext();) { final INode child = it.next(); if (child != node) { final EObject grammarElement = child.getGrammarElement(); if (grammarElement instanceof RuleCall) { if (fctname.equals(grammarElement.eContainer())) { offsetFctname = child.getTotalEndOffset(); } } else if (parenthesis.equals(grammarElement)) { offsetParenthesis = child.getTotalEndOffset(); break; } } } int offset = -1; if (offsetParenthesis >= 0) { offset = offsetParenthesis; } else if (offsetFctname >= 0) { offset = offsetFctname; } if (offset >= 0) { final String returnType = inferredOperation.getReturnType().getSimpleName(); final String text = " " + this.keywords.getColonKeyword() + " " + returnType; //$NON-NLS-1$ //$NON-NLS-2$ acceptor.accept(createNewLineContentCodeMining(offset, text)); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected abstract void runReturnAnnotationHandler();", "@MyAnnotation(\"abc\")\r\n\t@Override\r\n\tpublic String perform(String arg1) {\n\t\treturn \"hello \";\r\n\t}", "public abstract boolean mo30680a(Annotation annotation);", "@Override\n protected void runReturnAnnotationHandler() {\n ...
[ "0.56226796", "0.53782135", "0.5341567", "0.5324676", "0.52624935", "0.52089256", "0.50773096", "0.50678945", "0.501434", "0.49882916", "0.49882916", "0.49616176", "0.49410218", "0.49243063", "0.4912565", "0.48828366", "0.48802254", "0.48413676", "0.4839", "0.48290643", "0.48...
0.6873436
0
Creates new form SearchEntry
public SearchEntry() { initComponents(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract Search create(String search, SearchBuilder builder);", "TSearchResults createSearchResults(TSearchQuery searchQuery);", "private DynamicForm createSearchBox() {\r\n\t\tfinal DynamicForm filterForm = new DynamicForm();\r\n\t\tfilterForm.setNumCols(4);\r\n\t\tfilterForm.setAlign(Alignment.LEFT);\...
[ "0.6451096", "0.6298488", "0.62856793", "0.60083973", "0.5972598", "0.59255546", "0.59187746", "0.5874867", "0.574097", "0.56413543", "0.5597198", "0.5566686", "0.55376333", "0.5513531", "0.54952747", "0.5449535", "0.5448341", "0.54453415", "0.544481", "0.5439414", "0.5385738...
0.6746612
0
This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always regenerated by the Form Editor.
@SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { entryPanel = new javax.swing.JPanel(); categoryLabel = new javax.swing.JLabel(); addressLabel = new javax.swing.JLabel(); phone1Label = new javax.swing.JLabel(); commentLabel = new javax.swing.JLabel(); categoryField = new javax.swing.JTextField(); addressField = new javax.swing.JTextField(); phone1Field = new javax.swing.JTextField(); commentField = new javax.swing.JTextField(); cityLabel = new javax.swing.JLabel(); phone2Label = new javax.swing.JLabel(); phone2Field = new javax.swing.JTextField(); cityField = new javax.swing.JTextField(); nameField = new javax.swing.JTextField(); nameLabel = new javax.swing.JLabel(); stateLabel = new javax.swing.JLabel(); faxNumberLabel = new javax.swing.JLabel(); faxNumberField = new javax.swing.JTextField(); stateField = new javax.swing.JTextField(); zipLabel = new javax.swing.JLabel(); zipField = new javax.swing.JTextField(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); categoryLabel.setText("Category:"); addressLabel.setText("Address:"); phone1Label.setText("Phone 1:"); commentLabel.setText("Comment:"); categoryField.setText("jTextField1"); addressField.setText("jTextField1"); phone1Field.setText("jTextField1"); commentField.setText("jTextField1"); cityLabel.setText("City:"); phone2Label.setText("Phone 2:"); phone2Field.setText("jTextField1"); cityField.setText("jTextField1"); nameField.setText("jTextField1"); nameField.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { nameFieldActionPerformed(evt); } }); nameLabel.setText("Name:"); stateLabel.setText("State:"); faxNumberLabel.setText("FaxNumber:"); faxNumberField.setText("jTextField1"); stateField.setText("jTextField1"); zipLabel.setText("Zip:"); zipField.setText("jTextField1"); javax.swing.GroupLayout entryPanelLayout = new javax.swing.GroupLayout(entryPanel); entryPanel.setLayout(entryPanelLayout); entryPanelLayout.setHorizontalGroup( entryPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(entryPanelLayout.createSequentialGroup() .addContainerGap() .addGroup(entryPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addGroup(entryPanelLayout.createSequentialGroup() .addComponent(categoryLabel) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(categoryField, javax.swing.GroupLayout.PREFERRED_SIZE, 160, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(entryPanelLayout.createSequentialGroup() .addComponent(addressLabel) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(addressField)) .addGroup(entryPanelLayout.createSequentialGroup() .addComponent(phone1Label) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(phone1Field)) .addGroup(entryPanelLayout.createSequentialGroup() .addComponent(commentLabel) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(commentField))) .addGap(30, 30, 30) .addGroup(entryPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(phone2Label) .addComponent(cityLabel) .addComponent(nameLabel)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(entryPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(entryPanelLayout.createSequentialGroup() .addGroup(entryPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(cityField, javax.swing.GroupLayout.DEFAULT_SIZE, 120, Short.MAX_VALUE) .addComponent(phone2Field)) .addGap(30, 30, 30) .addGroup(entryPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(faxNumberLabel) .addComponent(stateLabel)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(entryPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(faxNumberField, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE) .addGroup(entryPanelLayout.createSequentialGroup() .addComponent(stateField, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(63, 63, 63) .addComponent(zipLabel) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(zipField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))) .addComponent(nameField, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE)) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); entryPanelLayout.setVerticalGroup( entryPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(entryPanelLayout.createSequentialGroup() .addContainerGap() .addGroup(entryPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(categoryLabel) .addComponent(categoryField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(nameField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(nameLabel)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(entryPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(addressLabel) .addComponent(addressField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(cityLabel) .addComponent(cityField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(stateLabel) .addComponent(stateField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(zipLabel) .addComponent(zipField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(entryPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(phone1Label) .addComponent(phone1Field, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(phone2Label) .addComponent(phone2Field, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(faxNumberLabel) .addComponent(faxNumberField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(entryPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(commentLabel) .addComponent(commentField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addContainerGap()) ); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(entryPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(entryPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) ); pack(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Form() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public frmRectangulo() {\n initComponents();\n }", "public form() {\n ...
[ "0.73191524", "0.7290383", "0.7290383", "0.7290383", "0.7286656", "0.72480965", "0.72141695", "0.72080517", "0.7195647", "0.7190378", "0.71841127", "0.71591616", "0.71478844", "0.7093131", "0.70816", "0.70577854", "0.6987355", "0.69769996", "0.69551086", "0.69545007", "0.6945...
0.0
-1
Returns the name of the user that created the gallery
public String getUserName() { return userName; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getName() {\n return user.getName();\n }", "public static String getUserDisplayName() {\r\n return getUsername();\r\n }", "public String getName() {\r\n\t\treturn username;\r\n\t}", "public String getName(){\n return username;\n\t}", "public String getName() {\n ...
[ "0.69727266", "0.66547406", "0.65593785", "0.65177363", "0.6474576", "0.6444612", "0.64406574", "0.6411749", "0.6407018", "0.6380066", "0.63646793", "0.6326146", "0.6320983", "0.6309741", "0.6277817", "0.6230761", "0.6230761", "0.6225157", "0.6225157", "0.6225157", "0.622157"...
0.0
-1
Returns a link to the URL for the gallery
public String getLink() { return link; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getThumbnailUrl();", "@Override\n public String getImageLink() {\n return imageLink;\n }", "public Uri getPhotoPageUri() {\n return Uri.parse(\"https://www.flickr.com/photos/\").buildUpon()\n .appendPath(mOwner)\n .appendPath(mId)\n ...
[ "0.67259485", "0.65790105", "0.64897346", "0.63848364", "0.6364389", "0.6302741", "0.6283483", "0.62690556", "0.6259735", "0.6193995", "0.61654824", "0.61466694", "0.6133033", "0.6049194", "0.6032703", "0.6019103", "0.6008938", "0.6008938", "0.6008938", "0.6008938", "0.599048...
0.0
-1
Returns the list of tags associated with the custom gallery
public List<String> getTags() { return tags; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<Tag> getTags() {\n return fullPhoto.getTags();\n }", "public List getTags();", "List<Tag> getTagList();", "List<Tag> getTagList();", "public List<Tag> getTagList();", "private List<Tag> getTags() {\r\n\r\n\t\treturn getTags(null);\r\n\r\n\t}", "public List<ITag> getTags ();", "@...
[ "0.73639095", "0.7077577", "0.6914703", "0.6914703", "0.69008976", "0.68138355", "0.6787875", "0.67824364", "0.6734656", "0.66693616", "0.6589207", "0.65875506", "0.65865904", "0.657618", "0.65564734", "0.6544817", "0.6505493", "0.64686185", "0.64686185", "0.6465479", "0.6461...
0.6216752
37
Get the number of items in the gallery total
public int getItemCount() { return itemCount; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getGallerySize(){\r\n int size = 0;\r\n if(recipe != null){\r\n size = recipe.getImageGallery().size();\r\n }\r\n return size;\r\n }", "public int getTotalPics()\n {\n\t\t/*System.out.println(\"photo\"+photo.size());\n\t\tif(photo.size() == 0)\n\t\t{\n\t\t\...
[ "0.7630092", "0.7538577", "0.7388846", "0.7388846", "0.73770416", "0.72876763", "0.7190348", "0.6916981", "0.6862369", "0.6858652", "0.6855754", "0.6849051", "0.6808553", "0.6799385", "0.6763717", "0.67583215", "0.6737412", "0.67371327", "0.6731256", "0.6731256", "0.6713915",...
0.0
-1
Return the list of items in the custom gallery. Each item can be cast to its more specific GalleryImage or GalleryAlbum, as necessary.
public List<GalleryItem> getItems() { return _convertedItems; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<Gallery> getGallery() {\n List<Gallery> galleries = new ArrayList<>();\n galleries.add(new Gallery(\"islands\", \"Holiday 2017\", \"Islands\", 130, 4, \"City break\", \"13/04/2018\", \"15/04/2018\"));\n galleries.add(new Gallery(\"rome\", \"Fall 2017\",\"Rome\", 250, 5,\"City break...
[ "0.7019181", "0.6442889", "0.6132629", "0.5997035", "0.59860176", "0.59534883", "0.59326106", "0.59275025", "0.58864915", "0.5883233", "0.5881391", "0.5821171", "0.57635546", "0.5722469", "0.5639585", "0.56292987", "0.56216025", "0.56195533", "0.55438125", "0.5535235", "0.552...
0.7269325
0
Internal only, don't use this
public List<GalleryItemProxy> getInternalItems() { return _internalItems; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public final void mo51373a() {\n }", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\n\tprotected void interr() {\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tpublic void comer() {\n\...
[ "0.5879295", "0.583803", "0.5811755", "0.5804853", "0.579916", "0.5641706", "0.56394476", "0.5636774", "0.5631518", "0.5623722", "0.55292034", "0.55153334", "0.549071", "0.549071", "0.54866594", "0.5475531", "0.5461038", "0.54423755", "0.53942025", "0.53810877", "0.53780305",...
0.0
-1
ViewPager mViewPager; ViewHolder holder; private int page, max_list; Button btnBack, btnNext; Store instance variables based on arguments passed
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); Bundle b = this.getArguments(); IP = b.getString("inputIP"); try { report = (Report) b.getSerializable("inputReport"); } catch (Exception e) { list_excep.add(e); } list_excep = new ArrayList<>(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void setAdapterAndListener() {\r\n CustomPagerAdapter = new CustomPagerAdapter(getSupportFragmentManager(), PhotoViewActivity.this, dataModelArrayList);\r\n pager.setAdapter(CustomPagerAdapter);\r\n pager.setOffscreenPageLimit(3);\r\n pager.setCurrentItem(position);\r\n\r\n ...
[ "0.6410646", "0.6350218", "0.62928647", "0.6221497", "0.62104225", "0.60726017", "0.6070569", "0.6056626", "0.60471904", "0.6044747", "0.60085475", "0.59884995", "0.59773695", "0.59350544", "0.5896346", "0.58513886", "0.5826875", "0.5822831", "0.58165646", "0.5815014", "0.578...
0.0
-1
Inflate the view for the fragment based on layout XML
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View view = inflater.inflate(R.layout.type_pie_chart, container, false); ViewHolder holder; holder = new ViewHolder(); holder.img_pie_chart = (ImageView) view.findViewById(R.id.img_password); view.setTag(holder); String myTag = getTag(); ((DashBoard) getActivity()).setTagPieChartFragment(myTag); showPieChart(report,holder); for (Exception e : list_excep) { // Do whatever you want for the exception here AlertDialog.Builder builder = new AlertDialog.Builder(getActivity()); builder.setMessage(e.getMessage()); AlertDialog alert = builder.create(); alert.show(); } return view; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view=inflater.inflate(R.layout.fragment_layout12, container, false);\n\n iniv();\n\n init();\n\n return view;\n }", "@Override\n pub...
[ "0.71387947", "0.71345496", "0.7127636", "0.71135926", "0.7093273", "0.7067717", "0.70587194", "0.704353", "0.70259494", "0.7013745", "0.7013148", "0.7006474", "0.70037335", "0.69759756", "0.6972804", "0.69607854", "0.6934332", "0.69225293", "0.6912618", "0.690762", "0.690446...
0.0
-1
Make the default move.
public static String defaultMakeMove() { final int x = Map.MyX(); final int y = Map.MyY(); final List<String> validMoves = new ArrayList<String>(); if (!Map.IsWall(x, y - 1)) { validMoves.add("North"); } if (!Map.IsWall(x+1, y)) { validMoves.add("East"); } if (!Map.IsWall(x,y+1)) { validMoves.add("South"); } if (!Map.IsWall(x-1,y)) { validMoves.add("West"); } if (validMoves.size() == 0) { return "North"; // Hopeless. Might as well go North! } else { final Random rand = new Random(); int whichMove = rand.nextInt(validMoves.size()); return validMoves.get(whichMove); } // End of the if - else // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n public void makeMove(final Move move) {\n if (this.getMoves().size() >= 4) {\r\n this.resetNewDirBots();\r\n }\r\n \r\n // It is OK to now make the default move\r\n // basically add a New Point to the move queue\r\n super.makeMove(move); ...
[ "0.75465965", "0.7155257", "0.6853593", "0.6848886", "0.67534643", "0.67196524", "0.67142683", "0.66950256", "0.6691756", "0.6691756", "0.66760385", "0.6666166", "0.6645682", "0.66258705", "0.66185844", "0.65917337", "0.65685546", "0.65522796", "0.6549388", "0.65324205", "0.6...
0.6520418
21
/////////////////////////////////////////// Ignore this method. It's just doing boring stuff like communicating with the contest tournament engine. /////////////////////////////////////////// Method main.
public static void main(String[] args) { while (true) { Map.Initialize(); Map.MakeMove(MakeMove()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String[] args) throws IOException, InterruptedException {\r\n\t\r\n TournamentTest();\r\n //humanPlayersTest();\r\n }", "@Override\n\tpublic void execute() {\n\t\tlog.info(\"running...\");\n\n\n\t\t/* example for finding the server agent */\n\t\tIAgentDescription serverAgent = this...
[ "0.70085526", "0.67756355", "0.67314076", "0.6513653", "0.6445529", "0.642359", "0.6421699", "0.64116335", "0.63894165", "0.6385359", "0.6344156", "0.63397706", "0.6334111", "0.6328273", "0.63103986", "0.6283257", "0.6257051", "0.62492806", "0.62434155", "0.6228033", "0.62076...
0.0
-1
/ NOTE: The Java bean property name "status" conflicts with the one in the super class. So, we rename the property name to "installationSatus", as like one in the AIX schema. Constructor.
public Patch56State() { this( null, 0 ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setgetStatus()\r\n\t{\r\n\t\tthis.status = 'S';\r\n\t}", "public IntegratedAvirUpdateStatus() {\n \n }", "public DDEBaseDescStatusBean() {\n }", "public String getStatus(){\n\n //returns the value of the status field\n return this.status;\n }", "public String getStatus() { return ...
[ "0.62340516", "0.61419296", "0.6067931", "0.59818184", "0.59512955", "0.59386533", "0.59309274", "0.59030944", "0.59006697", "0.58938265", "0.58873016", "0.588097", "0.5846891", "0.5816374", "0.5813777", "0.5788234", "0.5784371", "0.5773528", "0.5764478", "0.5764478", "0.5764...
0.0
-1
End of variables declaration Constructor initialization
public TestingFailedAlert() { this.setResizable(false); this.setVisible(true); initComponents(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void initVariables() {\n\t\t\r\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "public TradeVariables() { /*gets default values*/ }", "protected void initVars() {}", "public Constructor(){\n\t\t\n\t}", "public Construct() {\n\tprefixes = new StringBuilder();\n\tvariables = new StringBuil...
[ "0.74029386", "0.71931696", "0.70723295", "0.69945717", "0.6971554", "0.68541574", "0.6760775", "0.6728273", "0.6706078", "0.6661465", "0.66475546", "0.66285074", "0.6604653", "0.66033274", "0.6591903", "0.65899897", "0.6588587", "0.65855354", "0.65855354", "0.65855354", "0.6...
0.0
-1
This method receives a document number to verify if its exists in the system. pre: An ArrayList that stores the users in the system has already been created. post: It is known if the document number is repeated or not.
public String verifyID(String documentNumber) throws RepeatedDocumentException{ for (int i = 0; i<users.size(); i++) { if (users.get(i).getDocumentNumber().equals(documentNumber)) { throw new RepeatedDocumentException(documentNumber); } } return "ok"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Then(\"verify if document {string} is present\")\n public void verifyIfDocumentIsPresent(String documentNumber) {\n driver = WebDriverRunner.getWebDriver();\n commonMethods.waitForElementExplicitly(2000);\n int tableSize = documentRegisterPage.getTableSize();\n List<Map<String, Stri...
[ "0.65565336", "0.6520741", "0.63426316", "0.6053975", "0.58524525", "0.58198893", "0.57606393", "0.5685686", "0.5640616", "0.56387365", "0.55966836", "0.55948055", "0.5586518", "0.55708355", "0.5520665", "0.54681325", "0.54614294", "0.54614294", "0.54614294", "0.54198694", "0...
0.7874096
0
This method receives the attributes of an user in order to register it in the system. pre: An ArrayList that stores the users in the system has already been created. post: A new user has been created and added to the system.
public void registerUser(String documentType, String documentNumber, String name, String lastNames, String phone, String address) { if (phone.equals("")) phone = "Not given"; if (address.equals("")) address = "Not given"; users.add(new User(documentType, documentNumber, name, lastNames, phone, address)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void register_user() {\n\n\t\tHttpRegister post = new HttpRegister();\n\t\tpost.execute(Config.URL + \"/api/newuser\");\n\n\t}", "private void registerUser()\n {\n /*AuthService.createAccount takes a Consumer<Boolean> where the result will be true if the user successfully logged in, or false ot...
[ "0.68886924", "0.67322195", "0.67315775", "0.66827846", "0.65980816", "0.6590621", "0.6586696", "0.6532186", "0.65171075", "0.65052295", "0.6482772", "0.64707124", "0.64499307", "0.6438017", "0.6422165", "0.6417359", "0.64048713", "0.64048713", "0.6394309", "0.638889", "0.637...
0.0
-1
This method receives the id of an user in order to search it in the system and return its info. pre: An ArrayList that stores the users in the system has already been created. post: The information of the desired user is returned in a String.
public String findUser(String id) throws UserNotFoundException{ String userFound = ""; for (int i = 0; i < users.size(); i++) { if (users.get(i).getDocumentNumber().equals(id)) { userFound = "\n-------USER-------\n"+users.get(i).toString(); } } if (userFound.equals("")) { throw new UserNotFoundException(id); } else { return userFound; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic List<Object> UserInfo(String id) {\n\t\ttry {\r\n\t\t\tcon = DriverManager.getConnection(\"jdbc:oracle:thin:@127.0.0.1:1521:XE\", \"system\", \"oracle\");\r\n\t\t\tString sql = \"select * from comuser where id = ?\";\r\n\t\t\tps = con.prepareStatement(sql);\r\n\t\t\tps.setString(1, id);\r\n\t...
[ "0.7397707", "0.72422576", "0.722567", "0.7212037", "0.70036846", "0.6925126", "0.6857714", "0.68083256", "0.68072414", "0.6749767", "0.67049575", "0.6656557", "0.6647176", "0.66406757", "0.66354513", "0.66295004", "0.6548937", "0.6543786", "0.6535342", "0.6510012", "0.647773...
0.7384889
1
This method receives the id of an user in order to register him a turn. pre: An ArrayList that stores the users in the system has already been created. post: Next turn available is correctly assigned to the desired user.
public String assignTurn(String id) throws UserAlreadyHasTurnException{ String turn = ""; for (int i = 0; i < users.size(); i++) { if (users.get(i).getDocumentNumber().equals(id)) { if (users.get(i).hasTurn()) { throw new UserAlreadyHasTurnException(id, users.get(i).getAssignedTurn()); } else { turn = nextTurn(); users.get(i).assignTurn(turn); actualTurns.add(new Turn(turn, users.get(i))); } } } return "<<Turn assigned correctly ["+turn+"]>>"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void registerUser()\n {\n /*AuthService.createAccount takes a Consumer<Boolean> where the result will be true if the user successfully logged in, or false otherwise*/\n authService.createAccount(entryService.extractText(namedFields), result -> {\n if (result.isEmpty()) {\n ...
[ "0.6223836", "0.620778", "0.6202671", "0.61469555", "0.6065751", "0.6051302", "0.5940356", "0.5916169", "0.58805925", "0.5854457", "0.5830933", "0.5830895", "0.5784287", "0.57769394", "0.576896", "0.57670003", "0.5757611", "0.5756796", "0.57550865", "0.5745352", "0.5743345", ...
0.6521944
0
This method generates the number of the next turn available and returns it. pre: Global variables num (turn's number) and letter (turn's letter) have already been created. post: Next turn available is correctly generated and returned.
public String nextTurn() { String turn = ""; num ++; if (num==100 && letter!='Z') { letter += 1; num = 0; turn = letter+"0"+String.valueOf(num); } else if (num==100 && letter=='Z') { letter = 'A'; num = 0; turn = letter+"0"+String.valueOf(num); } else if (num>10) { turn = letter+String.valueOf(num); } else { turn = letter+"0"+String.valueOf(num); } return turn; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void NextTurn() {\n if (num_of_players == turn)\n turn=0;\n turn++;\n }", "private int aleatorizarNumero() {\n\t\tint aux;\n\t\taux = r.getIntRand(13) + 1;\n\t\treturn aux;\n\t}", "private int getNextPlayer() {\n int nextPlayerID = ((currentTurn + turnOrder)...
[ "0.63906413", "0.63820547", "0.6324122", "0.6232054", "0.61008614", "0.6088014", "0.60459864", "0.5985537", "0.59587514", "0.5950274", "0.5925071", "0.5906265", "0.5866767", "0.5850929", "0.58208805", "0.5806752", "0.5770773", "0.576424", "0.57616514", "0.573322", "0.5724616"...
0.78228915
0
This method finds the actual turn to attend and returns it. pre: An ArrayList that stores the actual turns has already been created. post: It is know which is the actual turn to attend.
public String getActualTurn() { String turnID = ""; if (actualTurns.size()==0) { turnID = "<<There are no turns to attend>>"; } else { turnID = actualTurns.get(0).getTurnID(); notAttendedTurns.add(actualTurns.get(0)); actualTurns.remove(0); } return turnID; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int getTurn();", "protected abstract int getTurn();", "void provideNewTurn();", "int getCurrentTurn();", "public Mark getTurn() {\n\t\t\n\t\tif (isGameOver()) {\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\tfor (int i = 0; i < movesArray.length; i++) {\n\t\t\t\n\t\t\tif (movesArray[i] == -1) {\n\t\t\t\tif (i % 2 =...
[ "0.6156787", "0.61519325", "0.61446804", "0.59898674", "0.59627306", "0.5777925", "0.5731002", "0.56838983", "0.5674894", "0.5652528", "0.5648093", "0.56026167", "0.5599295", "0.5592341", "0.55910754", "0.5590658", "0.5580437", "0.5563367", "0.5560633", "0.5549376", "0.554003...
0.66762716
0
This method ends a turn and places it where it corresponds. pre: ArrayLists that stores the attended turns and not attended turns have already been created. post: A given turn is ended and placed where it corresponds.
public void endTurn(int op, String turnID) { Turn pturn = null; for (int i=0; i<notAttendedTurns.size(); i++) { if (notAttendedTurns.get(i).getTurnID()==(turnID)) { notAttendedTurns.get(i).setInUse(false); notAttendedTurns.get(i).getUser().setHasTurn(false); notAttendedTurns.get(i).getUser().assignTurn(""); pturn = notAttendedTurns.get(i); break; } } if (op==1) { notAttendedTurns.remove(pturn); attendedTurns.add(pturn); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void endTurn() {\n \t\t// add new cards to the set of usable cards\n \t\tfor (int i = 0; i < newCards.size(); i++)\n \t\t\tcards[newCards.get(i).ordinal()] += 1;\n \n \t\tnewCards.clear();\n \t\tusedCard = false;\n \n \t\tappendAction(R.string.player_ended_turn);\n \t}", "public void endTurn() {\n\t\tturn...
[ "0.73857653", "0.7242905", "0.71622604", "0.7152501", "0.71505904", "0.7059677", "0.7054977", "0.7010624", "0.6992915", "0.69856465", "0.6958772", "0.69257337", "0.6902829", "0.68828446", "0.68537927", "0.68161994", "0.67552084", "0.66909355", "0.6670435", "0.66663235", "0.66...
0.6443155
27
What kind of action is this?
public String getActionType() { return actionType; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Action getType();", "public int getActionType();", "public int getAction() {\n\t\treturn action;\n\t}", "public abstract Action getAction();", "@Override\n\tpublic String getAction() {\n\t\treturn action;\n\t}", "public int getAction() {\n return action_;\n }", "public int getAction() {\n ...
[ "0.7412433", "0.7400539", "0.7195777", "0.7153252", "0.7116737", "0.70808595", "0.7074337", "0.7047314", "0.701608", "0.6999051", "0.6999051", "0.6999051", "0.6999051", "0.69695956", "0.6963125", "0.6957744", "0.69556373", "0.69483924", "0.69483924", "0.69483924", "0.69466823...
0.6419794
52
What is the id of the action?
public String getActionId() { return actionId; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic int getActionId() {\n\t\treturn actionId;\n\t}", "public String getId() {\n return (String) getValue(ACTION_ID);\n }", "public String getActionId() {\n\t\treturn actionId;\n\t}", "public Long getActionId() {\n return actionId;\n }", "public static Action action(Strin...
[ "0.8040399", "0.7873071", "0.78664345", "0.7652134", "0.73576885", "0.7055364", "0.7053945", "0.7001943", "0.6960524", "0.6943723", "0.69403744", "0.6837263", "0.68228084", "0.6807842", "0.6767128", "0.65871227", "0.6578438", "0.65577626", "0.65508634", "0.6543589", "0.651970...
0.8010006
1
Which instance of the action is this? Every time you start an action, it gets a new instance ID, and this lets you tell the difference between two copies running in parallel.
public int getExecutionInstance() { return executionInstance; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int getIdInstance();", "public int getId() {\n return instance.getId();\n }", "public int getId() {\n return instance.getId();\n }", "public int getId() {\n return instance.getId();\n }", "public int getId() {\n return instance.getId();\n }", ...
[ "0.5723838", "0.56794655", "0.56794655", "0.56794655", "0.56794655", "0.56794655", "0.56794655", "0.56794655", "0.561552", "0.5612074", "0.5573935", "0.5521156", "0.54970807", "0.54687864", "0.5466542", "0.54315585", "0.5369264", "0.53177553", "0.53177553", "0.5274727", "0.52...
0.6250023
0
This is the entry point method.
public void onModuleLoad() { JsonpRequestBuilder requestBuilder = new JsonpRequestBuilder(); // requestBuilder.setTimeout(10000); // requestBuilder.requestObject(SERVER_URL, new Jazz10RequestCallback()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Main() {\n\n super();\n }", "public static void main() {\n \n }", "public Main() {\n \n \n }", "public void run() {\n // The run method should be overridden by the subordinate class. Please\n // see the example applications provided for more details....
[ "0.6960738", "0.69552404", "0.66707826", "0.66208535", "0.6555327", "0.64776266", "0.64771515", "0.64659804", "0.64316505", "0.64081883", "0.6335417", "0.63307303", "0.63175744", "0.6270908", "0.6238488", "0.6237389", "0.6237389", "0.6235709", "0.6235709", "0.6235709", "0.623...
0.0
-1
TODO Autogenerated method stub
@Override public void onSuccess(Article result) { Window.alert(result.toString()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
TODO implement local save thingy
public void save() { DataBuffer.saveDataLocally(); //TODO save to db must be done properly DataBuffer.save(session); //TODO recording saved confirmation }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void save() {\t\n\t\n\t\n\t}", "void save();", "void save();", "void save();", "@Override\n\tpublic void save() {\n\t\t\n\t}", "@Override\n\tpublic void save() {\n\t\t\n\t}", "@Override\n public void save() {\n \n }", "@Override\n public void Save() {\n\t \n }", "@Overr...
[ "0.7413488", "0.72661483", "0.72661483", "0.72661483", "0.72432035", "0.72432035", "0.7122323", "0.7075789", "0.7068634", "0.7068634", "0.70410544", "0.6982701", "0.6970723", "0.6970723", "0.6970723", "0.6970723", "0.6901024", "0.6872391", "0.686383", "0.68504983", "0.6751088...
0.642072
38
/ The length of the path.
public double length() { double length = 0; if (isEmpty()) return 0; java.util.ListIterator<PathPoint> it = listIterator(); PathPoint current = it.next(); while (it.hasNext()) { PathPoint next = it.next(); length += mc.distance3d(current.getLocation(), next.getLocation()); current = next; } return length; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getPathLength();", "public int getPathLength()\r\n\t{\r\n\t\treturn path.size();\r\n\t}", "public Integer getPathLength() {\n return pathLength;\n }", "@Override\n\tpublic int totalPathLength() {\n\t\treturn totalPathLength(root, sum);// returns total path lenght number\n\t}", "public ...
[ "0.91442424", "0.8705218", "0.84509814", "0.77573115", "0.7445849", "0.7381371", "0.7381371", "0.7340451", "0.7245778", "0.7245778", "0.7245778", "0.72362506", "0.72362506", "0.72362506", "0.72362506", "0.72362506", "0.7202021", "0.71773034", "0.7172713", "0.7172713", "0.7172...
0.0
-1
public LinkedList(E data, NodeList next) Initialize an sequence with one node. The node contains the initial specified data and link to the next node. Note that the initial next link may be a null reference, which indicates that the new node has nothing after it.
public LinkedList(E data, Node<E> next) { size++; prev = null; head = new Node(data, next); cursor = head; tail = head; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Node(E data, Node next) {\n\t\t\tthis.data = data;\n\t\t\tthis.next = next;\n\t\t}", "public ListNode(E data, ListNode next) {\r\n\t\t\t//this.data = data;\r\n\t\t\tthis(data);\r\n\t\t\tthis.next = next;\r\n\t\t}", "public Node(Object _data, Node _next) {\r\n\t\t\tnext = _next;\r\n\t\t\tdata = _data;\r\...
[ "0.8162666", "0.7938687", "0.7840752", "0.7816423", "0.7697942", "0.7547018", "0.74985176", "0.7488908", "0.74602973", "0.7456731", "0.74310124", "0.73258257", "0.7288472", "0.72692424", "0.7216196", "0.71771806", "0.7173682", "0.7104929", "0.706761", "0.7054536", "0.7029088"...
0.82645077
0
public void addBefore(E element) Add a new element to this sequence before the current element.
@Override public void addBefore(E element) { Node<E> newNodeList = new Node<>(element, cursor); if (prev == null) { head = newNodeList; cursor = newNodeList; } else { prev.setNext(newNodeList); cursor = newNodeList; } size++; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void addBefore(T target, T element);", "@Override\n public void addBefore(T target, T element){\n int index = getIndex(target);\n add(index, element);\n }", "public void prepend(T element);", "private Node insertBefore(E element, Node node) {\n \treturn new Node(node.pred, element);\n ...
[ "0.7587992", "0.7571954", "0.7510095", "0.74470055", "0.7266379", "0.7225835", "0.7061911", "0.6801466", "0.6771683", "0.677109", "0.67591625", "0.6749645", "0.67422545", "0.66545266", "0.6627217", "0.65854496", "0.64935005", "0.64025486", "0.6395653", "0.6389304", "0.6382114...
0.80738765
0
public void addFirst(E element) Add a new element to the front of this sequence.
@Override public void addFirst(E element) { Node<E> newNodeList = new Node<>(element, head); head = newNodeList; cursor = newNodeList; size++; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addFirst(T element);", "public void addFirst(T element) {\r\n \r\n if (element == null) {\r\n throw new IllegalArgumentException();\r\n }\r\n \r\n Node n = new Node(element);\r\n \r\n if (size() == 0) {\r\n \r\n front = n;\r\n last = n;\r\n ...
[ "0.81816417", "0.8138453", "0.7990449", "0.769527", "0.7672623", "0.76718813", "0.7633619", "0.76318014", "0.7541668", "0.74160075", "0.7396579", "0.7391865", "0.7330715", "0.72307044", "0.71990603", "0.7188175", "0.71875966", "0.71466386", "0.7081567", "0.7079965", "0.707614...
0.8050647
2
public void advance() Move forward so that the current element is now the next element in the sequence.
@Override public void advance() { if (isCurrent()) { prev = cursor; cursor = cursor.getNext(); } else { throw new IllegalStateException("There is no current element."); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void advance( )\r\n {\r\n\t if(isCurrent() != true){// Implemented by student.\r\n\t throw new IllegalStateException(\"no current element\");\r\n\t }\r\n\t else\r\n\t \t precursor = cursor;\r\n\t \t cursor = cursor.getLink(); // Implemented by student.\r\n }", "public void...
[ "0.82146704", "0.80485296", "0.77947366", "0.7742158", "0.74560446", "0.7455564", "0.7431219", "0.7428146", "0.74134326", "0.72889394", "0.72778964", "0.7268451", "0.72239053", "0.71996665", "0.68605196", "0.68242", "0.6813304", "0.6808517", "0.67622614", "0.6701831", "0.6699...
0.84713614
0
public E getCurrent() Accessor method to return the data within the current element of the sequence.
@Override public E getCurrent() { if (isCurrent()) { return cursor.getData(); } else { throw new IllegalStateException("There is no current element."); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public E getCurrent()\n {\n if (size != 0)\n {\n return current.data();\n }\n else\n {\n throw new NoSuchElementException(\"The list is empty\");\n }\n }", "public de.engehausen.crazygolf.model.Element getCurrent() {\r\n\t\treturn current;\r\n...
[ "0.83846647", "0.83255583", "0.8158869", "0.80009115", "0.7836103", "0.7735217", "0.76367795", "0.755697", "0.75487816", "0.75374496", "0.75068367", "0.7263736", "0.7260463", "0.72536874", "0.72453123", "0.72248", "0.7178139", "0.7177008", "0.7157187", "0.7157187", "0.7155130...
0.8835169
0