query
stringlengths
7
33.1k
document
stringlengths
7
335k
metadata
dict
negatives
listlengths
3
101
negative_scores
listlengths
3
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
TODO add code like the player legs so that the armour bends correctly :D left_leg.cubeList.add();
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) { if(NarutoSettings.betterArms) { this.right_leg = new ModelRenderer(this, 43, -3); this.right_leg.setTextureSize(64, 64); this.left_leg = new ModelRenderer(this, 43, -3); this.left_leg.setTextureSize(64, 64); this.left_leg.mirror = true; this.right_legLower = new ModelRenderer(this, 43, -3); this.right_legLower.setTextureSize(64, 64); this.left_legLower = new ModelRenderer(this, 43, -3); this.left_legLower.setTextureSize(64, 64); this.left_legLower.mirror = true; } setRotationAngles(f, f1, f2, f3, f4, f5, entity); if (this.bipedLeftLegUpper.rotateAngleX <= -0.05F) { this.front_leg_plate_1.rotateAngleX += this.bipedLeftLegUpper.rotateAngleX + 0.05F; //front_leg_plate_2.rotateAngleX += this.bipedLeftLeg.rotateAngleX + 0.05F; } if (this.bipedRightLegUpper.rotateAngleX <= -0.05F) { this.front_leg_plate_1.rotateAngleX += this.bipedRightLegUpper.rotateAngleX + 0.05F; //front_leg_plate_2.rotateAngleX += this.bipedRightLeg.rotateAngleX + 0.05F; } if (this.bipedLeftLegUpper.rotateAngleX >= 0.05F) { this.back_leg_plate_1.rotateAngleX += this.bipedLeftLegUpper.rotateAngleX - 0.05F; //front_leg_plate_2.rotateAngleX += this.bipedLeftLeg.rotateAngleX + 0.05F; } if (this.bipedRightLegUpper.rotateAngleX >= 0.05F) { this.back_leg_plate_1.rotateAngleX += this.bipedRightLegUpper.rotateAngleX - 0.05F; //front_leg_plate_2.rotateAngleX += this.bipedRightLeg.rotateAngleX + 0.05F; } // old stuff for crouching and things /*this.front_leg_plate_1.setRotationPoint(-0.5F, 11.06667F + this.bipedLeftLegUpper.rotationPointY - 12, -2F + this.bipedLeftLegUpper.rotationPointZ); this.back_leg_plate_1.setRotationPoint(0F, 11.06667F + this.bipedLeftLegUpper.rotationPointY - 12, 2F + this.bipedLeftLegUpper.rotationPointZ); this.left_leg_plate.setRotationPoint(3.8F, 11.5F + this.bipedLeftLegUpper.rotationPointY - 12, 0F + this.bipedLeftLegUpper.rotationPointZ); this.right_leg_plate.setRotationPoint(-3.8F, 11.5F + this.bipedLeftLegUpper.rotationPointY - 12, 0F + this.bipedLeftLegUpper.rotationPointZ);*/ if (this.bipedLeftLegUpper.rotateAngleX >= 0.05F) { this.left_leg_plate.rotateAngleZ -= (this.bipedLeftLegUpper.rotateAngleX - 0.05F) / 10; //front_leg_plate_2.rotateAngleX += this.bipedLeftLeg.rotateAngleX + 0.05F; } if (this.bipedRightLegUpper.rotateAngleX >= 0.05F) { this.left_leg_plate.rotateAngleZ -= (this.bipedRightLegUpper.rotateAngleX - 0.05F) / 10; //front_leg_plate_2.rotateAngleX += this.bipedRightLeg.rotateAngleX + 0.05F; } if (this.bipedLeftLegUpper.rotateAngleX >= 0.05F) { right_leg_plate.rotateAngleZ += (this.bipedLeftLegUpper.rotateAngleX - 0.05F) / 10; //front_leg_plate_2.rotateAngleX += this.bipedLeftLeg.rotateAngleX + 0.05F; } if (this.bipedRightLegUpper.rotateAngleX >= 0.05F) { this.right_leg_plate.rotateAngleZ += (this.bipedRightLegUpper.rotateAngleX - 0.05F) / 10; //front_leg_plate_2.rotateAngleX += this.bipedRightLeg.rotateAngleX + 0.05F; } if(NarutoSettings.betterArms) { this.upperLeftLegBox.setLowerRotation(this.left_leg,this.bipedLeftLegLower.rotateAngleX); this.upperRightLegBox.setLowerRotation(this.right_leg,this.bipedRightLegLower.rotateAngleX); this.lowerLeftLegBox.setUpperRotation(this.left_legLower,this.bipedLeftLegLower.rotateAngleX); this.lowerRightLegBox.setUpperRotation(this.right_legLower,this.bipedRightLegLower.rotateAngleX); this.left_leg.cubeList.add(upperLeftLegBox); this.right_leg.cubeList.add(upperRightLegBox); this.left_legLower.cubeList.add(lowerLeftLegBox); this.right_legLower.cubeList.add(lowerRightLegBox); } /*front_leg_plate_1.render(f5); //back_leg_plate_2.render(f5); back_leg_plate_1.render(f5); left_leg_plate.render(f5); right_leg_plate.render(f5);*/ //front_leg_plate_2.render(f5); trackPart(this.bipedLeftLegLower, this.legLockLeftLower); trackPart(this.bipedRightLegLower, this.legLockRightLower); renderWithLock(this.bipedLeftLegUpper, this.legLockLeft, f5); renderWithLock(this.bipedRightLegUpper, this.legLockRight, f5); renderWithLock(this.bipedLowerBody, this.lowerBodyLock, f5); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void left() {\n startAnimation(leftSubCubes(), Axis.X, Direction.ANTICLOCKWISE);\n leftCubeSwap();\n }", "void leftInv() {\n startAnimation(leftSubCubes(), Axis.X, Direction.CLOCKWISE);\n leftCubeSwap();\n leftCubeSwap();\n leftCubeSwap();\n }", "@Override\n\tpub...
[ "0.6646618", "0.6349966", "0.6091074", "0.59530675", "0.5875959", "0.5826645", "0.5814692", "0.5799517", "0.5761753", "0.5751935", "0.5723392", "0.5714089", "0.5708705", "0.5688419", "0.5676745", "0.5675725", "0.5670263", "0.56669784", "0.56665224", "0.56659234", "0.56403387"...
0.0
-1
take in the number of crates, say you're receiving, then receive
public void receive() { temp1 = txtScan.nextInt(); System.out.println("Receiving " + temp1 + " crates of bananas"); for (int i = 0; i < temp1; i++) { temp2 = txtScan.nextInt(); // exp temp3 = txtScan.nextInt(); // count temp4 = txtScan.nextDouble(); // cost // make a new crate with these dimensions } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public synchronized void receive() {\n inCountStat.received();\n inCount++;\n }", "private static void AssureRecieve(ClientManager clientManager, tangible.RefObject<byte[]> buffer, long size) {\n int bytesRecieved = 0;\n int totalBytesReceived = 0;\n\n do {\n try ...
[ "0.6658008", "0.64917946", "0.6338617", "0.6232333", "0.6190326", "0.6147685", "0.61066353", "0.6052701", "0.6034686", "0.59843713", "0.59322315", "0.5892954", "0.5851344", "0.5774088", "0.575999", "0.5732685", "0.56553626", "0.5644879", "0.563475", "0.5631814", "0.5614305", ...
0.7046696
0
/ todo: why is this method here?
@Override public void setLatestActivity(IActivity activity) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void method_4270() {}", "protected boolean func_70814_o() { return true; }", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n public void perish() {\n \n }", "@Override\n\tprotected void interr() {\n\t}"...
[ "0.59930384", "0.5919252", "0.58437186", "0.57431537", "0.5693775", "0.5648598", "0.55529064", "0.55354923", "0.54922444", "0.54801077", "0.5475759", "0.54625595", "0.5452458", "0.54287183", "0.5404184", "0.53925973", "0.53872955", "0.53816956", "0.53746635", "0.5359581", "0....
0.0
-1
Only loads the activities the entity published.
@Override public Collection<IActivityThread> loadPublishedActivities(EntityReference entity, AssociatedActivityFilterType filterType, Bounds bounds) { return loadPublishedActivities(entity, filterType, bounds, ALL_MEMBERS, FRIENDS, WORLD); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<Activity> getAllActivities();", "@CustomAnnotation(value = \"FIND_ALL_ACTIVITY\")\n\t@RequestMapping(\n\t\t\tvalue=\"/activities\",\n\t\t\tmethod=RequestMethod.GET\n\t\t\n\t\t\t)\n\tpublic ResponseEntity<Set<Activity>> findAcitities(){\n\t\treturn new ResponseEntity<Set<Activity>>(activityService.fin...
[ "0.61862236", "0.5774276", "0.5755245", "0.5698901", "0.5640744", "0.5624561", "0.55687857", "0.5541719", "0.5427452", "0.5288176", "0.5281918", "0.5183607", "0.51509225", "0.5089367", "0.5063844", "0.5062101", "0.50613266", "0.5028024", "0.4980658", "0.49618647", "0.49425194...
0.69143534
0
Deleted the full group of child activities
@Override public void deleteAssociated(IActivity activity, NetworkTypeEnum type) { if (activity != null) { flushChildren(activity.getGuid()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@objid (\"808c0839-1dec-11e2-8cad-001ec947c8cc\")\n @Override\n public void delete() {\n // List children from the end to avoid reordering of the other GMs\n for (int i = this.children.size() - 1; i >= 0; i--) {\n GmNodeModel child = this.children.get(i);\n child.delete();...
[ "0.6540324", "0.63468105", "0.59770125", "0.59752315", "0.5960341", "0.5837502", "0.5828541", "0.5828541", "0.5828541", "0.5828541", "0.57953453", "0.5752835", "0.5752835", "0.5752835", "0.5750668", "0.57444555", "0.57444555", "0.57444555", "0.57444555", "0.57444555", "0.5744...
0.6342256
2
count message and media metadata results and update bounds
private List<IActivityThread> updateBoundsSides(TwoBounds bounds, List<IActivityThread> results) { int mediaActivities = CollectionHelper.countMatches(results, new ActivityThreadParentOwnerTypePredicate(ActivityTypeEnum.MEDIA)); int messageActivities = CollectionHelper.countMatches(results, new ActivityThreadParentOwnerTypePredicate(ActivityTypeEnum.MESSAGE)); bounds.getMediaMetaDataBounds().next(mediaActivities - bounds.getMediaMetaDataBounds().getMaxResults()); bounds.getMessageBounds().next(messageActivities - bounds.getMessageBounds().getMaxResults()); return results; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getTotalMessageCount(){\n Query query = new Query(\"Message\");\n Query query2 = new Query(\"Question\");\n PreparedQuery results = datastore.prepare(query);\n PreparedQuery results2 = datastore.prepare(query2);\n return results.countEntities(FetchOptions.Builder.withLimit(1000)) + results2.count...
[ "0.57816035", "0.56592834", "0.5482533", "0.53379226", "0.5322088", "0.52968657", "0.5279898", "0.52634895", "0.52239585", "0.52239585", "0.52239585", "0.52239585", "0.52100664", "0.516576", "0.51321745", "0.513211", "0.5119842", "0.5113652", "0.5072028", "0.50504166", "0.505...
0.5703812
1
TODO Autogenerated method stub
public static void main(String[] args) { int a[][]=new int[4][2]; for(int i=0;i<4;i++){ a[0][0]=78; a[1][0]=59; a[2][0]=90; a[3][0]=65; a[0][1]=100; a[1][1]=80; a[2][1]=70; a[3][1]=120; } int sumc=0; for(int i=0;i<2;i++){ sumc=sumc+a[2][i]; } int avec=sumc/2; System.out.println("丙的平均分數為"+avec); int sumchi=0; for(int i=0;i<4;i++){ sumchi=sumchi+a[i][0]; } int avechi=sumchi/4; System.out.println("國文的平均分數為"+avechi); int sumt=0; for(int i=0;i<4;i++){ for(int j=0;j<2;j++) sumt=sumchi+a[i][j]; } int avet=sumt/8; System.out.println("全班的平均分數為"+avet); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
Note lack of trailing \n in all cases below
@Test public void eofHandling() { assertLine(Language.CSS, new Line(Language.CSS, BLANK), " "); assertLine(Language.CSS, new Line(Language.CSS, BLANK), "\t"); assertLine(Language.CSS, new Line(Language.CSS, CODE), "margin: 1em;"); assertLine(Language.CSS, new Line(Language.CSS, COMMENT), "/* comment */"); assertLine(Language.CSS, new Line(Language.CSS, CODE), "margin: 1em; /* with comment */"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n\tpublic void testEmptyLine() {\n\t\tString s = \" \\n\";\n\t\tassertTrue(\"Empty string with line ending\", StringUtil.isEmpty(s));\n\t}", "@Test\n\tpublic void nonEmptyMultiLine() {\n\t\tString s = \" \\n\" + \"Nothing\";\n\t\tassertFalse(\"Non empty string\", StringUtil.isEmpty(s));\n\t}", "pr...
[ "0.6983407", "0.6926268", "0.6909524", "0.68982095", "0.67848635", "0.67349714", "0.66947955", "0.668656", "0.66711885", "0.65877724", "0.64508176", "0.6393626", "0.631526", "0.63040423", "0.62903595", "0.62441087", "0.62314117", "0.62292016", "0.6213727", "0.6173872", "0.615...
0.5606076
76
Tests that a package dependency cycle does not exist for any of the analyzed packages.
public void testAllPackagesCycle() { Collection packages = jdepend.analyze(); for (Object aPackage : packages) { JavaPackage p = (JavaPackage) aPackage; if (p.containsCycle()) { System.out.println("\n***Package: " + p.getName() + "."); System.out.println(); System.out.println( "This package participates in a package cycle. In the following " + "\nlist, for each i, some class in package i depends on some " + "\nclass in package i + 1. Please find the cycle and remove it."); List l = new LinkedList(); p.collectCycle(l); System.out.println(); for (int j = 0; j < l.size(); j++) { JavaPackage pack = (JavaPackage) l.get(j); System.out.println((j + 1) + ".\t" + pack.getName()); } System.out.println(); } } if (jdepend.containsCycles()) { fail("Package cycle(s) found!"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void checkNoCycles(List<JpsModule> component) {\n if (component.size() > 1) {\n StringBuilder message = new StringBuilder();\n message.append(\"Found circular module dependency: \")\n .append(component.size())\n .append(\" modules\");\n ...
[ "0.6654053", "0.6377962", "0.6269106", "0.57545877", "0.56695735", "0.5664391", "0.56469643", "0.5617294", "0.55854774", "0.5548685", "0.55166173", "0.5459407", "0.5409434", "0.5364869", "0.53529096", "0.5315342", "0.52971023", "0.52941304", "0.52860236", "0.52473235", "0.524...
0.67971736
0
The unique name of this authenticate instance.
public abstract ContextNode getContextNode();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getName() {\n\t\t\n\t\tString name = \"\";\n\t\t\n\t\tif (securityContext != null) {\n\t\t\tname = securityContext.getIdToken().getPreferredUsername();\n\t\t}\n\t\t\n\t\treturn name;\n\t}", "public String getName() {\n return Token2Constants.AUTHENTICATOR_NAME;\n }", "public String getN...
[ "0.72330934", "0.6981828", "0.66660684", "0.66660684", "0.6617914", "0.6612948", "0.65372527", "0.64770865", "0.6471224", "0.6458012", "0.64223367", "0.6359997", "0.6343851", "0.6305427", "0.6275539", "0.6274532", "0.6268048", "0.6242071", "0.62204003", "0.62184453", "0.62117...
0.0
-1
Access the synchronization object of this SubjectInfo instance.
public abstract ReentrantLock getLock();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public SubjectInfo getSubjectInfo() {\r\n\t\treturn subjectInfo;\r\n\t}", "public SyncManager getSyncManager() {\n return sync;\n }", "private Object getLockObject(IAnnotationModel annotationModel) {\n if (annotationModel instanceof ISynchronizable) {\n Object lock = ((ISynchronizable) annota...
[ "0.6186088", "0.6160732", "0.6126671", "0.60573596", "0.6054804", "0.60152584", "0.5949681", "0.58924407", "0.58868927", "0.58561003", "0.5844603", "0.5729717", "0.57075673", "0.5637475", "0.5627523", "0.5600363", "0.5597428", "0.5570921", "0.5564225", "0.5556092", "0.5539908...
0.0
-1
Find a session by its pubSessionId or return null if not found
public abstract I_SessionInfo getSessionInfo(I_SessionName sessionName);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract I_SessionInfoProtector getSessionByPubSessionId(\n\t\t\tlong pubSessionId);", "public abstract I_SessionInfo getSessionByPublicId(long publicSessionId);", "InternalSession findSession(String id);", "public Session findSession(String id) throws IOException;", "@Override\r\n \t\t\tpublic SSes...
[ "0.74055254", "0.7114037", "0.69684345", "0.66919416", "0.6630821", "0.6518149", "0.64125824", "0.6309374", "0.6309374", "0.62099594", "0.6173711", "0.6056462", "0.59751266", "0.58942187", "0.5864552", "0.5839851", "0.5823049", "0.57864237", "0.57682484", "0.56683654", "0.566...
0.0
-1
Subject specific informations from the security framework
public abstract I_Authenticate getSecurityCtx();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "X500Principal getSubject();", "java.lang.String getSubject();", "java.lang.String getSubject();", "java.lang.String getSubject();", "String getSubject();", "String getSubject();", "public String getSubject()\r\n {\r\n return subject;\r\n }", "public SubjectInfo getSubject() {\n re...
[ "0.7372944", "0.73633766", "0.73633766", "0.73633766", "0.7202096", "0.7202096", "0.6990907", "0.69876415", "0.69643235", "0.69617385", "0.69300467", "0.69300467", "0.69105715", "0.69105715", "0.68818593", "0.683838", "0.68225604", "0.68225604", "0.6777254", "0.6750892", "0.6...
0.0
-1
Is the client currently logged in?
public abstract boolean isLoggedIn();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static boolean isLoggedIn() {\n return Application.getGame().isLoggedIn();\n }", "public boolean isLoggedIn()\n {\n AccessToken accessToken = AccessToken.getCurrentAccessToken();\n return (accessToken != null);\n }", "public boolean isLoggedIn() {\n return mAuth.getC...
[ "0.81108415", "0.81028634", "0.8056341", "0.80339617", "0.8009057", "0.79994947", "0.79822457", "0.79822457", "0.79677975", "0.79376215", "0.7928807", "0.7912639", "0.7905824", "0.788803", "0.78762275", "0.78758943", "0.7860688", "0.78569996", "0.7849756", "0.7838288", "0.782...
0.7392893
41
Access the collection containing all SessionInfo objects of this user.
public abstract I_SessionInfo[] getSessions();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static ArrayList<Session> getSessions() {\r\n\t\treturn sessions;\r\n\t}", "public Collection<Long> getSessions() {\n return dataTree.getSessions();\n }", "public ArrayList<UserSessionInfo> getAllSessionInfo() throws SessionManagementException {\n ArrayList<UserSessionInfo> userSessionI...
[ "0.7804469", "0.7742569", "0.7555685", "0.7407252", "0.73000365", "0.7231506", "0.7130748", "0.7127103", "0.69609636", "0.6871958", "0.6754092", "0.6754047", "0.6735025", "0.673357", "0.6664822", "0.6635141", "0.64890236", "0.6434918", "0.64326626", "0.6415032", "0.6244811", ...
0.7394983
4
Find a session by its absolute name.
public abstract I_SessionInfo getSessionByAbsoluteName(String absoluteName);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Session findSession(String id) throws IOException;", "InternalSession findSession(String id);", "public UserSession getUserForName(String name) throws SessionQueryException\n {\n UserSession returnedSession = null;\n\n SessionManagementComponent sampleComponent = new SessionManagementCo...
[ "0.74225146", "0.6977217", "0.68785006", "0.62300986", "0.62175447", "0.59390616", "0.5889326", "0.58589005", "0.5809962", "0.5796967", "0.5763054", "0.57036865", "0.56975734", "0.5652618", "0.5605975", "0.56052583", "0.55631834", "0.55216485", "0.55177313", "0.54698277", "0....
0.77549094
0
Find a session by its public session ID.
public abstract I_SessionInfo getSession(I_SessionName sessionName);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "InternalSession findSession(String id);", "public Session findSession(String id) throws IOException;", "public abstract I_SessionInfo getSessionByPublicId(long publicSessionId);", "synchronized Session getSession(long id) {\n return (Session) sessionMap.get(id);\n }", "Session get(int id);", "@...
[ "0.8177775", "0.8098108", "0.7418443", "0.70411724", "0.68206054", "0.68038255", "0.6505756", "0.6375152", "0.6374508", "0.63229895", "0.63059807", "0.628671", "0.6218971", "0.62013674", "0.61618096", "0.6132957", "0.60715455", "0.6061811", "0.60608435", "0.59834504", "0.5949...
0.5618568
32
Check if client does a relogin and wants to destroy old sessions.
public abstract I_SessionInfo[] getSessionsToClear(I_SessionProperties q);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void sessionExpired();", "public synchronized void checkUsers() {\n\t\tHttpSession temp;\n\t\tDate now = new Date();\n\t\tString tempUser;\n\t\tEnumeration userList = userSessions.keys();\n\t\twhile (userList.hasMoreElements()) {\n\t\t\ttempUser = (String) userList.nextElement();\n\t\t\ttry {\n\t\t\t\ttemp = (Ht...
[ "0.5940345", "0.5906947", "0.5794104", "0.57532424", "0.5751163", "0.5727453", "0.57000124", "0.5696997", "0.5654662", "0.5642394", "0.5596427", "0.55650127", "0.55640364", "0.55308264", "0.55288786", "0.54777604", "0.54752547", "0.5472763", "0.5466877", "0.5460466", "0.54559...
0.0
-1
Access the unique login name of a client. If not known, its unique key (subjectId) is delivered
public abstract I_SessionName getSubjectName();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getClientName() {\r\n return clientName;\r\n }", "public String getClientName ()\n\t{\n\t\treturn clientName;\n\t}", "public String getClientName() {\n return clientName;\n }", "public String getClientName() {\n return (String)getAttributeInternal(CLIENTNAME);\n }"...
[ "0.70997906", "0.7097347", "0.6989574", "0.6926996", "0.6857444", "0.6782743", "0.67245996", "0.6671047", "0.6560811", "0.6488927", "0.6488927", "0.64344037", "0.64265627", "0.64265627", "0.64265627", "0.64265627", "0.64162785", "0.64018536", "0.6393513", "0.6393513", "0.6384...
0.622309
35
Cluster wide unique identifier "/node/heron/client/" e.g. for logging
public abstract String getId();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "String getServerId();", "java.lang.String getClusterId();", "java.lang.String getClusterId();", "java.lang.String getClusterId();", "java.lang.String getClusterId();", "java.lang.String getClusterId();", "java.lang.String getClusterId();", "int getServerId();", "UUID clientId();", "public String ...
[ "0.68810475", "0.6863656", "0.6863656", "0.6863656", "0.6863656", "0.6863656", "0.6863656", "0.6745537", "0.6652356", "0.6615602", "0.65464103", "0.6345585", "0.6290586", "0.62217987", "0.62120646", "0.6167576", "0.6145029", "0.61290765", "0.60136056", "0.6011742", "0.6007328...
0.0
-1
Access the unique login name of a client. If not known, its unique key (subjectId) is delivered
public abstract String getLoginName();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getClientName() {\r\n return clientName;\r\n }", "public String getClientName ()\n\t{\n\t\treturn clientName;\n\t}", "public String getClientName() {\n return clientName;\n }", "public String getClientName() {\n return (String)getAttributeInternal(CLIENTNAME);\n }"...
[ "0.7101361", "0.7098893", "0.6991289", "0.6927248", "0.68591857", "0.67841566", "0.6726245", "0.6670452", "0.65606314", "0.64872396", "0.64872396", "0.64341295", "0.6424915", "0.6424915", "0.6424915", "0.6424915", "0.64173734", "0.64000195", "0.63951236", "0.63951236", "0.638...
0.61697805
54
Find a session by its public session ID.
public abstract I_SessionInfoProtector getSessionByPubSessionId( long pubSessionId);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "InternalSession findSession(String id);", "public Session findSession(String id) throws IOException;", "public abstract I_SessionInfo getSessionByPublicId(long publicSessionId);", "synchronized Session getSession(long id) {\n return (Session) sessionMap.get(id);\n }", "Session get(int id);", "@...
[ "0.8178049", "0.8097828", "0.7420533", "0.70407945", "0.6820713", "0.6803424", "0.63754493", "0.6373423", "0.6323715", "0.6308366", "0.62859243", "0.6219499", "0.6202039", "0.61632633", "0.6133201", "0.6073178", "0.60631365", "0.60618514", "0.5984069", "0.59517825", "0.595178...
0.65076184
6
Kills all sessions of this client
public abstract String killClient() throws ServiceManagerException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void cancelAllClients(){\n clientsPool.shutdownNow();\n }", "public void closeAllSessions() {\n\n // don't disconnect system user; need it to save database\n Session[] sessions = getAllSessions();\n\n for (int i = 0; i < sessions.length; i++) {\n sessions[i].close...
[ "0.6467611", "0.6362586", "0.627009", "0.6225308", "0.61889666", "0.6095359", "0.60771114", "0.60771114", "0.6071848", "0.60566086", "0.60468906", "0.6039863", "0.59928083", "0.5971083", "0.5965991", "0.5960934", "0.58851075", "0.5876642", "0.581196", "0.581196", "0.5797753",...
0.56005377
35
Get the SessionInfo with its public session identifier e.g. "5"
public abstract I_SessionInfo getSessionByPublicId(long publicSessionId);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "java.lang.String getSessionID();", "String getSessionID();", "String getSessionID();", "public abstract I_SessionInfo getSessionInfo(I_SessionName sessionName);", "public SessionInfo getSessionInfo() {\n\t\treturn sessionInfo;\n\t}", "public String getSessionID ()\n\t{\n\t\treturn sessionID;\n\t}", "sy...
[ "0.72621614", "0.725364", "0.725364", "0.70132923", "0.6883974", "0.68803847", "0.685304", "0.6809829", "0.6799742", "0.67978853", "0.67946506", "0.67946506", "0.67946506", "0.67946506", "0.67884594", "0.6759001", "0.67082894", "0.670039", "0.6622475", "0.65878636", "0.658659...
0.77170926
0
=========== Enforced by I_AdminSubject and SubjectInfoProtector.java ================
public abstract long getUptime();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean isSubject() {\n return false;\n }", "public void setSubject(Subject subject);", "public void setSubject(String v) \n {\n \n if (!ObjectUtils.equals(this.subject, v))\n {\n this.subject = v;\n setModified(true);\n ...
[ "0.6476601", "0.63682044", "0.62866694", "0.6216425", "0.62008256", "0.62008256", "0.62008256", "0.6114042", "0.6098021", "0.6087444", "0.60648847", "0.60614043", "0.6057077", "0.6049436", "0.60250723", "0.5994507", "0.5977806", "0.5977806", "0.5973804", "0.59609026", "0.5958...
0.0
-1
How many update where sent for this client, the sum of all session and authenticate queues of this clients.
public abstract long getNumUpdate();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int countNumberClientsTotal() {\n\t\tint counter = 0;\n\t\tfor(int number : numberClients.values())\n\t\t\tcounter += number;\n\t\treturn counter;\n\t}", "public int getUpdateCountsCount() {\n return updateCounts_.size();\n }", "public int getUpdateCountsCount() {\n return updateCounts_.s...
[ "0.6841915", "0.6680497", "0.66647744", "0.6614936", "0.6613405", "0.65656674", "0.65272486", "0.6518095", "0.65179396", "0.6497643", "0.6481648", "0.6466068", "0.6438245", "0.64180326", "0.64005506", "0.6389836", "0.63467455", "0.6320541", "0.6298261", "0.6261982", "0.624583...
0.57658833
70
Access the number of sessions of this user.
public abstract int getNumSessions();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int getSessionCount();", "public int getUserCount() {\n return instance.getUserCount();\n }", "public long getSessionCounter();", "public int getCountAtSessionStart() {\r\n return countAtSessionStart;\r\n }", "public int getActiveSessions();", "int getAccessCounterForSession();"...
[ "0.7730481", "0.7667515", "0.7567029", "0.75595397", "0.7501377", "0.7465922", "0.7283675", "0.72704864", "0.7229823", "0.7124571", "0.70970845", "0.69794124", "0.6872374", "0.687158", "0.6869766", "0.6869766", "0.68608576", "0.6748221", "0.67370826", "0.67343545", "0.6734354...
0.77276886
1
Access a list of public session identifier e.g. "1,5,7,12"
public abstract String getSessionList();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<String> getSessionList(){\r\n \t\r\n \tList<String> sessionIds = new ArrayList<String>();\r\n \tfor (Entry<String, AccessDetailVO> curPage : pageAccess.entrySet()) {\r\n \t\tAccessDetailVO currLock = curPage.getValue();\r\n \t\tif(!sessionIds.contains(currLock.getSessionId())){\r\n \t...
[ "0.67962873", "0.6457147", "0.62474287", "0.61463696", "0.6133812", "0.6133812", "0.6111231", "0.6111231", "0.6111231", "0.6111231", "0.6058207", "0.5993567", "0.5951826", "0.59344214", "0.5908499", "0.58727705", "0.5860843", "0.5853528", "0.5814216", "0.5794702", "0.5756872"...
0.6033799
11
JMX: Enforced by interface NotificationBroadcasterSupport
public abstract MBeanNotificationInfo[] getNotificationInfo();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface Notifier {\n\tpublic void notify(String message);\n}", "public interface NotificationCatcher {\n public static final String COPYRIGHT_2009_2010 = Constants.COPYRIGHT_2009_2010;\n \n static final String SCM_REVISION = \"$Revision: 1.2 $\"; //$NON-NLS-1$\n\n /**\n * When the Manage...
[ "0.66425705", "0.6407997", "0.6402858", "0.6315651", "0.6208803", "0.6202804", "0.6183368", "0.6133637", "0.6097938", "0.609215", "0.60696006", "0.60650575", "0.60290486", "0.6002916", "0.59974295", "0.5991271", "0.59777534", "0.59661514", "0.5963178", "0.5956928", "0.5933222...
0.65012103
1
Marks space as being threatened by a queen
public void set(int x,int y) { if ( ! (board[x][y] == 9)) { board[x][y] = 1; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void giveQueenFood(QueenAnt theQueen){\n hasFood = false;\n theQueen.setHunger(theQueen.getHunger()+50);\n }", "private void reMark(int row, int col){\n for(int i = 0; i < sizeOfBoard; ++i){\n int rowOfOtherCol = rowUsedByColNumber[i] - 1;\n if(row...
[ "0.61280733", "0.5775146", "0.57374066", "0.5736299", "0.57359445", "0.5617079", "0.5597628", "0.5527186", "0.54424727", "0.54336846", "0.54213333", "0.53933364", "0.5391414", "0.53745526", "0.53654015", "0.5355729", "0.5335655", "0.53351665", "0.53298473", "0.5295384", "0.52...
0.0
-1
/Called evertime a queen is placed to mark all the spaces threatened by that queen
public void fill(int x, int y) { for (int c = 0; c < yLen; c++){ set(x,c); } for (int r = 0; r < xLen; r++) { set(r,y); } int x2 = x+1; int y2 = y+1; while ( x2 < xLen && y2 < yLen ) { set(x2,y2); x2++; y2++; } x2 = x-1; y2 = y-1; while ( x2 >= 0 && y2 >= 0 ) { set(x2,y2); x2--; y2--; } x2 = x-1; y2 = y+1; while ( x2 >= 0 && y2 < yLen ) { set(x2,y2); x2--; y2++; } x2 = x+1; y2 = y-1; while ( x2 < xLen && y2 >= 0 ) { set(x2,y2); x2++; y2--; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void reMark(int row, int col){\n for(int i = 0; i < sizeOfBoard; ++i){\n int rowOfOtherCol = rowUsedByColNumber[i] - 1;\n if(rowOfOtherCol != -1){//Is there a queen in this row?\n int colOffSet = Math.abs(rowOfOtherCol - row);\n ...
[ "0.63437617", "0.6120667", "0.6070842", "0.5939938", "0.5802408", "0.5628451", "0.56090254", "0.5567669", "0.55636615", "0.5537402", "0.5530404", "0.55085045", "0.5471406", "0.5462695", "0.54460984", "0.5445196", "0.5440258", "0.54400915", "0.5427077", "0.5425306", "0.5412707...
0.0
-1
Number of queens on board = n
public void solve(int x, int y) { if ( numQ == xLen ) solved = true; //Checks if you're able to place queen on current space else if ( board[x][y] == 0 ) { fill(x,y); board[x][y] = 9; numQ++; //Attempts to call solve for every spot on the board for ( int r =0; r < xLen; r++ ) { for ( int c = 0; c < yLen; c++ ) { if (!solved) solve(r,c); } } /* Though I got my code to work for the 5x5 example, I had trouble extending it to larger boards. Essentially my solve places a queen in the first non-"threatened" spot on the board available, but doesn't go back to try another configuration if the program runs into a dead-end. */ } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int n_queens(int n, ArrayList<Integer> board){\n System.out.println(board.toString());\n\n if(n == board.size()){\n return 1;\n }\n\n int count = 0;\n\n for(int i = 0; i < n; i++){\n // make sure we haven't included it\n if(!board.contains(i)){\n ...
[ "0.8059908", "0.80025816", "0.78104997", "0.77865475", "0.77294093", "0.76453483", "0.76198864", "0.7315527", "0.6808019", "0.6771899", "0.6620838", "0.66205835", "0.6591602", "0.6588163", "0.6569404", "0.64464223", "0.63294417", "0.6297101", "0.6272974", "0.6259399", "0.6196...
0.0
-1
Abstract interface which defines in general the Similarity measurement. Subclasses implement search scoring functions.
public abstract interface Similarity { /** * This is the function that summarizes all the functionality of similarity * matching. It computes the total score from the previous level factors * multiplied with the appropriate weights. * * @return The total score of the similarity between document and query. */ public abstract float getScore(); /** * This function returns the previous level factors of scoring computation * * @return */ public abstract Object[] getSimilarityFactors(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface EQSimilarity {\n \n /**\n * Compute similarity between two equivalence classes. The equivalence\n * classes are referenced by their unique identifier.\n * \n * @param eq1\n * @param eq2\n * @return \n */\n public SimilarityScore sim(int eq1, int eq2);\n}", "pu...
[ "0.7299037", "0.7183283", "0.70742875", "0.698459", "0.696774", "0.6961041", "0.6811998", "0.67729026", "0.6730417", "0.6604983", "0.66046566", "0.6507442", "0.650732", "0.6476836", "0.64027077", "0.63868195", "0.63300604", "0.6323469", "0.6309769", "0.62214565", "0.61674607"...
0.80838394
0
This is the function that summarizes all the functionality of similarity matching. It computes the total score from the previous level factors multiplied with the appropriate weights.
public abstract float getScore();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void calculateScore() {\n for (Sequence seq: currentSeq) {\n double wordWeight = Retriever.getWeight(seq);\n String token = seq.getToken();\n int size = seq.getRight() - seq.getLeft() + 1;\n int titleCount = getCount(token.toLowerCase(), title.toLowerCase()...
[ "0.70234317", "0.68923783", "0.6482247", "0.63396204", "0.62739253", "0.6110458", "0.6024848", "0.6020419", "0.59865296", "0.596378", "0.58966565", "0.5859434", "0.5807612", "0.57279885", "0.572357", "0.5720529", "0.57179725", "0.57160956", "0.57082206", "0.5685606", "0.56824...
0.0
-1
This function returns the previous level factors of scoring computation
public abstract Object[] getSimilarityFactors();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getExperienceToNextLevel() {\n\t\treturn (int)(Math.sqrt(level)*2*(level*level));\n\t}", "public static double[] computeLastCFLevel(double[] levels) {\n\t\tdouble[] newLevels = new double[levels.length + 1];\n\t\tdouble alphaK = 1.0 - levels[0]; // Assign C - 1 to alpha K\n\t\tnewLevels[0] = levels[0]...
[ "0.61055017", "0.58391654", "0.5772329", "0.57498056", "0.57498056", "0.5702344", "0.5696637", "0.568316", "0.5600305", "0.55449766", "0.55352813", "0.5531769", "0.5492717", "0.54478014", "0.5437096", "0.5407763", "0.5404927", "0.53955495", "0.53744286", "0.53525877", "0.5334...
0.0
-1
Uses Nested Search Criteria for search Verifies that the results are returned Verifies size of the result set Verifies that none of the attribute is null
public void testEntireObjectNestedSearch1() throws ApplicationException { Luggage searchObject = new Luggage(); Collection results = getApplicationService().search("gov.nih.nci.cacoresdk.domain.inheritance.parentwithassociation.sametable.Luggage",searchObject ); assertNotNull(results); assertEquals(5,results.size()); for(Iterator i = results.iterator();i.hasNext();) { Luggage result = (Luggage)i.next(); assertNotNull(result); assertNotNull(result.getId()); assertEquals(result.getId().getRoot(),II_ROOT_GLOBAL_CONSTANT_VALUE); assertNotNull(result.getCapacity()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void testOneAssociatedObjectNestedSearch1() throws Exception\r\n\t{\r\n\t\tPerson searchObject = new Person();\r\n\t\tIi ii = new Ii();\r\n\t\tii.setExtension(\"1\");\r\n\t\tsearchObject.setId(ii);\r\n\t\tCollection results = getApplicationService().search(\"gov.nih.nci.cacoresdk.domain.onetoone.unidirectio...
[ "0.6094839", "0.5967578", "0.58809227", "0.5824729", "0.5787459", "0.5767548", "0.57375157", "0.5720395", "0.56218773", "0.56023884", "0.55994725", "0.5570913", "0.55694336", "0.54922676", "0.54494226", "0.54305947", "0.54176146", "0.541649", "0.54155296", "0.5401301", "0.539...
0.5875312
3
Uses Nested Search Criteria for search Verifies that the results are returned Verifies size of the result set Verifies that none of the attribute is null
public void testEntireObjectNestedSearch2() throws ApplicationException { HardTop searchObject = new HardTop(); Collection results = getApplicationService().search("gov.nih.nci.cacoresdk.domain.inheritance.parentwithassociation.sametable.HardTop",searchObject ); assertNotNull(results); assertEquals(3,results.size()); for(Iterator i = results.iterator();i.hasNext();) { HardTop result = (HardTop)i.next(); assertNotNull(result); assertNotNull(result.getId()); assertEquals(result.getId().getRoot(),II_ROOT_GLOBAL_CONSTANT_VALUE); assertNotNull(result.getCapacity()); assertNotNull(result.getKeyCode()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void testOneAssociatedObjectNestedSearch1() throws Exception\r\n\t{\r\n\t\tPerson searchObject = new Person();\r\n\t\tIi ii = new Ii();\r\n\t\tii.setExtension(\"1\");\r\n\t\tsearchObject.setId(ii);\r\n\t\tCollection results = getApplicationService().search(\"gov.nih.nci.cacoresdk.domain.onetoone.unidirectio...
[ "0.6095284", "0.5968794", "0.5882036", "0.5876037", "0.58266973", "0.5789984", "0.57398206", "0.5721301", "0.5623989", "0.56030756", "0.5600043", "0.5573166", "0.5568971", "0.5492812", "0.5451907", "0.5431929", "0.54194707", "0.5419109", "0.54168755", "0.5403387", "0.5399568"...
0.57689214
6
Uses Nested Search Criteria for search Verifies that the results are returned Verifies size of the result set Verifies that none of the attribute is null
public void testEntireObjectNestedSearch3() throws ApplicationException { SoftTop searchObject = new SoftTop(); Collection results = getApplicationService().search("gov.nih.nci.cacoresdk.domain.inheritance.parentwithassociation.sametable.SoftTop",searchObject ); assertNotNull(results); assertEquals(2,results.size()); for(Iterator i = results.iterator();i.hasNext();) { SoftTop result = (SoftTop)i.next(); assertNotNull(result); assertNotNull(result.getId()); assertEquals(result.getId().getRoot(),II_ROOT_GLOBAL_CONSTANT_VALUE); assertNotNull(result.getCapacity()); assertNotNull(result.getExpandable()); assertNull(result.getExpandable().getNullFlavor()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void testOneAssociatedObjectNestedSearch1() throws Exception\r\n\t{\r\n\t\tPerson searchObject = new Person();\r\n\t\tIi ii = new Ii();\r\n\t\tii.setExtension(\"1\");\r\n\t\tsearchObject.setId(ii);\r\n\t\tCollection results = getApplicationService().search(\"gov.nih.nci.cacoresdk.domain.onetoone.unidirectio...
[ "0.6094735", "0.5968607", "0.58819556", "0.5876872", "0.58251446", "0.57890755", "0.57685107", "0.57391375", "0.5720598", "0.56213874", "0.56021494", "0.55999935", "0.5572392", "0.5569046", "0.5492777", "0.544996", "0.54308534", "0.5419703", "0.5419325", "0.54147184", "0.5402...
0.53995067
21
Uses Nested Search Criteria for search Verifies that the results are returned Verifies size of the result set Verifies that none of the attribute is null
public void testEntireObjectNestedSearch4() throws ApplicationException { Wheel searchObject = new Wheel(); Collection results = getApplicationService().search("gov.nih.nci.cacoresdk.domain.inheritance.parentwithassociation.sametable.Wheel",searchObject ); assertNotNull(results); assertEquals(3,results.size()); for(Iterator i = results.iterator();i.hasNext();) { Wheel result = (Wheel)i.next(); assertNotNull(result); assertNotNull(result.getId()); assertEquals(result.getId().getRoot(),II_ROOT_GLOBAL_CONSTANT_VALUE); assertNotNull(result.getRadius()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void testOneAssociatedObjectNestedSearch1() throws Exception\r\n\t{\r\n\t\tPerson searchObject = new Person();\r\n\t\tIi ii = new Ii();\r\n\t\tii.setExtension(\"1\");\r\n\t\tsearchObject.setId(ii);\r\n\t\tCollection results = getApplicationService().search(\"gov.nih.nci.cacoresdk.domain.onetoone.unidirectio...
[ "0.60940427", "0.588059", "0.58753157", "0.58260345", "0.5788562", "0.57677174", "0.57388216", "0.572017", "0.5622597", "0.56039864", "0.56001955", "0.55722564", "0.55696297", "0.5492621", "0.5449423", "0.5432904", "0.5419065", "0.5418545", "0.54165477", "0.5401612", "0.53985...
0.596729
1
Uses Nested Search Criteria for inheritance as association in search Verifies that the result set is empty
public void testZeroAssociationNestedSearch() throws ApplicationException { HardTop searchObject = new HardTop(); Int intISO=new Int(); intISO.setValue(99); searchObject.setCapacity(intISO);//No such row exists Collection results = getApplicationService().search("gov.nih.nci.cacoresdk.domain.inheritance.parentwithassociation.sametable.Luggage",searchObject ); assertNotNull(results); assertEquals(0,results.size()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void testOneAssociatedObjectNestedSearch1() throws Exception\r\n\t{\r\n\t\tPerson searchObject = new Person();\r\n\t\tIi ii = new Ii();\r\n\t\tii.setExtension(\"1\");\r\n\t\tsearchObject.setId(ii);\r\n\t\tCollection results = getApplicationService().search(\"gov.nih.nci.cacoresdk.domain.onetoone.unidirectio...
[ "0.614282", "0.58892643", "0.58771944", "0.58389926", "0.58315617", "0.57495195", "0.57355666", "0.5734797", "0.5733128", "0.5660609", "0.5583894", "0.5570328", "0.5558133", "0.55416036", "0.55398804", "0.54122645", "0.5408961", "0.53750074", "0.5353672", "0.5346291", "0.5341...
0.6320007
0
Uses Nested Search Criteria for inheritance as association in search Verifies that the result set is empty
public void testAssociationNestedSearch() throws ApplicationException { HardTop searchObject = new HardTop(); Wheel wheel = new Wheel(); Int intISO=new Int(); intISO.setValue(99); wheel.setRadius(intISO); searchObject.setWheel(wheel); Int intISO2=new Int(); intISO.setValue(75); searchObject.setCapacity(intISO2); Collection results = getApplicationService().search("gov.nih.nci.cacoresdk.domain.inheritance.parentwithassociation.sametable.HardTop",searchObject ); assertNotNull(results); for(Iterator i = results.iterator();i.hasNext();) { HardTop result = (HardTop)i.next(); assertNotNull(result); assertNotNull(result.getId()); assertEquals(result.getId().getRoot(),II_ROOT_GLOBAL_CONSTANT_VALUE); assertNotNull(result.getKeyCode()); assertNotNull(result.getCapacity()); assertEquals(result.getKeyCode(),new Integer(627)); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void testZeroAssociationNestedSearch() throws ApplicationException\r\n\t{\r\n\t\tHardTop searchObject = new HardTop();\r\n\t\tInt intISO=new Int();\r\n\t\tintISO.setValue(99);\r\n\t\tsearchObject.setCapacity(intISO);//No such row exists\r\n\t\tCollection results = getApplicationService().search(\"gov.nih.nc...
[ "0.6318412", "0.614131", "0.588731", "0.5877516", "0.5837297", "0.58298314", "0.5748036", "0.5733733", "0.57321155", "0.56610173", "0.5583645", "0.5568672", "0.55583936", "0.55423665", "0.553785", "0.54124266", "0.5409012", "0.53760564", "0.5354919", "0.5344687", "0.5341113",...
0.5732967
8
Uses Nested Search Criteria for inheritance as association in search Verifies that the results are returned Verifies size of the result set Verifies that none of the attribute is null
public void testAssociationNestedSearch1() throws ApplicationException { Luggage searchObject = new Luggage(); Ii ii=new Ii(); ii.setExtension("1"); searchObject.setId(ii); Collection results = getApplicationService().search("gov.nih.nci.cacoresdk.domain.inheritance.parentwithassociation.sametable.HardTop",searchObject ); assertNotNull(results); assertEquals(1,results.size()); HardTop result = (HardTop)results.iterator().next(); assertNotNull(result); assertNotNull(result.getId()); assertEquals(result.getId().getRoot(),II_ROOT_GLOBAL_CONSTANT_VALUE); assertEquals("1", result.getId().getExtension()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void testOneAssociatedObjectNestedSearch1() throws Exception\r\n\t{\r\n\t\tPerson searchObject = new Person();\r\n\t\tIi ii = new Ii();\r\n\t\tii.setExtension(\"1\");\r\n\t\tsearchObject.setId(ii);\r\n\t\tCollection results = getApplicationService().search(\"gov.nih.nci.cacoresdk.domain.onetoone.unidirectio...
[ "0.6256077", "0.6031449", "0.598247", "0.59683657", "0.59057915", "0.5895729", "0.5858144", "0.583632", "0.58333427", "0.5805198", "0.57065344", "0.5593544", "0.55379623", "0.54907614", "0.5465205", "0.543796", "0.5433782", "0.5361363", "0.5355013", "0.5331674", "0.5320934", ...
0.59487987
4
Uses Nested Search Criteria for inheritance as association in search Verifies that the results are returned Verifies size of the result set Verifies that none of the attribute is null
public void testAssociationNestedSearch2() throws ApplicationException { HardTop searchObject = new HardTop(); Ii ii=new Ii(); ii.setExtension("2"); searchObject.setId(ii); Collection results = getApplicationService().search("gov.nih.nci.cacoresdk.domain.inheritance.parentwithassociation.sametable.Luggage",searchObject ); assertNotNull(results); assertEquals(1,results.size()); Luggage result = (Luggage)results.iterator().next(); assertNotNull(result); assertNotNull(result.getId()); assertEquals(result.getId().getRoot(),II_ROOT_GLOBAL_CONSTANT_VALUE); assertEquals("2", result.getId().getExtension()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void testOneAssociatedObjectNestedSearch1() throws Exception\r\n\t{\r\n\t\tPerson searchObject = new Person();\r\n\t\tIi ii = new Ii();\r\n\t\tii.setExtension(\"1\");\r\n\t\tsearchObject.setId(ii);\r\n\t\tCollection results = getApplicationService().search(\"gov.nih.nci.cacoresdk.domain.onetoone.unidirectio...
[ "0.6257171", "0.60322833", "0.5969328", "0.59494823", "0.59063303", "0.58958334", "0.5858866", "0.5837409", "0.58344674", "0.5806478", "0.57072926", "0.55914485", "0.55391574", "0.5491718", "0.54656285", "0.5436379", "0.5434245", "0.5362765", "0.5356766", "0.53324306", "0.532...
0.5983245
2
Uses Nested Search Criteria for inheritance as association in search Verifies that the results are returned Verifies size of the result set Verifies that none of the attribute is null
public void testAssociationNestedSearch3() throws ApplicationException { Luggage searchObject = new Luggage(); Ii ii=new Ii(); ii.setExtension("3"); searchObject.setId(ii); Collection results = getApplicationService().search("gov.nih.nci.cacoresdk.domain.inheritance.parentwithassociation.sametable.SoftTop",searchObject ); assertNotNull(results); assertEquals(1,results.size()); SoftTop result = (SoftTop)results.iterator().next(); assertNotNull(result); assertNotNull(result.getId()); assertEquals(result.getId().getRoot(),II_ROOT_GLOBAL_CONSTANT_VALUE); assertEquals("3", result.getId().getExtension()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void testOneAssociatedObjectNestedSearch1() throws Exception\r\n\t{\r\n\t\tPerson searchObject = new Person();\r\n\t\tIi ii = new Ii();\r\n\t\tii.setExtension(\"1\");\r\n\t\tsearchObject.setId(ii);\r\n\t\tCollection results = getApplicationService().search(\"gov.nih.nci.cacoresdk.domain.onetoone.unidirectio...
[ "0.62570363", "0.60324943", "0.59834844", "0.59693134", "0.59500456", "0.5906637", "0.58958477", "0.5859145", "0.5837442", "0.5834858", "0.5807031", "0.5707935", "0.55918765", "0.54914224", "0.5465684", "0.54369795", "0.54342854", "0.5362933", "0.53559047", "0.53321266", "0.5...
0.553933
13
Uses Nested Search Criteria for inheritance as association in search Verifies that the results are returned Verifies size of the result set Verifies that none of the attribute is null
public void testAssociationNestedSearch4() throws ApplicationException { SoftTop searchObject = new SoftTop(); Ii ii=new Ii(); ii.setExtension("3"); searchObject.setId(ii); Collection results = getApplicationService().search("gov.nih.nci.cacoresdk.domain.inheritance.parentwithassociation.sametable.Luggage",searchObject ); assertNotNull(results); assertEquals(1,results.size()); Luggage result = (Luggage)results.iterator().next(); assertNotNull(result); assertNotNull(result.getId()); assertEquals(result.getId().getRoot(),II_ROOT_GLOBAL_CONSTANT_VALUE); assertEquals("3", result.getId().getExtension()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void testOneAssociatedObjectNestedSearch1() throws Exception\r\n\t{\r\n\t\tPerson searchObject = new Person();\r\n\t\tIi ii = new Ii();\r\n\t\tii.setExtension(\"1\");\r\n\t\tsearchObject.setId(ii);\r\n\t\tCollection results = getApplicationService().search(\"gov.nih.nci.cacoresdk.domain.onetoone.unidirectio...
[ "0.62557924", "0.60317284", "0.59824544", "0.5968411", "0.5948345", "0.5906206", "0.58950055", "0.5836858", "0.5833409", "0.5806083", "0.5707017", "0.5591967", "0.5537613", "0.5489488", "0.54653174", "0.5436873", "0.5434304", "0.53618085", "0.53557634", "0.5331788", "0.532042...
0.5857934
7
Uses Nested Search Criteria for inheritance as association in search Verifies that the results are returned Verifies size of the result set Verifies that none of the attribute is null
public void testAssociationNestedSearch5() throws ApplicationException { HardTopType searchObject = new HardTopType(); Wheel wheel = new Wheel(); Int intISO=new Int(); intISO.setValue(1); wheel.setRadius(intISO); searchObject.setWheel(wheel); Int intISO2=new Int(); intISO2.setValue(100); searchObject.setCapacity(intISO2); Collection results = getApplicationService().search("gov.nih.nci.cacoresdk.domain.inheritance.parentwithassociation.sametable.HardTopType",searchObject ); assertNotNull(results); assertEquals(1,results.size()); for(Iterator i = results.iterator();i.hasNext();) { HardTopType result = (HardTopType)i.next(); assertNotNull(result); assertNotNull(result.getId()); assertEquals(result.getId().getRoot(),II_ROOT_GLOBAL_CONSTANT_VALUE); assertEquals("5", result.getId().getExtension()); assertEquals(new Integer(100), result.getCapacity().getValue()); assertEquals(new Integer(890), result.getKeyCode().getValue()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void testOneAssociatedObjectNestedSearch1() throws Exception\r\n\t{\r\n\t\tPerson searchObject = new Person();\r\n\t\tIi ii = new Ii();\r\n\t\tii.setExtension(\"1\");\r\n\t\tsearchObject.setId(ii);\r\n\t\tCollection results = getApplicationService().search(\"gov.nih.nci.cacoresdk.domain.onetoone.unidirectio...
[ "0.6256077", "0.6031449", "0.598247", "0.59683657", "0.59487987", "0.59057915", "0.5895729", "0.5858144", "0.583632", "0.58333427", "0.5805198", "0.5593544", "0.55379623", "0.54907614", "0.5465205", "0.543796", "0.5433782", "0.5361363", "0.5355013", "0.5331674", "0.5320934", ...
0.57065344
11
region Positional Access Operations
@Contract(pure = true) default boolean isDefinedAt(int index) { return index >= 0 && sizeGreaterThan(index); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract Object get(int pos) throws IndexOutOfBoundsException;", "public int PositionGet();", "public T get(int pos);", "T get(int position);", "public Object get (int i)\r\n {\r\n }", "abstract int get(int index);", "public int getPos();", "public int getPos();", "public String get(in...
[ "0.6432064", "0.6430241", "0.63215935", "0.61681765", "0.6100459", "0.60423744", "0.592662", "0.592662", "0.5925486", "0.5917817", "0.5917817", "0.58522797", "0.5816636", "0.5792794", "0.57836336", "0.57781345", "0.5770279", "0.576653", "0.5763072", "0.5762152", "0.57410777",...
0.0
-1
endregion region Reversal Operations
default @NotNull Iterator<E> reverseIterator() { final int ks = this.knownSize(); if (ks == 0) { return Iterators.empty(); } Iterator<E> it = this.iterator(); if (!it.hasNext()) { return it; } ArrayBuffer<E> buffer = ks > 0 ? new ArrayBuffer<>(ks) : new ArrayBuffer<>(); while (it.hasNext()) { buffer.append(it.next()); } @SuppressWarnings("unchecked") Iterator<E> res = (Iterator<E>) GenericArrays.reverseIterator(buffer.toArray()); return res; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Reversal() {\n\t\tsuper();\n\t}", "void reverse();", "void reverse();", "void reverseDirection();", "public DoubleLinkedSeq reverse(){\r\n\t DoubleLinkedSeq rev = new DoubleLinkedSeq();\r\n\t for(cursor = head; cursor != null; cursor = cursor.getLink()){\r\n\t\t rev.addBefore(this.getCurrent()...
[ "0.7830381", "0.74559444", "0.74559444", "0.74409556", "0.7434758", "0.7168543", "0.7092418", "0.7032718", "0.701972", "0.69445944", "0.6850374", "0.67982376", "0.67630786", "0.6733192", "0.6642531", "0.6633025", "0.662862", "0.65961665", "0.6593867", "0.6593641", "0.6587324"...
0.0
-1
endregion region Element Retrieval Operations
@Override default @NotNull Option<E> find(@NotNull Predicate<? super E> predicate) { return firstOption(predicate); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "String getElem();", "public Object getElement();", "Elem getElem();", "String getElement();", "Element getElement();", "public E getElement() { return element; }", "@Override\r\n\tpublic Object getElement(Object elementKey) {\n\t\treturn elements.get(elementKey);\r\n\t}", "public T getElement();", ...
[ "0.77770483", "0.76480114", "0.7568402", "0.7469966", "0.73887265", "0.7331032", "0.7313774", "0.72899806", "0.72611326", "0.72611326", "0.718898", "0.7180754", "0.71298206", "0.70619696", "0.7036874", "0.7020458", "0.7006703", "0.6935951", "0.6924652", "0.69171727", "0.68791...
0.0
-1
endregion region Search Operations
@Contract(pure = true) default int indexOf(Object value) { int idx = 0; if (value == null) { for (E e : this) { if (null == e) { return idx; } ++idx; } } else { for (E e : this) { if (value.equals(e)) { return idx; } ++idx; } } return -1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public void search();", "public void search() {\r\n \t\r\n }", "private void searchFunction() {\n\t\t\r\n\t}", "void search();", "void search();", "public void search() {\n }", "@Override\n\tpublic void search() {\n\t}", "@Override\r\n\tpublic void search() {\n\r\n\t}", "@In Strin...
[ "0.8402368", "0.8312722", "0.82262385", "0.8191418", "0.8191418", "0.81416273", "0.7942821", "0.7936221", "0.77564317", "0.7494967", "0.7425437", "0.73892236", "0.73881274", "0.7351106", "0.7172673", "0.7161994", "0.7094095", "0.7073718", "0.70376164", "0.701714", "0.69867575...
0.0
-1
endregion region Traversable Operations
default void forEachIndexed(@NotNull IndexedConsumer<? super E> action) { int idx = 0; for (E e : this) { action.accept(idx++, e); // implicit null check of action } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface Traversable\n{\npublic boolean reset();\n\npublic Player getPlayer();\n\npublic Room[] getAllRooms();\n\npublic MazeRef getMazeSize();\n\npublic Room getRoom(MazeRef location);\n\npublic boolean move(String exitPointName) throws GameException;\n}", "public boolean isTraversable() {\n\t\treturn t...
[ "0.673574", "0.6630657", "0.6267601", "0.6260186", "0.61562574", "0.604887", "0.6021592", "0.60123676", "0.5982017", "0.5972463", "0.592794", "0.59127", "0.5900837", "0.59008294", "0.58869106", "0.5830487", "0.5822451", "0.5812659", "0.5808694", "0.57974046", "0.5796195", "...
0.0
-1
TODO Autogenerated method stub
@Override public List<MemberManageVO> list(SearchCriteria scri) throws Exception { return dao.list(scri); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
TODO Autogenerated method stub
@Override public int listCount(SearchCriteria scri) throws Exception { return dao.listCount(scri); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
TODO Autogenerated method stub
@Override public MemberManageVO read(String userId) throws Exception { return dao.read(userId); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
TODO Autogenerated method stub
@Override public void delete(String userId) throws Exception { dao.delete(userId); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
int Integer=0; double d= new Double(1_000_000.00); System.out.println(d); double num=2.7_1_8; int plan=1; plan=plan++ + plan; System.out.println(plan); long thatNumber= 5>=5 ? 1+2 : 11; System.out.println(thatNumber); if(++thatNumber<4) thatNumber+=1; System.out.println(thatNumber); int x=10, y=5; boolean w=true, z=false; x=w? y++:y; //System.out.println(x); w=!z; System.out.println(w); System.out.println((x+y)+" "+(w? 5:10));
public static void main(String[] args) { boolean q=true; boolean p=true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String[] args) {\n\t\tbyte i1 = 1; // Memory Size: 1Byte, Range: -128 ~ 127\n\t\tshort i2 = 2; // Memory Size: 2Byte, Range: -32768 ~ 32767\n\t\tint i3 = 3; // Memory Size: 4Byte, Range: -2147483648 ~ 2147483647\n\t\tlong i4 = 4; // Memory Size: 8Byte, Range: -922337036854775808 ~ 922337203...
[ "0.62048686", "0.604252", "0.59430766", "0.5924316", "0.5858661", "0.58576316", "0.5850512", "0.579222", "0.57838756", "0.5761433", "0.57397103", "0.5729964", "0.568883", "0.56837964", "0.5676256", "0.56532365", "0.5644399", "0.56221426", "0.55845475", "0.55747426", "0.557324...
0.0
-1
Go to credentials tab
public String createCredential(Credential credential, String baseUrl, String endpoint) { this.goHomeAndGoToTab(baseUrl, endpoint); // Click on Add new Credential this.waitForElementToBeClickableAndClick(this.btnCredentialAdd); this.fillInForm(credential); return getPageTitleAndGoHome(baseUrl, endpoint); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void goToLoginPage()\n\t{\n\t\tclickAccountNameIcon();\n\t\tclickSignInLink();\n\t}", "public void clickGoToLogin(){\n\t\t\n\t\tgoToLoginBtn.click();\n\t\t\n\t}", "public void navigateToLoginPage() {\r\n\t\tBrowser.open(PhpTravelsGlobal.PHP_TRAVELS_LOGIN_URL);\r\n\t}", "public void clickLogin() {\n\t\...
[ "0.69768393", "0.67510074", "0.6721011", "0.67171407", "0.66750026", "0.66610044", "0.6610335", "0.65371543", "0.64963806", "0.6442804", "0.6428373", "0.64002144", "0.6397482", "0.6386359", "0.63780403", "0.6318051", "0.629979", "0.6286902", "0.6208286", "0.61659855", "0.6164...
0.0
-1
nbre de cellules par ligne Genere les murs dans la carte d'un niveau
public void genererMurs(boolean[][] carteNiveau){ m_nbre_lignes = carteNiveau.length; m_longueurLigne = carteNiveau[0].length; tabCellules = new Object[carteNiveau.length][carteNiveau[0].length]; for (int i = 0; i < carteNiveau.length ; i ++){ boolean[] ligneTab = carteNiveau[i]; Object[] ligneCellules = new Object[ligneTab.length]; for(int j =0; j < ligneTab.length; j++){ if(ligneTab[j] == true){ Mur mur = new Mur(j,i); ligneCellules[j] = mur; } } tabCellules[i] = ligneCellules; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int calculerKgsNourritureParJour(){\r\n\t\treturn noms.size() * 10;\r\n\t}", "public void mostrarTareasNumeradas(){\n int numeroPosicion = 1;\n for (String tarea : tareas){\n System.out.println(numeroPosicion + \". \" + tarea);\n numeroPosicion = numeroPosicion + 1;\n ...
[ "0.6472088", "0.63944906", "0.6204207", "0.62009823", "0.6194647", "0.619418", "0.61476636", "0.61476636", "0.6130348", "0.6070686", "0.6061413", "0.60309", "0.60176075", "0.59980536", "0.5993434", "0.5988853", "0.5983075", "0.59480125", "0.59321755", "0.58870673", "0.5880949...
0.0
-1
Affiche a la console la carte du niveau avec les monstres et Zoe
public void afficher(Zoe zoe, ArrayList<Monstre> monstres){ // cree une carte de symboles ASCII int longueurTab = this.tabCellules.length; int longueurLigne = this.tabCellules[0].length; String[][] carteCaracteres = new String[longueurTab][longueurLigne]; for(int i = 0; i < longueurTab; i++){ for(int j = 0; j < longueurLigne; j++){ if (this.tabCellules[i][j] != null){ carteCaracteres[i][j] = this.tabCellules[i][j].toString(); } else { carteCaracteres[i][j] = " "; } } } // place les monstres sur la carte Iterator<Monstre> it = monstres.iterator(); while (it.hasNext()) { Monstre monstre = it.next(); int x = monstre.getCoordX(); int y = monstre.getCoordY(); if (monstre.getVivant()) { // priorite d'affichage pour les monstres vivants carteCaracteres[y][x] = monstre.toString(); } else if (!monstre.getVivant() && carteCaracteres[y][x].equals(" ")) { carteCaracteres[y][x] = monstre.toString(); } } // place Zoe sur la carte carteCaracteres[zoe.getCoordY()][zoe.getCoordX()] = zoe.toString(); // affiche la carte contenant Zoe et les monstres String chaineCarac = ""; // for(int i = 0; i < carteCaracteres.length; i ++){ String[] ligne = carteCaracteres[i]; for(int j = 0; j < ligne.length; j++) { chaineCarac += ligne[j]; } System.out.println(chaineCarac); chaineCarac = ""; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void dormir(){\n System.out.print(\"\\033[H\\033[2J\");//limpia pantalla\n System.out.flush();\n int restoDeMana; //variables locales a utilizar\n int restoDeVida;\n if(oro>=30){ //condicion de oro para recuperar vida y mana\n restoDeMana=10-puntosDeMa...
[ "0.68504906", "0.6749165", "0.66273695", "0.657685", "0.65653765", "0.6555833", "0.6501769", "0.647667", "0.64159787", "0.6413475", "0.63929725", "0.63698083", "0.63681436", "0.6354514", "0.63513166", "0.63497776", "0.6348935", "0.6346354", "0.6323394", "0.63184434", "0.62933...
0.59594774
75
retourne un item selon le type demande
public Item getItem(String typeItem){ if(typeItem.equals("coeur")){ Item coeur = new Coeur(); return coeur; } else if(typeItem.equals("potionvie")){ Item potion = new Potion(); return potion; } else if(typeItem.equals("hexaforce")){ Item hexa = new Hexaforce(); return hexa; } else { return null; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract boolean depleteItem();", "@Override\n public Item vendItem(Item item) {\n allItems.put(item.getItemId(), item);\n return item;\n }", "@Override\n\tpublic void commande(List<commande> listcommande) {\n\n\t}", "@Override\n public int getItemType() {\n return ITEM_TYPE...
[ "0.6100735", "0.60246104", "0.58348817", "0.5798215", "0.57722026", "0.57665396", "0.57385474", "0.5702295", "0.56600523", "0.56204045", "0.5606059", "0.55824685", "0.55824685", "0.55784905", "0.55577934", "0.55327266", "0.55284333", "0.55261993", "0.55250245", "0.5516405", "...
0.6028549
1
Permet de modifier une cellule (case) dans la carte du niveau
public void setCellule(Cellule cellule){ if(!this.positionValide(cellule.getX(), cellule.getY())) { return; } this.tabCellules[cellule.getY()][cellule.getX()] = cellule; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ICase retourneLaCase() ;", "char caseconverter(int k,int k1)\n{\nif(k>=65 && k<=90)\n{\nk1=k1+32;\n}\nelse\nif(k>=97 && k<=122)\n{\nk1=k1-32;\n}\nreturn((char)k1);\n}", "@Override\n\tpublic void effetCase() {\n\t\t\n\t}", "public void resetEtatCases() {\n Component[] contenu = this.getComponent...
[ "0.6624124", "0.61172134", "0.57394874", "0.555557", "0.55411315", "0.5501693", "0.53990436", "0.5380094", "0.53774107", "0.53635657", "0.5358583", "0.53289485", "0.5285452", "0.52743995", "0.5197293", "0.51613843", "0.5120706", "0.51205486", "0.5100291", "0.50918555", "0.505...
0.0
-1
Permet de modifier une cellule (case) de la carte du niveau afin qu'elle soit vide
public void setCelluleNulle(int coordX, int coordY){ if(!this.positionValide(coordX, coordY)) return; this.tabCellules[coordY][coordX] = null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ICase retourneLaCase() ;", "@Override\n\tpublic void effetCase() {\n\t\t\n\t}", "public void resetEtatCases() {\n Component[] contenu = this.getComponents();\n for (int i = 0; i < contenu.length; i++) {\n if (contenu[i].getClass().equals(CaseJeu.class)) {\n CaseJe...
[ "0.63480157", "0.6111057", "0.6019652", "0.5570314", "0.5471816", "0.54190254", "0.53896135", "0.5332055", "0.5287181", "0.5270513", "0.5232102", "0.5218145", "0.5198248", "0.51872325", "0.51865846", "0.5159957", "0.5155006", "0.5145799", "0.5139243", "0.5129736", "0.5128556"...
0.0
-1
Permet d'obtenir un objet dans la carte du niveau
private Object getObjet(int coordX, int coordY){ if(!this.positionValide(coordX, coordY)) return null; return this.tabCellules[coordY][coordX]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Objet getObjetAlloue();", "@Override\n public void updete(Object obj) {\n\n }", "@Override\n\tpublic void visitarObjeto(Objeto o) {\n\t\t\n\t}", "@Override\n public boolean update(Revue objet) {\n return false;\n }", "public void borrarZonaObjetivoAtaque() {\n\t\t\n\t}", "@Override\n ...
[ "0.70590925", "0.64209867", "0.6347211", "0.6205216", "0.61714625", "0.6106463", "0.60866076", "0.6084808", "0.6027629", "0.602681", "0.60265857", "0.5994724", "0.5960748", "0.59531075", "0.590387", "0.5886146", "0.5858164", "0.5845618", "0.5844239", "0.5831984", "0.5800256",...
0.0
-1
Permet d'indiquer si le deplacement d'un personnage dans la carte est valide
public boolean deplacementValide(int coordX, int coordY){ // si l'emplacement est a l'exterieur de la carte, le deplacement n'est pas valide if(!this.positionValide(coordX, coordY)) return false; Object obj = this.getObjet(coordX, coordY); // si l'emplacement est vide ou deja occupe par un personnage, le deplacement est valide if (obj == null || obj instanceof Personnage){ return true; // pour tout autre cas, le deplacement n'est pas valide } else { return false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private boolean estSurPlateau(Coordonnees emplacement) {\n return emplacement.getLigne() >= 0 && emplacement.getColonne() >= 0 && emplacement.getLigne() < Plateau.NOMBRE_COLONNE && emplacement.getColonne() < Plateau.NOMBRE_LIGNE;\n }", "private boolean estPrise(Deplacement unDeplacement, Couleur couleu...
[ "0.650544", "0.6499081", "0.6413095", "0.60850114", "0.6032588", "0.5932268", "0.5922952", "0.59023196", "0.5844208", "0.5840394", "0.5759921", "0.56932944", "0.5678709", "0.5657245", "0.56461513", "0.55981636", "0.558404", "0.5568599", "0.5563439", "0.5548856", "0.55440676",...
0.62166786
3
Permet de verifier si une position d'un personnage a l'interieur de la carte est valide
public boolean positionValide(int coordX, int coordY){ if( !(coordX >= 0 && coordX < m_longueurLigne && coordY >= 0 && coordY < m_nbre_lignes) ){ return false; } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void verificaCoordenada() {\r\n\t\tif (X < 0) {\r\n\t\t\tX = Const.TAMANHO - 1;\r\n\t\t} else {\r\n\t\t\tX = X % Const.TAMANHO;\r\n\t\t}\r\n\r\n\t\tif (Y < 0) {\r\n\t\t\tY = Const.TAMANHO - 1;\r\n\t\t} else {\r\n\t\t\tY = Y % Const.TAMANHO;\r\n\t\t}\r\n\t}", "boolean judgeValid()\r\n\t{\r\n\t\tif(loc.i>=0...
[ "0.63847727", "0.63714933", "0.6320978", "0.6320978", "0.6320978", "0.6320978", "0.62020075", "0.6200991", "0.6169896", "0.6135519", "0.6130047", "0.6105773", "0.6100984", "0.6089251", "0.60437745", "0.60401183", "0.6015753", "0.6001442", "0.5953123", "0.5937083", "0.59258586...
0.60053366
17
Indique si le type d'objet contenu dans une cellule (case) de la carte du niveau est d'un type recherche
public boolean typeCellule(int coordX, int coordY, String type) { if(!this.positionValide(coordX, coordY)) return false; Object obj = this.getObjet(coordX, coordY); if (obj instanceof Mur && type == "MUR"){ return true; } else if (obj instanceof Tresor && type == "TRESOR"){ Tresor tresor = (Tresor) obj; // indique si le tresor est encore ferme if(!tresor.getEtat()) { return true; } return false; } else if (obj instanceof Sortie && type == "SORTIE"){ return true; } else if (obj == null && type == "VIDE"){ return true; } else{ return false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private boolean isType(String type, Object value) {\n boolean ret = false;\n String val = String.valueOf(value).toUpperCase();\n if (val.equals(\"NULL\")) {\n ret = true;\n } else if (val.contains(\"BASE64\")) {\n ret = true;\n } else {\n if (type...
[ "0.68635917", "0.66653746", "0.65745187", "0.65745187", "0.65745187", "0.65745187", "0.65745187", "0.65745187", "0.65745187", "0.65745187", "0.65745187", "0.65745187", "0.65745187", "0.65745187", "0.65745187", "0.65745187", "0.65745187", "0.65745187", "0.65745187", "0.65745187"...
0.59837824
93
Indique si une cellule avoisinante a un personnage contient un type d'objet recherche
public boolean typeCelAvoisinante(Personnage personnage, Carte carte, String type){ int x = personnage.getCoordX(); int y = personnage.getCoordY(); for(int i = x - 1; i <= x + 1; i ++){ for(int j = y - 1; j <= y + 1; j ++){ boolean estTypeRecherche = carte.typeCellule(i, j, type); if (estTypeRecherche){ return true; } } } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean findType(BikeType type){ //Checks if the same name and rental price is registered - true if it's found\n try(Connection con = DatabaseConnector.getConnection();\n PreparedStatement ps = con.prepareStatement(FIND_TYPE)){\n \n ps.setString(1, type.getTypeName())...
[ "0.6094094", "0.6072907", "0.607039", "0.6007257", "0.58309907", "0.5822862", "0.5711275", "0.5705784", "0.56945986", "0.56835115", "0.5668296", "0.566659", "0.56503046", "0.5634389", "0.5604194", "0.5582433", "0.5581219", "0.55740863", "0.556616", "0.55408895", "0.55367464",...
0.69376105
0
Faire disparaitre un mur de la carte
public void creuserMur(int coordX, int coordY){ if(!this.positionValide(coordX, coordY)) return; Object obj = this.getObjet(coordX,coordY); if (obj instanceof Mur){ setCelluleNulle(coordX, coordY); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void disparar(){}", "private void remplirMaterielData() {\n\t}", "public void preguntarDespegue(){\n String respuesta = this.mediador.preguntarDespegue(this);\n System.out.println(respuesta);\n if (respuesta==\"SI\"){\n this.setPosicion(1);\n this.indicarEstado...
[ "0.6765967", "0.61619574", "0.59295076", "0.57575697", "0.5640333", "0.56277734", "0.55462915", "0.55029154", "0.5451984", "0.5438548", "0.5404388", "0.538895", "0.5360171", "0.53585035", "0.53550214", "0.5346153", "0.533919", "0.53261566", "0.53213316", "0.52994484", "0.5293...
0.0
-1
Ouvre un tresor contenu dans la carte du jeu et donne l'item contenu a Zoe
public Item ouvrirTresor(int coordX, int coordY){ if(!this.positionValide(coordX, coordY)) return null; Object obj = this.getObjet(coordX,coordY); if (obj instanceof Tresor) { Tresor tresor = (Tresor) obj; return tresor.donnerItem(); } else { return null; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void pulsarItemMayus(){\n if (mayus) {\n mayus = false;\n texto_frases = texto_frases.toLowerCase();\n }\n else {\n mayus = true;\n texto_frases = texto_frases.toUpperCase();\n }\n fillList(false);\n }", "@Override\r\n\t/**...
[ "0.65668267", "0.61559045", "0.6140127", "0.6050546", "0.60353094", "0.6031614", "0.60179096", "0.5983139", "0.5934687", "0.5921695", "0.5890322", "0.58848125", "0.5864039", "0.5862504", "0.58483446", "0.5838142", "0.58322185", "0.58289737", "0.58288544", "0.58060795", "0.580...
0.0
-1
btatcall mn el single player controller 3shan tsave el moves fl dbIbrahim
public void insertMovesToDB(String gameType, Vector<Moves> allMovesForAGame) { int lastIndex = 0; try { DriverManager.registerDriver(new com.mysql.cj.jdbc.Driver()); con = DriverManager.getConnection("jdbc:mysql://localhost:3306/xogames", "root", "Jrqr541&"); PreparedStatement pstmt = con.prepareStatement("INSERT INTO games(gameType) VALUE (?)"); pstmt.setString(1, gameType); int rowsAffected = pstmt.executeUpdate(); pstmt.close(); Statement stmt = con.createStatement(); String queryString = new String("SELECT MAX(ID) FROM games"); ResultSet rs = stmt.executeQuery(queryString); while (rs.next()) { lastIndex = rs.getInt(1); } stmt.close(); for (Moves move : allMovesForAGame) { PreparedStatement pstmt1 = con.prepareStatement("INSERT INTO steps(player,x,y,ID,step,finalState) VALUE (?,?,?,?,?,?)"); if (move.isPlayer()) { pstmt1.setInt(1, 1); } else { pstmt1.setInt(1, 0); } pstmt1.setInt(2, move.getX()); pstmt1.setInt(3, move.getY()); pstmt1.setInt(4, lastIndex); pstmt1.setInt(5, move.getStep()); pstmt1.setInt(6, move.getFinalState()); int rowsAffected1 = pstmt1.executeUpdate(); pstmt1.close(); } con.close(); // System.out.println("elmafrood kda closed"); } catch (SQLException ex) { System.out.println("error in executing insert in toDB fn in SinglePlayerController 2 " + ex); // ex.printStackTrace(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void executeState(Controller controller) {\n // controller.getGame().setEndTurn(false);\n\n controller.setUndoCheckFlag(false);\n controller.setGoOn(true);\n controller.getGame().setTargetSelected(null);\n controller.getGame().setTargetInUse(null);\n\n\n ...
[ "0.6415495", "0.63383996", "0.631612", "0.62163424", "0.6213649", "0.5950536", "0.59432566", "0.59401125", "0.58458805", "0.58138937", "0.57994837", "0.57734054", "0.57523745", "0.5720735", "0.5682703", "0.568161", "0.56496465", "0.5633889", "0.5589166", "0.55698556", "0.5569...
0.5761959
12
btetcall mn el replay controller 3shan a5od el moves a7otaha f array of movesIbrahim
public void mFromDB(int id) { try { DriverManager.registerDriver(new com.mysql.cj.jdbc.Driver()); con = DriverManager.getConnection("jdbc:mysql://localhost:3306/xogames", "root", "Jrqr541&"); //System.out.println("con established ya 3m"); } catch (SQLException ex) { System.out.println("error connecting to db in toDB fn in ReplayController"); } try { PreparedStatement pstmt = con.prepareStatement("select * from steps where ID=(?) order by step"); pstmt.setInt(1, id); ResultSet rs = pstmt.executeQuery(); while (rs.next()) { boolean player; if (rs.getInt(1) == 1) { player = true; } else { player = false; } Moves m = new Moves(rs.getInt(2), rs.getInt(3), player); m.setStep(rs.getInt(5)); m.setFinalState(rs.getInt(6)); ReplayController.getInstance().allMovesGetter().add(m); System.out.println("Populating moves"); } pstmt.close(); con.close(); } catch (Exception e) { e.printStackTrace(); System.out.println("error fl select " + e); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private TETile[][] takeActionIS(String input) {\n String[] arrofString = input.split(\"\", input.length());\n String num = \"\";\n String moves = \"\";\n boolean seedComplete = false;\n boolean saveOrNot = false;\n String prevKey = null;\n String nextKey = null;\n\n...
[ "0.6195478", "0.61688584", "0.6153116", "0.60821205", "0.6028541", "0.59036964", "0.58830017", "0.5762058", "0.5713712", "0.5663913", "0.5654541", "0.5642319", "0.5598793", "0.5574874", "0.5574236", "0.5568847", "0.5537511", "0.55320424", "0.55045706", "0.54971296", "0.549013...
0.0
-1
TODO Autogenerated method stub
public static void main(String[] args) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
Get all parent classes of a class node, including super class and interfaces.
@SuppressWarnings("unchecked") public static Stream<String> supers(ClassNode node) { if (node.superName == null) { // Object, no interfaces or superclass return Stream.empty(); } return Stream.concat( Stream.of(node.superName), ((List<String>) node.interfaces).stream() ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List getParents()\n {\n \tList result = new ArrayList();\n \tModelFacade instance = ModelFacade.getInstance(this.refOutermostPackage().refMofId());\n\n \tif (instance != null)\n \t{\n \t if (instance.isRepresentative(this.refMofId())&&\n \t instance.hasRefObject(this.refMofId(...
[ "0.67268753", "0.67243546", "0.647622", "0.6282922", "0.6240357", "0.61970675", "0.61221737", "0.6092453", "0.59994483", "0.5946049", "0.5944776", "0.5937891", "0.5930749", "0.58902127", "0.57562447", "0.57501704", "0.5749976", "0.5742197", "0.5697036", "0.563054", "0.5629955...
0.5300604
55
Find a class member that matches a criteria in a class and its superclasses.
private static <T> Optional<T> find(ClassPath path, ClassNode in, Function<ClassNode, Optional<T>> get) { Optional<T> v = get.apply(in); if (v.isPresent()) { return v; } return supers(in).map(s -> { Optional<ClassNode> superClass = path.findClass(new ClassDescriptor(s)); return superClass.<T>flatMap(c -> find(path, c, get)); }).filter(Optional::isPresent).map(Optional::get).findFirst(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@SuppressWarnings(\"unchecked\")\n private Optional<Match> classMatchSearch(Class declaringClass) {\n// return memoizer.classMatches(result, declaringClass, () -> {\n List<Match> matches = new ArrayList<>();\n Stack<Class> classes = new Stack<>();\n classes.push(declaringClass);\n while...
[ "0.6344053", "0.60730666", "0.56808025", "0.56651366", "0.5615008", "0.56128323", "0.55603", "0.5547943", "0.5444328", "0.54071796", "0.53247094", "0.532147", "0.5273305", "0.52259797", "0.52102506", "0.5197902", "0.5164471", "0.5134262", "0.5126962", "0.51186454", "0.5099745...
0.61094445
1
Find a field by descriptor in a class and its superclasses.
public static Optional<FieldInfo> findField(ClassPath path, ClassDescriptor clazz, FieldDescriptor descriptor) { return findField(path, clazz, fi -> fi.getDescriptor().equals(descriptor)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static Field getField(Class<?> clazz, String fieldToFind)\n throws SecurityException, NoSuchFieldException {\n Class<?> type = clazz;\n Field field = null;\n do {\n Field[] fields = type.getDeclaredFields();\n for (Field f : fields) {\n b...
[ "0.68412775", "0.62152797", "0.6076874", "0.60433376", "0.5916886", "0.5801891", "0.57417756", "0.5733455", "0.568131", "0.56717193", "0.56242067", "0.5602497", "0.5530699", "0.54927295", "0.5468145", "0.5403629", "0.5399585", "0.53872085", "0.5319709", "0.5313608", "0.529297...
0.6901157
0
Find a field that matches a condition in a class and its superclasses.
public static Optional<FieldInfo> findField(ClassPath path, ClassDescriptor clazz, Predicate<FieldInfo> condition) { return findField(path, clazz, (cn, fn) -> condition.test(new FieldInfo(new ClassDescriptor(cn.name), FieldDescriptor.create(fn.name, fn.desc)))); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@SuppressWarnings(\"unchecked\")\n public static Optional<FieldInfo> findField(ClassPath path,\n ClassDescriptor clazz,\n BiPredicate<ClassNode, FieldNode> condition) {\n return find(path,\n p...
[ "0.6413024", "0.6110528", "0.57458776", "0.573143", "0.5430745", "0.54218584", "0.53796214", "0.5315025", "0.5287645", "0.5233552", "0.5219629", "0.5191604", "0.51661843", "0.5141947", "0.51412386", "0.5075675", "0.50299025", "0.49392208", "0.48861197", "0.48694432", "0.48632...
0.6065291
2
Find a field that matches a condition in a class and its superclasses.
@SuppressWarnings("unchecked") public static Optional<FieldInfo> findField(ClassPath path, ClassDescriptor clazz, BiPredicate<ClassNode, FieldNode> condition) { return find(path, path.findClass(clazz).get(), cn -> ((List<FieldNode>) cn.fields) .stream() .filter(fn -> condition.test(cn, fn)) .map(fn -> new FieldInfo(new ClassDescriptor(cn.name), FieldDescriptor.create(fn.name, fn.desc))) .findFirst()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static Field findSingleFieldUsingStrategy(FieldMatcherStrategy strategy, Object object,\n boolean checkHierarchy, Class<?> startClass) {\n assertObjectInGetInternalStateIsNotNull(object);\n Field foundField = null;\n ...
[ "0.61109984", "0.6064862", "0.5748087", "0.5731843", "0.5430256", "0.5422651", "0.5380285", "0.53148186", "0.5287919", "0.5233973", "0.52202684", "0.51937", "0.51659703", "0.5142393", "0.5142017", "0.5076586", "0.50297916", "0.49396357", "0.4886731", "0.48686674", "0.48631716...
0.641242
0
Find a method by descriptor in a class and its superclasses.
public static Optional<MethodInfo> findMethod(ClassPath path, ClassDescriptor clazz, MethodDescriptor descriptor) { return findMethod(path, clazz, mi -> mi.getDescriptor().equals(descriptor)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static Optional<Method> find(MethodSpec methodSpec, Class<?> clazz, boolean analiseSuper) {\n return Option.orElseAnd(\n find(methodSpec, clazz.getDeclaredMethods()),\n /* not present and */ analiseSuper,\n /* then */ find(methodSpec, clazz.getMethods()));...
[ "0.6536632", "0.6150461", "0.59115046", "0.58179694", "0.57193154", "0.5713994", "0.570264", "0.57021725", "0.56718975", "0.5663893", "0.5624812", "0.5539726", "0.5486956", "0.5433647", "0.53688455", "0.5320779", "0.5317083", "0.5260596", "0.5231265", "0.5210912", "0.5209162"...
0.69357806
0
Find a method that matches a condition in a class and its superclasses.
public static Optional<MethodInfo> findMethod(ClassPath path, ClassDescriptor clazz, Predicate<MethodInfo> condition) { return findMethod(path, clazz, (cn, mn) -> condition.test(new MethodInfo(new ClassDescriptor(cn.name), MethodDescriptor.create(mn.name, mn.desc)))); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@SuppressWarnings(\"unchecked\")\n private static Optional<MethodInfo> findMethod(ClassPath path,\n ClassDescriptor clazz,\n BiPredicate<ClassNode, MethodNode> condition) {\n return find(path,\n ...
[ "0.66885114", "0.6162001", "0.60828054", "0.60390145", "0.5914364", "0.5886789", "0.5775482", "0.5625904", "0.56172454", "0.5604026", "0.5472717", "0.5443272", "0.5377868", "0.5335672", "0.52924705", "0.5285955", "0.52648765", "0.52430105", "0.5239199", "0.52356976", "0.51545...
0.612986
2
Find a method that matches a condition in a class and its superclasses.
@SuppressWarnings("unchecked") private static Optional<MethodInfo> findMethod(ClassPath path, ClassDescriptor clazz, BiPredicate<ClassNode, MethodNode> condition) { return find(path, path.findClass(clazz).get(), cn -> ((List<MethodNode>) cn.methods) .stream() .filter(mn -> condition.test(cn, mn)) .map(mn -> new MethodInfo(new ClassDescriptor(cn.name), MethodDescriptor.create(mn.name, mn.desc))) .findFirst()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static <T> Optional<T> find(ClassPath path, ClassNode in, Function<ClassNode, Optional<T>> get) {\n Optional<T> v = get.apply(in);\n if (v.isPresent()) {\n return v;\n }\n return supers(in).map(s -> {\n Optional<ClassNode> superClass = path.findClass(new Cl...
[ "0.6161318", "0.6132822", "0.6083122", "0.6039914", "0.5916989", "0.58860713", "0.5776941", "0.5627638", "0.56164956", "0.56047904", "0.5474729", "0.5446394", "0.53783", "0.5336696", "0.52940995", "0.5286495", "0.526763", "0.5242384", "0.5240237", "0.523556", "0.51575494", ...
0.6691209
0
Created by rpayal on 20/12/2016.
public interface IPrintReceiptService { String calculateAndPrintReceiptWithTax(Receipt receipt); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "public final void mo51373a() {\n }", "private stendhal() {\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpu...
[ "0.6134048", "0.5902831", "0.5868505", "0.5851531", "0.5837414", "0.5837414", "0.58290577", "0.5820756", "0.574788", "0.57036245", "0.5688865", "0.564642", "0.564448", "0.56218225", "0.5609404", "0.56038344", "0.5567143", "0.5564737", "0.55548406", "0.5542872", "0.5536044", ...
0.0
-1
Constructor for statistics panel
public StatisticsPanel(Logic logic, int indexOfSelectedDeck) { super(FXML); // System.out.println("deck selected = " + indexOfSelectedDeck); ObservableList<Deck> originalDecks = logic.getFilteredDeckList(); // decide which deck to get, or get all of them if indexOfSelectedDeck==-1 List<Deck> decks = IntStream.range(0, originalDecks.size()) .filter(idx -> indexOfSelectedDeck == -1 || idx == indexOfSelectedDeck) .mapToObj(originalDecks::get).collect(Collectors.toList()); if (indexOfSelectedDeck == -1) { chartTitle = "Recent performance over all decks."; } else { chartTitle = "Recent performance over deck " + decks.get(0).getDeckName(); } StatisticsManager statisticsManager = logic.getStatisticsManager(); plotDataPoints(getDeckPlottingPoints(decks)); String lastLoginString = statisticsManager.getLastLoginString(); lastLoginLabel.setText(String.format("Last Login: %s", lastLoginString)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Statistics() {}", "public Statistics() {\n }", "public PlotViewStatsAndMaths() {\n \t}", "public UnivariateStatsData() {\n super();\n }", "public BaseStatistics() {\n\t\tsuper();\n\t}", "public StatisticsWindow() {\n initComponents();\n }", "public StStatutesub() {\n }", "p...
[ "0.74921846", "0.7265249", "0.7111014", "0.7092474", "0.7049441", "0.70359135", "0.69778925", "0.6868222", "0.6862735", "0.6740603", "0.67018753", "0.6682535", "0.662447", "0.6402136", "0.6362593", "0.6346312", "0.63377255", "0.6332964", "0.63236165", "0.63129044", "0.6266191...
0.6092977
25
Helper function to compute the statistics for plotting/displaying
private List<DataPoint> getDeckPlottingPoints(List<Deck> decks) { // List<List<QuizAttempt>> listsToMerge = new ArrayList<>(); // // for (Deck deck : decks) { // listsToMerge.add(deck.getQuizAttempts()); // } List<DataPoint> ret = new ArrayList<>(); Queue<QuizAttempt> pq = new PriorityQueue<>(Comparator.comparing(QuizAttempt::getTakenAt)); for (Deck deck : decks) { for (QuizAttempt qa : deck.getQuizAttempts()) { pq.offer(qa); } } while (!pq.isEmpty()) { QuizAttempt attempt = pq.poll(); LocalDateTime takenAt = attempt.getTakenAt(); double scoreInPercentage = attempt.getScore().getScoreInPercentage(); ret.add(new DataPoint(takenAt, scoreInPercentage)); } return ret; // return mergeSortedListsOfAttempts(listsToMerge); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void statistics();", "private void calculateAndShowStatistics() {\n Map<Country, Float> countryWithMinInternetUsers = findCountryWithMinInternetUsers();\n Map<Country, Float> countryWithMinLiteracyRate = findCountryWithMinLiteracyRate();\n Map<Country, Float> countryWithMaxInternetUsers = fi...
[ "0.7329659", "0.70540124", "0.6860555", "0.68122673", "0.6586905", "0.64918077", "0.6467499", "0.6443065", "0.64408785", "0.6342329", "0.6279794", "0.62616545", "0.62354183", "0.6233742", "0.61886954", "0.611636", "0.61053693", "0.61014867", "0.60836697", "0.6071395", "0.6070...
0.0
-1
Helper function to merge the sorted (by date taken) list of quiz attempts
private List<DataPoint> mergeSortedListsOfAttempts(List<List<QuizAttempt>> listsToMerge) { List<DataPoint> listFromMerging = new ArrayList<>(); int numberOfLists = listsToMerge.size(); int[] lengths = new int[numberOfLists]; int[] positions = new int[numberOfLists]; for (int i = 0; i < numberOfLists; ++i) { lengths[i] = listsToMerge.get(i).size(); } Queue<QuizAttempt> pq = new PriorityQueue<>(Comparator.comparing(QuizAttempt::getTakenAt)); for (int i = 0; i < numberOfLists; ++i) { if (positions[i] < lengths[i]) { pq.offer(listsToMerge.get(i).get(0)); positions[i]++; } } int idx = 0; while (!pq.isEmpty()) { QuizAttempt attempt = pq.poll(); LocalDateTime takenAt = attempt.getTakenAt(); double scoreInPercentage = attempt.getScore().getScoreInPercentage(); listFromMerging.add(new DataPoint(takenAt, scoreInPercentage)); if (positions[idx] < lengths[idx]) { // process the idx-th list pq.offer(listsToMerge.get(idx).get(positions[idx])); positions[idx]++; } idx++; } return listFromMerging; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ArrayList<Question> getQuestionsSortedByDate() {\n \t\tArrayList<Question> sortedQuestions = this.getQuestions();\n \n \t\tCollections.sort(sortedQuestions, new DateComparator());\n \n \t\treturn sortedQuestions;\n \t}", "List<AnswerDTO> getAnswerSortedByUpvotes(AnswerListDTO answerListDTO);", "public v...
[ "0.6075782", "0.57171303", "0.55432403", "0.5525382", "0.5426085", "0.54171795", "0.5404809", "0.5336204", "0.5206137", "0.519624", "0.5194993", "0.50926024", "0.50635576", "0.50536317", "0.49989343", "0.4983209", "0.49783695", "0.49677965", "0.49285015", "0.48704463", "0.483...
0.647784
0
I received an event
public void processEvent(SimEvent ev) { switch(ev.getTag()) { case OBSERVE: //It is my custom event //I must observe the datacenter balanceLoadCheck(); //Observation loop, re-observe in `delay` seconds send(this.getId(), delay, OBSERVE, null); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "EventType getEvent();", "@Override\r\n\tpublic void onEvent(Object e) {\n\t}", "Event getEvent();", "private void readEvent() {\n\t\t\t\n\t\t\thandlePacket();\n\t\t\t\n\t\t}", "com.walgreens.rxit.ch.cda.EIVLEvent getEvent();", "void onBusEvent(Event event);", "void onNewEvent(Event event);", "public ...
[ "0.7008423", "0.6967984", "0.69145113", "0.6901968", "0.68428934", "0.67399627", "0.6703761", "0.6694152", "0.65860385", "0.6564506", "0.65597725", "0.6540921", "0.6490605", "0.648648", "0.6486178", "0.6486178", "0.6486178", "0.6486178", "0.6486178", "0.6482751", "0.64715606"...
0.0
-1
TODO Autogenerated method stub
@Override public void onClick(View v) { attempt_register(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
Inflate the menu; this adds items to the action bar if it is present.
@Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.register_family_activity, 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.72474307", "0.720233", "0.71960056", "0.7177653", "0.71080536", "0.70401675", "0.7038553", "0.70127106", "0.7010449", "0.6981193", "0.6946711", "0.694019", "0.6934445", "0.69181925", "0.69181925", "0.68916565", "0.6884232", "0.6875887", "0.6875264", "0.68624145", "0.686241...
0.0
-1
TODO Autogenerated method stub
@Override protected Boolean doInBackground(Void... params) { HttpClient a = new HttpClient(); String data = a.loginUser(email.getText().toString(), password.getText().toString()); ParentModel oneparent = JSONParser.getOneParent(data); int tempParentId = oneparent.getParentId(); String tempfamily = a.retrieve_family(tempParentId); FamilyModel onefamily = JSONParser.getOneFamily(tempfamily); if(onefamily.getFatherId() == 0) { onefamily.setFatherId(HealthtimeSession.getParentId(getBaseContext())); a.editFamily(onefamily); } else if(onefamily.getMotherId() == 0) { onefamily.setMotherId(HealthtimeSession.getParentId(getBaseContext())); a.editFamily(onefamily); } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
TODO Autogenerated method stub not used
@Override public void export(URNspec urn, HashMap mapDiagrams, FileOutputStream fos) throws InvocationTargetException { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6594766", "0.6520929", "0.65099865", "0.62821585", "0.6255211", "0.6247377", "0.6235066", "0.6229733", "0.62110734", "0.6187887", "0.6176366", "0.61725324", "0.61725324", "0.6093667", "0.6074986", "0.607317", "0.60490793", "0.60299706", "0.6024611", "0.59929055", "0.598047...
0.0
-1
Write the string to the file output stream.
public void write(String s) throws IOException { if (s != null && s.length() > 0) { fos.write(s.getBytes()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void writeOutputFile(String str, String file) throws Exception {\n FileOutputStream fout = new FileOutputStream(file);\n\n fout.write(str.getBytes());\n fout.close();\n }", "private static void writeStringToFile(String string) {\n\t\ttry (BufferedWriter writer = new BufferedWriter...
[ "0.7076275", "0.70361483", "0.7032648", "0.6962008", "0.67392945", "0.6621971", "0.65973365", "0.6588235", "0.6526496", "0.65049297", "0.64978135", "0.64762825", "0.6476265", "0.64472055", "0.644716", "0.6438324", "0.6401994", "0.63655365", "0.63490194", "0.62882096", "0.6286...
0.6907903
4
create formulas for each elements
private void writeFormula(URNspec urn) throws IOException { eleForMap = new HashMap<IntentionalElement, StringBuffer>(); StringBuffer eleFormula; StringBuffer function; // initial all the symbols write("#inital all the variable\n"); for (Iterator it = urn.getGrlspec().getIntElements().iterator(); it.hasNext();) { IntentionalElement element = (IntentionalElement) it.next(); StringBuffer variable = new StringBuffer(); variable.append(modifyName(element.getName())); variable.append(Equal); variable.append("Symbol"); variable.append(LeftBracker); variable.append("'"); variable.append(modifyName(element.getName())); variable.append("'"); variable.append(RightBracker); write(variable.toString()); write("\n"); } // iterate all the leaf element for (Iterator it = urn.getGrlspec().getIntElements().iterator(); it.hasNext();) { IntentionalElement element = (IntentionalElement) it.next(); eleFormula = new StringBuffer(); function = new StringBuffer(); function.append(modifyName(element.getName())); // if the element is the leaf if (element.getLinksDest().size() == 0) { // System.out.println(element.getName() + "leaf"); if (element.getType().getName().compareTo("Indicator") == 0) { Indicator indicator = (Indicator) element; if (indicator.getWorstValue() == indicator.getTargetValue()) { eleFormula.append(modifyName(element.getName())); } else { StringBuffer indicatorFor = indicatorFor(element); eleFormula.append(indicatorFor); function.append(Equal); function.append(eleFormula); } } else { eleFormula.append(modifyName(element.getName())); } elementSet.add("'" + modifyName(element.getName()) + "'"); eleForMap.put(element, eleFormula); } } for (Iterator it = urn.getGrlspec().getIntElements().iterator(); it.hasNext();) { IntentionalElement element = (IntentionalElement) it.next(); eleFormula = new StringBuffer(); function = new StringBuffer(); function.append(modifyName(element.getName())); if (element.getLinksDest().size() != 0) { eleFormula.append(writeLink(element)); function.append(Equal); function.append(eleFormula); write(function.toString()); write("\n"); eleForMap.put(element, eleFormula); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Formulas() { }", "public ArrayList < TypeFormula > getAllFormulas ( ) ;", "public void addFormulas() {\n countFormulas++;\n }", "public List<IComplexFormula> getFormulas(){\r\n\t\treturn formulas;\r\n\t}", "private void runFormulas() {\r\n // updates all of the formula cells in the...
[ "0.67663985", "0.6757719", "0.6557622", "0.62645406", "0.61244076", "0.58788407", "0.5826083", "0.5772556", "0.57430816", "0.5694532", "0.56905687", "0.55631685", "0.55024457", "0.5498735", "0.5479977", "0.5445952", "0.54406637", "0.5421953", "0.5421953", "0.5348321", "0.5325...
0.5690468
11
If none of the toplevel intentional elements has a weight, then these toplevel intentional elements should be weighted equally. we assume only the toplevel elements have weight
private void writeActor(URNspec urn) throws IOException { actorForMap = new HashMap<Actor, StringBuffer>(); StringBuffer formula; StringBuffer function;// 还�判断一下 里�有没有东西 for (Iterator it = urn.getGrlspec().getActors().iterator(); it.hasNext();) { Actor actor = (Actor) it.next(); function = new StringBuffer(); function.append(modifyName(actor.getName())); formula = new StringBuffer();// the part after = int sumQua = 0; int dNum = 100; boolean hasEleInActor = true; List<IntentionalElement> eleList = new ArrayList<IntentionalElement>();// the elements in the actor List<Integer> quaList = new ArrayList<Integer>(); List<String> actorTimesQua = new ArrayList<String>(); for (Iterator itAct = actor.getContRefs().iterator(); itAct.hasNext();) { ActorRef actorRef = (ActorRef) itAct.next(); Iterator itIEref = actorRef.getNodes().iterator(); if (!itIEref.hasNext()) { hasEleInActor = false; } else { hasEleInActor = true; for (; itIEref.hasNext();) { IURNNode node = (IURNNode) itIEref.next(); if (node instanceof Belief) { continue; } IntentionalElement ele = (IntentionalElement) ((IntentionalElementRef) node).getDef(); eleList.add(ele); int eleQua = ele.getImportanceQuantitative(); quaList.add(eleQua); sumQua += eleQua; } } } if (sumQua == 0 && hasEleInActor == true) {// there are no weighted elements in actor System.out.println("sum == 0 "); for (int i = 0; i < eleList.size(); i++) { IntentionalElement ele = (IntentionalElement) (eleList.get(i)); StringBuffer eleFormula = new StringBuffer(); eleFormula.append(LeftBracker); eleFormula.append(eleForMap.get(ele)); eleFormula.append(RightBracker); if (ele.getLinksSrc().size() == 0) { actorTimesQua.add(eleFormula + Times + "100.0"); sumQua += 100; } else { // give the weight to top-level elements; IntentionalElement srcElement = (IntentionalElement) (((ElementLink) (ele.getLinksSrc().get(0))) .getDest()); if (eleList.contains(srcElement) == false) { actorTimesQua.add(eleFormula + Times + "100.0"); sumQua += 100; } } } // for } // if(sumQua==0) if (sumQua > 0) {// there are some elements weighted System.out.println("sum! = 0 "); for (int i = 0; i < eleList.size(); i++) { IntentionalElement ele = (IntentionalElement) (eleList.get(i)); if (ele.getImportanceQuantitative() == 0) { continue; } actorTimesQua.add(eleForMap.get(ele) + Times + "100.0"); } } if (!hasEleInActor) formula.append("0"); else { formula.append(LeftBracker); String joined = String.join("+", actorTimesQua); formula.append(joined); formula.append(RightBracker); formula.append(Divide); formula.append(Integer.toString(Math.max(sumQua, dNum))); } function.append(Equal); function.append(formula); write("#Actor function\n"); write(function.toString()); write("\n"); actorForMap.put(actor, formula); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void ensurePositiveWeights() {\n // minWeight is the minimum non-infinite weight\n if (this.minWeight < TOL) {\n for (int i = 0; i < this.n; i++) {\n for (int j = 0; j < this.m; j++) {\n this.weights[i][j] = this.weights[i][j] -...
[ "0.62817955", "0.62523055", "0.62478065", "0.61943436", "0.61541563", "0.6031954", "0.59876704", "0.59256506", "0.5894875", "0.5881268", "0.5826625", "0.58046013", "0.57971567", "0.5784798", "0.57695514", "0.5759533", "0.5740785", "0.5734364", "0.5726929", "0.5699475", "0.567...
0.0
-1
If there is no actor in the model, then it would be as if there were one big actor with weight 100 that contained everything. If there are actors but they have no weight, then these actors should be weighted equally.
private void writeModel(URNspec urn) throws IOException { modelFormula = new StringBuffer(); StringBuffer function = new StringBuffer(); List<Actor> actorList = new ArrayList<Actor>(); List<Actor> actHasWeight = new ArrayList<Actor>(); List<String> actorTimesWeight = new ArrayList<String>(); int sumQua = 0; int dNum = 100; function.append(modifyName(urn.getName())); function.append(Equal); for (Iterator it = urn.getGrlspec().getActors().iterator(); it.hasNext();) { Actor actor = (Actor) it.next(); actorList.add(actor); if (actor.getImportanceQuantitative() != 0) { actHasWeight.add(actor); } } // for if (actorList.size() == 0) { // it's like there is one big actor weighted 100 containing anything modelFormula = ModelWithoutActor(urn); } else { if (actHasWeight.size() == 0) { for (int i = 0; i < actorList.size(); i++) { StringBuffer actorRe = new StringBuffer(); actorRe.append(LeftBracker); actorRe.append(actorForMap.get(actorList.get(i))); actorRe.append(RightBracker); actorTimesWeight.add(actorRe + Times + "100.0"); } sumQua = 100 * actorList.size(); } else { for (int i = 0; i < actorList.size(); i++) { int actorQua = actorList.get(i).getImportanceQuantitative(); StringBuffer actorRe = new StringBuffer(); actorRe.append(LeftBracker); actorRe.append(actorForMap.get(actorList.get(i))); actorRe.append(RightBracker); actorTimesWeight.add(actorForMap.get(actorList.get(i)) + Times + actorQua); sumQua += actorQua; } } String joined = String.join("+", actorTimesWeight); modelFormula.append(LeftBracker); modelFormula.append(joined); modelFormula.append(RightBracker); modelFormula.append(Divide); modelFormula.append(Integer.toString(Math.max(sumQua, dNum))); } function.append(modelFormula); write("#The function of Model\n"); write(function.toString()); write("\n"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic double weight() {\n\t\treturn 1.0;\n\t}", "public double getWeight() {\n return 0;\n }", "public int weight() {\n if (this.weight == null) {\n return 0;\n } else {\n return this.weight;\n } // if/else\n }", "public float getWeightUsed()\r\n {\r\n // imple...
[ "0.61308163", "0.6055812", "0.60067314", "0.5975006", "0.597258", "0.59036434", "0.5875037", "0.58578664", "0.58569515", "0.58313423", "0.5829509", "0.5829509", "0.580132", "0.5783946", "0.5778744", "0.5770775", "0.57660306", "0.57408106", "0.57308733", "0.5724359", "0.572001...
0.5769017
16
Get tree cell renderer component.
@Override public Component getTreeCellRendererComponent(JTree tree, Object value, boolean selected, boolean expanded, boolean leaf, int row, boolean hasFocus) { super.getTreeCellRendererComponent(tree, value, selected, expanded, leaf, row, hasFocus); DefaultMutableTreeNode node = (DefaultMutableTreeNode) value; if (node.getLevel() == 1) { // User if (Users.getUsers().get(node).isOffline()) { setIcon(iconOffline); } else if(Users.getUsers().get(node).isOnline()) { setIcon(iconOnline); } } else if (node.getLevel() > 1) { // Directory setIcon(iconFolder); } return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public TreeTableCellRenderer getRenderer() {\n return treeTableCellRenderer;\n }", "public TableCellRenderer getDelegateRenderer() {\n return treeTableCellRenderer.getDelegate();\n }", "@Override\n public TreeCellRenderer getCellRenderer() {\n final TreeCellRenderer ren = supe...
[ "0.79383504", "0.77492136", "0.7739832", "0.73962957", "0.6822394", "0.66664046", "0.6531962", "0.63622695", "0.62653095", "0.6257734", "0.6255037", "0.62534344", "0.6232527", "0.6228601", "0.6193452", "0.61805487", "0.61457556", "0.610832", "0.6098125", "0.6002369", "0.59872...
0.5248394
93
server is listening on port 3000
public static void main(String[] args) throws IOException { ServerSocket ss = new ServerSocket(3000); // infinite loop is running for getting client request while (true) { Socket serverSocket = null; try { // server socket object receive incoming client requests serverSocket = ss.accept(); count++; System.out.println("A new client" + clientNum++ + " is connected : " + serverSocket); // getting input and out streams DataInputStream dataInputStream = new DataInputStream(serverSocket.getInputStream()); DataOutputStream dataOutputStream = new DataOutputStream(serverSocket.getOutputStream()); System.out.println("Allocating new thread for this client" + clientNum); // create a new thread object Thread newThread = new ClientHandler(serverSocket, dataInputStream, dataOutputStream, count); // Invoking the start() method newThread.start(); } catch (Exception e) { serverSocket.close(); e.printStackTrace(); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void listen() {\n\t\ttry {\n\t\t\tServerSocket servSocket = new ServerSocket(PORT);\n\t\t\tSocket clientSocket;\n\t\t\twhile(true) {\n\t\t\t\tclientSocket = servSocket.accept();\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tSystem.err.println(\"Error - Could not open connection\");\n\t\t}\n\t\t\n\t}", "pu...
[ "0.7034182", "0.68928045", "0.68881255", "0.6808602", "0.6782931", "0.66749597", "0.666028", "0.6497711", "0.6473217", "0.6469481", "0.643654", "0.6411841", "0.64066476", "0.6378974", "0.63691247", "0.63412786", "0.6322596", "0.6283777", "0.6282655", "0.62525403", "0.62497187...
0.0
-1
/ Generated Methods Method execute
public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) { // TODO Auto-generated method stub response.setContentType("text/html"); try { PrintWriter out = response.getWriter(); //创建随即数 Random ra1 = new Random(); Random ra2 = new Random(); Random ra3 = new Random(); Random ra4 = new Random(); int ck1 = (int) (ra1.nextFloat() * 10); int ck2 = (int) (ra2.nextFloat() * 10); int ck3 = (int) (ra3.nextFloat() * 10); int ck4 = (int) (ra4.nextFloat() * 10); //设置随即数字 HttpSession session = request.getSession(); session.setAttribute("num1", ck1 + ""); session.setAttribute("num2", ck2 + ""); session.setAttribute("num3", ck3 + ""); session.setAttribute("num4", ck4 + ""); //返回 out.print(ck1); out.print(ck2); out.print(ck3); out.print(ck4); } catch (Exception ex) { ex.printStackTrace(); } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void execute() {}", "protected void execute() {\n \t\n }", "protected void execute() {\n \t\n }", "protected void execute() {\n\t\t\n\t}", "public void execute() {\n\t\t\n\t}", "public void execute(){\n\t\t\n\t}", "public void execute() {\n\t\t\r\n\t}", "public void execute() {\...
[ "0.8726473", "0.86474156", "0.86474156", "0.8585333", "0.8541966", "0.85416996", "0.85315204", "0.85315204", "0.85315204", "0.8510395", "0.8505068", "0.8505068", "0.8505068", "0.8505068", "0.8488018", "0.8487717", "0.8487717", "0.8487717", "0.8487717", "0.8487717", "0.8487717...
0.0
-1
This creates a load based division mechanism for the specified host, that is yet to be specified.
public LoadBasedDivision() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public LoadBasedDivision(Host host) {\n super(host);\n }", "LoadGroup createLoadGroup();", "Division createDivision();", "public void newHost(Host aHost);", "void createGraphForDistributedSingleLoad();", "private ClassLoader createHostClassLoader() throws MojoExecutionException {\n \n ...
[ "0.80891293", "0.58001596", "0.53623337", "0.53022534", "0.5118825", "0.51003605", "0.506702", "0.49929747", "0.49329495", "0.49240953", "0.4903522", "0.48760313", "0.4845514", "0.46978387", "0.46978387", "0.46566367", "0.4615847", "0.45902297", "0.45851097", "0.4584733", "0....
0.6020148
1
This creates a load based division mechanism for the specified host.
public LoadBasedDivision(Host host) { super(host); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public LoadBasedDivision() {\n }", "LoadGroup createLoadGroup();", "Division createDivision();", "private ClassLoader createHostClassLoader() throws MojoExecutionException {\n \n Set<URL> hostClasspath = artifactHelper.resolve(\"org.codehaus.fabric3\", \"fabric3-api\", runtimeVersion, Artifa...
[ "0.5940232", "0.5896079", "0.5245247", "0.52083814", "0.5124299", "0.50703657", "0.5002097", "0.49251238", "0.48942694", "0.48369053", "0.47681606", "0.471553", "0.46813664", "0.4670557", "0.46075407", "0.45939526", "0.45839742", "0.45664933", "0.45181817", "0.44613874", "0.4...
0.8068194
0
This returns the energy usage for a named VM
@Override public double getEnergyUsage(EnergyUsageSource energyUser) { VmDeployed deployed = (VmDeployed) energyUser; cleanData(); int recordCount = (energyUsage.size() <= loadFraction.size() ? energyUsage.size() : loadFraction.size()); /** * Calculate the energy used by a VM taking into account the work it has * performed. */ double vmEnergy = 0; //Access two records at once hence ensure size() -2 for (int i = 0; i <= recordCount - 2; i++) { HostEnergyRecord energy1 = energyUsage.get(i); HostEnergyRecord energy2 = energyUsage.get(i + 1); HostEnergyUserLoadFraction load1 = loadFraction.get(i); HostEnergyUserLoadFraction load2 = loadFraction.get(i + 1); if (load1.getEnergyUsageSources().contains(deployed) && load2.getEnergyUsageSources().contains(deployed)) { long timePeriod = energy2.getTime() - energy1.getTime(); double deltaEnergy = Math.abs((((double) timePeriod) / 3600d) * (energy1.getPower() + load1.getHostPowerOffset() + energy2.getPower() + load2.getHostPowerOffset()) * 0.5); double avgLoadFraction = (load1.getFraction(deployed) + load2.getFraction(deployed)) / 2; vmEnergy = vmEnergy + (deltaEnergy * avgLoadFraction); } } return vmEnergy; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@ComputerMethod\n private FloatingLong getEnergyUsage() {\n return energyContainer.getEnergyPerTick();\n }", "@ComputerMethod\n private FloatingLong getEnergyUsage() {\n return getActive() ? energyContainer.getEnergyPerTick() : FloatingLong.ZERO;\n }", "int getEnergy();", "public in...
[ "0.60602957", "0.6039127", "0.5892436", "0.56551594", "0.56445926", "0.5634338", "0.5630748", "0.55946213", "0.55561614", "0.5539469", "0.55299294", "0.54920286", "0.5479417", "0.5438084", "0.5429979", "0.54259425", "0.5408404", "0.5399944", "0.5360287", "0.535793", "0.535562...
0.57562214
3
use should use getcount to avert npe's
public ActionReply itemAt(int i){ return (ActionReply) replies.elementAt(i); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int get_count();", "int getInCount();", "long getCount();", "long getCount();", "public abstract int getCount();", "@Override\n\tpublic void count() {\n\t\t\n\t}", "int getCount();", "int getCount();", "int getCount();", "int getCount();", "int getCount();", "int getCount();", "@Over...
[ "0.7081984", "0.70122784", "0.6967956", "0.6967956", "0.6958458", "0.6917813", "0.6894961", "0.6894961", "0.6894961", "0.6894961", "0.6894961", "0.6894961", "0.6798267", "0.674066", "0.67184377", "0.670235", "0.6657404", "0.6642053", "0.6641981", "0.6641981", "0.66303784", ...
0.0
-1