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
Searches for a persons name and prints the information of all the persons in the database with that name
public String searchPerson(String name){ String string = ""; ArrayList<Person> list = new ArrayList<Person>(); for(Person person: getPersons().values()){ String _name = person.getName(); if(_name.contains(name)){ list.add(person); } } list.sort(Comparator.comparing(Person::getName)); for (int i = 0; i < list.size(); i++){ string += list.get(i).toString(); } return string; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void personLookup() {\n\t\tSystem.out.print(\"Person: \");\n\t\tString entryName = getInputForName();\n\t\tphoneList\n\t\t\t.stream()\n\t\t\t.filter(n -> n.getName().equals(entryName))\n\t\t\t.forEach(n -> System.out.println(n));\n\t}", "private void displayStudentByName(String name) {\n\n int falg...
[ "0.74414086", "0.73737884", "0.7236648", "0.7078298", "0.7013578", "0.6869321", "0.6861458", "0.67785096", "0.67690295", "0.6660008", "0.66326183", "0.6582452", "0.657666", "0.63990045", "0.63890135", "0.6388567", "0.63406485", "0.63124466", "0.6250413", "0.6243577", "0.62282...
0.6786663
7
/============================PORTAL DO DOCENTE=============================== Creates a project of the discipline with the name that was given by the professor
public void createProject(String nameProject, String nameDiscipline) throws InvalidDisciplineException,InvalidProjectException{ int id = _person.getId(); Professor _professor = getProfessors().get(id); _professor.createProject(nameProject, nameDiscipline); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static Project createProject() throws ParseException {\n System.out.println(\"Please enter the project number: \");\n int projNum = input.nextInt();\n input.nextLine();\n\n System.out.println(\"Please enter the project name: \");\n String projName = input.nextLine();\n\n ...
[ "0.7169876", "0.6902751", "0.67610735", "0.6719557", "0.6702804", "0.6644207", "0.65906274", "0.6492408", "0.6492408", "0.6492408", "0.64522696", "0.64090014", "0.63972855", "0.63772106", "0.63440543", "0.6207597", "0.61878824", "0.61837536", "0.61806554", "0.61551154", "0.61...
0.8441193
0
Closes a project of the discipline with the name that was given by the professor
public void closeProject(String nameProject, String nameDiscipline) throws InvalidDisciplineException, InvalidProjectException, OpenSurveyException{ Professor _professor = getProfessor(); _professor.closeProject(nameProject, nameDiscipline); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void closeCashDrawer(String campusCode);", "public void doProjectClose() {\r\n\t\tthis.observerList.notifyObservers(GNotification.PROJECT_CLOSE, null);\r\n\t}", "private void close() {\r\n this.dispose();\r\n MainClass.gamesPlayed++;\r\n Examples2018.menu();\r\n }", "@Action\n ...
[ "0.60836977", "0.6055387", "0.5964324", "0.5869089", "0.5851034", "0.5800409", "0.5799073", "0.5786119", "0.5773496", "0.5734516", "0.56675243", "0.5630896", "0.55574054", "0.5555255", "0.5530214", "0.54888785", "0.5486693", "0.5451803", "0.5417825", "0.54154027", "0.53818023...
0.7801469
0
Shows the results of the survey of the project of the corresponding discipline given by the professor
public String surveyResults(String nameDiscipline, String nameProject) throws InvalidDisciplineException, InvalidProjectException, NoSuchSurveyException{ Professor _professor = getProfessor(); return _professor.surveyResults(nameDiscipline, nameProject); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void viewStudents(Professor professor);", "public void displayData(Solution solution);", "public void displaySolution() {\r\n Problem pb = new Problem(sources, destinations, costMatrix);\r\n pb.printProblem();\r\n Solution sol = new Solution(pb);\r\n sol.computeCost();\r\n }", ...
[ "0.6547866", "0.57404846", "0.56665933", "0.5651493", "0.5544259", "0.5543605", "0.5524573", "0.5473171", "0.5459851", "0.5452135", "0.54440606", "0.5433111", "0.5425562", "0.5421386", "0.5390738", "0.53676987", "0.5359882", "0.5356862", "0.535669", "0.5350741", "0.53466237",...
0.67828745
0
Shows the submissions of the given project
public String projectSubmissions(String nameDiscipline, String nameProject) throws InvalidDisciplineException, InvalidProjectException{ Professor _professor = getProfessor(); return _professor.projectSubmissions(nameDiscipline, nameProject); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n public void onSubmit() {\r\n ProjectOverviewerApplication app = (ProjectOverviewerApplication)getApplication();\r\n \r\n // check if any field is missing\r\n boolean hasAllFields = true;\r\n if (this.projectName == null) {\r\n hasAllFields = false;\r\n error(\"Project name i...
[ "0.54720247", "0.53888774", "0.5372486", "0.5335534", "0.5277416", "0.5273863", "0.5273863", "0.5252821", "0.52105707", "0.5187882", "0.5175594", "0.51512766", "0.5144125", "0.5100566", "0.5073925", "0.50476664", "0.5029838", "0.5009994", "0.4963601", "0.49522611", "0.4950948...
0.608412
0
Prints the students in a discipline
public String studentsDiscipline(String discipline) throws InvalidDisciplineException{ int id = _person.getId(); Professor _professor = getProfessors().get(id); return _professor.studentsDiscipline(discipline); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void printStudents()\n {\n for(Student s : students)\n System.out.println(s);\n }", "public void printStudentList()\n {\n for(int i = 0; i < students.size(); i++)\n System.out.println( (i + 1) + \". \" + students.get(i).getName());\n }", "public void shows...
[ "0.72335696", "0.7221305", "0.7172286", "0.71580696", "0.7157518", "0.7124103", "0.7059742", "0.6949251", "0.6763683", "0.6743081", "0.66763175", "0.6656039", "0.6628121", "0.6578053", "0.65361005", "0.6528693", "0.6512984", "0.6497485", "0.64806265", "0.64659995", "0.6457256...
0.705727
7
/==========================PORTAL DO ESTUDANTE=============================== Delivers a project of the given discipline
public void deliverProject(String disciplineName, String nameProject, String deliveryMessage) throws InvalidDisciplineException, InvalidProjectException{ int id = _person.getId(); Student _student = getStudents().get(id); _student.deliverProject(disciplineName, nameProject, deliveryMessage, id); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void createProject(String nameProject, String nameDiscipline) throws \n InvalidDisciplineException,InvalidProjectException{\n int id = _person.getId();\n Professor _professor = getProfessors().get(id);\n _professor.createProject(nameProject, nameDiscipline);\n }", "private static void finalise_...
[ "0.5886299", "0.5847346", "0.5554482", "0.5541779", "0.5512264", "0.5490172", "0.5444942", "0.54240954", "0.54096717", "0.53930634", "0.53853875", "0.53711516", "0.53622544", "0.5359591", "0.53505415", "0.53156793", "0.5301213", "0.52939147", "0.5271658", "0.5263357", "0.5240...
0.61926717
0
Fills a survey of the given discipline
public void fillSurvey(String disciplineName, String projectName, int hours, String comment) throws NoSubmissionException, NoSuchSurveyException { Student _student = getStudent(); _student.fillSurvey(disciplineName, projectName, hours, comment); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void survey()\n {\n }", "@Override\n\tpublic void setSurvey(int id, int survey) {\n\t\t\n\t}", "public void createSurvey(int tid);", "public void configSurvey() {\n if (isTest) {\n this.o.setDisplay(\"Please enter name for test: \");\n } else {\n this.o.setDis...
[ "0.5933194", "0.557708", "0.53741026", "0.5319083", "0.52898234", "0.52300566", "0.5224387", "0.5103519", "0.50966376", "0.5067829", "0.50266314", "0.4975435", "0.49476722", "0.4883367", "0.4873854", "0.48658246", "0.4859403", "0.4841917", "0.48366144", "0.4827136", "0.482575...
0.70599765
0
Created by Butcheer on 20190325 14:01
public interface PetTypeService extends CrudService<PetType, Long> { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public final void mo51373a() {\n }", "public void mo38117a() {\n }", "@Override\n public void perish() {\n \n }", "public void mo4359a() {\n }", "private static void cajas() {\n\t\t\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\r\n\tpublic void ti...
[ "0.5899609", "0.58478045", "0.58200085", "0.58045256", "0.57485276", "0.5707595", "0.570565", "0.56945544", "0.56945544", "0.56874764", "0.56874764", "0.56874764", "0.56874764", "0.56874764", "0.56874764", "0.56874764", "0.56792814", "0.5670893", "0.5648833", "0.5609208", "0....
0.0
-1
TODO Autogenerated method stub
@Override public List<Supplies> findall() { return suppliesDao.findall(); }
{ "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 List<Supplies> findbyname(String name) { return suppliesDao.findbyname(name); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
TODO Autogenerated method stub
@Override public List<Supplies> checkbythreed(Supplies supplies) { return suppliesDao.checkbythreed(supplies); }
{ "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.66708666", "0.65675074", "0.65229905", "0.6481001", "0.64770633", "0.64584893", "0.6413091", "0.63764185", "0.6275735", "0.62541914", "0.6236919", "0.6223816", "0.62017626", "0.61944294", "0.61944294", "0.61920846", "0.61867654", "0.6173323", "0.61328775", "0.61276996", "0...
0.0
-1
executed such that system output responses can be tested
@Before public void setUpStreams() { System.setOut(new PrintStream(outContent)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void requestOutput();", "@Test\n public void systemOut()\n {\n String message = \"Testing 1, 2, 3\";\n System.out.print(message);\n assertTrue(SYSTEM_OUT_REDIRECT.toString().contains(message));\n }", "@Test\n\tpublic void testApp()\n\t{\n\t\tPrintStream outBkp = System.out;\n\t\tB...
[ "0.662321", "0.6558489", "0.6448994", "0.63715065", "0.63262033", "0.62289757", "0.6199024", "0.6194868", "0.61512256", "0.6112802", "0.6048811", "0.60385466", "0.6003418", "0.59838843", "0.59763616", "0.59758407", "0.59625083", "0.5959944", "0.595484", "0.5927014", "0.592424...
0.592879
19
executed such that system output responses can be tested
@After public void restoreStreams() { System.setOut(originalOut); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void requestOutput();", "@Test\n public void systemOut()\n {\n String message = \"Testing 1, 2, 3\";\n System.out.print(message);\n assertTrue(SYSTEM_OUT_REDIRECT.toString().contains(message));\n }", "@Test\n\tpublic void testApp()\n\t{\n\t\tPrintStream outBkp = System.out;\n\t\tB...
[ "0.66226023", "0.65592116", "0.6449299", "0.63710177", "0.6327571", "0.62289363", "0.6197313", "0.6192556", "0.6151575", "0.6112125", "0.6046635", "0.6037524", "0.6003795", "0.59847087", "0.597683", "0.59756845", "0.59619564", "0.59606683", "0.59551096", "0.5928967", "0.59285...
0.0
-1
test to check setting speed for car
@Test public void TestSetSpeed() { assertTrue(v1.setSpeed(70)); assertEquals("Speed of car is not set to 70.",v1.getSpeed(),70.0, 0); assertFalse(v2.setSpeed(150)); assertEquals("Speed of truck is changed from 0.",v2.getSpeed(), 0, 0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\t@Test(groups = {\"function\",\"setting\"} ) \r\n\tpublic boolean checkSpeed() {\n\t\tboolean flag = oTest.checkSpeed();\r\n\t\tAssertion.verifyEquals(flag, true);\r\n\t\treturn flag;\r\n\t}", "@Test\r\n\tpublic final void testSetSpeed() {\n\t\t a=new airConditioner(\"ON\",33);\r\n\t\tassertEquals(...
[ "0.746904", "0.7197636", "0.7016296", "0.7016296", "0.7016296", "0.7016296", "0.7016296", "0.7016296", "0.6931608", "0.6794566", "0.66982776", "0.6666354", "0.6655941", "0.6483675", "0.6473631", "0.6418428", "0.6406024", "0.63672704", "0.63300407", "0.6294709", "0.62851906", ...
0.74362105
1
test to check the honk function
@Test public void TestHonk() { assertTrue(v1.setSpeed(25)); String carMessage = "Make way for car DL50, running at 25.0 mph, carrying 6 passengers."; assertTrue(v2.setSpeed(40)); String truckMessage = carMessage+"\nMake way for truck HR11, running at 40.0 mph, carrying 10 quintals of cargo."; v1.honk(); assertEquals("Honk message is incorrect for car v1.", carMessage, outContent.toString().strip()); v2.honk(); assertEquals("Honk message is incorrect for truck v2.", truckMessage, outContent.toString().strip()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void checkLoosePLayer(){\n if (hero.getHp()<=0){\n loose();\n }\n\n }", "void doCheckHealthy();", "@Test\r\n\tpublic final void testIsWon() {\r\n\t\tassertTrue(gameStatistics.isWon());\r\n\t\tassertFalse(gameStatisticsLoss.isWon());\r\n\t}", "@Test\n\tpublic void testIfKin...
[ "0.6398135", "0.6254844", "0.6254276", "0.6246255", "0.62405485", "0.61987054", "0.61687386", "0.61382556", "0.6033679", "0.6030656", "0.59969157", "0.59922534", "0.5966206", "0.596186", "0.59504193", "0.5948282", "0.5916726", "0.58936447", "0.58831275", "0.5869334", "0.58548...
0.66556066
0
Return whether marker with same location is already on map
private static boolean mapAlreadyHasMarkerForLocation(String location, HashMap<String, String> markerLocation) { return (markerLocation.containsValue(location)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean hasLatLng();", "protected abstract boolean isMarkerPositionInternal(int index);", "boolean hasLocation();", "boolean hasLocation();", "public boolean containsInformation(Position position){\n return savedMap[position.getLatitude()][position.getLongitude()] != -1;\n }", "boolean ...
[ "0.66832036", "0.63682574", "0.6243381", "0.6243381", "0.61625725", "0.61218256", "0.6090926", "0.6056721", "0.60013896", "0.59907514", "0.59856224", "0.59856224", "0.59856224", "0.59856224", "0.59856224", "0.59856224", "0.59856224", "0.59856224", "0.59856224", "0.59856224", ...
0.77612764
0
Return the number of rows updated
public int update(Uri uri, ContentValues values, String selection, String[] selectionArgs) { return 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public int getUpdateCount() throws SQLException {\n int to_return = getUpdateCountInternal();\n update_result = -1;\n return to_return;\n }", "public int getUpdateCount() throws SQLException {\n return 0;\r\n }", "@Override\n public int getUpdateCount() throws ...
[ "0.7926831", "0.77093184", "0.7680219", "0.762149", "0.7529616", "0.7475716", "0.74598974", "0.7194893", "0.69452727", "0.69433963", "0.68848646", "0.6883733", "0.6851921", "0.68139964", "0.676054", "0.67260116", "0.67009366", "0.66703266", "0.6655702", "0.66414434", "0.66385...
0.0
-1
the flag to overwrite
public void writeToFile(String msg, boolean flag) { try { // writing without overwriting PrintWriter out = new PrintWriter(new FileWriter(fileName)); out.append(msg); out.close(); } catch (IOException e) { e.printStackTrace(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void overwrite() {\n\t\tdefaultOverwriteMode = OVERWRITE;\n\t}", "public static void noOverwrite() {\n\t\tdefaultOverwriteMode = NO_OVERWRITE;\n\t}", "public void setOverwrite(boolean overwrite)\n {\n this.overwrite = overwrite;\n }", "public void setOverwrite(boolean overwrite) {\n thi...
[ "0.7342305", "0.724737", "0.70611715", "0.6905084", "0.68453056", "0.6822372", "0.6802941", "0.65608907", "0.65608907", "0.6407992", "0.61961806", "0.61955607", "0.61358154", "0.6079804", "0.60512495", "0.5974364", "0.59727955", "0.5962906", "0.5955559", "0.59310085", "0.5904...
0.0
-1
variables // Add local variables to postCopy. abstract accessing //
public void set(AcAirportMailScanPerformanceVo vo) { setReceiveExpected(vo.getReceiveExpected()); setReceiveCompliance(vo.getReceiveCompliance()); setReceivePerformance(vo.getReceivePerformance()); setOriginLoadExpected(vo.getOriginLoadExpected()); setOriginLoadCompliance(vo.getOriginLoadCompliance()); setOriginLoadPerformance(vo.getOriginLoadPerformance()); setTransferLoadExpected(vo.getTransferLoadExpected()); setTransferLoadCompliance(vo.getTransferLoadCompliance()); setTransferLoadPerformance(vo.getTransferLoadPerformance()); setOriginDepartureExpected(vo.getOriginDepartureExpected()); setOriginDepartureCompliance(vo.getOriginDepartureCompliance()); setOriginDeparturePerformance(vo.getOriginDeparturePerformance()); setTransferDepartureExpected(vo.getTransferDepartureExpected()); setTransferDepartureCompliance(vo.getTransferDepartureCompliance()); setTransferDeparturePerformance(vo.getTransferDeparturePerformance()); setDeliverExpected(vo.getDeliverExpected()); setDeliverCompliance(vo.getDeliverCompliance()); setDeliverPerformance(vo.getDeliverPerformance()); setGroundHandlingTimeExpected(vo.getGroundHandlingTimeExpected()); setGroundHandlingTimeCompliance(vo.getGroundHandlingTimeCompliance()); setGroundHandlingTimePerformance(vo.getGroundHandlingTimePerformance()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void copy() {\n\n\t}", "static void setCopying(){isCopying=true;}", "@Override\n\tprotected void copy(Object source, Object dest) {\n\t\t\n\t}", "public void copy(DataRequest original){\n\t\t//potential problems with object sharing\n\t\tfilters = \toriginal.get_filters();\n\t\tsort_by = \toriginal.get...
[ "0.6435038", "0.61587846", "0.61378103", "0.6011706", "0.59936553", "0.5920907", "0.5885295", "0.5839777", "0.56938016", "0.56872565", "0.560634", "0.55553865", "0.5547898", "0.55456585", "0.5535043", "0.55340725", "0.55205286", "0.55019265", "0.54765713", "0.5463148", "0.543...
0.0
-1
/ / / / / / / / / / / / / / / /
public static int upHeap(char[] heap, int size, int i, CharComparator c) { /* 90 */ assert i < size; /* 91 */ char e = heap[i]; /* 92 */ if (c == null) { /* 93 */ while (i != 0) { /* 94 */ int parent = i - 1 >>> 1; /* 95 */ char t = heap[parent]; /* 96 */ if (t <= e) /* */ break; /* 98 */ heap[i] = t; /* 99 */ i = parent; /* */ } /* */ } else { /* 102 */ while (i != 0) { /* 103 */ int parent = i - 1 >>> 1; /* 104 */ char t = heap[parent]; /* 105 */ if (c.compare(t, e) <= 0) /* */ break; /* 107 */ heap[i] = t; /* 108 */ i = parent; /* */ } /* 110 */ } heap[i] = e; /* 111 */ return i; /* */ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private int parent(int i){return (i-1)/2;}", "private int leftChild(int i){return 2*i+1;}", "private double[] getExtents(){\n return new double[] { -90, -180, 90, 180 };\n }", "double passer();", "public Integer getWidth(){return this.width;}", "int getWidth() {return width;}", "public void...
[ "0.5430595", "0.53330356", "0.5092637", "0.50776035", "0.50656015", "0.5061517", "0.50255305", "0.501914", "0.5013608", "0.5012112", "0.50097734", "0.49939048", "0.49924976", "0.49502665", "0.4925594", "0.4921649", "0.49190572", "0.49077547", "0.49070126", "0.49018925", "0.48...
0.0
-1
/ / / / / / / / / / /
public static void makeHeap(char[] heap, int size, CharComparator c) { /* 124 */ int i = size >>> 1; /* 125 */ while (i-- != 0) /* 126 */ downHeap(heap, size, i, c); /* */ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private int parent(int i){return (i-1)/2;}", "private int leftChild(int i){return 2*i+1;}", "private int rightChild(int i){return 2*i+2;}", "public void divide() {\n\t\t\n\t}", "public abstract void bepaalGrootte();", "double passer();", "int getWidth() {return width;}", "public void zeichneQuadra...
[ "0.55399555", "0.5443442", "0.5204333", "0.5179791", "0.5094038", "0.50590646", "0.50539684", "0.5044856", "0.5026184", "0.5012574", "0.5011971", "0.50119406", "0.5004753", "0.49995723", "0.4997555", "0.49849585", "0.49794894", "0.49783266", "0.49673575", "0.4958746", "0.4911...
0.0
-1
rest capacity of vertex vertex
public double residualCapacity(int vertex) { if (vertex == v) return flow; // 正向流量 else if (vertex == w) return capacity() - flow;// 剩余流量 else throw new InconsistentEdgeException(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private final void resizeVertex(int capacity) {\n\t\tif (vertex.length < capacity) {\n\t\t\tvertex = new float[capacity];\n\t\t}\n\t}", "public void removeVertex();", "public native VertexList clear();", "@Override\n public void clearVertices()\n {\n // Shouldn't clear vertices\n }", "publi...
[ "0.62959164", "0.6275554", "0.5900929", "0.58959365", "0.58772415", "0.58173746", "0.5798524", "0.5787045", "0.5771136", "0.572189", "0.57203865", "0.57071215", "0.5679892", "0.5675126", "0.56408554", "0.56369096", "0.5606914", "0.55343664", "0.55227697", "0.55001736", "0.548...
0.66351485
0
To be used in the future, once test is successful. /ConnectivityManager cm = (ConnectivityManager)Context.getSystemService(Context.CONNECTIVITY_SERVICE); NetworkInfo activeNetwork = cm.getActiveNetworkInfo(); WifiManager wm = (WifiManager)Context.getApplicationContext.(getSystemService(Context.WIFI_SERVICE)); WifiInfo connectionInfo = wm.getConnectionInfo(); int ipAddress = connectionInfo.getIpAddress(); String ipString = formatter.formatIPAddress(ipAddress);
protected void onCreate(Bundle savedInstanceState){ super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); TextView text = (TextView) findViewById(R.id.printText); String wrong = "nothing worked"; text.setText(wrong); //Test pinging localhost and printing something on the screen when the ping returns. try { InetAddress localhost = InetAddress.getLocalHost(); byte[] ip = localhost.getAddress(); String word = "address + address.getHostAddress() + address.getAddress() + address.getHostName() + address.getCanonicalHostName()"; for (int i = 1; i <= 254; i++) { ip[3] = (byte) i; InetAddress address = InetAddress.getByAddress(ip); if (address.isReachable(30)) { text.setText(word); } else { Log.d("ERROR", "The address is not reachable."); } } } catch(Exception e) { Log.d("ERROR", "" + e); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@SuppressLint(\"DefaultLocale\")\n\tprivate String getIpAddr()\n\t{\n\t\tString ipString = null;\n\t\tWifiManager wifiManager = (WifiManager) getSystemService(WIFI_SERVICE);\n\t\tif (wifiManager != null)\n\t\t{\n\t\t\tWifiInfo wifiInfo = wifiManager.getConnectionInfo();\n\t\t\tif (wifiInfo != null)\n\t\t\t{\n\t\t\...
[ "0.8149139", "0.7862385", "0.77987343", "0.7674278", "0.7462056", "0.70476884", "0.69123083", "0.6888928", "0.6888928", "0.6883864", "0.6857758", "0.68324757", "0.6812046", "0.67893076", "0.67893076", "0.6768579", "0.6762269", "0.6762269", "0.6762269", "0.6762269", "0.6762269...
0.0
-1
Initialize objects before testing
@Before public void setup(){ mockUserRepo = mock(UserRepository.class); mockSession = mock(UserSession.class); mockValidator = mock(InputValidator.class); sut = new UserService( mockUserRepo, mockSession, mockValidator); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Before\r\n\tpublic void initializeDefaultMockObjects()\r\n\t{\r\n\t\tconfigs = new ArrayList<Config>();\r\n\t\tscreenshots = new ArrayList<Screenshot>();\r\n\t\tprocessedImages = new ArrayList<ProcessedImage>();\r\n\t\ttestExecutions = new ArrayList<TestExecution>();\r\n\t\ttestEnvironments = new ArrayList<TestEn...
[ "0.79679894", "0.79476017", "0.78312635", "0.7806326", "0.7749807", "0.7717027", "0.7700651", "0.76751184", "0.76016337", "0.75912094", "0.7579422", "0.74616426", "0.7453325", "0.74358404", "0.743538", "0.7420618", "0.7393667", "0.7388714", "0.7378557", "0.7378557", "0.737839...
0.0
-1
Clear out objects after testing by setting them to null
@After public void cleanUp(){ mockUserRepo = null; mockSession = null; sut = null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void resetTesting() {\r\n\t\tcompanyCars.clear();\r\n\t\trentDetails.clear();\r\n\t}", "protected void clearResolvedObjects() {\n\t\ttype = null;\n\t\tmanagedType = null;\n\t\ttypeDeclaration = null;\n\t}", "private void nullify() {\n\t\tpaint = null;\n\t\tup = null;\n\t\tdown = null;\n\t\tleft ...
[ "0.7512399", "0.74930775", "0.71401095", "0.7067717", "0.7059228", "0.70458126", "0.7034986", "0.70239246", "0.7021796", "0.6954043", "0.69429475", "0.69399565", "0.69270676", "0.69266737", "0.69115835", "0.6862183", "0.68607646", "0.68549293", "0.6847712", "0.6836423", "0.68...
0.671049
80
who is the root node
@Override public Object root() { return root; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean isRootContextNode();", "public Node getRoot(){\r\n return this.root;\r\n }", "@Override\r\n\tpublic Node<T> getRoot() {\r\n\t\treturn raiz;\r\n\t}", "public void printRoot()\r\n\t{\r\n\t\tSystem.out.println(\"Root is:\"+root.data);\r\n\t}", "public Object getRoot(){\r\n\t\treturn _...
[ "0.6666168", "0.66077834", "0.6537749", "0.65096295", "0.6464764", "0.63945997", "0.6392772", "0.63898367", "0.63760734", "0.63611627", "0.63599956", "0.6357098", "0.6355681", "0.63294595", "0.6324695", "0.6283906", "0.62678665", "0.6264667", "0.6235096", "0.6235096", "0.6235...
0.61574894
33
how to get the left child of the node
@Override public Object left(Object node) { return ((Node<E>) node).left; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Node getLeftChild() {\r\n \treturn getChild(true);\r\n }", "public BinaryTreeNode getLeftChild() { \n\t\t\treturn null;\n\t\t}", "TreeNode<T> getLeft();", "public BinaryNode getLeftChild() {\n\t\treturn leftChild;\n\t}", "public Node getLeft () {\r\n\t\treturn left;\r\n\t}", "@Override\r\n\t...
[ "0.86966944", "0.8160296", "0.80831647", "0.80569816", "0.8040137", "0.80321085", "0.79866695", "0.7959788", "0.79351586", "0.7932222", "0.7920373", "0.7904405", "0.78747314", "0.78747314", "0.78747314", "0.78747314", "0.7839906", "0.78340816", "0.78181833", "0.7749199", "0.7...
0.7504872
37
how to get the right child of the node
@Override public Object right(Object node) { return ((Node<E>) node).right; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Node getChild();", "private int get_right_child(int index){\r\n return 2 * index + 2;\r\n }", "public abstract Position<E> getRightChild(Position<E> p);", "public Node getRightChild() {\r\n \treturn getChild(false);\r\n }", "private int get_left_child(int index){\r\n return 2 ...
[ "0.7626", "0.7100107", "0.706036", "0.7024124", "0.6897084", "0.6887867", "0.6875255", "0.6847681", "0.6821086", "0.672061", "0.66451", "0.6629075", "0.66113245", "0.6595521", "0.6591197", "0.65756994", "0.6559439", "0.65349483", "0.65122724", "0.65095514", "0.6509106", "0....
0.0
-1
how to print the node
@Override public Object string(Object node) { return ((Node<E>) node).element.toString(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void printNode() {\n System.out.println(\"value:\" + value + \" next:\" + nextNode);\n }", "public void printNode(Node n);", "public void displayNode() {\n\t\t\tSystem.out.println(\"{ \" + data + \" } \");\n\t\t}", "public void displayNode() // display ourself\n\t{\n\t\tSystem.out.p...
[ "0.826155", "0.8250031", "0.81362396", "0.79425746", "0.78326684", "0.7801914", "0.77517825", "0.764033", "0.7606202", "0.75538194", "0.75308114", "0.75299203", "0.7523183", "0.7505804", "0.74843895", "0.7444763", "0.741507", "0.7387177", "0.7383683", "0.7373027", "0.7368839"...
0.0
-1
The Constructor. Takes a Collection of Vertices and a Collection of LabeledEdges connecting those Vertices
public Graph(Collection<LabeledEdge> edges, Collection<Vertex> vertices) { this.edges = new HashSet<>(edges); this.vertices = new HashSet<>(vertices); this.edgesByStart = new HashMap<>(); this.edgesByEnd = new HashMap<>(); this.edgesByAction = new HashMap<>(); this.searcher = null; for(Vertex vertex : vertices){ this.edgesByStart.put(vertex, new HashSet<LabeledEdge>()); this.edgesByEnd.put(vertex, new HashSet<LabeledEdge>()); } for(LabeledEdge trans : edges){ assert(edgesByStart.keySet().contains(trans.getStart())); assert(edgesByEnd.keySet().contains(trans.getEnd())); this.edgesByStart.get(trans.getStart()).add(trans); this.edgesByEnd.get(trans.getEnd()).add(trans); if(edgesByAction.get(trans.getLabel()) == null) edgesByAction.put(trans.getLabel(), new HashSet<LabeledEdge>()); this.edgesByAction.get(trans.getLabel()).add(trans); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Graph(ArrayList<Vertex> vertices){\r\n this.vertices = new HashMap<String, Vertex>();\r\n this.edges = new HashMap<Integer, Edge>();\r\n \r\n for(Vertex v: vertices){\r\n this.vertices.put(v.getLabel(), v);\r\n }\r\n \r\n }", "public WeightedGraph(Co...
[ "0.6693902", "0.6358779", "0.6295274", "0.60759705", "0.6040067", "0.6038896", "0.60322744", "0.5975202", "0.5971222", "0.59463227", "0.59286183", "0.58633685", "0.57764786", "0.5771764", "0.5770805", "0.5749956", "0.57402956", "0.57168156", "0.56935436", "0.56824476", "0.567...
0.65397304
1
Returns the direct followers of a given vertex
public Set<Vertex> post(Vertex start){ Set<Vertex> reach = new HashSet<Vertex>(); if(this.edgesByStart.get(start) == null) return reach; for(LabeledEdge trans : this.edgesByStart.get(start)){ reach.add(trans.getEnd()); } return reach; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "List<User> getFollowersForUser(User user);", "public String getFollowerIds() {\n\t\treturn restClient.getFollowers();\n\t}", "List<User> getFollowingForUser(User user);", "public Followers getFollowers() {\n return followers;\n }", "@Override\n\tpublic List<Location> getNeighbors(Location vertex) {\n\n...
[ "0.62792516", "0.5996907", "0.5748069", "0.5716853", "0.5683311", "0.56793374", "0.56572413", "0.5644271", "0.56134766", "0.55323017", "0.5521513", "0.5499378", "0.5497149", "0.54963326", "0.54955274", "0.54909086", "0.5394688", "0.5382554", "0.5341586", "0.5326189", "0.52998...
0.0
-1
Returns the direct predecessors of a given vertex
public Set<Vertex> pre(Vertex start){ Set<Vertex> reach = new HashSet<Vertex>(); if(this.edgesByEnd.get(start) == null) return reach; for(LabeledEdge trans : this.edgesByEnd.get(start)){ reach.add(trans.getStart()); } return reach; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<Integer> getPredecessors(int v);", "public int getPredecessorCount(final LazyNode2 vertex) {\n Set<Node> vertices = new HashSet<Node>();\n \n Node n = neo.getNodeById(vertex.getId());\n \n for(Relationship r : n.getRelationships(relType.DEFAULT, Direction.INCOMING)){\n ...
[ "0.7525325", "0.7290376", "0.67301184", "0.6464027", "0.6358294", "0.6339367", "0.63155735", "0.62923807", "0.626771", "0.6200703", "0.61491203", "0.6145463", "0.6126974", "0.6024009", "0.59732574", "0.59348655", "0.5909238", "0.5886378", "0.57728267", "0.57605594", "0.574541...
0.55777323
34
Looks up if the end vertex is in Post(start)
public boolean reachable(Vertex start, Vertex end){ Set<Vertex> reach = this.post(start); return reach.contains(end); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean hasEdge(T beg, T end);", "public boolean hasEdge(T begin, T end);", "boolean hasEndPosition();", "boolean hasEndPosition();", "@Override\r\n public boolean breadthFirstSearch(T start, T end) {\r\n Vertex<T> startV = vertices.get(start);\r\n Vertex<T> endV = vertices.get(end)...
[ "0.67391306", "0.6681366", "0.62574464", "0.62574464", "0.6089036", "0.6049378", "0.593453", "0.5922778", "0.5919012", "0.5911264", "0.5869047", "0.58513314", "0.58410865", "0.58155566", "0.5810965", "0.5797043", "0.5781526", "0.5768324", "0.57462305", "0.57101476", "0.566844...
0.7181144
0
Looks up if the end vertex is in Post(start) and can be reached with Action act
public boolean reachableWith(Vertex start, Vertex end, Action act){ Set<LabeledEdge> reach = edgesByStart.get(start); if(reach.contains(new LabeledEdge(start, end, act))) return true; if(start.equals(end) && act.equals(Action.TAU)) return true; return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean reachable(Vertex start, Vertex end){\n\t\tSet<Vertex> reach = this.post(start); \n\t\treturn reach.contains(end);\n\t}", "@Override\r\n protected boolean isGoal(Point node) {\r\n return (node.equals(finish));\r\n }", "public void finish(){\n //check start vertex is valid for ...
[ "0.67539996", "0.6210705", "0.6023742", "0.5859598", "0.585836", "0.5653272", "0.5653272", "0.5588707", "0.5566247", "0.5539826", "0.5471795", "0.5471331", "0.54610693", "0.5398748", "0.53732014", "0.53528804", "0.53527385", "0.5340053", "0.53141165", "0.5310557", "0.53079563...
0.6515171
1
Lists the transitions with the vertex start as the start and the vertex follower as the end
public Set<LabeledEdge> getTransitions(Vertex start, Vertex follower){ Set<LabeledEdge> paths = new HashSet<LabeledEdge>(); for(LabeledEdge trans : edgesByStart.get(start)){ if(trans.getEnd().equals(follower)) paths.add(trans); } return paths; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void setTransitionsList () {\n for (int i = 0; i < dfaStates.size(); i++) {\n List<State> currStateList = dfaStates.get(i);\n int currStateListID = dfaStatesWithNumbering.get(currStateList);\n State initialState = new State(currStateListID, true);\n\n Hash...
[ "0.60274565", "0.59459853", "0.5653537", "0.5623923", "0.55991095", "0.5575491", "0.54735845", "0.54457915", "0.54230344", "0.54052055", "0.5402273", "0.53112406", "0.529343", "0.52888334", "0.5267993", "0.52449924", "0.52421796", "0.5237609", "0.52176666", "0.52165955", "0.5...
0.61366224
0
TODO Autogenerated method stub
@Override public View getView(int position, View convertView, ViewGroup parent) { View view = super.getView(position, convertView, parent); ViewHolder helper = getViewHolderNow(); MyOnClickListener myOnClickListener = (MyOnClickListener) helper.getOnClickListener(); if(myOnClickListener==null) myOnClickListener = new MyOnClickListener(); myOnClickListener.setPosition(position); myOnClickListener.setHelper(helper); myOnClickListener.setRecommendRoute(mDatas.get(position)); aboutOnClickListener(helper,myOnClickListener); return view; }
{ "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 onClick(View v) { onLoveClick(helper, recommendRoute); // boolean isCollected = VGDao.getInstance(getContext()).getRecommendRouteCollected(recommendRoute.getRouteID()); // helper.setImageSelected(R.id.bigscenelist_love_iv, (isCollected==false)); // VGDao.getInstance(getContext()).setRecommendRouteCollected(recommendRoute.getRouteID(), (isCollected==false)?1:0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
new FlatChunkGenerator(world, new DungeonBiomeProvider(), new FlatGenerationSettings());
@Override @Nonnull public EndChunkGenerator createChunkGenerator() { return new EndChunkGenerator(world, new DungeonBiomeProvider(), new EndGenerationSettings()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic IChunkProvider createChunkGenerator()\n\t{\n\t\treturn new ChunkProviderHeaven(worldObj, worldObj.getSeed(), true);\n\t}", "private static void generateWorld(){\n for(int i = 0; i < SIZE*SIZE; i++){\n new Chunk();\n }\n }", "public IChunkProvider createChunkGener...
[ "0.7252623", "0.708915", "0.70679116", "0.7054006", "0.6607397", "0.64371574", "0.62349504", "0.6205043", "0.61917984", "0.6187928", "0.6167356", "0.6091154", "0.60732836", "0.6052683", "0.6050643", "0.604357", "0.6024122", "0.59853834", "0.59573036", "0.5911461", "0.5906988"...
0.77253854
0
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMMdd HH:mm:ss");
@Deprecated public static long getSecond(String argDateTime, String argInFormat) { SimpleDateFormat simpleDateFormat = new SimpleDateFormat(argInFormat); try { //Date date = simpleDateFormat.parse(simpleDateFormat.format(argDateTime)); Date date = simpleDateFormat.parse(argDateTime); return date.getTime() / 1000; } catch (ParseException ex) { //ex.printStackTrace(); return System.currentTimeMillis() / 1000; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void m1() {\n\n String d = \"2019/03/22 10:00-11:00\";\n DateFormat df = new SimpleDateFormat(\"yyyy/MM/dd HH:mm-HH:mm\");\n try {\n Date parse = df.parse(d);\n System.out.println(df.format(parse));\n } catch (ParseException e) {\n e.printStackTrace();\n }\n }", "pub...
[ "0.6640912", "0.6538995", "0.6393982", "0.6386351", "0.63015264", "0.6225367", "0.6150575", "0.6081788", "0.6026739", "0.6019955", "0.5924739", "0.59236455", "0.5895194", "0.5877031", "0.5857094", "0.5802417", "0.5773614", "0.5729926", "0.57202905", "0.5707658", "0.5701587", ...
0.0
-1
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMMdd HH:mm:ss");
@Deprecated public static long getGMTSecond(String argDateTime, String argInFormat) { SimpleDateFormat simpleDateFormat = new SimpleDateFormat(argInFormat, Locale.ENGLISH); simpleDateFormat.setTimeZone(TimeZone.getTimeZone("UTC")); try { //Date date = simpleDateFormat.parse(simpleDateFormat.format(argDateTime)); DateFormat dateFormat = new SimpleDateFormat(argInFormat); Date date = simpleDateFormat.parse(argDateTime); return date.getTime() / 1000; } catch (ParseException ex) { //ex.printStackTrace(); return System.currentTimeMillis() / 1000; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void m1() {\n\n String d = \"2019/03/22 10:00-11:00\";\n DateFormat df = new SimpleDateFormat(\"yyyy/MM/dd HH:mm-HH:mm\");\n try {\n Date parse = df.parse(d);\n System.out.println(df.format(parse));\n } catch (ParseException e) {\n e.printStackTrace();\n }\n }", "pub...
[ "0.6641881", "0.6538893", "0.63932693", "0.6385271", "0.6302066", "0.62251925", "0.61500627", "0.6081218", "0.60268325", "0.60197353", "0.59251225", "0.59235734", "0.5896095", "0.58773303", "0.58570033", "0.5802754", "0.57746166", "0.572996", "0.5721188", "0.5707091", "0.5701...
0.0
-1
/DateFormat dateFormat = new SimpleDateFormat("yyyyMMdd HH:mm:ss"); SimpleDateFormat simpleDateFormat = new SimpleDateFormat("MMM dd, yyyy . hh:mm aa"); DateFormat dateFormat = new SimpleDateFormat(argInFormat, Locale.getDefault());
@Deprecated public static String getGMTToLocalTime(String argDateTime, String argInFormat, String argOutFormat) { DateFormat dateFormat = new SimpleDateFormat(argInFormat, Locale.getDefault()); SimpleDateFormat simpleDateFormat = new SimpleDateFormat(argOutFormat); //simpleDateFormat.setTimeZone(TimeZone.getTimeZone(Locale)); //simpleDateFormat.setTimeZone(TimeZone.getDefault()); dateFormat.setTimeZone(TimeZone.getTimeZone("GMT")); simpleDateFormat.setTimeZone(TimeZone.getDefault()); //System.out.println("-----+ " + TimeZone.getDefault()); try { Date date = dateFormat.parse(argDateTime); return simpleDateFormat.format(date); } catch (ParseException ex) { //ex.printStackTrace(); return null; } //https://medium.com/@kosta.palash/converting-date-time-considering-time-zone-android-b389ff9d5c49 //https://www.tutorialspoint.com/java/util/calendar_settimezone.htm //writeDate.setTimeZone(TimeZone.getTimeZone("GMT+04:00")); //https://vectr.com/tmp/a1hCr4Gvwc/aaegiGLyoI //http://inloop.github.io/svg2android/ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String format (Date date , String dateFormat) ;", "private void constructVssDateTimeFormat() {\n vssDateTimeFormat = new SimpleDateFormat(\"'Date: '\" + this.dateFormat + \" 'Time: 'hh:mma\"); \n }", "public String getDateConvert() {\n SimpleDateFormat dateFormat1 = new Simp...
[ "0.6541367", "0.6508718", "0.64113164", "0.63950354", "0.6364396", "0.6357407", "0.63516235", "0.631923", "0.6291381", "0.6208296", "0.6184097", "0.61554986", "0.6128705", "0.61051637", "0.6102543", "0.60680085", "0.60480183", "0.60361", "0.60117424", "0.6009553", "0.5972662"...
0.0
-1
Retrieve the value is null or empty.
public static Spanned fromHtml(String argValue) { if (com.rz.librarycore.utils.Utils.isNullOrEmpty(argValue)) { return null; } if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.N) { return Html.fromHtml(argValue, Html.FROM_HTML_MODE_LEGACY); } else { return Html.fromHtml(argValue); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "default boolean hasValue() {\n\t\t\treturn getValue() != null;\n\t\t}", "public boolean isEmpty() {\n\t\tString v = getValue();\n\t\treturn v == null || v.isEmpty();\n\t}", "public boolean hasValue() {\n return value_ != null;\n }", "public boolean isEmptyValue() {\r\n if(value == null){\r\n ...
[ "0.74363846", "0.7406146", "0.7277347", "0.717242", "0.70934385", "0.7013986", "0.7010107", "0.6907059", "0.68254757", "0.67973006", "0.66998756", "0.6691565", "0.661762", "0.64888406", "0.6469269", "0.6466774", "0.64651084", "0.64611757", "0.64611757", "0.6459624", "0.645962...
0.0
-1
Function used to fetch an XML file from assets folder
public static int getDrawableId(Context argContext, String argName) { Resources resources = argContext.getResources(); int resourceId = resources.getIdentifier(argName, "drawable", argContext.getPackageName()); return resourceId; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public XmlPullParser getLocalXML(String filename) throws IOException {\r\n\t\ttry {\r\n\t\t\tin = mContext.getAssets().open(filename);\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t\ttry {\r\n\t\t\tXmlPullParser parser = Xml.newPullParser();\r\n\t\t\tparser.setFeature(XmlPullPars...
[ "0.6785874", "0.6394494", "0.5853264", "0.57987714", "0.5784212", "0.5723", "0.57008934", "0.56399685", "0.56014216", "0.5583376", "0.5554536", "0.5549577", "0.55490834", "0.5465004", "0.54383", "0.5410919", "0.5407907", "0.53856343", "0.53550965", "0.5351122", "0.5337826", ...
0.0
-1
Give n role names, and a folder adds to all .json files in the folder an entry with the role names. Example: INPUT: folderpath white;black Line added to each json file: "roles":["white","black"]
public static void main(String[] args) { if(args.length !=2) { System.out.println("Two inputs expected: folder path where to look for .json files and list of roles separated by semicolon."); return; } String folderpath = args[0]; String[] roles = args[1].split(";"); List<String> rolesForJson = new ArrayList<String>(); for(String s : roles) { rolesForJson.add(s); } File folder; File[] filesInFolder; List<File> folders = new ArrayList<File>(); folders.add(new File(folderpath)); while(!folders.isEmpty()) { folder = folders.remove(0); //System.out.println(folder.getAbsolutePath()); filesInFolder = folder.listFiles(); for(File file : filesInFolder) { if(file.isDirectory()) { folders.add(file); }else if(file.getName().endsWith(".json")) { addRoles(file, rolesForJson); } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void importRoles(String filename) throws Exception {\r\n\t\tFileReader fr = new FileReader(filename);\r\n\t\tBufferedReader br = new BufferedReader(fr);\r\n\r\n\t\twhile(true) {\r\n\t\t\tString line = br.readLine();\r\n\t\t\tif (line == null)\r\n\t\t\t\tbreak;\r\n\t\t\tString[] tokens = line.split(\",\");\r...
[ "0.5479928", "0.5200141", "0.5191148", "0.5169746", "0.5160818", "0.51502585", "0.50462973", "0.5001106", "0.49943376", "0.497724", "0.49702147", "0.49448678", "0.49186775", "0.4916365", "0.48488116", "0.48476383", "0.48361725", "0.48137873", "0.4809705", "0.47987184", "0.479...
0.7707655
0
Counting the number of times an element occured in an array.................
public static int searchNumberOfOccurence(int arr[], int ele) { int count = 0; for (int i = 0; i < arr.length; i++) { if (arr[i] == ele) { count++; } } return count; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void cntArray(int A[], int N) \n { \n // initialize result with 0 \n int result = 0; \n \n for (int i = 0; i < N; i++) { \n \n // all size 1 sub-array \n // is part of our result \n result++; \n \n // element at current index \n ...
[ "0.72451836", "0.7086333", "0.70325917", "0.7022237", "0.70045066", "0.68623424", "0.6844739", "0.6791573", "0.6764254", "0.6711952", "0.6695265", "0.6693185", "0.6676226", "0.6671398", "0.66578054", "0.66140157", "0.6603484", "0.6585515", "0.6567479", "0.65493095", "0.653296...
0.64892614
22
Printing the indexes on which the element occured in the array....
public static int[] indexOfOccurence(int arr[], int ele) { int count = 0; for (int i = 0; i < arr.length; i++) { if (arr[i] == ele) { count++; } } int ans[] = new int[count]; int j = 0; for (int i = 0; i < arr.length - 1; i++) { if (arr[i] == ele) { ans[j] = i; j++; } } return ans; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private int insideArray(ArrayList<Integer> array,int element){\r\n int index = 0;\r\n for(int arrayListElement:array){\r\n if(arrayListElement == element){\r\n return index;\r\n }\r\n index++;\r\n }\r\n return -1;\r\n }", "public abst...
[ "0.6485431", "0.6224687", "0.6193017", "0.6161933", "0.6130388", "0.60618806", "0.6059151", "0.6051903", "0.59868395", "0.5966903", "0.5966575", "0.5958161", "0.5953468", "0.5928384", "0.59249485", "0.5910869", "0.5910003", "0.5908399", "0.5898567", "0.58867884", "0.5873884",...
0.5872775
21
Starts the QuckSort algorithm and gets a boundary (see b)
public void go(int boundary) { this.b = boundary; System.out.println("Start QuickSort ..."); this.startTime = new Date().getTime(); sort(0, sequence.length - 1); this.endTime = new Date().getTime(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override public void run() {\n\t\t\t// Handle the base case:\n\t\t\tif(len - start < 2) {\n\t\t\t\t// Arrive at the base-case state & return:\n\t\t\t\tph.arrive();\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// TODO: Select an optimal pivot point:\n\t\t\tint pivot = start;\n\n\t\t\t// Perform the necessary swap operations...
[ "0.6085908", "0.60427696", "0.5877109", "0.56916803", "0.5677044", "0.56362605", "0.56195366", "0.56161684", "0.55942255", "0.55870867", "0.55779016", "0.5555641", "0.5548037", "0.54907763", "0.5480525", "0.5473788", "0.54725534", "0.5455342", "0.54243714", "0.5423215", "0.54...
0.7639435
0
This method performs a QuckSort iteration and is calling recursively.
private void sort(int start, int stop) { addComparison(); if (start > stop) { return; } addComparison(); if (stop - start < b) { bubbleSort(start, stop); } else { int pivotIndex = start + (int) ((stop - start) * Math.random()); float pivot = sequence[pivotIndex]; int left = start; int right = stop; while (left <= right) { addComparison(); while (sequence[left] < pivot) { left++; addComparison(); } addComparison(); while (sequence[right] > pivot) { right--; addComparison(); } addComparison(); if (left <= right) { swapAt(left, right); left++; right--; } } sort(start, right); sort(left, stop); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void quickSortIter(){\n int pivot = 0;\n int partition;\n boolean unordered = false;\n do {\n unordered = false;\n partition = pivot;\n for (int i = pivot + 1; i < array.length; i++) {\n if (((Comparable) array[pivot]).compareTo(array[i]) >= 0) {\n if (i - partitio...
[ "0.68036574", "0.65810513", "0.64433974", "0.62417257", "0.6134835", "0.61129475", "0.6111592", "0.6052337", "0.6051154", "0.5980836", "0.59052354", "0.5889425", "0.58788973", "0.5873926", "0.58627903", "0.58486074", "0.5750985", "0.5741541", "0.5737461", "0.57334065", "0.569...
0.0
-1
Every time a comparison occurs, this method counts.
private void addComparison() { this.comparisonCounter++; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void incrComparisons() { ++comparisons; }", "@Override\n public void sortAndCount() {\n Insertion.reset();\n Insertion.sort(arrayForTests);\n comp = Sort.getComparisonOperations(); // Sort.getComp();\n copy = Sort.getCopyOperations(); // Sort.getCopy();\n }", "pu...
[ "0.72448516", "0.65932405", "0.6527721", "0.6450814", "0.62030077", "0.61891305", "0.6160498", "0.6095522", "0.6049962", "0.6044311", "0.60130566", "0.60046655", "0.6000956", "0.5998909", "0.5981718", "0.59799147", "0.5970694", "0.59680665", "0.5965138", "0.5965138", "0.59651...
0.7421077
0
Applies the BubbleSort algorithm to the specified range (start and stop)
public void bubbleSort(int start, int stop) { for (int n = stop; n > start + 1; n--) { for (int i = start; i < n; i++) { addComparison(); if (sequence[i] > sequence[i + 1]) { swapAt(i, i + 1); } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void getBubbleSort(int range) {\n\n Integer[] number = GetRandomArray.getIntegerArray(range);\n\n //main cursor to run across array\n int pivot_main = 0;\n\n //secondary cursor to run of each index of array\n int pivot_check = 0;\n\n //variable to hold curren...
[ "0.7224017", "0.7084231", "0.6704334", "0.6648936", "0.6307179", "0.62533075", "0.6211856", "0.61959904", "0.6140325", "0.6121233", "0.6091252", "0.60832864", "0.6052339", "0.60129225", "0.60087615", "0.6001888", "0.5985668", "0.5946862", "0.5944961", "0.5944908", "0.59124935...
0.7754725
0
Prints out the content of the sequence between the given range.
public void printSequence(int l, int r) { for (int i = 1; i <= 10; i++) { System.out.print(sequence[i + 1]); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void print() {\n int n = getSeq().size();\n int m = n / printLength;\n for (int i = 0; i < m; i++) {\n printLine(i * printLength, printLength);\n }\n printLine(n - n % printLength, n % printLength);\n System.out.println();\n }", "public static void s...
[ "0.6417904", "0.61782724", "0.5967377", "0.5877842", "0.58728", "0.5845504", "0.5841277", "0.583574", "0.56862676", "0.56725943", "0.56319445", "0.5618636", "0.5583593", "0.5561283", "0.55538774", "0.5550642", "0.5514967", "0.5503762", "0.548973", "0.5460275", "0.5459598", ...
0.62841177
1
Swaps the element at i with the element at j.
private void swapAt(int i, int j) { float tmp = sequence[i]; sequence[i] = sequence[j]; sequence[j] = tmp; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void swap(int i, int j){\n \t\tint temp = a[i];\n \t\ta[i] = a[j];\n \t\ta[j] = temp;\n }", "private void swap(int i, int j) {\n\t\tint tmp = data.get(i);\n\t\tdata.set(i, data.get(j));\n\t\tdata.set(j, tmp);\n\t}", "@Override\n protected void swap(int i, int j)\n {\n E temp = this.eleme...
[ "0.8081762", "0.8069114", "0.802367", "0.7956258", "0.7922566", "0.79209936", "0.78955543", "0.780021", "0.7751165", "0.7751165", "0.7732189", "0.77161175", "0.76518106", "0.76518106", "0.7645253", "0.7619771", "0.7592973", "0.7577481", "0.75702393", "0.7567115", "0.75428253"...
0.7774227
8
Prints out some statistics relating the current run.
public void printStats() { System.out.println("QuickSort terminates!"); System.out.println(); System.out.println("Duration: " + getDuration() + " seconds"); System.out.println("Comparisons: " + this.comparisonCounter); System.out.println("Boundary: " + this.b); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void printStatistics() {\n\t// Skriv statistiken samlad så här långt\n stats.print();\n }", "void printStats();", "private static void printStats()\r\n\t{\r\n\t\tSystem.out.println(\"Keywords found: \" + keywordHits);\r\n\t\tSystem.out.println(\"Links found: \" + SharedLink.getLinksFound());\r...
[ "0.80032307", "0.78790224", "0.78014976", "0.77957135", "0.7782993", "0.75877726", "0.7528194", "0.7503221", "0.74541813", "0.74541813", "0.7450012", "0.7401637", "0.7366336", "0.7238039", "0.7196629", "0.71848804", "0.71724796", "0.7136786", "0.70869744", "0.703375", "0.7016...
0.74407965
11
TODO Autogenerated method stub
private static int MaxSubarraySum(int[] a) { int max_so_for =Integer.MIN_VALUE; int max_ending_here = 0;; for (int i = 0; i < a.length; i++) { max_ending_here = max_ending_here + a[i]; if(max_so_for < max_ending_here ) max_so_for = max_ending_here; if(max_ending_here < 0) max_ending_here = 0; } return max_so_for; }
{ "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
Constructor for primary key
public Systemlog (java.lang.Integer rowid) { super(rowid); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "PrimaryKey createPrimaryKey();", "public DatasetParameterPK() {\n }", "public ParametroPorParametroPK() {\r\n\t}", "PrimaryKey getPrimarykey();", "Key getPrimaryKey();", "public TdOficioAfectacionPK() {\n }", "PrimaryKey getPrimaryKey();", "public DomainPK()\n {\n }", "public LeaguePrimar...
[ "0.78750813", "0.74897444", "0.73985463", "0.70965606", "0.70702577", "0.6998011", "0.6979706", "0.69716114", "0.6965111", "0.69635993", "0.6915723", "0.67964387", "0.6758262", "0.67022586", "0.67022586", "0.67022586", "0.66982806", "0.65859663", "0.6583274", "0.6531201", "0....
0.0
-1
The base predicate for an DesignAUndertaking combination.
protected abstract boolean isSatisfiedBy(Design design, AUndertaking t);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean checkSatisifies(Design design, AUndertaking task)\n {\n resetState();\n return checkCombination(design, task);\n }", "public boolean checkDeskSubset(ArrayList<Furniture> subset){\n boolean legs = false;\n boolean top = false;\n boolean drawer = false;\n...
[ "0.49904427", "0.49038088", "0.48004308", "0.4724532", "0.47096443", "0.46620044", "0.461357", "0.4550966", "0.45197368", "0.45146313", "0.45084906", "0.44809982", "0.4480984", "0.44630224", "0.443569", "0.44327974", "0.44023412", "0.43719175", "0.43533552", "0.434239", "0.43...
0.65921277
0
If a subclass has state that must be reset, override this method.
protected void resetState() { // Nothing to do by default. }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void reset()\n {\n super.reset();\n }", "@Override\n public void reset() {\n super.reset();\n }", "protected abstract void reset();", "protected abstract boolean reset();", "abstract void reset();", "public void reset() {\n super.reset();\n }", ...
[ "0.72900337", "0.7280791", "0.7150028", "0.7115613", "0.7017744", "0.70164394", "0.69680387", "0.6923687", "0.69179654", "0.69179654", "0.69179654", "0.69179654", "0.69179654", "0.69179654", "0.69179654", "0.69179654", "0.69179654", "0.69179654", "0.69179654", "0.6882023", "0...
0.7328492
0
Given a design and an AUndertaking, check base predicate recursively checking if the AUndertaking is an TaskGroup.
public boolean checkSatisifies(Design design, AUndertaking task) { resetState(); return checkCombination(design, task); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected abstract boolean isSatisfiedBy(Design design, AUndertaking t);", "public boolean isInSelectedHierarchy(AUndertaking task)\n {\n TaskGroup group = task.getTaskGroup();\n\n while (group != null) {\n if (isTaskSelected(group)) {\n return true;\n }\n\n ...
[ "0.65565825", "0.6382376", "0.5305601", "0.51738393", "0.5088709", "0.50143206", "0.4960091", "0.4907611", "0.48973075", "0.48915422", "0.486895", "0.48670796", "0.48516423", "0.4804318", "0.47952804", "0.47633016", "0.47589862", "0.4741975", "0.4734506", "0.47240743", "0.470...
0.5731341
2
Nothing to do yet.
public void deselectAll() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public final void mo51373a() {\n }", "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "private stendhal() {\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\r\n\tpubl...
[ "0.66031665", "0.64606583", "0.63940394", "0.6332047", "0.6251154", "0.6242532", "0.6237739", "0.618104", "0.6155405", "0.6116511", "0.60656995", "0.60624033", "0.6061129", "0.6051388", "0.6051388", "0.60487086", "0.6040131", "0.6034441", "0.601504", "0.6004764", "0.6004764",...
0.0
-1
Return the set of selected undertakings (tasks and/or task groups). Although it should not be depended upon, the returned array is generally not null (which would indicate no selected undertakings). Instead, if there are no selected undertakings, an array of zero length is returned. The mode parameter indicates whether or not to prune the set of selected undertakings (i.e., pruning removes from consideration those selected undertakings that are children of other selected ITaskGroups) and/or whether or not to ensure the selected undertakings are presented in order of their occurrence in the preorder traversal of the Project's root undertakings. The constants PRUNE_SELECTION and ORDER_SELECTION may be OR'ed together for both effects. For neither effect, to achieve the fastest "selection" (e.g., when it is known that only one task is selected), FAST_SELECTION may be used.
public AUndertaking[] getSelectedTasks(int flags) { boolean prune = (flags & PRUNE_SELECTION) != 0; boolean taskGroupsOnly = (flags & TASK_GROUPS_ONLY) != 0; List<AUndertaking> keptTasks = new ArrayList<AUndertaking>(); if ((flags & ORDER_SELECTION) != 0) { orderSelection(project.getUndertakings().iterator(), prune, taskGroupsOnly, keptTasks); } else { Iterator<AUndertaking> allSelectedTasks = getSelectedTaskIterator(); while (allSelectedTasks.hasNext()) { AUndertaking selectedTask = allSelectedTasks.next(); if ((! prune) || (! isAncestorSelected(selectedTask))) { if ((! taskGroupsOnly) || selectedTask.isTaskGroup()) { keptTasks.add(selectedTask); } } } } AUndertaking[] selection = new AUndertaking[keptTasks.size()]; keptTasks.toArray(selection); return selection; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public TreeMap<String,CheckOutMode>\n getModes()\n {\n TreeMap<String,CheckOutMode> modes = new TreeMap<String,CheckOutMode>();\n for(String name : pVersionFields.keySet()) {\n JCollectionField field = pModeFields.get(name);\n modes.put(name, CheckOutMode.values()[field.getSelectedIndex()]);\n ...
[ "0.46359086", "0.45801076", "0.44857875", "0.44187838", "0.44014242", "0.43974626", "0.4344802", "0.4292947", "0.42856115", "0.42816338", "0.42539874", "0.42338514", "0.42240843", "0.4211907", "0.41973475", "0.41826525", "0.41604033", "0.4144987", "0.4138897", "0.4122238", "0...
0.66115916
0
Returns the single selected task. If zero tasks or more than one task is selected, then IllegalStateException is thrown.
public AUndertaking getSelectedTask() { String errorMsg; Iterator<AUndertaking> taskIt = getSelectedTaskIterator(); if (taskIt.hasNext()) { AUndertaking selectedTask = taskIt.next(); if (! taskIt.hasNext()) { return selectedTask; } errorMsg = "Selection is multiple"; } else { errorMsg = "Nothing is selected"; } throw new IllegalStateException(errorMsg); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Task getClickedTask(int position) {\r\n\t\treturn taskList.get(position);\r\n\t}", "protected abstract Optional<T> getSingleSelection();", "private String getSelectionTask() {\n String selection = \"\";\n\n if (mTypeTask.equals(TaskContract.TypeTask.Expired)) {\n selection = Tas...
[ "0.62499076", "0.61152524", "0.60692227", "0.59869015", "0.59336746", "0.593317", "0.58950704", "0.5845596", "0.5845596", "0.58085907", "0.5787974", "0.57486725", "0.5707781", "0.5707176", "0.56877905", "0.5683141", "0.5672674", "0.5610128", "0.5588282", "0.5583477", "0.55693...
0.82948756
0
Retrieves the parent task group that contains the selected undertaking.
public TaskGroup getSelectedTaskParent() { boolean first = true; TaskGroup allParent = null; // Examine the parent task group for each selected undertaking Iterator<AUndertaking> taskIt = getSelectedTaskIterator(); while (taskIt.hasNext()) { AUndertaking item = taskIt.next(); TaskGroup parentOfItem = item.getTaskGroup(); // If the selected item represents a top-level undertaking, // then null is the only possible response. if (parentOfItem == null) { return null; } // Remember first parent to compare against the remaining ones if (first) { first = false; allParent = parentOfItem; } else if (parentOfItem != allParent) { // If a subsequent parent is different from the remembered one, // return null return null; } } // If there is no selected undertaking, return null if (allParent == null) { return null; } // Otherwise, return the shared parent task group return allParent; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public TaskGroup[] getSelectedTaskParents()\n {\n int selectedItemCount = getSelectedTaskCount();\n TaskGroup[] parents = new TaskGroup[selectedItemCount];\n\n Iterator<AUndertaking> selectedTasks = getSelectedTaskIterator();\n int i = 0;\n\n while (selectedTasks.hasNext()) {\...
[ "0.70219845", "0.6722301", "0.64377844", "0.6430615", "0.6111415", "0.60997367", "0.59830475", "0.59484595", "0.59397787", "0.5849373", "0.58469754", "0.5841102", "0.5815735", "0.5764884", "0.5764783", "0.5764783", "0.5764783", "0.5764783", "0.5764783", "0.5764783", "0.576478...
0.84754723
0
Retrieves the parents of all selected tasks/groups.
public TaskGroup[] getSelectedTaskParents() { int selectedItemCount = getSelectedTaskCount(); TaskGroup[] parents = new TaskGroup[selectedItemCount]; Iterator<AUndertaking> selectedTasks = getSelectedTaskIterator(); int i = 0; while (selectedTasks.hasNext()) { AUndertaking task = selectedTasks.next(); parents[i++] = task.getTaskGroup(); } return parents; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public TaskGroup getSelectedTaskParent()\n {\n boolean first = true;\n TaskGroup allParent = null;\n\n // Examine the parent task group for each selected undertaking\n Iterator<AUndertaking> taskIt = getSelectedTaskIterator();\n\n while (taskIt.hasNext()) {\n AUnder...
[ "0.72020274", "0.64948165", "0.6460208", "0.6420287", "0.6396307", "0.6396296", "0.62266105", "0.61885273", "0.60504776", "0.60351866", "0.5946834", "0.5875011", "0.5822045", "0.5817051", "0.57987267", "0.5796403", "0.5736198", "0.57184863", "0.57184863", "0.57184863", "0.570...
0.84916204
0
Indicate whether the given undertaking is a descendant of a selected task group.
public boolean isInSelectedHierarchy(AUndertaking task) { TaskGroup group = task.getTaskGroup(); while (group != null) { if (isTaskSelected(group)) { return true; } group = group.getTaskGroup(); } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean isChildSelectable(int groupPosition, int childPosition);", "public boolean isDescendant(RMShape aShape) { return aShape!=null && aShape.isAncestor(this); }", "public boolean isDescendantOf(Actor actor) {\n if (actor == null)\n throw new IllegalArgumentException(\"actor cannot be null...
[ "0.60650146", "0.59607244", "0.59297687", "0.57862484", "0.56795925", "0.567277", "0.544976", "0.5435839", "0.5435839", "0.5427938", "0.54266316", "0.5420692", "0.5394691", "0.537885", "0.53762764", "0.53545254", "0.5347118", "0.5288605", "0.5285995", "0.5280868", "0.5259398"...
0.71763176
0
TODO: Warning this method won't work in the case the id fields are not set
@Override public boolean equals(Object object) { if (!(object instanceof TipoCora)) { return false; } TipoCora other = (TipoCora) object; if ((this.idTipoCora == null && other.idTipoCora != null) || (this.idTipoCora != null && !this.idTipoCora.equals(other.idTipoCora))) { return false; } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void setId(Integer id) { this.id = id; }", "private Integer getId() { return this.id; }", "public void setId(int id){ this.id = id; }", "public void setId(Long id) {this.id = id;}", "public void setId(Long id) {this.id = id;}", "public void setID(String idIn) {this.id = idIn;}", "public void se...
[ "0.6896568", "0.6839589", "0.6705305", "0.66411185", "0.66411185", "0.6592062", "0.65784657", "0.65784657", "0.65749544", "0.65749544", "0.65749544", "0.65749544", "0.65749544", "0.65749544", "0.6561728", "0.6561728", "0.6545076", "0.65248877", "0.651606", "0.6488212", "0.647...
0.0
-1
/ Aqui mandar a llamar la funcion que me retorna el pagar de un empleado
private static void pagarEmpleado(int cod) { throw new UnsupportedOperationException("Not yet implemented"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Page<DTOPresupuesto> buscarPresupuestos(String filtro, Optional<Long> estado, Boolean modelo, Pageable pageable) {\n Page<Presupuesto> presupuestos = null;\n Empleado empleado = expertoUsuarios.getEmpleadoLogeado();\n\n if (estado.isPresent()){\n presupuestos = presupuestoRep...
[ "0.6457534", "0.6240358", "0.622573", "0.61651427", "0.61417687", "0.61330676", "0.6128262", "0.61234474", "0.61231863", "0.6080105", "0.6076221", "0.60067034", "0.5913257", "0.59030885", "0.58965653", "0.58828455", "0.587656", "0.5807222", "0.57843804", "0.57808644", "0.5766...
0.6414404
1
/ Este sub menu tiene las opciones de: 1 Registrar Horas Trabajadas 2 Registrar Venta 3 Actualizar Fecha de Nacimiento 4 Actualizar Numero de IHSS 5 Actualizar Tipo Jerarquia 6 Regresar Menu Principal Y luego segun cada opcion se pide el codigo del trabajador y su dato extra segun la opcion. Una vez que se completa la accion se regresa a este sub menu. SOLO se regresa a este menu si se selecciona la opcion 5.
private static void submenu() { throw new UnsupportedOperationException("Not yet implemented"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void cargarOpcionesSubMenu() {\n\t\t\n\t\tif(esSubMenu()) {\n\t\t\tOpcionSubMenu subMenu = (OpcionSubMenu) getElementoMenuActual();\n\t\t\tsetElementosMenu(subMenu.getHijos());\n\t\t}\n\t}", "public void regolaOrdineInMenu(int codRiga) {\n\n /** variabili e costanti locali di lavoro */\n Mod...
[ "0.6994073", "0.68654484", "0.6865306", "0.68469673", "0.6805996", "0.6783696", "0.6703497", "0.666717", "0.66038793", "0.65434957", "0.65374213", "0.6525826", "0.652432", "0.6523913", "0.6521095", "0.64252424", "0.64251196", "0.64223784", "0.63940966", "0.63906294", "0.63629...
0.0
-1
Sort a stack only with the function of the stack push pop peek isEmpty.
public Stack<Integer> sortInAscendingOrder(Stack<Integer> s) { Stack<Integer> r = new Stack<>(); while (s.size() != 0) { int temp = s.pop(); while (!r.isEmpty() && temp > r.peek()) s.push(r.pop()); r.push(temp); } return r; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void sortStack(){\n Stack small = new Stack();\n Stack large = new Stack();\n while(isEmpty()==false){\n Node n = pop();\n if(small.isEmpty() == true){\n small.push(n);\n }\n else if(n.data > small.peek()){\n small.push(n); \n }\n else{\n wh...
[ "0.7621658", "0.75241196", "0.7351891", "0.70204705", "0.69818854", "0.6929361", "0.68996114", "0.6840715", "0.6768543", "0.67556524", "0.67454255", "0.6584398", "0.6546802", "0.65293515", "0.63806766", "0.62880236", "0.6224298", "0.62196934", "0.6126987", "0.608244", "0.6041...
0.6575834
12
/ The check method takes the inputed and removes all the spaces and reduces any possible letters to lower case to prevent any bugs/
public static char[] format(String expression){ expression = expression.replaceAll(" ", ""); expression = expression.toLowerCase(); return expression.toCharArray(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static String cleanString(String s) {\n return s.replaceAll(\"[^a-zA-Z ]\", \"\").toLowerCase();\n }", "static String cleanString(String s) {\n return s.replaceAll(\"[^a-zA-Z ]\", \"\").toLowerCase();\n }", "static String cleanString(String s) {\n return s.replaceAll(\"[^a-zA-Z ]\", ...
[ "0.70145327", "0.70145327", "0.70145327", "0.68506545", "0.6669563", "0.6641871", "0.6614577", "0.6612342", "0.6514195", "0.64922047", "0.6463211", "0.6429553", "0.6334732", "0.6296547", "0.6295171", "0.62859166", "0.62413925", "0.62074816", "0.62066275", "0.6199968", "0.6192...
0.0
-1
/ The algorithm for checking each sequence is very simple. Each time one of the three possible opening brackets is found they are pushed into the stack. when an closing bracket is found it peeks at the stack top and if the closing bracket matches the opening bracket then the stack pops the top and continues; if it doesn't then the sequence is not properly formatted. at the end of the loop the stack should be empty if the sequence is correctly formatted.
public static boolean check(char[] expression){ Stack stack = new Stack(); for(int i =0; i < expression.length; i++){ if(expression[i] == '(' || expression[i] == '{' || expression[i] == '['){ stack.push(expression[i]); } if(expression[i] == ')' || expression[i] == '}' || expression[i] == ']'){ if(stack.isEmpty()){ return false; } if((expression[i] == ')' && stack.peek() == '(') || (expression[i] == '}' && stack.peek() == '{') || (expression[i] == ']' && stack.peek() == '[')){ stack.pop(); }else{ return false; } } } return stack.isEmpty(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String[] args) {\n String s=\"[()]{}{[()()]()}\";\n char s1[]=s.toCharArray();\n Stack<Character> a=new Stack<>();\n \n for (int i = 0; i < s.length(); i++) {\n \t char x=s.charAt(i);\n// \t if(a.isEmpty()) {\n// \t\t a.push(x);\n// \t }\n \t \n\t\tif(x=='...
[ "0.6550423", "0.63902026", "0.6354791", "0.63023263", "0.6221364", "0.62125653", "0.61903274", "0.6171029", "0.6150031", "0.6021835", "0.59625", "0.5949692", "0.5949518", "0.58972067", "0.58508205", "0.58494073", "0.58047605", "0.57780516", "0.5775163", "0.5744798", "0.574110...
0.55818444
29
Creates a file with the given name and fileextension.
public File createFile(String fileName, String fileextension) throws IOException { // create actual file File f = getFile(fileName, fileextension); f.createNewFile(); return f; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String createFile(String name) {\t\t\n\t\tString filename = this.path + name;\n\t\tFile file = new File(filename);\n\t\t\n\t\ttry {\n\t\t\tif (file.createNewFile()) {\n\t\t System.out.println(\"Created file '\" + filename + \"'.\");\n\t\t \n\t\t // Add file to files list\n\t\t\t\tthis.file...
[ "0.7056077", "0.69225925", "0.66678184", "0.6398675", "0.63201773", "0.62328", "0.60508275", "0.6047028", "0.5953069", "0.59135133", "0.5908634", "0.5882768", "0.58502626", "0.5843329", "0.583819", "0.583326", "0.582763", "0.58104306", "0.5806666", "0.5769171", "0.57629365", ...
0.7844414
0
Writes a single line to an open file
public void writeLineToFile(File file, String content) throws IOException { BufferedWriter writer = writers.get(file); writer.append(content + "\n"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void writeLine(String line){\n\t\ttry{\n\t\t\tout.write(line);\n\t\t}\n\t\tcatch (IOException e){\n\t\t\tSystem.out.println(\"File cannot be written too.\");\n\t\t\tSystem.exit(0);\n\t\t}\n\t}", "private void writeFile(String line, BufferedWriter theOutFile) throws Exception {\n\t\ttheOutFile.append(line)...
[ "0.7110234", "0.6670682", "0.66418636", "0.6564084", "0.64680755", "0.64281356", "0.6421658", "0.6389916", "0.63587785", "0.6336587", "0.6244747", "0.62022996", "0.6106127", "0.60312706", "0.5971415", "0.5967926", "0.59524184", "0.5896088", "0.5890885", "0.5871325", "0.585425...
0.6192641
12
Closes the given file
public void closeFile(File file) throws IOException { BufferedWriter writer = writers.get(file); writer.close(); writers.remove(file); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void closeFile() \r\n {\r\n try // close file and exit\r\n {\r\n if ( input != null )\r\n input.close();\r\n } // end try\r\n catch ( IOException ioException )\r\n {\r\n System.err.println( \"Error closing file.\" );\r\n System.exit( 1 );\r\n ...
[ "0.76881474", "0.76115113", "0.7606387", "0.7248532", "0.71181864", "0.70334643", "0.7029296", "0.7013881", "0.69922453", "0.695177", "0.66060144", "0.6597649", "0.65421486", "0.6394605", "0.6394605", "0.6394605", "0.6394605", "0.6394605", "0.6394605", "0.6394605", "0.6394605...
0.6723434
10
Closes all open files
public void closeAll() throws IOException { for (BufferedWriter writer : writers.values()) { writer.close(); } writers.clear(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void closeFiles() {\n try {\n inputFile.close();\n debugFile.close();\n reportFile.close();\n workFile.close();\n stnFile.close();\n } catch(Exception e) {}\n }", "void closeAll();", "private void closeAll(){\r\n\t\t\r\n\t}", "public voi...
[ "0.79999405", "0.7693239", "0.74204856", "0.7327293", "0.7288266", "0.72837603", "0.68894184", "0.6886775", "0.68061143", "0.678456", "0.6732315", "0.66951287", "0.66904175", "0.6664395", "0.6607096", "0.6602554", "0.6589082", "0.6564879", "0.65190023", "0.65082985", "0.64356...
0.64681435
20
Removes the file with the given name and extension
public boolean deleteFile(String fileName, String fileextension) { File f = getFile(fileName, fileextension); if (f.isFile()) { return f.delete(); } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static String removeFileExtension(String fileName) {\n int endIndex = fileName.lastIndexOf('.');\n if (endIndex != -1) {\n return fileName.substring(0, endIndex);\n } else {\n return fileName;\n }\n }", "private String removeFileExtension(String filenam...
[ "0.69292873", "0.68736726", "0.6644003", "0.6552259", "0.6491383", "0.64830995", "0.6463731", "0.6425611", "0.63115454", "0.6250429", "0.62144476", "0.6212675", "0.6202389", "0.616219", "0.61561894", "0.6114848", "0.61118215", "0.61065", "0.60833615", "0.60810196", "0.607349"...
0.6423053
8
Returns a file object for the given qualified name and fileextension
private File getFile(String fileName, String fileextension) { return new File(outputDir + File.separator + fileName + "." + fileextension); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void retrieveFile(String fileName, String ext);", "public static FileObject findFile (FileObject f, String ext)\n\t{\n\t\tif (f != null)\n\t\t{\n\t\t\tString name = f.getName();\n\t\t\tint index = name.indexOf('$');\n\n\t\t\tif (index > 0)\n\t\t\t\tname = name.substring(0, index);\n\n\t\t\treturn f.getPar...
[ "0.64122057", "0.6390519", "0.628095", "0.60518146", "0.6003196", "0.5967236", "0.59113", "0.59113", "0.59084076", "0.57548404", "0.5699519", "0.56823087", "0.56536347", "0.5653139", "0.5643803", "0.5643803", "0.5606302", "0.55930054", "0.5577908", "0.5574578", "0.55718136", ...
0.5837268
9
/ Adds a new symbol to the current scope.
public void addSymbol(String key, Symbol token) { this.variables.put(key, token); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addSymbol(Symbol symbol) {\n this.symbols.add(symbol);\n symbol.setProject(this);\n }", "public void addEntry(Symbol sym){\n\t\tif(sym == null)\n\t\t\treturn;\n\t\t\n\t\tSymbolEntry se = new SymbolEntry(sym, scopeLevel);\n\t\tif(findEntryGlobal(sym.name) == null){\n\t\t\tList<SymbolE...
[ "0.68872267", "0.67507505", "0.6731153", "0.66870385", "0.66702175", "0.6595892", "0.6595892", "0.6435051", "0.64040875", "0.6249157", "0.6216501", "0.62137604", "0.6198688", "0.6152566", "0.61396486", "0.61377954", "0.6137646", "0.6097125", "0.6067397", "0.6067284", "0.60548...
0.72924703
0
TODO Autogenerated method stub
public static void write(Context context, String key, String value) { SharedPreferences sp = context.getSharedPreferences(Constant.PRE_CSDN_APP, Context.MODE_PRIVATE); sp.edit().putString(key, value).commit(); }
{ "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
public static String readString(Context context, String key) { SharedPreferences sp = context.getSharedPreferences(Constant.PRE_CSDN_APP, Context.MODE_PRIVATE); return sp.getString(key, ""); }
{ "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.66708666", "0.65675074", "0.65229905", "0.6481001", "0.64770633", "0.64584893", "0.6413091", "0.63764185", "0.6275735", "0.62541914", "0.6236919", "0.6223816", "0.62017626", "0.61944294", "0.61944294", "0.61920846", "0.61867654", "0.6173323", "0.61328775", "0.61276996", "0...
0.0
-1
Created by xiepan on 16/8/22.
public interface GankApi { String HOST = "http://gank.io/api/"; /** * @param pagesize * @param page * @return */ @GET("data/福利/{pagesize}/{page}") Observable<GirlData> getGirls(@Path("pagesize") int pagesize, @Path("page") int page); /** * @param pagesize * @param page * @return */ @GET("data/休息视频/{pagesize}/{page}") Observable<VideoData> getVideos(@Path("pagesize") int pagesize, @Path("page") int page); /** * http://gank.io/api/day/2015/08/07 * * @param year * @param month * @param day * @return */ @GET("day/{year}/{month}/{day}") Observable<GankData> getGanks(@Path("year") int year, @Path("month") int month, @Path("day") int day); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "private stendhal() {\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "private static void cajas() {\n\t\t\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpubli...
[ "0.61221045", "0.6026803", "0.59584993", "0.5942983", "0.58962095", "0.588887", "0.588887", "0.58562833", "0.5821367", "0.58212686", "0.58047765", "0.5801397", "0.57970756", "0.57934016", "0.57914203", "0.5790329", "0.5759653", "0.5743118", "0.57392627", "0.5732705", "0.57316...
0.0
-1
Returns the content of this text file as a single string. Line breaks are preserved.
public String asString() { StringBuffer result = new StringBuffer(); for (String line : this) { result.append(line).append('\n'); } return result.toString(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getContent() {\n String s = null;\n try {\n s = new String(Files.readAllBytes(Paths.get(filename)), StandardCharsets.UTF_8);\n }\n catch (IOException e) {\n message = \"Problem reading a file: \" + filename;\n }\n return s;\n }", "p...
[ "0.7880319", "0.7494115", "0.7406195", "0.7161371", "0.71514994", "0.70595276", "0.7019867", "0.7003651", "0.7003651", "0.6993667", "0.698148", "0.6976932", "0.6931102", "0.6906469", "0.6872317", "0.68508685", "0.6841111", "0.6814224", "0.6797495", "0.6796116", "0.6778167", ...
0.6934168
12
Returns whether there are more lines.
public boolean hasNext() { return fNextLine != null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean hasMoreInstances() {\n\t\treturn scanner.hasNextLine();\n\t}", "public boolean hasMoreCommands() {\r\n return in.hasNextLine();\r\n }", "public boolean hasNextLine() {\n return nextLine != null;\n }", "public boolean hasMore() {\n if (currentCursor != null && !NULL.e...
[ "0.76102865", "0.7585178", "0.7574583", "0.736322", "0.7281602", "0.725542", "0.7252403", "0.7179495", "0.7093769", "0.70683867", "0.70508254", "0.70413864", "0.70258236", "0.68961436", "0.68515193", "0.68041015", "0.6791502", "0.6785058", "0.6780333", "0.66987383", "0.668432...
0.71088606
8
Returns the next line.
public String next() { try { String result = fNextLine; if (fNextLine != null) { fNextLine = fIn.readLine(); if (fNextLine == null) { fIn.close(); } } return result; } catch (IOException e) { throw new IllegalArgumentException(e); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private int getNextLine() {\n return peekToken().location.start.line;\n }", "public VCFLine getNextLine () throws IOException {\n\t\tgoNextLine();\n\t\treturn reader.getCurrentLine();\n\t}", "private String getNextLine() throws IOException {\n final BufferedReader in = this.in;\n if (in == null) {\n ...
[ "0.8389935", "0.8107488", "0.802509", "0.7743382", "0.7672626", "0.75529057", "0.74202114", "0.7315213", "0.7312565", "0.7306949", "0.7262156", "0.7192011", "0.71816266", "0.7114123", "0.7042551", "0.7010124", "0.6937143", "0.6687144", "0.6666779", "0.6639501", "0.66371936", ...
0.7613427
5
ctrl.setPuzzleDao(puzzleDao); ctrl.setHelperGenerator(helperGen); loadPage(); generatePuzzle(1, "normal"); Progress progress = ctrl.getProgress(); assertEquals(1, progress.getNormal()); assertEquals(3, progress.getStoredNormal());
@Test public void testNormalPuzzleGeneration() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n\tpublic void testTotalPuzzleGenerated() {\n\t}", "@Test\n public void testGetProgressOfQuestionnaireById(){\n Date dateKey = new Date();\n String userName = \"Regina for president\";\n\n\n User user = new User(userName);\n userDB.insertUser(user);\n\n //add questionn...
[ "0.68420434", "0.6595508", "0.647444", "0.637188", "0.61857307", "0.6175639", "0.61479735", "0.61048734", "0.60998094", "0.60486937", "0.6000847", "0.59683347", "0.59664154", "0.59290916", "0.59280586", "0.58828235", "0.5862413", "0.5857278", "0.583025", "0.58234406", "0.5816...
0.643361
3
ctrl.setPuzzleDao(puzzleDao); ctrl.setHelperGenerator(helperGen); loadPage(); generatePuzzle(1, "hard"); Progress progress = ctrl.getProgress(); assertEquals(1, progress.getHard()); assertEquals(4, progress.getStoredHard());
@Test public void testHardPuzzleGeneration() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n\tpublic void testTotalPuzzleGenerated() {\n\t}", "@Test\n public void testGetProgressOfQuestionnaireById(){\n Date dateKey = new Date();\n String userName = \"Regina for president\";\n\n\n User user = new User(userName);\n userDB.insertUser(user);\n\n //add questionn...
[ "0.6967138", "0.6762316", "0.656981", "0.6412508", "0.62956107", "0.6201085", "0.61662453", "0.61285454", "0.6083066", "0.6035027", "0.6019076", "0.6014069", "0.59826493", "0.5981074", "0.5912356", "0.5910173", "0.5898013", "0.58951277", "0.5881884", "0.5881575", "0.5808985",...
0.64454246
3
ctrl.setPuzzleDao(puzzleDao); ctrl.setHelperGenerator(helperGen); loadPage(); generatePuzzle(1, "evil"); Progress progress = ctrl.getProgress(); assertEquals(1, progress.getEvil()); assertEquals(5, progress.getStoredEvil());
@Test public void testEvilPuzzleGeneration() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n\tpublic void testTotalPuzzleGenerated() {\n\t}", "@Test\n public void testIsSolved() {\n setUpCorrect();\n assertTrue(boardManager.puzzleSolved());\n swapFirstTwoTiles();\n assertFalse(boardManager.puzzleSolved());\n }", "@Test\n public void testGetProgressOfQuestio...
[ "0.7001744", "0.65075743", "0.64745593", "0.6460211", "0.6414467", "0.62727475", "0.62634987", "0.6186106", "0.61715007", "0.6071531", "0.60545504", "0.5973697", "0.5936995", "0.59308493", "0.59301865", "0.59026295", "0.5897931", "0.5888837", "0.5878759", "0.586523", "0.58457...
0.63381344
5
ctrl.setPuzzleDao(puzzleDao); ctrl.setHelperGenerator(helperGen); loadPage(); generatePuzzle(2, "evil"); Progress progress = ctrl.getProgress(); assertEquals(2, progress.getTotal()); assertEquals(2, progress.getEvil()); assertEquals(6, progress.getStoredEvil()); generatePuzzle(3, "evil"); progress = ctrl.getProgress(); assertEquals(3, progress.getTotal()); assertEquals(3, progress.getEvil()); assertEquals(9, progress.getStoredEvil());
@Test public void testTotalPuzzleGenerated() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testGetProgressOfQuestionnaireById(){\n Date dateKey = new Date();\n String userName = \"Regina for president\";\n\n\n User user = new User(userName);\n userDB.insertUser(user);\n\n //add questionnaires\n HADSDQuestionnaire q1 = new HADSDQuestionnair...
[ "0.68430287", "0.6591861", "0.65626925", "0.6486031", "0.6451438", "0.63361156", "0.63088506", "0.63025516", "0.62917525", "0.6251481", "0.6244992", "0.6206476", "0.6196762", "0.61250347", "0.6113678", "0.6092923", "0.6072923", "0.6038766", "0.60251075", "0.59511876", "0.5945...
0.7162598
0
stampare il registro ordinato per data
public String print() { Collections.sort(ordini, Comparator.comparing(o -> o.dataAcquisto)); return ordini.stream() .map(o->o.toString()+"\n") .reduce(String::concat).orElse(""); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setDateOrdered (Timestamp DateOrdered);", "int insert(BpmInstanciaHistorica record);", "public void setDateTrx (Timestamp DateTrx);", "public void setDateTrx (Timestamp DateTrx);", "@Transactional\n DataRistorante insert(DataRistorante risto);", "public void setFechaInsercion(String p) { t...
[ "0.5744472", "0.5628822", "0.56028056", "0.56028056", "0.5601335", "0.55966866", "0.55966866", "0.556211", "0.55150914", "0.5503614", "0.5495126", "0.5480247", "0.54506624", "0.54446894", "0.543884", "0.54169095", "0.5404144", "0.5397883", "0.5381755", "0.5378859", "0.5378101...
0.0
-1
Declaring a Location Manager protected LocationManager locationManager; private final Context mContext = null;
public BankATM() { getLocation(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public GPSManager(Activity context) {\n this.mContext = context;\n //Get the current location\n getLocation();\n }", "private synchronized void initLocation() {\n if (locationManager == null) {\n LocationManager manager =\n (LocationManager) context.getSystemService(Context...
[ "0.7542527", "0.7353045", "0.72733647", "0.70098686", "0.6915131", "0.6769254", "0.6702591", "0.6675654", "0.66699404", "0.66564953", "0.66356415", "0.65962845", "0.6543707", "0.65255094", "0.6521939", "0.65202916", "0.6436812", "0.64028645", "0.63648504", "0.63601744", "0.63...
0.0
-1
Manipulates the map once available. This callback is triggered when the map is ready to be used. This is where we can add markers or lines, add listeners or move the camera. In this case, we just add a marker near Sydney, Australia. If Google Play services is not installed on the device, the user will be prompted to install it inside the SupportMapFragment. This method will only be triggered once the user has installed Google Play services and returned to the app. Function to get latitude
public double getLatitude(){ if(location != null){ latitude = location.getLatitude(); } // return latitude return latitude; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onMapReady(GoogleMap googleMap) {\n Geocoder geoCoder = new Geocoder(getActivity(), Locale.getDefault());\n double lat, lng;\n try {\n List<Address> addresses = geoCoder.getFromLocationName(\"Western Sydney Paramatta, NSW\", 5);\n ...
[ "0.7467034", "0.72152394", "0.71180516", "0.7091597", "0.7035943", "0.7010689", "0.6921798", "0.6900896", "0.6896892", "0.6878912", "0.68537396", "0.6839038", "0.6817563", "0.68011713", "0.6799467", "0.679907", "0.67974794", "0.6778607", "0.6764933", "0.6763946", "0.6762692",...
0.0
-1
Function to get longitude
public double getLongitude(){ if(location != null){ longitude = location.getLongitude(); } // return longitude return longitude; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "long getLongitude();", "double getLongitude();", "Double getLongitude();", "Double getLongitude();", "int getLongitude();", "public int getLon();", "public double longitude() {\n return this.longitude;\n }", "public double getLongitude() {\n if (slon == GempakConstants.IMISSD) {\n r...
[ "0.8602916", "0.853075", "0.8410497", "0.8410497", "0.83965623", "0.8221652", "0.7853045", "0.78060216", "0.77919036", "0.77919036", "0.77500486", "0.76826", "0.7644077", "0.7633809", "0.7633809", "0.7633809", "0.7633809", "0.7632238", "0.7624257", "0.76031595", "0.76031595",...
0.76840246
12
show all transaction, both expenses and incomes
@RequestMapping(value = {"/", "/transactions"}) public String listAllTransactions(Model model) { // fetch one user and transactions for that user UserDetails user = (UserDetails) SecurityContextHolder.getContext() .getAuthentication().getPrincipal(); String username = user.getUsername(); User currentUser = userRepo.findByUsername(username); model.addAttribute("transactions", traRepo.findByUser(currentUser)); List<Transaction> traList = traRepo.findByUser(currentUser); double sum = 0; for(int i = 0; i < traList.size(); i++) { if(traList.get(i).getType().getName() == "income") { sum += traList.get(i).getAmount(); } if(traList.get(i).getType().getName() == "expense") { sum -= traList.get(i).getAmount(); } } model.addAttribute("sum", sum); return "transactions"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic List<Transaction> getAllTransactions() { \n\t\t/* begin transaction */ \n\t\tSession session = getCurrentSession(); \n\t\tsession.beginTransaction();\n\n\t\tQuery query = session.createQuery(\"from Transaction\");\n\t\tList<Transaction> expenses = query.list();\n\n\t\t/* commit */ \n\t\tsession...
[ "0.70571303", "0.69154996", "0.6815832", "0.6202376", "0.6056593", "0.59512526", "0.59445953", "0.58748937", "0.5863861", "0.58403707", "0.5817507", "0.5791707", "0.57826364", "0.57704395", "0.57418025", "0.57327694", "0.5648704", "0.5638135", "0.5612717", "0.56076103", "0.56...
0.65607506
3
RESTful show all transactions
@GetMapping("/rest") public @ResponseBody List<Transaction> transactionsListRest() { UserDetails user = (UserDetails) SecurityContextHolder.getContext() .getAuthentication().getPrincipal(); String username = user.getUsername(); User currentUser = userRepo.findByUsername(username); return (List<Transaction>) traRepo.findByUser(currentUser); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Collection<Transaction> getAllTransactions();", "public List<TransactionInfo> getAll() {\n return transactions;\n }", "@GET\n @Path(\"account/transactions/{account_id}\")\n public Response getAccountTransactions(@PathParam(\"account_id\") \n String accountId) {\n \n ...
[ "0.7343916", "0.7313739", "0.7094882", "0.70655245", "0.6966181", "0.6874268", "0.68548983", "0.68515366", "0.68286467", "0.675592", "0.67163485", "0.6679181", "0.66709626", "0.65883905", "0.6526077", "0.6523126", "0.6518794", "0.6513581", "0.64999866", "0.6484475", "0.645651...
0.7898975
0
RESTful to get a transaction by id
@GetMapping("/rest/{id}") public @ResponseBody Optional<Transaction> findTranscationRest(@PathVariable("id") Long transactionId) { UserDetails user = (UserDetails) SecurityContextHolder.getContext() .getAuthentication().getPrincipal(); String username = user.getUsername(); User currentUser = userRepo.findByUsername(username); List<Transaction> transactions = traRepo.findByUser(currentUser); for(int i = 0; i < transactions.size(); i++) { if(transactions.get(i).getId() == transactionId) { transactionId = transactions.get(i).getId(); return traRepo.findById(transactionId); } } return Optional.empty(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Transaction getById(String id) throws Exception;", "@RequestMapping(value = \"/transactionservice/transaction/{transaction_id}\", method=RequestMethod.GET, produces = \"application/json\")\n\t@ResponseBody\n\tpublic Transaction getTransaction(@PathVariable long transaction_id) {\n\t\tif(transactions.size(...
[ "0.8072414", "0.8043043", "0.7943884", "0.7901474", "0.78758115", "0.7616917", "0.72370726", "0.72348803", "0.71285486", "0.71146595", "0.6763936", "0.67109084", "0.66835016", "0.66438895", "0.6592482", "0.6445179", "0.64408946", "0.6436088", "0.63996035", "0.63264394", "0.63...
0.7733206
5
Program to print duplicate characters from String
public static void main(String[] args) { String s1 = "ShivaniKashyap"; char[] chararray = s1.toCharArray(); LinkedHashSet set = new LinkedHashSet(); LinkedHashSet newset = new LinkedHashSet(); for(int i=0;i<chararray.length;i++) { if( !set.add(chararray[i])) { newset.add(chararray[i]); } } System.out.println(newset); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void printDuplicateCharacters(String word) {\r\n\t\tchar[] characters = word.toCharArray();\r\n\t\t// build HashMap with character and number of times they appear in\r\n\t\tMap<Character, Integer> charMap = new HashMap<Character, Integer>();\r\n\t\tfor (Character ch : characters) {\r\n\t\t\tif (charM...
[ "0.77955973", "0.75362986", "0.7472098", "0.74583554", "0.7041078", "0.70400685", "0.6992629", "0.6974", "0.6942372", "0.6941117", "0.69199234", "0.6822728", "0.68100065", "0.67804503", "0.6768279", "0.67497975", "0.67437696", "0.67210597", "0.66532344", "0.6636021", "0.66312...
0.0
-1
CalendarFrame constructor initializes the model, view, and controller. Sets the window size and the layouts of its components.
public CalendarFrame() { model = new Model(); controller = new ControllerPanel(model); view = new MonthlyView(model); model.attach(view); this.setSize(1500, 700); add(controller, BorderLayout.NORTH); add(view, BorderLayout.CENTER); setBackground(Color.WHITE); setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); // pack(); setVisible(true); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "CalendarFrame(EventModel eM) {\n\t\tsetDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tsetTitle(\"CS151Project\");\n\t\tsetSize(1200, 400);\n\t\tsetVisible(true);\n\t\tsetLayout(new GridLayout(1, 2));\n\t\taddWindowListener(new WindowAdapter()\n\t\t{\n\t\t public void windowClosing(WindowEvent e)\n\t\t {\n...
[ "0.725563", "0.69392174", "0.6462917", "0.6291406", "0.62775415", "0.62755287", "0.615286", "0.61296856", "0.6107129", "0.6096308", "0.60946196", "0.60836804", "0.6071087", "0.6058572", "0.6056666", "0.60072803", "0.5996306", "0.59822255", "0.59422046", "0.59359145", "0.59176...
0.85189754
0
Created by nacheteam on 19/06/16.
public interface HashtagsPresenter { void onResume(); void onPause(); void onDestroy(); void getHashtagsTweets(); void onEventMainThread(HashtagsEvent event); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}"...
[ "0.61339265", "0.6070707", "0.5968594", "0.58937716", "0.5857141", "0.5857141", "0.584032", "0.5835843", "0.5833992", "0.58150893", "0.58018553", "0.58001566", "0.579935", "0.5763064", "0.5736162", "0.57359016", "0.57359016", "0.57359016", "0.57359016", "0.57359016", "0.57283...
0.0
-1
Factory method to create a Props.
public static Props props( final TcpSink sink, final String serverAddress, final int serverPort, final int maximumQueueSize, final Duration exponentialBackoffBase) { return Props.create(TcpSinkActor.class, sink, serverAddress, serverPort, maximumQueueSize, exponentialBackoffBase); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static Props props () {\n return Props.create(Parent.class);\n }", "Property createProperty();", "public static Props getProps() {\n return Props.create((PrinterActor.class));\n }", "static public Props props(ActorRef printerActor) {\n return Props.create(Greeter.class, () ...
[ "0.6549677", "0.6425793", "0.6356117", "0.62144315", "0.59490526", "0.59369767", "0.59348184", "0.58726674", "0.58595735", "0.57939583", "0.57490724", "0.574084", "0.5678737", "0.55997086", "0.55724937", "0.55145633", "0.5506356", "0.54991746", "0.54492307", "0.5448262", "0.5...
0.0
-1
Generate a Steno log compatible representation.
@LogValue public Object toLogValue() { return LogValueMapFactory.builder(this) .put("sink", _sink) .put("serverAddress", _serverAddress) .put("serverPort", _serverPort) .put("exponentialBackoffBase", _exponentialBackoffBase) .build(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void serializeLogs();", "public String createLogInfo() {\n String res = TXN_ID_TAG + REGEX + this.txnId + \"\\n\" +\n TXN_STATUS_TAG + REGEX + this.txnStatus + \"\\n\";\n if (this.readKeyList != null && this.readKeyList.length != 0) {\n for (String readKey : this.readKeyList) {\n ...
[ "0.5388578", "0.53861076", "0.53587687", "0.5304039", "0.52779156", "0.5241724", "0.52018315", "0.5200442", "0.5182392", "0.51234555", "0.51171213", "0.510639", "0.5072024", "0.49421206", "0.4900127", "0.48710182", "0.48556814", "0.48517227", "0.48299983", "0.48141208", "0.48...
0.44934416
63