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
MODIFIES: this EFFECTS: return the information of the agent searched
public void searchRecruited(String name) throws ImpossibleAgentInListException, ImpossibleAgentException, IOException { recruitedAgents.load(file); if (recruitedAgents.contains(recruitedAgents.getAgent(name))) { searchAgent(name); } else { throw new ImpossibleAgentInListException(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void searchAgent(String name) throws ImpossibleAgentException {\n if (rhineLifeAgents.contains(rhineLifeAgents.getAgent(name))) {\n Agent a = rhineLifeAgents.getAgent(name);\n a.getInfo();\n } else if (rhodeIslandAgent.contains(rhodeIslandAgent.getAgent(name))) {\n ...
[ "0.5797074", "0.5643062", "0.56214124", "0.55864406", "0.5512807", "0.54693806", "0.5444098", "0.5440309", "0.54208416", "0.5414219", "0.53796494", "0.53231055", "0.5309439", "0.53027093", "0.52747273", "0.52382225", "0.52283645", "0.5211649", "0.51818776", "0.51641953", "0.5...
0.0
-1
TODO it need adding dates checking in condition
public List<Property> findAllForReport(List<KufType> value, UUID balanceHolder, UUID orgCat, Date from, Date to) { EntityManager em = getEntityManagerFactory().createEntityManager(); CriteriaBuilder cb = em.getCriteriaBuilder(); try { CriteriaQuery<Property> cq = cb.createQuery(Property.class); Root<Property> c = cq.from(Property.class); cq.select(c); Predicate condition = null; if (value != null) { condition = c.get("kuf").in(value); } if (user.getId() != SuperUser.ID) { if (condition != null) { condition = cb.and(c.get("readers").in(user.getId()), condition); } else { condition = c.get("readers").in(user.getId()); } } if (balanceHolder != null) { if (condition != null) { condition = cb.and(cb.equal(c.get("balanceHolder").get("id"), balanceHolder), condition); } else { condition = cb.equal(c.get("balanceHolder").get("id"), balanceHolder); } } else if (orgCat != null) { try { OrgCategoryDAO ocDao = new OrgCategoryDAO(getSession()); OrgCategory orgCatEntity = ocDao.findById(orgCat); OrganizationDAO oDao = new OrganizationDAO(getSession()); List<OrgCategory> cats = new ArrayList<OrgCategory>(); cats.add(orgCatEntity); ViewPage<Organization> orgs = oDao.findAllByOrgCategory(cats, 0, 0); if (condition != null) { condition = cb.and(c.get("balanceHolder").in(orgs.getResult()), condition); } else { condition = c.get("balanceHolder").in(orgs); } } catch (DAOException e) { Server.logger.errorLogEntry(e); } } cq.where(condition); Query query = em.createQuery(cq); return query.getResultList(); } finally { em.close(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean isFilterByDate();", "private boolean checkdates(java.util.Date date,java.util.Date date2)\n\t{\n\t\tif (date==null||date2==null) return true;\n\t\tif (!date.after(date2)&&!date.before(date2))return true;\n\t\treturn date.before(date2);\n\t}", "public boolean checkDate(){\n Calendar c = Calendar....
[ "0.6649518", "0.6519971", "0.6331176", "0.62747604", "0.6203099", "0.6196772", "0.6172704", "0.61385167", "0.611988", "0.61196566", "0.6096047", "0.6082339", "0.60802305", "0.60414314", "0.6038433", "0.6036333", "0.6021552", "0.6020461", "0.60038483", "0.59946954", "0.5981261...
0.0
-1
Saves an employee into the database
public void save(Session session, Employee emp) { Transaction t = session.beginTransaction(); session.saveOrUpdate(emp); t.commit(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void saveEmployee(Employe employee) {\n\t\t\n\t}", "@Override\r\n\tpublic void saveEmployee(Employee employee) {\n\t\t\r\n\t}", "void save(Employee employee);", "@Override\r\n\tpublic void post(Employee employee) {\n\t\t empdao.save(employee);\r\n\t}", "@Override\n\tpublic void save(Employee employe...
[ "0.83124775", "0.8043714", "0.80424213", "0.80404353", "0.7989981", "0.7964904", "0.7884041", "0.781862", "0.7751335", "0.7683169", "0.7589738", "0.74561846", "0.74288136", "0.7398181", "0.7337196", "0.73068655", "0.7269084", "0.7265552", "0.7238759", "0.72239184", "0.7192147...
0.6352838
79
Updates an employee of the database
public Employee update(Session session, Employee emp) { Employee bbddEmp; Transaction t = session.beginTransaction(); Query query = session.createQuery("from Employee where" + " name = :name and nifnie = :nifnie and companyEntryDate=:" + "companyEntryDate "); query.setParameter("name", emp.getName()); query.setParameter("nifnie", emp.getNifnie()); query.setDate("companyEntryDate", emp.getCompanyEntryDate()); bbddEmp = (Employee) query.list().get(0); updateColumns(emp, bbddEmp); session.update(bbddEmp); t.commit(); return bbddEmp; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void updateEmployee(Employe employee) {\n\t\t\n\t}", "public void update(Employee e) {\n\t\t\r\n\t}", "void update(EmployeeDetail detail) throws DBException;", "public abstract void updateEmployee(int id, Employee emp) throws DatabaseExeption;", "public void update(Employee employee){\n emplo...
[ "0.84486455", "0.8208561", "0.8186445", "0.81023794", "0.80797845", "0.8011271", "0.7939111", "0.7909142", "0.79037815", "0.78889173", "0.7818739", "0.7810154", "0.777519", "0.77683026", "0.7752693", "0.7733819", "0.7731944", "0.77310914", "0.7695744", "0.7693276", "0.7676042...
0.67576486
71
Checks if an employee exists in the database
public boolean exists(Session session, Employee emp) { List<Category> list; Transaction t = session.beginTransaction(); Query query = session.createQuery("from Employee where" + " name = :name and nifnie = :nifnie and companyEntryDate=:" + "companyEntryDate "); query.setParameter("name", emp.getName()); query.setParameter("nifnie", emp.getNifnie()); query.setDate("companyEntryDate", emp.getCompanyEntryDate()); list = query.list(); t.commit(); return !list.isEmpty(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean employeeExists() {\n\t\tResultSet r = super.query(\"SELECT \" + C.COLUMN_ID + \" FROM \" + C.TABLE_EMPLOYEE\n\t\t\t\t+ \" WHERE \" + C.COLUMN_ID + \"=\" + this.getID() + \" LIMIT 1\");\n\t\tif (r == null)\n\t\t\treturn false;\n\t\ttry {\n\t\t\tsuper.setRecentError(null);\n\t\t\treturn r.first();\n\t...
[ "0.8014229", "0.73062676", "0.7248659", "0.7248659", "0.68654305", "0.6838001", "0.68220377", "0.6706755", "0.668229", "0.66005003", "0.66005003", "0.6587141", "0.64801115", "0.6468892", "0.64128923", "0.63886976", "0.6369855", "0.63690907", "0.6344128", "0.6342424", "0.63404...
0.67455256
7
Updates the employee bbddEmp by setting in it the values of the employee memoryEmp
public void updateColumns(Employee memoryEmp, Employee bbddEmp) { bbddEmp.setBankAccount(memoryEmp.getbAC()); bbddEmp.setCategory(memoryEmp.getCategory()); bbddEmp.setCodigoCuenta(memoryEmp.getCodigoCuenta()); bbddEmp.setCompany(memoryEmp.getCompany()); bbddEmp.setCompanyEntryDate(memoryEmp.getCompanyEntryDate()); bbddEmp.setCompanyEntryLocalDate(memoryEmp.getCompanyEntryLocalDate()); bbddEmp.setCompanyName(memoryEmp.getCompanyName()); bbddEmp.setEmail(memoryEmp.getEmail()); bbddEmp.setExtraPayroll(memoryEmp.getExtraPayroll()); bbddEmp.setExtraProRate(memoryEmp.getExtraProRate()); bbddEmp.setID(memoryEmp.getID()); bbddEmp.setIban(memoryEmp.getIban()); bbddEmp.setNominas(memoryEmp.getNominas()); bbddEmp.setPayroll(memoryEmp.getPayroll()); bbddEmp.setSurname1(memoryEmp.getSurname1()); bbddEmp.setSurname2(memoryEmp.getSurname2()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void updateEmp(Emp emp) {\n\t\t\n\t}", "public void updateEmployee(Employe employee) {\n\t\t\n\t}", "@Override\n\tpublic void updateEmployee() {\n\n\t}", "public void updateemployee(Employeee em) {\n\t\temployeerepo.save(em);\n\t}", "public void update(Employee e) {\n\t\t\r\n\t}", "@Override\n\tpu...
[ "0.7214944", "0.6658637", "0.64828134", "0.63875806", "0.6366684", "0.6276053", "0.62002176", "0.6186173", "0.61748135", "0.6167372", "0.6141892", "0.6127679", "0.6110889", "0.6104005", "0.60957205", "0.6077869", "0.6062936", "0.6059084", "0.6031682", "0.60042894", "0.6003849...
0.778142
0
Created by Jan Shair on 31/01/2017.
@Singleton @Component(modules={AppModule.class, NetModule.class}) public interface NetComponent { void inject(App application); void inject(MainActivity activity); SharedPreferenceUtil provideSharedPreferences(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public final void mo51373a() {\n }", "@Override\n public void perish() {\n \n }", "private stendhal() {\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Ove...
[ "0.58478326", "0.5797519", "0.5680036", "0.566044", "0.54909265", "0.54683006", "0.5467793", "0.5467793", "0.546279", "0.54534084", "0.5445787", "0.5442567", "0.5406574", "0.5387817", "0.5384442", "0.5381082", "0.53529936", "0.5348938", "0.53425455", "0.5338641", "0.5338145",...
0.0
-1
display/center the jdialog when the button is pressed
@Override public void actionPerformed(ActionEvent e) { frame.setVisible(false); new Register(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void actionPerformed(java.awt.event.ActionEvent e) {\n\t\t\t\t\tJDialog jDialog = getPomocDialog();\n\t\t\t\t\tjDialog.setTitle(\"Pomoc\");\n\t\t\t\t\tjDialog.pack();\n\t\t\t\t\tPoint loc = getHlavneOkno().getLocation();\n\t\t\t\t\tloc.translate(20, 20);\n\t\t\t\t\tjDialog.setLocation(loc);\n\t\t\t\t\tjDial...
[ "0.7413791", "0.72059286", "0.7138436", "0.70818603", "0.7044508", "0.6962745", "0.69540095", "0.69082975", "0.68524224", "0.68418694", "0.6765784", "0.6749975", "0.6695033", "0.6666761", "0.66460615", "0.66325337", "0.6618835", "0.66072375", "0.6594632", "0.65826946", "0.656...
0.0
-1
Method to replace the child fragment
public void replaceChildFragment(Fragment parentFragment, Fragment fragment, int containerId, String strFragmentTag, boolean flagIsAddToBackStack) { FragmentManager fragmentManager = parentFragment.getChildFragmentManager(); FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction(); fragmentTransaction.replace(containerId, fragment, strFragmentTag); if (flagIsAddToBackStack) fragmentTransaction.addToBackStack(null); fragmentTransaction.commit(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void replaceFragment(int pos) {\n Fragment fragment = null;\n switch (pos) {\n case 0:\n //mis tarjetas\n fragment = new CardsActivity();\n break;\n case 1:\n //buscador online\n fragment = new Ca...
[ "0.7135298", "0.7012213", "0.69645244", "0.68708926", "0.6861415", "0.6857358", "0.6848308", "0.6839962", "0.6827649", "0.67639214", "0.6728757", "0.6714596", "0.6708843", "0.6706346", "0.6702917", "0.6646055", "0.6641206", "0.66341186", "0.66334754", "0.6600974", "0.660056",...
0.6817295
9
MSH21.1 = PHLabReportAck, MSH16 is present and valued 'AL'. No error/alert expected
@Test public void test1() throws Exception { SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets); ClassLoader classLoader = getClass().getClassLoader(); File message1 = new File(classLoader.getResource(message1FileName).getFile()); String messageString = FileUtils.readFileToString(message1); Report report = validator.check(messageString, "ORU_R01"); Set<String> keys = report.getEntries().keySet(); int errors = 0; int alerts = 0; for (String key : keys) { List<Entry> entries = report.getEntries().get(key); if (entries != null && entries.size() > 0) { System.out.println("*** " + key + " ***"); for (Entry entry : entries) { switch (entry.getClassification()) { case "Error": Util.printEntry(entry); errors++; break; case "Alert": Util.printEntry(entry); alerts++; break; } } } } assertEquals(0, errors); assertEquals(0, alerts); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void test13() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message13 = new File(classLoader.getResource(message13FileName).getFile());\n String messageStrin...
[ "0.5746755", "0.5716969", "0.5679747", "0.5676038", "0.56277496", "0.5589825", "0.55146587", "0.54585576", "0.54254806", "0.5414846", "0.54041314", "0.5400012", "0.5368732", "0.53669244", "0.53662956", "0.53630555", "0.53437966", "0.5321463", "0.5310733", "0.530074", "0.52998...
0.54224753
9
MSH21.1 = PHLabReportAck, MSH16 is present and valued 'NE'. No error/alert
@Test public void test2() throws Exception { SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets); ClassLoader classLoader = getClass().getClassLoader(); File message2 = new File(classLoader.getResource(message2FileName).getFile()); String messageString = FileUtils.readFileToString(message2); Report report = validator.check(messageString, "ORU_R01"); Set<String> keys = report.getEntries().keySet(); int errors = 0; int alerts = 0; for (String key : keys) { List<Entry> entries = report.getEntries().get(key); if (entries != null && entries.size() > 0) { System.out.println("*** " + key + " ***"); for (Entry entry : entries) { switch (entry.getClassification()) { case "Error": Util.printEntry(entry); errors++; break; case "Alert": Util.printEntry(entry); alerts++; break; } } } } assertEquals(0, errors); assertEquals(0, alerts); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void test13() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message13 = new File(classLoader.getResource(message13FileName).getFile());\n String messageStrin...
[ "0.5686338", "0.5626648", "0.55724156", "0.55721295", "0.555067", "0.54942447", "0.5482454", "0.5476184", "0.54705966", "0.5469264", "0.5429496", "0.5417011", "0.53503567", "0.53436357", "0.5325179", "0.531314", "0.5312265", "0.53077364", "0.527877", "0.5277185", "0.5266691",...
0.50714874
44
MSH21.1 = PHLabReportAck, MSH16 is present and valued 'ER'. No error/alert alert expected
@Test public void test3() throws Exception { SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets); ClassLoader classLoader = getClass().getClassLoader(); File message3 = new File(classLoader.getResource(message3FileName).getFile()); String messageString = FileUtils.readFileToString(message3); Report report = validator.check(messageString, "ORU_R01"); Set<String> keys = report.getEntries().keySet(); int errors = 0; int alerts = 0; for (String key : keys) { List<Entry> entries = report.getEntries().get(key); if (entries != null && entries.size() > 0) { System.out.println("*** " + key + " ***"); for (Entry entry : entries) { switch (entry.getClassification()) { case "Error": Util.printEntry(entry); errors++; break; case "Alert": Util.printEntry(entry); alerts++; break; } } } } assertEquals(0, errors); assertEquals(0, alerts); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void test13() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message13 = new File(classLoader.getResource(message13FileName).getFile());\n String messageStrin...
[ "0.60983485", "0.59624845", "0.59433264", "0.5918614", "0.5853592", "0.57830495", "0.56864345", "0.5673985", "0.5650687", "0.5649031", "0.5643198", "0.5639503", "0.5625838", "0.56102395", "0.55852455", "0.55077475", "0.5409869", "0.5353464", "0.5351459", "0.53372824", "0.5325...
0.5592601
14
MSH21.1 = PHLabReportAck, MSH16 is present and valued 'SU'. No error/alert
@Test public void test4() throws Exception { SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets); ClassLoader classLoader = getClass().getClassLoader(); File message4 = new File(classLoader.getResource(message4FileName).getFile()); String messageString = FileUtils.readFileToString(message4); Report report = validator.check(messageString, "ORU_R01"); Set<String> keys = report.getEntries().keySet(); int errors = 0; int alerts = 0; for (String key : keys) { List<Entry> entries = report.getEntries().get(key); if (entries != null && entries.size() > 0) { System.out.println("*** " + key + " ***"); for (Entry entry : entries) { switch (entry.getClassification()) { case "Error": Util.printEntry(entry); errors++; break; case "Alert": Util.printEntry(entry); alerts++; break; } } } } assertEquals(0, errors); assertEquals(0, alerts); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void m6607X() {\n try {\n HashMap hashMap = new HashMap();\n hashMap.put(\"is_rename\", \"0\");\n C1390G.m6779b(\"A107|1|3|10\", hashMap);\n HashMap hashMap2 = new HashMap();\n hashMap2.put(\"mark_num\", String.valueOf(this.f5418ga));\n ...
[ "0.56689787", "0.56416655", "0.54996353", "0.54984546", "0.5496727", "0.54800785", "0.5474895", "0.54597574", "0.5406907", "0.5380975", "0.53386635", "0.5331083", "0.5297106", "0.5295433", "0.5284907", "0.527891", "0.52477443", "0.5234338", "0.52292305", "0.52030635", "0.5200...
0.519282
21
MSH21 Not present, MSH16 present and valued NE. Two errors, no alert expected.
@Test public void test5() throws Exception { SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets); ClassLoader classLoader = getClass().getClassLoader(); File message5 = new File(classLoader.getResource(message5FileName).getFile()); String messageString = FileUtils.readFileToString(message5); Report report = validator.check(messageString, "ORU_R01"); Set<String> keys = report.getEntries().keySet(); int errors = 0; int alerts = 0; for (String key : keys) { List<Entry> entries = report.getEntries().get(key); if (entries != null && entries.size() > 0) { System.out.println("*** " + key + " ***"); for (Entry entry : entries) { switch (entry.getClassification()) { case "Error": Util.printEntry(entry); errors++; break; case "Alert": Util.printEntry(entry); alerts++; break; } } } } assertEquals(2, errors); assertEquals(0, alerts); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void m5015e() {\n if (C1663a.m5979a().m5993N() && (this.f3996b == null || \"\".equals(this.f3996b))) {\n C2201w.m8371a((int) C0965R.string.ota_low_version, 0);\n } else {\n this.f3997c.m4989a();\n }\n }", "public static void m5831h() {\n if (f4669a != n...
[ "0.5837577", "0.5803697", "0.57654977", "0.5758043", "0.5741833", "0.5683225", "0.56741506", "0.56531656", "0.5618555", "0.5603432", "0.5577549", "0.5541876", "0.5540666", "0.5534815", "0.55136675", "0.5467361", "0.5455391", "0.5448795", "0.5445361", "0.5439777", "0.543365", ...
0.0
-1
MSH21 Not present, MSH16 not present. Two errors, no alert expected.
@Test public void test6() throws Exception { SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets); ClassLoader classLoader = getClass().getClassLoader(); File message6 = new File(classLoader.getResource(message6FileName).getFile()); String messageString = FileUtils.readFileToString(message6); Report report = validator.check(messageString, "ORU_R01"); Set<String> keys = report.getEntries().keySet(); int errors = 0; int alerts = 0; for (String key : keys) { List<Entry> entries = report.getEntries().get(key); if (entries != null && entries.size() > 0) { System.out.println("*** " + key + " ***"); for (Entry entry : entries) { switch (entry.getClassification()) { case "Error": Util.printEntry(entry); errors++; break; case "Alert": Util.printEntry(entry); alerts++; break; } } } } assertEquals(2, errors); assertEquals(0, alerts); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void m50411m() {\n m50398f(false);\n mo38886a(this.f30720S.getString(C10232R.string.app_name), this.f30720S.getString(C10232R.string.msg_alert_something_went_wrong));\n }", "public void validateRpd13s7()\n {\n // This guideline cannot be automatically tested.\n }", "public...
[ "0.56478155", "0.5631602", "0.56026715", "0.5591999", "0.5591474", "0.5566383", "0.55658376", "0.55613774", "0.5518713", "0.5486247", "0.5476801", "0.5446047", "0.54448915", "0.544354", "0.5423961", "0.54091924", "0.54090035", "0.5404829", "0.5389915", "0.53891826", "0.538374...
0.0
-1
MSH21.1 = PHLabReportAck, MSH16 is present and valued 'AB'. One error, no alert expected
@Test public void test7() throws Exception { SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets); ClassLoader classLoader = getClass().getClassLoader(); File message7 = new File(classLoader.getResource(message7FileName).getFile()); String messageString = FileUtils.readFileToString(message7); Report report = validator.check(messageString, "ORU_R01"); Set<String> keys = report.getEntries().keySet(); int errors = 0; int alerts = 0; for (String key : keys) { List<Entry> entries = report.getEntries().get(key); if (entries != null && entries.size() > 0) { System.out.println("*** " + key + " ***"); for (Entry entry : entries) { switch (entry.getClassification()) { case "Error": Util.printEntry(entry); errors++; break; case "Alert": Util.printEntry(entry); alerts++; break; } } } } assertEquals(1, errors); assertEquals(0, alerts); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void m6607X() {\n try {\n HashMap hashMap = new HashMap();\n hashMap.put(\"is_rename\", \"0\");\n C1390G.m6779b(\"A107|1|3|10\", hashMap);\n HashMap hashMap2 = new HashMap();\n hashMap2.put(\"mark_num\", String.valueOf(this.f5418ga));\n ...
[ "0.5760446", "0.57159054", "0.5699122", "0.56056166", "0.5583114", "0.5473406", "0.54666275", "0.54441696", "0.5391585", "0.5389862", "0.5386463", "0.5373202", "0.53516847", "0.5348851", "0.5342484", "0.5334529", "0.53320205", "0.53297293", "0.53091305", "0.53000385", "0.5299...
0.54602754
7
MSH21.1 = PHLabReportAck, MSH16 is not present. Two errors, no alert expected
@Test public void test8() throws Exception { SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets); ClassLoader classLoader = getClass().getClassLoader(); File message8 = new File(classLoader.getResource(message8FileName).getFile()); String messageString = FileUtils.readFileToString(message8); Report report = validator.check(messageString, "ORU_R01"); Set<String> keys = report.getEntries().keySet(); int errors = 0; int alerts = 0; for (String key : keys) { List<Entry> entries = report.getEntries().get(key); if (entries != null && entries.size() > 0) { System.out.println("*** " + key + " ***"); for (Entry entry : entries) { switch (entry.getClassification()) { case "Error": Util.printEntry(entry); errors++; break; case "Alert": Util.printEntry(entry); alerts++; break; } } } } assertEquals(2, errors); assertEquals(0, alerts); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void test13() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message13 = new File(classLoader.getResource(message13FileName).getFile());\n String messageStrin...
[ "0.6250409", "0.618904", "0.6084767", "0.60504955", "0.5954539", "0.59502906", "0.5845462", "0.58181536", "0.5813489", "0.5807858", "0.58029526", "0.5788721", "0.5769314", "0.5766205", "0.5715835", "0.5682614", "0.56803924", "0.5609862", "0.558002", "0.55461484", "0.54527354"...
0.5805402
10
MSH21.1 not present, MSH16 is valued AL. Two errors, no alert expected
@Test public void test9() throws Exception { SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets); ClassLoader classLoader = getClass().getClassLoader(); File message9 = new File(classLoader.getResource(message9FileName).getFile()); String messageString = FileUtils.readFileToString(message9); Report report = validator.check(messageString, "ORU_R01"); Set<String> keys = report.getEntries().keySet(); int errors = 0; int alerts = 0; for (String key : keys) { List<Entry> entries = report.getEntries().get(key); if (entries != null && entries.size() > 0) { System.out.println("*** " + key + " ***"); for (Entry entry : entries) { switch (entry.getClassification()) { case "Error": Util.printEntry(entry); errors++; break; case "Alert": Util.printEntry(entry); alerts++; break; } } } } assertEquals(2, errors); assertEquals(0, alerts); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void mo7352a(C1655s sVar, AdError adError);", "private void m6601R() {\n if (AppFeature.f5609e) {\n this.f5399S.mo6174f(\"0\");\n }\n this.f5399S.mo6172e(\"1\");\n }", "protected final void checkExtensionValueSpec119612Vers020101(ITSLObject tsl, ServiceHistoryInstance shi, bo...
[ "0.60178906", "0.59933954", "0.57308155", "0.57057154", "0.56433445", "0.56027436", "0.55833495", "0.5541542", "0.5539028", "0.5516238", "0.5504279", "0.54884666", "0.54685444", "0.54624075", "0.5442817", "0.5438596", "0.54291946", "0.5421452", "0.5421049", "0.540996", "0.540...
0.0
-1
MSH21.1 present, but different from PHLabReportAck, MSH16 is valued 'AL'. One error, no alert expected.
@Test public void test10() throws Exception { SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets); ClassLoader classLoader = getClass().getClassLoader(); File message10 = new File(classLoader.getResource(message10FileName).getFile()); String messageString = FileUtils.readFileToString(message10); Report report = validator.check(messageString, "ORU_R01"); Set<String> keys = report.getEntries().keySet(); int errors = 0; int alerts = 0; for (String key : keys) { List<Entry> entries = report.getEntries().get(key); if (entries != null && entries.size() > 0) { System.out.println("*** " + key + " ***"); for (Entry entry : entries) { switch (entry.getClassification()) { case "Error": Util.printEntry(entry); errors++; break; case "Alert": Util.printEntry(entry); alerts++; break; } } } } assertEquals(1, errors); assertEquals(0, alerts); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void m6607X() {\n try {\n HashMap hashMap = new HashMap();\n hashMap.put(\"is_rename\", \"0\");\n C1390G.m6779b(\"A107|1|3|10\", hashMap);\n HashMap hashMap2 = new HashMap();\n hashMap2.put(\"mark_num\", String.valueOf(this.f5418ga));\n ...
[ "0.5642843", "0.55487996", "0.54839253", "0.5451315", "0.5427114", "0.54184747", "0.5409517", "0.5399814", "0.5352692", "0.5344209", "0.52950364", "0.5270139", "0.5257946", "0.52564025", "0.52492577", "0.52166677", "0.5208688", "0.5183381", "0.5155556", "0.5152402", "0.515037...
0.50532913
33
MSH21 not present, MSH16 is valued 'AL'. Three errors, no alert expected.
@Test public void test11() throws Exception { SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets); ClassLoader classLoader = getClass().getClassLoader(); File message11 = new File(classLoader.getResource(message11FileName).getFile()); String messageString = FileUtils.readFileToString(message11); Report report = validator.check(messageString, "ORU_R01"); Set<String> keys = report.getEntries().keySet(); int errors = 0; int alerts = 0; for (String key : keys) { List<Entry> entries = report.getEntries().get(key); if (entries != null && entries.size() > 0) { System.out.println("*** " + key + " ***"); for (Entry entry : entries) { switch (entry.getClassification()) { case "Error": Util.printEntry(entry); errors++; break; case "Alert": Util.printEntry(entry); alerts++; break; } } } } assertEquals(3, errors); assertEquals(0, alerts); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void mo7352a(C1655s sVar, AdError adError);", "private void m6601R() {\n if (AppFeature.f5609e) {\n this.f5399S.mo6174f(\"0\");\n }\n this.f5399S.mo6172e(\"1\");\n }", "public static int m84097AS(String str) {\n AppMethodBeat.m2504i(3207);\n if (\"fingerPrint\"....
[ "0.6054209", "0.58542305", "0.5748732", "0.5734768", "0.5710863", "0.56333417", "0.5610367", "0.56021065", "0.55711657", "0.5524169", "0.5520859", "0.55063516", "0.548001", "0.5478589", "0.547029", "0.5464033", "0.5448373", "0.54445034", "0.5399206", "0.5391242", "0.53771836"...
0.5304495
34
MSH21.1 not present, MSH16 valued 'NE'. One error, no alert expected.
@Test public void test12() throws Exception { SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets); ClassLoader classLoader = getClass().getClassLoader(); File message12 = new File(classLoader.getResource(message12FileName).getFile()); String messageString = FileUtils.readFileToString(message12); Report report = validator.check(messageString, "ORU_R01"); Set<String> keys = report.getEntries().keySet(); int errors = 0; int alerts = 0; for (String key : keys) { List<Entry> entries = report.getEntries().get(key); if (entries != null && entries.size() > 0) { System.out.println("*** " + key + " ***"); for (Entry entry : entries) { switch (entry.getClassification()) { case "Error": Util.printEntry(entry); errors++; break; case "Alert": Util.printEntry(entry); alerts++; break; } } } } assertEquals(1, errors); assertEquals(0, alerts); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\r\n public void testInvalidMinusAssignmentExpressionWithSIUnits1() throws IOException {\n checkError(\"varD_S-=4km\", \"0xA0177\");\r\n }", "@Test\r\n public void testInvalidRegularAssignmentExpressionWithSIUnits1() throws IOException {\n checkError(\"varD_KMe2perHmSe4 = 3 mm/ks^3h^2...
[ "0.584148", "0.5744597", "0.57345164", "0.5711805", "0.5711552", "0.56838316", "0.5683623", "0.5682532", "0.56523746", "0.5623423", "0.56200755", "0.5588116", "0.5541649", "0.55366135", "0.5521495", "0.5489406", "0.5474654", "0.5474548", "0.5470106", "0.54674596", "0.54652536...
0.5130154
56
MSH21.1 not present, MSH16 not present. One error, no alert expected.
@Test public void test13() throws Exception { SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets); ClassLoader classLoader = getClass().getClassLoader(); File message13 = new File(classLoader.getResource(message13FileName).getFile()); String messageString = FileUtils.readFileToString(message13); Report report = validator.check(messageString, "ORU_R01"); Set<String> keys = report.getEntries().keySet(); int errors = 0; int alerts = 0; for (String key : keys) { List<Entry> entries = report.getEntries().get(key); if (entries != null && entries.size() > 0) { System.out.println("*** " + key + " ***"); for (Entry entry : entries) { switch (entry.getClassification()) { case "Error": Util.printEntry(entry); errors++; break; case "Alert": Util.printEntry(entry); alerts++; break; } } } } assertEquals(1, errors); assertEquals(0, alerts); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void validateRpd13s7()\n {\n // This guideline cannot be automatically tested.\n }", "public static void m5831h() {\n if (f4669a != null) {\n f4669a.m12578a(\"Back_web_sucecess_incorrect_num\", null);\n }\n Answers.getInstance().logCustom(new CustomEvent(\"Back...
[ "0.5801291", "0.57316214", "0.57235587", "0.5721573", "0.5703738", "0.5700092", "0.56535363", "0.5650405", "0.56209844", "0.5606911", "0.5595981", "0.5594909", "0.55779505", "0.5574252", "0.5546643", "0.5544935", "0.55351245", "0.55204713", "0.55070275", "0.5504566", "0.55023...
0.5512753
18
MSH21.1 present, but different from 'PHLabReportAck', MSH16 valued 'NE'. No error, no alert expected.
@Test public void test14() throws Exception { SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets); ClassLoader classLoader = getClass().getClassLoader(); File message14 = new File(classLoader.getResource(message14FileName).getFile()); String messageString = FileUtils.readFileToString(message14); Report report = validator.check(messageString, "ORU_R01"); Set<String> keys = report.getEntries().keySet(); int errors = 0; int alerts = 0; for (String key : keys) { List<Entry> entries = report.getEntries().get(key); if (entries != null && entries.size() > 0) { System.out.println("*** " + key + " ***"); for (Entry entry : entries) { switch (entry.getClassification()) { case "Error": Util.printEntry(entry); errors++; break; case "Alert": Util.printEntry(entry); alerts++; break; } } } } assertEquals(0, errors); assertEquals(0, alerts); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void test13() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message13 = new File(classLoader.getResource(message13FileName).getFile());\n String messageStrin...
[ "0.5955283", "0.58620965", "0.57509834", "0.5717829", "0.56428117", "0.5579113", "0.5572328", "0.54944676", "0.5487572", "0.54720014", "0.5439973", "0.54395586", "0.5426946", "0.5426726", "0.5375653", "0.53705794", "0.52890146", "0.5273237", "0.52514553", "0.52454877", "0.523...
0.5742603
3
MSH21.1 present, but different from 'PHLabReportAck', MSH16 not present. No error, no alert expected.
@Test public void test15() throws Exception { SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets); ClassLoader classLoader = getClass().getClassLoader(); File message15 = new File(classLoader.getResource(message15FileName).getFile()); String messageString = FileUtils.readFileToString(message15); Report report = validator.check(messageString, "ORU_R01"); Set<String> keys = report.getEntries().keySet(); int errors = 0; int alerts = 0; for (String key : keys) { List<Entry> entries = report.getEntries().get(key); if (entries != null && entries.size() > 0) { System.out.println("*** " + key + " ***"); for (Entry entry : entries) { switch (entry.getClassification()) { case "Error": Util.printEntry(entry); errors++; break; case "Alert": Util.printEntry(entry); alerts++; break; } } } } assertEquals(0, errors); assertEquals(0, alerts); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void test13() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message13 = new File(classLoader.getResource(message13FileName).getFile());\n String messageStrin...
[ "0.5947164", "0.58747685", "0.5755639", "0.5721783", "0.56545997", "0.5643998", "0.5490188", "0.54895216", "0.5489191", "0.5455424", "0.5453558", "0.5436306", "0.54210204", "0.5420528", "0.5408527", "0.5387252", "0.523633", "0.52335364", "0.5200824", "0.5164473", "0.5127857",...
0.565584
4
This method will make a copy of the environment and not a copy of the creatures in the environment
public Environment(Environment e){ this.creatureList = new ArrayList<Creature>(); sandboxMap = new int[e.sandboxMap.length][e.sandboxMap[0].length]; for (int i = 0; i < sandboxMap.length; i++){ for (int j = 0; j < sandboxMap[i].length; j++){ sandboxMap[i][j] = e.sandboxMap[i][j]; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void createEnvironment() {\n //create a list of collidable objects and a list of sprite objects\n List<Collidable> collidables = new ArrayList<Collidable>();\n List<Sprite> spriteList = new ArrayList<Sprite>();\n //update the game's environment to be the collidables list.\n ...
[ "0.62736577", "0.61426365", "0.59756565", "0.57616735", "0.56631196", "0.56631196", "0.56335837", "0.5588786", "0.554314", "0.552496", "0.5519837", "0.541511", "0.5384807", "0.535702", "0.53533536", "0.5332816", "0.52818954", "0.52789146", "0.5273526", "0.52642274", "0.525000...
0.6518455
0
Does the main work provided by this plugin.
public void execute() throws MojoExecutionException { if (projectVersion == null) { throw new MojoExecutionException("projectVersion cannot be null."); } String squirrelsqlVersion = projectVersion; String timestampPattern = "yyyyMMdd_kkmm"; if (!projectVersion.toLowerCase().endsWith("-snapshot")) { SimpleDateFormat sdf = new SimpleDateFormat(timestampPattern); try { String date = sdf.format(new Date()); squirrelsqlVersion = "Snapshot-" + date; } catch (IllegalStateException e) { log.error("Could not convert date format pattern " + timestampPattern); throw e; } } Properties props = project.getProperties(); props.put(VERSION_PROPERTY_KEY, squirrelsqlVersion); System.setProperty(VERSION_PROPERTY_KEY, squirrelsqlVersion); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void internalRun() {\n work();\n }", "public void run() {\r\n\t\t// overwrite in a subclass.\r\n\t}", "@Override\n\tprotected void postRun() {\n\n\t}", "public static void setup()\n\t{\n\t\tregisterEvent(calico.plugins.events.clients.ClientConnect.class);\n\t\tregisterEvent(calico.plugins...
[ "0.6197215", "0.612493", "0.610911", "0.6072115", "0.6054889", "0.6054889", "0.6037613", "0.60367626", "0.6033538", "0.6018043", "0.60163593", "0.60044044", "0.6004092", "0.6003603", "0.5993083", "0.5985791", "0.5955702", "0.59390473", "0.59337413", "0.59277177", "0.59100956"...
0.0
-1
/ In: A Card array representing winnings from either player Out: An integer containing the score calculated from the winnings.
static int calculateScore(Card[] winnings) { int score = 0; for (Card card : winnings) if (card != null) score++; else break; return score; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void displayPlayerWinnings()\n {\n for(int card = 0; card < playerCardsWon; card++)\n {\n System.out.println(playerWinnings[card].toString());\n }\n }", "public int trickWinner(){\n Card.NUMBER one = player1Play.getValue();\n Card.NUMBER two = player2Play.getValue(...
[ "0.6462858", "0.64117765", "0.61951417", "0.6172232", "0.6166382", "0.6143474", "0.6137308", "0.61175525", "0.6107694", "0.60899746", "0.6064572", "0.60437274", "0.6034763", "0.6023471", "0.5987517", "0.5974352", "0.59734625", "0.59468454", "0.5946048", "0.59399337", "0.59250...
0.7184643
0
/ In: [1] The Card array to add the won cards to. [2] An arbitrary number of Card objects representing the won cards. Out: Nothing
static void addToWinnings(Card[] winnings, Card... cards) { //Find the first null position in the winnings array and place //each card in that position. for (int i = 0; i < cards.length; i++) for (int j = 0; j < winnings.length; j++) if (winnings[j] == null) { winnings[j] = new Card(cards[i]); break; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addCard(Card card, GamePlayer GP){\n for(int i=0; i<4; i++){\n if(cardsPlayed[i] == null){\n cardsPlayed[i]=card;\n if(i == 0){\n suit = card.getSuit();\n }\n break;\n }\n }\n }", "pu...
[ "0.6687374", "0.6335549", "0.62825334", "0.62699974", "0.61374", "0.6080177", "0.6020294", "0.6008968", "0.59937924", "0.5969053", "0.5966191", "0.5898055", "0.58941305", "0.5882039", "0.5839654", "0.58384454", "0.5838033", "0.58259493", "0.5818611", "0.5806106", "0.5778634",...
0.7316227
0
/ In: A Card object representing the card that the human player picked Out: An integer representing the position in the computer's hand of the card it chooses to play. This function makes this game very hard to win. The computer knows which card the human chooses to play. It chooses which card to play based on this.
static int getComputerCard(Card playerCard) { //The computer will iterate through different possible cards it might choose to play. //This represents a chosen card at any given time. Card possibleCard = null; //The position in the computer's hand where the possibleCard is stored. int cardPosition = 0; //True if the computer has a card of higher value than the player's. boolean hasHigherCard = false; //Iterate through the computer's hand, trying to find a card higher than the player's for (int i = 0; i < highCardGame.getHand(0).getNumCards(); i++) { if (playerCard.compareTo(highCardGame.getHand(0).inspectCard(i)) < 0) { //The computer has a higher card. if (possibleCard != null) { //If this card is lower than the possible card, but can still beat the player, then replace possible card. if (possibleCard.compareTo(highCardGame.getHand(0).inspectCard(i)) > 0) { possibleCard = new Card(highCardGame.getHand(0).inspectCard(i)); cardPosition = i; } } else { //If the computer has not yet chosen a possible card, choose this one. possibleCard = new Card(highCardGame.getHand(0).inspectCard(i)); hasHigherCard = true; cardPosition = i; } } } if (!hasHigherCard) { //If the computer does not have a card that can beat the player, then feed the lowest card //that the computer has to the player. for (int i = 0; i < highCardGame.getHand(0).getNumCards(); i++) if (playerCard.compareTo(highCardGame.getHand(0).inspectCard(i)) >= 0) { if (possibleCard != null) { if (possibleCard.compareTo(highCardGame.getHand(0).inspectCard(i)) > 0) { possibleCard = new Card(highCardGame.getHand(0).inspectCard(i)); cardPosition = i; } } else { possibleCard = highCardGame.getHand(0).inspectCard(i); cardPosition = i; } } } return cardPosition; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Card PlayCard() {\n\t Card ret = null;\n\t Card card;\n\t if (mCardCount > 0) {\n\t\t // To work out what card to play, see what cards can be played\n\t\t \tCard[] playableCards;\n\t\t \tplayableCards = mRules.GetPlayableCards();\n\t\t \tCard[] selectedCards;\n\t\t \tselectedCards = new Card[8];\n\t...
[ "0.74133784", "0.7336695", "0.72532815", "0.7204127", "0.71322954", "0.7028041", "0.6975031", "0.69401246", "0.6867712", "0.6841518", "0.66775084", "0.6670005", "0.6644365", "0.66268", "0.66077554", "0.65754086", "0.6542449", "0.65315914", "0.6519754", "0.6505161", "0.6491849...
0.7635844
0
/ In: A Card object Out: An integer representing that card's value
static int getCardPointValue(Card card) { if (card.errorFlag) return -1; String values = new String(Card.validCardValues); return cardPointValues[values.indexOf(card.getValue())]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getCardValue(int card) {\n\t\tint result = card;\n\t\tswitch (card) {\n\t\tcase 11:\n\t\tcase 12:\n\t\tcase 13:\n\t\t\tresult = 10;\n\t\t}\n\t\treturn result;\n\t}", "public int getCardValue()\n {\n return cardValue; \n }", "public int getValue() {\n\t\tif (!this.isCard()) {\n\t\t\tSyst...
[ "0.7797333", "0.7639451", "0.75987756", "0.75157064", "0.71641886", "0.7119415", "0.7090305", "0.70451254", "0.70416135", "0.7000696", "0.6959939", "0.69179726", "0.6876641", "0.6811983", "0.6801134", "0.67904955", "0.67904955", "0.67695904", "0.6720403", "0.6720403", "0.6699...
0.66931444
25
/ In: A card object that the caller wants an image for Out: An Icon containing the image
public static Icon getIcon(Card card) { //Load all of the card icons if they haven't been already. if (!GUICard.iconsLoaded) GUICard.loadCardIcons(); //return the appropriate card icon. return iconCards[valueAsInt(card)][suitAsInt(card)]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static ImageIcon getCardImage(Card card) {\r\n // Use image order, which is different from value order.\r\n String CardImageFileName = card.getCardImg();\r\n String path = String.format(IMAGE_PATH_FORMAT, CardImageFileName);\r\n return getIcon(path);\r\n }", "public ImageIco...
[ "0.7342288", "0.7312227", "0.7186173", "0.6828969", "0.68220353", "0.67514676", "0.67374176", "0.6726198", "0.6726198", "0.668909", "0.6658882", "0.6658882", "0.6650844", "0.66359836", "0.661377", "0.660889", "0.66031843", "0.6590617", "0.65781283", "0.6539564", "0.6497865", ...
0.6397766
22
/ In: Nothing Out: Nothing Loads all of teh card icons from the images directory. If the images directory is not in the right place, then the user is prompted to select a directory where the images can be found.
private static void loadCardIcons() { //If the images folder doesn't exist, if (!(new File(GUICard.iconFolderPath).exists())) { //Prompt the user for a valid image folder. JOptionPane.showMessageDialog(null, "By deafult ../images/ is used to store card icon images, but ../images/ does not exist. Press OK to select the folder where card icon images are stored. Press cancel in the forthcoming dialog window to exit this program."); JFileChooser chooser = new JFileChooser("."); chooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY); chooser.setMultiSelectionEnabled(false); chooser.showDialog(null, "Select"); File selectedFile = chooser.getSelectedFile(); //Exit the program if a valid image folder is not provided. if (selectedFile == null) System.exit(0); GUICard.iconFolderPath = selectedFile.getPath(); System.out.println(iconFolderPath); } //Load each of the cards into the appropriate position in the iconCards array. for (int i = 0; i < Card.validCardValues.length; i++) for (int j = 0; j < VALID_SUITS.length; j++) { //If a card cannot be loaded, tell the user and exit the application. if (!new File(iconFolderPath + "/" + Card.validCardValues[i] + VALID_SUITS[j] + ".gif").exists()) { JOptionPane.showMessageDialog(null, Card.validCardValues[i] + VALID_SUITS[j] + ".gif could not be found in the icon folder. Program execution will now stop."); System.exit(0); } iconCards[i][j] = new ImageIcon(iconFolderPath + "/" + Card.validCardValues[i] + VALID_SUITS[j] + ".gif"); } //Load the back of the card icon. iconBack = new ImageIcon(iconFolderPath + "/BK.gif"); GUICard.iconsLoaded = true; //Make sure this function is not called again. }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static void loadCardIcons()\n {\n if(iconsLoaded == false)\n {\n //arrays for suits and ranks\n String[] suits = {\"C\", \"D\", \"H\", \"S\"};\n String[] ranks = {\"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\", \n \"T\", \"A\", \"J\", \"Q\", \"K\", \"X\"...
[ "0.7295657", "0.6593426", "0.62699306", "0.6261478", "0.6183413", "0.60783195", "0.59495616", "0.5944569", "0.5923273", "0.5884669", "0.58257747", "0.578596", "0.5752771", "0.57385707", "0.5725863", "0.5718007", "0.5679597", "0.56509405", "0.5635986", "0.5618256", "0.5599619"...
0.76824
0
/ In: A card object Out: An integer representing the row in iconCards that contains that value.
private static int valueAsInt(Card card) { String values = new String(Card.validCardValues); return values.indexOf(card.getValue()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static public Icon getIcon(Card card)\n {\n loadCardIcons();\n // return iconCards[valueAsInt(card)][suitAsInt(card)];\n return iconCards[suitAsInt(card)][valueAsInt(card)];\n // return iconCards[0][0];\n }", "private int highCard() {\n\t\tint highCard = 0;\n\t\tfor (int counter...
[ "0.61320114", "0.5796064", "0.5733073", "0.5701161", "0.5677203", "0.56761986", "0.56631476", "0.5645274", "0.5643325", "0.56427467", "0.5636376", "0.5634097", "0.55950063", "0.5576622", "0.55512327", "0.5510892", "0.5497961", "0.5494974", "0.54868525", "0.54862183", "0.54583...
0.5779312
2
/ In: A card object Out: An integer representing the column in the iconCards array that contains that suit.
private static int suitAsInt(Card card) { return card.getSuit().ordinal(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int suitNum() {\r\n return this.i;\r\n }", "public static int suit(int card){\n //check if card is out of bounds\n if(card < 1 || card > 52){\n return 0;\n }\n //subtract 1 from card to include multiples of 13\n //add 1 so that it matches up with...
[ "0.6613794", "0.64540774", "0.63238305", "0.6136769", "0.6111638", "0.6047704", "0.6031042", "0.6004407", "0.5999935", "0.59928435", "0.5985066", "0.59542304", "0.59542304", "0.5936215", "0.5932439", "0.59319526", "0.59311265", "0.5905127", "0.5901253", "0.5870276", "0.584280...
0.7137165
0
/ In: Nothing Out: An Icon object containing the back card icon.
public static Icon getBackCardIcon() { //Load all of the icons if they have not been already. if (!GUICard.iconsLoaded) GUICard.loadCardIcons(); return GUICard.iconBack; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static public Icon getBackCardIcon()\n {\n iconBack = new ImageIcon(\"images/\" + \"BK.gif\");\n return iconBack;\n }", "private Image getBackImage() {\n return getImage(\"playing-cards/blue-back.png\");\n }", "public GImage getBack(){\r\n \t\t return back;\r\n\t }", "public Node rend...
[ "0.80608755", "0.76674515", "0.6967381", "0.6703697", "0.65202326", "0.64692855", "0.6465936", "0.6453745", "0.64483213", "0.6413046", "0.63774824", "0.6375087", "0.6358919", "0.63274366", "0.6324186", "0.63198376", "0.615984", "0.61485595", "0.6148182", "0.6134997", "0.61014...
0.8431247
0
/ In: [1] A String represetning the desired window title [2] An integer representing the number of cards per hand [3] An integer value representing the number of players playing on the table Out: Nothing.
public CardTable(String title, int numCardsPerHand, int numPlayers) { super(); //Call JFrame's constructor. this.handPanels = new JPanel[numPlayers]; //Verify that the input is valid. Fix it if it is not. if (numCardsPerHand < 0 || numCardsPerHand > CardTable.MAX_CARDS_PER_HAND) this.numCardsPerHand = 20; this.numCardsPerHand = numCardsPerHand; if (numPlayers < 2 || numPlayers > CardTable.MAX_PLAYERS) this.numPlayers = numPlayers; if (title == null) title = ""; //Set some of the window's attributes. this.setTitle(title); this.setSize(800, 600); this.setMinimumSize(new Dimension(800, 600)); this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); //The card table will use a BorderLayout style. This allows each panel //To have a different height. This allows for a larger play area and smaller //hand areas. BorderLayout layout = new BorderLayout(); this.setLayout(layout); //Both the comptuer and human hand panels will use the flow layout. FlowLayout flowLayout = new FlowLayout(FlowLayout.LEFT); //Crate a titled border for the display of labels indicating //what each panel is for. TitledBorder border = new TitledBorder("Computer Hand"); this.handPanels[0] = new JPanel(); this.handPanels[0].setLayout(flowLayout); this.handPanels[0].setPreferredSize(new Dimension((int) this.getMinimumSize().getWidth() - 50, 105)); //Use a JScrollPane in case the cards per hand is greater than can be displayed in the panel //without a scroll bar. JScrollPane scrollComputerHand = new JScrollPane(this.handPanels[0]); scrollComputerHand.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_NEVER); scrollComputerHand.setBorder(border); this.add(scrollComputerHand, BorderLayout.NORTH); //Create the playing area. border = new TitledBorder("Playing Area"); //The play area will use a grid layout, so that the played cards, labels, and //status text can be displayed in neat columns. GridLayout gridLayoutCardsArea = new GridLayout(1, 2); GridLayout gridLayoutStatusArea = new GridLayout(1, 1); pnlPlayArea = new JPanel(); pnlPlayArea.setBorder(border); layout = new BorderLayout(); pnlPlayArea.setLayout(layout); pnlTimer = new JPanel(); pnlTimer.setLayout(gridLayoutStatusArea); pnlPlayedCards = new JPanel(); pnlPlayedCards.setLayout(gridLayoutCardsArea); pnlPlayerText = new JPanel(); pnlPlayerText.setLayout(gridLayoutCardsArea); pnlStatusText = new JPanel(); pnlStatusText.setLayout(gridLayoutStatusArea); pnlPlayedCards.setPreferredSize(new Dimension((int) this.getMinimumSize().getWidth() - 50, 150)); pnlPlayerText.setPreferredSize(new Dimension(100, 30)); pnlStatusText.setPreferredSize(new Dimension(100, 30)); pnlPlayArea.add(pnlTimer, BorderLayout.EAST); pnlPlayArea.add(pnlPlayedCards, BorderLayout.NORTH); pnlPlayArea.add(pnlPlayerText, BorderLayout.CENTER); pnlPlayArea.add(pnlStatusText, BorderLayout.SOUTH); this.add(pnlPlayArea, BorderLayout.CENTER); ///Create the human's hand area. border = new TitledBorder("Human Hand"); this.handPanels[1] = new JPanel(); this.handPanels[1].setLayout(flowLayout); this.handPanels[1].setPreferredSize(new Dimension((int) this.getMinimumSize().getWidth() - 50, 105)); JScrollPane scrollHumanHand = new JScrollPane(this.handPanels[1]); scrollHumanHand.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_NEVER); scrollHumanHand.setBorder(border); this.add(scrollHumanHand, BorderLayout.SOUTH); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void Title ()\n {\n\tTitle = new Panel ();\n\tTitle.setBackground (Color.white);\n\tchessboard (Title);\n\tp_screen.add (\"1\", Title);\n }", "public void display_title_screen() {\n parent.textAlign(CENTER);\n parent.textFont(myFont);\n parent.textSize(di...
[ "0.6151294", "0.58792484", "0.58282477", "0.5794891", "0.5608451", "0.5602944", "0.549951", "0.54308474", "0.54308474", "0.54308474", "0.54308474", "0.54308474", "0.5424993", "0.54247296", "0.54185796", "0.5396598", "0.5374344", "0.5368026", "0.5363961", "0.53489673", "0.5348...
0.5474014
7
/ In: A MouseEvent object Out: Nothing Fires when the mouse enters a card or status JLabel
public void mouseEntered(MouseEvent e) { JLabel source = (JLabel)e.getSource(); view.highlightLabel(source); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void mouseEntered(MouseEvent e) {\n JLabel x = (JLabel) e.getSource();\n x.setForeground(Color.BLUE);\n levelPanel.setCursor(new Cursor(Cursor.HAND_CURSOR));\n }", "public void mouseEntered( MouseEvent event ){}", "public void mouseEntered (MouseEvent e) {}", "@O...
[ "0.73713005", "0.7242447", "0.71926355", "0.7152478", "0.71368253", "0.71368253", "0.71368253", "0.71368253", "0.71217716", "0.71206325", "0.71206325", "0.71206325", "0.71206325", "0.71206325", "0.71206325", "0.71206325", "0.7100797", "0.70764434", "0.7075516", "0.7072613", "...
0.70120543
26
/ In: A MouseEvent object Out: Nothing Fires when the mouse exits a card or status JLabel
public void mouseExited(MouseEvent e) { JLabel source = (JLabel)e.getSource(); view.deHighlightLabel(source); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void mouseExited(MouseEvent event){\t\n\t\t// We left the card without releasing the mouse press, so we're not counting it as a click\n\t\tclickflag = false;\n\t}", "@Override\n public void mouseExited(MouseEvent e) {\n JLabel x = (JLabel) e.getSource();\n x.setForeground(Color.black);\n ...
[ "0.7794189", "0.76487297", "0.7434441", "0.7411204", "0.7411204", "0.7411204", "0.7411204", "0.7399679", "0.73933065", "0.73425436", "0.7322706", "0.7313474", "0.7305068", "0.7256047", "0.72541845", "0.72061956", "0.71885747", "0.7176047", "0.7176047", "0.7176047", "0.7176047...
0.72586095
13
/ In: A MouseEvent object Out: Nothing Fires when the mouse clicks a card or status JLabel
public void mouseClicked(MouseEvent e) { //The source will always be a JLabel JLabel source = (JLabel)e.getSource(); if(source == view.statusText){ model.initGame(); return; } for(int playerHand = 0; playerHand < view.playerHands.length; playerHand++){ for(int card = 0; card < model.highCardGame.getHand(playerHand).getNumCards(); card++){ if(view.playerHands[playerHand][card].getIcon() == View.GUICard.getBackCardIcon()) continue; if(view.playerHands[playerHand][card] == source){ //A card was clicked. Model.playCard(playerHand, card); return; } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void handleMouseClicked(MouseEvent e, CardLabel clickedLabel){\n\t\tif(status == Status.YOUR_TURN || status == Status.YOUR_FIRST_TURN){\n\t\t\tCardTile clickedTile = you.getCardTile(clickedLabel.getPlace(), clickedLabel.getSeqNo());\n\t\t\tif(clickedTile == null)\n\t\t\t\tclickedTile = opponent.getCardTile(...
[ "0.7299617", "0.7190706", "0.717458", "0.7170466", "0.71585226", "0.71349394", "0.713123", "0.713123", "0.713123", "0.713058", "0.71234447", "0.7123059", "0.7123059", "0.71177256", "0.71039355", "0.7103807", "0.7102388", "0.7102388", "0.7102388", "0.7101252", "0.70930505", ...
0.7356572
0
The only time this is called is when the timer ticks.
public void actionPerformed(ActionEvent e){ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void tick(){\r\n if(timer != 0)\r\n timer++;\r\n }", "@Override\n\tpublic boolean tick() {\n\t\treturn false;\n\t}", "@Override\n public void onTick(long arg0) {\n }", "public void timer() \r\n\t{\r\n\t\tSeconds.tick();\r\n\t \r...
[ "0.7472941", "0.7198207", "0.7050165", "0.7008086", "0.68860704", "0.6825837", "0.67602706", "0.67509884", "0.67509884", "0.67382264", "0.6704333", "0.66888666", "0.6661844", "0.6658044", "0.6649144", "0.6649144", "0.6649144", "0.6649144", "0.6649144", "0.6649144", "0.6649144...
0.0
-1
The deck can consist of multiple packs of cards. / Deck(int) In: An integer specifying the number of packs to build the deck from. Out: Nothing Description: This is a constructor that will build a deck composed of the specified number of packs.
public Deck(int numPacks) { //Build the master pack. this.allocateMasterPack(); //If the user wants more packs than are available, give them the max. if (numPacks > Deck.MAX_PACKS) this.init(Deck.MAX_PACKS); //If the user wants 0 or less packs, give them one. else if (numPacks < 1) this.init(1); else //Otherwise, build the deck with the specified number of packs. this.init(numPacks); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Deck(int numDecks) {\n\t\t// Loop through number of decks, suits, and rank\n\t\tfor (int k = 0; k<numDecks; k++) {\n\t\t\tfor (int i = 1; i <= 4; i++) {\n\t\t\t\tfor (int j = 1; j <= 13; j++) {\n\t\t\t\t\t// Add Card object to linked list\n\t\t\t\t\tdeck.add(new Card(i,j));\n\t\t\t\t\tsize++;\n\t\t\t\t}\n\t...
[ "0.74440926", "0.72974277", "0.72418183", "0.709323", "0.69315386", "0.68453455", "0.68322265", "0.68140674", "0.67584884", "0.67158175", "0.6711135", "0.67024076", "0.6685422", "0.6681803", "0.66359544", "0.6615966", "0.6600558", "0.65884733", "0.65632474", "0.65601015", "0....
0.77669257
0
/ Deck() In: None Out: Nothing Description: This default constructor builds a deck with one pack.
public Deck() { this.allocateMasterPack(); this.init(1); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Deck()\n\t{\n\t\t//call other Constructor defining one deck with out shuffling\n\t\tthis(false);\n\t}", "public Deck() {\n generateDeckOfCards();\n }", "public Deck()\n {\n this(1);\n }", "public Deck() {\n this.deck = new LinkedList<>();\n }", "public Deck()\r\n\t{\r\n\...
[ "0.81980366", "0.8141029", "0.79472643", "0.7833748", "0.7792965", "0.7644585", "0.7578972", "0.73988134", "0.73321396", "0.72866696", "0.7274198", "0.7271141", "0.72197974", "0.71919966", "0.7117476", "0.71143293", "0.70079374", "0.6903259", "0.68891686", "0.6815698", "0.677...
0.8034931
2
/ void init(int) In: An integer whose value is the number of packs to build the deck from. Out: Nothing Description: This will initialize the cards array data member to a complete deck built from the specified number of packs.
public void init(int numPacks) { //Initialize the cards array. this.cards = new Card[numPacks * Deck.MAX_CARDS_IN_PACK]; //Until the total number of cards are reached, keep adding cards from the //master pack. for (int i = 0; i < numPacks * Deck.MAX_CARDS_IN_PACK; i++) { this.cards[i] = this.masterPack[i % Deck.MAX_CARDS_IN_PACK]; } //Set the top card to the last card allocated. this.topCard = numPacks * Deck.MAX_CARDS_IN_PACK; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void init(int numPacks)\n {\n int k, pack;\n\n if (numPacks < 1 || numPacks > 6)\n numPacks = 1;\n\n // hand over the masterPack cards to our deck\n for (pack = 0; pack < numPacks; pack++)\n for (k = 0; k < 52; k++)\n cards[pack*52 + k] = masterPack[k];\n\n ...
[ "0.7720376", "0.7265371", "0.7234178", "0.7206795", "0.71978", "0.71950877", "0.7181294", "0.70739025", "0.7006671", "0.68641835", "0.6804605", "0.67577064", "0.67416584", "0.6726601", "0.6719731", "0.6701483", "0.669166", "0.6678115", "0.6663122", "0.66154337", "0.65838605",...
0.8200314
0
/ void shuffle() In: Nothing Out: Nothing Description: This uses a FisherYates shuffle to shuffle all of the cards in the deck.
public void shuffle() { //Beginning with the top card, decrement i until i is 0. for (int i = this.topCard - 1; i >= 0; i--) { Card tmpCard = this.cards[i]; //Store the card at i, since it will be overwritten. //Choose a random card position from within the deck. int randomPosition = (int) (Math.random() * (this.topCard - 1)); //Take the card from the random position and store it in the ith position. this.cards[i] = this.cards[randomPosition]; //Take the card from the ith position, and put it into the randomly chosen position. this.cards[randomPosition] = tmpCard; //The cards have now been swapped. } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void shuffle(){\n Collections.shuffle(this.deckOfCards);\n }", "public void shuffle() {\n Collections.shuffle(deck);\n }", "public void shuffle() {\n Collections.shuffle(deck);\n }", "public void shuffle() {\r\n\t\tCollections.shuffle(cards);\r\n\t}", "public void shuffl...
[ "0.83366156", "0.8287674", "0.8287674", "0.8255228", "0.8243657", "0.81832135", "0.81549627", "0.81536454", "0.8117233", "0.811654", "0.80041337", "0.7916118", "0.7896074", "0.78396475", "0.78164893", "0.78108054", "0.7701708", "0.7698538", "0.7684625", "0.7663968", "0.764409...
0.6843067
56
/ Card dealCard() In: Nothing Out: A copy of the Card object on the top of the deck. Description: This function makes a copy of the card on the top of the deck, removes that card from the deck, and returns the copy to the caller.
public Card dealCard() { //Return an invalid card if there are no cards in the deck. if (this.topCard < 0) return new Card('0', Card.Suit.spades); else { //Create a copy of the card on the top of the deck. Card card = new Card(this.cards[this.topCard - 1]); //Set the actual card on the top of the deck to null, to destroy it. this.cards[this.topCard - 1] = null; //The topCard is now one less than it was. this.topCard--; //return the copy. return card; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Card deal()\r\n\t{\r\n\t\tCard card = deck.remove(0);\r\n\t\treturn card;\r\n\t}", "@Override\r\n public ICard dealCard() {\r\n //get the first card from top of the deck \r\n ICard top = this.deck[ZERO];\r\n //shift cards to the left, because we get the first one \r\n for (i...
[ "0.82231253", "0.80255616", "0.7985539", "0.78385675", "0.77172154", "0.76667655", "0.7594622", "0.7578953", "0.750718", "0.74391115", "0.74277073", "0.7400945", "0.73846716", "0.7380068", "0.7378167", "0.72670907", "0.7264972", "0.7196671", "0.71542543", "0.71174306", "0.709...
0.83310425
0
/ int getTopCard() In: Nothing Out: An integer whose value is the position of the top card in the deck. Description: This is a basic accessor function.
public int getTopCard() { return this.topCard; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Card getTopCard(){\n\t\treturn getCard(4);\n\t\t\n\t}", "public Card getTopCard() {\n\t\treturn topCard;\n\t}", "public Card topDeckCard(){\n Preconditions.checkArgument(!isDeckEmpty());\n return deck.topCard();\n }", "public Card topCard() {\n Preconditions.checkArgument(!card...
[ "0.86437345", "0.8453638", "0.8289435", "0.81855285", "0.816679", "0.81623834", "0.8137768", "0.7913212", "0.78357077", "0.77902", "0.75070167", "0.74834114", "0.73945856", "0.7389583", "0.7253993", "0.71812487", "0.7134428", "0.7133263", "0.7123681", "0.71199226", "0.7082367...
0.86228305
1
/ Card inspectCard(int) In: An integer representing the position of the card to be inspected. Out: A copy of the card at the specified position, or an invalid card if there is no card in that position. Description: This function returns a Card object whose values are equal to the card in the specified position.
public Card inspectCard(int k) { //If k is invalid, return an invalid card. if (k >= this.topCard || k < 0) return new Card('0', Card.Suit.spades); else //Otherwise, return a copy of the card in position k. return new Card(this.cards[k]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "ICard getCard(int cardIndex) throws IllegalArgumentException;", "public Card inspectCard(int k) {\n if (k >= this.numCards || k < 0)\n return new Card('0', Card.Suit.spades);\n else\n return new Card(this.myCards[k]);\n }", "public Card inspectCard(int k)\r\n {\r\n if (0 <= k...
[ "0.6685246", "0.666091", "0.6295219", "0.6268143", "0.6113591", "0.59031713", "0.5895638", "0.58300775", "0.5792667", "0.577735", "0.576042", "0.5730506", "0.5724839", "0.57179636", "0.571217", "0.56940866", "0.56646645", "0.5618974", "0.5588994", "0.55750513", "0.55499786", ...
0.70188725
0
/ void allocateMasterPack() In: Nothing Out: Nothing Description: This function fills the masterPack if it is not already filled. It fills the pack with valid card values.
private static void allocateMasterPack() { //If Deck.masterPack is null, then it needs to be filled, otherwise, nothing needs to be done. if (Deck.masterPack != null) { //For each suit, fill the masterPack with each valid card value from that suit. for (int i = 0; i < Card.Suit.values().length; i++) { for (int j = 0; j < Card.validCardValues.length; j++) { Deck.masterPack[i * Card.validCardValues.length + j] = new Card(Card.validCardValues[j], Card.Suit.values()[i]); } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void createFullPackOfCards()\r\n {\r\n // Todo\r\n\r\n // Using a for-loop, add all the Card instances to cards.\r\n for ( int i = 0; i < NOOFCARDSINFULLPACK; i ++) {\r\n addTopCard( new Card(i));\r\n }\r\n }", "public Cards( boolean fullPack)\r\n {\r\n ...
[ "0.60052973", "0.58810246", "0.5561061", "0.5518775", "0.54215336", "0.52922416", "0.50832605", "0.5050006", "0.5002565", "0.5002565", "0.5002565", "0.5002565", "0.5002565", "0.5002565", "0.49722216", "0.4921204", "0.48973444", "0.4894606", "0.4892527", "0.48766658", "0.48218...
0.8778677
0
/ In: A card object to add to the deck Out: A boolean value indicating whether the card was able to be added to the deck
public boolean addCard(Card card) { int cardCount = 0; //Check to see if the deck already has the maximum number of cards //of this type. for (Card cardInDeck : this.cards) if (cardInDeck.equals(card)) cardCount++; //Return false is the card will not fit, or if it is invalid. if (cardCount >= this.numPacks || this.topCard >= this.MAX_CARDS || card.errorFlag) return false; this.topCard++; //Add the card object to the deck. this.cards[topCard - 1] = new Card(card); return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean canBeAdded(ICard toBeAddedCard);", "abstract boolean allowedToAdd(Card card);", "@Override\n\tpublic boolean addCard(UnoCard card){\n\t\treturn this.cardList.add(card);\n\t}", "public boolean addCard(Card card)\n {\n if (numOccurrences(card) >= numPacks)\n return false;\n\n cards[...
[ "0.809137", "0.8072958", "0.78914535", "0.7620349", "0.7585922", "0.7543948", "0.74453586", "0.7322955", "0.71963656", "0.70973384", "0.70742875", "0.70655245", "0.69818914", "0.6968876", "0.6911325", "0.68889755", "0.68009007", "0.6777918", "0.6737587", "0.67046255", "0.6634...
0.78867936
3
/ In: Nothing Out: An itneger indicating the number of cards in the deck.
public int getNumCards() { return this.topCard; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int size()\r\n\t{\r\n\t\treturn deck.size();\r\n\t}", "public int size() {\n return deck.size();\n }", "public int GetDeckSize(){\n System.out.println(\"DECK \" + deck.size());\n\n return deck.size();\n }", "public int getSizeOfDeck(){\n return cardDeck.size();\n }...
[ "0.80978525", "0.80034184", "0.78531677", "0.7844213", "0.78410214", "0.78107435", "0.7750234", "0.7728256", "0.76746553", "0.76579785", "0.764295", "0.7631809", "0.7630788", "0.76044595", "0.75918865", "0.7564725", "0.7562073", "0.75481755", "0.7542975", "0.7495451", "0.7490...
0.70613724
34
/ In: A card object to remove from the deck Out: A boolean value indicating if the card was able to be removed from the deck.
public boolean removeCard(Card card) { //Iterate through the deck to find the card. for (int i = 0; i < this.cards.length; i++) if (this.cards[i].equals(card)) { //If the card is found, then remove it from the deck. //replace it with the topCard this.cards[i] = new Card(this.cards[topCard - 1]); this.topCard--; return true; } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean canBeRemoved(int cardIndex);", "public boolean removePlayerCard(GreenPlayerCard card) {\r\n\t\treturn playerCards.remove(card);\r\n\t}", "public boolean remove(Card c) {\n if (cards.remove(c)) {\n orginalOrder.remove(c);\n cardsPerSuit[c.getSuit().ordinal()]--;\n ...
[ "0.8007521", "0.7359825", "0.7223539", "0.70988977", "0.7027925", "0.696867", "0.68102944", "0.66676056", "0.6666845", "0.66516876", "0.6645475", "0.66368884", "0.6621351", "0.6465813", "0.64374954", "0.6410874", "0.6410577", "0.631593", "0.63143784", "0.6314293", "0.62414086...
0.7639033
1
/ In: Nothing Out: Nothing Sorts the cards in the deck
public void sort() { Card.arraySort(this.cards, this.topCard); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void sortDeck() {\n\t\tfor(int i = 0; i < getCount() - 1; i++) {\n\t\t\tfor(int j = i + 1; j < getCount(); j++) {\n\t\t\t\tif(aktuellesDeck[i].compareTo(aktuellesDeck[j]) == 1) {\n\t\t\t\t\tSkatCard speicherCard = new SkatCard(aktuellesDeck[i].getSuit(), aktuellesDeck[i].getRank());\n\t\t\t\t\t...
[ "0.79624015", "0.70584756", "0.70002025", "0.69680345", "0.69117165", "0.68548816", "0.6849615", "0.68272465", "0.6815935", "0.6762261", "0.66790026", "0.6655873", "0.66402763", "0.6582242", "0.65807754", "0.6524183", "0.6495335", "0.6494394", "0.64909464", "0.6490516", "0.64...
0.65897924
13
/ In: An object Out: An int indicating if the object is less than, greater than, or equal to the object performing the comparison.
public int compareTo(Object t) { if (t.getClass() != this.getClass()) return 1; Card c = (Card) t; String strRanks = new String(valueRanks); if (strRanks.indexOf(c.getValue()) < 0) return 1; if (strRanks.indexOf(c.getValue()) < strRanks.indexOf(this.getValue())) return 1; if (strRanks.indexOf(c.getValue()) == strRanks.indexOf(this.getValue())) return 0; if (strRanks.indexOf(c.getValue()) > strRanks.indexOf(this.getValue())) return -1; return 1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void testObjCompare()\n {\n assertEquals( Comparator.EQUAL, Util.objCompare(null,null) );\n assertEquals( Comparator.LESS, Util.objCompare(new Integer(10), new Integer(20)) );\n assertEquals( Comparator.GREATER, Util.objCompare(new Integer(25), new Integer(20)) );\n ...
[ "0.65292716", "0.6297877", "0.6267485", "0.6261624", "0.6260348", "0.6205341", "0.61652577", "0.6133865", "0.6121487", "0.61148846", "0.60772884", "0.60738164", "0.6070496", "0.605957", "0.60564536", "0.6052482", "0.6016914", "0.5979752", "0.5953252", "0.59520644", "0.5946798...
0.0
-1
/ In: [1] An array of card objects to be sorted [2] The number of objects in parameter 1 This uses a bubble sort to sort the cards in the cards array.
static void arraySort(Card[] cards, int arraySize) { //Swapped will change to true if any swapping occurs in the //loop below. boolean swapped = false; do { swapped = false; //Go through each element in the array for (int i = 1; i < arraySize; i++) { //If an element is larger thant he one after it, if (cards[i - 1].compareTo(cards[i]) > 0) { //Swap those elements. Card tmpCard = new Card(cards[i - 1]); cards[i - 1] = new Card(cards[i]); cards[i] = new Card(tmpCard); swapped = true; } } } while (swapped); //Continue until this loop runs with no swapping. }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void sort() {\n Card.arraySort(this.myCards, numCards);\n }", "void sort()\n {\n Card.arraySort(myCards, numCards);\n }", "public void sort()\r\n {\r\n Card.arraySort(myCards, myCards.length);\r\n }", "void sort()\n {\n Card.arraySort(cards, topCard);\n }", "public void so...
[ "0.7676851", "0.754212", "0.7466925", "0.7446523", "0.7089897", "0.6888639", "0.6716242", "0.65134865", "0.6433839", "0.6383947", "0.6371299", "0.630868", "0.629394", "0.6286171", "0.61696273", "0.6130802", "0.6128282", "0.61053646", "0.60689086", "0.60689086", "0.60156065", ...
0.7091985
4
/ Card(char, Suit) In: A char representing the card's value, and a Suit representing the card's suit. Out: Nothing Description: This is a constructor that takes a value and a suit for a card. This will create a card of the specified value and suit.
public Card(char value, Suit suit) { this.set(value, suit); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Card(String value, String suit) {\n this.value = value;\n this.suit = suit;\n }", "public Card(String suit, int value)\n {\n this.suit = suit;\n this.value = value;\n \n }", "public Card(String suit, int value) {\n this.value = value;\n this.sui...
[ "0.8432872", "0.83356154", "0.82767296", "0.8250045", "0.82058215", "0.81192964", "0.78494835", "0.7819709", "0.78012484", "0.77987427", "0.76975363", "0.76293296", "0.7612589", "0.7579837", "0.75326246", "0.7528765", "0.74874", "0.7459573", "0.74167913", "0.72875106", "0.721...
0.8885586
0
/ Card() In: Nothing Out: Nothing Description: This is a default constructor that takes no values. It will create an Ace of Spades.
public Card() { this.set('A', Suit.spades); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Card()\n {\n suit = 0;\n rank = Card.ACE;\n }", "public Card () {}", "public Card()\n {}", "public Card()\n {\n\t// Local constants\n\n\t// Local variables\n\n\t/************ Start Card Method *****************/\n\n\t// Set face value to null\n\tfaceValue = null;\n\n\t// Set true val...
[ "0.8083181", "0.78388685", "0.7741092", "0.7693176", "0.7386531", "0.73556036", "0.7325361", "0.7291956", "0.72799057", "0.7235718", "0.7225177", "0.7198685", "0.7107009", "0.70863193", "0.7056683", "0.705652", "0.69922423", "0.69753164", "0.6928167", "0.68986636", "0.6893225...
0.66517246
34
/ Card(Card) In: A Card object Out: Nothing Description: This is a copy constructor that returns a NEW card with the same values as the card passed into it.
public Card(Card card) { this.set(card.value, card.suit); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Card copy(){\n return new Card(Suits, Value);\n }", "public Card makeCopy(){\n return new Card(vimage);\n }", "public Card(Card orig){\n this.cardType = orig.cardType;\n this.cardRank = orig.cardRank;\n this.cardSuit = orig.cardSuit;\n scaleCard(this.cardT...
[ "0.81357294", "0.7956693", "0.74072963", "0.71553856", "0.6979305", "0.69130486", "0.6894668", "0.6815094", "0.6785218", "0.67056096", "0.664809", "0.6509977", "0.65088975", "0.6507339", "0.6478945", "0.6432499", "0.6426862", "0.64100784", "0.6401489", "0.6398346", "0.6380537...
0.77016807
2
/ boolean set(char, Suit) In: A char representing the card's value and a Suit representing the card's suit. Out: True if the value and suit are valid, false if otherwise. Description: This set's the card's suit and value, if they are valid. Otherwise, it sets the card's errorFlag to true.
public boolean set(char value, Suit suit) { if (Card.isValid(value, suit)) { this.errorFlag = false; this.value = value; this.suit = suit; return true; } else { this.errorFlag = true; return false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean setSuit(char inSuit) {\r\n\t\tinSuit = Character.toUpperCase(inSuit);\r\n\t\tboolean status = false;\r\n\t\t\r\n\t\tswitch (inSuit) {\r\n\t\tcase 'S':\r\n\t\tcase 'H':\r\n\t\tcase 'C':\r\n\t\tcase 'D':\r\n\t\tcase 'T':\r\n\t\tcase '1':\r\n\t\tcase '2':\r\n\t\tcase '3':\r\n\t\t\tsuit = inSuit;\r\n\t\...
[ "0.7162835", "0.6860577", "0.64396065", "0.6414689", "0.6374922", "0.63528794", "0.62139255", "0.6165588", "0.6156942", "0.61393034", "0.6121284", "0.6074872", "0.6030928", "0.5999517", "0.5886699", "0.57635945", "0.5734741", "0.5650587", "0.56468314", "0.5615969", "0.5557574...
0.86791205
0
/ boolean isValid(char, Suit) In: A char representing the card's value and a Suit representing its suit. Out: True if the value is valid, false if otherwise. Description: This function determines whether the value passed to it is a valid value for a card. It checks the value against the valid values stored in Card.validCardValues.
private static boolean isValid(char value, Suit suit) { for (char validValue : Card.validCardValues) if (String.valueOf(validValue).toLowerCase().equals(String.valueOf(value).toLowerCase())) return true; return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean set(char value, Suit suit) {\n if (Card.isValid(value, suit)) {\n this.errorFlag = false;\n this.value = value;\n this.suit = suit;\n return true;\n } else {\n this.errorFlag = true;\n return false;\n }\n }", "private boolean isValid...
[ "0.7382155", "0.6446689", "0.63586426", "0.61521864", "0.611632", "0.6106851", "0.60365224", "0.59559727", "0.5844722", "0.5755784", "0.57509726", "0.57420695", "0.5724269", "0.56948334", "0.56683546", "0.5637216", "0.56152344", "0.56008995", "0.55958503", "0.55825245", "0.55...
0.80211437
0
/ char getValue() In: Nothing Out: A char holding the card's value. Description: This is an accessor for the card's value.
public char getValue() { return value; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public char getValue()\n\t{\n\t\treturn value;\n\t}", "public char charValue() {\n return value;\n }", "public String getCardValue() {\n return Cvalue;\n }", "public char Get() {\n\t\treturn myChar;\n\t}", "private byte getValue() {\n\t\treturn value;\n\t}", "public byte getValue() {\...
[ "0.858945", "0.81979924", "0.77326256", "0.74724793", "0.7369775", "0.7121566", "0.70561546", "0.70313334", "0.6973804", "0.678774", "0.67814106", "0.67499113", "0.6747899", "0.67290473", "0.67221135", "0.6698846", "0.6691585", "0.66451484", "0.663381", "0.6624049", "0.661490...
0.86300623
0
/ Suit getSuit() In: Nothing Out: The card's suit type. Description: This is an accessor for the card's suit.
public Suit getSuit() { return this.suit; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Suit getSuit() {\n\t\treturn suit;\n\t}", "public Suit getSuit() {\r\n\t\treturn this.suit;\r\n\t}", "public Suit getSuit() {\n return suit;\n }", "public Suits getSuit() {\n\t\treturn suit;\n\t}", "public String getSuit()\n {\n\t// Local constants\n\n\t// Local variables\n\n\t/**********...
[ "0.8536454", "0.8474654", "0.84272766", "0.83966964", "0.8372117", "0.83508027", "0.8328799", "0.8328799", "0.8306775", "0.82920384", "0.8261609", "0.8237789", "0.822481", "0.8212079", "0.8183862", "0.81395745", "0.8139469", "0.80968326", "0.80612725", "0.8054439", "0.8054439...
0.83545864
5
/ String toString() In: Nothing Out: A String object containing the value and suit of the card, or [INVALID CARD] if the errorFlag is set to true. Description: This returns the card's value to the caller in String form.
public String toString() { if (this.errorFlag == true) return "[INVALID CARD]"; else return this.value + " of " + suit.toString(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public String toString() {\n CardValue cardValue = new CardValue(value).invoke();\n\n // Change the value to the actual name when printing out\n // the card.\n\n return cardValue.getValueName() + \" of \" + suit;\n }", "public String toString(){\n String card ...
[ "0.805353", "0.7934607", "0.76563036", "0.7561195", "0.7301019", "0.7280859", "0.7203827", "0.71757054", "0.71748734", "0.7111289", "0.70974815", "0.70685005", "0.7045587", "0.7038859", "0.7029459", "0.7023606", "0.6951121", "0.68677795", "0.6864208", "0.6852423", "0.68263215...
0.9040196
0
/ In: A card object Out: A boolean value. True if the cards are equal, false if otherwise.
public boolean equals(Card c) { if (this.getValue() == c.getValue() && this.getSuit() == c.getSuit()) return true; return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean equals(Card card){\n return (this.getCardValue() == card.getCardValue());\n }", "boolean similarCard(Card c);", "public static boolean sameCard(Card card1, Card card2){\r\n return (card1.rank == card2.rank && card1.suit == card2.suit);\r\n }", "@Override\n\tpublic boolean e...
[ "0.7866549", "0.76809335", "0.7624251", "0.751498", "0.7471979", "0.7370306", "0.72697914", "0.72531855", "0.7253145", "0.7153623", "0.70943207", "0.7018343", "0.69878286", "0.6984242", "0.6932757", "0.6859207", "0.6844733", "0.68346256", "0.6812787", "0.680465", "0.6801684",...
0.7082593
11
/ Hand() In: Nothing Out: Nothing Description: The default constructor for Hand does not actually do anything.
public Hand() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Hand(){}", "public Hand () //No arg\n\t{\n\t\tthis.cardsInHand = 0;\n\t\tthis.handSize = 5;\n\t}", "public Hand() {\r\n\t\t\r\n\t}", "public Hand() {\n this.hole1 = new BlankCard();\n this.hole2 = new BlankCard();\n showCards = false;\n }", "public Hand()\n\t{\n\t\thand = new...
[ "0.89953953", "0.88530725", "0.8732816", "0.8170031", "0.8075864", "0.79682744", "0.7596351", "0.7500445", "0.74300146", "0.73211944", "0.72558796", "0.720355", "0.704504", "0.7028394", "0.7019739", "0.6948191", "0.6948191", "0.69450325", "0.67640656", "0.6757502", "0.6718334...
0.8659175
3
/ In: Nothing Out: Nothing Sorts all of the cards in the hand object.
void sort() { Card.arraySort(this.myCards, numCards); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void sortHand(){\n\t\thand.sort(PlayingCard.PlayingCardComparator_ACEHIGH);\n\t}", "public void sortHand(){\n Arrays.sort(Hand);\n }", "@Override\n\t\n\tpublic void sortHand(PlayingCard[][] cards) {\n\t\tfor(int k = 0; k < cards.length; k++) {\n\t\t\tPlayingCard [] hand = cards[k];\n\t\t\t\n\t...
[ "0.81867355", "0.793171", "0.7595467", "0.7454618", "0.70789516", "0.70459694", "0.69861615", "0.6985108", "0.6947369", "0.6889746", "0.68435985", "0.679587", "0.66597724", "0.65930426", "0.6582829", "0.65760446", "0.65411997", "0.652425", "0.64995813", "0.64744747", "0.64438...
0.7109022
4
/ void resetHand() In: Nothing Out: Nothing Description: This sets the hand to its default state, containing no cards.
public void resetHand() { this.myCards = new Card[MAX_CARDS]; this.numCards = 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void resetHand()\r\n\t{\r\n\t\thandCount = 0;\r\n\t\tstand = false;\r\n\t}", "public void resetHand()\r\n {\r\n myCards = new Card[MAX_CARDS];\r\n numCards = 0;\r\n }", "public void clearHand() {\n\t\t_hand.clearHand();\n\n\t}", "public void resetActiveHand() {\n\t\tif (activeHand != nul...
[ "0.8879864", "0.8376941", "0.8209056", "0.8142579", "0.80779594", "0.7847258", "0.78375757", "0.7788418", "0.77542", "0.7730402", "0.7715235", "0.74301445", "0.72979105", "0.7162681", "0.71566236", "0.69952655", "0.6926683", "0.69198036", "0.6895407", "0.6874462", "0.6844765"...
0.8608125
1
/ boolean takeCard(Card) In: A Card object Out: True if there is room in the hand for the card, false if otherwise Description: This takes a Card object and places a copy of that object into the hand.
public boolean takeCard(Card card) { if (this.numCards >= MAX_CARDS) return false; else { this.myCards[numCards] = new Card(card); this.numCards++; return true; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean takeCard(Card card)\r\n {\r\n if (card != null && numCards < MAX_CARDS)\r\n {\r\n myCards[numCards++] = new Card(card.getValue(), card.getSuit());\r\n return true;\r\n }\r\n return false;\r\n }", "public void takeACard(Card card){\n hand.add(card)...
[ "0.77605283", "0.72874486", "0.6534812", "0.6349677", "0.6339647", "0.6289991", "0.6264207", "0.62598526", "0.62585145", "0.61841035", "0.6170144", "0.61563754", "0.6153908", "0.6119176", "0.60964197", "0.6078454", "0.60492224", "0.60350263", "0.60309064", "0.6022675", "0.601...
0.75303763
1
/ Card playCard() In: Nothing Out: A Card object with the same values as the card on the top of the hand. Description: This creates a copy of the first card in the hand and returns it to the caller.
public Card playCard() { Card card = this.myCards[this.numCards - 1]; this.myCards[this.numCards - 1] = null; this.numCards--; return card; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Card playCard()\r\n {\r\n Card removedCard = new Card('E', Card.Suit.valueOf(\"SPADES\"));\r\n if (numCards <= 0)\r\n {\r\n return removedCard;\r\n }\r\n Card playedCard = new Card(myCards[numCards - 1].getValue(),\r\n myCards[numCards - 1].getSuit());\r\n ...
[ "0.745069", "0.74463516", "0.7430298", "0.71187913", "0.7116646", "0.69866616", "0.69839823", "0.69818693", "0.6916091", "0.68931985", "0.6875194", "0.6843831", "0.684107", "0.67553407", "0.67316395", "0.671552", "0.67110366", "0.66575146", "0.6648404", "0.66140604", "0.66066...
0.7698171
0
/ String toString() In: Nothing Out: A String object containing the cards in the hand. Description: This will provide a textual representation of the data contained in hand to the caller.
public String toString() { String handString = "( "; for (int i = 0; i < this.numCards; i++) { handString += this.myCards[i].toString(); if (i != this.numCards - 1) handString += ", "; } handString += " )"; return handString; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String toString(){\n return \"Hand: \" + cards; \n }", "@Override\n public String toString() {\n String hand = \"\";\n for (int i = 0; i < cards.size(); i++) {\n hand += \"(\"+(i+1)+\")\"+cards.get(i).toString() + \", \";\n }\n return hand;\n }", "p...
[ "0.87009835", "0.8535572", "0.84729034", "0.8232304", "0.8219801", "0.8122389", "0.8026344", "0.7857243", "0.7782486", "0.7685221", "0.76264834", "0.75762415", "0.75736636", "0.75489163", "0.74928063", "0.74698067", "0.7461152", "0.7355063", "0.72842854", "0.7262117", "0.7223...
0.8699887
1
/ int getNumCards() In: Nothing Out: An integer whose value is the number of cards in the hand. Description: This is a basic accessor function.
public int getNumCards() { return this.numCards; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getNumCards()\r\n {\r\n return numCards;\r\n }", "public int getNumberOfCards()\n\t{\n\t\treturn numCards;\n\t}", "public int getNumberOfCards() {\r\n\t\treturn numberOfCards;\r\n\t}", "public int numOfCards() {\n return cards.size();\n }", "public int getNumCards() {\n return ...
[ "0.90650165", "0.89068174", "0.8741486", "0.8390125", "0.8286878", "0.82771", "0.82758075", "0.826963", "0.8245277", "0.82030225", "0.79270685", "0.7786041", "0.7731443", "0.7648604", "0.7609052", "0.7408437", "0.7400375", "0.73145163", "0.72804326", "0.7267997", "0.72283125"...
0.90009344
1
/ Card inspectCard(int) In: An integer representing the position of the card to be inspected. Out: A copy of the card at the specified position, or an invalid card if there is no card in that position. Description: This function returns a Card object whose values are equal to the card in the specified position.
public Card inspectCard(int k) { if (k >= this.numCards || k < 0) return new Card('0', Card.Suit.spades); else return new Card(this.myCards[k]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Card inspectCard(int k) {\n //If k is invalid, return an invalid card.\n if (k >= this.topCard || k < 0)\n return new Card('0', Card.Suit.spades);\n else\n //Otherwise, return a copy of the card in position k.\n return new Card(this.cards[k]);\n }", "ICard getCard(...
[ "0.70188725", "0.6685246", "0.6295219", "0.6268143", "0.6113591", "0.59031713", "0.5895638", "0.58300775", "0.5792667", "0.577735", "0.576042", "0.5730506", "0.5724839", "0.57179636", "0.571217", "0.56940866", "0.56646645", "0.5618974", "0.5588994", "0.55750513", "0.55499786"...
0.666091
2
/ In: An integer specifying the position of the card to play in the hand Out: The Card object representing the card in that position This plays a card and removes it from the hand.
public Card playCard(int k) { //If k is invalid, return an invalid card. if (k >= this.numCards || k < 0) return new Card('0', Card.Suit.spades); else { //Return the card in that position, and //move all of the cards after that card //back by one position. Card card = new Card(this.myCards[k]); for (int i = k + 1; i < this.numCards; i++) { this.myCards[i - 1] = this.myCards[i]; this.myCards[i] = null; } this.numCards--; return card; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void playCard(PlayingCard card){\n\t\tplayed = hand.remove(hand.indexOf(card));\t\t\n\t}", "public Card playCard(int index)\n\t{\n\t\treturn currentHand.remove(index);\n\t}", "public Card playCard() {\n Card card = this.myCards[this.numCards - 1];\n this.myCards[this.numCards - 1] = null;\n ...
[ "0.81940264", "0.8030844", "0.7787562", "0.7703821", "0.68735015", "0.6862532", "0.6855371", "0.6834848", "0.6811276", "0.6810668", "0.6777626", "0.67702085", "0.6763355", "0.67101115", "0.6701717", "0.668427", "0.666342", "0.66474307", "0.66350484", "0.663469", "0.6627615", ...
0.6246212
56
an array holding the cards not used in the game. e.g. pinochle does not use cards 28 of any suit
public CardGameFramework(int numPacks, int numJokersPerPack, int numUnusedCardsPerPack, Card[] unusedCardsPerPack, int numPlayers, int numCardsPerHand) { int k; // filter bad values if (numPacks < 1 || numPacks > 6) numPacks = 1; if (numJokersPerPack < 0 || numJokersPerPack > 4) numJokersPerPack = 0; if (numUnusedCardsPerPack < 0 || numUnusedCardsPerPack > 50) // > 1 card numUnusedCardsPerPack = 0; if (numPlayers < 1 || numPlayers > MAX_PLAYERS) numPlayers = 4; // one of many ways to assure at least one full deal to all players if (numCardsPerHand < 1 || numCardsPerHand > numPacks * (52 - numUnusedCardsPerPack) / numPlayers) numCardsPerHand = numPacks * (52 - numUnusedCardsPerPack) / numPlayers; // allocate this.unusedCardsPerPack = new Card[numUnusedCardsPerPack]; this.hand = new Hand[numPlayers]; for (k = 0; k < numPlayers; k++) this.hand[k] = new Hand(); deck = new Deck(numPacks); // assign to members this.numPacks = numPacks; this.numJokersPerPack = numJokersPerPack; this.numUnusedCardsPerPack = numUnusedCardsPerPack; this.numPlayers = numPlayers; this.numCardsPerHand = numCardsPerHand; for (k = 0; k < numUnusedCardsPerPack; k++) this.unusedCardsPerPack[k] = unusedCardsPerPack[k]; // prepare deck and shuffle newGame(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void discard(){\n for(int i = 1 ; i <= 110 ; i++) cardDeck.remove(i);\n }", "public static Card[] getStandardDeck() {\n Card[] deck = new Card[52];\n int s = 0;\n for (SUIT suit : SUIT.values()) {\n for (int i = 12; i > -1; i--) {\n deck[s + i] = new Card(suit, i);\n }\...
[ "0.6663006", "0.6655472", "0.6631206", "0.6502953", "0.6272898", "0.617632", "0.61722237", "0.61501193", "0.6139146", "0.6126807", "0.61165893", "0.60732406", "0.6069699", "0.6067958", "0.60595393", "0.6055631", "0.6033108", "0.6031214", "0.60240513", "0.601284", "0.6005197",...
0.56107503
77
constructor overload/default for game like bridge
public CardGameFramework() { this(1, 0, 0, null, 4, 13); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Bridge() {\n }", "public PlayableGame() {\r\n\r\n }", "public Game() {}", "private Game() {}", "public MiniGame() {\n\n\t}", "public Game() {\n\n\t}", "public BeanGame () {\n\t}", "public OrchardGame() {\n\t\t\n\t}", "public CardGameFramework()\n {\n this(1, 0, 0, null, 4, 13);\...
[ "0.71110535", "0.6985611", "0.6981887", "0.69626635", "0.6931178", "0.69149256", "0.6904134", "0.68891245", "0.6804011", "0.6763402", "0.674457", "0.6664951", "0.66603494", "0.664086", "0.66066813", "0.65733546", "0.65686136", "0.65541834", "0.65359926", "0.6500396", "0.64950...
0.6670086
11
hands start from 0 like arrays on error return automatic empty hand
public Hand getHand(int k) { if (k < 0 || k >= numPlayers) return new Hand(); return hand[k]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void emptyHand();", "public void clearHand() {\n\t\tthis.aHand = new Chips[aHand.length];\n\t}", "public Hand() {\n cards = new int[16];\n numSoft = 0;\n score = 0;\n numCards = 0;\n }", "public void resetHand()\r\n\t{\r\n\t\thandCount = 0;\r\n\t\tstand = false;\r\n\t}", "public void re...
[ "0.67210305", "0.6420343", "0.6314217", "0.62929094", "0.62901396", "0.6264463", "0.6237136", "0.6120415", "0.6018863", "0.6004832", "0.5914154", "0.58693784", "0.5860037", "0.5816304", "0.5810383", "0.5801187", "0.5799723", "0.57890004", "0.57505774", "0.5719783", "0.5707962...
0.52064997
63
returns false if not enough cards, but deals what it can
public boolean deal() { int k, j; boolean enoughCards; // clear all hands for (j = 0; j < numPlayers; j++) hand[j].resetHand(); enoughCards = true; for (k = 0; k < numCardsPerHand && enoughCards; k++) { for (j = 0; j < numPlayers; j++) if (deck.getNumCards() > 0) hand[j].takeCard(deck.dealCard()); else { enoughCards = false; break; } } return enoughCards; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean hasMoreCards() {\n if (cardHold == 0)\n return false;\n else\n return true;\n }", "public boolean canUseCard() {\n \t\tif (usedCard)\n \t\t\treturn false;\n \n \t\tfor (int i = 0; i < cards.length; i++) {\n \t\t\tif (cards[i] > 0)\n \t\t\t\treturn true;\n \t\...
[ "0.75573266", "0.7481898", "0.7202886", "0.7190288", "0.70812535", "0.6978233", "0.69710004", "0.69201803", "0.6900068", "0.68933094", "0.686829", "0.6863743", "0.6854314", "0.6838392", "0.6802944", "0.67970246", "0.67781883", "0.676518", "0.67414284", "0.67396975", "0.672669...
0.72341585
2
Adds an event listener allowing to control using the includeExisting if events will be fired for existing space instances as well.
void add(SpaceInstanceAddedEventListener eventListener, boolean includeExisting);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void remove(SpaceInstanceAddedEventListener eventListener);", "public void addScopeRegistrationListener(ScopeEventListener listener);", "public void addGameEventListener(GameEventListener gameEventListener);", "public void addSpaceStation()\n\t{\n\t\t//if a space station is already spawned, one will not be a...
[ "0.6281587", "0.5455265", "0.53735805", "0.5322808", "0.5301918", "0.5299861", "0.5285217", "0.5285122", "0.52802026", "0.5264637", "0.52620083", "0.5237027", "0.5196199", "0.5196199", "0.5190029", "0.51897186", "0.51640016", "0.5145995", "0.5092585", "0.5091604", "0.50904536...
0.81633794
0
Removes the event listener.
void remove(SpaceInstanceAddedEventListener eventListener);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void removeListener() {\n this.mListener = null;\n }", "public synchronized void removeEventListener(InputListener listener) {\n\t\tlisteners.remove(listener);\n\t}", "public void unregisterListener() {\n\t\tthis.listener = null;\n\t}", "public void removeListener(T listener...
[ "0.8547112", "0.8192288", "0.7965655", "0.795628", "0.78816056", "0.78540725", "0.77792686", "0.77610064", "0.773371", "0.7674351", "0.7599238", "0.75116706", "0.7492932", "0.74914676", "0.7441304", "0.7440949", "0.7434419", "0.73888344", "0.7308889", "0.7291135", "0.7288516"...
0.0
-1
Inflate the menu; this adds items to the action bar if it is present.
@Override public boolean onCreateOptionsMenu( Menu menu ) { getMenuInflater().inflate( R.menu.menu_main, menu ); return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tMenuInflater inflater = getMenuInflater();\n \tinflater.inflate(R.menu.main_activity_actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {...
[ "0.7246102", "0.7201358", "0.7194834", "0.7176498", "0.71066517", "0.7039537", "0.7037961", "0.70112145", "0.70094734", "0.69807225", "0.6944953", "0.69389373", "0.6933199", "0.6916928", "0.6916928", "0.6891486", "0.68831646", "0.68754137", "0.68745375", "0.68621665", "0.6862...
0.0
-1
Handle action bar item clicks here. The action bar will automatically handle clicks on the Home/Up button, so long as you specify a parent activity in AndroidManifest.xml.
@Override public boolean onOptionsItemSelected( MenuItem item ) { int id = item.getItemId(); //noinspection SimplifiableIfStatement if ( id == R.id.action_settings ) { return true; } return super.onOptionsItemSelected( item ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean onOptionsItemSelected(MenuItem item) { Handle action bar item clicks here. The action bar will\n // automatically handle clicks on the Home/Up button, so long\n // as you specify a parent activity in AndroidManifest.xml.\n\n //\n // HANDLE BACK BUTTON\n ...
[ "0.7904066", "0.7804976", "0.7766218", "0.7726716", "0.7631313", "0.76221544", "0.7584775", "0.7530617", "0.74878734", "0.7457033", "0.7457033", "0.74380976", "0.7421477", "0.7402898", "0.7391322", "0.7386477", "0.73788774", "0.7370012", "0.7362617", "0.73555875", "0.73451835...
0.0
-1
Show 3 total pages.
@Override public int getCount() { return 3; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\t\tpublic int getCount() {\n\t\t\t// Show 3 total pages.\n\t\t\treturn 3;\n\t\t}", "@Override\n // This returns the number of pages we have within our view pager\n public int getCount() {\n return 3;\n }", "int getPagesAmount();", "long getAmountPage();", "int ge...
[ "0.7318532", "0.66357523", "0.65496594", "0.6074719", "0.6053452", "0.6024778", "0.59702045", "0.5968394", "0.59407145", "0.59407145", "0.59407145", "0.59407145", "0.5938616", "0.59303164", "0.5914587", "0.5895829", "0.5858472", "0.58557075", "0.58179796", "0.5745283", "0.573...
0.0
-1
Random in a rectangle constructor
public UniformInBoxPointSequence2D(int size, double width, double height) { super((List<T>) generateRandomPoints(size, width, height)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void generateNewRect() {\n\t\t\n\t\tif(rectengleList.size() < getLevel()){\n\t\tRandom mRandom = new Random();\n\t\tint height = getHeight();\n\t\tint width = getWidth();\n\n\t\tint cx = (int) ((mRandom.nextInt() % (width * 0.8)) + (width * 0.1));\n\t\tint cy = (int) ((mRandom.nextInt() % (height * 0.8)) +...
[ "0.7101882", "0.69259983", "0.6697725", "0.6684571", "0.66689533", "0.6663921", "0.66541356", "0.6627333", "0.65716463", "0.65710723", "0.65674615", "0.65301555", "0.6521405", "0.64998716", "0.64564687", "0.64203405", "0.64203405", "0.6419499", "0.64001966", "0.63969076", "0....
0.57907474
85
Access catalog component and retrieve transportation data from the database
public List searchTransportation(String origin, String destination, Locale locale) throws HTMLActionException { List transportation = null; List transportationBean = new ArrayList(); // call catalog component try { CatalogFacade catalogFacade = new CatalogFacade(); transportation = catalogFacade.getTransportations(origin, destination, locale); // Catch catalog exceptions and re-throw them as // mini-app application defined exceptions. } catch (Exception e) { throw new HTMLActionException( "Transportation Search Exception:: Catalog Exception accessing catalog component: " + e); } for (int i = 0; i < transportation.size(); ++i) { transportationBean .add(new TransportationBean( ((com.sun.j2ee.blueprints.catalog.Transportation) transportation .get(i)).getTransportationId(), ((com.sun.j2ee.blueprints.catalog.Transportation) transportation .get(i)).getName(), ((com.sun.j2ee.blueprints.catalog.Transportation) transportation .get(i)).getDescription(), ((com.sun.j2ee.blueprints.catalog.Transportation) transportation .get(i)).getImageURI(), ((com.sun.j2ee.blueprints.catalog.Transportation) transportation .get(i)).getPrice(), ((com.sun.j2ee.blueprints.catalog.Transportation) transportation .get(i)).getOrigin(), ((com.sun.j2ee.blueprints.catalog.Transportation) transportation .get(i)).getDestination(), ((com.sun.j2ee.blueprints.catalog.Transportation) transportation .get(i)).getCarrier(), ((com.sun.j2ee.blueprints.catalog.Transportation) transportation .get(i)).getDepartureTime(), ((com.sun.j2ee.blueprints.catalog.Transportation) transportation .get(i)).getArrivalTime(), ((com.sun.j2ee.blueprints.catalog.Transportation) transportation .get(i)).getTravelClass())); } return transportationBean; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Catalog getCatalog();", "Catalog getCatalog();", "Catalog getCatalog();", "public IFuture<ItemInfo[]> getCatalog()\n\t{\n\t\tfinal Future<ItemInfo[]> ret = new Future<ItemInfo[]>();\n\t\tShopCapa shop = (ShopCapa)capa.getPojoCapability();\n\t\tret.setResult(shop.getCatalog().toArray(new ItemInfo[shop....
[ "0.62052625", "0.6121792", "0.6121792", "0.60964054", "0.5865507", "0.5697381", "0.5697381", "0.56874615", "0.5648603", "0.5637222", "0.56167567", "0.5614425", "0.5595588", "0.55684435", "0.5568417", "0.549526", "0.5453166", "0.5445034", "0.5437932", "0.5434837", "0.5417516",...
0.5222284
45
Methode permettant d'enregistrer un article
public int enregistrerArticleService (Articles article);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Article createArticle();", "void addArticle(Article a);", "public Article save(Article article);", "@Override\r\n\tpublic void post(Article article) {\n\t\tarticleDao.post(article);\r\n\t\t\r\n\t}", "@Override\n public void addArticle(Article article) {\n\n remoteDataSource.addArticle(article);\n...
[ "0.6656692", "0.66264576", "0.6606174", "0.62208515", "0.61754256", "0.61641866", "0.6161898", "0.6082797", "0.6004809", "0.59706455", "0.5965409", "0.58827925", "0.572729", "0.5716294", "0.5716084", "0.56834406", "0.56571025", "0.5617801", "0.561055", "0.5575123", "0.5573643...
0.73849684
0
methode affichant tous les articles
public List<Articles> listArticlesService();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setupArticlesList();", "@Override\n public List<Article> getArticles() {\n List<Article> articles=articleDAO.getArticles();\n knownArticles.addAll(articles);\n return articles;\n }", "private void getArticles() throws Exception {\n\t\t\tHttpClient httpClient = new Default...
[ "0.7531823", "0.6890471", "0.6810702", "0.6808935", "0.6779658", "0.6739215", "0.6661401", "0.66375303", "0.66054255", "0.6595976", "0.65347564", "0.6529423", "0.64996946", "0.6492299", "0.6446378", "0.6408855", "0.63760704", "0.63101846", "0.6270289", "0.6242385", "0.6229333...
0.6610807
8
Methode de recherche d'un article
public List<Articles> RechercheArticlesService(String nomColonne, String valeurRecherchee);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic Set<Article> search(String keyworkds) {\n\t\treturn null;\r\n\t}", "private void getBySearch(HttpServletRequest request, HttpServletResponse response, ArticleService artService) {\n\t\tString search = request.getParameter(\"search\");\n\t\tList<Article> list = new ArrayList<Article>();\n\t\...
[ "0.6833042", "0.68012106", "0.6753014", "0.6658464", "0.65671915", "0.64542717", "0.6431282", "0.6418926", "0.6418926", "0.64134014", "0.63446", "0.6334951", "0.6328676", "0.62986994", "0.62965757", "0.62397575", "0.62154883", "0.62120056", "0.61448735", "0.61131424", "0.6106...
0.6873489
0
TODO: Warning this method won't work in the case the id fields are not set
@Override public boolean equals(Object object) { if (!(object instanceof Matricula)) { return false; } Matricula other = (Matricula) object; if ((this.idMatricula == null && other.idMatricula != null) || (this.idMatricula != null && !this.idMatricula.equals(other.idMatricula))) { return false; } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void setId(Integer id) { this.id = id; }", "private Integer getId() { return this.id; }", "public void setId(int id){ this.id = id; }", "public void setId(Long id) {this.id = id;}", "public void setId(Long id) {this.id = id;}", "public void setID(String idIn) {this.id = idIn;}", "public void se...
[ "0.6896886", "0.6838461", "0.67056817", "0.66419715", "0.66419715", "0.6592331", "0.6579151", "0.6579151", "0.6574321", "0.6574321", "0.6574321", "0.6574321", "0.6574321", "0.6574321", "0.65624106", "0.65624106", "0.65441847", "0.65243006", "0.65154546", "0.6487427", "0.64778...
0.0
-1
This endpoint method uses a combination of XPath expressions and marshalling to handle message with a &lt;GetPatientsRequest&gt; payload.
@PayloadRoot(localPart = GET_PATIENTS_REQUEST, namespace = MESSAGES_NAMESPACE) @Namespace(prefix = "m", uri = MESSAGES_NAMESPACE) @ResponsePayload public JAXBElement<id.co.kmn.services.wsdl.server.schema.PatientInfo> getPatients(@XPathParam("//m:reqKeyword") String reqKeyword, @XPathParam("//m:reqClinicId") String reqClinicId, @XPathParam("//m:reqPageNumber") int reqPageNumber, @XPathParam("//m:reqRowPerPage") int reqRowPerPage) throws DatatypeConfigurationException, ParserConfigurationException { if (logger.isDebugEnabled()) { logger.debug("Received GetPatientsRequest '" + reqKeyword + "' id: '" + reqClinicId + "' page: " + reqPageNumber + "reqRowPerPage: " + reqRowPerPage); } PatientInfo patientInfo = kmnServiceMethod.getPatientInfo(reqKeyword, reqClinicId, reqPageNumber, reqRowPerPage); return objectFactory.createGetPatientsResponse(SchemaConversionUtils.toSchemaType(patientInfo)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@POST\n @Path(\"/getRequests\")\n @Produces(MediaType.APPLICATION_JSON)\n public ArrayList<Relative> getRequests(@HeaderParam(\"patientemail\") String patientEmail) {\n\n RequestDaoImpl reqDaoImpl = new RequestDaoImpl();\n ArrayList<Relative> relatives = reqDaoImpl.getRequests(patientEmail);...
[ "0.6143542", "0.5734837", "0.56783193", "0.5543806", "0.55051374", "0.54933226", "0.54809237", "0.5428957", "0.5426681", "0.53851765", "0.531561", "0.52995414", "0.5206264", "0.5184552", "0.5163061", "0.5143694", "0.51237094", "0.51046866", "0.5064082", "0.50426173", "0.50328...
0.6896153
0
Test of isConnected method, of class MarkovModelUtilities.
@Test public void testIsConnected() { assertEquals(MarkovModel.util.isConnected(P1), true); assertEquals(MarkovModel.util.isConnected(P2), false); assertEquals(MarkovModel.util.isConnected(P3), false); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testConnectedComponents()\n {\n Collection<IIntArray> cc1 = MarkovModel.util.connectedComponents(P1);\n assertTrue(cc1.containsAll(C1));\n assertEquals(cc1.size(), C1.size());\n\n Collection<IIntArray> cc2 = MarkovModel.util.connectedComponents(P2);\n as...
[ "0.71300125", "0.70772636", "0.6927711", "0.6890222", "0.6792548", "0.6787096", "0.6772003", "0.67700887", "0.67700887", "0.67700887", "0.67700887", "0.67700887", "0.67700887", "0.67700887", "0.67700887", "0.65796477", "0.65796477", "0.65796477", "0.65796477", "0.65796477", "...
0.83215606
0
Test of connectedComponents method, of class MarkovModelUtilities.
@Test public void testConnectedComponents() { Collection<IIntArray> cc1 = MarkovModel.util.connectedComponents(P1); assertTrue(cc1.containsAll(C1)); assertEquals(cc1.size(), C1.size()); Collection<IIntArray> cc2 = MarkovModel.util.connectedComponents(P2); assertTrue(cc2.containsAll(C2)); assertEquals(cc2.size(), C2.size()); Collection<IIntArray> cc3 = MarkovModel.util.connectedComponents(P3); assertTrue(cc3.containsAll(C3)); assertEquals(cc3.size(), C3.size()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testConnected() {\n System.out.println(\"**** connected *****\");\n int v = 9;\n int w = 12;\n ConnectedComponentsDepthSearch instance = new ConnectedComponentsDepthSearch(g);\n boolean expResult = true;\n boolean result = instance.connected(v, w);\n...
[ "0.67552066", "0.6620726", "0.6540942", "0.6509026", "0.64283943", "0.62315524", "0.5980144", "0.5909983", "0.5846662", "0.5763573", "0.5756352", "0.57287776", "0.5717743", "0.57047963", "0.5691166", "0.5622625", "0.55941814", "0.5566277", "0.55284333", "0.5518904", "0.549194...
0.8467201
0
Test of giantComponent method, of class MarkovModelUtilities.
@Test public void testGiantComponent() { assertEquals(MarkovModel.util.giantComponent(P1), giant1); assertEquals(MarkovModel.util.giantComponent(P2), giant2); assertEquals(MarkovModel.util.giantComponent(P3), giant3); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void testGetConformingStimulusLargeScale() throws Exception {\n long start = System.currentTimeMillis();\n Stimulus stimulus = new MockStimulus();\n message.setConformingStimulus(stimulus);\n for (int i = 0; i < TOTAL_ITERATION; i++) {\n message.getConformingStimulus()...
[ "0.61025536", "0.5821381", "0.564987", "0.55952024", "0.55868876", "0.55392677", "0.5526498", "0.54585916", "0.54564625", "0.543615", "0.5392976", "0.5391787", "0.5372625", "0.53592974", "0.5339858", "0.5334331", "0.5314421", "0.5305266", "0.52997833", "0.5299271", "0.5291776...
0.8315709
0
Test of estimateC method, of class MarkovModelUtilities.
@Test public void testEstimateC_Iterable_int() { Iterable<IIntArray> trajs = null; int lag = 0; MarkovModelUtilities instance = new MarkovModelUtilities(); IDoubleArray expResult = null; IDoubleArray result = instance.estimateC(trajs, lag); assertEquals(expResult, result); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testEstimateT()\n {\n \n IDoubleArray counts = null;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n IDoubleArray expResult = null;\n IDoubleArray result = instance.estimateT(counts);\n assertEquals(expResult, result);\n // ...
[ "0.7009995", "0.63965464", "0.6255407", "0.6167512", "0.6111849", "0.5991579", "0.5817513", "0.5549115", "0.5527761", "0.54302907", "0.53835", "0.5354121", "0.52574354", "0.525396", "0.52325606", "0.51910627", "0.5172708", "0.5146926", "0.5145967", "0.5142142", "0.51306146", ...
0.703813
0
Test of estimateCmilestoning method, of class MarkovModelUtilities.
@Test public void testEstimateCmilestoning_3args_1() { Iterable<IIntArray> trajs = null; Iterable<IIntArray> cores = null; int lag = 0; MarkovModelUtilities instance = new MarkovModelUtilities(); IDoubleArray expResult = null; IDoubleArray result = instance.estimateCmilestoning(trajs, cores, lag); assertEquals(expResult, result); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testEstimateCmilestoning_3args_2()\n {\n IIntArray traj = null;\n Iterable<IIntArray> cores = null;\n int lag = 0;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n IDoubleArray expResult = null;\n IDoubleArray result = instance.esti...
[ "0.76359123", "0.73141825", "0.65835816", "0.57383484", "0.56049335", "0.5368913", "0.5366745", "0.53475344", "0.5276815", "0.5211457", "0.51922", "0.5185153", "0.51824313", "0.5180554", "0.51034254", "0.50930893", "0.50909305", "0.5089265", "0.508482", "0.50655603", "0.50131...
0.7719333
0
Test of estimateCmilestoning method, of class MarkovModelUtilities.
@Test public void testEstimateCmilestoning_Iterable_int() { Iterable<IIntArray> trajs = null; int lag = 0; MarkovModelUtilities instance = new MarkovModelUtilities(); IDoubleArray expResult = null; IDoubleArray result = instance.estimateCmilestoning(trajs, lag); assertEquals(expResult, result); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testEstimateCmilestoning_3args_1()\n {\n Iterable<IIntArray> trajs = null;\n Iterable<IIntArray> cores = null;\n int lag = 0;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n IDoubleArray expResult = null;\n IDoubleArray result = in...
[ "0.7720083", "0.7637022", "0.6585873", "0.5737402", "0.5602599", "0.53692174", "0.536536", "0.53475755", "0.5277167", "0.5211567", "0.519184", "0.51858693", "0.51833606", "0.518084", "0.5102803", "0.5094376", "0.50911736", "0.508913", "0.50863725", "0.50679743", "0.5012965", ...
0.7315861
2
Test of estimateC method, of class MarkovModelUtilities.
@Test public void testEstimateC_IIntArray_int() { IIntArray traj = null; int lag = 0; MarkovModelUtilities instance = new MarkovModelUtilities(); IDoubleArray expResult = null; IDoubleArray result = instance.estimateC(traj, lag); assertEquals(expResult, result); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testEstimateC_Iterable_int()\n {\n Iterable<IIntArray> trajs = null;\n int lag = 0;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n IDoubleArray expResult = null;\n IDoubleArray result = instance.estimateC(trajs, lag);\n assertEqua...
[ "0.7036593", "0.7006459", "0.62546384", "0.61666447", "0.61112034", "0.59915125", "0.58168507", "0.5547312", "0.55261725", "0.54291964", "0.5382521", "0.5353092", "0.5255702", "0.52556413", "0.5232925", "0.5190478", "0.5171634", "0.5145396", "0.5144711", "0.5140281", "0.51295...
0.63952476
2
Test of estimateCmilestoning method, of class MarkovModelUtilities.
@Test public void testEstimateCmilestoning_3args_2() { IIntArray traj = null; Iterable<IIntArray> cores = null; int lag = 0; MarkovModelUtilities instance = new MarkovModelUtilities(); IDoubleArray expResult = null; IDoubleArray result = instance.estimateCmilestoning(traj, cores, lag); assertEquals(expResult, result); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testEstimateCmilestoning_3args_1()\n {\n Iterable<IIntArray> trajs = null;\n Iterable<IIntArray> cores = null;\n int lag = 0;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n IDoubleArray expResult = null;\n IDoubleArray result = in...
[ "0.7719048", "0.7314452", "0.6584927", "0.5736506", "0.5605106", "0.5367599", "0.53661937", "0.53501797", "0.5276743", "0.5212073", "0.5192482", "0.51843244", "0.5181949", "0.5180885", "0.5106315", "0.5093115", "0.50918853", "0.5088555", "0.5084552", "0.50662374", "0.50125676...
0.76356745
1
Test of estimateCmilestoning method, of class MarkovModelUtilities.
@Test public void testEstimateCmilestoning_IIntArray_int() { IIntArray traj = null; int lag = 0; MarkovModelUtilities instance = new MarkovModelUtilities(); IDoubleArray expResult = null; IDoubleArray result = instance.estimateCmilestoning(traj, lag); assertEquals(expResult, result); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testEstimateCmilestoning_3args_1()\n {\n Iterable<IIntArray> trajs = null;\n Iterable<IIntArray> cores = null;\n int lag = 0;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n IDoubleArray expResult = null;\n IDoubleArray result = in...
[ "0.7719333", "0.76359123", "0.73141825", "0.57383484", "0.56049335", "0.5368913", "0.5366745", "0.53475344", "0.5276815", "0.5211457", "0.51922", "0.5185153", "0.51824313", "0.5180554", "0.51034254", "0.50930893", "0.50909305", "0.5089265", "0.508482", "0.50655603", "0.501313...
0.65835816
3
Test of estimateCstepping method, of class MarkovModelUtilities.
@Test public void testEstimateCstepping_Iterable_int() { Iterable<IIntArray> trajs = null; int lag = 0; MarkovModelUtilities instance = new MarkovModelUtilities(); IDoubleArray expResult = null; IDoubleArray result = instance.estimateCstepping(trajs, lag); assertEquals(expResult, result); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testEstimateT()\n {\n \n IDoubleArray counts = null;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n IDoubleArray expResult = null;\n IDoubleArray result = instance.estimateT(counts);\n assertEquals(expResult, result);\n // ...
[ "0.65949225", "0.65912473", "0.5986597", "0.57795", "0.5703691", "0.563787", "0.53556013", "0.5318458", "0.531436", "0.52704465", "0.5177754", "0.5174197", "0.5158172", "0.51175845", "0.51056963", "0.507546", "0.5049223", "0.50490606", "0.5048576", "0.50396436", "0.50091225",...
0.71575373
0
Test of estimateCstepping method, of class MarkovModelUtilities.
@Test public void testEstimateCstepping_IIntArray_int() { IIntArray traj = null; int lag = 0; MarkovModelUtilities instance = new MarkovModelUtilities(); IDoubleArray expResult = null; IDoubleArray result = instance.estimateCstepping(traj, lag); assertEquals(expResult, result); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testEstimateCstepping_Iterable_int()\n {\n Iterable<IIntArray> trajs = null;\n int lag = 0;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n IDoubleArray expResult = null;\n IDoubleArray result = instance.estimateCstepping(trajs, lag);\n ...
[ "0.71575373", "0.65949225", "0.5986597", "0.57795", "0.5703691", "0.563787", "0.53556013", "0.5318458", "0.531436", "0.52704465", "0.5177754", "0.5174197", "0.5158172", "0.51175845", "0.51056963", "0.507546", "0.5049223", "0.50490606", "0.5048576", "0.50396436", "0.50091225",...
0.65912473
2
Test of logLikelihood method, of class MarkovModelUtilities.
@Test public void testLogLikelihood() { IDoubleArray T = null; IDoubleArray C = null; MarkovModelUtilities instance = new MarkovModelUtilities(); double expResult = 0.0; double result = instance.logLikelihood(T, C); assertEquals(expResult, result, 0.0); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testLogLikelihoodCorrelationMatrix()\n {\n IDoubleArray corr = null;\n IDoubleArray C = null;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n double expResult = 0.0;\n double result = instance.logLikelihoodCorrelationMatrix(corr, C);\n ...
[ "0.7427038", "0.66404974", "0.6166927", "0.5927131", "0.5869066", "0.56961393", "0.55797553", "0.5571208", "0.5482358", "0.54607975", "0.5375718", "0.5269194", "0.52524656", "0.5225311", "0.52244943", "0.5209235", "0.51835144", "0.51666826", "0.51612955", "0.51324403", "0.510...
0.88419306
0