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 |
|---|---|---|---|---|---|---|
Creates a new main menu. Accepts a MenuLoader, which is the only class that can instantiate a menu. If you are seeing this message, chances are that you are trying to create a menu. And you're probably scratching your head as to why you cannot. Try using MenuLoader.loadDesiredMenu(); | public AbstractMenu(MenuLoader menuLoader)
{} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void createMenu(Menu menu) {\n\r\n\t}",
"public Menu() {\n mainMenuScene = createMainMenuScene();\n mainMenu();\n }",
"public Menu createToolsMenu();",
"public JMTMenuBar createMenu() {\r\n \t\tJMTMenuBar menu = new JMTMenuBar(JMTImageLoader.getImageLoader());\r\n \t\t// File men... | [
"0.6902118",
"0.6862176",
"0.67329264",
"0.66652304",
"0.6604853",
"0.65961945",
"0.6582448",
"0.6541095",
"0.6496525",
"0.648083",
"0.6476082",
"0.6427426",
"0.6417077",
"0.6306744",
"0.6294147",
"0.62806654",
"0.6264738",
"0.62550455",
"0.6223455",
"0.61975807",
"0.619306",... | 0.7628065 | 0 |
This is the entry point for your menu. It should print any welcoming messages, and start the IO for the user. Do NOT create a new Scanner for input! Use the GameInput class. | abstract void mainPrompt(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"static void mainmenu() {\n\t\t\n\t\tSystem.out.println(\"Welcome. This is a rogue-like text-based RPG game.\");\n\t\tEngine.sleep(1);\n\t\tSystem.out.println(\"You control your character by entering your desired action when prompted.\");\n\t\tEngine.sleep(1);\n\t\tSystem.out.println(\"Do you want to start your jou... | [
"0.777672",
"0.7414971",
"0.7386713",
"0.7261561",
"0.7170366",
"0.7147421",
"0.7126227",
"0.7114693",
"0.70996004",
"0.70717204",
"0.7046556",
"0.7034331",
"0.7016329",
"0.70133287",
"0.7006609",
"0.6990945",
"0.6946246",
"0.69342893",
"0.6893438",
"0.6874484",
"0.68521583",... | 0.0 | -1 |
This is the closing point for your menu. It should close any resources, finalize any score and do any last minute output that is needed. As soon as this function is done, the next menu will immediately take over output. | abstract void onDestroy(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void close() {\r\n this.dispose();\r\n MainClass.gamesPlayed++;\r\n Examples2018.menu();\r\n }",
"@Override\n\t\tpublic void closeMenu() {\n\t\t}",
"static void mainMenu ()\r\n \t{\r\n \t\tfinal byte width = 45; //Menu is 45 characters wide.\r\n \t\tString label [] = {\"Welcome... | [
"0.7513997",
"0.7030659",
"0.6842224",
"0.6764041",
"0.6704599",
"0.6679449",
"0.6674703",
"0.6673418",
"0.65675443",
"0.6565517",
"0.653358",
"0.64343894",
"0.64278626",
"0.64267683",
"0.6421825",
"0.63855606",
"0.63154167",
"0.6309757",
"0.6291154",
"0.62738955",
"0.6266312... | 0.0 | -1 |
This method will automatically be called when MazeTest is run | public static void main(String args[]) {
Maze newMaze = new Maze(2,0);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void generateMaze() {\n if (this.stateOfTheMaze != 0)\n throw new IllegalArgumentException(\"To generate the maze the state of it must be \\\"untouched grid\\\".\");\n Stack<Box> stack = new Stack<>();\n Random random = new Random();\n int randomRow = random.nextInt(th... | [
"0.7121795",
"0.7101309",
"0.70867443",
"0.7084803",
"0.7043575",
"0.7008705",
"0.6999273",
"0.69788677",
"0.6977872",
"0.69774425",
"0.6938993",
"0.68993306",
"0.6897856",
"0.6880512",
"0.6869096",
"0.6856799",
"0.68391955",
"0.6828532",
"0.67778796",
"0.67244726",
"0.671805... | 0.0 | -1 |
note that arguments in concat appender are switched against normal | @Test
void appendTest() {
var map = mock(SqlBuiltInMap.class);
var builder = new DefaultSqlBuilder(SqlLiteralTypeHandlerMap.getDefaultMap(), map);
var concatAppender = SqlRecursiveAppender.forTemplate("{0}||{1}", EXPR_ADD, EXPR_ADD);
concatAppender.append(
List.of(SqlRecursiveAppenderTest::appendArg0, SqlRecursiveAppenderTest::appendArg1,
SqlRecursiveAppenderTest::appendArg2), builder);
assertThat(builder.getSql()).isEqualTo("?||??||?");
assertThat(builder.getBindsWithPos())
.containsExactlyInAnyOrder(new BindWithPos(bindName1, Integer.class, List.of(1, 2)),
new BindWithPos(bindName2, String.class, List.of(3, 4)));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Concat createConcat();",
"@Override\n\tpublic void visit(Concat arg0) {\n\n\t}",
"@Override\n\tpublic void visit(Concat arg0) {\n\t\t\n\t}",
"public static void main(String[] args) {\n //StringCircularBuffer buffer = new StringCircularBuffer(10);\n CircularBuffer buffer = new CircularBuffer(10)... | [
"0.61676645",
"0.6159063",
"0.6156616",
"0.59042704",
"0.5733877",
"0.5707676",
"0.56922317",
"0.5644115",
"0.5624967",
"0.56196696",
"0.54603666",
"0.5396155",
"0.53920686",
"0.5361598",
"0.5311643",
"0.5311065",
"0.5302223",
"0.52896816",
"0.524389",
"0.5236153",
"0.5196872... | 0.4510107 | 95 |
note that arguments in concat appender are switched against normal | @Test
void appendSwitchedTest() {
var map = mock(SqlBuiltInMap.class);
var builder = new DefaultSqlBuilder(SqlLiteralTypeHandlerMap.getDefaultMap(), map);
var concatAppender = SqlRecursiveAppender.forTemplate("{1}||{0}", EXPR_ADD, EXPR_ADD);
concatAppender.append(
List.of(SqlRecursiveAppenderTest::appendArg0, SqlRecursiveAppenderTest::appendArg1,
SqlRecursiveAppenderTest::appendArg2), builder);
assertThat(builder.getSql()).isEqualTo("?||??||?");
assertThat(builder.getBindsWithPos())
.containsExactlyInAnyOrder(new BindWithPos(bindName1, Integer.class, List.of(2, 4)),
new BindWithPos(bindName2, String.class, List.of(1, 3)));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Concat createConcat();",
"@Override\n\tpublic void visit(Concat arg0) {\n\n\t}",
"@Override\n\tpublic void visit(Concat arg0) {\n\t\t\n\t}",
"public static void main(String[] args) {\n //StringCircularBuffer buffer = new StringCircularBuffer(10);\n CircularBuffer buffer = new CircularBuffer(10)... | [
"0.61653453",
"0.61589706",
"0.61566526",
"0.59029543",
"0.5731843",
"0.5706313",
"0.5691235",
"0.5643953",
"0.56241155",
"0.56188",
"0.5458595",
"0.5394446",
"0.5391954",
"0.5360877",
"0.53112394",
"0.53103995",
"0.5302658",
"0.5287964",
"0.5243195",
"0.52365047",
"0.5194784... | 0.45158094 | 91 |
Returns a list of students objects from the search results | private List<Student> getStudentList(StudentSearchResponse srchResponse) {
List<Student> studentList = new ArrayList<Student>();
if (srchResponse != null && srchResponse.size() > 0) {
for (StudentSearchResult srchRes : srchResponse) {
Student std = new Student(srchRes.getInquiryId(),
srchRes.getStudentNumber(), srchRes.getFirstName(),
srchRes.getLastName(), srchRes.getMaidenName(),
srchRes.getDateOfBirth(), srchRes.getCity(),
srchRes.getStateProvince(), srchRes.getSSN());
studentList.add(std);
}
}
return studentList;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public List <Student> getAllStudents();",
"public List<Student> search() {\n \tQuery query = em.createQuery(\"Select e FROM Student e WHERE e.grade > 50.00\");\r\n \tList<Student> result = query.getResultList();\r\n \t\r\n \t \r\n \t// Query for a List of data elements.\r\n// \tQuery query = em... | [
"0.7324042",
"0.7313701",
"0.72825235",
"0.70650697",
"0.689222",
"0.68712395",
"0.68306744",
"0.6785665",
"0.67383045",
"0.67269313",
"0.6680644",
"0.6650961",
"0.66500044",
"0.6605244",
"0.6588344",
"0.6578396",
"0.65648645",
"0.6553648",
"0.65371424",
"0.65343106",
"0.6521... | 0.751041 | 0 |
Retrieves the studentProgramnformation details from the CRM System | @Override
public List<StudentProgramInfo> getStudentProgramInformation(
Student studentSearchDTO) throws StudentServiceException {
ProgramOfStudyResponse programOfStudyResponse =studentSearchClient.getProgramsOfStudy(studentSearchDTO);
return getStudentProgramInfoList(programOfStudyResponse,studentSearchDTO);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic StudentProgramInfo getActiveStudentProgramInformation(Student studentSearchDTO) throws StudentServiceException {\r\n\t\tList<StudentProgramInfo> studentProgramInfoList = getStudentProgramInformation(studentSearchDTO);\r\n\t\tStudentProgramInfo stdProgramInfo= new StudentProgramInfo();\r\n\t\t... | [
"0.72754425",
"0.7115269",
"0.59734595",
"0.59322554",
"0.58393073",
"0.58069944",
"0.5678991",
"0.56199026",
"0.56190443",
"0.559815",
"0.5535801",
"0.55298895",
"0.549482",
"0.5493392",
"0.54692686",
"0.5444203",
"0.5441649",
"0.5421103",
"0.5411611",
"0.5407474",
"0.539494... | 0.7177861 | 1 |
Converts the ProgramOfStudentResponse to studentProgramInfo list and returns it | private List<StudentProgramInfo> getStudentProgramInfoList(
ProgramOfStudyResponse programOfStudyResponse,Student student) {
List<StudentProgramInfo> studentProgramList = new ArrayList<StudentProgramInfo>();
SimpleDateFormat dateFormat =new SimpleDateFormat("MM/dd/yyyy");
if(programOfStudyResponse!=null && programOfStudyResponse.size()>0){
for(ProgramOfStudy pos:programOfStudyResponse){
StudentProgramInfo stdProgramInfo = new StudentProgramInfo();
stdProgramInfo.setProgramOfStudyId(pos.getProgramOfStudyId());
stdProgramInfo.setEnrollmentStatus(pos.getEnrollmentStatus());
stdProgramInfo.setProgramCode(pos.getProgramCode());
stdProgramInfo.setProgramVersionCode(pos.getProgramVersionCode());
//Using ProgramVersion from the service for the programName
stdProgramInfo.setProgramName(pos.getProgramVersion());
stdProgramInfo.setStudentCrmId(student.getCrmId());
stdProgramInfo.setProgramOfStudyStatus(pos.getProgramOfStudyStatus());
if(pos.getExpectedStartDate()!=null){
try {
stdProgramInfo.setExpectedStartDate(dateFormat.parse(pos.getExpectedStartDate()));
} catch (ParseException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
//
//need to see how to get catalogcode and state code
studentProgramList.add(stdProgramInfo);
}
}else{
/*TODO: ADDING THIS BECAUSE THERE ARE PLACES WE ARE JUST ASSUMING PROGRAM IS AVAILABLE. FIX ME */
StudentProgramInfo stdProgramInfo= new StudentProgramInfo();
stdProgramInfo.setProgramOfStudyId("N/A");
stdProgramInfo.setEnrollmentStatus("N/A");
stdProgramInfo.setProgramCode("N/A");
stdProgramInfo.setProgramVersionCode("N/A");
//Using ProgramVersion from the service for the programName
stdProgramInfo.setProgramName("N/A");
//stdProgramInfo.setStudentCrmId(student.getCrmId());
//stdProgramInfo.setProgramOfStudyStatus(pos.getProgramOfStudyStatus());
//stdProgramInfo.setExpectedStartDate(pos.getExpectedStartDate());
//need to see how to get catalogcode and state code
studentProgramList.add(stdProgramInfo);
}
return studentProgramList;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic List<StudentProgramInfo> getStudentProgramInformation(\r\n\t\t\tStudent studentSearchDTO) throws StudentServiceException {\t\t\t\r\n\t\t ProgramOfStudyResponse programOfStudyResponse =studentSearchClient.getProgramsOfStudy(studentSearchDTO);\r\n return getStudentProgramInfoList(prog... | [
"0.66195995",
"0.6040349",
"0.56060386",
"0.55193853",
"0.54074055",
"0.5370921",
"0.52284193",
"0.5217565",
"0.5204037",
"0.5188421",
"0.51863545",
"0.50882906",
"0.5070527",
"0.50648",
"0.5037199",
"0.5037199",
"0.50320005",
"0.50260276",
"0.4998604",
"0.49813762",
"0.49500... | 0.78665966 | 0 |
Creates a new Student Record in the database | @Override
public Student createOrUpdateStudentRecord(Student student) {
studentDAO.addStudent(student);
return student;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic void create(Student student) {\n\t\tString query=\"insert into student values('\"+student.getId()+\"','\"+student.getName()+\"','\"+student.getAge()+\"')\";\n\t//\tjdbcTemplate.update(query);\n\t\tint result=jdbcTemplate.update(query);\n\t\tSystem.out.println(result+\"Record Inserted\");\n\t}",... | [
"0.77535623",
"0.76777387",
"0.7666303",
"0.76322913",
"0.75116664",
"0.7317072",
"0.7255967",
"0.7180633",
"0.71661466",
"0.71413505",
"0.71180135",
"0.7103421",
"0.71029294",
"0.71029294",
"0.71029294",
"0.7084616",
"0.69511485",
"0.69493896",
"0.69415456",
"0.69385576",
"0... | 0.73616785 | 5 |
Returns the program information that is closest to being the most Active program from the list retrieved by CRM If it does not find the student Program that has an active enrollment status, it displays the first program | @Override
public StudentProgramInfo getActiveStudentProgramInformation(Student studentSearchDTO) throws StudentServiceException {
List<StudentProgramInfo> studentProgramInfoList = getStudentProgramInformation(studentSearchDTO);
StudentProgramInfo stdProgramInfo= new StudentProgramInfo();
if(studentProgramInfoList.size()>0){
for(StudentProgramInfo stdProgInfo : studentProgramInfoList) {
String enrollmentStatus = stdProgInfo.getEnrollmentStatus();
if(enrollmentStatus!=null && (enrollmentStatus.equalsIgnoreCase("Active") ||enrollmentStatus.equalsIgnoreCase("Conditionally Accepted") )) {
return stdProgInfo;
}
}
return studentProgramInfoList.get(0);
}
stdProgramInfo.setProgramOfStudyId("N/A");
stdProgramInfo.setEnrollmentStatus("N/A");
stdProgramInfo.setProgramCode("N/A");
stdProgramInfo.setProgramVersionCode("N/A");
//Using ProgramVersion from the service for the programName
stdProgramInfo.setProgramName("N/A");
stdProgramInfo.setStateCode("N/A");
stdProgramInfo.setCatalogCode("N/A");
//stdProgramInfo.setStudentCrmId(student.getCrmId());
//stdProgramInfo.setProgramOfStudyStatus(pos.getProgramOfStudyStatus());
//stdProgramInfo.setExpectedStartDate(pos.getExpectedStartDate());
//need to see how to get catalogcode and state code
return stdProgramInfo;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic List<TblProgram> displayProgram(int idProgram) {\n\t\tList<TblProgram> program = null;\n\t\t\n\t\tSession session = HibernateUtils.getSessionFactory().getCurrentSession();\n\t\t\n\t\ttry {\n\t\t\tsession.getTransaction().begin();\n\t\t\tString hql = \"from TblProgram where idProgram = :idProg... | [
"0.55650896",
"0.53705513",
"0.5249872",
"0.51837754",
"0.50480855",
"0.50479794",
"0.50149596",
"0.50149465",
"0.5011698",
"0.49644732",
"0.496308",
"0.49129286",
"0.48904365",
"0.48825964",
"0.48484498",
"0.4798866",
"0.47907057",
"0.47799218",
"0.47540307",
"0.47451025",
"... | 0.5851343 | 0 |
Inflate the menu; this adds items to the action bar if it is present. | @Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.valits, menu);
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tMenuInflater inflater = getMenuInflater();\n \tinflater.inflate(R.menu.main_activity_actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {... | [
"0.7246102",
"0.7201358",
"0.7194834",
"0.7176498",
"0.71066517",
"0.7039537",
"0.7037961",
"0.70112145",
"0.70094734",
"0.69807225",
"0.6944953",
"0.69389373",
"0.6933199",
"0.6916928",
"0.6916928",
"0.6891486",
"0.68831646",
"0.68754137",
"0.68745375",
"0.68621665",
"0.6862... | 0.0 | -1 |
This launches the activity to record keypresses for a new test. | public void recordSteps(View v) {
Intent intent = new Intent(this, RecordingActivity.class);
int position = (Integer) v.getTag();
intent.putExtra("Test value", testList);
intent.putExtra("int value", position);
startActivity(intent);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void captureKeyListener() {\n // retrive the edittext component\n mEdit = (EditText) findViewById(R.id.task_input);\n \n // add a keylistener to keep track user input\n mEdit.setOnKeyListener(new OnKeyListener(){\n public boolean onKey(View v, int keyCode, KeyEvent ... | [
"0.6256567",
"0.5799084",
"0.570836",
"0.5644987",
"0.55826026",
"0.55717826",
"0.55387497",
"0.54483575",
"0.5447003",
"0.5432881",
"0.54134077",
"0.540858",
"0.5378554",
"0.5355479",
"0.5351305",
"0.5347625",
"0.5309508",
"0.53035975",
"0.5299312",
"0.52880996",
"0.52719706... | 0.5327153 | 16 |
This deletes the test we have selected. | public void deleteTest(View v) {
int value = (Integer) v.getTag();
testList.remove(value);
Intent intent = new Intent(this, Tests.class);
intent.putExtra("Test value", testList);
intent.putExtra("int value", 0);
startActivity(intent);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void removeTestCase(){\n\t\tgetSelectedPanel().removeSelectedTestCase(); \n\t}",
"private void delete(){\n solo.waitForView(R.id.search_action_button);\n solo.clickOnView(solo.getView(R.id.search_action_button));\n\n //Click on search bar\n SearchView searchBar = (SearchView) s... | [
"0.7828388",
"0.6935423",
"0.6914939",
"0.6600997",
"0.65520746",
"0.6473435",
"0.6465623",
"0.6280839",
"0.6240626",
"0.6185585",
"0.61738384",
"0.61518407",
"0.6124644",
"0.611178",
"0.6096481",
"0.6085337",
"0.6077076",
"0.60677546",
"0.6060347",
"0.6049268",
"0.604361",
... | 0.63507116 | 7 |
This launches the editing mechanism for the test selected. | public void editTest(View v) {
int value = (Integer) v.getTag();
Intent intent = new Intent(this, EditTestActivity.class);
intent.putExtra("Test value", testList);
intent.putExtra("int value", value);
startActivity(intent);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void clickEdit() {\r\n\t\tEdit.click();\r\n\t}",
"@Override\n\t\t\tpublic void run() {\n\t\t\t\ttry {\n\t\t\t\t\tIWorkbenchPage page = getPage();\n\t\t\t\t\tJasmineEditorInput input = new JasmineEditorInput(specRunner, name);\n\t\t\t\t\tpart.add(page.openEditor(input, ID));\n\t\t\t\t} catch (Exception e) ... | [
"0.7029788",
"0.68246573",
"0.67594963",
"0.6643187",
"0.65716136",
"0.6557901",
"0.652629",
"0.6453588",
"0.6428956",
"0.6420972",
"0.63847893",
"0.6381529",
"0.6371899",
"0.6318979",
"0.63027453",
"0.62343353",
"0.621415",
"0.6203568",
"0.61898524",
"0.61167514",
"0.6108793... | 0.0 | -1 |
Handle presses on the action bar items | @Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case R.id.createtest:
createTest();
return true;
case R.id.details:
GoToTestDetails();
return true;
case R.id.gomain:
GoToMain();
return true;
default:
return super.onOptionsItemSelected(item);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // Handle presses on the action bar items\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n case R.id.action_clear:\n ret... | [
"0.7173379",
"0.69227743",
"0.69227743",
"0.69227743",
"0.69227743",
"0.6911944",
"0.6884609",
"0.6881586",
"0.68243235",
"0.68193024",
"0.68051094",
"0.6801348",
"0.678705",
"0.678705",
"0.67608094",
"0.67543995",
"0.6754033",
"0.674645",
"0.67355984",
"0.6727317",
"0.672570... | 0.0 | -1 |
This goes to the TestDetails activity. | public void GoToTestDetails() {
Intent intent = new Intent(this, TestDetails.class);
intent.putExtra("Test value", testList);
startActivity(intent);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void goTestActivity()\n\t {\n\t }",
"@Test\n public void openTaskDetails_startsActivity() {\n String taskId = \"id\";\n\n // When opening the task details\n mTasksNavigator.openTaskDetails(taskId);\n\n // The AddEditTaskActivity is opened with the correct request code\n ... | [
"0.7293577",
"0.7178242",
"0.67626023",
"0.67626023",
"0.6581676",
"0.6520456",
"0.651035",
"0.64544445",
"0.6401497",
"0.6371073",
"0.6326098",
"0.6312389",
"0.6300154",
"0.6294609",
"0.6278158",
"0.6267996",
"0.62468475",
"0.6246014",
"0.62197244",
"0.6176565",
"0.6149429",... | 0.82838815 | 0 |
This navigates back to the Main menu. | public void GoToMain() {
Intent intent = new Intent(this, MainActivity.class);
intent.putExtra("Test value", testList);
startActivity(intent);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void backToMenu()\n\t{\n\t\t//switch to menu screen\n\t\tgame.setScreen(new MenuScreen(game));\n\t}",
"default public void clickBack() {\n\t\tclickMenu();\n\t}",
"private void backToMenu() {\n game.setScreen(new StartScreen(game));\n }",
"private void backToMain() {\n // https://stac... | [
"0.8205697",
"0.7976754",
"0.7959465",
"0.78792375",
"0.7860691",
"0.78032166",
"0.7753926",
"0.7739716",
"0.76505363",
"0.7590818",
"0.7571074",
"0.75514764",
"0.75463074",
"0.7535688",
"0.7523993",
"0.7517856",
"0.743077",
"0.74253565",
"0.74184096",
"0.7367284",
"0.7355563... | 0.0 | -1 |
This goes to the Create Test Activity to create a new test. | public void createTest() {
Intent intent = new Intent(this, Settings.class);
intent.putExtra("Test value", testList);
startActivity(intent);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void createTestCase(String testName) {\r\n\t\tif (!active) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tif (testName == null || testName.isEmpty()) {\r\n\t\t\tthrow new ConfigurationException(\"testName must not be null or empty\");\r\n\t\t}\r\n\t\t\r\n\t\tif (applicationId == null) {\r\n\t\t\tcreateApplication();\r\... | [
"0.6880964",
"0.6669358",
"0.6460912",
"0.6460912",
"0.64581674",
"0.64460427",
"0.63986343",
"0.63835645",
"0.634486",
"0.62875044",
"0.6274958",
"0.6260409",
"0.62501556",
"0.62412834",
"0.6239959",
"0.61911565",
"0.61611456",
"0.61533546",
"0.6138206",
"0.612402",
"0.60846... | 0.0 | -1 |
Receives the recorded sampler from the proxy server for placing in the test tree. param serverResponse to be added to allow saving of the server's response while recording. A future consideration. | @Override
public void deliverSampler(HTTPSamplerBase sampler, TestElement[] subConfigs, SampleResult result) {
deliverer.deliverSampler(sampler, subConfigs, result);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void passSetupResponseToClient( RtspResponse response )\n\t{\n\t\t// If there isn't yet an rtspSession, create a new one\n\t\tRtspSession rtspSession = RtspSession.get( response.getHeader( \"Session\" ) );\n\t\tif ( rtspSession == null ) {\n\t\t\trtspSession = (RtspSession) clientSession.getAttribute( \"rts... | [
"0.55406463",
"0.5385709",
"0.53235465",
"0.5321029",
"0.5304282",
"0.51871455",
"0.51815563",
"0.5114342",
"0.5092172",
"0.5078635",
"0.506904",
"0.50376785",
"0.50376785",
"0.50109494",
"0.49999243",
"0.49967235",
"0.49801737",
"0.4975506",
"0.49620578",
"0.4954736",
"0.494... | 0.48727322 | 31 |
TODO Autogenerated method stub | public static void main(String[] args) {
CountDownTask task1=new CountDownTask();
CountDownTask task2=new CountDownTask();
Thread t1=new Thread(task1);
Thread t2=new Thread(task2);
t1.start();
t2.start();
ThreadUtils.println("Program Ends");
} | {
"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 void main(String[] args) {
int[]a=new int[10];
for(int i=0;i<a.length;++i){
a[i]=i;
}
print(a,0);
System.out.println();
System.out.println(sum(a,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.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 |
Store user info in Session. | public static void storeLoginedUser(HttpSession session, UserAccount loginedUser) {
// On the JSP can access via ${loginedUser}
session.setAttribute("loginedUser", loginedUser);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void store() {\n session=(HttpSession)getPageContext().getSession();\n session.setAttribute(\"remoteUser\", getRemoteUser());\n session.setAttribute(\"authCode\", getAuthCode());\n }",
"public void storeSession(@NonNull User user){\n //calls storeUser method with mUser as ar... | [
"0.7506059",
"0.72475994",
"0.6936395",
"0.68270093",
"0.68102485",
"0.6620509",
"0.6582185",
"0.64104074",
"0.6400165",
"0.638996",
"0.63318896",
"0.6319351",
"0.6308271",
"0.6267458",
"0.62609047",
"0.624775",
"0.62227774",
"0.61799353",
"0.6174431",
"0.6174366",
"0.6162905... | 0.6824034 | 4 |
Get the user information stored in the session. | public static UserAccount getLoginedUser(HttpSession session) {
UserAccount loginedUser = (UserAccount) session.getAttribute("loginedUser");
return loginedUser;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected User getUser(HttpSession session) {\r\n\t\t// get the user form from the session\r\n\t\treturn (User) session.getAttribute(Constants.USER_KEY);\r\n\t}",
"@RequestMapping(value = \"get_user_info.do\",method = RequestMethod.POST)\r\n @ResponseBody\r\n public ServerResponse<User> getInfo(HttpSession... | [
"0.7691387",
"0.7570685",
"0.75530046",
"0.74176943",
"0.7414509",
"0.7414385",
"0.73238516",
"0.7182342",
"0.71476024",
"0.7125628",
"0.7112697",
"0.706653",
"0.7046915",
"0.70138",
"0.70011735",
"0.70007026",
"0.69955504",
"0.69807166",
"0.69574803",
"0.69533813",
"0.695338... | 0.656526 | 89 |
Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: mx.babel.bansefi.banksystem.personas.webservices.relacioncliente.bajagrupo | public ObjectFactory() {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Foco createFoco();",
"protected ContaCapitalCadastroDaoFactory() {\n\t\t\n\t}",
"public ObjectFactory() {}",
"public ObjectFactory() {}",
"public ObjectFactory() {}",
"public static MovimentiCcService creaOggettoServiceImpl() {\n\t\tMovimentiCcServiceImpl serviceImpl = new MovimentiCcServiceImpl();\r\n\t... | [
"0.6260951",
"0.6053005",
"0.60503733",
"0.60503733",
"0.60503733",
"0.60455287",
"0.6020114",
"0.5924696",
"0.5920455",
"0.5915721",
"0.5896229",
"0.5886271",
"0.58739597"
] | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public int getRewardsLength() {
return 0;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.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 |
TODO Autogenerated method stub | @Override
public int getRewardPrice(int i) {
return 0;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.608016... | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public void makePayment(Payment p, int amount) {
} | {
"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 Payments getPayments() {
return null;
} | {
"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 String getTitle() {
return null;
} | {
"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 |
TODO Autogenerated method stub | @Override
public String getShortDescr() {
return null;
} | {
"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 String shortProjectDescr() {
return null;
} | {
"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 |
gets credentials of user | private void doQuery(Query query) {
ValueEventListener valueEventListener = new ValueEventListener() {
@Override
public void onDataChange(@NonNull DataSnapshot dataSnapshot) {
if (dataSnapshot.exists()) {
for (DataSnapshot snapshot : dataSnapshot.getChildren()) {
user = snapshot.getValue(User.class);
}
}
String name = user.getFirstName() + " " + user.getLastName();
full_name.setText(name);
phone_number.setText(user.getPhoneNum());
email.setText(user.getEmail());
Uri myUri = Uri.parse(user.getURI());
Toast.makeText(getApplicationContext(), myUri.toString(), Toast.LENGTH_LONG).show();
//Picasso.get().load(myUri).placeholder(R.drawable.default_profile_pic_olive).into(profilepic);
Picasso.get().load(myUri).into(profilepic);
String genreList = user.getPrefList();
String[] gList = genreList.split(" ");
int j = 0;
for (int i = 0; i < gList.length; i++) {
if (gList[i].equals("1")) {
genres[j] = strGenres[i];
j++;
}
}
if (genres.length == 1) {
genre1.setText(genres[0]);
}
else if (genres.length == 2) {
genre1.setText(genres[0]);
genre2.setText(genres[1]);
}
else if (genres.length == 3) {
genre1.setText(genres[0]);
genre2.setText(genres[1]);
genre3.setText(genres[2]);
}
}
@Override
public void onCancelled(@NonNull DatabaseError databaseError) {
}
};
query.addListenerForSingleValueEvent(valueEventListener);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getCredentials();",
"private String[] getCredentials() {\n String[] cred = new String[2];\n System.out.print(\"Username: \");\n cred[0] = sc.nextLine();\n System.out.print(\"Password: \");\n cred[1] = sc.nextLine();\n return cred;\n }",
"java.lang.String getCred();",
"public ... | [
"0.7494527",
"0.7480439",
"0.7306489",
"0.7113342",
"0.69670075",
"0.67799366",
"0.67279017",
"0.66969043",
"0.669132",
"0.6682786",
"0.6682786",
"0.66080475",
"0.65968055",
"0.655276",
"0.6543035",
"0.64590186",
"0.64489806",
"0.64489806",
"0.64489806",
"0.64174837",
"0.6417... | 0.0 | -1 |
String url = " | @Test
public void checkfileExist() {
checkBlobExist("pause-amd64","sha256:cf92024299791de93ad205151ab24e535c218bbea6465fd8f79c2611db913a50");
// try{
// String info = httpUtils.head(url, new HashMap<>(), null);
// logger.info("info:{}", info);
// } catch (Exception e) {
// e.printStackTrace();
// }
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"String url();",
"String getUrl();",
"String getUrl();",
"String getUrl();",
"String getUrl();",
"String getUrl();",
"public String getUrl(){\n \treturn url;\n }",
"public void setURL(String _url) { url = _url; }",
"public static String requestURL(String url) {\n return \"\";\n }",
... | [
"0.7679998",
"0.74702317",
"0.74702317",
"0.74702317",
"0.74702317",
"0.74702317",
"0.74346274",
"0.7410564",
"0.7227975",
"0.72076124",
"0.72063863",
"0.72018105",
"0.7200814",
"0.70676297",
"0.70676297",
"0.70676297",
"0.70676297",
"0.70676297",
"0.70676297",
"0.6969047",
"... | 0.0 | -1 |
Here we can do whatever updates we want, then return the content we want rendered. | Object onRefreshTimeZone() {
return request.isXHR() ? timeZone.getBody() : null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void update(){\n\t\tresponse = buildHtml(new ArrayList<HtmlElement>(elements));\n\t}",
"boolean updateContent();",
"public void updateContent() {\n\t\t\n\t\tupdateResidencias();\n\t\tupdateUniversidades();\n\t\t\n\t}",
"public void updateContent(){\r\n\t\tthis.initRecords();\r\n\t\tlist.show(records);... | [
"0.6733522",
"0.6660898",
"0.6000053",
"0.59437567",
"0.58118665",
"0.57538635",
"0.5749228",
"0.5715857",
"0.5711775",
"0.5695889",
"0.56688035",
"0.56341946",
"0.5619112",
"0.5616273",
"0.5614703",
"0.5614703",
"0.5606521",
"0.5606521",
"0.55918163",
"0.557186",
"0.55527204... | 0.0 | -1 |
close ChromeDriver and browser | @After
public void end(){
driver.close();
driver.quit();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void close() {\n seleniumDriver.close();\n }",
"public void closeBrowser(){\n\t driver.close();\n\t \t }",
"public void close() {\r\n driver.quit();\r\n }",
"public static void browserClose() {\r\n\t// Make sure we shut everything down to avoid memory leaks\r\n\tdriver.close();\r\... | [
"0.81929517",
"0.8134462",
"0.79234535",
"0.7890478",
"0.7880224",
"0.78547156",
"0.7854042",
"0.7816409",
"0.7743856",
"0.77346927",
"0.7703222",
"0.76994085",
"0.75907016",
"0.7517066",
"0.75109327",
"0.74209315",
"0.7397938",
"0.738393",
"0.7342862",
"0.733806",
"0.7302123... | 0.72715336 | 22 |
open Viewed Goods in Personal Area | @When("^Очистить список просмотренных товаров$")
public void clearGoodsInViewedGoods() {
PersonalPage personalPage = new PersonalPage(driver);
personalPage.searchAndOpenByProfileList("Просмотренные товары");
//check Viewed Products
//push button DeleteAll in Viewed Goods
if (personalPage.confirmationOpenProfile("recent-goods-header")) {
personalPage.clearAll();
personalPage.confirmationOpenProfile("recent-goods-header");
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void viewPageClicked() {\n //--\n //-- WRITE YOUR CODE HERE!\n //--\n try{\n Desktop d = Desktop.getDesktop();\n d.browse(new URI(itemView.getItem().getURL()));\n }catch(Exception e){\n e.printStackTrace();\n }\n\n showMessag... | [
"0.6381671",
"0.63727987",
"0.6171887",
"0.6155464",
"0.6138006",
"0.60856223",
"0.606984",
"0.6038869",
"0.6016903",
"0.59830546",
"0.59824026",
"0.59542096",
"0.5941122",
"0.591848",
"0.591349",
"0.5898862",
"0.5898204",
"0.5897327",
"0.58736014",
"0.580904",
"0.58080655",
... | 0.0 | -1 |
open pege 'url' in browser | @And("^Считать детали товара \"([^\"]*)\"$")
public void setNameAndPriceByUrl(String url) {
driver.get(url);
waitForConditions.until(ExpectedConditions.presenceOfElementLocated(By.xpath("//*[@class='detail-title']")));
//get name goods on page
String nameElement = driver.findElement(By.xpath("//*[@class='detail-title']")).getText();
//get price goods on page
String priceElement = driver.findElement(By.xpath("//*[@id='price_label']")).getText();
goods.add(nameElement + "/ " + priceElement);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static void openWebpage(String url) {\n try {\n new ProcessBuilder(\"x-www-browser\", url).start();\n } catch (IOException e) {\n log.error(e.getMessage(), e);\n }\n }",
"private void openUrl() throws IOException, URISyntaxException{\r\n if(Desktop.isD... | [
"0.7932766",
"0.7817678",
"0.7592065",
"0.726192",
"0.7038234",
"0.70294154",
"0.70061976",
"0.68611366",
"0.68328404",
"0.6829238",
"0.68210673",
"0.68202376",
"0.67875296",
"0.67055094",
"0.66398144",
"0.6615631",
"0.6607335",
"0.66037935",
"0.6593593",
"0.6546661",
"0.6542... | 0.0 | -1 |
All readFile variants should throw an exception, to signal to callers if File I/O fails | protected abstract E readFile() throws Exception; | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void readFile() throws Exception, FileNotFoundException, NumberFormatException, MalformedParameterizedTypeException {\n // my user or my file might be kind of crazy! -> will check for these exceptions!\n }",
"protected abstract void readFile();",
"private void testReadFile() {\n System.out.... | [
"0.7467525",
"0.73300135",
"0.72815573",
"0.7093208",
"0.7020135",
"0.6964287",
"0.6658212",
"0.6591799",
"0.62934506",
"0.6276086",
"0.625849",
"0.62415504",
"0.62409616",
"0.6149764",
"0.61093676",
"0.608777",
"0.6085479",
"0.598075",
"0.596186",
"0.5950458",
"0.5938871",
... | 0.760375 | 0 |
TODO Autogenerated method stub | public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int[] arr = new int[10];
for(int i=0; i<arr.length; i++) {
arr[i] = scan.nextInt();
}
int[] mod = new int[10];
for(int i=0; i<arr.length; i++) {
mod[i] = arr[i]%42;
}
Arrays.sort(mod);
int count = 1;
for(int i=0; i<mod.length-1; i++) {
if(mod[i] != mod[i+1])
count++;
}
System.out.println(count);
} | {
"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 |
Method used to run the program. | public static void main(String[] args) {
StudentDatabase database = null;
try {
List<String> lines = Files.readAllLines(
Paths.get("./database.txt"),
StandardCharsets.UTF_8
);
database = new StudentDatabase(lines);
} catch (IOException exc) {
System.out.println("Error while reading the database. Terminating...");
System.exit(-1);
}
try (Scanner sc = new Scanner(System.in)) {
while (true) {
System.out.print("> ");
if (sc.hasNext()) {
String input = sc.nextLine().trim();
if (input.equalsIgnoreCase("exit")) {
System.out.println("Goodbye!");
break;
}
if (input.startsWith("query ")) {
String query = input.substring(6);
try {
List<StudentRecord> printList = query(query, database);
List<String> output = RecordFormatter.format(printList);
output.forEach(System.out::println);
System.out.printf("%n");
} catch (QueryException exc) {
System.out.println("Invalid query.\n");
}
} else {
System.out.println("Invalid command.\n");
}
}
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void runProgram()\n\t{\n\t\tintro();\n\t\tfindLength();\n\t\tguessLetter();\n\t\tguessName();\n\t}",
"public void runProgram() {\n\n\t\tSystem.out.println(\"\\n Time to start the machine... \\n\");\n\n\t\tpress.pressOlive(myOlives);\n\n\t\tSystem.out.println(\"Total amount of oil \" + press.getTotalOil())... | [
"0.78042734",
"0.7577656",
"0.73412097",
"0.73181224",
"0.7115583",
"0.7057943",
"0.70578104",
"0.69856435",
"0.6977799",
"0.6910973",
"0.69069284",
"0.68866456",
"0.6873962",
"0.6865909",
"0.6864084",
"0.68554366",
"0.6851235",
"0.6851235",
"0.6851235",
"0.6832345",
"0.68192... | 0.0 | -1 |
DecimalFormat df = new DecimalFormat("0.0"); | @Override
public void handle(ActionEvent event) {
double mealCost;
double tax;
double tip;
double totalCost;
double totalBill;
mealCost = Double.parseDouble(numm1.getText());
bill.setMealCost(mealCost);
tax=bill.tax();
numm2.setText(Double.toString(tax)+"$");
tip=bill.tip();
numm3.setText(Double.toString(tip)+"$");
totalBill=bill.totalBill();
numm4.setText(Double.toString(totalBill)+"$");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public int getDecimalDigits() { return 0; }",
"public static int decimals() {\n return 0;\n }",
"public RealNumberFormat()\r\n\t{\r\n\t\tdf\t= new DecimalFormat( \"#,##0.000\" );\r\n\t}",
"private String doubleToDecimalString(double toFormat){\r\n\r\n String d = \"\";\r\n ... | [
"0.6881446",
"0.66036016",
"0.6573969",
"0.65028244",
"0.6373345",
"0.6330554",
"0.6295984",
"0.6260995",
"0.6229252",
"0.61470985",
"0.60365176",
"0.60176533",
"0.60099983",
"0.59723455",
"0.5957993",
"0.5956033",
"0.58630836",
"0.57575417",
"0.57575417",
"0.5726015",
"0.571... | 0.0 | -1 |
Needs optimizing. TODO ALLES!!!! | public ArrayList parseQueryToGPUObject(GraphDatabaseService db, ArrayList components){
ArrayList componentsArray = new ArrayList();
for(int i = 0; i<components.size();i++){
GPU gpu = new GPU();
Transaction tx = db.beginTx();
try{
NodeProxy node = (NodeProxy) components.get(i);
//Hardware
gpu.setEan(node.getProperty("EAN").toString());
gpu.setSku(node.getProperty("SKU").toString());
gpu.setTweakersid(node.getProperty("Tweakers ID").toString());
gpu.setAantalaanbieders(node.getProperty("Aantal aanbieders").toString());
gpu.setEersteprijsvermelding(node.getProperty("Eerste prijsvermelding").toString());
gpu.setMerk(node.getProperty("Merk").toString());
gpu.setUitvoering(node.getProperty("Uitvoering").toString());
gpu.setUrl(node.getProperty("url").toString());
gpu.setIsEmpty(false);
gpu.setIsMatched(true);
//Gpu specific
gpu.setGeheugengrootte(node.getProperty("Geheugengrootte").toString());
gpu.setVideochipfabrikant(node.getProperty("Videochipfabrikant").toString());
gpu.setGeheugenbusbreedte(node.getProperty("Geheugen Busbreedte").toString());
gpu.setChipsetgeneratie(node.getProperty("Chipset generatie").toString());
gpu.setOpenglversie(node.getProperty("OpenGL versie").toString());
gpu.setTypekoeling(node.getProperty("Type koeling").toString());
gpu.setAantalslots(node.getProperty("Aantal slots").toString());
gpu.setCardinterfacevideo(node.getProperty("Card Interface (Video)").toString());
gpu.setGeheugentypevideokaarten(node.getProperty("Geheugen Type (videokaarten)").toString());
gpu.setVerkoopstatus(node.getProperty("Verkoopstatus").toString());
gpu.setAantalpinsvideokaarten(node.getProperty("Aantal pins (videokaarten)").toString());
gpu.setLinkinterface(node.getProperty("Link Interface").toString());
gpu.setNominalesnelheidvideochip(node.getProperty("Nominale snelheid videochip").toString());
gpu.setVideouit(node.getProperty("Video uit").toString());
gpu.setLengte(node.getProperty("Lengte").toString());
gpu.setMaximaleturbofrequentie(node.getProperty("Maximale turbo frequentie").toString());
gpu.setGeheugensnelheid(node.getProperty("Geheugen Snelheid").toString());
gpu.setShadermodel(node.getProperty("Shader model").toString());
gpu.setDirectxversie(node.getProperty("DirectX versie").toString());
gpu.setVideochip(node.getProperty("Videochip").toString());
gpu.setAantal6pins(node.getProperty("Aantal 6 pins").toString());
gpu.setProduct(node.getProperty("Product").toString());
tx.success();
}catch(Exception e){
gpu.setIsEmpty(true);
gpu.setIsMatched(false);
} finally {
componentsArray.add(gpu);
tx.close();
}
}
return componentsArray;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static void cajas() {\n\t\t\n\t}",
"private void optimiseEVProfile()\n\t{\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"public void method_4270() {}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"protected boolean func_70814_o() { return true; }",
"private vo... | [
"0.56865704",
"0.56366783",
"0.5600656",
"0.55760765",
"0.55241054",
"0.54742473",
"0.544999",
"0.54474926",
"0.54431677",
"0.5419282",
"0.5363797",
"0.53628826",
"0.535194",
"0.5345949",
"0.53409004",
"0.53226554",
"0.5318937",
"0.53153676",
"0.53113395",
"0.5282099",
"0.526... | 0.0 | -1 |
Ketika berpindah screen maka sprite yang ditampilkan pada layer manager harus dihilangkan terlebih dahulu. Untuk itu setiap sprite yang telah dibuat harus dimasukkan pada prosedur ini | public void removeSprites(){
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void ini_Sprites()\r\n\t{\r\n\t\tLogger.DEBUG(\"ini_Sprites\");\r\n\t\tResourceCache.LoadSprites(false);\r\n\t}",
"@Override\n\tpublic void show () {\n overWorld = new Sprite(new TextureRegion(new Texture(Gdx.files.internal(\"Screens/overworldscreen.png\"))));\n overWorld.setPosition(0, 0);... | [
"0.7018853",
"0.66925615",
"0.65575624",
"0.65319395",
"0.6515284",
"0.6396764",
"0.6380817",
"0.6375709",
"0.63219166",
"0.6306622",
"0.62883466",
"0.62667364",
"0.62616587",
"0.62453294",
"0.62377924",
"0.622941",
"0.6228716",
"0.62202233",
"0.62163633",
"0.62138784",
"0.61... | 0.6532232 | 3 |
Prosedur ini membuat dan load semua images yang dipakai | public void createImages(){
try {
img_bg = Image.createImage(GAME_BG);
img_backBtn = Image.createImage(BACK_BTN);
img_muteBtn = Image.createImage(MUTE_BTN);
img_resetBtn = Image.createImage(RESET_BTN);
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void loadImages() {\n\t\ttry {\n\t\t\tall_images = new Bitmap[img_files.length];\n\t\t\tfor (int i = 0; i < all_images.length; i++) {\n\t\t\t\tall_images[i] = loadImage(img_files[i] + \".jpg\");\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\tToast.makeText(this, \"Unable to load images\", Toast.LENGTH_LONG... | [
"0.69279534",
"0.69050044",
"0.68875825",
"0.6757142",
"0.6744846",
"0.67181873",
"0.67144126",
"0.67025",
"0.669753",
"0.66748613",
"0.6663257",
"0.65902257",
"0.658292",
"0.65599835",
"0.65586746",
"0.6499064",
"0.648409",
"0.6477385",
"0.6467991",
"0.64651835",
"0.64474964... | 0.6314466 | 41 |
TODO Autogenerated method stub | public void run() {
} | {
"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 |
jika memencet tombol back | public void pointerReleased(int x, int y) {
if (x >= spr_btnBack.getX() && x <= spr_btnBack.getX() + spr_btnBack.getWidth()
&& y >= spr_btnBack.getY()
&& y <= spr_btnBack.getY() + spr_btnBack.getHeight()) {
//removeSprites();
// tuju ke elemen yang kita inginkan
// element at 0 untuk vector screen adalah menunya
host.setCurrentScreen((Screen) host.getScreenVector().elementAt(0));
//jika memencet tombol mute
}else if (x >= spr_btnMute.getX() && x <= spr_btnMute.getX() + spr_btnMute.getWidth()
&& y >= spr_btnMute.getY()
&& y <= spr_btnMute.getY() + spr_btnMute.getHeight()){
if (host.getGameSettings().isMusicOn()) {
host.getGameSettings().setMusicOn(false);
spr_btnMute.setFrame(1);
host.getGameSound().stopBGM();
}else{
host.getGameSettings().setMusicOn(true);
spr_btnMute.setFrame(0);
host.getGameSound().playBGM();
}
//memencet tombol reset
}else if (x >= spr_btnReset.getX() && x <= spr_btnReset.getX() + spr_btnReset.getWidth()
&& y >= spr_btnReset.getY()
&& y <= spr_btnReset.getY() + spr_btnReset.getHeight()){
RMS record = ((GameMidlet)getMidlet()).getRMS();
//reset skor tertinggi menjadi 0
record.saveScore(0);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void propagate(XQueue in, XQueue[] out) throws JMSException {\n Message inMessage = null;\n String msgStr = null, ruleName = null;\n StringBuffer strBuf = null;\n Object o;\n Map rule;\n Browser browser;\n MessageFilter[] filters = null;\n Template tem... | [
"0.5220883",
"0.51437545",
"0.50862974",
"0.4936382",
"0.49323392",
"0.49049014",
"0.48267126",
"0.47712293",
"0.47436816",
"0.4736879",
"0.47130644",
"0.47015125",
"0.46813968",
"0.4681342",
"0.467847",
"0.4663263",
"0.46618405",
"0.46405473",
"0.46365988",
"0.4635346",
"0.4... | 0.0 | -1 |
menentukan gambar tombol mute | public void start(){
if (host.getGameSettings().isMusicOn()) {
spr_btnMute.setFrame(0);
}else{
spr_btnMute.setFrame(1);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void mute() {\n execute(\"player.muted = true\");\n }",
"public void onLocalAudioMuteClicked(View view) {\n // Change the value of muted\n mMuted = !mMuted;\n // Update the agora engine with the mute\n mRtcEngine.muteLocalAudioStream(mMuted);\n // Get the correct mute... | [
"0.73016477",
"0.69066566",
"0.69045126",
"0.69034714",
"0.6709238",
"0.6605204",
"0.65602434",
"0.6536738",
"0.65235287",
"0.6521961",
"0.63842124",
"0.637334",
"0.6334711",
"0.6267413",
"0.6227481",
"0.61964375",
"0.6162083",
"0.6135646",
"0.61284536",
"0.6070203",
"0.60519... | 0.6389625 | 10 |
Directly sends a message to a hub. | private boolean directlyToHub(DirectSocketAddress hub, ClientMessage cm) {
HubConnection c = connections.getHub(hub);
if (c != null) {
return c.forwardClientMessage(cm);
}
return false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void send(Message msg);",
"public void sendMessage(Message msg) {\n network.sendAsync(msg);\n }",
"void send(IMessage message, IChannel channel);",
"public void send(Message message) {\r\n channel.writeAndFlush(message);\r\n }",
"public void sendMessage ( String message ) {\n\t\t... | [
"0.711589",
"0.7058892",
"0.7039943",
"0.69335914",
"0.69072014",
"0.68308294",
"0.67185926",
"0.67069966",
"0.6688802",
"0.66699857",
"0.66698253",
"0.66650945",
"0.6577698",
"0.65696007",
"0.65267813",
"0.64691883",
"0.64326525",
"0.6415971",
"0.64041686",
"0.64037997",
"0.... | 0.61254835 | 41 |
Tries to forward a message to a given proxy, directly or indirectly. | private void forwardMessageToHub(HubDescription p, ClientMessage cm) {
if (meslogger.isDebugEnabled()) {
meslogger.debug("Attempting to forward message to hub "
+ p.hubAddress);
}
if (directlyToHub(p.hubAddress, cm)) {
if (meslogger.isDebugEnabled()) {
meslogger.debug("Succesfully forwarded message to hub "
+ p.hubAddressAsString + " using direct link");
}
stats.infoMessagesForwarded++;
return;
}
if (cm.hopsLeft == 0) {
if (meslogger.isInfoEnabled()) {
meslogger
.info("Failed to forward message to hub "
+ p.hubAddressAsString
+ " and we are not allowed to use"
+ " an indirection!");
}
stats.infoMessagesDropped++;
return;
}
if (meslogger.isDebugEnabled()) {
meslogger.debug("Failed to forward message to hub "
+ p.hubAddressAsString + " using direct link, "
+ "trying indirection");
}
// We don't have a direct connection, but we should be able to reach the
// proxy indirectly
HubDescription p2 = p.getIndirection();
if (p2 == null) {
// Oh dear, we don't have an indirection!
meslogger.warn("Cannot forward message. No route to hub: " + p.hubAddressAsString
+ " (indirection address is null!)");
stats.infoMessagesDropped++;
return;
}
if (directlyToHub(p2.hubAddress, cm)) {
if (meslogger.isDebugEnabled()) {
meslogger.debug("Succesfully forwarded message to hub "
+ p2.hubAddressAsString + " using direct link");
}
stats.infoMessagesForwarded++;
return;
}
if (meslogger.isInfoEnabled()) {
meslogger.info("Failed to forward message to hub "
+ p.hubAddressAsString + " or it's indirection "
+ p2.hubAddressAsString);
}
stats.infoMessagesDropped++;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void forward(IMessage message, IChannel sender);",
"@Override\n public void sendToProxy(String message) {\n }",
"public final Message forwardMessage(ForwardMessageToSend fts)\n\t{\n\t\tif(fts == null)\n\t\t\treturn null;\n\t\treturn rm.forwardMessage(fts);\n\t}",
"public void forward() {\n callF... | [
"0.68617326",
"0.66315943",
"0.592724",
"0.56845385",
"0.56765264",
"0.55084884",
"0.53965545",
"0.5351926",
"0.5344312",
"0.5327617",
"0.524377",
"0.52412903",
"0.5172875",
"0.51598746",
"0.51577026",
"0.51434964",
"0.5137193",
"0.5127972",
"0.5103231",
"0.49659365",
"0.4951... | 0.6511018 | 2 |
First check if we can find the target locally | private boolean deliverLocally(ClientMessage cm) {
ClientConnection c = connections.getClient(cm.getTarget());
if (c == null) {
if (meslogger.isDebugEnabled()) {
meslogger.debug("Cannot find client address locally: "
+ cm.getTarget());
}
return false;
}
if (meslogger.isDebugEnabled()) {
if (cm.returnToSender) {
meslogger
.debug("Attempting to directly return message to sender "
+ cm.sourceAsString());
} else {
meslogger
.debug("Attempting to directly forward message to client "
+ cm.targetAsString());
}
}
// We found the target, so lets forward the message
boolean result = c.forwardClientMessage(cm);
if (result) {
stats.infoMessagesDelivered++;
} else {
stats.infoMessagesFailed++;
}
if (meslogger.isDebugEnabled()) {
if (cm.returnToSender) {
meslogger.debug("Directly return message to sender "
+ cm.sourceAsString()
+ (result ? " succeeded!" : "failed!"));
} else {
meslogger.debug("Directly forwarding message to client "
+ cm.targetAsString()
+ (result ? " succeeded!" : "failed!"));
}
}
return result;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Object getTargetexists();",
"private boolean isLocalRepository() {\n\r\n File file = new File(m_Path.toString() + \"/.magit/Remote\");\r\n return file.exists();\r\n }",
"public boolean hasTarget() {\n return target != null;\n }",
"private boolean targetExists(File fileToCheck) {\n\... | [
"0.6662962",
"0.6491774",
"0.63805866",
"0.6349",
"0.62799263",
"0.62776035",
"0.61618084",
"0.6091373",
"0.6047825",
"0.598329",
"0.5956322",
"0.59524494",
"0.59303683",
"0.58876115",
"0.5883937",
"0.5877376",
"0.58729863",
"0.584559",
"0.57966185",
"0.5764198",
"0.57491",
... | 0.0 | -1 |
System.out.println(" Returning to sender...."); | private void returnToSender(ClientMessage m) {
if (m.returnToSender) {
// should never happen!
// System.out.println("**** Returning to sender says EEK");
return;
}
// System.out.println("**** Returning to sender says her I go!");
m.returnToSender = true;
forward(m, true);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void displayEndingMessage() {\n\t\tSystem.out.println(\"Thank you for using my program!\");\n\t}",
"public void exit() {\n System.out.println(\"Thank you for playing Nim\");\n }",
"void sendMessage() {\n\n\t}",
"@Override\n\tpublic void send() {\n\t\tSystem.out.println(\"this is send\... | [
"0.6731586",
"0.67057526",
"0.66517234",
"0.66390246",
"0.65682644",
"0.6489571",
"0.64378446",
"0.63836026",
"0.63757926",
"0.6316772",
"0.63144994",
"0.62921995",
"0.6237159",
"0.619981",
"0.6177756",
"0.61618227",
"0.61586004",
"0.6130784",
"0.61186546",
"0.61137015",
"0.6... | 0.7002063 | 0 |
DirectSocketAddress hub = DirectSocketAddress.fromBytes(data, 4); System.err.println("Hub is " + hub); / int off = 4 + (hub == null ? 4 : 4 + hub.getAddress().length); //System.err.println("Off is " + off); DirectSocketAddress node = DirectSocketAddress.fromBytes(data, off); //System.err.println("Node is " + node); off += node.getAddress().length; | private void forwardData(byte[] data) throws UnknownHostException,
MalformedAddressException {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@DSSource({DSSourceKind.NETWORK})\n @DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 12:36:07.243 -0500\", hash_original_method = \"E608923787A6482FF0ABAB03074C01F6\", hash_generated_method = \"7955BA736BD8AD783B98FFDED7E574D5\")\n \npublic LocalSocketAddress get... | [
"0.61500955",
"0.5793496",
"0.5754132",
"0.5711434",
"0.562849",
"0.5582324",
"0.55419105",
"0.5535242",
"0.54930675",
"0.5381668",
"0.53797424",
"0.5377796",
"0.53684664",
"0.53600603",
"0.53580457",
"0.53269917",
"0.5310204",
"0.5264269",
"0.5261531",
"0.52340126",
"0.52301... | 0.49898645 | 45 |
TODO: Should be asynchronous ??? Send the connect request to the hub | private final void forwardVirtualConnect(DirectSocketAddress source,
DirectSocketAddress sourceHub, DirectSocketAddress target,
DirectSocketAddress targetHub, long index, int timeout, int port,
int fragment, int buffer) {
try {
synchronized (out) {
out.write(MessageForwarderProtocol.CREATE_VIRTUAL);
DirectSocketAddress.write(source, out);
DirectSocketAddress.write(sourceHub, out);
DirectSocketAddress.write(target, out);
DirectSocketAddress.write(targetHub, out);
out.writeLong(index);
out.writeInt(timeout);
out.writeInt(port);
out.writeInt(fragment);
out.writeInt(buffer);
out.flush();
}
} catch (Exception e) {
handleDisconnect(e);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void connect() {}",
"public void doConnect() {\n Debug.logInfo(\"Connecting to \" + client.getServerURI() + \" with device name[\" + client.getClientId() + \"]\", MODULE);\n\n IMqttActionListener conListener = new IMqttActionListener() {\n\n public void onSuccess(IMqtt... | [
"0.7067459",
"0.7035674",
"0.70130277",
"0.69526696",
"0.68926334",
"0.6830025",
"0.6830025",
"0.6830025",
"0.6740587",
"0.67267454",
"0.6716568",
"0.6666095",
"0.6650977",
"0.6640266",
"0.66219",
"0.66219",
"0.66150373",
"0.6596286",
"0.6585368",
"0.6559376",
"0.6519563",
... | 0.0 | -1 |
TODO: Should be asynchronous ??? forward the ACK | private final void forwardVirtualConnectACK(long index, int fragment,
int buffer) {
try {
synchronized (out) {
out.writeByte(MessageForwarderProtocol.CREATE_VIRTUAL_ACK);
out.writeLong(index);
out.writeInt(fragment);
out.writeInt(buffer);
out.flush();
}
} catch (Exception e) {
handleDisconnect(e);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void ack() {\n }",
"@Override\n protected boolean shouldAck() {\n return true;\n }",
"boolean needsAck() { return true; }",
"public void ack() {\n //disable current awaiting handler\n testFuture.cancel(false);\n //reset number of tryies;\n tryCou... | [
"0.7387263",
"0.708148",
"0.6994162",
"0.6577781",
"0.65777206",
"0.65656704",
"0.64918125",
"0.6456997",
"0.6450677",
"0.6425541",
"0.6372222",
"0.6358077",
"0.6330004",
"0.62608284",
"0.62575036",
"0.6210646",
"0.6209774",
"0.6205465",
"0.6166017",
"0.60889536",
"0.60814637... | 0.5936633 | 32 |
TODO: Should be asynchronous ??? System.err.println(" ACK ACK OUT " + index + " " + succes); forward the ACK | private final void forwardVirtualConnectACKACK(long index, boolean succes) {
try {
synchronized (out) {
out.writeByte(MessageForwarderProtocol.CREATE_VIRTUAL_ACK_ACK);
out.writeLong(index);
out.writeBoolean(succes);
out.flush();
}
} catch (Exception e) {
handleDisconnect(e);
}
// System.err.println("****** ACK ACK OUT DONE " + index + " " +
// succes);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private final void forwardVirtualMessageAck(long index, int data) {\n try {\n synchronized (out) {\n out.write(MessageForwarderProtocol.MESSAGE_VIRTUAL_ACK);\n out.writeLong(index);\n out.writeInt(data);\n out.flush();\n }\n ... | [
"0.6974845",
"0.68124616",
"0.6449212",
"0.64377797",
"0.6356532",
"0.6330882",
"0.63192743",
"0.6271526",
"0.6267275",
"0.62515604",
"0.6126373",
"0.61129004",
"0.6055594",
"0.60553086",
"0.59720725",
"0.596295",
"0.59613115",
"0.59604394",
"0.5839387",
"0.58384174",
"0.5834... | 0.7405807 | 0 |
TODO: Should be asynchronous ??? forward the NACK | private final void forwardVirtualConnectNACK(long index, byte reason) {
try {
synchronized (out) {
out.writeByte(MessageForwarderProtocol.CREATE_VIRTUAL_NACK);
out.writeLong(index);
out.writeByte(reason);
out.flush();
}
} catch (Exception e) {
handleDisconnect(e);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void sendReceiveRes(){\n\t}",
"private void receiveNack(Evt e) {\n\t\tif (!nackReceived && e.getMessage()!= currentlyOptimisticallyTransmitted) {\r\n\t\t\tSystem.out.println(\"error\");\r\n\t\t//\tthrow new IllegalStateException(\"A nack corresponding to a message that isn't the one in the buffer has bee... | [
"0.63356286",
"0.61331695",
"0.61201626",
"0.5976122",
"0.5966829",
"0.5942974",
"0.5927727",
"0.57853186",
"0.57555944",
"0.5732579",
"0.57244813",
"0.5693335",
"0.5671979",
"0.5650397",
"0.56489784",
"0.563493",
"0.5614452",
"0.55858624",
"0.5576952",
"0.5558789",
"0.555216... | 0.0 | -1 |
TODO: Should be asynchronous ??? | private final void forwardVirtualClose(long index) {
if (vclogger.isInfoEnabled()) {
vclogger.info("Sending closing connection: " + index);
}
// forward the close
try {
synchronized (out) {
out.write(MessageForwarderProtocol.CLOSE_VIRTUAL);
out.writeLong(index);
out.flush();
}
} catch (Exception e) {
handleDisconnect(e);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void callSync() {\n\n }",
"@Override\r\n\t\tprotected void run() {\n\t\t\t\r\n\t\t}",
"@Override\r\n\t\t\tpublic void run() {\n\t\t\t\t\r\n\t\t\t}",
"@Override\r\n\t\t\tpublic void run() {\n\t\t\t\t\r\n\t\t\t}",
"@Override\n\t\t\tpublic void run() {\n\n\t\t\t}",
"@Override\n\t\t\... | [
"0.5958939",
"0.58460706",
"0.5815312",
"0.5815312",
"0.5811255",
"0.57935303",
"0.57935303",
"0.5734125",
"0.5624567",
"0.55985254",
"0.55847436",
"0.55817264",
"0.55817264",
"0.55817264",
"0.55817264",
"0.55817264",
"0.55817264",
"0.55817264",
"0.55817264",
"0.55817264",
"0... | 0.0 | -1 |
TODO: Should be asynchronous ??? forward the message | private final void forwardVirtualMessage(long index, byte[] data, int size) {
try {
synchronized (out) {
out.write(MessageForwarderProtocol.MESSAGE_VIRTUAL);
out.writeLong(index);
out.writeInt(size);
out.write(data, 0, size);
out.flush();
}
} catch (Exception e) {
handleDisconnect(e);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void forward(IMessage message, IChannel sender);",
"Object routeMessage(Message message) throws IOException;",
"@Override\n\tpublic void sendMessage() {\n\t\t\n\t}",
"@Override\n\tpublic void onMessageRecieved(Message arg0) {\n\t\t\n\t}",
"@Override\n\tpublic void processMessage(Message message) {\n\t\t\n\... | [
"0.69605255",
"0.65324163",
"0.6414518",
"0.640938",
"0.63006413",
"0.62744045",
"0.62621546",
"0.623662",
"0.62354004",
"0.62072515",
"0.61957777",
"0.61896145",
"0.6177905",
"0.6177206",
"0.6142793",
"0.613106",
"0.6121708",
"0.6121259",
"0.6120394",
"0.6102849",
"0.6089121... | 0.5733932 | 85 |
TODO: Should be asynchronous ??? forward the message ack | private final void forwardVirtualMessageAck(long index, int data) {
try {
synchronized (out) {
out.write(MessageForwarderProtocol.MESSAGE_VIRTUAL_ACK);
out.writeLong(index);
out.writeInt(data);
out.flush();
}
} catch (Exception e) {
handleDisconnect(e);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void ack() {\n }",
"@Override\n protected boolean shouldAck() {\n return true;\n }",
"boolean needsAck() { return true; }",
"public boolean ack() {\n return ack;\n }",
"@Override\r\n\tpublic int ack(int x, int y) {\n\t\treturn 0;\r\n\t}",
"public void ack() {\n //disabl... | [
"0.8164537",
"0.73123705",
"0.7249804",
"0.7039703",
"0.69921064",
"0.6948043",
"0.6939136",
"0.68576634",
"0.68503016",
"0.6756463",
"0.674362",
"0.6740567",
"0.6651789",
"0.6647721",
"0.6643157",
"0.65167254",
"0.64896524",
"0.646323",
"0.6413445",
"0.63769174",
"0.6372565"... | 0.6420999 | 18 |
Called when a connection to a client/hub is lost.... | protected void closeAllVirtualConnections(String prefix) {
LinkedList<VirtualConnection> l = virtualConnections.removeAll(prefix);
for (VirtualConnection vc : l) {
// We now have to figure out which of the two entries in the VC
// is ours. The easiest way is to simply compare the 'mfX'
// references.
if (this == vc.mfc1) {
if (vclogger.isInfoEnabled()) {
vclogger.info("forward close for 2: " + vc.index2);
}
vc.mfc2.forwardVirtualClose(vc.index2);
stats.closeTotal++;
} else if (this == vc.mfc2) {
if (vclogger.isInfoEnabled()) {
vclogger.info("forward close for 1: " + vc.index1);
}
stats.closeTotal++;
vc.mfc1.forwardVirtualClose(vc.index1);
} else {
stats.closeError++;
;
// This should never happen!
vclogger.warn("Virtual connection error: forwarder not found!",
new Exception());
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void connectionLost(String channelID);",
"@Override\n public void connectionLost(Throwable thrwbl) {\n System.out.println(\"服务器的连接丢失\");\n }",
"private void connectionLost() {\n // Send a failure message back to the Activity\n Message msg = handler.obtainMessage(SdlRouterServi... | [
"0.8049917",
"0.77447456",
"0.76976943",
"0.75845844",
"0.75813925",
"0.75458735",
"0.7537548",
"0.74954766",
"0.7485383",
"0.74643",
"0.7457632",
"0.7420859",
"0.73982775",
"0.7385809",
"0.7382068",
"0.73710304",
"0.73681927",
"0.73680127",
"0.73475724",
"0.7326061",
"0.7320... | 0.0 | -1 |
Maps the request with all url starting with / | @RequestMapping(value = "/", method = RequestMethod.GET)
public String home()
{
return "welcome";
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tprotected String[] getServletMappings() {\n\t\treturn new String[] { \"/\" };\n\t}",
"@Override\n\tprotected String[] getServletMappings() {\n\t\treturn new String[] { \"/\" };\n\t}",
"void requestMapChange(String path);",
"public void processRequest(HttpServletRequest req, HttpServletResponse r... | [
"0.6272249",
"0.6272249",
"0.6074595",
"0.5839209",
"0.5700979",
"0.55924207",
"0.55292195",
"0.54889137",
"0.5420663",
"0.53906435",
"0.53899413",
"0.5385013",
"0.5385013",
"0.5380385",
"0.5356833",
"0.5349984",
"0.5342376",
"0.5319266",
"0.5292914",
"0.5290392",
"0.52799153... | 0.0 | -1 |
Creates a List of Tweet from a List of TweetWithUser | public static List<Tweet> getTweetList(List<TweetWithUser> tweetWithUsers) {
List<Tweet> tweets = new ArrayList<>();
for (int i = 0; i < tweetWithUsers.size(); i++) {
Tweet tweet = tweetWithUsers.get(i).tweet;
tweet.user = tweetWithUsers.get(i).user;
tweets.add(tweet);
}
return tweets;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public List<TweetDto> tweets(String username) {\n\t\tList<Tweet> convert = userRepository.findByUname(username).getTweets();\n\n\t\tList<TweetDto> dto = new ArrayList<>();\n\t\tfor(Tweet check : convert){\n\t\t\tswitch (check.getType()) {\n\t\t\tcase \"simple\":\n\t\t\t\tdto.add(tweetMapper.toSimpleDto(check));\n\... | [
"0.66674274",
"0.644565",
"0.6140946",
"0.6113469",
"0.6042153",
"0.5939918",
"0.5877199",
"0.5858598",
"0.57797986",
"0.57400703",
"0.5710646",
"0.5706984",
"0.5687448",
"0.56453764",
"0.56230575",
"0.5622644",
"0.56136346",
"0.5576216",
"0.55751956",
"0.5552593",
"0.5542931... | 0.7606781 | 0 |
Inflate the layout for this fragment | @Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
View rootView = inflater.inflate(R.layout.fragment_favorite_movie, container, false);
rvMovie = rootView.findViewById(R.id.lv_list);
movieAdapter = new MovieFavoriteAdapter(getActivity());
rvMovie.setHasFixedSize(true);
rvMovie.setLayoutManager(new LinearLayoutManager(getActivity()));
rvMovie.setAdapter(movieAdapter);
HandlerThread handlerThread = new HandlerThread("DataObserver");
handlerThread.start();
Handler handler = new Handler(handlerThread.getLooper());
myObserver = new DataObserver(handler, getActivity());
getActivity().getContentResolver().registerContentObserver(CONTENT_URI, true, myObserver);
new getData(getActivity(), this).execute();
return rootView;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_main_allinfo, container, false);\n }",
"@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup... | [
"0.6739604",
"0.67235583",
"0.6721706",
"0.6698254",
"0.6691869",
"0.6687986",
"0.66869223",
"0.6684548",
"0.66766286",
"0.6674615",
"0.66654444",
"0.66654384",
"0.6664403",
"0.66596216",
"0.6653321",
"0.6647136",
"0.66423255",
"0.66388357",
"0.6637491",
"0.6634193",
"0.66251... | 0.0 | -1 |
Initializes the Jython runtime. This should only be called once, before any other Python objects (including PythonInterpreter) are created. | public static void
initialize(Properties preProperties, Properties postProperties, String[] argv) {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void init() {\n safeLevel = config.getSafeLevel();\n \n // Construct key services\n loadService = config.createLoadService(this);\n posix = POSIXFactory.getPOSIX(new JRubyPOSIXHandler(this), RubyInstanceConfig.nativeEnabled);\n javaSupport = new JavaSupport(t... | [
"0.70488334",
"0.6714529",
"0.6306604",
"0.61423206",
"0.6114642",
"0.6052985",
"0.6028795",
"0.6019025",
"0.600341",
"0.599951",
"0.5985431",
"0.5984495",
"0.59511244",
"0.59353405",
"0.59131515",
"0.58958566",
"0.58764255",
"0.5861387",
"0.58505607",
"0.5835454",
"0.5835454... | 0.0 | -1 |
Creates a new interpreter with an empty local namespace. | public PythonInterpreter() {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Interpreter() {\n super();\n instructionsStack.push(new ArrayList<>());\n }",
"InterpreterRuntimeContext createInterpreterRuntimeContext();",
"@SubL(source = \"cycl/stacks.lisp\", position = 1818) \n public static final SubLObject create_stack() {\n return clear_stack(make_stack(UNP... | [
"0.57468134",
"0.55477613",
"0.5226505",
"0.51214415",
"0.51214415",
"0.51214415",
"0.5085498",
"0.504487",
"0.48730507",
"0.4838341",
"0.47862926",
"0.47842035",
"0.47280645",
"0.47263974",
"0.46970052",
"0.4655617",
"0.4622027",
"0.46219987",
"0.46069387",
"0.45969254",
"0.... | 0.5740955 | 1 |
Creates a new interpreter with the ability to maintain a separate local namespace for each thread (set by invoking setLocals()). | public static PythonInterpreter threadLocalStateInterpreter(PyObject dict) {
return null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"InterpreterRuntimeContext createInterpreterRuntimeContext();",
"public PythonInterpreter() {\n }",
"public Interpreter() {\n super();\n instructionsStack.push(new ArrayList<>());\n }",
"protected PythonInterpreter registerEnv(String key) {\n\t\tPythonInterpreter p;\n\t\tif (environments.c... | [
"0.68938315",
"0.5751574",
"0.5719747",
"0.5470098",
"0.54133916",
"0.54005104",
"0.5371318",
"0.53516805",
"0.52378607",
"0.50486463",
"0.50256056",
"0.4956538",
"0.49275744",
"0.49142218",
"0.49046728",
"0.4877963",
"0.4854839",
"0.4818457",
"0.48002502",
"0.4751466",
"0.47... | 0.5907251 | 1 |
Creates a new interpreter with a specified local namespace. | public PythonInterpreter(PyObject dict) {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"InterpreterRuntimeContext createInterpreterRuntimeContext();",
"public Local createLocal(Position pos, Local local) {\n return syn.createLocal(pos, local.localInstance());\n }",
"public abstract ILanguageProtocol makeInterpreter(String source, String replQualifiedName, String... salixPath) throws I... | [
"0.576005",
"0.54277223",
"0.53635037",
"0.5057841",
"0.5018065",
"0.49885994",
"0.48954156",
"0.4876996",
"0.4876996",
"0.4876996",
"0.48514745",
"0.4829455",
"0.47902593",
"0.47887263",
"0.47573584",
"0.46637157",
"0.46579868",
"0.46329555",
"0.4607564",
"0.4598693",
"0.455... | 0.42415884 | 63 |
Evaluates a string as a Python expression and returns the result. | public PyObject eval(String s) {
return null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Object eval(String expression) throws Exception;",
"public String evaluate(String expression);",
"String evaluate();",
"public Object eval (Object expression);",
"public T evaluate(String expr) {\n List<Token> tokens = ExpressionParser.parse(expr);\n Expression expression = ExpressionB... | [
"0.8094519",
"0.80332166",
"0.7370714",
"0.7258161",
"0.71265465",
"0.7119661",
"0.69229203",
"0.6793151",
"0.66666067",
"0.6643055",
"0.6608248",
"0.653355",
"0.64978844",
"0.64638615",
"0.64182574",
"0.63820374",
"0.6335233",
"0.6334831",
"0.632251",
"0.63033515",
"0.629292... | 0.6677059 | 8 |
Evaluates a Python code object and returns the result. | public PyObject eval(PyObject code) {
return null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Object eval (Object expression);",
"Hojas eval();",
"public abstract Object eval();",
"String evaluate();",
"public Object eval(String expression) throws Exception;",
"Result evaluate();",
"public String evaluate(String expression);",
"private GenericVar run(String code) throws InterpreterExce... | [
"0.7211698",
"0.710799",
"0.7073301",
"0.7010001",
"0.6982851",
"0.6928985",
"0.66976684",
"0.6630523",
"0.6528296",
"0.64276844",
"0.630709",
"0.6298708",
"0.6297011",
"0.6194884",
"0.6185746",
"0.6165434",
"0.61368346",
"0.60906595",
"0.60739547",
"0.6020173",
"0.5974589",
... | 0.6683239 | 7 |
Executes a string of Python source in the local namespace. In some environments, such as Windows, Unicode characters in the script will be converted into ascii question marks (?). This can be avoided by first compiling the fragment using PythonInterpreter.compile(), and using the overridden form of this method which takes a PyCode object. Code page declarations are not supported. | public void exec(String s) {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public PyCode compile(String script) {\n return null;\n }",
"public void exec(PyObject code) {\n }",
"abstract public PyCode getMain();",
"public static String compileAndRun(String code) throws Exception {\n\t\treturn run(LavaCompiler.compile(code));\n\t}",
"public String build() {\n St... | [
"0.64098126",
"0.59501284",
"0.58379465",
"0.5332252",
"0.53024155",
"0.5274264",
"0.52659327",
"0.52612054",
"0.521353",
"0.5197632",
"0.5059994",
"0.50246406",
"0.49952644",
"0.49616835",
"0.4933018",
"0.49138016",
"0.4889927",
"0.48841244",
"0.4882561",
"0.48652917",
"0.48... | 0.45108983 | 75 |
Executes a Python code object in the local namespace. | public void exec(PyObject code) {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public T execute() {\n return GraalCompiler.compile(this);\n }",
"public PyObject eval(PyObject code) {\n return null;\n }",
"private GenericVar run(String code) throws InterpreterException {\n\t\treturn evaluate(code);\n\t}",
"public PyCode compile(String script) {\n retur... | [
"0.58777493",
"0.5804124",
"0.579986",
"0.5678337",
"0.56425655",
"0.5591118",
"0.55570364",
"0.55509424",
"0.55132765",
"0.5492137",
"0.54269356",
"0.5362072",
"0.5294994",
"0.5293668",
"0.5281345",
"0.5270161",
"0.52479714",
"0.5247891",
"0.5239541",
"0.5233995",
"0.5229606... | 0.7103875 | 0 |
Executes a file of Python source in the local namespace. | public void execfile(String filename) {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void source(String path) throws Exception;",
"public void runFile(String filename) {\n }",
"public void exec(PyObject code) {\n }",
"public static void main(String[] args) {\n\t\t\n\t\tchar[] buffer = \"\\\"use strict\\\";\\r\\nfunction sum(x, y){ return x + y }\".toCharArray();\n\t\tSource sour... | [
"0.6175434",
"0.5896738",
"0.58869964",
"0.56069565",
"0.5587817",
"0.5524488",
"0.54625994",
"0.546042",
"0.54237324",
"0.53288776",
"0.5287629",
"0.5281796",
"0.5179545",
"0.5161735",
"0.51518875",
"0.5144425",
"0.514052",
"0.51342404",
"0.51330215",
"0.5124069",
"0.5106872... | 0.5972238 | 1 |
Compiles a string of Python source as either an expression (if possible) or a module. Designed for use by a JSR 223 implementation: "the Scripting API does not distinguish between scripts which return values and those which do not, nor do they make the corresponding distinction between evaluating or executing objects." (SCR.4.2.1) | public PyCode compile(String script) {
return null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Object eval(String expression) throws Exception;",
"Hojas eval();",
"public PyObject eval(String s) {\n return null;\n }",
"public String compile () throws IOException, RhinoEvaluatorException {\n return compile(1, null);\n }",
"public Object eval (Object expression);",
"public... | [
"0.615322",
"0.601708",
"0.5979671",
"0.5933329",
"0.5870772",
"0.56527126",
"0.5647737",
"0.5644364",
"0.56363237",
"0.5615925",
"0.54857296",
"0.5373654",
"0.5355313",
"0.5355182",
"0.5345493",
"0.53190297",
"0.5298634",
"0.5296948",
"0.5290355",
"0.52870303",
"0.5285944",
... | 0.64047694 | 0 |
Sets a variable in the local namespace. | public void set(String name, Object value) {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setOriginalVariable(GlobalVariable var) {\n originalVariable = var;\n }",
"private void updateLocalVar(Node node, String localVarName) {\n\t\tif (node == null) {\n\t\t\treturn;\n\t\t}\n\t\tNodeList localVarNodeList = ((Element) node).getElementsByTagName(LOCAL_VARIABLE_NAME);\n\t\tif (local... | [
"0.6412899",
"0.6354694",
"0.6245931",
"0.6162933",
"0.6162933",
"0.6147463",
"0.61443514",
"0.6103241",
"0.6053576",
"0.59031546",
"0.58686185",
"0.5789237",
"0.5759505",
"0.5759147",
"0.57390237",
"0.57178247",
"0.570706",
"0.56947404",
"0.56889284",
"0.5625272",
"0.5625106... | 0.0 | -1 |
Sets a variable in the local namespace. | public void set(String name, PyObject value) {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setOriginalVariable(GlobalVariable var) {\n originalVariable = var;\n }",
"private void updateLocalVar(Node node, String localVarName) {\n\t\tif (node == null) {\n\t\t\treturn;\n\t\t}\n\t\tNodeList localVarNodeList = ((Element) node).getElementsByTagName(LOCAL_VARIABLE_NAME);\n\t\tif (local... | [
"0.6413929",
"0.63565147",
"0.62455785",
"0.6164186",
"0.6164186",
"0.61492544",
"0.614487",
"0.61046755",
"0.6054664",
"0.5904529",
"0.58702534",
"0.57906455",
"0.57597595",
"0.57588506",
"0.57394767",
"0.5716729",
"0.5708473",
"0.5694575",
"0.5690377",
"0.56264853",
"0.5623... | 0.52075624 | 64 |
Returns the value of a variable in the local namespace. | public PyObject get(String name) {
return null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Object getValue(String name) {\n Object value = localScope.get(name);\n if ( value!=null ) {\n return value;\n }\n // if not found\n BFlatGUI.debugPrint(0, \"undefined variable \"+name);\n return null;\n }",
"String ge... | [
"0.66311765",
"0.65774655",
"0.651751",
"0.6501784",
"0.6481067",
"0.6295432",
"0.62374973",
"0.62324464",
"0.62160593",
"0.61773455",
"0.6123486",
"0.60480374",
"0.59588796",
"0.5951477",
"0.59125376",
"0.58747894",
"0.58429235",
"0.58278203",
"0.5818993",
"0.58028895",
"0.5... | 0.0 | -1 |
Returns the value of a variable in the local namespace. The value will be returned as an instance of the given Java class. interp.get("foo", Object.class) will return the most appropriate generic Java object. | public <T> T get(String name, Class<T> javaclass) {
return null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Variable getVariable(String name);",
"public Object getValue(String name) {\n Object value = localScope.get(name);\n if ( value!=null ) {\n return value;\n }\n // if not found\n BFlatGUI.debugPrint(0, \"undefined variable \"+name);\n ... | [
"0.63055956",
"0.59261024",
"0.59242654",
"0.58225566",
"0.581872",
"0.56904024",
"0.552103",
"0.5490422",
"0.54818773",
"0.5449335",
"0.534754",
"0.525976",
"0.52105916",
"0.51877195",
"0.51372176",
"0.51287585",
"0.51160955",
"0.5107954",
"0.5071696",
"0.50548625",
"0.50423... | 0.0 | -1 |
This add function will add the values in a tree by taking its sequence and then taking each value and comparing it with the edge assigned to the root node. | public void add(String data, String sequence){
Node temp = this.root;
int i = 0;
for(i=0;i<sequence.length()-1;i++){
if(sequence.charAt(i)=='0'){
if(temp.left == null){
temp.left = new Node();
temp = temp.left;
}
else{
temp = (Node) temp.left;
}
}
else
if(sequence.charAt(i)=='1'){
if(temp.right == null){
temp.right = new Node();
temp = temp.right;
}
else{
temp = (Node) temp.right;
}
}
}
if(sequence.charAt(i)=='0'){
temp.left = new Node(data);
}
else{
temp.right = new Node(data);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void add(E val){\n if(mData.compareTo(val) > 0){\n if(mLeft == null){\n mLeft = new BSTNode(val);\n mLeft.mParent = this;\n }//End if null\n else if(mRight == null){\n mRight = new BSTNode(val);\n mRight.mPar... | [
"0.6358634",
"0.632887",
"0.62942314",
"0.6285818",
"0.62103647",
"0.6181992",
"0.6171988",
"0.6164574",
"0.6151475",
"0.61193824",
"0.61016816",
"0.61015534",
"0.60949254",
"0.6088183",
"0.60117495",
"0.5899937",
"0.5896894",
"0.5866232",
"0.5837573",
"0.58326024",
"0.578126... | 0.6655656 | 0 |
This getDecodedMessage function will take the encoded sequence, takes the first character in the sequence and compares it with the edge of the root node and traverses on the left or the right node. | public void getDecodedMessage(String encoding){
String output = "";
Node temp = this.root;
for(int i = 0;i<encoding.length();i++){
if(encoding.charAt(i) == '0'){
temp = temp.left;
if(temp.left == null && temp.right == null){
System.out.print(temp.getData());
temp = this.root;
}
}
else
{
temp = temp.right;
if(temp.left == null && temp.right == null){
System.out.print(temp.getData());
temp = this.root;
}
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void decodeMessage() {\n StringBuilder decoded = new StringBuilder();\n\n for (int i = 0; i < message.length(); i += 3) {\n if (message.charAt(i) == message.charAt(i + 1)) {\n decoded.append(message.charAt(i));\n } else if (message.charAt(i) == message.char... | [
"0.66275716",
"0.6413177",
"0.63858366",
"0.609118",
"0.591569",
"0.58386",
"0.58059365",
"0.5455758",
"0.5390628",
"0.5340612",
"0.5323122",
"0.5320734",
"0.53083193",
"0.51757205",
"0.5133429",
"0.50807405",
"0.5075929",
"0.5074009",
"0.5072767",
"0.5058519",
"0.50470257",
... | 0.7325749 | 0 |
This is the main function which does all the execution. | public static void main(String[] args)
{
Huffman tree= new Huffman();
Scanner sc=new Scanner(System.in);
noOfFrequencies=sc.nextInt();
// It adds all the user input values in the tree.
for(int i=1;i<=noOfFrequencies;i++)
{
String temp=sc.next();
tree.add(temp,sc.next());
}
int lengthToDecode=sc.nextInt();
String encodedValue=sc.next();
// This statement decodes the encoded values.
tree.getDecodedMessage(encodedValue);
System.out.println();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void main() {\n \n }",
"public static void main()\n\t{\n\t}",
"public static void main(){\n\t}",
"public static void main(String args[]) throws Exception\n {\n \n \n \n }",
"public static void main() {\n }",
"public static void main(String[] args) {\n ... | [
"0.7878412",
"0.7747893",
"0.76762664",
"0.74245924",
"0.741774",
"0.72739816",
"0.7263218",
"0.7196411",
"0.7180009",
"0.7173713",
"0.7168664",
"0.7152493",
"0.7141398",
"0.71329015",
"0.71314406",
"0.71314406",
"0.7121422",
"0.7113771",
"0.7109786",
"0.70976025",
"0.7097602... | 0.0 | -1 |
the edge (weight) to neighbor vertex. | public Neighbor(Vertex v, int edgeWeight) {
vertex = v;
edge = edgeWeight;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"double getEdgeWeight();",
"public int getWeight(){\n\t\treturn this.edgeWeight;\n\t}",
"public int getWeight()\r\n\t{\r\n\t\treturn edgeWeight;\t\t\r\n\t}",
"@Override\n public double getEdgeWeight() {\n return edgeWeight;\n }",
"public Double getEdgeWeight(Edge p_edge) {\n\t\tint id = p_edge.... | [
"0.8031618",
"0.77162087",
"0.76065636",
"0.7582773",
"0.70660114",
"0.7062799",
"0.6950543",
"0.69468355",
"0.6685372",
"0.66744286",
"0.6662502",
"0.66060984",
"0.65968436",
"0.6550798",
"0.651725",
"0.6505973",
"0.649242",
"0.646324",
"0.6462055",
"0.64550096",
"0.6440794"... | 0.636691 | 25 |
Initially the graph should have 26 vertices labeled 'A', 'B', 'C', ..., 'Z' and no edges, and the current vertex should be 'A' | Graph() {
vertices = new LinkedList<Vertex>();
edges = 0;
for (int i = 0; i < 26; i++) {
// ASCII value of 'A' is 65
Vertex vertex = new Vertex((char) (i + 65));
vertices.add(vertex);
}
currentVertex = vertices.get(0);
seen = new boolean[26];
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private List<Vertex> prepareGraphAdjacencyList() {\n\n\t\tList<Vertex> graph = new ArrayList<Vertex>();\n\t\tVertex vertexA = new Vertex(\"A\");\n\t\tVertex vertexB = new Vertex(\"B\");\n\t\tVertex vertexC = new Vertex(\"C\");\n\t\tVertex vertexD = new Vertex(\"D\");\n\t\tVertex vertexE = new Vertex(\"E\");\n\t\tV... | [
"0.6646043",
"0.6602837",
"0.6386937",
"0.63093865",
"0.627911",
"0.6235726",
"0.61922807",
"0.61689734",
"0.6165844",
"0.61488265",
"0.6139718",
"0.6133006",
"0.6113054",
"0.6064468",
"0.6053043",
"0.60462815",
"0.60244447",
"0.60016155",
"0.5994447",
"0.59559625",
"0.595049... | 0.7379464 | 0 |
/ Return the number of edges in the graph. | public int numEdges() {
return edges;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"int getNumberOfEdges();",
"public int getNumEdges() {\n\t\treturn edges.size();\n\t}",
"public int numEdges();",
"public int getNumberOfEdges();",
"int getEdgeCount();",
"public int getEdgeCount() {\n return edge_.size();\n }",
"public int getNumEdges()\n\t{\n\t\t//TODO: Implement this method i... | [
"0.8651609",
"0.8564569",
"0.85052556",
"0.8477237",
"0.8429774",
"0.8371679",
"0.8344664",
"0.8320758",
"0.83171886",
"0.83145225",
"0.8270574",
"0.822289",
"0.8200661",
"0.8199919",
"0.8166396",
"0.812313",
"0.80748",
"0.8070937",
"0.80614215",
"0.8044037",
"0.8007625",
"... | 0.84571666 | 4 |
/ Given the label, return the vertex. | Vertex findVertex(char v) {
for (int i = 0; i < vertices.size(); i++) {
if (vertices.get(i).label == v)
return vertices.get(i);
}
return null; // return null if not found.
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public DSAGraphVertex getVertex(String label)\n\t{\n\t\tDSAGraphVertex temp, target = null;\n\t\tIterator<DSAGraphVertex> itr = vertices.iterator();\n\t\tif(vertices.isEmpty()) // case: list is empty\n\t\t{\n\t\t\tthrow new NoSuchElementException(\"Vertices list is empty.\");\n\t\t}\n\t\telse //searches for target... | [
"0.7944401",
"0.7145686",
"0.7075981",
"0.693663",
"0.6894625",
"0.67946035",
"0.6735441",
"0.66198736",
"0.65875065",
"0.65341216",
"0.64441055",
"0.6366332",
"0.6363934",
"0.6303307",
"0.62608135",
"0.62365353",
"0.6209113",
"0.62011003",
"0.6199416",
"0.6166567",
"0.616602... | 0.7207521 | 1 |
/ Given a label & in/out list, return the Neighbor. | Neighbor findNeighbor(LinkedList<Neighbor> list, char v) {
for (int i = 0; i < list.size(); i++) {
if (list.get(i).vertex.label == v)
return list.get(i);
}
return null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public abstract ArrayList<String> neighbours(String vertLabel);",
"java.util.List<rina.object.gpb.Neighbour_t.neighbor_t> \n getNeighborList();",
"public List<MyPair> outNearestNeighbours(int k, String vertLabel) {\n /* Return out nearest neighbours, search for the rowLength that contains vertL... | [
"0.61060053",
"0.60746694",
"0.5852161",
"0.5738095",
"0.57315046",
"0.55723995",
"0.5362553",
"0.5354315",
"0.5298424",
"0.52972996",
"0.526081",
"0.5237821",
"0.51745063",
"0.5158433",
"0.515126",
"0.5121952",
"0.5097362",
"0.5064862",
"0.5054934",
"0.5025902",
"0.50186586"... | 0.5642785 | 5 |
/ Set the current vertex to the vertex with label v. | public void gotoVertex(char v) {
for (int i = 0; i < vertices.size(); i++) {
if (vertices.get(i).label == v) {
currentVertex = vertices.get(i);
return;
}
}
System.out.println("The vertex " + v + " does not exist.");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void set(int index, PVector v, String label) {\n\t\tif (index == points.size()) {\n\t\t\tpoints.add(new GPoint(v, label));\n\t\t} else {\n\t\t\tpoints.get(index).set(v, label);\n\t\t}\n\t}",
"public V addVertex(V v);",
"public Vertex(String label, int index){\n this.label = label;\n this.i... | [
"0.7358518",
"0.6908976",
"0.6907744",
"0.6904689",
"0.6858007",
"0.6754518",
"0.6738055",
"0.67080146",
"0.668281",
"0.6678459",
"0.66601074",
"0.66454476",
"0.6645407",
"0.6641618",
"0.6507064",
"0.6436419",
"0.6422774",
"0.6385729",
"0.6380999",
"0.63615286",
"0.6334673",
... | 0.7300225 | 1 |
/ Return the indegree of the current vertex. | public int inDegree() {
return currentVertex.inList.size();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int getDegree(V vertex);",
"public int degreeOf(V vertex);",
"public int indegree(int v) {\r\n validateVertex(v);\r\n return indegree[v];\r\n }",
"public int getIndegree()\n\t{\n\t\treturn indegree ; \n\t}",
"public int getInDegree() {\n\t\treturn inDegree;\n\t}",
"int getIndegree... | [
"0.81221175",
"0.8048408",
"0.7621652",
"0.7596607",
"0.73841375",
"0.72686046",
"0.70981205",
"0.7010053",
"0.6902977",
"0.6891928",
"0.68688864",
"0.68593293",
"0.6828121",
"0.6793559",
"0.67924863",
"0.67256206",
"0.6723976",
"0.6717972",
"0.67119646",
"0.66846293",
"0.668... | 0.80606407 | 1 |
/ Return the outdegree of the current vertex. | public int outDegree() {
return currentVertex.outList.size();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int outdegree(int v) {\r\n validateVertex(v);\r\n return adj[v].size();\r\n }",
"public int getOutDegree() {\n\t\treturn outDegree;\n\t}",
"public int getDegree(V vertex);",
"public int getOutDegree(int node) {\n return outDegree[node];\n }",
"public int indegree(int v) {\r\n ... | [
"0.72136164",
"0.7192735",
"0.7028509",
"0.7001217",
"0.6872808",
"0.68479913",
"0.6824347",
"0.6802423",
"0.67758566",
"0.6612638",
"0.65732133",
"0.6556005",
"0.6432849",
"0.6404333",
"0.6381589",
"0.6159237",
"0.6154988",
"0.61444473",
"0.6066016",
"0.60585487",
"0.6023276... | 0.7298364 | 0 |
/ [TEST] Print labels of all the vertices in graph. | public void printVertices() {
for (int i = 0; i < vertices.size(); i++)
System.out.print(vertices.get(i).label);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void printGraph() {\n\t\tSystem.out.println(\"-------------------\");\n\t\tSystem.out.println(\"Printing graph...\");\n\t\tSystem.out.println(\"Vertex=>[Neighbors]\");\n\t\tIterator<Integer> i = vertices.keySet().iterator();\n\t\twhile(i.hasNext()) {\n\t\t\tint name = i.next();\n\t\t\tSystem.out.println(nam... | [
"0.71007115",
"0.6977866",
"0.6884188",
"0.6828852",
"0.6784143",
"0.67088276",
"0.66909224",
"0.6670032",
"0.6615184",
"0.65508384",
"0.65102315",
"0.6501796",
"0.6488034",
"0.6466866",
"0.64625955",
"0.64450073",
"0.644372",
"0.64288837",
"0.63994056",
"0.6340202",
"0.63154... | 0.78364366 | 0 |
/ Print the labels of all incoming edges to current vertex. | public void inIncidentEdges() {
for (int i = 0; i < currentVertex.inList.size(); i++) {
System.out.print(currentVertex.inList.get(i).edge + " ");
}
printLine();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void printVertices() {\r\n\t\tfor (int i = 0; i < vertices.size(); i++)\r\n\t\t\tSystem.out.print(vertices.get(i).label);\r\n\t}",
"public void inAdjacentVertices() {\r\n\t\tfor (int i = 0; i < currentVertex.inList.size(); i++) {\r\n\t\t\tSystem.out.print(currentVertex.inList.get(i).vertex.label + \" \");... | [
"0.728347",
"0.71666694",
"0.6925768",
"0.69068336",
"0.68868995",
"0.6791797",
"0.6762516",
"0.66989607",
"0.66834843",
"0.66052574",
"0.6586341",
"0.65670127",
"0.656309",
"0.654082",
"0.6518258",
"0.6328882",
"0.62789613",
"0.6230605",
"0.62292594",
"0.6217683",
"0.6198808... | 0.71913004 | 1 |
/ Print the labels of all outgoing edges from current vertex. | public void outIncidentEdges() {
for (int i = 0; i < currentVertex.outList.size(); i++) {
System.out.print(currentVertex.outList.get(i).edge + " ");
}
printLine();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void outAdjacentVertices() {\r\n\t\tfor (int i = 0; i < currentVertex.outList.size(); i++) {\r\n\t\t\tSystem.out.print(currentVertex.outList.get(i).vertex.label + \" \");\r\n\t\t}\r\n\t\tprintLine();\r\n\t}",
"public void inIncidentEdges() {\r\n\t\tfor (int i = 0; i < currentVertex.inList.size(); i++) {\r... | [
"0.7109356",
"0.68756795",
"0.6850605",
"0.6809067",
"0.6734066",
"0.67262775",
"0.6616089",
"0.66052425",
"0.6593291",
"0.65877",
"0.6575377",
"0.6515346",
"0.64921695",
"0.64900905",
"0.6438033",
"0.640261",
"0.63866",
"0.6379",
"0.637627",
"0.63753533",
"0.6372398",
"0.6... | 0.73081505 | 0 |
/ Print the labels of all vertices at other endpoint of incoming edges to current vertex. | public void inAdjacentVertices() {
for (int i = 0; i < currentVertex.inList.size(); i++) {
System.out.print(currentVertex.inList.get(i).vertex.label + " ");
}
printLine();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void outAdjacentVertices() {\r\n\t\tfor (int i = 0; i < currentVertex.outList.size(); i++) {\r\n\t\t\tSystem.out.print(currentVertex.outList.get(i).vertex.label + \" \");\r\n\t\t}\r\n\t\tprintLine();\r\n\t}",
"public void printVertices() {\r\n\t\tfor (int i = 0; i < vertices.size(); i++)\r\n\t\t\tSystem.o... | [
"0.72257316",
"0.69845",
"0.69502485",
"0.66344136",
"0.6475875",
"0.63701034",
"0.6354266",
"0.63284385",
"0.62181944",
"0.6158213",
"0.61448646",
"0.6139717",
"0.61168534",
"0.6019002",
"0.60014504",
"0.59846467",
"0.5983054",
"0.59536785",
"0.59453213",
"0.5934629",
"0.590... | 0.74010736 | 0 |
/ Print the labels of all vertices at other endpoint of outgoing edges from current vertex. | public void outAdjacentVertices() {
for (int i = 0; i < currentVertex.outList.size(); i++) {
System.out.print(currentVertex.outList.get(i).vertex.label + " ");
}
printLine();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void outIncidentEdges() {\r\n\t\tfor (int i = 0; i < currentVertex.outList.size(); i++) {\r\n\t\t\tSystem.out.print(currentVertex.outList.get(i).edge + \" \");\r\n\t\t}\r\n\t\tprintLine();\r\n\t}",
"public void inAdjacentVertices() {\r\n\t\tfor (int i = 0; i < currentVertex.inList.size(); i++) {\r\n\t\t\t... | [
"0.7003865",
"0.6925489",
"0.6810123",
"0.6352597",
"0.6337031",
"0.6335268",
"0.6279289",
"0.6198015",
"0.6186791",
"0.6125036",
"0.6098945",
"0.60520667",
"0.60489523",
"0.59902626",
"0.5979188",
"0.5978863",
"0.5975857",
"0.59369344",
"0.5933917",
"0.59292173",
"0.5912686"... | 0.7352096 | 0 |
/ Set current vertex to other endpoint of edge with label e outgoing from current vertex, if such edge exists. | public void followEdge(int e) {
for (int i = 0; i < currentVertex.outList.size(); i++) {
Neighbor neighbor = currentVertex.outList.get(i);
if (neighbor.edge == e) {
currentVertex = neighbor.vertex;
return;
}
}
System.out.println("Edge to " + e + " not exist.");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void addEdgeTo(char v, int e) {\r\n\t\t// does an edge to v already exist?\r\n\t\tfor (int i = 0; i < currentVertex.outList.size(); i++) {\r\n\t\t\tNeighbor neighbor = currentVertex.outList.get(i);\r\n\t\t\tif (neighbor.vertex.label == v) {\r\n\t\t\t\tneighbor.edge = e;\r\n\t\t\t\tfindNeighbor(findVertex(v).inList... | [
"0.6633826",
"0.64578766",
"0.6456439",
"0.6414332",
"0.6355611",
"0.6170315",
"0.6169539",
"0.6159715",
"0.615304",
"0.61495936",
"0.60937905",
"0.6062364",
"0.6057599",
"0.60348356",
"0.59956634",
"0.5973573",
"0.5925298",
"0.5903416",
"0.59019375",
"0.5895465",
"0.5889922"... | 0.68899906 | 0 |
/ Set current vertex to other endpoint of edge with label e incoming to current vertex, if such edge exists. | public void followEdgeInReverse(int e) {
for (int i = 0; i < currentVertex.inList.size(); i++) {
Neighbor neighbor = currentVertex.inList.get(i);
if (neighbor.edge == e) {
currentVertex = neighbor.vertex;
return;
}
}
System.out.println("Edge from " + e + " does not exist.");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void followEdge(int e) {\r\n\t\tfor (int i = 0; i < currentVertex.outList.size(); i++) {\r\n\t\t\tNeighbor neighbor = currentVertex.outList.get(i);\r\n\t\t\tif (neighbor.edge == e) {\r\n\t\t\t\tcurrentVertex = neighbor.vertex;\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\t\tSystem.out.println(\"Edge to \" + e... | [
"0.7116414",
"0.6862044",
"0.67276233",
"0.6589464",
"0.65732616",
"0.6557151",
"0.6472403",
"0.6428967",
"0.6393935",
"0.62956333",
"0.62879807",
"0.62796247",
"0.62776613",
"0.6244268",
"0.6239309",
"0.6222674",
"0.6209657",
"0.6198871",
"0.6192979",
"0.61512274",
"0.614361... | 0.648305 | 6 |
/ Insert a directed edge from v to current vertex with label e, or change the label of existing such edge to e. | public void addEdgeFrom(char v, int e) {
// does an edge from v already exist?
for (int i = 0; i < currentVertex.inList.size(); i++) {
Neighbor neighbor = currentVertex.inList.get(i);
if (currentVertex.inList.get(i).vertex.label == v) {
neighbor.edge = e;
findNeighbor(findVertex(v).outList, currentVertex.label).edge = e;
return;
}
}
// add to current's inList
Neighbor newNeighbor = new Neighbor(findVertex(v), e);
currentVertex.inList.add(newNeighbor);
// add to neighbor's outList
Neighbor current = new Neighbor(currentVertex, e);
newNeighbor.vertex.outList.add(current);
edges++;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void addEdgeTo(char v, int e) {\r\n\t\t// does an edge to v already exist?\r\n\t\tfor (int i = 0; i < currentVertex.outList.size(); i++) {\r\n\t\t\tNeighbor neighbor = currentVertex.outList.get(i);\r\n\t\t\tif (neighbor.vertex.label == v) {\r\n\t\t\t\tneighbor.edge = e;\r\n\t\t\t\tfindNeighbor(findVertex(v).inList... | [
"0.74110556",
"0.71443707",
"0.7132387",
"0.68483657",
"0.684334",
"0.66115206",
"0.6478588",
"0.6470063",
"0.64693236",
"0.63849485",
"0.63475245",
"0.63407123",
"0.6293139",
"0.6277264",
"0.6273099",
"0.62725896",
"0.62602335",
"0.6253858",
"0.6245406",
"0.62377846",
"0.623... | 0.7227673 | 1 |
/ Insert a directed edge from current vertex to v with label e, or change the label of existing such edge to e. | void addEdgeTo(char v, int e) {
// does an edge to v already exist?
for (int i = 0; i < currentVertex.outList.size(); i++) {
Neighbor neighbor = currentVertex.outList.get(i);
if (neighbor.vertex.label == v) {
neighbor.edge = e;
findNeighbor(findVertex(v).inList, currentVertex.label).edge = e;
return;
}
}
// add to current's inList
Neighbor newNeighbor = new Neighbor(findVertex(v), e);
currentVertex.outList.add(newNeighbor);
// add to neighbor's outList
Neighbor current = new Neighbor(currentVertex, e);
newNeighbor.vertex.inList.add(current);
edges++;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void addEdgeWithLabel(NasmInst source, NasmLabel destination) {\n if (source == null || destination == null)\n throw new FgException(\"ERROR: Can't create an edge without a source and a destination\");\n\n if (systemCalls.contains(destination.toString()))\n return; // Sy... | [
"0.72199696",
"0.71839714",
"0.7182563",
"0.69613236",
"0.68727136",
"0.6679027",
"0.65515435",
"0.6524904",
"0.6471557",
"0.6432774",
"0.6409813",
"0.6388265",
"0.63741803",
"0.6337667",
"0.63206726",
"0.6307744",
"0.62986916",
"0.62932014",
"0.6277827",
"0.62719375",
"0.625... | 0.73779285 | 0 |
/ Return true if there exists an edge from v to current vertex, otherwise return false. | public boolean hasEdgeFrom(char v) {
for (int i = 0; i < currentVertex.inList.size(); i++) {
Neighbor neighbor = currentVertex.inList.get(i);
if (neighbor.vertex.label == v)
return true;
}
return false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean hasEdgeTo(char v) {\r\n\t\tfor (int i = 0; i < currentVertex.outList.size(); i++) {\r\n\t\t\tNeighbor neighbor = currentVertex.outList.get(i);\r\n\t\t\tif (neighbor.vertex.label == v)\r\n\t\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}",
"boolean containsEdge(V v, V w);",
"public boolea... | [
"0.7897568",
"0.7815787",
"0.7657973",
"0.7412674",
"0.73839694",
"0.7333488",
"0.7274417",
"0.7229458",
"0.7195288",
"0.7125301",
"0.7075894",
"0.70076025",
"0.6990144",
"0.6990144",
"0.69757175",
"0.6908974",
"0.6870386",
"0.68659735",
"0.6842381",
"0.68150157",
"0.6788164"... | 0.77932006 | 2 |
/ Return true if there exists an edge to v from current vertex, otherwise return false. | public boolean hasEdgeTo(char v) {
for (int i = 0; i < currentVertex.outList.size(); i++) {
Neighbor neighbor = currentVertex.outList.get(i);
if (neighbor.vertex.label == v)
return true;
}
return false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"boolean containsEdge(V v, V w);",
"public boolean hasEdgeFrom(char v) {\r\n\t\tfor (int i = 0; i < currentVertex.inList.size(); i++) {\r\n\t\t\tNeighbor neighbor = currentVertex.inList.get(i);\r\n\t\t\tif (neighbor.vertex.label == v)\r\n\t\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}",
"public boolea... | [
"0.7792609",
"0.7757807",
"0.77024335",
"0.7475363",
"0.7347948",
"0.7324305",
"0.7306237",
"0.72730255",
"0.72674537",
"0.72554076",
"0.7113064",
"0.7038295",
"0.7031409",
"0.70134914",
"0.70078325",
"0.6942875",
"0.6942875",
"0.69396996",
"0.6918545",
"0.6885243",
"0.681622... | 0.7979361 | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.