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 |
|---|---|---|---|---|---|---|
Accessor for the property "NextElement" Setter for property NextElement. Next entry to return. | private void setNextElement(Object entry)
{
__m_NextElement = entry;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private Object getNextElement()\n {\n return __m_NextElement;\n }",
"public Element<T> getNextElement() \n\t{\n\t\treturn nextElement;\n\t}",
"public ListElement<T> getNext()\n\t{\n\t\treturn next;\n\t}",
"public ListElement getNext()\n\t {\n\t return this.next;\n\t }",
"p... | [
"0.7921856",
"0.75661075",
"0.74224365",
"0.73641384",
"0.7268874",
"0.722889",
"0.7154407",
"0.70078325",
"0.6924874",
"0.6905453",
"0.6899853",
"0.68556607",
"0.6844334",
"0.68209743",
"0.68190134",
"0.67970437",
"0.6763587",
"0.67468286",
"0.672607",
"0.67198575",
"0.67140... | 0.6847135 | 12 |
Accessor for the property "NextReady" Setter for property NextReady. True iff the NextEntry is ready. | private void setNextReady(boolean fReady)
{
__m_NextReady = fReady;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private boolean isNextReady()\n {\n return __m_NextReady;\n }",
"public boolean getReady() {\r\n\t\treturn ready;\r\n\t}",
"public boolean isReady() {\n return ready;\n }",
"public boolean isReady() {\n return isReady;\n }",
"public void setHasNext(boolean hasNext) ... | [
"0.763558",
"0.65399057",
"0.60968864",
"0.6081468",
"0.6079297",
"0.6074705",
"0.60620654",
"0.6051115",
"0.60132086",
"0.5985736",
"0.59526926",
"0.5906548",
"0.5889648",
"0.5883458",
"0.5864985",
"0.5858481",
"0.58527184",
"0.585262",
"0.58218753",
"0.58148277",
"0.5789454... | 0.7079917 | 1 |
Default constructor for table sorter | public TableSorter() {
indexes = new int[0];
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public DbTableSorter(int criteria) {\n super();\n this.criteria = criteria;\n }",
"public Table() {\n this.tableName = \"\";\n this.rows = new HashSet<>();\n this.columnsDefinedOrder = new ArrayList<>();\n }",
"private ByaTableModel() {\n\t}",
"public ARCTable() {\n ... | [
"0.6495498",
"0.6494418",
"0.64383006",
"0.64326376",
"0.6400791",
"0.6372595",
"0.6366983",
"0.63310295",
"0.6326964",
"0.6311608",
"0.6268295",
"0.6219725",
"0.6194894",
"0.6193956",
"0.6179394",
"0.6166305",
"0.61653304",
"0.61523986",
"0.6151064",
"0.6134885",
"0.6129084"... | 0.8009061 | 0 |
Describe compare method here | public int compare(int row1, int row2) {
compares++;
for (int level = 0; level < sortingColumns.size(); level++) {
Integer column = sortingColumns.elementAt(level);
int result = compareRowsByColumn(row1, row2, column.intValue());
if (result != 0) {
return ascending ? result : -result;
}
}
return 0;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public abstract void compare();",
"public compare(){\r\n }",
"Comparison createComparison();",
"Comparison createComparison();",
"protected abstract int doCompare(Object o1, Object o2);",
"public void testObjCompare()\n {\n assertEquals( Comparator.EQUAL, Util.objCompare(null,null) );\n... | [
"0.78529453",
"0.76037735",
"0.70743734",
"0.70743734",
"0.70194983",
"0.68464637",
"0.6752105",
"0.6696026",
"0.66475725",
"0.65618914",
"0.65484005",
"0.6544456",
"0.65328526",
"0.64477044",
"0.6424731",
"0.63381964",
"0.6335397",
"0.63227725",
"0.62978",
"0.62956977",
"0.6... | 0.0 | -1 |
Describe tableChanged method here | public void tableChanged(TableModelEvent e) {
reallocateIndexes();
super.tableChanged(e);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic void tableChanged(TableModelEvent arg0) {\n\t\t\n\t}",
"public void tableChanged(TableModelEvent e) \n {\n fireTableChanged(e);\n }",
"@Override\r\n public void tableChanged(TableModelEvent e) {\n\r\n }",
"@Override\n public void tableChanged(TableModelEvent e) {\n ... | [
"0.81208575",
"0.7932226",
"0.78163546",
"0.7800725",
"0.7728758",
"0.75001717",
"0.744723",
"0.7358319",
"0.72869205",
"0.72608644",
"0.7202688",
"0.7202688",
"0.71777815",
"0.71585214",
"0.7117434",
"0.704042",
"0.7034913",
"0.69311124",
"0.6915369",
"0.6914469",
"0.690235"... | 0.72567064 | 10 |
Describe sort method here | public void sort() {
compares = 0;
shuttlesort((int[]) indexes.clone(), indexes, 0, indexes.length);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void sort() {\n }",
"public String doSort();",
"@Override\r\n\tpublic void addSort() {\n\t\t\r\n\t}",
"private Sort() { }",
"void sort();",
"void sort();",
"public String sortBy();",
"@Override\r\n\tpublic void editSort() {\n\t\t\r\n\t}",
"double getSortTime();",
"private static void pe... | [
"0.8277954",
"0.81755173",
"0.7835805",
"0.7703792",
"0.7501076",
"0.7501076",
"0.7267835",
"0.7178116",
"0.71375275",
"0.71078044",
"0.70729816",
"0.7071295",
"0.70702046",
"0.7058513",
"0.7051352",
"0.7019917",
"0.69840574",
"0.69370764",
"0.6933934",
"0.6914205",
"0.688532... | 0.6518724 | 69 |
Describe the shuttlesort method here This is a homegrown implementation which we have not had time to research it may perform poorly in some circumstances. It requires twice the space of an inplace algorithm and makes NlogN assigments shuttling the values between the two arrays. The number of compares appears to vary between N1 and NlogN depending on the initial order but the main reason for using it here is that, unlike qsort, it is stable. | public void shuttlesort(int from[], int to[], int low, int high) {
if (high - low < 2) {
return;
}
int middle = (low + high) / 2;
shuttlesort(to, from, low, middle);
shuttlesort(to, from, middle, high);
int p = low;
int q = middle;
if (high - low >= 4 && compare(from[middle - 1], from[middle]) <= 0) {
for (int i = low; i < high; i++) {
to[i] = from[i];
}
return;
}
for (int i = low; i < high; i++) {
if (q >= high || (p < middle && compare(from[p], from[q]) <= 0)) {
to[i] = from[p++];
} else {
to[i] = from[q++];
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void sort() {\n compares = 0;\n shuttlesort((int[]) indexes.clone(), indexes, 0, indexes.length);\n }",
"private void testCountingSort() {\n int listSize = 1000000;\r\n // Generate list of random values\r\n int[] a = new int[listSize];\r\n Random r = new Random... | [
"0.671155",
"0.6648635",
"0.6627508",
"0.66226125",
"0.6510521",
"0.6503075",
"0.6413171",
"0.64026636",
"0.63881147",
"0.6346409",
"0.63184935",
"0.63008094",
"0.6293752",
"0.62266207",
"0.62258303",
"0.622007",
"0.6216299",
"0.6204864",
"0.6182106",
"0.61675006",
"0.6167416... | 0.7238507 | 0 |
Describe getValueAt here The mapping only affects the contents of the data rows. Pass all requests to these rows through the mapping array: "indexes". | public Object getValueAt(int aRow, int aColumn) {
return model.getValueAt(indexes[aRow], aColumn);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic Object getValueAt(int arg0, int arg1) {\n\t\treturn rowData[arg0][arg1];\r\n\t}",
"@Override\n\tpublic Object getValueAt(int arg0, int arg1) {\n\t\treturn data[arg0][arg1];\n\t}",
"@Override\n\tpublic Object getValueAt(int arg0, int arg1) {\n\t\treturn data[arg0][arg1];\n\t}",
"public O... | [
"0.67914665",
"0.6770224",
"0.6770224",
"0.67364174",
"0.6706539",
"0.6541299",
"0.638572",
"0.632192",
"0.62932503",
"0.62327576",
"0.62208945",
"0.6217246",
"0.6207736",
"0.62076795",
"0.6145689",
"0.61372864",
"0.6120965",
"0.6117007",
"0.6117007",
"0.6115319",
"0.6092605"... | 0.6046414 | 24 |
method getColumnName(int) is to get the column names at the specified index | public String getColumnName(int theCol) {
return this.model.getColumnName(theCol);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getColumnName(int index) {\n\t\treturn columnNames[index];\n\t}",
"public String getColumnName(int index)\n {\n return header[index];\n }",
"@Override\n public String getColumnName(int columnIndex) {\n return columnNames[columnIndex];\n }",
"public String g... | [
"0.87235206",
"0.85557276",
"0.84513247",
"0.8417052",
"0.8376124",
"0.83609176",
"0.8335997",
"0.8333004",
"0.8310636",
"0.8240509",
"0.8164153",
"0.8164153",
"0.8158931",
"0.81238127",
"0.81238127",
"0.8084789",
"0.8055978",
"0.80537736",
"0.8041775",
"0.8022719",
"0.802271... | 0.7502621 | 45 |
Describe method addMouseListenerToHeaderInTable here Add a mouse listener to the Table to trigger a table sort when a column heading is clicked in the JTable. If the tableheader is clicked, the tabel will be sorted according to the clicked option. Meanwhile, the table header renderer is renderering image to the header. | public void addMouseListenerToHeaderInTable(JTable table) {
final TableSorter sorter = this;
final JTable tableView = table;
tableView.setColumnSelectionAllowed(false);
MouseAdapter listMouseListener = new MouseAdapter() {
public void mouseClicked(MouseEvent e) {
TableColumnModel columnModel = tableView.getColumnModel();
int viewColumn = columnModel.getColumnIndexAtX(e.getX());
int clickedColumn = tableView.convertColumnIndexToModel(viewColumn);
if (e.getClickCount() == 1 && clickedColumn != -1) {
TableSorter.this.sortingColumn = clickedColumn;
int shiftPressed = e.getModifiers() & InputEvent.SHIFT_MASK;
boolean ascending = (shiftPressed == 0);
sorter.sortByColumn(clickedColumn, ascending);
TableSorter.this.sorted = true;
int colIndex = tableView.getColumnCount();
javax.swing.table.TableColumn tc;
for (int i = 0; i < colIndex; i++) {
tc = columnModel.getColumn(i);
if (i != viewColumn) {
tc.setHeaderRenderer(null);
}
}
tc = columnModel.getColumn(viewColumn);
System.out.println(" the clicked column name is " + tableView.getColumnName(viewColumn));
DefaultTableCellRenderer headerRenderer = TableSorter.this.createTableCellRenderer(ascending);
tc.setHeaderRenderer(headerRenderer);
}
}
};
JTableHeader th = tableView.getTableHeader();
th.addMouseListener(listMouseListener);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void addMouseListenerToHeaderInTable(JTable table) {\n final JTable tableView = table;\r\n tableView.setColumnSelectionAllowed(false);\r\n MouseAdapter listMouseListener = new MouseAdapter() {\r\n public void mouseClicked(MouseEvent e) {\r\n TableColumnModel co... | [
"0.84085715",
"0.6974723",
"0.66573215",
"0.6573982",
"0.62961876",
"0.6282108",
"0.6240614",
"0.6114265",
"0.6048928",
"0.6045942",
"0.6000361",
"0.59354335",
"0.59273726",
"0.5925779",
"0.5924053",
"0.59072816",
"0.5797542",
"0.5746048",
"0.57454705",
"0.57371837",
"0.57304... | 0.86299 | 0 |
Describe setSortingStutus method here | public void setSortingStatus(boolean sorted) {
this.sorted = sorted;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void editSort() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void addSort() {\n\t\t\r\n\t}",
"public void changeSortOrder();",
"@Override\n\tpublic void setSorting(Object[] propertyIds, boolean[] ascending) {\n\t\t\n\t}",
"public void sort() {\n }",
"public void sort() {\r\n //... | [
"0.73902917",
"0.7317646",
"0.71051085",
"0.7016945",
"0.6998372",
"0.689873",
"0.66692436",
"0.6635858",
"0.6635858",
"0.6635858",
"0.6635858",
"0.6635858",
"0.6635858",
"0.6635858",
"0.6635858",
"0.6635858",
"0.6615279",
"0.6571612",
"0.65548486",
"0.64769185",
"0.6462108",... | 0.6727448 | 6 |
Describe method getSortingColumn here | public int getSortingColumn() {
return this.sortingColumn;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"String getSortColumn();",
"ColumnSortList.ColumnSortInfo getSortInfo();",
"List<Employee> sort(Sorting selectedSortColoumn) throws SQLException;",
"private void fetchSortingConfig() {\n IndexingConfig indexingConfig = _tableConfig.getIndexingConfig();\n List<String> sortedColumns = indexingConfig.getSo... | [
"0.87460154",
"0.80328876",
"0.71862346",
"0.6980295",
"0.6964061",
"0.6922244",
"0.68654984",
"0.67308205",
"0.6712358",
"0.66662633",
"0.66626424",
"0.66115636",
"0.6579742",
"0.6519756",
"0.65166485",
"0.65122104",
"0.6510323",
"0.6483628",
"0.6447132",
"0.6438278",
"0.642... | 0.80074847 | 2 |
Method to create the DefualtTableCellRenderer | @SuppressWarnings("serial")
public DefaultTableCellRenderer createTableCellRenderer(boolean ascending) {
final boolean isAscending = ascending;
DefaultTableCellRenderer tableHeaderRenderer = new DefaultTableCellRenderer() {
public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
ImageIcon up = new ImageIcon();
ImageIcon down = new ImageIcon();
String path = ResourceUtil.getResource(TableSorter.class, "image.path");
String upArrow = ResourceUtil.getResource(TableSorter.class, "image.file.upArrow");
String downArrow = ResourceUtil.getResource(TableSorter.class, "image.file.downArrow");
try {
up = new ImageIcon(Toolkit.getDefaultToolkit().getImage(ClassLoader.getSystemResource(path + upArrow)));
down = new ImageIcon(Toolkit.getDefaultToolkit().getImage(ClassLoader.getSystemResource(path + downArrow)));
} catch (Exception ex) {
System.out.println(" Image fetching exception :" + ex);
Log.log(Log.ERROR, new Throwable(), ex, ResourceUtil.getMessage(TableSorter.class, "image_fetching_exception"));
}
JButton headerCellRenderer = new JButton();
headerCellRenderer.setText((value == null) ? "" : value.toString());
headerCellRenderer.setBackground(UIManager.getColor("Button.pressed"));
headerCellRenderer.setBorder(new CompoundBorder(new BevelBorder(BevelBorder.RAISED, Color.gray, Color.white), new EmptyBorder(2, 2, 2, 2)));
if (isAscending) {
headerCellRenderer.setIcon(up);
} else {
headerCellRenderer.setIcon(down);
}
return headerCellRenderer;
}
};
return tableHeaderRenderer;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public ObjectTableCellRenderer() {\r\n\t\tsuper();\r\n\t}",
"private void setDefaultRenderer() {\n setDefaultRenderer(Object.class, new SimpleTableCellRenderer());\n setDefaultRenderer(Boolean.class, new CheckRenderer());\n setDefaultRenderer(Integer.class, new NumericRenderer());\n s... | [
"0.73538035",
"0.6680812",
"0.64261675",
"0.6380772",
"0.6338674",
"0.63295525",
"0.6323906",
"0.6257471",
"0.6255356",
"0.62348425",
"0.6033888",
"0.6015126",
"0.60045415",
"0.59667903",
"0.5951799",
"0.58943594",
"0.5839106",
"0.582863",
"0.582581",
"0.5814872",
"0.58090436... | 0.6119675 | 10 |
Created by Niranjan Reddy on 20032018. | public interface BottomNavigationClicked {
public void onBottomNavigationClicked();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void perish() {\n \n }",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"public final void mo51373a() {\n }",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"private stendhal() {\n\t}",
"@Overri... | [
"0.58651066",
"0.5768922",
"0.57352585",
"0.56702816",
"0.5653434",
"0.56414986",
"0.56374437",
"0.5602348",
"0.5602348",
"0.55865407",
"0.55608296",
"0.55405724",
"0.55334675",
"0.55334675",
"0.55334675",
"0.55334675",
"0.55334675",
"0.5528025",
"0.5509763",
"0.5503127",
"0.... | 0.0 | -1 |
The web server can handle requests from different clients in parallel. These are called "threads". We do NOT want other threads to manipulate the application object at the same time that we are manipulating it, otherwise bad things could happen. The "synchronized" keyword is used to lock the application object while we're manpulating it. | private BookApplication getBookApp() throws JAXBException, IOException, Exception {
synchronized (application) {
BookApplication bookApp = (BookApplication) application.getAttribute("bookApp");
if (bookApp == null) {
bookApp = new BookApplication();
bookApp.setBookFilePath(application.getRealPath("WEB-INF/books.xml"));
application.setAttribute("bookApp", bookApp);
}
return bookApp;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void run() {\n\t\twhile (true) {\n\t\t\ttry {\n\t\t\t\tSocket client = serverSocket.accept();\n\t\t\t\ttry {\n\t\t\t\t\tSystem.out.println(\"连接到服务器的用户:\" + client);\n\t\t\t\t\t// 定义输入输出流\n\t\t\t\t\tBufferedReader in = new BufferedReader(new InputStreamReader(client.getInputStream()));\n\t\t\t\t\tPrintWriter... | [
"0.5725263",
"0.571137",
"0.56992626",
"0.5621192",
"0.5531395",
"0.5516145",
"0.5515943",
"0.5490838",
"0.54374355",
"0.53785855",
"0.5357733",
"0.5357412",
"0.5356532",
"0.53414845",
"0.5335213",
"0.5332892",
"0.53262424",
"0.53259766",
"0.5322268",
"0.53191197",
"0.5314842... | 0.0 | -1 |
This is the only place that submits the login form and expects the destination to be the home page. A seperate method should be created for the instance of clicking login whilst expecting a login failure. | public NewcommunityPage submitKo() {
driver.findElement(nextLocator).click();
// Return a new page object representing the destination. Should the login page ever
// go somewhere else (for example, a legal disclaimer) then changing the method signature
// for this method will mean that all tests that rely on this behaviour won't compile.
return new NewcommunityPage(driver);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public LoginPage submitLoginExpectingFailure() {\n // This is the only place that submits the login form and expects the\n // destination to be the login page due to login failure.\n driver.findElement(signInButton).submit();\n\n // Return a new page object representing the destination.... | [
"0.8041949",
"0.7226883",
"0.7113725",
"0.7113235",
"0.70862824",
"0.7085927",
"0.70073265",
"0.69753355",
"0.69262314",
"0.6876823",
"0.6740567",
"0.6736609",
"0.67192286",
"0.6684151",
"0.66637594",
"0.6652294",
"0.6622645",
"0.66203046",
"0.6599634",
"0.6590347",
"0.657173... | 0.0 | -1 |
Toast.makeText(MyProfile.this, " "+ set_wallpaper +" "+ write_ext_storage +" "+ call_phone +" "+ send_sms +" "+ read_contacts +" "+ access_file_loc +" ", Toast.LENGTH_SHORT).show(); | @Override
public void onClick(View v) {
boolean checker = DB.saveSetting(set_wallpaper, write_ext_storage, call_phone, send_sms, read_contacts, access_file_loc);
if (checker == true)
Toast.makeText(MyProfile.this, "Save Settings", Toast.LENGTH_SHORT).show();
else
Toast.makeText(MyProfile.this, "Something Wrong", Toast.LENGTH_SHORT).show();
onBackPressed();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void toastmessage(String message){\n Toast.makeText(Accountinfo.this,message,Toast.LENGTH_SHORT).show();\n }",
"private void showToastAfterActivation(Profile profile)\n {\n\n try {\n String profileName = DataWrapperStatic.getProfileNameWithManualIndicatorAsString(profile, t... | [
"0.6621934",
"0.6576332",
"0.63589233",
"0.6348007",
"0.633677",
"0.62978446",
"0.62978446",
"0.6159557",
"0.6143276",
"0.61179024",
"0.60957474",
"0.605933",
"0.60408276",
"0.6033434",
"0.60323036",
"0.60323036",
"0.6022773",
"0.6005032",
"0.60005206",
"0.5977955",
"0.597795... | 0.59144056 | 31 |
Handle action bar item clicks here. The action bar will automatically handle clicks on the Home/Up button, so long as you specify a parent activity in AndroidManifest.xml. | @Override
public boolean onOptionsItemSelected(MenuItem item) {
int id = item.getItemId();
//noinspection SimplifiableIfStatement
if (id == R.id.home) {
NavUtils.navigateUpFromSameTask(this);
return true;
}
//noinspection SimplifiableIfStatement
if (id == R.id.action_about) {
AboutDialog();
return true;
}
//noinspection SimplifiableIfStatement
if (id == R.id.action_exit) {
finish();
return true;
}
return super.onOptionsItemSelected(item);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public boolean onOptionsItemSelected(MenuItem item) { Handle action bar item clicks here. The action bar will\n // automatically handle clicks on the Home/Up button, so long\n // as you specify a parent activity in AndroidManifest.xml.\n\n //\n // HANDLE BACK BUTTON\n ... | [
"0.79046714",
"0.78065175",
"0.7766765",
"0.7727237",
"0.76320195",
"0.7622174",
"0.7585192",
"0.75314754",
"0.74888134",
"0.7458358",
"0.7458358",
"0.7438547",
"0.7421898",
"0.7402884",
"0.73917156",
"0.738695",
"0.73795676",
"0.73704445",
"0.7361756",
"0.7356012",
"0.734561... | 0.7136827 | 56 |
showing custom dialogbox using layout | public void AboutDialog() {
final Dialog dialog = new Dialog(this); // Context, this, etc.
dialog.setContentView(R.layout.about_dialog);
dialog.setTitle(R.string.dialog_title);
Button dialogButton = (Button) dialog.findViewById(R.id.dialog_cancel);
// if button is clicked, close the custom dialog
dialogButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
dialog.dismiss();
}
});
dialog.show();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void showCustomDialog() {\n ViewGroup viewGroup = root.findViewById(((ViewGroup)getView().getParent()).getId());\n\n //then we will inflate the custom alert dialog xml that we created\n final View dialogView = LayoutInflater.from(getContext()).inflate(R.layout.change_icon_dialogue_box, ... | [
"0.71602863",
"0.6924586",
"0.6804285",
"0.677254",
"0.67687476",
"0.6751223",
"0.673907",
"0.6575017",
"0.65711033",
"0.6553414",
"0.65357363",
"0.6485401",
"0.6455364",
"0.64319974",
"0.64146125",
"0.6399945",
"0.6318761",
"0.6305266",
"0.62963754",
"0.62909",
"0.62874585",... | 0.6235797 | 23 |
Constructs a new GameData. GameData's constructor creates and schedules an initial updating task | public ParticleRenderingGameController(int width, int height, WorldToDisplayTransformer worldToDisplayTransformer) {
this.worldToDisplayTransformer = worldToDisplayTransformer;
boundedGameArea = new Rectangle(width, height);
particles = new ArrayList<>();
particleSimulator = new ParticleSimulator(particles); // share the list
// Initialize the time, fps, and other variables
oldTime = System.nanoTime();
nanoseconds = 0;
frames = 0;
updates = 0;
fps = 0;
ups = 0;
// Create the timer that will handle our update task
updateTimer = new java.util.Timer();
// Initializing TimerTask with a default do nothing task to avoid
// having a null reference
updateTask = new TimerTask() {
@Override
public void run() {
// do nothing default initialization
}
};
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public GameTimer()\n \t{\n \t\tsuper();\n \t\tt = new Task();\n \t\tscheduleAtFixedRate( t, 0, 1000 );\n \t\tstartTime = System.currentTimeMillis();\n \t}",
"public Game() {\n this.date = LocalDateTime.now();\n }",
"public AbstractGame() {\n config = new Config(\"config/confi... | [
"0.630497",
"0.6285224",
"0.59785545",
"0.5825206",
"0.5793958",
"0.57611734",
"0.5755235",
"0.5675043",
"0.5672793",
"0.56568444",
"0.56298214",
"0.5619826",
"0.561807",
"0.561675",
"0.5591848",
"0.55745095",
"0.5570194",
"0.5562097",
"0.55527294",
"0.5549252",
"0.5546221",
... | 0.0 | -1 |
do nothing default initialization | @Override
public void run() {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected void initialize() {\n \t// literally do nothing\n }",
"protected void init() {\n init(null);\n }",
"public void init() {\r\n // nothing to do\r\n }",
"@Override\r\n\tpublic final void init() {\r\n\r\n\t}",
"@Override\n\t\tpublic void init() {\n\t\t}",
"public void init() {... | [
"0.7915922",
"0.783468",
"0.7808759",
"0.7803178",
"0.77633613",
"0.776033",
"0.7752568",
"0.77386236",
"0.7731542",
"0.7722885",
"0.77144045",
"0.77129847",
"0.770013",
"0.770013",
"0.770013",
"0.770013",
"0.769692",
"0.76823837",
"0.76823837",
"0.7640311",
"0.7640311",
"0... | 0.0 | -1 |
Starts updating the game at a slow rate. This should only be called once, when we first want to start updating, as it resets the internal tracking of the last time an update occurred. Method may be improved by throwing a unchecked exception for calling it twice, as it will point out the subtle bug of having an inaccurate tracking of the last time an update occurred. | public synchronized void start() {
// For max accuracy, reset oldTime to really reflect how much
// time will have passed since we wanted to start the updating
oldTime = System.nanoTime();
updateGameDataAtSlowRate();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public synchronized void updateGameDataAtFastRate() {\n scheduleGameUpdate(fastUpdateSpeed);\n }",
"public synchronized void updateGameDataAtSlowRate() {\n scheduleGameUpdate(slowUpdateSpeed);\n }",
"public void start(){\n isRunning = true;\n\n // This is where the magic happe... | [
"0.7341376",
"0.720049",
"0.6902338",
"0.6773998",
"0.64227724",
"0.6329754",
"0.63052785",
"0.62784016",
"0.62306356",
"0.6197607",
"0.61621785",
"0.60978246",
"0.60912097",
"0.6043314",
"0.60421777",
"0.6029587",
"0.6026462",
"0.6021827",
"0.59973747",
"0.59560347",
"0.5935... | 0.8093621 | 0 |
Updates the reference to what component to repaint when GameData's update task runs | public synchronized void setGameDrawingComponent(Component comp) {
this.gameDrawingComponent = comp;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void update() {\n\t\tthis.repaint();\r\n\t}",
"public void fullRenderRefresh() {\n gameChanged = true;\n visionChanged = true;\n backgroundChanged = true;\n selectionChanged = true;\n movementChanged = true;\n }",
"private synchronized void updateData... | [
"0.690075",
"0.6723923",
"0.668903",
"0.66085243",
"0.65033317",
"0.65018415",
"0.64589286",
"0.6443917",
"0.6411073",
"0.6409475",
"0.6399333",
"0.63580066",
"0.635093",
"0.63267034",
"0.6326338",
"0.6325583",
"0.6323809",
"0.6306263",
"0.6282956",
"0.6259616",
"0.6254222",
... | 0.0 | -1 |
Returns the latest calculated updates per second | public synchronized int getUPS() {
return ups;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"long getTsUpdate();",
"long getUpdated();",
"private float getRefreshRate() {\n return 1;\n }",
"public long getActualUpdateMs() {\n return mGlobalAvgUpdateMs;\n }",
"public abstract float getSecondsPerUpdate();",
"public long getUpdate();",
"public int getUpdateInterval()\n... | [
"0.6957351",
"0.67241883",
"0.6659012",
"0.66042936",
"0.6528987",
"0.6484727",
"0.6384423",
"0.632075",
"0.6316406",
"0.6267436",
"0.62140065",
"0.6195264",
"0.6094058",
"0.60794467",
"0.60794467",
"0.60794467",
"0.60794467",
"0.60794467",
"0.60794467",
"0.60794467",
"0.6079... | 0.0 | -1 |
Returns the latest calculated frames per second | public synchronized int getFPS() {
return fps;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public float getFramesPerSecond() {\n return 1 / frametime;\n }",
"public float getFrameRate() { return 1000f/_interval; }",
"private double updateFrameRate(long now) {\n long oldFrameTime = frameTimes[frameTimeIndex];\n frameTimes[frameTimeIndex] = now;\n frameTimeIndex = (fram... | [
"0.7598767",
"0.7372706",
"0.7301043",
"0.7222236",
"0.70427704",
"0.699332",
"0.689932",
"0.68717974",
"0.6811589",
"0.67436904",
"0.6732861",
"0.67040116",
"0.6693131",
"0.6662518",
"0.66541857",
"0.66064566",
"0.6600185",
"0.6541795",
"0.6537826",
"0.65290797",
"0.6496813"... | 0.6546933 | 17 |
Stop the previous update task (safe to call if not scheduled) | private synchronized void scheduleGameUpdate(int updateSpeedInMilliseconds) {
updateTask.cancel();
// Create the update task which will simply call updateData
updateTask = new TimerTask() {
@Override
public void run() {
updateData();
}
};
updateTimer.scheduleAtFixedRate(updateTask, 0,
updateSpeedInMilliseconds);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void stopUpdates();",
"public void stop() {\n if (this.runningTaskId != -1) {\n plugin.getServer().getScheduler().cancelTask(this.runningTaskId);\n }\n reset(true);\n running = false;\n }",
"public void stop()\n {\n if (task == -1) {\n retur... | [
"0.7396118",
"0.73555344",
"0.7266499",
"0.6798536",
"0.673968",
"0.67351335",
"0.66889024",
"0.6683652",
"0.6638019",
"0.66340685",
"0.6568192",
"0.6557504",
"0.64902985",
"0.6488083",
"0.6480875",
"0.6442352",
"0.64397615",
"0.64009875",
"0.6376897",
"0.6374594",
"0.6347027... | 0.0 | -1 |
Start updating the game data at a slow update speed | public synchronized void updateGameDataAtSlowRate() {
scheduleGameUpdate(slowUpdateSpeed);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public synchronized void start() {\n // For max accuracy, reset oldTime to really reflect how much\n // time will have passed since we wanted to start the updating\n oldTime = System.nanoTime();\n updateGameDataAtSlowRate();\n }",
"public synchronized void updateGameDataAtFastRate(... | [
"0.8390553",
"0.83250505",
"0.7145082",
"0.7141601",
"0.7064915",
"0.6961051",
"0.68065315",
"0.6769367",
"0.66049486",
"0.6576651",
"0.65683347",
"0.6555647",
"0.6530447",
"0.65245366",
"0.64917535",
"0.6490599",
"0.6433488",
"0.6427121",
"0.6400957",
"0.638746",
"0.63578254... | 0.7864673 | 2 |
Start updating the game data at a fast update speed | public synchronized void updateGameDataAtFastRate() {
scheduleGameUpdate(fastUpdateSpeed);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public synchronized void start() {\n // For max accuracy, reset oldTime to really reflect how much\n // time will have passed since we wanted to start the updating\n oldTime = System.nanoTime();\n updateGameDataAtSlowRate();\n }",
"public synchronized void updateGameDataAtSlowRate(... | [
"0.842425",
"0.74824905",
"0.73025477",
"0.72648937",
"0.7197043",
"0.7137114",
"0.7130171",
"0.68392676",
"0.678704",
"0.6751173",
"0.6724707",
"0.66842544",
"0.6659788",
"0.6659556",
"0.6583058",
"0.6559797",
"0.6513519",
"0.6509226",
"0.6506217",
"0.64978474",
"0.64750916"... | 0.8204974 | 1 |
Draws the GameData as needed | public synchronized void drawGameData(Graphics2D drawingBoard,
int drawAreaWidth,
int drawAreaHeight) {
// This allows our text and graphics to be nice and smooth
drawingBoard.setRenderingHint(
RenderingHints.KEY_TEXT_ANTIALIASING,
RenderingHints.VALUE_TEXT_ANTIALIAS_ON);
drawingBoard.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
RenderingHints.VALUE_ANTIALIAS_ON);
// Always draw over the image with a blank background, so we
// don't see the last frame's drawings! (comment this out and
// see what happens, it's fun pressing the change color button
// rapidly too!)
drawingBoard.setColor(Color.LIGHT_GRAY);
drawingBoard.fillRect(0, 0, drawAreaWidth, drawAreaHeight);
// Creating a graphics object to not clobber parameter drawingBoard
// where MovingCircle's drawing method may change some state of
// the drawingBoard parameter graphics object
Graphics particleGraphics = drawingBoard.create();
// Now draw all the circles, location 0,0 will be top left
// corner within the borders of the window
for (Particle particle : particles) {
Color color = getColor(particle.getType());
particleGraphics.setColor(color);
particleGraphics.fillOval(
worldToDisplayTransformer.getX(particle.getPosition(), drawAreaWidth),
worldToDisplayTransformer.getY(particle.getPosition(), drawAreaHeight),
10, 10);
}
particleGraphics.dispose();
// We should only increment frames here, because Swing coalesces
// repaint calls. So if a repaint is scheduled and hasn't
// completed yet, other repaint requests will be ignored, so
// this is the only spot in code within GameData where we can know
// for sure that a frame has been produced.
// (Assuming this method being called means the graphics will be
// used for a frame update)
frames++;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void draw()\n {\n if(surfaceHolder.getSurface().isValid())\n {\n // Locks the surface. Can't be accessed or changed before it is unlocked again\n canvas = surfaceHolder.lockCanvas();\n\n // Background color\n canvas.drawColor(Color.BLACK);\n\n\n ... | [
"0.745268",
"0.73609",
"0.7259077",
"0.7222675",
"0.7211587",
"0.7204885",
"0.7188709",
"0.7114194",
"0.70847106",
"0.7063939",
"0.69238687",
"0.6922537",
"0.6855504",
"0.67761296",
"0.6775692",
"0.6762347",
"0.6747698",
"0.67466646",
"0.6746398",
"0.6746398",
"0.6735756",
... | 0.694831 | 10 |
Calculating a new fps/ups value every second | private synchronized void updateData() {
if (nanoseconds >= 1000000000) {
fps = frames;
ups = updates;
nanoseconds = nanoseconds - 1000000000;
frames = 0;
updates = 0;
}
long elapsedTime = System.nanoTime() - oldTime;
oldTime = oldTime + elapsedTime;
nanoseconds = nanoseconds + elapsedTime;
particleSimulator.update(elapsedTime * 1e-9);
// An update occurred, increment.
updates++;
// Ask for a repaint if we know of a component to repaint
if (gameDrawingComponent != null) {
gameDrawingComponent.repaint();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public float getFrameRate() { return 1000f/_interval; }",
"private double updateFrameRate(long now) {\n long oldFrameTime = frameTimes[frameTimeIndex];\n frameTimes[frameTimeIndex] = now;\n frameTimeIndex = (frameTimeIndex + 1) % frameTimes.length;\n if (numFrameTimes < frameTimes.le... | [
"0.77647316",
"0.7484612",
"0.74272287",
"0.73831075",
"0.7309039",
"0.730288",
"0.7279802",
"0.7247752",
"0.72277963",
"0.6956005",
"0.6924534",
"0.69142586",
"0.68879616",
"0.68391544",
"0.68259686",
"0.68105686",
"0.6794279",
"0.6739101",
"0.67180955",
"0.67028517",
"0.664... | 0.60802686 | 74 |
ACCESSORS PREDICATES INTERACTIONS METHODS | public static void chartNext() {
chartId = (chartId+(hsPage = 1)) % chary.length;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public interface CustomizeInteractions {\n\t/**\n\t * \n\t * @return current object iteractions\n\t */\n\tpublic Map<> getInteractions();\n}",
"Operations operations();",
"public interface ICommonAction {\n\n void obtainData(Object data, String methodIndex, int status,Map<String, String> parameterMap);\n\n\... | [
"0.6528536",
"0.6336155",
"0.5899511",
"0.5753435",
"0.5748278",
"0.5740486",
"0.5693871",
"0.5671075",
"0.5667105",
"0.56251734",
"0.55504256",
"0.5541442",
"0.5494122",
"0.5487682",
"0.5484292",
"0.5474755",
"0.54678047",
"0.5467004",
"0.5465705",
"0.5457779",
"0.5444564",
... | 0.0 | -1 |
> Class Structure Instance Structure PROPERTIES ACCESSORS PREDICATES INTERACTIONS METHODS | public void dispose() {
super.dispose();
for(AbstractInteract o : obj)
o.dispose();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public interface ActionStateClass extends javax.jmi.reflect.RefClass {\n /**\n * The default factory operation used to create an instance object.\n * @return The created instance object.\n */\n public ActionState createActionState();\n /**\n * Creates an instance object having attributes i... | [
"0.5801613",
"0.56832993",
"0.5467638",
"0.5454348",
"0.54542327",
"0.5427129",
"0.541952",
"0.5365708",
"0.53587776",
"0.53402764",
"0.5269425",
"0.52669805",
"0.52537984",
"0.5247054",
"0.5237605",
"0.5229919",
"0.52254844",
"0.52065355",
"0.5202504",
"0.52001584",
"0.51925... | 0.0 | -1 |
> Instance Structure Constructors | public ScreenMainMenu() {
super(AdapterInputMainMenu.class);
obj.add(new MainMenuInteractObjTest<>(gRef,200,200,new Rectangle(0,0,32,32)));
Chartset.detect("resources\\Charts");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void __sep__Constructors__() {}",
"public Instance() {\n }",
"private Instantiation(){}",
"Reproducible newInstance();",
"public Constructor(){\n\t\t\n\t}",
"public Taginstance() {\n\t\tthis(\"taginstance\", null);\n\t}",
"Instance createInstance();",
"public StructMember() { }",
"Constr... | [
"0.7244289",
"0.7146612",
"0.711849",
"0.6858881",
"0.668636",
"0.66575027",
"0.66316",
"0.6623315",
"0.65750724",
"0.6543215",
"0.6542044",
"0.6480895",
"0.6468551",
"0.6429864",
"0.6428497",
"0.64091575",
"0.64064056",
"0.63879275",
"0.63751566",
"0.6359685",
"0.63322914",
... | 0.0 | -1 |
Inserts given item in the movie list | public boolean insertItem(MoviePanelBasicView item) {
if (!this.contains(item)) {
this.list.add(item);
return true;
} else {
logger.debug("File " + item.getFile() + " is already in list!");
return false;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void insert(Object item);",
"void insertItem(Position position, IItem item);",
"private void addItem(Movie item) {\n mDataset.add(item);\n notifyItemInserted(mDataset.size() );\n notifyDataSetChanged();\n }",
"public void insert(KeyedItem newItem);",
"static void mysteryInser... | [
"0.73593134",
"0.7171097",
"0.6825222",
"0.6680721",
"0.66345817",
"0.65002173",
"0.64596695",
"0.64048404",
"0.6404357",
"0.63649476",
"0.6315292",
"0.6283199",
"0.6262317",
"0.62478495",
"0.6225332",
"0.62174463",
"0.62141013",
"0.62058586",
"0.6204954",
"0.6192648",
"0.618... | 0.67895734 | 3 |
TODO: add sortattribute to method | public void sort() {
Collections.sort(this.list, this);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void sortAttributes(Comparator<TLAttribute> comparator);",
"public void sortTable() {\n\t\tlist = new TableSorter<Attribute>().sortByAttrNameTranslation(getList());\n\t\tdataProvider.flush();\n\t\tdataProvider.refresh();\n\t}",
"public void sortAttributes() {\n\t\tCollections.sort(this.attributes, new F... | [
"0.66686064",
"0.6598774",
"0.65213346",
"0.6275118",
"0.6143268",
"0.61161083",
"0.60726",
"0.60225195",
"0.60005283",
"0.5984586",
"0.59432125",
"0.5928946",
"0.58860296",
"0.5856398",
"0.58426106",
"0.5806692",
"0.5787241",
"0.57715493",
"0.5769484",
"0.57551545",
"0.57481... | 0.0 | -1 |
TODO: currently only sorts by title, implement other options | @Override
public int compare(MoviePanelBasicView arg0, MoviePanelBasicView arg1) {
String title1 = arg0.getData().getMovieTitle();
String title2 = arg1.getData().getMovieTitle();
return title1.compareTo(title2);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void testTitleSort() {\n sorter.inssortTitle();\n list = sorter.getLibrary();\n assertEquals(list.get(0).getTitle(), \"one\");\n assertEquals(list.get(1).getTitle(), \"three\");\n assertEquals(list.get(2).getTitle(), \"two\");\n }",
"public void sortByTitle() {\n\n ... | [
"0.7171249",
"0.7009952",
"0.65764064",
"0.645535",
"0.6390983",
"0.62921906",
"0.62348074",
"0.6216413",
"0.61433035",
"0.61007357",
"0.60812837",
"0.6080353",
"0.607501",
"0.6055907",
"0.60239387",
"0.59673005",
"0.59637934",
"0.59559304",
"0.58708197",
"0.5862378",
"0.5840... | 0.58128387 | 24 |
Creates new form FormRegistrasi | public FormPencarianBuku() {
initComponents();
kosong();
datatable();
textfieldNamaFileBuku.setVisible(false);
textfieldKodeBuku.setVisible(false);
bukuRandom();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void create(Formulario form){\n daoFormulario.create(form);\n }",
"public void register(String form /* should be a Form from GUI */){\n String email = \"email\";\n String nome_completo = \"full_name\";\n Date data_nascimento = new Date(1996-10-21);\n String pas... | [
"0.712322",
"0.6679105",
"0.64848334",
"0.63875824",
"0.63718045",
"0.63089615",
"0.6282376",
"0.6262936",
"0.62573564",
"0.614633",
"0.6126448",
"0.6061943",
"0.6061943",
"0.6061943",
"0.60362756",
"0.60341835",
"0.6010196",
"0.5986515",
"0.596557",
"0.59575903",
"0.58969146... | 0.0 | -1 |
This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always regenerated by the Form Editor. | @SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
jPanel2 = new javax.swing.JPanel();
labelJumlah = new javax.swing.JLabel();
textfieldJudul = new javax.swing.JLabel();
textfieldPengarang = new javax.swing.JLabel();
textfieldPenerbit = new javax.swing.JLabel();
labelJumlah1 = new javax.swing.JLabel();
textFieldKategoriBuku = new javax.swing.JLabel();
textfieldTahunTerbit = new javax.swing.JLabel();
textfieldKodeRak = new javax.swing.JLabel();
textfieldJumlah = new javax.swing.JLabel();
jLabelGambar = new javax.swing.JLabel();
textfieldNamaFileBuku = new javax.swing.JLabel();
labelTahunTerbit1 = new javax.swing.JLabel();
textfieldKodeBuku = new javax.swing.JLabel();
labelTahunTerbit2 = new javax.swing.JLabel();
jLabel5 = new javax.swing.JLabel();
jPanel1 = new javax.swing.JPanel();
jScrollPane1 = new javax.swing.JScrollPane();
tableBuku = new javax.swing.JTable();
textfieldCariJudulBuku = new javax.swing.JTextField();
buttonCari = new javax.swing.JButton();
jLabel6 = new javax.swing.JLabel();
jLabel4 = new javax.swing.JLabel();
buttonBackHome = new javax.swing.JButton();
setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
setTitle("Input Data Buku");
setUndecorated(true);
getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());
jPanel2.setBackground(new java.awt.Color(255, 228, 229));
jPanel2.setPreferredSize(new java.awt.Dimension(300, 600));
jPanel2.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());
labelJumlah.setFont(new java.awt.Font("Balsamiq Sans", 1, 12)); // NOI18N
labelJumlah.setForeground(new java.awt.Color(102, 102, 102));
labelJumlah.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
labelJumlah.setText("Jumlah");
jPanel2.add(labelJumlah, new org.netbeans.lib.awtextra.AbsoluteConstraints(50, 500, 170, 25));
textfieldJudul.setFont(new java.awt.Font("Balsamiq Sans", 1, 24)); // NOI18N
textfieldJudul.setForeground(new java.awt.Color(51, 51, 51));
textfieldJudul.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
textfieldJudul.setText("Judul");
jPanel2.add(textfieldJudul, new org.netbeans.lib.awtextra.AbsoluteConstraints(60, 310, 320, 50));
textfieldPengarang.setFont(new java.awt.Font("Balsamiq Sans", 0, 14)); // NOI18N
textfieldPengarang.setForeground(new java.awt.Color(51, 51, 51));
textfieldPengarang.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
textfieldPengarang.setText("Pengarang");
jPanel2.add(textfieldPengarang, new org.netbeans.lib.awtextra.AbsoluteConstraints(60, 370, 320, -1));
textfieldPenerbit.setFont(new java.awt.Font("Balsamiq Sans", 1, 18)); // NOI18N
textfieldPenerbit.setForeground(new java.awt.Color(51, 51, 51));
textfieldPenerbit.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
textfieldPenerbit.setText("Penerbit");
jPanel2.add(textfieldPenerbit, new org.netbeans.lib.awtextra.AbsoluteConstraints(50, 450, 170, -1));
labelJumlah1.setFont(new java.awt.Font("Balsamiq Sans", 1, 12)); // NOI18N
labelJumlah1.setForeground(new java.awt.Color(102, 102, 102));
labelJumlah1.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
labelJumlah1.setText("Kode Rak");
jPanel2.add(labelJumlah1, new org.netbeans.lib.awtextra.AbsoluteConstraints(220, 500, 180, 25));
textFieldKategoriBuku.setBackground(new java.awt.Color(204, 204, 204));
textFieldKategoriBuku.setFont(new java.awt.Font("Balsamiq Sans", 1, 12)); // NOI18N
textFieldKategoriBuku.setForeground(new java.awt.Color(153, 153, 153));
textFieldKategoriBuku.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
textFieldKategoriBuku.setText("Kategori");
jPanel2.add(textFieldKategoriBuku, new org.netbeans.lib.awtextra.AbsoluteConstraints(150, 280, 140, 30));
textfieldTahunTerbit.setFont(new java.awt.Font("Balsamiq Sans", 1, 18)); // NOI18N
textfieldTahunTerbit.setForeground(new java.awt.Color(51, 51, 51));
textfieldTahunTerbit.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
textfieldTahunTerbit.setText("Tahun Terbit");
jPanel2.add(textfieldTahunTerbit, new org.netbeans.lib.awtextra.AbsoluteConstraints(220, 450, 180, -1));
textfieldKodeRak.setFont(new java.awt.Font("Balsamiq Sans", 1, 18)); // NOI18N
textfieldKodeRak.setForeground(new java.awt.Color(51, 51, 51));
textfieldKodeRak.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
textfieldKodeRak.setText("Kode Rak");
jPanel2.add(textfieldKodeRak, new org.netbeans.lib.awtextra.AbsoluteConstraints(220, 530, 180, -1));
textfieldJumlah.setFont(new java.awt.Font("Balsamiq Sans", 1, 18)); // NOI18N
textfieldJumlah.setForeground(new java.awt.Color(51, 51, 51));
textfieldJumlah.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
textfieldJumlah.setText("Jumlah");
jPanel2.add(textfieldJumlah, new org.netbeans.lib.awtextra.AbsoluteConstraints(50, 530, 170, -1));
jLabelGambar.setOpaque(true);
jPanel2.add(jLabelGambar, new org.netbeans.lib.awtextra.AbsoluteConstraints(150, 100, 140, 170));
textfieldNamaFileBuku.setText("NamaFileBuku");
jPanel2.add(textfieldNamaFileBuku, new org.netbeans.lib.awtextra.AbsoluteConstraints(190, 210, -1, -1));
labelTahunTerbit1.setFont(new java.awt.Font("Balsamiq Sans", 1, 12)); // NOI18N
labelTahunTerbit1.setForeground(new java.awt.Color(102, 102, 102));
labelTahunTerbit1.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
labelTahunTerbit1.setText("Tahun Terbit");
jPanel2.add(labelTahunTerbit1, new org.netbeans.lib.awtextra.AbsoluteConstraints(220, 420, 180, 25));
textfieldKodeBuku.setFont(new java.awt.Font("Balsamiq Sans", 0, 12)); // NOI18N
textfieldKodeBuku.setForeground(new java.awt.Color(246, 93, 78));
textfieldKodeBuku.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
textfieldKodeBuku.setText("Tahun Terbit");
jPanel2.add(textfieldKodeBuku, new org.netbeans.lib.awtextra.AbsoluteConstraints(140, 160, 150, -1));
labelTahunTerbit2.setFont(new java.awt.Font("Balsamiq Sans", 1, 12)); // NOI18N
labelTahunTerbit2.setForeground(new java.awt.Color(102, 102, 102));
labelTahunTerbit2.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
labelTahunTerbit2.setText("Penerbit");
labelTahunTerbit2.setPreferredSize(new java.awt.Dimension(100, 23));
jPanel2.add(labelTahunTerbit2, new org.netbeans.lib.awtextra.AbsoluteConstraints(50, 420, 160, 25));
jLabel5.setBackground(new java.awt.Color(71, 127, 255));
jLabel5.setFont(new java.awt.Font("Balsamiq Sans", 1, 21)); // NOI18N
jLabel5.setForeground(new java.awt.Color(246, 93, 78));
jLabel5.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
jLabel5.setText("Detail Buku");
jPanel2.add(jLabel5, new org.netbeans.lib.awtextra.AbsoluteConstraints(50, 40, -1, -1));
getContentPane().add(jPanel2, new org.netbeans.lib.awtextra.AbsoluteConstraints(580, 0, 420, 600));
jPanel1.setBackground(new java.awt.Color(246, 93, 78));
jPanel1.setForeground(new java.awt.Color(246, 93, 78));
jPanel1.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());
tableBuku.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
tableBuku.setModel(new javax.swing.table.DefaultTableModel(
new Object [][] {
{null, null, null, null},
{null, null, null, null},
{null, null, null, null},
{null, null, null, null},
{null, null, null, null},
{null, null, null, null},
{null, null, null, null},
{null, null, null, null},
{null, null, null, null},
{null, null, null, null}
},
new String [] {
"Title 1", "Title 2", "Title 3", "Title 4"
}
));
tableBuku.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
tableBukuMouseClicked(evt);
}
});
jScrollPane1.setViewportView(tableBuku);
jPanel1.add(jScrollPane1, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 340, 540, 190));
textfieldCariJudulBuku.setFont(new java.awt.Font("Balsamiq Sans", 1, 18)); // NOI18N
textfieldCariJudulBuku.setHorizontalAlignment(javax.swing.JTextField.CENTER);
textfieldCariJudulBuku.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(230, 231, 232)));
textfieldCariJudulBuku.setPreferredSize(new java.awt.Dimension(2, 30));
textfieldCariJudulBuku.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
textfieldCariJudulBukuActionPerformed(evt);
}
});
jPanel1.add(textfieldCariJudulBuku, new org.netbeans.lib.awtextra.AbsoluteConstraints(50, 230, 450, -1));
buttonCari.setBackground(new java.awt.Color(9, 110, 59));
buttonCari.setFont(new java.awt.Font("Balsamiq Sans", 1, 18)); // NOI18N
buttonCari.setForeground(new java.awt.Color(255, 255, 255));
buttonCari.setText("Cari");
buttonCari.setBorder(null);
buttonCari.setPreferredSize(new java.awt.Dimension(75, 30));
buttonCari.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
buttonCariActionPerformed(evt);
}
});
jPanel1.add(buttonCari, new org.netbeans.lib.awtextra.AbsoluteConstraints(250, 280, 70, 30));
jLabel6.setBackground(new java.awt.Color(71, 127, 255));
jLabel6.setFont(new java.awt.Font("Balsamiq Sans", 1, 18)); // NOI18N
jLabel6.setForeground(new java.awt.Color(255, 255, 255));
jLabel6.setText("Masukkan Judul Buku Yang Kamu Cari!");
jPanel1.add(jLabel6, new org.netbeans.lib.awtextra.AbsoluteConstraints(110, 200, -1, -1));
jLabel4.setBackground(new java.awt.Color(71, 127, 255));
jLabel4.setFont(new java.awt.Font("Balsamiq Sans", 1, 36)); // NOI18N
jLabel4.setForeground(new java.awt.Color(255, 255, 255));
jLabel4.setText("PENCARIAN BUKU");
jPanel1.add(jLabel4, new org.netbeans.lib.awtextra.AbsoluteConstraints(120, 40, -1, -1));
buttonBackHome.setBackground(new java.awt.Color(9, 110, 59));
buttonBackHome.setFont(new java.awt.Font("Balsamiq Sans", 1, 18)); // NOI18N
buttonBackHome.setForeground(new java.awt.Color(255, 255, 255));
buttonBackHome.setText("Kembali ke Menu");
buttonBackHome.setBorder(null);
buttonBackHome.setPreferredSize(new java.awt.Dimension(75, 30));
buttonBackHome.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
buttonBackHomeActionPerformed(evt);
}
});
jPanel1.add(buttonBackHome, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 550, 170, 30));
getContentPane().add(jPanel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 580, 600));
pack();
setLocationRelativeTo(null);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Form() {\n initComponents();\n }",
"public MainForm() {\n initComponents();\n }",
"public MainForm() {\n initComponents();\n }",
"public MainForm() {\n initComponents();\n }",
"public frmRectangulo() {\n initComponents();\n }",
"public form() {\n ... | [
"0.73191524",
"0.7290383",
"0.7290383",
"0.7290383",
"0.7286656",
"0.72480965",
"0.72141695",
"0.72080517",
"0.7195647",
"0.7190378",
"0.71841127",
"0.71591616",
"0.71478844",
"0.7093131",
"0.70816",
"0.70577854",
"0.6987355",
"0.69769996",
"0.69551086",
"0.69545007",
"0.6945... | 0.0 | -1 |
Returns a 32x32 icon summarising a city's rating | @RequestMapping("getCityRatingIcon.do")
public void getCityRatingIcon(@RequestParam(value="cityId", required=true) String cityId,
@RequestParam(value="datasetId", required=false) String[] datasetIds,
@RequestParam(value="datasetWeighting", required=false) Integer[] datasetWeightings,
HttpServletResponse response) throws IOException {
//TODO: this is faked
InputStream fakeIcon = this.getClass().getResourceAsStream("testIcon.png");
//Pipe image to output
response.setContentType("image/png");
ServletOutputStream outputStream = response.getOutputStream();
writeInputToOutputStream(fakeIcon, outputStream, 1024 * 1024, true);
outputStream.close();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getIcon(){\n\t\t\t\t\n\t\treturn inCity.getWeather().get(0).getIcon();\n\t}",
"public String weatherIcon() {\n int wCode = 0;\n String wIcon = \" \";\n if (readings.size() > 0) {\n wCode = readings.get(readings.size() - 1).code;\n if (wCode == 100) {\n ... | [
"0.6059821",
"0.5994978",
"0.5525449",
"0.5525449",
"0.54407805",
"0.5402701",
"0.5402701",
"0.54010725",
"0.53092635",
"0.5276767",
"0.5267658",
"0.52630585",
"0.5242377",
"0.522812",
"0.5202457",
"0.5180541",
"0.5145332",
"0.51241",
"0.5075061",
"0.5062941",
"0.50442976",
... | 0.6045698 | 1 |
ServerMode Persistence Unit Bootstrapping | @Bean
@Profile(value = "prod")
public LocalContainerEntityManagerFactoryBean localContainerServerModeEntityManagerFactoryBean(
@ServerMode DataSource dataSource,
JpaVendorAdapter jpaVendorAdapter
) {
LocalContainerEntityManagerFactoryBean lcemfb = new LocalContainerEntityManagerFactoryBean();
lcemfb.setDataSource(dataSource);
lcemfb.setJpaVendorAdapter(jpaVendorAdapter);
lcemfb.setJpaProperties(serverModeProperties());
lcemfb.setPackagesToScan("caveatemptor.entities");
lcemfb.setPersistenceUnitName("ServerModePersistenceUnit");
return lcemfb;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void postBootSetup() {\n }",
"@Override\n protected void startUp() {\n }",
"EMInitializer() {\r\n try {\r\n emf = Persistence.createEntityManagerFactory(\"pl.polsl_MatchStatist\"\r\n + \"icsWeb_war_4.0-SNAPSHOTPU\");\r\n em ... | [
"0.64964205",
"0.6164129",
"0.61421174",
"0.6109387",
"0.609525",
"0.59985447",
"0.5988428",
"0.5980969",
"0.5951597",
"0.5941767",
"0.5932424",
"0.5908343",
"0.5859982",
"0.5859982",
"0.5846204",
"0.5840522",
"0.58082515",
"0.57957035",
"0.5782075",
"0.576288",
"0.5762489",
... | 0.54596364 | 55 |
InMemory Persistence Unit Bootstrapping | @Bean
@Profile(value = "test")
public LocalContainerEntityManagerFactoryBean localContainerInMemoryEntityManagerFactoryBean(
@InMemoryMode DataSource dataSource,
JpaVendorAdapter jpaVendorAdapter
) {
LocalContainerEntityManagerFactoryBean lcemfb = new LocalContainerEntityManagerFactoryBean();
lcemfb.setDataSource(dataSource);
lcemfb.setJpaVendorAdapter(jpaVendorAdapter);
lcemfb.setJpaProperties(inMemoryProperties());
lcemfb.setPackagesToScan("caveatemptor.entities");
lcemfb.setPersistenceUnitName("InMemoryPersistenceUnit");
return lcemfb;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Before\n\tpublic void init()\n\t{\n\t\tEntityManagerFactory entityManagerFactory = Persistence.createEntityManagerFactory(\"persistenceUnit\");\n\t\tEntityManager entityManager = entityManagerFactory.createEntityManager();\n\t\tcacheManager = new CacheManagerDefaultImpl();\n\t\t((CacheManagerDefaultImpl) cacheMan... | [
"0.6733307",
"0.6537121",
"0.6475167",
"0.6393491",
"0.6365351",
"0.63641304",
"0.62214017",
"0.6169303",
"0.6139476",
"0.61341363",
"0.6075196",
"0.603684",
"0.6028846",
"0.6001647",
"0.59893495",
"0.5967653",
"0.59536505",
"0.59420556",
"0.5937135",
"0.5931065",
"0.58796334... | 0.59675175 | 16 |
Constants which are with respect to the Ingest App | public interface Constants {
public interface Paths {
final String ELASTIC_PUSH_CONTROLLER_PATH = "/elastic" ;
final String SAVE_TRANSACTION = "/save";
final String SAVE_TARGETS = "/saveTargets";
final String SAVE_FEEDBACK = "/saveFeedback";
final String SAVE_FEEDBACK_RESPONSE = "/v1/saveFeedback";
}
public static String SUCCESS= "success";
public static int UNAUTHORIZED_ID = 401;
public static int SUCCESS_ID = 200;
public static int FAILURE_ID = 320;
public static String UNAUTHORIZED = "Invalid credentials. Please try again.";
public static String PROCESS_FAIL = "Process failed, Please try again.";
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public interface Constants {\n String ASTYANAX_HOSTS = \"127.0.0.1:9160\";\n String DATASTAX_HOSTS = \"127.0.0.1:9042\";\n String GRAPHITE_HOSTS = \"127.0.0.1\";\n int ASTYANAX_PORT = 9160;\n int GRAPHITE_PORT = 2003;\n int WRITE_BATCH_SIZE = 20;\n int READ_BATCH_SIZE = 200;\n int NUMBER_OF... | [
"0.674228",
"0.65257585",
"0.6479346",
"0.64338833",
"0.6425182",
"0.63289243",
"0.6328356",
"0.63236076",
"0.62965375",
"0.6287104",
"0.62796164",
"0.62527025",
"0.62515414",
"0.62377596",
"0.62092245",
"0.62087107",
"0.618103",
"0.6159298",
"0.61518615",
"0.6144842",
"0.614... | 0.62563497 | 11 |
Called upon block activation (right click on the block.) | public boolean onBlockActivated(World world, int blockX, int blockY, int blockZ, EntityPlayer player, int p_149727_6_, float playerX, float playerY, float playerZ)
{
if (world.isRemote)
{
return true;
}
else
{
player.openGui(HekaCore.instance, GuiHandler.Types.MAGE_TABLE.ordinal(), world, blockX, blockY, blockZ);
return true;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean onBlockActivated(World p_149727_1_, int p_149727_2_, int p_149727_3_, int p_149727_4_, EntityPlayer p_149727_5_, int p_149727_6_, float p_149727_7_, float p_149727_8_, float p_149727_9_)\n {\n if (p_149727_1_.isClient)\n {\n return true;\n }\n else\n ... | [
"0.69384503",
"0.68934697",
"0.68934697",
"0.68934697",
"0.6819162",
"0.67335457",
"0.6598192",
"0.65877753",
"0.6496592",
"0.6477245",
"0.63113725",
"0.626985",
"0.6269691",
"0.62535185",
"0.6191284",
"0.6171074",
"0.6164351",
"0.6133411",
"0.6133411",
"0.6128217",
"0.611413... | 0.68079025 | 5 |
Internal interfaces services. TODO: Move into module. | public interface PermissionManagerServiceInternal extends PermissionManagerInternal,
LegacyPermissionDataProvider {
/**
* Check whether a particular package has been granted a particular permission.
*
* @param packageName the name of the package you are checking against
* @param permissionName the name of the permission you are checking for
* @param userId the user ID
* @return {@code PERMISSION_GRANTED} if the permission is granted, or {@code PERMISSION_DENIED}
* otherwise
*/
//@SystemApi(client = SystemApi.Client.SYSTEM_SERVER)
int checkPermission(@NonNull String packageName, @NonNull String permissionName,
@UserIdInt int userId);
/**
* Check whether a particular UID has been granted a particular permission.
*
* @param uid the UID
* @param permissionName the name of the permission you are checking for
* @return {@code PERMISSION_GRANTED} if the permission is granted, or {@code PERMISSION_DENIED}
* otherwise
*/
//@SystemApi(client = SystemApi.Client.SYSTEM_SERVER)
int checkUidPermission(int uid, @NonNull String permissionName);
/**
* Adds a listener for runtime permission state (permissions or flags) changes.
*
* @param listener The listener.
*/
void addOnRuntimePermissionStateChangedListener(
@NonNull OnRuntimePermissionStateChangedListener listener);
/**
* Removes a listener for runtime permission state (permissions or flags) changes.
*
* @param listener The listener.
*/
void removeOnRuntimePermissionStateChangedListener(
@NonNull OnRuntimePermissionStateChangedListener listener);
/**
* Get whether permission review is required for a package.
*
* @param packageName the name of the package
* @param userId the user ID
* @return whether permission review is required
*/
//@SystemApi(client = SystemApi.Client.SYSTEM_SERVER)
boolean isPermissionsReviewRequired(@NonNull String packageName,
@UserIdInt int userId);
/**
* Reset the runtime permission state changes for a package.
*
* TODO(zhanghai): Turn this into package change callback?
*
* @param pkg the package
* @param userId the user ID
*/
//@SystemApi(client = SystemApi.Client.SYSTEM_SERVER)
void resetRuntimePermissions(@NonNull AndroidPackage pkg,
@UserIdInt int userId);
/**
* Read legacy permission state from package settings.
*
* TODO(zhanghai): This is a temporary method because we should not expose
* {@code PackageSetting} which is a implementation detail that permission should not know.
* Instead, it should retrieve the legacy state via a defined API.
*/
void readLegacyPermissionStateTEMP();
/**
* Write legacy permission state to package settings.
*
* TODO(zhanghai): This is a temporary method and should be removed once we migrated persistence
* for permission.
*/
void writeLegacyPermissionStateTEMP();
/**
* Get all the permissions granted to a package.
*
* @param packageName the name of the package
* @param userId the user ID
* @return the names of the granted permissions
*/
//@SystemApi(client = SystemApi.Client.SYSTEM_SERVER)
@NonNull
Set<String> getGrantedPermissions(@NonNull String packageName, @UserIdInt int userId);
/**
* Get the GIDs of a permission.
*
* @param permissionName the name of the permission
* @param userId the user ID
* @return the GIDs of the permission
*/
//@SystemApi(client = SystemApi.Client.SYSTEM_SERVER)
@NonNull
int[] getPermissionGids(@NonNull String permissionName, @UserIdInt int userId);
/**
* Get the packages that have requested an app op permission.
*
* @param permissionName the name of the app op permission
* @return the names of the packages that have requested the app op permission
*/
//@SystemApi(client = SystemApi.Client.SYSTEM_SERVER)
@NonNull
String[] getAppOpPermissionPackages(@NonNull String permissionName);
/** HACK HACK methods to allow for partial migration of data to the PermissionManager class */
@Nullable
Permission getPermissionTEMP(@NonNull String permName);
/** Get all permissions that have a certain protection */
@NonNull
ArrayList<PermissionInfo> getAllPermissionsWithProtection(
@PermissionInfo.Protection int protection);
/** Get all permissions that have certain protection flags */
@NonNull ArrayList<PermissionInfo> getAllPermissionsWithProtectionFlags(
@PermissionInfo.ProtectionFlags int protectionFlags);
/**
* Start delegate the permission identity of the shell UID to the given UID.
*
* @param uid the UID to delegate shell permission identity to
* @param packageName the name of the package to delegate shell permission identity to
* @param permissionNames the names of the permissions to delegate shell permission identity
* for, or {@code null} for all permissions
*/
//@SystemApi(client = SystemApi.Client.SYSTEM_SERVER)
void startShellPermissionIdentityDelegation(int uid,
@NonNull String packageName, @Nullable List<String> permissionNames);
/**
* Stop delegating the permission identity of the shell UID.
*
* @see #startShellPermissionIdentityDelegation(int, String, List)
*/
//@SystemApi(client = SystemApi.Client.SYSTEM_SERVER)
void stopShellPermissionIdentityDelegation();
/**
* Get all delegated shell permissions.
*/
@NonNull List<String> getDelegatedShellPermissions();
/**
* Read legacy permissions from legacy permission settings.
*
* TODO(zhanghai): This is a temporary method because we should not expose
* {@code LegacyPermissionSettings} which is a implementation detail that permission should not
* know. Instead, it should retrieve the legacy permissions via a defined API.
*/
void readLegacyPermissionsTEMP(@NonNull LegacyPermissionSettings legacyPermissionSettings);
/**
* Write legacy permissions to legacy permission settings.
*
* TODO(zhanghai): This is a temporary method and should be removed once we migrated persistence
* for permission.
*/
void writeLegacyPermissionsTEMP(@NonNull LegacyPermissionSettings legacyPermissionSettings);
/**
* Callback when the system is ready.
*/
//@SystemApi(client = SystemApi.Client.SYSTEM_SERVER)
void onSystemReady();
/**
* Callback when a storage volume is mounted, so that all packages on it become available.
*
* @param volumeUuid the UUID of the storage volume
* @param fingerprintChanged whether the current build fingerprint is different from what it was
* when this volume was last mounted
*/
//@SystemApi(client = SystemApi.Client.SYSTEM_SERVER)
void onStorageVolumeMounted(@NonNull String volumeUuid, boolean fingerprintChanged);
/**
* Callback when a user has been created.
*
* @param userId the created user ID
*/
//@SystemApi(client = SystemApi.Client.SYSTEM_SERVER)
void onUserCreated(@UserIdInt int userId);
/**
* Callback when a user has been removed.
*
* @param userId the removed user ID
*/
//@SystemApi(client = SystemApi.Client.SYSTEM_SERVER)
void onUserRemoved(@UserIdInt int userId);
/**
* Callback when a package has been added.
*
* @param pkg the added package
* @param isInstantApp whether the added package is an instant app
* @param oldPkg the old package, or {@code null} if none
*/
//@SystemApi(client = SystemApi.Client.SYSTEM_SERVER)
void onPackageAdded(@NonNull AndroidPackage pkg, boolean isInstantApp,
@Nullable AndroidPackage oldPkg);
/**
* Callback when a package has been installed for a user.
*
* @param pkg the installed package
* @param previousAppId the previous app ID if the package is leaving a shared UID,
* or Process.INVALID_UID
* @param params the parameters passed in for package installation
* @param userId the user ID this package is installed for
*/
//@SystemApi(client = SystemApi.Client.SYSTEM_SERVER)
void onPackageInstalled(@NonNull AndroidPackage pkg, int previousAppId,
@NonNull PackageInstalledParams params,
@UserIdInt int userId);
/**
* Callback when a package has been removed.
*
* @param pkg the removed package
*/
//@SystemApi(client = SystemApi.Client.SYSTEM_SERVER)
void onPackageRemoved(@NonNull AndroidPackage pkg);
/**
* Callback when a package has been uninstalled.
* <p>
* The package may have been fully removed from the system, or only marked as uninstalled for
* this user but still instlaled for other users.
*
* TODO: Pass PackageState instead.
*
* @param packageName the name of the uninstalled package
* @param appId the app ID of the uninstalled package
* @param pkg the uninstalled package, or {@code null} if unavailable
* @param sharedUserPkgs the packages that are in the same shared user
* @param userId the user ID the package is uninstalled for
*/
//@SystemApi(client = SystemApi.Client.SYSTEM_SERVER)
void onPackageUninstalled(@NonNull String packageName, int appId, @Nullable AndroidPackage pkg,
@NonNull List<AndroidPackage> sharedUserPkgs, @UserIdInt int userId);
/**
* Listener for package permission state (permissions or flags) changes.
*/
interface OnRuntimePermissionStateChangedListener {
/**
* Called when the runtime permission state (permissions or flags) changed.
*
* @param packageName The package for which the change happened.
* @param userId the user id for which the change happened.
*/
@Nullable
void onRuntimePermissionStateChanged(@NonNull String packageName,
@UserIdInt int userId);
}
/**
* The permission-related parameters passed in for package installation.
*
* @see android.content.pm.PackageInstaller.SessionParams
*/
//@SystemApi(client = SystemApi.Client.SYSTEM_SERVER)
final class PackageInstalledParams {
/**
* A static instance whose parameters are all in their default state.
*/
public static final PackageInstalledParams DEFAULT = new Builder().build();
@NonNull
private final List<String> mGrantedPermissions;
@NonNull
private final List<String> mAllowlistedRestrictedPermissions;
@NonNull
private final int mAutoRevokePermissionsMode;
private PackageInstalledParams(@NonNull List<String> grantedPermissions,
@NonNull List<String> allowlistedRestrictedPermissions,
int autoRevokePermissionsMode) {
mGrantedPermissions = grantedPermissions;
mAllowlistedRestrictedPermissions = allowlistedRestrictedPermissions;
mAutoRevokePermissionsMode = autoRevokePermissionsMode;
}
/**
* Get the permissions to be granted.
*
* @return the permissions to be granted
*/
@NonNull
public List<String> getGrantedPermissions() {
return mGrantedPermissions;
}
/**
* Get the restricted permissions to be allowlisted.
*
* @return the restricted permissions to be allowlisted
*/
@NonNull
public List<String> getAllowlistedRestrictedPermissions() {
return mAllowlistedRestrictedPermissions;
}
/**
* Get the mode for auto revoking permissions.
*
* @return the mode for auto revoking permissions
*/
public int getAutoRevokePermissionsMode() {
return mAutoRevokePermissionsMode;
}
/**
* Builder class for {@link PackageInstalledParams}.
*/
public static final class Builder {
@NonNull
private List<String> mGrantedPermissions = Collections.emptyList();
@NonNull
private List<String> mAllowlistedRestrictedPermissions = Collections.emptyList();
@NonNull
private int mAutoRevokePermissionsMode = AppOpsManager.MODE_DEFAULT;
/**
* Set the permissions to be granted.
*
* @param grantedPermissions the permissions to be granted
*
* @see android.content.pm.PackageInstaller.SessionParams#setGrantedRuntimePermissions(
* java.lang.String[])
*/
public void setGrantedPermissions(@NonNull List<String> grantedPermissions) {
Objects.requireNonNull(grantedPermissions);
mGrantedPermissions = new ArrayList<>(grantedPermissions);
}
/**
* Set the restricted permissions to be allowlisted.
* <p>
* Permissions that are not restricted are ignored, so one can just pass in all
* requested permissions of a package to get all its restricted permissions allowlisted.
*
* @param allowlistedRestrictedPermissions the restricted permissions to be allowlisted
*
* @see android.content.pm.PackageInstaller.SessionParams#setWhitelistedRestrictedPermissions(Set)
*/
public void setAllowlistedRestrictedPermissions(
@NonNull List<String> allowlistedRestrictedPermissions) {
Objects.requireNonNull(mGrantedPermissions);
mAllowlistedRestrictedPermissions = new ArrayList<>(
allowlistedRestrictedPermissions);
}
/**
* Set the mode for auto revoking permissions.
* <p>
* {@link AppOpsManager#MODE_ALLOWED} means the system is allowed to auto revoke
* permissions from this package, and {@link AppOpsManager#MODE_IGNORED} means this
* package should be ignored when auto revoking permissions.
* {@link AppOpsManager#MODE_DEFAULT} means no changes will be made to the auto revoke
* mode of this package.
*
* @param autoRevokePermissionsMode the mode for auto revoking permissions
*
* @see android.content.pm.PackageInstaller.SessionParams#setAutoRevokePermissionsMode(
* boolean)
*/
public void setAutoRevokePermissionsMode(int autoRevokePermissionsMode) {
mAutoRevokePermissionsMode = autoRevokePermissionsMode;
}
/**
* Build a new instance of {@link PackageInstalledParams}.
*
* @return the {@link PackageInstalledParams} built
*/
@NonNull
public PackageInstalledParams build() {
return new PackageInstalledParams(mGrantedPermissions,
mAllowlistedRestrictedPermissions, mAutoRevokePermissionsMode);
}
}
}
/**
* Sets the provider of the currently active HotwordDetectionService.
*
* @see HotwordDetectionServiceProvider
*/
void setHotwordDetectionServiceProvider(@Nullable HotwordDetectionServiceProvider provider);
/**
* Gets the provider of the currently active HotwordDetectionService.
*
* @see HotwordDetectionServiceProvider
*/
@Nullable
HotwordDetectionServiceProvider getHotwordDetectionServiceProvider();
/**
* Provides the uid of the currently active
* {@link android.service.voice.HotwordDetectionService}, which should be granted RECORD_AUDIO,
* CAPTURE_AUDIO_HOTWORD and CAPTURE_AUDIO_OUTPUT permissions.
*/
interface HotwordDetectionServiceProvider {
int getUid();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static interface Service {}",
"public interface LearningSpaceServices {\n\n\n}",
"public interface Service {\n // Service-specific methods go here\n }",
"public void service() {\n\t}",
"public interface Service {\n\n}",
"public interface Service {\n\n}",
"public interface MineService ... | [
"0.7559946",
"0.7214311",
"0.69821906",
"0.6758573",
"0.6732073",
"0.6732073",
"0.6648479",
"0.6638246",
"0.6627812",
"0.66179705",
"0.6582161",
"0.6569216",
"0.6509584",
"0.65068823",
"0.6494448",
"0.64439285",
"0.64379656",
"0.642754",
"0.6422448",
"0.64029044",
"0.6392642"... | 0.0 | -1 |
Adds a listener for runtime permission state (permissions or flags) changes. | void addOnRuntimePermissionStateChangedListener(
@NonNull OnRuntimePermissionStateChangedListener listener); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"interface OnRuntimePermissionStateChangedListener {\n\n /**\n * Called when the runtime permission state (permissions or flags) changed.\n *\n * @param packageName The package for which the change happened.\n * @param userId the user id for which the change happened.\n ... | [
"0.7199677",
"0.6903526",
"0.6555346",
"0.65249044",
"0.6053162",
"0.5904958",
"0.5871999",
"0.5849065",
"0.57630223",
"0.57420886",
"0.5692602",
"0.566431",
"0.5631784",
"0.55671793",
"0.55316687",
"0.55092984",
"0.547575",
"0.5469902",
"0.5466116",
"0.5466116",
"0.5438237",... | 0.7819848 | 0 |
Removes a listener for runtime permission state (permissions or flags) changes. | void removeOnRuntimePermissionStateChangedListener(
@NonNull OnRuntimePermissionStateChangedListener listener); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@RequiresPermission(Manifest.permission.OBSERVE_GRANT_REVOKE_PERMISSIONS)\n public void removeOnPermissionsChangeListener(\n @NonNull PackageManager.OnPermissionsChangedListener listener) {\n synchronized (mPermissionListeners) {\n final IOnPermissionsChangeListener delegate = mPerm... | [
"0.77284104",
"0.6834145",
"0.64983875",
"0.638829",
"0.638829",
"0.63306457",
"0.6290294",
"0.6269597",
"0.6234187",
"0.61953044",
"0.6193774",
"0.61496425",
"0.60873836",
"0.60805",
"0.60251683",
"0.59819067",
"0.59771144",
"0.5962471",
"0.5930503",
"0.59244007",
"0.5902775... | 0.8166305 | 0 |
Get whether permission review is required for a package. | boolean isPermissionsReviewRequired(@NonNull String packageName,
@UserIdInt int userId); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean getIsPMReviewed() {\n if (review != null) {\n return review.isPMReviewed();\n } else {\n return false;\n }\n }",
"public boolean isAccessGranted() {\n try {\n PackageManager packageManager = getPackageManager();\n Applicati... | [
"0.6425432",
"0.6413002",
"0.629909",
"0.62581766",
"0.6218637",
"0.62112683",
"0.617174",
"0.6131608",
"0.6078708",
"0.60626096",
"0.6028693",
"0.58112043",
"0.57017416",
"0.56636494",
"0.5661535",
"0.56563306",
"0.5655429",
"0.5587938",
"0.55857396",
"0.55857396",
"0.555980... | 0.73218036 | 0 |
Reset the runtime permission state changes for a package. TODO(zhanghai): Turn this into package change callback? | void resetRuntimePermissions(@NonNull AndroidPackage pkg,
@UserIdInt int userId); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void disablePackageNamePermissionCache() {\n sPackageNamePermissionCache.disableLocal();\n }",
"public void updatePackagePermission(String packageName, String permissionName, int state) {\n Log.print(\"PackageName:\" + packageName);\n Log.print(\"permission name:\" + permiss... | [
"0.6412036",
"0.6127384",
"0.6053207",
"0.60220605",
"0.60018575",
"0.5990547",
"0.5810422",
"0.562788",
"0.55913585",
"0.55539185",
"0.54917836",
"0.5458323",
"0.54463166",
"0.5445531",
"0.54213744",
"0.5338354",
"0.5323946",
"0.52865726",
"0.5275304",
"0.52664953",
"0.52601... | 0.75137377 | 0 |
Write legacy permission state to package settings. TODO(zhanghai): This is a temporary method and should be removed once we migrated persistence for permission. | void writeLegacyPermissionStateTEMP(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void writeLegacyPermissionsTEMP(@NonNull LegacyPermissionSettings legacyPermissionSettings);",
"int getPermissionWrite();",
"@NonNull\n public Permission toBukkit(@NonNull Group group, String context) {\n if (context == null)\n return Permissions.register(\n new Permission(\n thi... | [
"0.76111495",
"0.5403415",
"0.53762496",
"0.53690004",
"0.5327661",
"0.52788866",
"0.52326787",
"0.51502204",
"0.51096255",
"0.5094716",
"0.50905263",
"0.50784284",
"0.50299",
"0.50197965",
"0.50195193",
"0.5019256",
"0.5015622",
"0.5012023",
"0.49941695",
"0.49752077",
"0.49... | 0.8176644 | 0 |
Get all the permissions granted to a package. | @NonNull
Set<String> getGrantedPermissions(@NonNull String packageName, @UserIdInt int userId); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"List<Permission> getPermissions();",
"public List<Permission> queryAllPermission() {\n\t\treturn permissionMapper.queryAllPermission();\n\t}",
"public List<String> getPermissions() {\n AppMethodBeat.m2504i(92672);\n List permissions = this.properties.getPermissions();\n AppMethodBeat.m2505... | [
"0.73175853",
"0.70474124",
"0.6915334",
"0.6847185",
"0.68174005",
"0.67992324",
"0.67812973",
"0.6738951",
"0.6699326",
"0.6693834",
"0.6656937",
"0.66127867",
"0.66117793",
"0.65462875",
"0.6543424",
"0.65377057",
"0.65301865",
"0.6515265",
"0.6508042",
"0.64744925",
"0.64... | 0.66522866 | 11 |
Get the GIDs of a permission. | @NonNull
int[] getPermissionGids(@NonNull String permissionName, @UserIdInt int userId); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"List<Permission> getPermissions();",
"public List<Integer> getAllUsersGID() {\n\n\t\tList<Integer> result = new ArrayList<Integer>();\n\n\t\ttry {\n\t\t\tjava.sql.PreparedStatement ps = ((org.inria.jdbc.Connection) db).prepareStatement(TCell_QEP_IDs.QEP.EP_getAllUsersGid);\n\t\t\tResultSet rs = ps.executeQuery()... | [
"0.6248396",
"0.6086299",
"0.60630536",
"0.60297495",
"0.59183705",
"0.58955",
"0.5895012",
"0.5875496",
"0.5776812",
"0.5745533",
"0.5598218",
"0.55867165",
"0.55232525",
"0.54767776",
"0.5472739",
"0.54497266",
"0.5447074",
"0.5433711",
"0.5406655",
"0.5377291",
"0.53718674... | 0.7287181 | 0 |
Get the packages that have requested an app op permission. | @NonNull
String[] getAppOpPermissionPackages(@NonNull String permissionName); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Observable<List<AppDetail>> getUserPermittedApps() {\n return getAllInstalledApps()\n .zipWith(PolicyManager\n .getCurrentUserPolicyRules(PolicyType.APPLICATION_CONTROL),\n RuleInterpreter::filterApps);\n\n }",
"private ArrayLi... | [
"0.6586376",
"0.63514334",
"0.6166967",
"0.60753393",
"0.59313595",
"0.58655167",
"0.5800539",
"0.5799581",
"0.57820415",
"0.5746204",
"0.567443",
"0.5626752",
"0.5611074",
"0.55888706",
"0.5587961",
"0.5575125",
"0.5543893",
"0.54965115",
"0.54737586",
"0.5416012",
"0.540267... | 0.74985564 | 0 |
HACK HACK methods to allow for partial migration of data to the PermissionManager class | @Nullable
Permission getPermissionTEMP(@NonNull String permName); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private PermissionHelper() {}",
"@Override\n public void checkPermission(Permission perm) {\n }",
"abstract public void getPermission();",
"@Override\n public void checkPermission(Permission perm, Object context) {\n }",
"public interface PermissionAtom\n{\n Permissio... | [
"0.71219826",
"0.6783451",
"0.6692329",
"0.66100794",
"0.65855384",
"0.6553147",
"0.6467417",
"0.6309456",
"0.6275747",
"0.62722343",
"0.62721467",
"0.625093",
"0.62312424",
"0.6223758",
"0.61769134",
"0.6175952",
"0.61663264",
"0.61600786",
"0.6111608",
"0.6102435",
"0.60820... | 0.0 | -1 |
Get all permissions that have a certain protection | @NonNull
ArrayList<PermissionInfo> getAllPermissionsWithProtection(
@PermissionInfo.Protection int protection); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"List<Permission> getPermissions();",
"@NonNull ArrayList<PermissionInfo> getAllPermissionsWithProtectionFlags(\n @PermissionInfo.ProtectionFlags int protectionFlags);",
"java.util.List<java.lang.String>\n getPermissionsList();",
"public List<Permission> queryAllPermission() {\n\t\treturn permis... | [
"0.71754044",
"0.7136636",
"0.65579784",
"0.6464672",
"0.6451599",
"0.6448946",
"0.63597953",
"0.63133824",
"0.6307903",
"0.6297965",
"0.62886",
"0.62815785",
"0.62798023",
"0.6246452",
"0.6207436",
"0.6206915",
"0.61709213",
"0.61332464",
"0.6129572",
"0.6115075",
"0.6041651... | 0.7921549 | 0 |
Get all permissions that have certain protection flags | @NonNull ArrayList<PermissionInfo> getAllPermissionsWithProtectionFlags(
@PermissionInfo.ProtectionFlags int protectionFlags); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@NonNull\n ArrayList<PermissionInfo> getAllPermissionsWithProtection(\n @PermissionInfo.Protection int protection);",
"List<Permission> getPermissions();",
"public boolean [] getPermissions()\n\t{\n\t\treturn this.permissions;\n\t}",
"public Enumeration permissions();",
"public List<String> g... | [
"0.7134224",
"0.69429874",
"0.66808236",
"0.6630328",
"0.6629879",
"0.65646",
"0.65057325",
"0.6484565",
"0.64549196",
"0.63814414",
"0.63708663",
"0.6332047",
"0.62911034",
"0.6252873",
"0.6248079",
"0.6194111",
"0.6189432",
"0.616045",
"0.6142878",
"0.6127832",
"0.6116301",... | 0.74953514 | 0 |
Stop delegating the permission identity of the shell UID. | void stopShellPermissionIdentityDelegation(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void declinePermission(String objectId, User user) throws UserManagementException;",
"public void revoke() {\n WebsitePreferenceBridge.nativeRevokeUsbPermission(mOrigin, mEmbedder, mObject);\n }",
"void exitPermission() throws RemoteException;",
"void stopAuthentication() {\n stop(false);... | [
"0.6201685",
"0.59568757",
"0.58130205",
"0.5723534",
"0.5582893",
"0.55803263",
"0.55677164",
"0.5543014",
"0.5493866",
"0.5488605",
"0.5443007",
"0.5437951",
"0.53994924",
"0.53609574",
"0.5297083",
"0.5266427",
"0.5254591",
"0.5211943",
"0.51893514",
"0.51769084",
"0.51723... | 0.83846927 | 0 |
Get all delegated shell permissions. | @NonNull List<String> getDelegatedShellPermissions(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public List<String> getPermissions() {\n AppMethodBeat.m2504i(92672);\n List permissions = this.properties.getPermissions();\n AppMethodBeat.m2505o(92672);\n return permissions;\n }",
"List<Permission> getPermissions();",
"@NonNull\n public Set<Permission> getConfiguredPermiss... | [
"0.6848747",
"0.67884225",
"0.6733346",
"0.6703822",
"0.6700272",
"0.6657326",
"0.66334164",
"0.6620827",
"0.6602326",
"0.6506676",
"0.6437859",
"0.64255935",
"0.6408684",
"0.64022404",
"0.63354856",
"0.6319774",
"0.6294019",
"0.6261399",
"0.6216062",
"0.6213991",
"0.6202537"... | 0.83706117 | 0 |
Write legacy permissions to legacy permission settings. TODO(zhanghai): This is a temporary method and should be removed once we migrated persistence for permission. | void writeLegacyPermissionsTEMP(@NonNull LegacyPermissionSettings legacyPermissionSettings); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void writeLegacyPermissionStateTEMP();",
"int getPermissionWrite();",
"@Override\r\n\tpublic int updPermission(Permission perms) {\n\t\treturn 0;\r\n\t}",
"public void updatePermissions(IPermission[] permissions) throws AuthorizationException;",
"void setPermission(String perm, boolean add);",
"public ab... | [
"0.7642756",
"0.5699604",
"0.564259",
"0.56058997",
"0.55768096",
"0.5484021",
"0.5437944",
"0.54261565",
"0.53975695",
"0.5390708",
"0.53572935",
"0.5314551",
"0.52913666",
"0.5273945",
"0.52605546",
"0.5236173",
"0.5126681",
"0.51232606",
"0.5108607",
"0.50773895",
"0.50760... | 0.8315884 | 0 |
Callback when the system is ready. | void onSystemReady(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void onSystemReady() {\n updateCurrentProfileIds();\n this.mInjector.reportCurWakefulnessUsageEvent();\n }",
"public abstract void ready();",
"protected void systemReady()\n\t{\n\t\t//~: check the service\n\t\tcheckService();\n\n\t\t//~: start planning\n\t\tself(new ExecPlanEvent());... | [
"0.74911916",
"0.73397654",
"0.72491974",
"0.72484213",
"0.72320974",
"0.7098186",
"0.70182675",
"0.6917035",
"0.6917035",
"0.6757457",
"0.6727478",
"0.6697881",
"0.6697881",
"0.6666393",
"0.6664508",
"0.6662254",
"0.66250634",
"0.66250634",
"0.65332747",
"0.65332747",
"0.653... | 0.82071584 | 0 |
Callback when a storage volume is mounted, so that all packages on it become available. | void onStorageVolumeMounted(@NonNull String volumeUuid, boolean fingerprintChanged); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void onMediaMounted() {\n if (!this.mSpecificArchivesProvided) {\n findArchiveFiles();\n }\n }",
"@Override\n \tpublic void onUpdateVolume(double arg0) {\n \t}",
"@Override\n \tpublic void onSetVolume(double arg0) {\n \t}",
"public int mountVolume(String mountPoint) throws ... | [
"0.6653535",
"0.633056",
"0.6134665",
"0.58769023",
"0.58744395",
"0.58641696",
"0.58481926",
"0.58381355",
"0.5810238",
"0.5796577",
"0.5661265",
"0.56285584",
"0.5620387",
"0.55460227",
"0.5513574",
"0.5481074",
"0.54767096",
"0.54067606",
"0.5369044",
"0.536518",
"0.534782... | 0.7472757 | 0 |
Callback when a user has been created. | void onUserCreated(@UserIdInt int userId); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void onUserCreated(FirebaseUser firebaseUser);",
"public void userCreated(UserCreateCommand command) {\n\t\t}",
"public void onCreationEvent(UserCreateEvent event){\n user = new UserBean(event.getUser());\n }",
"public void createUser(User user) {\n\n\t}",
"public void createUser(User user);",
... | [
"0.7658792",
"0.75780094",
"0.7500508",
"0.74214333",
"0.7353659",
"0.73348784",
"0.7240152",
"0.7000615",
"0.69167703",
"0.68611246",
"0.68488663",
"0.6840288",
"0.6838599",
"0.67877656",
"0.67817724",
"0.6750493",
"0.6741776",
"0.67216414",
"0.67131937",
"0.66529703",
"0.66... | 0.70016885 | 7 |
Callback when a user has been removed. | void onUserRemoved(@UserIdInt int userId); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void removeUserListener(String uid);",
"@Override\r\n public void userRemovedOnServer(User user) throws RemoteException, SQLException\r\n {\r\n property.firePropertyChange(\"userRemoved\", null, user);\r\n }",
"@Override\n\tpublic void removeUser(int id) {\n\t\t\n\t}",
"void removeUser(String uid);",
... | [
"0.77328205",
"0.7682318",
"0.7534494",
"0.7447524",
"0.738662",
"0.73507917",
"0.73306483",
"0.71937907",
"0.7169432",
"0.7162051",
"0.7161276",
"0.71037364",
"0.70836663",
"0.7078852",
"0.7075912",
"0.70710605",
"0.70480627",
"0.7045892",
"0.70304495",
"0.7020847",
"0.69137... | 0.8039237 | 0 |
Callback when a package has been installed for a user. | void onPackageInstalled(@NonNull AndroidPackage pkg, int previousAppId,
@NonNull PackageInstalledParams params,
@UserIdInt int userId); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void onInstalled() {\n }",
"private void handleNewPackageInstalled(String packageName, int userHandle) {\n if (!getUserData(userHandle).mAppsSuspended) {\n return;\n }\n final String[] packagesToSuspend = { packageName };\n // Check if package is considered not su... | [
"0.73872834",
"0.70220107",
"0.6957463",
"0.6396604",
"0.6029323",
"0.60015476",
"0.5761396",
"0.5739387",
"0.5724864",
"0.5707502",
"0.5664949",
"0.54528075",
"0.5394258",
"0.538039",
"0.5339602",
"0.5286822",
"0.5277353",
"0.5241047",
"0.52389956",
"0.5224486",
"0.52095515"... | 0.74933356 | 0 |
Callback when a package has been removed. | void onPackageRemoved(@NonNull AndroidPackage pkg); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void onUninstalled() {\n }",
"public void packageDeleted(java.lang.String r1, int r2) {\n /*\n // Can't load method instructions: Load method exception: null in method: cm.android.mdm.manager.PackageManager2.PackageDeleteObserver2.packageDeleted(java.lang.String, int):void, dex: ... | [
"0.71700317",
"0.62919277",
"0.6130606",
"0.61092824",
"0.6091026",
"0.60857105",
"0.6025128",
"0.5960391",
"0.5913899",
"0.5904344",
"0.5903426",
"0.59015733",
"0.58531183",
"0.58447313",
"0.58412236",
"0.5826355",
"0.5822086",
"0.58195543",
"0.579811",
"0.57777125",
"0.5765... | 0.8204648 | 0 |
Listener for package permission state (permissions or flags) changes. | interface OnRuntimePermissionStateChangedListener {
/**
* Called when the runtime permission state (permissions or flags) changed.
*
* @param packageName The package for which the change happened.
* @param userId the user id for which the change happened.
*/
@Nullable
void onRuntimePermissionStateChanged(@NonNull String packageName,
@UserIdInt int userId);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void updatePackagePermission(String packageName, String permissionName, int state) {\n Log.print(\"PackageName:\" + packageName);\n Log.print(\"permission name:\" + permissionName);\n\n // baidu only\n // CPServiceManager.getInstance(mContext).updatePackagePermission(packa... | [
"0.6528585",
"0.62165105",
"0.6190187",
"0.6186421",
"0.6137085",
"0.6112125",
"0.60957205",
"0.6072404",
"0.6043737",
"0.5951787",
"0.59059507",
"0.5858791",
"0.57725674",
"0.5764413",
"0.5763777",
"0.5753819",
"0.5735411",
"0.5714134",
"0.5690961",
"0.5669853",
"0.56177974"... | 0.6591302 | 0 |
Called when the runtime permission state (permissions or flags) changed. | @Nullable
void onRuntimePermissionStateChanged(@NonNull String packageName,
@UserIdInt int userId); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"interface OnRuntimePermissionStateChangedListener {\n\n /**\n * Called when the runtime permission state (permissions or flags) changed.\n *\n * @param packageName The package for which the change happened.\n * @param userId the user id for which the change happened.\n ... | [
"0.6663233",
"0.64171946",
"0.6333387",
"0.6322293",
"0.631425",
"0.6238954",
"0.6219009",
"0.61180025",
"0.60977775",
"0.60946834",
"0.6055309",
"0.6026382",
"0.6006185",
"0.5993932",
"0.5985365",
"0.5980713",
"0.595413",
"0.5896855",
"0.5885707",
"0.58662987",
"0.58662987",... | 0.60230637 | 12 |
Get the permissions to be granted. | @NonNull
public List<String> getGrantedPermissions() {
return mGrantedPermissions;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"List<Permission> getPermissions();",
"public List<String> getPermissions() {\n AppMethodBeat.m2504i(92672);\n List permissions = this.properties.getPermissions();\n AppMethodBeat.m2505o(92672);\n return permissions;\n }",
"public ArrayList<Permission> getPermissions()\r\n {\r\n... | [
"0.7938761",
"0.7746671",
"0.7658701",
"0.7553044",
"0.7543642",
"0.7454771",
"0.7440461",
"0.73964685",
"0.73901963",
"0.7342947",
"0.7342511",
"0.72470456",
"0.7212278",
"0.7197955",
"0.7159367",
"0.71371186",
"0.71367955",
"0.71266055",
"0.7089425",
"0.7064116",
"0.7039307... | 0.74208367 | 7 |
Get the restricted permissions to be allowlisted. | @NonNull
public List<String> getAllowlistedRestrictedPermissions() {
return mAllowlistedRestrictedPermissions;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"List<Permission> getPermissions();",
"java.util.List<java.lang.String>\n getPermissionsList();",
"public List<Permission> getPermissionList() {\n return permissionList;\n }",
"public List<String> getPermissions() {\n AppMethodBeat.m2504i(92672);\n List permissions = this.properties... | [
"0.76265025",
"0.73766285",
"0.7160553",
"0.7150376",
"0.7112571",
"0.7075917",
"0.69661725",
"0.69545853",
"0.68800277",
"0.6862041",
"0.68567264",
"0.683762",
"0.68359905",
"0.6828598",
"0.6764996",
"0.6741005",
"0.67027587",
"0.66741014",
"0.66512907",
"0.66464996",
"0.663... | 0.8066701 | 0 |
Get the mode for auto revoking permissions. | public int getAutoRevokePermissionsMode() {
return mAutoRevokePermissionsMode;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"int getACMode();",
"java.lang.String getMode();",
"public Mode getMode();",
"public int getMode()\r\n {\r\n Bundle b = getArguments();\r\n return b.getInt(PARAM_MODE);\r\n }",
"public Mode getMode() {\n\t\tPointer mode_ptr = binding_tv.get_type_mode(ptr);\n\t\tif (mode_ptr == null)\n\t\... | [
"0.6530901",
"0.649503",
"0.6434618",
"0.6341153",
"0.62740123",
"0.6242458",
"0.62354606",
"0.62354606",
"0.6172285",
"0.6166659",
"0.6160797",
"0.61591053",
"0.61473316",
"0.6142333",
"0.6121472",
"0.6121472",
"0.61208856",
"0.6106809",
"0.6106654",
"0.6087178",
"0.6044227"... | 0.79548985 | 0 |
Set the permissions to be granted. | public void setGrantedPermissions(@NonNull List<String> grantedPermissions) {
Objects.requireNonNull(grantedPermissions);
mGrantedPermissions = new ArrayList<>(grantedPermissions);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public abstract void setPermissions(PermissionIFace permissions);",
"public void setPermissions(Set<Permission> permissions) {\n this.permissions = permissions;\n }",
"public void setPermissions(int permissions)\n {\n encryptionDictionary.setInt( \"P\", permissions );\n }",
"private vo... | [
"0.7369525",
"0.72361875",
"0.71621895",
"0.70399284",
"0.7027865",
"0.6983449",
"0.6979378",
"0.6776606",
"0.67400086",
"0.6723025",
"0.6722838",
"0.66702724",
"0.66702724",
"0.66647196",
"0.6524692",
"0.65239924",
"0.6431747",
"0.64110416",
"0.6365029",
"0.6340665",
"0.6322... | 0.7456917 | 0 |
Set the restricted permissions to be allowlisted. Permissions that are not restricted are ignored, so one can just pass in all requested permissions of a package to get all its restricted permissions allowlisted. | public void setAllowlistedRestrictedPermissions(
@NonNull List<String> allowlistedRestrictedPermissions) {
Objects.requireNonNull(mGrantedPermissions);
mAllowlistedRestrictedPermissions = new ArrayList<>(
allowlistedRestrictedPermissions);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setPermissions(List<Permission> permissions)\r\n/* */ {\r\n/* 235 */ this.permissions = permissions;\r\n/* */ }",
"public abstract void setPermissions(PermissionIFace permissions);",
"@TargetApi(23)\r\n public void requestPermission() {\r\n ArrayList<String> arrayList;\r\n... | [
"0.68203884",
"0.66307837",
"0.6593807",
"0.6493785",
"0.6386058",
"0.6381007",
"0.6342044",
"0.62297714",
"0.6227136",
"0.62222266",
"0.62018216",
"0.6200258",
"0.6189939",
"0.61650455",
"0.6149593",
"0.6076164",
"0.60180944",
"0.59816504",
"0.5966591",
"0.58860683",
"0.5840... | 0.68904895 | 0 |
Sets the provider of the currently active HotwordDetectionService. | void setHotwordDetectionServiceProvider(@Nullable HotwordDetectionServiceProvider provider); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setProvider(String value) { _provider = value; }",
"@Nullable\n HotwordDetectionServiceProvider getHotwordDetectionServiceProvider();",
"public void setDrivesProvider(DrivesProvider provider) {\r\n\t\tif (Threading.isInitialized()) throw new IllegalStateException(ERROR_ALREADY_INITIALIZED);\r\n\... | [
"0.6380723",
"0.61363417",
"0.61184895",
"0.5901357",
"0.58792",
"0.58739185",
"0.58739185",
"0.5767812",
"0.57345146",
"0.5734338",
"0.5598833",
"0.5576447",
"0.5544682",
"0.5507956",
"0.5506486",
"0.54710066",
"0.54522616",
"0.5451757",
"0.5440691",
"0.5429167",
"0.54193866... | 0.7722373 | 0 |
Gets the provider of the currently active HotwordDetectionService. | @Nullable
HotwordDetectionServiceProvider getHotwordDetectionServiceProvider(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static Class<?> getProvider() {\n return provider;\n }",
"void setHotwordDetectionServiceProvider(@Nullable HotwordDetectionServiceProvider provider);",
"public Reference serviceProvider() {\n return getObject(Reference.class, FhirPropertyNames.PROPERTY_SERVICE_PROVIDER);\n }",
"pu... | [
"0.645342",
"0.5983318",
"0.5914847",
"0.59131634",
"0.5909474",
"0.59090227",
"0.5907534",
"0.58872575",
"0.5786578",
"0.5784192",
"0.5775291",
"0.57347",
"0.5696667",
"0.56821907",
"0.5623584",
"0.5619003",
"0.55471534",
"0.55052316",
"0.54483426",
"0.54464334",
"0.5445492"... | 0.7644783 | 0 |
Created by magda on 20170124. | public interface IUserService {
User registerNewUserAccount(UserDto accountDto) throws EmailExistsException;
User getUser(String verificationToken);
void saveRegisteredUser(User user);
void createVerificationToken(User user, String token);
VerificationToken getVerificationToken(String VerificationToken);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void perish() {\n \n }",
"private stendhal() {\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"private static void cajas() {\n\t\t\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Overrid... | [
"0.5914629",
"0.58142775",
"0.56913424",
"0.56857413",
"0.56078887",
"0.5603792",
"0.5586433",
"0.5586433",
"0.558446",
"0.5568094",
"0.5558345",
"0.55335456",
"0.55047894",
"0.5489412",
"0.5485258",
"0.54830444",
"0.54810846",
"0.5467687",
"0.54547983",
"0.5453624",
"0.54489... | 0.0 | -1 |
cartas de jugadores sectarios | private void initCultistCardDeck(){
unusedCultist = new ArrayList<Cultist>();
unusedCultist.add(new Cultist("No puedes dejar de ser sectario", 1));
unusedCultist.add(new Cultist("No puedes dejar de ser sectario", 2));
unusedCultist.add(new Cultist("No puedes dejar de ser sectario", 1));
unusedCultist.add(new Cultist("No puedes dejar de ser sectario", 2));
unusedCultist.add(new Cultist("No puedes dejar de ser sectario", 1));
unusedCultist.add(new Cultist("No puedes dejar de ser sectario", 1));
Collections.shuffle(unusedCultist);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void barajarCartas()\n {\n for (int posicionActual = 0; posicionActual < mazo.size(); posicionActual++) {\n Carta carta1 = mazo.get(0);\n Random aleatorio = new Random();\n int posicionAleatoria = aleatorio.nextInt(mazo.size());\n mazo.set(posicionActual... | [
"0.62539756",
"0.62258667",
"0.6133566",
"0.60821676",
"0.6068265",
"0.5957586",
"0.5937161",
"0.592515",
"0.5854659",
"0.5833421",
"0.58214426",
"0.5797913",
"0.57721215",
"0.5768189",
"0.57644844",
"0.5760137",
"0.57404757",
"0.5733443",
"0.57333773",
"0.5733076",
"0.571450... | 0.0 | -1 |
Devuelve el siguiente tesoro | public Treasure nextTreasure(){
Treasure treasure;
if(unusedTreasures.size() == 0){
unusedTreasures = usedTreasures;
usedTreasures.clear();
this.shuffleTreasures();
}
treasure = unusedTreasures.get(0);
unusedTreasures.remove(0);
usedTreasures.add(treasure);
return treasure;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void sacarPaseo(){\r\n\t\t\tSystem.out.println(\"Por las tardes me saca de paseo mi dueño\");\r\n\t\t\t\r\n\t\t}",
"private void tallennaTiedostoon() {\n viitearkisto.tallenna();\n }",
"public void tenta(int t) {\n \tif(this.checkBoxHelp.isSelected()) {\r\n \t\t//distinguo se sono ancora... | [
"0.6474038",
"0.6465059",
"0.6263359",
"0.62049073",
"0.6186928",
"0.6164379",
"0.61399186",
"0.60342115",
"0.60123706",
"0.6000756",
"0.5962935",
"0.5954895",
"0.59435683",
"0.5942387",
"0.5941172",
"0.5935649",
"0.5893794",
"0.5889906",
"0.58726466",
"0.5868065",
"0.5867161... | 0.0 | -1 |
Devuelve el siguiente monstruo | public Monster nextMonster(){
Monster monster;
if(unusedMonsters.size() == 0){
unusedMonsters = usedMonsters;
usedMonsters.clear();
this.shuffleMonsters();
}
monster = unusedMonsters.get(0);
unusedMonsters.remove(0);
usedMonsters.add(monster);
return monster;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic int mettreAJour() {\n\t\treturn 0;\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"publ... | [
"0.6036092",
"0.59935224",
"0.59935224",
"0.59935224",
"0.59935224",
"0.59935224",
"0.59935224",
"0.59935224",
"0.5989628",
"0.59497356",
"0.58749646",
"0.5874368",
"0.5869539",
"0.58695066",
"0.58517855",
"0.5835882",
"0.58157575",
"0.57279843",
"0.5726546",
"0.57246155",
"0... | 0.0 | -1 |
Devuelve el siguiente cultist | public Cultist nextCultist(){
Cultist cultist = unusedCultist.get(0);
unusedCultist.remove(0);
return cultist;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static void cajas() {\n\t\t\n\t}",
"@Override\n\tpublic String getCouleur() {\n\t\treturn null;\n\t}",
"String getCmt();",
"java.lang.String getCit();",
"public int getCxlangue() {\r\r\r\r\r\r\r\n return cxlangue;\r\r\r\r\r\r\r\n }",
"public Integer getCedula() {return cedula;}",
"pub... | [
"0.62238854",
"0.6170207",
"0.61273193",
"0.6125885",
"0.60091746",
"0.60045975",
"0.5989694",
"0.58711797",
"0.5867535",
"0.5867535",
"0.58501",
"0.5844792",
"0.5814468",
"0.5788713",
"0.57847",
"0.57498187",
"0.5738576",
"0.57230246",
"0.5712521",
"0.57062435",
"0.5694596",... | 0.0 | -1 |
Instantiate the interface and set the context | MyJavascriptInterface(Context c) {
mContext = c;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public abstract void makeContext();",
"Context createContext();",
"Context createContext();",
"public void init(MailetContext context);",
"void init(@NotNull ExecutionContext context);",
"public Contexte() {\n FactoryRegistry registry = FactoryRegistry.getRegistry();\n registry.register(\"m... | [
"0.69719374",
"0.68730503",
"0.68730503",
"0.6785889",
"0.67517257",
"0.6473272",
"0.64333063",
"0.64333063",
"0.6412219",
"0.6412219",
"0.6412219",
"0.6390958",
"0.63706005",
"0.63492167",
"0.63458633",
"0.62513137",
"0.62236035",
"0.62169826",
"0.6187508",
"0.6187508",
"0.6... | 0.581947 | 44 |
Show a toast from the web page | @JavascriptInterface
public void showToast(String toast) {
Toast.makeText(mContext, toast, Toast.LENGTH_SHORT).show();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@JavascriptInterface\n public void showToast(String toast) {\n Toast.makeText(mContext, toast, Toast.LENGTH_LONG).show();\n }",
"@JavascriptInterface\n public void showToast(String toast) {\n Toast.makeText(mContext, toast, Toast.LENGTH_SHORT).show();\n }",
"@JavascriptInterface\n ... | [
"0.7552116",
"0.7543921",
"0.7543921",
"0.7483849",
"0.7483849",
"0.74731904",
"0.7211751",
"0.71990144",
"0.7018609",
"0.7011398",
"0.70072615",
"0.6984527",
"0.6955746",
"0.6949487",
"0.6939878",
"0.691425",
"0.69031924",
"0.69026643",
"0.6892764",
"0.6874465",
"0.6862928",... | 0.7532575 | 4 |
TODO Autogenerated method stub | @JavascriptInterface
public String choosePhoto() {
String file = "test";
Intent photoPickerIntent = new Intent(Intent.ACTION_PICK);
photoPickerIntent.setType("image/*");
startActivityForResult(photoPickerIntent, SELECT_GALLERY_PHOTO);
return file;
} | {
"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 |
Open previous opened link from history on webview when back button pressed | @Override
// Detect when the back button is pressed
public void onBackPressed() {
if (webView.canGoBack()) {
webView.goBack();
} else {
// Let the system handle the back button
super.onBackPressed();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void onBackPressed() {\n if(mWebView.canGoBack()) {\n mWebView.goBack();\n } else {\n super.onBackPressed();\n }\n }",
"@Override\n public void onBackPressed() {\n if(webView.canGoBack()) {\n webView.goBack();\n } els... | [
"0.7185038",
"0.71238595",
"0.7003989",
"0.69711393",
"0.69565904",
"0.6840553",
"0.6785258",
"0.6725184",
"0.6723762",
"0.66784954",
"0.6648369",
"0.664618",
"0.6602017",
"0.659942",
"0.65952307",
"0.65749806",
"0.6536817",
"0.65237844",
"0.6522286",
"0.6517692",
"0.6514651"... | 0.6985785 | 3 |
the id of the transaction this output was created in Constructor | public TransactionOutput(PublicKey reciepient, String msg, String parentTransactionId) {
this.reciepient = reciepient;
this.msg = msg;
this.parentTransactionId = parentTransactionId;
this.id = StringUtil.applySha256(StringUtil.getStringFromKey(reciepient)+msg+parentTransactionId);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int getId() {\n return txId;\n }",
"public TransactionID(){\r\nthis.id = transCount++;\r\n\r\n}",
"public long getTransactionid() {\n return transactionid;\n }",
"@Override\r\n\tpublic String createID() {\r\n\t\t \r\n\t\t\t\treturn transCode.toString();\r\n\t\t\t\t}",
"public ... | [
"0.74291235",
"0.72834843",
"0.71825105",
"0.7144666",
"0.7141605",
"0.7136535",
"0.7116796",
"0.70017636",
"0.69045615",
"0.6896511",
"0.6889849",
"0.6861568",
"0.6838615",
"0.66908616",
"0.66707593",
"0.66681486",
"0.66681486",
"0.66374594",
"0.6611316",
"0.6595942",
"0.657... | 0.65506184 | 23 |
This is the constructor that creates an instance of go2JailSquare. | public go2jailSquare(String name, int squareNumber,int trackNumber, int colorID,int totalPlayers) {
// TODO Auto-generated constructor stub
super( name, squareNumber, trackNumber, colorID, totalPlayers);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Square() {\r\n\r\n }",
"public JumbleBoard()\n {\n }",
"public Square () {\r\n super();\r\n \r\n }",
"public Square() {\n this(\"x\", false, false);\n }",
"public Square()\r\n {\r\n super();\r\n }",
"public ParkingSquare(Game game) \r\n {\r\n ... | [
"0.6551977",
"0.6506822",
"0.6367322",
"0.61368024",
"0.61086863",
"0.60224617",
"0.586853",
"0.5842459",
"0.5790307",
"0.57799625",
"0.5759117",
"0.57560194",
"0.57251716",
"0.56685764",
"0.5663653",
"0.56401885",
"0.5639767",
"0.5635469",
"0.5635469",
"0.56066483",
"0.56030... | 0.6161562 | 3 |
This method of the go2JailSquare takes the arriving player and places him inside jail. | @Override
public void arrival_proc(Player p, Game g) {
// TODO Auto-generated method stub
p.go2Jail(g);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void Jail(JailPrisoner prisoner, Player player)\r\n \t{\r\n \t\tif (!prisoner.getName().equals(player.getName().toLowerCase())) return;\r\n \t\tprisoner.SetBeingReleased(true);\r\n \t\tJailZone jail = prisoner.getJail();\r\n \t\tif (jail == null)\r\n \t\t{\r\n \t\t\tUtil.debug(prisoner, \"searching f... | [
"0.7378216",
"0.7095728",
"0.6605421",
"0.6495908",
"0.63490725",
"0.621055",
"0.61269456",
"0.5904319",
"0.5902462",
"0.58761567",
"0.5831116",
"0.57197684",
"0.57034737",
"0.56750387",
"0.56160706",
"0.55576754",
"0.553215",
"0.55153716",
"0.5513644",
"0.550016",
"0.5478594... | 0.6185431 | 6 |
Instantiates a new xML util. | private XMLUtil() {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private XmlUtil() {\n }",
"private XMLUtil()\n {\n }",
"public XMLUtils() {\r\n\t\tsuper();\r\n\t}",
"private XhtmlUtils()\n\t{\n\t}",
"private XMLUtils() {\n }",
"private XMLUtils()\r\n\t{\r\n\t}",
"public static synchronized XMLUtil getInstance() {\n\t\tif (instance == null) {\n\t\t\tinstance... | [
"0.683185",
"0.6778944",
"0.6689065",
"0.64289016",
"0.6421574",
"0.6368228",
"0.63417274",
"0.63283277",
"0.6187278",
"0.6158596",
"0.59236926",
"0.5865813",
"0.58477557",
"0.5763822",
"0.57190686",
"0.5700847",
"0.5671227",
"0.56589454",
"0.56255895",
"0.56255895",
"0.56228... | 0.6673452 | 3 |
Gets the single instance of XMLUtil. | public static synchronized XMLUtil getInstance() {
if (instance == null) {
instance = new XMLUtil();
}
return instance;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static ServiceUtils getInstance(){\r\n\t\tif(serviceUtil == null)\r\n\t\t\tserviceUtil = new ServiceUtils();\r\n\t\t\r\n\t\treturn serviceUtil;\r\n\t}",
"public static FileUtil getInstance() {\r\n\t\tif (Instance == null) {\r\n\t\t\tInstance = new FileUtil();\r\n\t\t}\r\n\t\treturn Instance;\r\n\t}",
"p... | [
"0.62470645",
"0.60421884",
"0.59898823",
"0.5974956",
"0.5911111",
"0.58908963",
"0.5848524",
"0.58478063",
"0.5819766",
"0.57902735",
"0.5789867",
"0.57720447",
"0.5768406",
"0.57361054",
"0.57168907",
"0.5682393",
"0.56432295",
"0.56250685",
"0.5576308",
"0.55724025",
"0.5... | 0.87719375 | 0 |
With inner try and catch | @SuppressWarnings("all")
public static void innerExceptionTest() {
int result = -1;
//Don't stop the loop with exception
for (int i = 0; i < TEST_CIRCLE_NUM; i++) {
try {
//An exception code
result = 1 / 0;
} catch (ArithmeticException e) {
LOGGER.error("Divide the zero is wrong", result);
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static int catchExceptionWithInnerCatch(){\n int x =1;\n try {\n try {\n x*=2;\n if (true) {throw new RuntimeException();}\n x*=3;\n } catch (RuntimeException e) {\n x*=5;\n } finally {\n ... | [
"0.6192573",
"0.61142933",
"0.6080054",
"0.59426934",
"0.59401417",
"0.58394307",
"0.5741091",
"0.5685418",
"0.5675383",
"0.5664239",
"0.5651184",
"0.5651184",
"0.5646113",
"0.5636525",
"0.56297743",
"0.5626364",
"0.5620793",
"0.5620793",
"0.5589905",
"0.5589905",
"0.5589905"... | 0.5623425 | 16 |
With outer try and catch | @SuppressWarnings("all")
public static void outerExceptionTest() {
int result = -1;
//Just executed once when the exception occur
//And the compiler will give the check restriction
try {
for (int i = 0; i < TEST_CIRCLE_NUM; i++) {
//An exception code
result = i / 0;
}
} catch (ArithmeticException e) {
LOGGER.error("Divide the zero is wrong", result);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static int catchExceptionWithInnerCatch(){\n int x =1;\n try {\n try {\n x*=2;\n if (true) {throw new RuntimeException();}\n x*=3;\n } catch (RuntimeException e) {\n x*=5;\n } finally {\n ... | [
"0.63438976",
"0.6323856",
"0.62587035",
"0.6092003",
"0.58439815",
"0.5748101",
"0.57273084",
"0.5719585",
"0.5671571",
"0.5671503",
"0.5605136",
"0.5592331",
"0.5581544",
"0.558109",
"0.5575214",
"0.5566485",
"0.5558469",
"0.5547789",
"0.55289453",
"0.5513924",
"0.54980284"... | 0.58123374 | 5 |
Throw a manual exception test | @SuppressWarnings("all")
public static void throwManualExceptionTest() {
int result = -1;
//
try {
for (int i = 0; i < TEST_CIRCLE_NUM; i++) {
//An exception code
throw new RuntimeException("Test exception.");
}
} catch (Exception e) {
LOGGER.error("Divide the zero is wrong", result);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test(expected = IllegalStateException.class)\r\n public void dummyThrowsExceptionWhenAttacked() {\n\r\n dummy.takeAttack(AXE_ATTACK);\r\n }",
"public static void test() throws Exception {\n\t}",
"@Test(description=\"Testing Report if Exception is Occurred (Throwing Exception Intentionally)\")\n\... | [
"0.7535548",
"0.7385371",
"0.73537457",
"0.73159915",
"0.7308769",
"0.7268168",
"0.7158023",
"0.71315783",
"0.7112653",
"0.7012636",
"0.7005704",
"0.6971774",
"0.69714206",
"0.6965169",
"0.6959449",
"0.6949653",
"0.6942041",
"0.6932154",
"0.6915974",
"0.69013005",
"0.6899468"... | 0.7406531 | 1 |
Throw a manual inner exception test | @SuppressWarnings("all")
public static void innerThrowManualExceptionTest() {
int result = -1;
for (int i = 0; i < TEST_CIRCLE_NUM; i++) {
try {
//An exception code
throw new RuntimeException("Test exception.");
} catch (Exception e) {
LOGGER.error("Divide the zero is wrong", result);
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@CustomExceptionTest(ArithmeticException.class)\n public static void test5() {\n }",
"protected void runTest() throws Throwable {\n\t\t\t\t\t\t\t\tthrow e;\n\t\t\t\t\t\t\t}",
"public static void test() throws Exception {\n\t}",
"@Test\n\tvoid qutTestForExeception() {\n\t\tassertThrows(MyException.class... | [
"0.7183669",
"0.69987524",
"0.6958911",
"0.69546634",
"0.69520605",
"0.6897546",
"0.6894485",
"0.6825604",
"0.67924213",
"0.6752958",
"0.67284876",
"0.6714249",
"0.66984725",
"0.66889036",
"0.66745085",
"0.66580415",
"0.6643444",
"0.6643356",
"0.66284823",
"0.66205466",
"0.66... | 0.7421687 | 0 |
Breadfruit constructor without name tag. | public Breadfruit() {
super(sciPlantName, commonPlantName, hiPlantName, "",
origin, status, plantForm, plantSize,
Evergreen.getMinHeightFromSize(plantSize),
Evergreen.getMaxHeightFromSize(plantSize),
Evergreen.getMinWidthFromSize(plantSize),
Evergreen.getMaxWidthFromSize(plantSize),
latitude, longitude);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Breadfruit(String nameTag) {\r\n super(sciPlantName, commonPlantName, hiPlantName, nameTag,\r\n origin, status, plantForm, plantSize,\r\n Evergreen.getMinHeightFromSize(plantSize),\r\n Evergreen.getMaxHeightFromSize(plantSize),\r\n Evergreen.getMinWidthFromSize(plantSize),\r\n ... | [
"0.78044045",
"0.76296633",
"0.7257728",
"0.71111935",
"0.705394",
"0.69118",
"0.6707735",
"0.66863",
"0.66407835",
"0.6604299",
"0.65030587",
"0.64691776",
"0.646697",
"0.6439724",
"0.63738513",
"0.6343051",
"0.63223606",
"0.63140845",
"0.6273045",
"0.6271906",
"0.62328964",... | 0.728841 | 2 |
Breadfruit constructor with name tag. | public Breadfruit(String nameTag) {
super(sciPlantName, commonPlantName, hiPlantName, nameTag,
origin, status, plantForm, plantSize,
Evergreen.getMinHeightFromSize(plantSize),
Evergreen.getMaxHeightFromSize(plantSize),
Evergreen.getMinWidthFromSize(plantSize),
Evergreen.getMaxWidthFromSize(plantSize),
latitude, longitude);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Fruit(String name){\n this.name = name;\n this.color = null;\n }",
"public Fruit(String color, String name) {\r\n\t\tthis.color = color;\r\n\t\tthis.name = name;\r\n\t}",
"public Bird(String name) {\n this.name = this.name+name;\n }",
"public Tag(String name) {\n this.name = nam... | [
"0.71605086",
"0.68617785",
"0.6856726",
"0.6827648",
"0.67864627",
"0.66630375",
"0.66186273",
"0.65471905",
"0.64423066",
"0.6414168",
"0.63912886",
"0.6384506",
"0.63632584",
"0.6303845",
"0.62641424",
"0.62282324",
"0.62120473",
"0.61427075",
"0.61420965",
"0.6139795",
"0... | 0.82439435 | 0 |
interface with just one method: the run() method | @Override
public void run() {
// runs in its own separate thread
for (int i = 0; i < 10; i++) {
System.out.println("Hello "+i);
// class (static) method pauses the program
// for number of msecs.
try {
Thread.sleep(100);
} catch (InterruptedException e) {
e.printStackTrace();
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tabstract public void run();",
"@Override\r\n\tpublic abstract void run();",
"public abstract void run();",
"public abstract void run();",
"public abstract void run();",
"public abstract void run() ;",
"public void run();",
"public void run();",
"public void run();",
"public void ru... | [
"0.8470334",
"0.8422587",
"0.8422366",
"0.8422366",
"0.8422366",
"0.83511555",
"0.832392",
"0.832392",
"0.832392",
"0.832392",
"0.832392",
"0.8258984",
"0.8121823",
"0.7945838",
"0.7945838",
"0.7945838",
"0.7945838",
"0.77627844",
"0.7745672",
"0.7709373",
"0.7698066",
"0.7... | 0.0 | -1 |
Prepares an HMMAligner to align a particular sequence and target. For the time being, we will assume that the target and sequence are of comparable sizes and an NxM matrix can fit into memory. | public HMMAligner(S query, S target, GapPenalty gapPenalty, SubstitutionMatrix<C> subMatrix){
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void prepareAlignment(String sq1, String sq2) {\n if(F == null) {\n this.n = sq1.length(); this.m = sq2.length();\n this.seq1 = strip(sq1); this.seq2 = strip(sq2);\n F = new float[3][n+1][m+1];\n B = new TracebackAffine[3][n+1][m+1];\n for(int k ... | [
"0.64414966",
"0.5167854",
"0.5134352",
"0.5036458",
"0.4960693",
"0.49544886",
"0.4823104",
"0.48228505",
"0.4676693",
"0.46649045",
"0.46478918",
"0.46423057",
"0.46242908",
"0.46183568",
"0.46047693",
"0.4604086",
"0.45827323",
"0.45725593",
"0.45572132",
"0.45163447",
"0.... | 0.5979523 | 1 |
TODO Autogenerated method stub | @Override
protected void setProfile(List<Step> arg0, List<Step> arg1) {
} | {
"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 |
/Este metodo permite regresar al menu principal al presionar el boton VOLVER | public void volver(View view){
Intent i = new Intent(this,MainActivity.class);
startActivity(i);
finish();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void voltarMenu() {\n\t\tmenu = new TelaMenu();\r\n\t\tmenu.setVisible(true);\r\n\t\tthis.dispose();\r\n\t}",
"public void volvreAlMenu() {\r\n\t\t// Muestra el menu y no permiye que se cambie el tamaņo\r\n\t\tMenu.frame.setVisible(true);\r\n\t\tMenu.frame.setResizable(false);\r\n\t\t// Oculta la ventana... | [
"0.7021572",
"0.69727504",
"0.6727215",
"0.66472644",
"0.65315366",
"0.6432422",
"0.63989013",
"0.63745594",
"0.63393474",
"0.63386416",
"0.628266",
"0.6280119",
"0.6275496",
"0.62691903",
"0.62655246",
"0.62637496",
"0.6262877",
"0.6251744",
"0.6224297",
"0.6223105",
"0.6220... | 0.0 | -1 |
/Este metodo permite regresar reporducir el video adjunto al presionar el boton PLAY | public void playVideo(View view){
YT_View.initialize(YouTubeConfig.getApiKey(), onInitializedListener);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void restartVideo();",
"public void playVideo() {\n }",
"public void playVideo() {\n \t\t try {\n \t\t\t videoView.setOnPreparedListener(new OnPreparedListener() {\n \n \t\t\t\t @Override\n \t\t\t\t public void onPrepared(MediaPlayer mp) {\n \t\t\t\t\t mp.setLooping(true); \n \t\t\t\t }\n \t\t\t })... | [
"0.71921885",
"0.71801245",
"0.6864336",
"0.6711093",
"0.6696299",
"0.66807777",
"0.6667144",
"0.6647893",
"0.6612011",
"0.65586543",
"0.6548704",
"0.6494361",
"0.6491931",
"0.64354014",
"0.64113563",
"0.63881594",
"0.638475",
"0.6372173",
"0.63437515",
"0.6324694",
"0.632348... | 0.0 | -1 |
Called when the activity is first created. | @Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);
setContentView(R.layout.bfmetric);
findViewById(R.id.main).requestFocus();
calculate = (Button) findViewById(R.id.bCalculate);
heightCm = (EditText) findViewById(R.id.etHeightCm);
weightKgs = (EditText) findViewById(R.id.etWeightKgs);
waistCm = (EditText) findViewById(R.id.etWaistCm);
neckCm = (EditText) findViewById(R.id.etNeckCm);
hipsCm = (EditText) findViewById(R.id.etHipsCm);
AdView adview = (AdView) findViewById(R.id.ad);
AdRequest re = new AdRequest();
// re.setTesting(true);
adview.loadAd(re);
// show keyboard
/*
* InputMethodManager mgr = (InputMethodManager)
* getSystemService(Context.INPUT_METHOD_SERVICE);
* mgr.showSoftInput(heightCm, InputMethodManager.SHOW_IMPLICIT);
*/
// amBmi = (TextView) findViewById(R.id.tvBmiResult);
bfTxt = (TextView) findViewById(R.id.tvBfTxt);
bfCategory = (TextView) findViewById(R.id.tvBfCategory);
calculate.setOnClickListener(new View.OnClickListener() {
public void onClick(View w) { // TODO
// Auto-generated
// method
// stub
String stringHeightCm = heightCm.getText().toString();
String stringWaistCm = waistCm.getText().toString();
String stringWeightKgs = weightKgs.getText().toString();
String stringNeckCm = neckCm.getText().toString();
String stringHipsCm = hipsCm.getText().toString();
double htCm = 0.5;
// double wtKgs = 0.5;
double nckCm = 0.5;
double wstCm = 0.5;
double hpsCm = 0.5;
// if female
if (stringHeightCm.length() > 0 && stringWeightKgs.length() > 0
&& stringWaistCm.length() > 0
&& stringNeckCm.length() > 0
&& stringHipsCm.length() > 0) {
try {
// wtKgs = Double.parseDouble(stringWeightKgs);
htCm = Double.parseDouble(stringHeightCm);
nckCm = Double.parseDouble(stringNeckCm);
wstCm = Double.parseDouble(stringWaistCm);
hpsCm = Double.parseDouble(stringHipsCm);
} catch (NumberFormatException nfe) {
System.out.println("Could not parse " + nfe);
}
// htIn = (stringHeightIn.equals("null") ? 0 : htIn);
calcFemale(htCm, nckCm, wstCm, hpsCm);
} else if (stringHeightCm.length() > 0
&& stringWeightKgs.length() > 0
&& stringWaistCm.length() > 0
&& stringNeckCm.length() > 0
&& stringHipsCm.length() == 0) { // if male
try {
htCm = Double.parseDouble(stringHeightCm);
// wtKgs = Double.parseDouble(stringWeightKgs);
nckCm = Double.parseDouble(stringNeckCm);
wstCm = Double.parseDouble(stringWaistCm);
hpsCm = Double.parseDouble(stringHipsCm);
} catch (NumberFormatException nfe) {
System.out.println("Could not parse " + nfe);
}
calcMale(htCm, nckCm, wstCm);
} else {
bodyfat = -1;
bfTxt.setText("error " + bodyfat);
}
bfTxt.setText("Your bodyfat is " + bodyfat + "%");
bfCategory.setText("Body Fat Category: " + category);
InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
imm.hideSoftInputFromWindow(neckCm.getWindowToken(), 0);
imm.hideSoftInputFromWindow(hipsCm.getWindowToken(), 0);
}
});
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t\tinit();\n\t}",
"@Override\r\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\r\n\t}",
"@Override\n\tpublic void onActivit... | [
"0.791686",
"0.77270156",
"0.7693263",
"0.7693263",
"0.7693263",
"0.7693263",
"0.7693263",
"0.7693263",
"0.7637394",
"0.7637394",
"0.7629958",
"0.76189965",
"0.76189965",
"0.7543775",
"0.7540053",
"0.7540053",
"0.7539505",
"0.75269467",
"0.75147736",
"0.7509639",
"0.7500879",... | 0.0 | -1 |
TODO Autogenerated method stub | public void onClick(View w) {
String stringHeightCm = heightCm.getText().toString();
String stringWaistCm = waistCm.getText().toString();
String stringWeightKgs = weightKgs.getText().toString();
String stringNeckCm = neckCm.getText().toString();
String stringHipsCm = hipsCm.getText().toString();
double htCm = 0.5;
// double wtKgs = 0.5;
double nckCm = 0.5;
double wstCm = 0.5;
double hpsCm = 0.5;
// if female
if (stringHeightCm.length() > 0 && stringWeightKgs.length() > 0
&& stringWaistCm.length() > 0
&& stringNeckCm.length() > 0
&& stringHipsCm.length() > 0) {
try {
// wtKgs = Double.parseDouble(stringWeightKgs);
htCm = Double.parseDouble(stringHeightCm);
nckCm = Double.parseDouble(stringNeckCm);
wstCm = Double.parseDouble(stringWaistCm);
hpsCm = Double.parseDouble(stringHipsCm);
} catch (NumberFormatException nfe) {
System.out.println("Could not parse " + nfe);
}
// htIn = (stringHeightIn.equals("null") ? 0 : htIn);
calcFemale(htCm, nckCm, wstCm, hpsCm);
} else if (stringHeightCm.length() > 0
&& stringWeightKgs.length() > 0
&& stringWaistCm.length() > 0
&& stringNeckCm.length() > 0
&& stringHipsCm.length() == 0) { // if male
try {
htCm = Double.parseDouble(stringHeightCm);
// wtKgs = Double.parseDouble(stringWeightKgs);
nckCm = Double.parseDouble(stringNeckCm);
wstCm = Double.parseDouble(stringWaistCm);
hpsCm = Double.parseDouble(stringHipsCm);
} catch (NumberFormatException nfe) {
System.out.println("Could not parse " + nfe);
}
calcMale(htCm, nckCm, wstCm);
} else {
bodyfat = -1;
bfTxt.setText("error " + bodyfat);
}
bfTxt.setText("Your bodyfat is " + bodyfat + "%");
bfCategory.setText("Body Fat Category: " + category);
InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
imm.hideSoftInputFromWindow(neckCm.getWindowToken(), 0);
imm.hideSoftInputFromWindow(hipsCm.getWindowToken(), 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 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.