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 |
|---|---|---|---|---|---|---|
Metodo....: atualizaFiltroMsisdnTempoWig Descricao.: Realiza atualizacao no Banco de Dados das informacoes do Assinante/Filtro | public static void atualizaFiltroMsisdnTempoWig(Session session, FiltroMsisdnTempoWig filtro)
{
session.saveOrUpdate(filtro);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected void evento_cambioEstadoFiltrosLocales() {\r\n\t\tfinal List<PataBidireccional> allPatas = getPatas();\r\n\t\tfor (final PataBidireccional pataConectora : allPatas) {\r\n\t\t\tfinal Condicion nuevoFiltro = calcularFiltroDeEntradaPara(pataConectora);\r\n\t\t\tpataConectora.actualizarFiltroDeEntrada(nuevoF... | [
"0.5866839",
"0.5824873",
"0.57251203",
"0.5722132",
"0.5605297",
"0.5519703",
"0.55098474",
"0.5468998",
"0.5422978",
"0.53922457",
"0.5379189",
"0.5377374",
"0.5374515",
"0.53684956",
"0.5336374",
"0.53122544",
"0.530342",
"0.52895176",
"0.5283914",
"0.52807873",
"0.5269394... | 0.59254813 | 0 |
Creates new form DeveloperPrefsPanel | public DeveloperPrefsPanel(DeveloperPreferences prefs) {
this.prefs = prefs;
initComponents();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Object createPrefsEditor()\n \t{\n \t\treturn this.createPrefsEditor(true, false);\n \t}",
"private void showPreference(){\r\n if(userPreferencesForm == null) {\r\n userPreferencesForm = new UserPreferencesForm(mdiForm,true);\r\n }\r\n userPreferencesForm.loadUserPreference... | [
"0.6563004",
"0.62170094",
"0.60781264",
"0.60398847",
"0.5805823",
"0.5769819",
"0.5699072",
"0.5682468",
"0.5647402",
"0.5640129",
"0.56260926",
"0.56229013",
"0.5619753",
"0.5583432",
"0.5577857",
"0.5564509",
"0.5523468",
"0.5523246",
"0.5522204",
"0.550752",
"0.5502655",... | 0.7215074 | 0 |
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. //GENBEGIN:initComponents | private void initComponents() {
sceneMonitor = new javax.swing.JCheckBox();
sceneMonitor.setText("Enable scene monitor:");
sceneMonitor.setHorizontalTextPosition(javax.swing.SwingConstants.LEADING);
sceneMonitor.setName("sceneMonitor"); // NOI18N
sceneMonitor.setSelected(prefs.getShowSceneMonitor());
sceneMonitor.addItemListener(new java.awt.event.ItemListener() {
public void itemStateChanged(java.awt.event.ItemEvent evt) {
sceneMonitorItemStateChanged(evt);
}
});
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
this.setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addContainerGap()
.addComponent(sceneMonitor)
.addContainerGap(223, Short.MAX_VALUE))
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addContainerGap()
.addComponent(sceneMonitor)
.addContainerGap(271, Short.MAX_VALUE))
);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public MainForm() {\n initComponents();\n }",
"public MainForm() {\n initComponents();\n }",
"public MainForm() {\n initComponents();\n }",
"public Form() {\n initComponents();\n }",
"public TorneoForm() {\n initComponents();\n }",
"public GUIForm() { \... | [
"0.73927325",
"0.73927325",
"0.73927325",
"0.73527867",
"0.73327756",
"0.7330915",
"0.7296258",
"0.72668505",
"0.7226472",
"0.7215484",
"0.7158576",
"0.7155756",
"0.7151662",
"0.71413606",
"0.7136848",
"0.71340644",
"0.7121264",
"0.7120699",
"0.7114474",
"0.7111952",
"0.70889... | 0.0 | -1 |
Default constructor to instantiate Product. | public Product()
{
this.name = "";
this.price = 0.0;
this.imported = false;
this.quantity = 0;
this.taxedCost = 0.0;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Product() {}",
"public Product() { }",
"public Product() { }",
"public Product() {\n\t}",
"public Product() {\n }",
"public Product() {\n }",
"protected Product() {\n\t\t\n\t}",
"protected Product()\n\t{\n\t}",
"public SuperProduct() {\n\t\tsuper();\n\t}",
"public Producto (){\n\n ... | [
"0.8593474",
"0.85242164",
"0.85242164",
"0.8454821",
"0.8306941",
"0.8306941",
"0.8192195",
"0.8075246",
"0.78782314",
"0.77696526",
"0.77442074",
"0.75234884",
"0.74634624",
"0.745097",
"0.7357728",
"0.72302157",
"0.71901435",
"0.71272314",
"0.7120751",
"0.71077985",
"0.706... | 0.7378803 | 14 |
Parameterized constructor to initialize the values of the product attributes. | public Product(String name, double price, boolean imported, int quantity)
{
this.name = name;
this.price = price * quantity;
this.imported = imported;
this.quantity = quantity;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected Product()\n\t{\n\t}",
"protected Product() {\n\t\t\n\t}",
"public Product() {\n\t}",
"public Product() {}",
"public Product() { }",
"public Product() { }",
"public Product()\n\t{\n\t\tthis.name = \"\";\n\t\tthis.price = 0.0;\n\t\tthis.imported = false;\n\t\tthis.quantity = 0;\n\t\tthis.taxedC... | [
"0.71877086",
"0.7156086",
"0.7058626",
"0.7005337",
"0.6947394",
"0.6947394",
"0.6861748",
"0.68219143",
"0.68219143",
"0.68052053",
"0.66898924",
"0.6684502",
"0.6648674",
"0.6554209",
"0.63630897",
"0.63171273",
"0.6316314",
"0.6282001",
"0.6250334",
"0.62503064",
"0.62287... | 0.0 | -1 |
Gets the name of the product | public String getName()
{
return name;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic String getName() {\n\t\treturn product.getName();\n\t}",
"public String getName(){\n\t\treturn Name; // Return the product's name\n\t}",
"public java.lang.String getProductName () {\r\n\t\treturn productName;\r\n\t}",
"public java.lang.String getProductName() {\n return productName... | [
"0.8871685",
"0.86436415",
"0.83718365",
"0.8369664",
"0.8334876",
"0.8318786",
"0.8318786",
"0.8318786",
"0.8315846",
"0.82718456",
"0.82678413",
"0.7829804",
"0.7743637",
"0.76926094",
"0.76215506",
"0.7605279",
"0.7569406",
"0.7342058",
"0.7278459",
"0.7165201",
"0.7147162... | 0.0 | -1 |
Sets the name of the product | public void setName(String name)
{
this.name = name;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setProductName(final String productName);",
"public void setName (Product product) {\n\t\tproductNameLbl.setText(product.getName());\n\t\tproductNameLbl.repaint();\n\t}",
"public void setProductName(String productName) {\r\n this.productName = productName;\r\n }",
"public void setProduc... | [
"0.8533996",
"0.8304681",
"0.78597885",
"0.7761212",
"0.77607065",
"0.7750818",
"0.7744055",
"0.7744055",
"0.7744055",
"0.7630407",
"0.756223",
"0.73846745",
"0.73554164",
"0.7333179",
"0.7329249",
"0.7329249",
"0.7329249",
"0.731923",
"0.731923",
"0.731923",
"0.7318407",
"... | 0.0 | -1 |
Gets the price of the product. | public double getPrice()
{
return price;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public double getPrice(){\n\t\treturn Price; // Return the product's price\n\t}",
"public java.lang.Double getProductPrice () {\r\n\t\treturn productPrice;\r\n\t}",
"public Integer getProductPrice() {\n\t\treturn productPrice;\n\t}",
"public double getProductPrice() {\n return productPrice;\n }",
... | [
"0.8373802",
"0.8137353",
"0.8043654",
"0.8011962",
"0.7989144",
"0.7955646",
"0.79393935",
"0.79317194",
"0.78810555",
"0.7876843",
"0.7872129",
"0.7869956",
"0.7869956",
"0.7869956",
"0.7849356",
"0.7836552",
"0.78225714",
"0.78021914",
"0.77802604",
"0.77802604",
"0.778026... | 0.7683055 | 27 |
Calculates the price for the number of items mentioned in the quantity. | public void setPrice(double price)
{
this.price = price * quantity;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void calculatePrice(int quantity) {\n int price = quantity * priceOfCoffee;\n }",
"public double calculatePrice() {\r\n\t\treturn menuItem.getPrice() * quantity;\t\r\n\t}",
"public int calculatePrice() {\n int price = 5;\n if(hasWhippedCream) {\n price += 1;\n ... | [
"0.7625987",
"0.7455826",
"0.7355573",
"0.7294981",
"0.7216976",
"0.7022775",
"0.6735838",
"0.6690469",
"0.66700524",
"0.6632237",
"0.66042465",
"0.6600389",
"0.6585005",
"0.6561097",
"0.6542813",
"0.6541871",
"0.6533505",
"0.6522681",
"0.6495325",
"0.6455883",
"0.64396244",
... | 0.0 | -1 |
Checks if product is imported. | public boolean isImported()
{
return imported;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private boolean getIsImported(String productName) {\n\t\treturn productName.contains(AppConstants.IMPORTED_TOKEN);\n\t}",
"protected boolean isImport() {\n\t\t// Overrides\n\t\treturn false;\n\t}",
"public boolean isImported();",
"boolean hasImported();",
"public boolean isSetImport()\n {\n synch... | [
"0.77243394",
"0.6969761",
"0.68355674",
"0.6684317",
"0.66574234",
"0.6555168",
"0.65219504",
"0.6342474",
"0.6261834",
"0.62502044",
"0.6197154",
"0.6171368",
"0.6150006",
"0.61281884",
"0.61032313",
"0.60841584",
"0.60764515",
"0.6027135",
"0.60142314",
"0.58512324",
"0.58... | 0.63097984 | 8 |
Sets a boolean value for imported attribute | public void setImported(boolean imported)
{
this.imported = imported;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setI_IsImported (boolean I_IsImported);",
"public void setImported(boolean imported);",
"public boolean getIsImport() {\n return getAsBoolean(\"isImport\");\n }",
"public boolean getImported();",
"boolean getImported();",
"@Override\n public void setAttribute(boolean f)\n {\n ... | [
"0.77917594",
"0.7626825",
"0.64503914",
"0.632467",
"0.6292131",
"0.6279957",
"0.6268332",
"0.62642115",
"0.6258317",
"0.62409675",
"0.6233856",
"0.62094635",
"0.61860836",
"0.61781806",
"0.6144493",
"0.6114986",
"0.60748804",
"0.60661197",
"0.6061175",
"0.605338",
"0.603277... | 0.69767183 | 2 |
Gets the quantity of the product. | public int getQuantity()
{
return quantity;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public long getQuantity() {\n return quantity_;\n }",
"public long getQuantity() {\n return quantity_;\n }",
"public long getQuantity() {\n return quantity_;\n }",
"public long getQuantity() {\n return quantity_;\n }",
"public java.math.BigDecimal getQuantity() {\n ... | [
"0.79308015",
"0.79308015",
"0.7892754",
"0.7892754",
"0.7772161",
"0.77557033",
"0.77530056",
"0.7747068",
"0.7743807",
"0.7732663",
"0.77143127",
"0.77143127",
"0.77143127",
"0.77143127",
"0.77143127",
"0.77045774",
"0.77045774",
"0.76777524",
"0.7660681",
"0.7652603",
"0.7... | 0.76977104 | 17 |
Sets the quantity of product. | public void setQuantity(int quantity)
{
this.quantity = quantity;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setQuantity(int value) {\n this.quantity = value;\n }",
"public void setQuantity(int value) {\n this.quantity = value;\n }",
"public void setQuantity(int value) {\n this.quantity = value;\n }",
"public void setQuantity(int quantity) {\n this.quantity = quantit... | [
"0.8048079",
"0.8048079",
"0.8048079",
"0.8043982",
"0.80250525",
"0.79756707",
"0.794721",
"0.79419476",
"0.79419476",
"0.7870442",
"0.7818646",
"0.7798737",
"0.7773459",
"0.7739116",
"0.7739116",
"0.7714987",
"0.7653766",
"0.76329285",
"0.76190984",
"0.75431997",
"0.7513897... | 0.7908217 | 9 |
Gets the net cost of the product including tax. | public double getTaxedCost()
{
return taxedCost;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public double netPrice () {\n return discountedPrice() + taxCharged();\n }",
"public double netPrice() {\n double tot = 0;\n for (Equipment e : equipments) {\n tot += e.netPrice();\n }\n\n return tot;\n }",
"public double calculateCost() {\n double output = ... | [
"0.7804965",
"0.74183154",
"0.7251599",
"0.69888926",
"0.68650883",
"0.67505527",
"0.67387",
"0.67376065",
"0.67110896",
"0.66748345",
"0.66422904",
"0.6589733",
"0.65712327",
"0.6565083",
"0.6557812",
"0.655213",
"0.6541139",
"0.6522932",
"0.65214103",
"0.6520505",
"0.650157... | 0.6389169 | 40 |
Sets the total taxed cost of the product. | public void setTaxedCost(double taxedCost)
{
this.taxedCost = taxedCost;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setSalesTaxTotal(BigDecimal amount){\r\n\t\ttaxTotal = amount.doubleValue();\r\n\t}",
"void setTax(BigDecimal tax);",
"public void setTaxAmount(double value) {\n this.taxAmount = value;\n }",
"public void setTax(Double tax);",
"public void setTotalCost(float totalCost) {\n this... | [
"0.68407506",
"0.6745595",
"0.6597978",
"0.65516704",
"0.64978087",
"0.64454913",
"0.64172834",
"0.6313737",
"0.6247956",
"0.62106586",
"0.62051016",
"0.6181032",
"0.6056915",
"0.60492796",
"0.6030765",
"0.60125256",
"0.60097873",
"0.60079163",
"0.59942216",
"0.59813493",
"0.... | 0.6953863 | 0 |
Gets a String representation for the imported attribute. | public String toString(boolean imported)
{
if(imported == false)
{
return "";
}
else
{
return "imported";
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getLable () {\n return getString(ATTRIBUTE_LABEL);\n }",
"public String getStringAttribute();",
"public final String getPerunSourceAttribute() {\n\t\treturn JsUtils.getNativePropertyString(this, \"perunSourceAttribute\");\n\t}",
"public String getExtAttribute4() {\n return (String... | [
"0.66767454",
"0.6526992",
"0.6177588",
"0.61680925",
"0.611424",
"0.6102165",
"0.6090142",
"0.6087254",
"0.6062181",
"0.590718",
"0.5897092",
"0.58793414",
"0.58775693",
"0.5857765",
"0.5827747",
"0.5818369",
"0.5803078",
"0.580256",
"0.57970816",
"0.57970816",
"0.57806414",... | 0.5922542 | 9 |
Gets the factory object to create a product. | public abstract ProductFactory getFactory(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public abstract Product productFactory(String type);",
"public interface ProductFactory {\n Product createProduct();\n}",
"@Override\r\n\tpublic Product factory() {\n\t\treturn new ConcreteProduct2();\r\n\t}",
"public interface Factory {\n Product create();\n}",
"public ObjectifyFactory factory() {\n... | [
"0.75730896",
"0.7543739",
"0.7442037",
"0.74143386",
"0.693716",
"0.6770003",
"0.67310554",
"0.6610687",
"0.6588278",
"0.6581557",
"0.641901",
"0.6221749",
"0.61923844",
"0.6174224",
"0.6127991",
"0.61115754",
"0.6103985",
"0.6103817",
"0.60802233",
"0.6042809",
"0.6020056",... | 0.7878763 | 0 |
Gets the tax value of the product in a particular region. | public abstract double getTaxValue(String country); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"double getTax();",
"BigDecimal getTax();",
"public double getTax() {\n return tax_;\n }",
"public Double getTax();",
"public double getTax() {\n return tax_;\n }",
"double getTaxAmount();",
"public BigDecimal getTax() {\n return tax;\n }",
"public double getTaxValue() {\... | [
"0.68670684",
"0.6846462",
"0.680115",
"0.6796079",
"0.6787925",
"0.67752784",
"0.6732133",
"0.66091716",
"0.6550214",
"0.6523395",
"0.64695895",
"0.64674014",
"0.64642584",
"0.6367757",
"0.63076526",
"0.628817",
"0.6228018",
"0.6226879",
"0.6205257",
"0.62024057",
"0.6193479... | 0.7355918 | 0 |
Registers a Block without creating a matching ItemBlock for it. This is used for blocks without items or special Items that are being created manualy. | private static Block registerBlockWithoutItem(String MODID, String name, Block b){
return Registry.register(Registry.BLOCK, MODID+":"+name, b);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static <BLOCK extends Block> BLOCK register(@Nonnull final BLOCK block, @Nullable final ItemBlock itemBlock) {\n\t\tfinal ResourceLocation resourceLocation = block.getRegistryName();\n\t\tif (resourceLocation == null) {\n\t\t\tWarpDrive.logger.error(String.format(\"Missing registry name for block %s, ignori... | [
"0.7000217",
"0.6898101",
"0.65587044",
"0.64962757",
"0.64884794",
"0.6398437",
"0.6386786",
"0.62998563",
"0.6298819",
"0.62322557",
"0.6191032",
"0.6169768",
"0.60663635",
"0.6011175",
"0.59822243",
"0.59801596",
"0.59683365",
"0.5939013",
"0.590108",
"0.5894717",
"0.58941... | 0.7838141 | 0 |
Registers a Block and creates a matching Block Item | public static Block registerBlock(String MODID, String name, Block block, ItemGroup itemGroup){
return registerBlock(MODID, name, block, (new Item.Settings()).itemGroup(itemGroup));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static void registerBlock(Block b)\n\t{\n\t}",
"private static Item registerBlockItem(Block block, Item.Settings settings){\n Identifier id = Registry.BLOCK.getId(block);\n return CottonItemHelper.registerItem(id.getNamespace(), id.getPath(), new BlockItem(block, settings));\n }",
"pub... | [
"0.7591017",
"0.75281364",
"0.7186518",
"0.71689636",
"0.7095899",
"0.70265675",
"0.6970868",
"0.68589896",
"0.68340325",
"0.673001",
"0.6702706",
"0.66629523",
"0.66210544",
"0.657349",
"0.65718764",
"0.65395546",
"0.6523188",
"0.64743",
"0.6470876",
"0.64594406",
"0.6407781... | 0.709003 | 5 |
Registers a Block and creates a matching Block Item | public static Block registerBlock(String MODID, String name, Block block, Item.Settings settings){
block = registerBlockWithoutItem(MODID, name, block);
registerBlockItem(block, settings);
return block;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static void registerBlock(Block b)\n\t{\n\t}",
"private static Item registerBlockItem(Block block, Item.Settings settings){\n Identifier id = Registry.BLOCK.getId(block);\n return CottonItemHelper.registerItem(id.getNamespace(), id.getPath(), new BlockItem(block, settings));\n }",
"pub... | [
"0.7591017",
"0.75281364",
"0.7186518",
"0.71689636",
"0.7095899",
"0.709003",
"0.70265675",
"0.6970868",
"0.68340325",
"0.673001",
"0.6702706",
"0.66629523",
"0.66210544",
"0.657349",
"0.65718764",
"0.65395546",
"0.6523188",
"0.64743",
"0.6470876",
"0.64594406",
"0.6407781",... | 0.68589896 | 8 |
Registers a BlockItem for a given Block and Item.Settings and automatically adds it to the BLOCK_ITEM_MAP. | private static Item registerBlockItem(Block block, Item.Settings settings){
Identifier id = Registry.BLOCK.getId(block);
return CottonItemHelper.registerItem(id.getNamespace(), id.getPath(), new BlockItem(block, settings));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void register(Block block, ItemBlock itemBlock) {\n\t\tGameRegistry.register(block);\n\t\tGameRegistry.register(itemBlock);\n\t}",
"public static <BLOCK extends Block> BLOCK register(@Nonnull final BLOCK block, @Nullable final ItemBlock itemBlock) {\n\t\tfinal ResourceLocation resourceLocation = bl... | [
"0.72989476",
"0.70351994",
"0.67818755",
"0.6445591",
"0.63013047",
"0.6264614",
"0.6095365",
"0.60819554",
"0.59812284",
"0.58638084",
"0.5788379",
"0.5727998",
"0.56500316",
"0.55932385",
"0.55757785",
"0.54676807",
"0.5431121",
"0.54260504",
"0.5424224",
"0.5374594",
"0.5... | 0.76402 | 0 |
Inflate the menu; this adds items to the action bar if it is present. | @Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.nav_drawer, menu);
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tMenuInflater inflater = getMenuInflater();\n \tinflater.inflate(R.menu.main_activity_actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {... | [
"0.7246102",
"0.7201358",
"0.7194834",
"0.7176498",
"0.71066517",
"0.7039537",
"0.7037961",
"0.70112145",
"0.70094734",
"0.69807225",
"0.6944953",
"0.69389373",
"0.6933199",
"0.6916928",
"0.6916928",
"0.6891486",
"0.68831646",
"0.68754137",
"0.68745375",
"0.68621665",
"0.6862... | 0.0 | -1 |
if(qName.equalsIgnoreCase("customername")) row.createCell(0); else if(qName.equalsIgnoreCase("item")) row.createCell(1); | @Override
public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Row createRow();",
"AttributeCell createAttributeCell();",
"MemberCell createMemberCell();",
"VARCell createVARCell();",
"public static int create(EcoSystem system){\n \n \n XSSFWorkbook workbook = new XSSFWorkbook();\n XSSFSheet sheet = workbook.createSheet(\"Customer Details\"... | [
"0.6150395",
"0.5898453",
"0.5775248",
"0.5707832",
"0.5702784",
"0.56919473",
"0.56575614",
"0.56412625",
"0.55936915",
"0.55838335",
"0.5562821",
"0.5476855",
"0.54762876",
"0.5462564",
"0.5404857",
"0.540484",
"0.53868824",
"0.5347548",
"0.5329335",
"0.5319186",
"0.5317668... | 0.0 | -1 |
Created by Eugen K. on 2/10/16. | public interface LayoutManagerInterface {
void setTopBarState(Long sectionId);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\... | [
"0.5937934",
"0.5890397",
"0.5850866",
"0.57604676",
"0.571558",
"0.5688332",
"0.56809783",
"0.56809783",
"0.5679464",
"0.56771046",
"0.56651896",
"0.5649137",
"0.5649137",
"0.5649137",
"0.5649137",
"0.5649137",
"0.56385285",
"0.5622955",
"0.5600747",
"0.55943173",
"0.5587396... | 0.0 | -1 |
Called when a header item has been clicked. | void onHeaderClicked(RowHeaderPresenter.ViewHolder viewHolder, Row row); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void onHeaderSelected(RowHeaderPresenter.ViewHolder viewHolder, Row row);",
"private HeaderViewClickListener manageHeaderClick() {\n return new HeaderViewClickListener() {\n @Override\n public void onClickOfHeaderLeftView() {\n AppUtils.showLog(TAG, \"onClickOfHeaderLe... | [
"0.74611896",
"0.71911097",
"0.6773529",
"0.66529703",
"0.6526214",
"0.64229053",
"0.6232215",
"0.6206",
"0.6201299",
"0.6177325",
"0.6171155",
"0.6101871",
"0.6007496",
"0.60012895",
"0.59973115",
"0.59917337",
"0.5980597",
"0.5961826",
"0.5918938",
"0.59149486",
"0.59102476... | 0.78793675 | 0 |
Called when a header item has been selected. | void onHeaderSelected(RowHeaderPresenter.ViewHolder viewHolder, Row row); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic void OnTitleSelected(int index) {\n\t\tif()\n\t}",
"void onHeaderClicked(RowHeaderPresenter.ViewHolder viewHolder, Row row);",
"@Override\n\t\t\tpublic void headerClick(HeaderClickEvent event) {\n\t\t\t\t\n\t\t\t\ttry{\n\t\t\t\t\tif (event.getPropertyId().equals(\"selected\")){\n\t\t\t\t\t\... | [
"0.6965692",
"0.67747146",
"0.6742936",
"0.66799605",
"0.66799605",
"0.6542337",
"0.6192444",
"0.6168849",
"0.615",
"0.6149981",
"0.6092758",
"0.60149103",
"0.6008258",
"0.6008038",
"0.60028195",
"0.5994418",
"0.59768975",
"0.59589183",
"0.5949025",
"0.5940291",
"0.5940291",
... | 0.77490926 | 0 |
Avoid creating hardware layer for header dock. | @Override
public boolean hasOverlappingRendering() {
return false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void createMainMenuHeaderComposite() {\n\n\t\tGridData gridData8 = new GridData();\n\t\tgridData8.grabExcessHorizontalSpace = true;\n\t\tgridData8.horizontalAlignment = GridData.FILL;\n\t\tgridData8.verticalAlignment = GridData.BEGINNING;\n\t\tgridData8.grabExcessVerticalSpace = true;\n\t\tGridData gridDat... | [
"0.577881",
"0.57451576",
"0.5724949",
"0.5670384",
"0.56056577",
"0.55796957",
"0.552689",
"0.54875714",
"0.54711473",
"0.54512084",
"0.54365176",
"0.5421273",
"0.53866535",
"0.5316968",
"0.53160846",
"0.5314462",
"0.5308583",
"0.5302947",
"0.5302675",
"0.52498984",
"0.52480... | 0.0 | -1 |
creates the actor itself. | public static Props props(){
return Props.create(ManagingServer.class,ManagingServer::new);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Actor createActor();",
"ActorType createActorType();",
"public static Props createActor(ActorRef b, ActorRef actorRef) {\n\t\treturn Props.create(FirstActor.class, () -> {\n\t\t\treturn new FirstActor(b, actorRef);\n\t\t});\n\t}",
"@Override\n public PASerializable newActor(Mailbox mailbox, Ancestor paren... | [
"0.8425422",
"0.68410265",
"0.676696",
"0.6660534",
"0.66072184",
"0.65861475",
"0.6570325",
"0.65581715",
"0.6541742",
"0.6398075",
"0.6391438",
"0.62745",
"0.6261963",
"0.62191004",
"0.6216519",
"0.62056404",
"0.61573267",
"0.61399984",
"0.61242557",
"0.612224",
"0.61030006... | 0.0 | -1 |
TODO Autogenerated method stub | public static void main(String[] args) throws InterruptedException {
System.setProperty("webdriver.chrome.driver", "./drivers/chromedriver.exe");
ChromeDriver driver = new ChromeDriver();
driver.get("https://rahulshettyacademy.com/seleniumPractise/#/");
driver.manage().window().maximize();
driver.manage().timeouts().implicitlyWait(5, TimeUnit.SECONDS);
String[] veggies = {"Almonds","Mango","Banana","Orange"};
CartItems(driver, veggies);
} | {
"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 |
Encode the input data producing a base 64 encoded byte array. | public static String base64Encode(byte[] input) {
return DatatypeConverter.printBase64Binary(input);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static String encodeToBase64(byte[] data) {\n return Base64.encodeToString(data, BASE64_EFLAGS);\n }",
"public static String encB64(byte[] data) {\n return Base64.encodeToString(data,Base64.DEFAULT);\n }",
"public static String toBase64(byte[] data)\n {\n return Base64.enc... | [
"0.72122514",
"0.7207746",
"0.70016015",
"0.6961337",
"0.69240034",
"0.6898393",
"0.6889083",
"0.6887976",
"0.6869274",
"0.68061566",
"0.67038393",
"0.67011404",
"0.66755074",
"0.6582521",
"0.6576005",
"0.65676105",
"0.65502024",
"0.64844966",
"0.6473105",
"0.6452561",
"0.640... | 0.7948083 | 0 |
This method asynchronously fetches the user profile and displays their Username, location, picture and 10 latest tweet's. | public CompletionStage<Result> getUserProfile(String userName) throws TwitterException{
return FutureConverters.toJava(ask(userProfileActor,new UserProfileActor.UserProfileQuery(userName),10000))
.thenApply(response->ok(userProfilePage.render((UserProfileResult)response)));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void populateUserProfile() {\n setProfilePic();\n mDisplayNameTextView.setText(user.getName());\n mUsernameTextView.setText(String.format(\"@%s\", user.getUsername()));\n mBioTextView.setText(user.getBio());\n setAdapterForUserStories();\n\n new Thread(new Runnable... | [
"0.7051922",
"0.63760006",
"0.6327168",
"0.624458",
"0.62244767",
"0.61927056",
"0.6159962",
"0.60866976",
"0.60848033",
"0.60442865",
"0.6005273",
"0.59933984",
"0.59766734",
"0.5955909",
"0.59318876",
"0.59211916",
"0.5889692",
"0.58736354",
"0.5872263",
"0.5854954",
"0.583... | 0.57443607 | 28 |
Resets the increation consequence | public abstract void reset(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void reset() {\n\t\tinit(0, 0, 1, false);\n\t}",
"public void reset() {\n\t\tmCycleFlip = false;\n\t\tmRepeated = 0;\n\t\tmMore = true;\n //mOneMoreTime = true;\n \n\t\t// 추가\n\t\tmStarted = mEnded = false;\n\t\tmCanceled = false;\n }",
"protected void reset()\n {\n super.rese... | [
"0.70431894",
"0.68783873",
"0.68548316",
"0.6848993",
"0.669207",
"0.6679451",
"0.6669012",
"0.6667035",
"0.6620802",
"0.6620802",
"0.6620802",
"0.6620802",
"0.66162163",
"0.6597043",
"0.65799564",
"0.65799564",
"0.6560771",
"0.65582865",
"0.65325105",
"0.65315735",
"0.65310... | 0.0 | -1 |
Returns the consequence created if all the mandatory attributes are set. If not, an IllegalStateException is raised. | public Consequence getConsequence() {
if (isConsequenceReady()) {
Consequence tmp = this.newConsequence;
this.reset();
return tmp;
}
throw new IllegalStateException(i18n.getString("consequence.notReady"));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean mayContainSequenceConstructor() {\r\n return true;\r\n }",
"public boolean mayContainSequenceConstructor() {\r\n return true;\r\n }",
"@Override\n public boolean mayContainSequenceConstructor() {\n return true;\n }",
"@Override\n public boolean mayContainSeq... | [
"0.58054245",
"0.58054245",
"0.5658921",
"0.5658921",
"0.5611449",
"0.5406538",
"0.539123",
"0.5290449",
"0.5237318",
"0.5178267",
"0.5178267",
"0.5177204",
"0.5173541",
"0.51234376",
"0.5060276",
"0.50579095",
"0.49376255",
"0.48601282",
"0.48601282",
"0.48601282",
"0.485512... | 0.62081146 | 0 |
Identifies if the consequence being created is ok to be returned or not. | public boolean isConsequenceReady() {
return ((this.newConsequence != null) &&
(this.newConsequence.getRelatedRule() != null));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"boolean hasHas_consequence();",
"boolean hasConstruct();",
"boolean isConsomme();",
"protected boolean _isEventForSuccessfulCreate(final PersistenceOperationOKEvent opEvent) {\n\t\tPersistenceOperationOK opResult = opEvent.getResultAsOperationOK();\n\t\tboolean handle = _crudOperationOKEventFilter.hasTobeHan... | [
"0.67466766",
"0.6475421",
"0.6255219",
"0.59222174",
"0.58643675",
"0.58643675",
"0.57493585",
"0.57221377",
"0.5707718",
"0.56888264",
"0.5676967",
"0.5635957",
"0.5626098",
"0.5625872",
"0.5621558",
"0.5607502",
"0.55926824",
"0.55871713",
"0.5582249",
"0.5578734",
"0.5570... | 0.64145494 | 2 |
Returns the indicator of lenient consequence builder. The default is false. When it is false, the concrete class extending this one has the opportunity to make tight check on other attributes (Like dimensions for example see TelcoConsequenceBuilder) in order to guarantee all is properly set. When it is true, the concrete class has the opportunity to allows a more relaxed and flexible attributes setting. Support for this is not mandatory, althrought is MUST be documented in implementations fo this abstract class. | public boolean isLenient() {
return this.lenient;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Builder isMandatory(boolean mandatory) {\n this.mandatory = mandatory;\n return this;\n }",
"public Boolean getUniCicloRequired() {\n return uniCicloRequired;\n }",
"public boolean isCauldron() {\n return this.type == Type.CAULDRON;\n }",
"public Boolea... | [
"0.5457502",
"0.5423454",
"0.53888726",
"0.5377929",
"0.53705645",
"0.5354467",
"0.527543",
"0.52385324",
"0.523228",
"0.52222586",
"0.52191675",
"0.515111",
"0.5143353",
"0.5141309",
"0.51364577",
"0.5134679",
"0.5128099",
"0.5120594",
"0.511632",
"0.5106112",
"0.5097099",
... | 0.0 | -1 |
Sets the rule this consequence was triggered by. | public void setRule(String _ruleCode, String _ruleName) {
Rule r = (Rule) this.cache.get(Rule.class, _ruleCode);
if (r == null) {
r = new Rule(_ruleCode, _ruleName);
}
this.setRule(r);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void setRule(Rule rule);",
"public void setRule(RuleDefinition.Builder rule) {\r\n\t\t\tthis.rule = rule;\r\n\t\t}",
"public void setRule(final String rule) {\r\n this.rule = rule;\r\n }",
"public void setRule(int rule) {\n\t\tthis.rule = rule;\n\t}",
"public void setRule(IRule rule)\n\t{\n\t\tth... | [
"0.7756497",
"0.74640554",
"0.7252207",
"0.7243189",
"0.69513744",
"0.69271135",
"0.691588",
"0.6744237",
"0.6489892",
"0.6442925",
"0.6281157",
"0.6227015",
"0.61421955",
"0.6129025",
"0.60864884",
"0.6048917",
"0.601443",
"0.59197396",
"0.5897901",
"0.58328766",
"0.58043945... | 0.0 | -1 |
Interface that persists data of type T and notifies whether persistence was successful via the persistence callback | public interface PersistenceDelegate<T> {
/**
* This method saves the data of type T.
* @param data - the data to save
* @param callback - the persistence callback
*/
public boolean save(T data) throws MIDaaSException;
/**
* This method deletes the data of type T.
* @param data - the data to delete
* @param callback - the persistence callback
*/
public boolean delete(T data) throws MIDaaSException;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public interface Persistence<T> {\n public T retrieve(String path) throws IOException, BadFormatException;\n public void save(T object, String path) throws IOException;\n}",
"T save(T t);",
"@Override\r\n\tpublic void save(T t) {\n\t\tgetSession().save(t);\r\n\t}",
"<T> Serializable save(T persistentOb... | [
"0.72265303",
"0.72135913",
"0.7089525",
"0.7048737",
"0.70417476",
"0.70367354",
"0.70305175",
"0.6859785",
"0.6847824",
"0.6724488",
"0.66963553",
"0.66889894",
"0.6687631",
"0.6681789",
"0.66356075",
"0.6566125",
"0.6557356",
"0.65485406",
"0.65113556",
"0.64524174",
"0.64... | 0.715176 | 2 |
This method saves the data of type T. | public boolean save(T data) throws MIDaaSException; | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"int save(T t);",
"T save(T t);",
"T save(T obj);",
"@Override\r\n\tpublic void save(T t) {\n\t\tgetSession().save(t);\r\n\t}",
"private void saveData() {\n }",
"public int save(Type t) {\n\t\treturn 0;\r\n\t}",
"@Override\n\tpublic void save(T obj) throws Exception {\n\t\t\n\t}",
"@Override\r\n\tp... | [
"0.7956026",
"0.7787508",
"0.7131323",
"0.710082",
"0.70830494",
"0.699524",
"0.6979817",
"0.6942214",
"0.6891076",
"0.6744565",
"0.67370695",
"0.67090374",
"0.6703304",
"0.6666319",
"0.66611314",
"0.66119325",
"0.659716",
"0.65703785",
"0.65478253",
"0.6510383",
"0.64958555"... | 0.7300749 | 2 |
This method deletes the data of type T. | public boolean delete(T data) throws MIDaaSException; | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void delData();",
"void delete(T t);",
"@Override\n\tpublic int delete(int t) {\n\t\treturn 0;\n\t}",
"private void clearData() {}",
"public void delete(T e);",
"@Override\n\t\tpublic void delete() {\n\n\t\t}",
"@Override\n public void deleteItem(P_CK t) {\n \n }",
"void dele... | [
"0.71368957",
"0.67580575",
"0.66624784",
"0.6556267",
"0.6531411",
"0.6446478",
"0.6428442",
"0.64248157",
"0.6411218",
"0.6392292",
"0.63699013",
"0.6347545",
"0.63474643",
"0.63382125",
"0.633657",
"0.6327747",
"0.6326005",
"0.62811875",
"0.62524974",
"0.6217466",
"0.61956... | 0.70181274 | 1 |
This creates the actual cell itself which is a rectangle. | Cell(int xpos, int ypos, int status)
{
this.X = xpos;
this.Y = ypos;
this.status = status;
if (status == 0)
{
cell.setVisible(false);
}
cell.setFill(Color.WHITE);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected void createRect()\r\n\t{\r\n\t\trect = new Rectangle(getX(),getY(),width,height);\r\n\t}",
"@Override\n\tpublic Cell createCell()\n\t{\n\t\treturn derivedColumn.createCell();\n\t}",
"@Override\n\tpublic void createCellStructure() {\n\t\t\n\t}",
"void createRectangles();",
"public Rectangle() {\n\... | [
"0.7248705",
"0.719837",
"0.71569234",
"0.6907644",
"0.66043925",
"0.6590799",
"0.6526916",
"0.65082014",
"0.6498043",
"0.6452035",
"0.64359766",
"0.6428389",
"0.64036745",
"0.6394375",
"0.6378227",
"0.6359696",
"0.63528097",
"0.6309467",
"0.6306026",
"0.6283652",
"0.62762916... | 0.60445374 | 46 |
Colbert's third option is to generate random facts | public void thirdAction () {
// Declare and initialize the fact array
String fact[] = new String[4];
fact[0] = "Hi";
fact[1] = "Stephen Colbert is a satire reporter. He does do interviews";
fact[2] = "Colbert ran many shows: Daily Show, Colbert Report, and Late Show. You are probably on one of these shows.";
fact[3] = "Colbert is funny and good.";
// Generate random facts
int randomFactNumber = (int) (Math.random() * 4);
// Print out the fact and write it to the transcript file
System.out.println(fact[randomFactNumber]);
fileOut.println(fact[randomFactNumber]);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void random() {\n\n\t}",
"Randomizer getRandomizer();",
"public abstract void randomize();",
"Boolean getRandomize();",
"private Random rand()\n\t{\n\t\treturn new Random();\n\t}",
"public String getFact() {\n Random randomGenerator = new Random();\n int randomNumber = randomGenerat... | [
"0.7012605",
"0.68790114",
"0.66224116",
"0.6595659",
"0.646307",
"0.6389296",
"0.62627715",
"0.6235019",
"0.62099266",
"0.61830705",
"0.61828136",
"0.61341286",
"0.61158496",
"0.61126333",
"0.61081094",
"0.6103844",
"0.6102645",
"0.60993946",
"0.6096626",
"0.60576326",
"0.60... | 0.0 | -1 |
Delivers to SBBs an event off the top of the queue for an activity context | private void routeQueuedEvent() {
final SleeTransactionManager txMgr = this.container.getTransactionManager();
boolean rollbackTx = true;
try {
EventContextImpl eventContextImpl = de.getEventRouterActivity().getCurrentEventContext();
if (eventContextImpl == null) {
if (logger.isDebugEnabled())
logger.debug("\n\n\nDelivering event : [[[ eventId "
+ de.getEventTypeId() + " on ac "+de.getActivityContextId()+"\n");
// event context not set, create it
eventContextImpl = new EventContextImpl(de,container);
de.getEventRouterActivity().setCurrentEventContext(eventContextImpl);
// do initial event processing
EventTypeComponent eventTypeComponent = container.getComponentRepositoryImpl().getComponentByID(de.getEventTypeId());
if (logger.isDebugEnabled()) {
logger.debug("Active services for event "+de.getEventTypeId()+": "+eventTypeComponent.getActiveServicesWhichDefineEventAsInitial());
}
for (ServiceComponent serviceComponent : eventTypeComponent.getActiveServicesWhichDefineEventAsInitial()) {
if (de.getService() == null || de.getService().equals(serviceComponent.getServiceID())) {
initialEventProcessor.processInitialEvents(serviceComponent, de, txMgr, this.container.getActivityContextFactory());
}
}
}
else {
if (eventContextImpl.isSuspendedNotTransacted()) {
if (logger.isDebugEnabled())
logger.debug("\n\n\nFreezing (due to suspended context) event delivery : [[[ eventId "
+ de.getEventTypeId() + " on ac "+de.getActivityContextId()+"\n");
eventContextImpl.barrierEvent(de);
return;
}
else {
if (logger.isDebugEnabled())
logger.debug("\n\n\nResuming event delivery : [[[ eventId "
+ de.getEventTypeId() + " on ac "+de.getActivityContextId()+"\n");
}
}
// For each SBB that is attached to this activity context.
boolean gotSbb = false;
do {
String rootSbbEntityId = null;
ClassLoader invokerClassLoader = null;
SbbEntity sbbEntity = null;
SbbObject sbbObject = null;
try {
/*
* Start of SLEE Originated Invocation Sequence
* ============================================== This
* sequence consists of either: 1) One "Op Only" SLEE
* Originated Invocation - in the case that it's a
* straightforward event routing for the sbb entity. 2) One
* "Op and Remove" SLEE Originated Invocation - in the case
* it's an event routing to a root sbb entity that ends up
* in a remove to the same entity since the attachment count
* goes to zero after the event invocation 3) One "Op Only"
* followed by one "Remove Only" SLEE Originated Invocation -
* in the case it's an event routing to a non-root sbb
* entity that ends up in a remove to the corresponding root
* entity since the root attachment count goes to zero after
* the event invocation Each Invocation Sequence is handled
* in it's own transaction. All exception handling for each
* invocation sequence is handled here. Any exceptions that
* propagate up aren't necessary to be caught. -Tim
*/
// If this fails then we propagate up since there's nothing to roll-back anyway
txMgr.begin();
ActivityContext ac = null;
Exception caught = null;
SbbEntity highestPrioritySbbEntity = null;
ClassLoader oldClassLoader = Thread.currentThread().getContextClassLoader();
Set<String> sbbEntitiesThatHandledCurrentEvent = eventContextImpl.getSbbEntitiesThatHandledEvent();
try {
ac = container.getActivityContextFactory().getActivityContext(de.getActivityContextId(),true);
try {
highestPrioritySbbEntity = nextSbbEntityFinder.next(ac, de.getEventTypeId(), de.getService(), sbbEntitiesThatHandledCurrentEvent);
} catch (Exception e) {
logger.warn("Failed to find next sbb entity to deliver the event "+de+" in "+ac.getActivityContextId(), e);
highestPrioritySbbEntity = null;
}
if (highestPrioritySbbEntity == null) {
gotSbb = false;
sbbEntitiesThatHandledCurrentEvent.clear();
} else {
gotSbb = true;
sbbEntitiesThatHandledCurrentEvent.add(highestPrioritySbbEntity.getSbbEntityId());
}
if (gotSbb) {
if (logger.isDebugEnabled()) {
logger
.debug("Highest priority SBB entity, which is attached to the ac "+de.getActivityContextId()+" , to deliver the event: "
+ highestPrioritySbbEntity.getSbbEntityId());
}
// CHANGE CLASS LOADER
invokerClassLoader = highestPrioritySbbEntity.getSbbComponent().getClassLoader();
Thread.currentThread().setContextClassLoader(invokerClassLoader);
sbbEntity = highestPrioritySbbEntity;
rootSbbEntityId = sbbEntity.getRootSbbId();
EventRouterThreadLocals.setInvokingService(sbbEntity.getServiceId());
// Assign an sbb from the pool
sbbEntity.assignAndActivateSbbObject();
sbbObject = sbbEntity.getSbbObject();
sbbObject.sbbLoad();
// GET AND CHECK EVENT MASK FOR THIS SBB ENTITY
Set eventMask = sbbEntity.getMaskedEventTypes(de.getActivityContextId());
if (!eventMask.contains(de.getEventTypeId())) {
// TIME TO INVOKE THE EVENT HANDLER METHOD
sbbObject.setSbbInvocationState(SbbInvocationState.INVOKING_EVENT_HANDLER);
if (logger.isDebugEnabled()) {
logger
.debug("---> Invoking event handler: ac="+de.getActivityContextId()+" , sbbEntity="+sbbEntity.getSbbEntityId()+" , sbbObject="+sbbObject);
}
sbbEntity.invokeEventHandler(de,ac,eventContextImpl);
if (logger.isDebugEnabled()) {
logger
.debug("<--- Invoked event handler: ac="+de.getActivityContextId()+" , sbbEntity="+sbbEntity.getSbbEntityId()+" , sbbObject="+sbbObject);
}
// check to see if the transaction is marked for
// rollback if it is then we need to get out of
// here soon as we can.
if (txMgr.getRollbackOnly()) {
throw new Exception("The transaction is marked for rollback");
}
sbbObject.setSbbInvocationState(SbbInvocationState.NOT_INVOKING);
} else {
if (logger.isDebugEnabled()) {
logger
.debug("Not invoking event handler since event is masked");
}
}
// IF IT'S AN ACTIVITY END EVENT DETACH SBB ENTITY HERE
if (de.getEventTypeId().equals(ActivityEndEventImpl.EVENT_TYPE_ID)) {
if (logger.isDebugEnabled()) {
logger
.debug("The event is an activity end event, detaching ac="+de.getActivityContextId()+" , sbbEntity="+sbbEntity.getSbbEntityId());
}
highestPrioritySbbEntity.afterACDetach(de.getActivityContextId());
}
// CHECK IF WE CAN CLAIM THE ROOT SBB ENTITY
if (rootSbbEntityId != null) {
if (SbbEntityFactory.getSbbEntity(rootSbbEntityId).getAttachmentCount() != 0) {
if (logger.isDebugEnabled()) {
logger
.debug("Not removing sbb entity "+sbbEntity.getSbbEntityId()+" , the attachment count is not 0");
}
// the root sbb entity is not be claimed
rootSbbEntityId = null;
}
} else {
// it's a root sbb
if (!sbbEntity.isRemoved() && sbbEntity.getAttachmentCount() == 0) {
if (logger.isDebugEnabled()) {
logger
.debug("Removing sbb entity "+sbbEntity.getSbbEntityId()+" , the attachment count is not 0");
}
// If it's the same entity then this is an
// "Op and
// Remove Invocation Sequence"
// so we do the remove in the same
// invocation
// sequence as the Op
SbbEntityFactory.removeSbbEntityWithCurrentClassLoader(sbbEntity,true);
}
}
}
} catch (Exception e) {
logger.error("Failure while routing event; second phase. DeferredEvent ["+ de.getEventTypeId() + "]", e);
if (highestPrioritySbbEntity != null) {
sbbObject = highestPrioritySbbEntity.getSbbObject();
}
caught = e;
}
// do a final check to see if there is another SBB to
// deliver.
// We don't want to waste another loop. Note that
// rollback
// will not has any impact on this because the
// ac.DeliveredSet
// is not in the cache.
if (gotSbb) {
try {
if (nextSbbEntityFinder.next(ac, de.getEventTypeId(),de.getService(),sbbEntitiesThatHandledCurrentEvent) == null) {
gotSbb = false;
}
} catch (Throwable e) {
gotSbb = false;
}
}
if (!gotSbb) {
de.eventProcessingSucceed();
if (logger.isDebugEnabled()) {
logger.debug("Delaying commit for 100ms, needed by wrongly designed tck transaction isolation tests. This only happens with DEBUG log level");
Thread.sleep(100);
}
}
Thread.currentThread().setContextClassLoader(
oldClassLoader);
boolean invokeSbbRolledBack = handleRollback.handleRollback(sbbObject, caught, invokerClassLoader,txMgr);
boolean invokeSbbRolledBackRemove = false;
ClassLoader rootInvokerClassLoader = null;
SbbEntity rootSbbEntity = null;
if (!invokeSbbRolledBack && rootSbbEntityId != null) {
/*
* If we get here this means that we need to do a
* cascading remove of the root sbb entity - since the
* original invocation was done on a non-root sbb entity
* then this is done in a different SLEE originated
* invocation, but inside the same SLEE originated
* invocation sequence. Confused yet? This is case 3) in
* my previous comment - the SLEE originated invocation
* sequence contains two SLEE originated invocations:
* One "Op Only" and One "Remove Only" This is the
* "Remove Only" part. We don't bother doing this if we
* already need to rollback
*/
caught = null;
oldClassLoader = Thread.currentThread().getContextClassLoader();
try {
rootSbbEntity = SbbEntityFactory.getSbbEntity(rootSbbEntityId);
rootInvokerClassLoader = rootSbbEntity.getSbbComponent().getClassLoader();
Thread.currentThread().setContextClassLoader(rootInvokerClassLoader);
SbbEntityFactory.removeSbbEntity(rootSbbEntity,true);
} catch (Exception e) {
logger.error("Failure while routing event; third phase. Event Posting ["+ de + "]", e);
caught = e;
} finally {
Thread.currentThread().setContextClassLoader(oldClassLoader);
}
// We have no target sbb object in a Remove Only SLEE
// originated invocation
// FIXME emmartins review
invokeSbbRolledBackRemove = handleRollback.handleRollback(null, caught, rootInvokerClassLoader,txMgr);
}
/*
* We are now coming to the end of the SLEE originated
* invocation sequence We may need to run sbbRolledBack This
* is done in the same tx if there is no target sbb entity
* in any of the SLEE originated invocations making up this
* SLEE originated invocation sequence Otherwise we do it in
* a separate tx for each SLEE originated invocation that
* has a target sbb entity. In other words we might have a
* maximum of 2 sbbrolledback callbacks invoked in separate
* tx in the case this SLEE Originated Invocation Sequence
* contained an Op Only and a Remove Only (since these have
* different target sbb entities) Pretty obvious really! ;)
*/
if (invokeSbbRolledBack && sbbEntity == null) {
// We do it in this tx
handleSbbRollback.handleSbbRolledBack(null, sbbObject, null, null, invokerClassLoader, false, txMgr);
} else if (sbbEntity != null && !txMgr.getRollbackOnly()
&& sbbEntity.getSbbObject() != null) {
sbbObject.sbbStore();
sbbEntity.passivateAndReleaseSbbObject();
}
if (txMgr.getRollbackOnly()) {
if (logger.isDebugEnabled()) {
logger
.debug("Rolling back SLEE Originated Invocation Sequence");
}
txMgr.rollback();
} else {
if (logger.isDebugEnabled()) {
logger
.debug("Committing SLEE Originated Invocation Sequence");
}
txMgr.commit();
}
/*
* Now we invoke sbbRolledBack for each SLEE originated
* invocation that had a target sbb entity in a new tx - the
* new tx creating is handled inside the handleSbbRolledBack
* method
*/
if (invokeSbbRolledBack && sbbEntity != null) {
// Firstly for the "Op only" or "Op and Remove" part
sbbEntity.getSbbEntityId();
if (logger.isDebugEnabled()) {
logger
.debug("Invoking sbbRolledBack for Op Only or Op and Remove");
}
//FIXME: baranowb: de is passed for test: tests/sbb/abstractclass/SbbRolledBackNewTransaction.xml
handleSbbRollback.handleSbbRolledBack(sbbEntity, null, de, new ActivityContextInterfaceImpl(ac), invokerClassLoader, false, txMgr);
}
if (invokeSbbRolledBackRemove) {
// Now for the "Remove Only" if appropriate
handleSbbRollback.handleSbbRolledBack(rootSbbEntity, null, null, null, rootInvokerClassLoader, true, txMgr);
}
/*
* A note on exception handling here- Any exceptions thrown
* further further up that need to be caught in order to
* handle rollback or otherwise maintain consistency of the
* SLEE state are all handled further up I.e. We *do not*
* need to call rollback here. So any exceptions that get
* here do not result in the SLEE being in an inconsistent
* state, therefore we just log them and carry on.
*/
rollbackTx = false;
} catch (RuntimeException e) {
logger.error(
"Unhandled RuntimeException in event router: ", e);
} catch (Exception e) {
logger.error("Unhandled Exception in event router: ", e);
} catch (Error e) {
logger.error("Unhandled Error in event router: ", e);
throw e; // Always rethrow errors
} catch (Throwable t) {
logger.error("Unhandled Throwable in event router: ", t);
} finally {
try {
if (txMgr.getTransaction() != null) {
if (rollbackTx) {
logger
.error("Rolling back tx in routeTheEvent.");
txMgr.rollback();
} else {
logger
.error("Transaction left open in routeTheEvent! It has to be pinned down and fixed! Debug information follows.");
logger.error(txMgr
.displayOngoingSleeTransactions());
txMgr.commit();
}
}
} catch (SystemException se) {
logger.error("Failure in TX operation", se);
}
if (sbbEntity != null) {
if (logger.isDebugEnabled()) {
logger
.debug("Finished delivering the event "
+ de.getEventTypeId()
+ " to the sbbEntity = "
+ sbbEntity.getSbbEntityId()
+ "]]] \n\n\n");
}
}
}
EventRouterThreadLocals.setInvokingService(null);
if (eventContextImpl.isSuspendedNotTransacted()) {
if (logger.isDebugEnabled())
logger.debug("\n\n\nSuspended event delivery : [[[ eventId "
+ de.getEventTypeId() + " on ac "+de.getActivityContextId()+"\n");
return;
}
// need to ensure gotSbb = false if and only if iter.hasNext()
// == false
} while (gotSbb);
/*
* End of SLEE Originated Invocation Sequence
* ==========================================
*
*/
if (de.getEventTypeId().equals(ActivityEndEventImpl.EVENT_TYPE_ID)) {
activityEndEventPostProcessor.process(de.getActivityContextId(), txMgr, this.container.getActivityContextFactory());
} else if (de.getEventTypeId().equals(TimerEventImpl.EVENT_TYPE_ID)) {
timerEventPostProcessor.process(de,this.container.getTimerFacility());
}
// we got to the end of the event routing, remove the event context
de.getEventRouterActivity().setCurrentEventContext(null);
// manage event references
DeferredEventReferencesManagement eventReferencesManagement = container.getEventRouter().getDeferredEventReferencesManagement();
eventReferencesManagement.eventUnreferencedByActivity(de.getEvent(), de.getActivityContextId());
} catch (Exception e) {
logger.error("Unhandled Exception in event router top try", e);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void handleEvent(Event e) {\n\n ConstellationIdentifier cid = null;\n\n synchronized (this) {\n\n // See if the activity is in one of our queues\n ActivityRecord tmp = lookup.get(e.target);\n\n if (tmp != null) {\n // It is, so enqueue it and return.\n ... | [
"0.5891122",
"0.5870679",
"0.57521963",
"0.57377607",
"0.5693815",
"0.5683485",
"0.5592948",
"0.5573357",
"0.5554865",
"0.5317981",
"0.52912074",
"0.52732253",
"0.52712035",
"0.5261674",
"0.52452445",
"0.52452445",
"0.5243053",
"0.5225507",
"0.52197695",
"0.51981163",
"0.5172... | 0.70237845 | 0 |
Register the bluetooth event callback and update the list | public void registerCallback() {
if (mLocalManager == null) {
Log.e(TAG, "registerCallback() Bluetooth is not supported on this device");
return;
}
mLocalManager.setForegroundActivity(mFragment.getContext());
mLocalManager.getEventManager().registerCallback(this);
mLocalManager.getProfileManager().addServiceListener(this);
forceUpdate();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void registrarEventosBluetooth() {\n IntentFilter filtro = new IntentFilter();\n filtro.addAction(BluetoothAdapter.ACTION_STATE_CHANGED);\n filtro.addAction(BluetoothAdapter.ACTION_DISCOVERY_FINISHED);\n filtro.addAction(BluetoothDevice.ACTION_FOUND);\n activity.registerR... | [
"0.686207",
"0.64995486",
"0.64736897",
"0.63600284",
"0.63595927",
"0.633208",
"0.63146675",
"0.62816316",
"0.6260194",
"0.6100889",
"0.6043666",
"0.6026535",
"0.6023275",
"0.60024583",
"0.59946007",
"0.59741557",
"0.59659374",
"0.5964098",
"0.5950084",
"0.58989996",
"0.5898... | 0.7234475 | 0 |
Unregister the bluetooth event callback | public void unregisterCallback() {
if (mLocalManager == null) {
Log.e(TAG, "unregisterCallback() Bluetooth is not supported on this device");
return;
}
mLocalManager.setForegroundActivity(null);
mLocalManager.getEventManager().unregisterCallback(this);
mLocalManager.getProfileManager().removeServiceListener(this);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void bluetoothDeactivated();",
"@Override\n public void unregisterCallback(@NonNull BleMessageStreamCallback callback) {\n mCallbacks.remove(callback);\n }",
"@Override\n public boolean onUnbind(Intent intent) {\n \tcloseBluetooth();\n return super.onUnbind(intent);\n }",
"public... | [
"0.7417763",
"0.69896775",
"0.6858225",
"0.6767762",
"0.67261934",
"0.6688237",
"0.6659464",
"0.66410315",
"0.66129583",
"0.6539773",
"0.6525212",
"0.649338",
"0.64845634",
"0.64422685",
"0.6424849",
"0.6413467",
"0.6410989",
"0.6409824",
"0.6354895",
"0.6315713",
"0.6312999"... | 0.8194312 | 0 |
Force to update the list of bluetooth devices | public void forceUpdate() {
if (mLocalManager == null) {
Log.e(TAG, "forceUpdate() Bluetooth is not supported on this device");
return;
}
if (BluetoothAdapter.getDefaultAdapter().isEnabled()) {
final Collection<CachedBluetoothDevice> cachedDevices =
mLocalManager.getCachedDeviceManager().getCachedDevicesCopy();
for (CachedBluetoothDevice cachedBluetoothDevice : cachedDevices) {
update(cachedBluetoothDevice);
}
} else {
removeAllDevicesFromPreference();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void updateBluetoothList(){\n\t\tif(bluetoothAdapter == null){\n\t\t\tAlertDialog.Builder builder = new AlertDialog.Builder(this);\n\t\t\tbuilder.setTitle(R.string.no_bt_error_dialog_title);\n\t\t\tbuilder.setMessage(R.string.no_bt_error_dialog_message);\n\t\t\tbuilder.setNeutralButton(R.string.no_bt_error... | [
"0.79350877",
"0.7387304",
"0.67067707",
"0.6613782",
"0.6589056",
"0.6588196",
"0.6542602",
"0.65117174",
"0.64873487",
"0.6482544",
"0.64609396",
"0.64458513",
"0.64444107",
"0.6397585",
"0.6384045",
"0.63571674",
"0.6348377",
"0.6319114",
"0.62858295",
"0.6274423",
"0.6258... | 0.77699494 | 1 |
Used to combine the hearing aid entries just after pairing. Once both the hearing aids get connected and their hiSyncId gets populated, this gets called for one of the 2 hearing aids so that only one entry in the connected devices list will be seen. | @Override
public void onDeviceDeleted(CachedBluetoothDevice cachedDevice) {
removePreference(cachedDevice);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Collection<BluetoothDevice> getUniqueConnectedDevices() {\n ArrayList<BluetoothDevice> result;\n synchronized (mLock) {\n result = new ArrayList<>(mHfpDevicesByAddress.values());\n }\n Set<Long> seenHiSyncIds = new LinkedHashSet<>();\n // Add the left-most activ... | [
"0.5310538",
"0.5026461",
"0.5003528",
"0.49743488",
"0.4945283",
"0.4926277",
"0.490404",
"0.4900265",
"0.48421112",
"0.48274633",
"0.48254246",
"0.47899294",
"0.47874257",
"0.47538438",
"0.47382563",
"0.46852738",
"0.46417284",
"0.46119857",
"0.4594828",
"0.45905855",
"0.45... | 0.0 | -1 |
When bluetooth service connected update the UI | @Override
public void onServiceConnected() {
forceUpdate();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void updateUI() {\n Log.i(DEBUG.TAG, \"BTDevicesActivity - updateUI - start\");\n\n btnBTScan.setEnabled(btAdapter.isEnabled() && !btAdapter.isDiscovering());\n\n if (btAdapter.isDiscovering())\n btnBTScan.setText(R.string.btn_bt_devices_scan_running_text);\n else\n ... | [
"0.7115134",
"0.7026102",
"0.69210315",
"0.68907905",
"0.6884813",
"0.68577766",
"0.6854716",
"0.6821886",
"0.681882",
"0.68008024",
"0.6795364",
"0.6764075",
"0.6763801",
"0.67170036",
"0.66933054",
"0.6692633",
"0.6618187",
"0.6605585",
"0.65958196",
"0.6555286",
"0.6516839... | 0.65481406 | 20 |
Returns the value of the 'Name' attribute. If the meaning of the 'Name' attribute isn't clear, there really should be more of a description here... | String getName(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic String getName() {\n\t\treturn (String) attributes.get(\"name\");\n\t}",
"public String getName() {\n\t\treturn (String) get_Value(\"Name\");\n\t}",
"public String getName() {\n\t\treturn (String) get_Value(\"Name\");\n\t}",
"public String getName() {\n\t\treturn (String) get_Value(\"Name... | [
"0.8552948",
"0.8311485",
"0.8311485",
"0.8311485",
"0.8164286",
"0.81468123",
"0.7994057",
"0.7994057",
"0.7994057",
"0.7955556",
"0.791245",
"0.7835615",
"0.78243345",
"0.78141195",
"0.780532",
"0.77809924",
"0.7779097",
"0.7779097",
"0.7779097",
"0.7779097",
"0.7777842",
... | 0.0 | -1 |
TODO Autogenerated method stub / startP = e.getPoint(); endP = e.getPoint(); vs.add(startP); ve.add(endP); repaint(); | @Override
public void mouseClicked(MouseEvent e) {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n public void mouseDragged(MouseEvent event)\r\n {\r\n points.add(event.getPoint());\r\n repaint(); // repaint JFrame\r\n }",
"@Override\r\n\tpublic void mousePressed(Mouse... | [
"0.6956849",
"0.691513",
"0.6736",
"0.6472929",
"0.6315233",
"0.6296336",
"0.6287569",
"0.6282974",
"0.6252134",
"0.6244395",
"0.6151015",
"0.61338115",
"0.6062205",
"0.6061981",
"0.6059",
"0.597508",
"0.5956075",
"0.5935985",
"0.59217274",
"0.59102243",
"0.58828676",
"0.58... | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public void mouseEntered(MouseEvent e) {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.608016... | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public void mouseExited(MouseEvent e) {
} | {
"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 |
connect bluetooth and init write stream | private void bluetoothConnect() {
btDevice = btAdapter.getRemoteDevice(EDISON_ADDRESS);
if (btDevice == null) {
Log.d(TAG,"get remote device fail!");
finish();
}
try {
btSocket = btDevice.createRfcommSocketToServiceRecord(SSP_UUID);
} catch (IOException e) {
Log.d(TAG,"bluetooth socket create fail.");
}
//save resource by cancel discovery
btAdapter.cancelDiscovery();
//connect
try {
btSocket.connect();
Log.d(TAG,"Connection established.");
} catch ( IOException e) {
try {
btSocket.close();
}catch (IOException e2) {
Log.d(TAG,"unable to close socket after connect fail.");
}
}
//prepare outStream to send message
try {
outStream = btSocket.getOutputStream();
} catch (IOException e) {
Log.d(TAG,"output stream init fail!");
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void connect()\n\t{\n\t\tUUID uuid = UUID.fromString(\"00001101-0000-1000-8000-00805f9b34fb\"); //Standard SerialPortService ID\n\t\ttry\n\t\t{\n\t sock = dev.createRfcommSocketToServiceRecord(uuid); \n\t sock.connect();\n\t connected = true;\n\t dev_out = sock.getOutputSt... | [
"0.66810995",
"0.66583514",
"0.6359833",
"0.63234943",
"0.6301343",
"0.62944704",
"0.62620014",
"0.61716926",
"0.61547387",
"0.612556",
"0.6096746",
"0.60615903",
"0.6040675",
"0.60005844",
"0.59529746",
"0.5928129",
"0.59227383",
"0.59211767",
"0.5894187",
"0.5848558",
"0.58... | 0.74307954 | 0 |
bluetooth send serial message | private void bluetoothSendMsg(String s) {
byte [] msgOnBuf;
msgOnBuf = s.getBytes();
try {
outStream.write(msgOnBuf);
} catch (IOException e) {
Log.d(TAG,"send message fail!");
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void sendBtMsg(final String msg2send) {\n UUID uuid = UUID.fromString(\"94f39d29-7d6d-437d-973b-fba39e49d4ee\"); //Standard SerialPortService ID\n try {\n\n if (mmDevice != null) {\n mmSocket = mmDevice.createRfcommSocketToServiceRecord(uuid);\n if (!mm... | [
"0.71418977",
"0.68411803",
"0.67522824",
"0.6671888",
"0.6583598",
"0.6570484",
"0.65189224",
"0.644357",
"0.6376619",
"0.6232193",
"0.6174217",
"0.6161969",
"0.6124261",
"0.6097199",
"0.6077042",
"0.6072158",
"0.60539174",
"0.603311",
"0.6032315",
"0.60265344",
"0.59959054"... | 0.7097971 | 1 |
Elimina y retorna la entrada asociada copn key en esta tabla Retorna null si la tabla no contiene a key como clave de algun valor | private Entry1 removeEntryForKey(Object key){
Object k= maskNull(key);
int i=hCode(key,table.length);
Entry1 previous=null;
for(Entry1 e=table[i]; e!=null; e=e.getNext()){
if(eq(k, maskNull(e.getKey()))){
if(e==table[i]){
table[i]=e.getNext();
} else{
previous.setNext(e.getNext());
}
return e;
}
previous=e;
}
return null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public Pacote remove(Object key) {\n Pacote pt = this.get(key);\n try {\n conn = Connect.connect();\n \n PreparedStatement stm = conn.prepareStatement(\"UPDATE Pacote SET visivel=FALSE WHERE nomePacote=?;\");\n \n stm.setString(1, ... | [
"0.6387818",
"0.6291138",
"0.61274934",
"0.61250556",
"0.5969863",
"0.5927049",
"0.5893134",
"0.5868959",
"0.5865056",
"0.5848621",
"0.5759686",
"0.5738911",
"0.5732822",
"0.56909275",
"0.5683473",
"0.5680539",
"0.56264627",
"0.5600855",
"0.55792344",
"0.5567465",
"0.5558871"... | 0.5959403 | 5 |
Implementation of generic dao to handle with activity entity in database | public interface ActivityDao extends GenericDao<Activity> {
/**
* Find pageable activities in database
*
* @param page page of activities list
* @param size size of page of activities list
* @return pageable list of activities
*/
List<Activity> findAllPageable(int page, int size);
/**
* @return number of activity records
*/
long getNumberOfRecords();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public interface UserActivityDao {\n\n\n /**\n * Finds all userActivity in DB\n * @return List of all activities\n * @throws DataNotFoundException if connection is down, broken or unable to retrieve information for certain reasons\n */\n List<UserActivity> findAllUserActivityInDB() throws Dat... | [
"0.80290556",
"0.7580822",
"0.72912025",
"0.7173234",
"0.69820154",
"0.68695486",
"0.68478745",
"0.6798631",
"0.677492",
"0.6667",
"0.6653274",
"0.66475534",
"0.6635346",
"0.6634498",
"0.6602105",
"0.65976745",
"0.6593465",
"0.6533989",
"0.6529377",
"0.6525646",
"0.6525078",
... | 0.7180905 | 3 |
Find pageable activities in database | List<Activity> findAllPageable(int page, int size); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void findWithPagination(Pagination<Activity, Assignment> pagination);",
"Page<EventActivityDTO> findAll(Pageable pageable);",
"Page<CoveredActivityDTO> findAll(Pageable pageable);",
"Page<Visited> findAll(Pageable pageable);",
"public interface ActivityDao extends GenericDao<Activity> {\n /**\n * Fi... | [
"0.68643564",
"0.6756979",
"0.6690341",
"0.663698",
"0.62432235",
"0.6235516",
"0.6213941",
"0.62095976",
"0.615533",
"0.6095307",
"0.6079206",
"0.6056418",
"0.60416025",
"0.60139376",
"0.6012248",
"0.60112196",
"0.5970013",
"0.59395564",
"0.5932668",
"0.5910284",
"0.5909488"... | 0.7703782 | 0 |
Triggered only when new data needs to be appended to the list Add whatever code is needed to append new items to your AdapterView | @Override
public void onLoadMore(int page, int totalItemsCount) {
customLoadMoreDataFromApi(page);
// or customLoadMoreDataFromApi(totalItemsCount);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void createList(DataSnapshot dataSnapshot) {\n if (daList.isEmpty()) {\n Item item = dataSnapshot.getValue(LostItem.class);\n daList.add(item);\n adapter.notifyDataSetChanged();\n } else {\n Item item = dataSnapshot.getValue(LostItem.class);\n ... | [
"0.6918777",
"0.6915631",
"0.6737341",
"0.6656226",
"0.66303617",
"0.6611395",
"0.6574799",
"0.6534353",
"0.65318257",
"0.6511874",
"0.64961535",
"0.64728045",
"0.6471205",
"0.6462247",
"0.6446484",
"0.6443555",
"0.64411545",
"0.6429461",
"0.6429193",
"0.64251024",
"0.6419024... | 0.0 | -1 |
Append more data into the adapter | public void customLoadMoreDataFromApi(int offset) {
// This method probably sends out a network request and appends new data items to your adapter.
// Use the offset value and add it as a parameter to your API request to retrieve paginated data.
// Deserialize API response and then construct new objects to append to the adapter
AsyncHttpClient client = new AsyncHttpClient();
//https://ajax.googleapis.com/ajax/services/search/images?v=1.0&q=%s&start=%d&imgsz=medium
//client.get("https://ajax.googleapis.com/ajax/services/search/images?"+"start="+0+"&v=1.0&q="+Uri.encode(query),
client.get(getQueryString(offset*8) + Uri.encode(query),
new JsonHttpResponseHandler(){
@Override
public void onSuccess(JSONObject response){
JSONArray imageJsonResults = null;
try{
imageJsonResults = response.getJSONObject("responseData").getJSONArray("results");
imageAdapter.addAll(ImageResult.fromJSONArray(imageJsonResults));
}catch(JSONException e){
e.printStackTrace();
}
}
});
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void loadMoreData() {\n twitterClient.getNextPageOfTweets(new JsonHttpResponseHandler() {\n @Override\n public void onSuccess(int statusCode, Headers headers, JSON json) {\n Log.i(ACTIVITY_TAG, \"onSuccess: loadMoreData\");\n // deserialize and con... | [
"0.6881785",
"0.6593877",
"0.6470943",
"0.64408314",
"0.64066076",
"0.6366639",
"0.622204",
"0.611898",
"0.6099725",
"0.60959595",
"0.6079069",
"0.6064088",
"0.6058634",
"0.59932166",
"0.595907",
"0.595907",
"0.595907",
"0.5921188",
"0.5910416",
"0.58757526",
"0.58696526",
... | 0.0 | -1 |
Inflate the menu; this adds items to the action bar if it is present. | @Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.search, menu);
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tMenuInflater inflater = getMenuInflater();\n \tinflater.inflate(R.menu.main_activity_actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {... | [
"0.7246102",
"0.7201358",
"0.7194834",
"0.7176498",
"0.71066517",
"0.7039537",
"0.7037961",
"0.70112145",
"0.70094734",
"0.69807225",
"0.6944953",
"0.69389373",
"0.6933199",
"0.6916928",
"0.6916928",
"0.6891486",
"0.68831646",
"0.68754137",
"0.68745375",
"0.68621665",
"0.6862... | 0.0 | -1 |
Inflate the menu; this adds items to the action bar if it is present. | @Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.menu_process, menu);
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tMenuInflater inflater = getMenuInflater();\n \tinflater.inflate(R.menu.main_activity_actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {... | [
"0.7246102",
"0.7201358",
"0.7194834",
"0.7176498",
"0.71066517",
"0.7039537",
"0.7037961",
"0.70112145",
"0.70094734",
"0.69807225",
"0.6944953",
"0.69389373",
"0.6933199",
"0.6916928",
"0.6916928",
"0.6891486",
"0.68831646",
"0.68754137",
"0.68745375",
"0.68621665",
"0.6862... | 0.0 | -1 |
Handle action bar item clicks here. The action bar will automatically handle clicks on the Home/Up button, so long as you specify a parent activity in AndroidManifest.xml. | @Override
public boolean onOptionsItemSelected(MenuItem item) {
int id = item.getItemId();
//noinspection SimplifiableIfStatement
if (id == R.id.action_settings) {
return true;
}
return super.onOptionsItemSelected(item);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public boolean onOptionsItemSelected(MenuItem item) { Handle action bar item clicks here. The action bar will\n // automatically handle clicks on the Home/Up button, so long\n // as you specify a parent activity in AndroidManifest.xml.\n\n //\n // HANDLE BACK BUTTON\n ... | [
"0.79041183",
"0.7805934",
"0.77659106",
"0.7727251",
"0.7631684",
"0.7621701",
"0.75839096",
"0.75300384",
"0.74873656",
"0.7458051",
"0.7458051",
"0.7438486",
"0.742157",
"0.7403794",
"0.7391802",
"0.73870087",
"0.7379108",
"0.7370295",
"0.7362194",
"0.7355759",
"0.73454577... | 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() {
jPanel1 = new javax.swing.JPanel();
jLabel1 = new javax.swing.JLabel();
jLabel2 = new javax.swing.JLabel();
jLabel4 = new javax.swing.JLabel();
jPanel2 = new javax.swing.JPanel();
jLabel3 = new javax.swing.JLabel();
jLabel6 = new javax.swing.JLabel();
jSeparator1 = new javax.swing.JSeparator();
jPanel3 = new javax.swing.JPanel();
jLabel8 = new javax.swing.JLabel();
jPanel4 = new javax.swing.JPanel();
jLabel10 = new javax.swing.JLabel();
jPanel6 = new javax.swing.JPanel();
jLabel12 = new javax.swing.JLabel();
jPanel13 = new javax.swing.JPanel();
jLabel21 = new javax.swing.JLabel();
jPanel5 = new javax.swing.JPanel();
jLabel5 = new javax.swing.JLabel();
lid = new javax.swing.JLabel();
jLabel7 = new javax.swing.JLabel();
fname = new javax.swing.JLabel();
lname = new javax.swing.JLabel();
jLabel9 = new javax.swing.JLabel();
bd = new javax.swing.JLabel();
jLabel11 = new javax.swing.JLabel();
tp = new javax.swing.JLabel();
jLabel13 = new javax.swing.JLabel();
sex = new javax.swing.JLabel();
jLabel15 = new javax.swing.JLabel();
address = new javax.swing.JLabel();
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
setResizable(false);
getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());
jPanel1.setBackground(new java.awt.Color(102, 0, 0));
jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/University_of_Kelaniya_logo.png"))); // NOI18N
javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
jPanel1.setLayout(jPanel1Layout);
jPanel1Layout.setHorizontalGroup(
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addGap(321, 321, 321)
.addComponent(jLabel1)
.addContainerGap(376, Short.MAX_VALUE))
);
jPanel1Layout.setVerticalGroup(
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 89, Short.MAX_VALUE)
);
getContentPane().add(jPanel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 1090, -1));
jLabel2.setFont(new java.awt.Font("Tahoma", 1, 24)); // NOI18N
jLabel2.setText("Welcome");
getContentPane().add(jLabel2, new org.netbeans.lib.awtextra.AbsoluteConstraints(510, 110, -1, -1));
jLabel4.setFont(new java.awt.Font("Tahoma", 1, 24)); // NOI18N
jLabel4.setText("Welcome");
getContentPane().add(jLabel4, new org.netbeans.lib.awtextra.AbsoluteConstraints(650, 110, -1, -1));
jPanel2.setBackground(new java.awt.Color(102, 102, 102));
jPanel2.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());
jLabel3.setBackground(new java.awt.Color(255, 255, 255));
jLabel3.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N
jLabel3.setForeground(new java.awt.Color(204, 204, 204));
jLabel3.setText("jLabel3");
jPanel2.add(jLabel3, new org.netbeans.lib.awtextra.AbsoluteConstraints(110, 30, -1, -1));
jLabel6.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/Teacher-male-icon.png"))); // NOI18N
jPanel2.add(jLabel6, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 10, -1, -1));
jPanel2.add(jSeparator1, new org.netbeans.lib.awtextra.AbsoluteConstraints(30, 90, 190, 10));
jPanel3.setBackground(new java.awt.Color(153, 153, 153));
jPanel3.addMouseMotionListener(new java.awt.event.MouseMotionAdapter() {
public void mouseMoved(java.awt.event.MouseEvent evt) {
jPanel3MouseMoved(evt);
}
});
jPanel3.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
jPanel3MouseClicked(evt);
}
public void mouseEntered(java.awt.event.MouseEvent evt) {
jPanel3MouseEntered(evt);
}
public void mouseExited(java.awt.event.MouseEvent evt) {
jPanel3MouseExited(evt);
}
});
jLabel8.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
jLabel8.setForeground(new java.awt.Color(204, 204, 204));
jLabel8.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/result.png"))); // NOI18N
jLabel8.setText("Enter Results");
jLabel8.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
jLabel8MouseClicked(evt);
}
});
javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
jPanel3.setLayout(jPanel3Layout);
jPanel3Layout.setHorizontalGroup(
jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel3Layout.createSequentialGroup()
.addContainerGap(69, Short.MAX_VALUE)
.addComponent(jLabel8)
.addGap(53, 53, 53))
);
jPanel3Layout.setVerticalGroup(
jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel3Layout.createSequentialGroup()
.addComponent(jLabel8)
.addGap(0, 8, Short.MAX_VALUE))
);
jPanel2.add(jPanel3, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 140, 250, 40));
jPanel4.setBackground(new java.awt.Color(153, 153, 153));
jPanel4.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
jPanel4MouseClicked(evt);
}
public void mouseEntered(java.awt.event.MouseEvent evt) {
jPanel4MouseEntered(evt);
}
public void mouseExited(java.awt.event.MouseEvent evt) {
jPanel4MouseExited(evt);
}
});
jLabel10.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
jLabel10.setForeground(new java.awt.Color(204, 204, 204));
jLabel10.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/update.png"))); // NOI18N
jLabel10.setText("Update Details");
jLabel10.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
jLabel10MouseClicked(evt);
}
});
javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);
jPanel4.setLayout(jPanel4Layout);
jPanel4Layout.setHorizontalGroup(
jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel4Layout.createSequentialGroup()
.addContainerGap(69, Short.MAX_VALUE)
.addComponent(jLabel10)
.addGap(46, 46, 46))
);
jPanel4Layout.setVerticalGroup(
jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel4Layout.createSequentialGroup()
.addComponent(jLabel10)
.addGap(0, 8, Short.MAX_VALUE))
);
jPanel2.add(jPanel4, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 200, 250, 40));
jPanel6.setBackground(new java.awt.Color(153, 153, 153));
jPanel6.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
jPanel6MouseClicked(evt);
}
public void mouseEntered(java.awt.event.MouseEvent evt) {
jPanel6MouseEntered(evt);
}
public void mouseExited(java.awt.event.MouseEvent evt) {
jPanel6MouseExited(evt);
}
});
jLabel12.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
jLabel12.setForeground(new java.awt.Color(204, 204, 204));
jLabel12.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/logout.png"))); // NOI18N
jLabel12.setText("Log Out");
jLabel12.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
jLabel12MouseClicked(evt);
}
});
javax.swing.GroupLayout jPanel6Layout = new javax.swing.GroupLayout(jPanel6);
jPanel6.setLayout(jPanel6Layout);
jPanel6Layout.setHorizontalGroup(
jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel6Layout.createSequentialGroup()
.addGap(75, 75, 75)
.addComponent(jLabel12)
.addContainerGap(83, Short.MAX_VALUE))
);
jPanel6Layout.setVerticalGroup(
jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jLabel12, javax.swing.GroupLayout.DEFAULT_SIZE, 45, Short.MAX_VALUE)
);
jPanel2.add(jPanel6, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 460, -1, -1));
jPanel13.setBackground(new java.awt.Color(153, 153, 153));
jPanel13.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
jPanel13MouseClicked(evt);
}
public void mouseEntered(java.awt.event.MouseEvent evt) {
jPanel13MouseEntered(evt);
}
public void mouseExited(java.awt.event.MouseEvent evt) {
jPanel13MouseExited(evt);
}
});
jLabel21.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
jLabel21.setForeground(new java.awt.Color(204, 204, 204));
jLabel21.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/update.png"))); // NOI18N
jLabel21.setText("Change Password");
javax.swing.GroupLayout jPanel13Layout = new javax.swing.GroupLayout(jPanel13);
jPanel13.setLayout(jPanel13Layout);
jPanel13Layout.setHorizontalGroup(
jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel13Layout.createSequentialGroup()
.addContainerGap(69, Short.MAX_VALUE)
.addComponent(jLabel21)
.addGap(21, 21, 21))
);
jPanel13Layout.setVerticalGroup(
jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel13Layout.createSequentialGroup()
.addGap(0, 0, Short.MAX_VALUE)
.addComponent(jLabel21))
);
jPanel2.add(jPanel13, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 260, 250, -1));
getContentPane().add(jPanel2, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 80, 250, 510));
jPanel5.setBackground(new java.awt.Color(204, 204, 204));
jLabel5.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
jLabel5.setText("Lecture ID:");
lid.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
lid.setText("Lecture ID:");
jLabel7.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
jLabel7.setText("Lecture Name:");
fname.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
fname.setText("Lecture ID:");
lname.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
lname.setText("Lecture ID:");
jLabel9.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
jLabel9.setText("Birth Date:");
bd.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
bd.setText("Lecture ID:");
jLabel11.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
jLabel11.setText("Mobile No:");
tp.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
tp.setText("Lecture ID:");
jLabel13.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
jLabel13.setText("Gender:");
sex.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
sex.setText("Lecture ID:");
jLabel15.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
jLabel15.setText("Address:");
address.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
address.setText("Lecture ID:");
javax.swing.GroupLayout jPanel5Layout = new javax.swing.GroupLayout(jPanel5);
jPanel5.setLayout(jPanel5Layout);
jPanel5Layout.setHorizontalGroup(
jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel5Layout.createSequentialGroup()
.addGap(29, 29, 29)
.addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addComponent(jLabel11)
.addComponent(jLabel9)
.addComponent(jLabel7)
.addComponent(jLabel5)
.addGroup(jPanel5Layout.createSequentialGroup()
.addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addComponent(jLabel13, javax.swing.GroupLayout.PREFERRED_SIZE, 47, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel15))
.addGap(3, 3, 3)))
.addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel5Layout.createSequentialGroup()
.addGap(22, 22, 22)
.addComponent(lid))
.addGroup(jPanel5Layout.createSequentialGroup()
.addGap(18, 18, 18)
.addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(sex)
.addComponent(tp)))
.addGroup(jPanel5Layout.createSequentialGroup()
.addGap(22, 22, 22)
.addComponent(fname)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(lname))
.addGroup(jPanel5Layout.createSequentialGroup()
.addGap(18, 18, 18)
.addComponent(bd))
.addGroup(jPanel5Layout.createSequentialGroup()
.addGap(18, 18, 18)
.addComponent(address)))
.addContainerGap(38, Short.MAX_VALUE))
);
jPanel5Layout.setVerticalGroup(
jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel5Layout.createSequentialGroup()
.addGap(46, 46, 46)
.addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel5)
.addComponent(lid))
.addGap(32, 32, 32)
.addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel7)
.addComponent(fname)
.addComponent(lname))
.addGap(26, 26, 26)
.addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel9)
.addComponent(bd))
.addGap(30, 30, 30)
.addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel11)
.addComponent(tp))
.addGap(28, 28, 28)
.addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel13)
.addComponent(sex))
.addGap(32, 32, 32)
.addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel15)
.addComponent(address))
.addContainerGap(76, Short.MAX_VALUE))
);
getContentPane().add(jPanel5, new org.netbeans.lib.awtextra.AbsoluteConstraints(480, 170, 300, 360));
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.73213893",
"0.72913563",
"0.72913563",
"0.72913563",
"0.7286415",
"0.724936",
"0.72132975",
"0.72076875",
"0.71963966",
"0.7190991",
"0.7184836",
"0.71593595",
"0.71489584",
"0.709429",
"0.7080468",
"0.70567",
"0.6987573",
"0.69780385",
"0.69556123",
"0.69538146",
"0.69455... | 0.0 | -1 |
Take document, detect first level, detect end of element, create element, parse element | public void parse(){
Integer childStart = this.findNewElement(0, this.document.length - 1);
if(childStart == null){
return;
}
this.root.removeData();
this.copyTextToDocumentTree(this.root, 0, childStart - 1);
DocumentSectionType childType = this.getType(childStart);
do {
Integer end = this.findNextSameLevelElement(childStart + 1, childType);
//now we have boundaries of our new element, so let's grab it's index
//we need appropriate matcher
Matcher childMatcher = childType.getPattern().matcher(this.document[childStart]);
childMatcher.find();
DocumentTree child = new DocumentTree(childType, childMatcher.group(1), null);
//now clear first line
try{
String group2 = childMatcher.group(2);
this.document[childStart] = group2 != null ? group2 + " " : "";
}catch(IndexOutOfBoundsException e){
this.document[childStart] = "";
}
try {
this.document[childStart] += childMatcher.group(3);
}catch(IndexOutOfBoundsException e){
this.document[childStart] += "";
}
//and copy it's text
this.copyTextToDocumentTree(child, childStart, end - 1);
root.addChild(child);
//finally, parse it
DocumentParser childParser = new DocumentParser(child, joinChapterWithChapterNames);
childParser.parse();
childStart = end;
}while(childStart != this.document.length);
if(this.root.getType() == DocumentSectionType.CHAPTER && this.joinChapterWithChapterNames){
DocumentTree nameNode = (DocumentTree)this.root.getChildren().get(0);
this.root.removeData();
this.root.appendData(nameNode.getIndex());
this.root.replaceChild(nameNode, nameNode.getChildren());
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static Element newRootElement()\n {\n Element element = null;\n \n try\n {\n javax.xml.parsers.DocumentBuilderFactory factory =\n javax.xml.parsers.DocumentBuilderFactory.newInstance();\n \n javax.xml.parsers.DocumentBuilder builder =\n factory.newDocumentBuilder();... | [
"0.5949904",
"0.5878545",
"0.5767933",
"0.5689475",
"0.56736207",
"0.5595097",
"0.5539228",
"0.5531826",
"0.5477765",
"0.5467622",
"0.54236585",
"0.5411113",
"0.53665566",
"0.53485304",
"0.53485304",
"0.53485304",
"0.53485304",
"0.5336744",
"0.5312325",
"0.5303725",
"0.530355... | 0.66794574 | 0 |
USER CODE of InputString goes here | public void process() throws Exception {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"String getInput();",
"protected void handleInput(String input) {}",
"public void setInput(String input) { this.input = input; }",
"public void setInput(String input);",
"public void setInput(String input){\n this.input = input;\n }",
"@Override\r\n\tpublic void acceptInput(String input) {\n\t\t... | [
"0.7729315",
"0.7477089",
"0.7414232",
"0.7271127",
"0.7061413",
"0.701825",
"0.70115215",
"0.6829558",
"0.6737676",
"0.6736535",
"0.6730205",
"0.6701102",
"0.6674",
"0.66697866",
"0.66521734",
"0.6595949",
"0.65756285",
"0.6559835",
"0.65490645",
"0.65320945",
"0.64959633",
... | 0.0 | -1 |
Initialses information specific to InputString. | public void init() {
super.init();
setDefaultInputNodes(1);
setMinimumInputNodes(1);
setMaximumInputNodes(1);
setDefaultOutputNodes(1);
setMinimumOutputNodes(1);
setMaximumOutputNodes(Integer.MAX_VALUE);
String guilines = "";
guilines += "Input your text string in the following box $title value TextField\n";
setGUIBuilderV2Info(guilines);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setInputString(String inputString) {\r\n if (input != null) {\r\n throw new BuildException(\"The \\\"input\\\" and \\\"inputstring\\\" \" + \"attributes cannot both be specified\");\r\n }\r\n this.inputString = inputString;\r\n incompatibleWithSpawn = true;\r\n ... | [
"0.64208907",
"0.63963854",
"0.63020784",
"0.6267628",
"0.6171753",
"0.6163333",
"0.61405253",
"0.6084896",
"0.6046929",
"0.6001224",
"0.59779084",
"0.595787",
"0.5947342",
"0.5924904",
"0.59198606",
"0.5904213",
"0.580566",
"0.58036137",
"0.5784033",
"0.5784033",
"0.5784033"... | 0.5839742 | 16 |
Called when the reset button is pressed within the MainTriana Window | public void reset() {
super.reset();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@FXML\n\tprivate void onResetBtn() {\n\t\truleBox.setValue(\"Standard\");\n\t\twallBox.setValue(10);\n\t\tboardBox.setValue(\"9x9\");\n\t\ttileBox.setValue(50);\n\t\tindicateLabel.setSelected(true);\n\t\t//ghostTrail.setSelected(false);\n\t\tSettings.getSingleton().reset();\n\t}",
"private void btnResetActionPer... | [
"0.8358957",
"0.7920141",
"0.7583584",
"0.75164187",
"0.74975836",
"0.74718",
"0.7447853",
"0.7434788",
"0.7433082",
"0.74252677",
"0.7377005",
"0.7317063",
"0.72816575",
"0.72602826",
"0.72455317",
"0.71978545",
"0.7197244",
"0.7195028",
"0.71579176",
"0.7151107",
"0.7141158... | 0.0 | -1 |
Called when the stop button is pressed within the MainTriana Window | public void stopping() {
super.stopping();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void stopPressed() {\n // display\n TextLCD.print(STOP);\n // reset\n reset();\n }",
"public void stop();",
"public void stop();",
"public void stop();",
"public void stop();",
"public void stop();",
"public void stop();",
"public void stop();",
"public void st... | [
"0.7855083",
"0.73776644",
"0.73776644",
"0.73776644",
"0.73776644",
"0.73776644",
"0.73776644",
"0.73776644",
"0.73776644",
"0.73776644",
"0.73776644",
"0.73776644",
"0.73776644",
"0.73776644",
"0.73776644",
"0.73776644",
"0.73405427",
"0.7316555",
"0.7316555",
"0.7316555",
... | 0.0 | -1 |
Don't need to use this for GUI Builder units as everthing is updated by triana automatically | public void updateWidgetFor(String name) {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public UpdatePerUnitCost() {\n initComponents();\n }",
"@Override\n\tprotected void UpdateUI() {\n\t\t\n\t}",
"@Override\n\tprotected void UpdateUI() {\n\t\t\n\t}",
"public void updateUI(){}",
"@Override\r\n public void updateUI() {\r\n }",
"private void updateGUIStatus() {\r\n\r\... | [
"0.67090327",
"0.6590574",
"0.6590574",
"0.65773565",
"0.6542683",
"0.64939475",
"0.6347497",
"0.6285818",
"0.6263256",
"0.6160875",
"0.6128596",
"0.6128596",
"0.6128596",
"0.6016469",
"0.6011915",
"0.5993663",
"0.59793603",
"0.595969",
"0.59219193",
"0.5902911",
"0.5874526",... | 0.0 | -1 |
This returns a brief! description of what the unit does. The text here is shown in a pop up window when the user puts the mouse over the unit icon for more than a second. | public String getPopUpDescription() {
return "Put InputString's brief description here";
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getUnitDescription ()\n {\n return unitDescription;\n }",
"public String getUnitDescription() {\r\n\t\treturn this.unitDescription;\r\n\t}",
"public final String explainUnit () {\n\t\tStringBuffer b = new StringBuffer(120) ;\n\t\tParsing t = new Parsing(symbol);\n\t\tUnit u = new Unit();\n\... | [
"0.7571397",
"0.7308072",
"0.72858644",
"0.6939771",
"0.68205357",
"0.6798144",
"0.6796176",
"0.6749766",
"0.6749766",
"0.6749766",
"0.6749766",
"0.6749766",
"0.6749766",
"0.6749766",
"0.6749766",
"0.6749766",
"0.6749766",
"0.6749766",
"0.6749766",
"0.6749766",
"0.6749766",
... | 0.0 | -1 |
Sends report via mail | public void sendMailReport() {
mailService.sendMail("users@example.org", "ToDo report",
String.format("There are '%s' todo entries!", todoListService.getAllEntries().size()));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void SendReportAsEmail(String[] EmailIds) {\n\t\t// Recipient's email ID needs to be mentioned.\n\t\t// Sender's email ID needs to be mentioned\n\t\tString from = \"mmtesters@yahoo.com\";\n\t\tString pass = \"Password123$\";\n\t\t// Recipient's email ID needs to be mentioned.\n\t\t;\n\t\tString host ... | [
"0.71072626",
"0.69530267",
"0.6935792",
"0.6860334",
"0.6847183",
"0.66513914",
"0.66049314",
"0.65573686",
"0.65314496",
"0.65026695",
"0.64957666",
"0.645365",
"0.6424219",
"0.636182",
"0.63378096",
"0.63345855",
"0.6327784",
"0.6326686",
"0.6315136",
"0.62979186",
"0.6286... | 0.81404954 | 0 |
Evaluates the int amount for a given set of requirements. | @Override
public int evaluate(Map<ResourceType, Integer> requirements) {
return this.constant;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private boolean verifyTotal(ArrayList<Integer> oneSetOfChoices, ArrayList<Integer> listAllIntegers, int target) {\n\t\t\tboolean matchFound = false;\n\t\t\tint currentTotal = 0;\n\t\t\tint valueInList = 0;\n\t\t\t for (Integer positionInteger: oneSetOfChoices) {\n\t\t\t\t valueInList = listAllIntegers.get(position... | [
"0.58624804",
"0.5478685",
"0.5403867",
"0.53693056",
"0.53231305",
"0.52808404",
"0.52635187",
"0.5246829",
"0.51624393",
"0.5151227",
"0.514408",
"0.5142919",
"0.5105123",
"0.5078108",
"0.50647557",
"0.50637877",
"0.50635415",
"0.50593215",
"0.50501883",
"0.5043619",
"0.503... | 0.55553305 | 1 |
Gets an Entitymanager from the static EntityManagerFactory. This method can be used of any extending class. | protected EntityManager getEntityManager() {
return emf.createEntityManager();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected abstract EntityManagerFactory getEntityManagerFactory();",
"static EntityManager getEntityManager(){\n return ENTITY_MANAGER_FACTORY.createEntityManager();\n }",
"public static EntityManager getEntityManager() {\n EntityManager em = tl.get();\n return em;\n }",
"public En... | [
"0.7722735",
"0.76791066",
"0.73589563",
"0.7262315",
"0.72398543",
"0.686924",
"0.6853994",
"0.6793875",
"0.66574365",
"0.66499436",
"0.6617053",
"0.65841043",
"0.6557139",
"0.65417683",
"0.65417683",
"0.65417683",
"0.65335286",
"0.65335286",
"0.65335286",
"0.65335286",
"0.6... | 0.72447234 | 4 |
Creates a given entity in the database | protected Object create(Object object) {
EntityManager em = getEntityManager();
em.getTransaction().begin();
try {
em.persist(object);
em.getTransaction().commit();
LOG.debug("Persisted " + object);
} catch (Exception e) {
LOG.error("Could not persist Object", e);
em.getTransaction().rollback();
} finally {
em.close();
}
return object;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"E create(E entity);",
"E create(E entity);",
"Entity createEntity();",
"void create(E entity);",
"void create(T entity);",
"@Override\n public void create(T entity) throws SQLException {\n\n this.dao.create(entity);\n\n }",
"void create(T entity) throws Exception;",
"public T create(T en... | [
"0.80436486",
"0.80436486",
"0.781273",
"0.77948713",
"0.7712897",
"0.7701939",
"0.7614533",
"0.76074123",
"0.7549487",
"0.75457",
"0.75396883",
"0.7249",
"0.72375304",
"0.72257996",
"0.70629984",
"0.6990665",
"0.6975112",
"0.6932782",
"0.6894707",
"0.68267477",
"0.6784107",
... | 0.65171885 | 41 |
Reads an Entity from databse | public Object read(Object object) {
EntityManager em = getEntityManager();
em.getTransaction().begin();
Object result = null;
try {
result = em.find(object.getClass(), "id");
LOG.debug("Found " + object);
} catch (Exception e) {
LOG.error("Could not find Object", e);
} finally {
em.close();
}
return result;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic void read(Object entidade) {\n\t\t\n\t}",
"@Override\n public GameLogEntity readEntity(final GameLogEntity entity) {\n return this.getEntityManager().\n find(GameLogEntity.class, entity.getId());\n }",
"public abstract Object get(String entityName, Serializable i... | [
"0.70632374",
"0.66922396",
"0.6150312",
"0.61293495",
"0.6123412",
"0.607974",
"0.6066528",
"0.606633",
"0.6037813",
"0.59780383",
"0.5905899",
"0.58891916",
"0.58808297",
"0.58719546",
"0.58335966",
"0.58281916",
"0.5804456",
"0.57810444",
"0.57417524",
"0.57408756",
"0.573... | 0.6101137 | 5 |
Updates an entity in the databse | protected void update(Object object) {
EntityManager em = getEntityManager();
em.getTransaction().begin();
try {
em.merge(object);
em.getTransaction().commit();
} catch (Exception e) {
LOG.error("Could not update Object", e);
em.getTransaction().rollback();
} finally {
em.close();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void updateEntity();",
"E update(E entity);",
"E update(E entity);",
"public void update(IEntity entity) throws SQLException;",
"public void update(E entity);",
"@Override\n\tpublic void update(DomainEntity entity) throws SQLException {\n\t\t\n\t}",
"T update(T entity);",
"T update(T entity);"... | [
"0.8454669",
"0.82874477",
"0.82874477",
"0.8159577",
"0.7961549",
"0.78471637",
"0.78431344",
"0.78431344",
"0.7837038",
"0.77965456",
"0.778916",
"0.7782585",
"0.774406",
"0.7731855",
"0.7689666",
"0.76660883",
"0.7598838",
"0.7598838",
"0.7550068",
"0.74755126",
"0.7407786... | 0.0 | -1 |
Deletes an entity from the database | protected void delete(Object object) {
EntityManager em = getEntityManager();
em.getTransaction().begin();
try {
em.remove(object);
em.getTransaction().commit();
} catch (Exception e) {
LOG.error("Could not delete Object", e);
em.getTransaction().rollback();
} finally {
em.close();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@DELETE\n public void delete() {\n PersistenceService persistenceSvc = PersistenceService.getInstance();\n try {\n persistenceSvc.beginTx();\n deleteEntity(getEntity());\n persistenceSvc.commitTx();\n } finally {\n persistenceSvc.close();\n ... | [
"0.83607006",
"0.8321758",
"0.82401305",
"0.81812394",
"0.81774116",
"0.8020754",
"0.7987374",
"0.7987374",
"0.7904617",
"0.7898728",
"0.78969055",
"0.78906673",
"0.7879374",
"0.78227514",
"0.7752682",
"0.77522933",
"0.77522933",
"0.7735946",
"0.7719033",
"0.7707974",
"0.7699... | 0.0 | -1 |
Back up old jar file | private void updateJar(){
Path currentFile = Paths.get(".\\"+APPLICATION_JAR_NAME);
Path backupFile = Paths.get(".\\"+APPLICATION_JAR_BK_NAME);
try {
if (Files.exists(currentFile)){
Files.copy(currentFile, backupFile, StandardCopyOption.REPLACE_EXISTING);
}
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
logger.info("Backed up current jar file.");
// Download new jar
logger.info("Downloading new jar file...");
getNewJarFromServer();
// Restart tomcat
logger.info("Restart application...");
Path executionFile = Paths.get(".\\startConnector.bat");
String command = executionFile.toString();
ProcessBuilder builder = new ProcessBuilder(command);
builder.redirectErrorStream(true); // redirect error stream to output stream
builder.redirectOutput(ProcessBuilder.Redirect.INHERIT);
try {
builder.start();
System.exit(0);
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
logger.error(e.getMessage());
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected static void instrumentJarFile(String pathToFile) throws IOException {\n File jarFile = new File(pathToFile);\n // Use tmp file for output (in the same directory).\n File newFile = File.createTempFile(\"any\", \".jar\", jarFile.getParentFile());\n ZipInputStream zis = null;\n ... | [
"0.5797263",
"0.5792429",
"0.57843155",
"0.574754",
"0.5691962",
"0.5586305",
"0.5575282",
"0.5486671",
"0.5386078",
"0.5369374",
"0.5312488",
"0.5291178",
"0.52290803",
"0.52274597",
"0.52010727",
"0.51965016",
"0.5195312",
"0.5170865",
"0.5165602",
"0.51503986",
"0.5145334"... | 0.7117709 | 0 |
Inflate the menu; this adds items to the action bar if it is present. getMenuInflater().inflate(R.menu.main, menu); | @Override
public boolean onCreateOptionsMenu(Menu menu) {
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\t\t\t\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\t\t\t\tgetMenuInflater().inflate(R.menu.activity_main, menu);\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\r\n\t\treturn super.... | [
"0.8230528",
"0.8155463",
"0.8147739",
"0.8147739",
"0.8147739",
"0.8147739",
"0.814026",
"0.8118886",
"0.8117706",
"0.8117706",
"0.8117706",
"0.8105381",
"0.8101514",
"0.8101514",
"0.8101514",
"0.8101514",
"0.8101514",
"0.8101514",
"0.8099227",
"0.8099227",
"0.8099227",
"0... | 0.0 | -1 |
Handle action bar item clicks here. The action bar will automatically handle clicks on the Home/Up button, so long as you specify a parent activity in AndroidManifest.xml. | @Override
public boolean onOptionsItemSelected(MenuItem item) {
int id = item.getItemId();
//noinspection SimplifiableIfStatement
//if (id == R.id.action_settings) {
// return true;
//}
return super.onOptionsItemSelected(item);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public boolean onOptionsItemSelected(MenuItem item) { Handle action bar item clicks here. The action bar will\n // automatically handle clicks on the Home/Up button, so long\n // as you specify a parent activity in AndroidManifest.xml.\n\n //\n // HANDLE BACK BUTTON\n ... | [
"0.79039484",
"0.78061193",
"0.7765948",
"0.772676",
"0.76312095",
"0.76217103",
"0.75842994",
"0.7530533",
"0.748778",
"0.7458179",
"0.7458179",
"0.7438179",
"0.74213266",
"0.7402824",
"0.7391232",
"0.73864055",
"0.7378979",
"0.73700106",
"0.7362941",
"0.73555434",
"0.734530... | 0.0 | -1 |
Handle navigation view item clicks here. | @SuppressWarnings("StatementWithEmptyBody")
@Override
public boolean onNavigationItemSelected(MenuItem item) {
int id = item.getItemId();
if (id == R.id.nav_profile) {
callProfile();
} else if (id == R.id.nav_logout) {
session.setusename("");
TransitionLeft(LoginActivity.class);
}
DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);
drawer.closeDrawer(GravityCompat.START);
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void onNavigationItemClicked(Element element);",
"@Override\n public void onClick(View view) { listener.onItemClick(view, getPosition()); }",
"void onDialogNavigationItemClicked(Element element);",
"@Override\n public void onClick(View view) {\n itemInterface.OnItemClickedListener(tr... | [
"0.7882029",
"0.7235578",
"0.6987005",
"0.69458413",
"0.6917864",
"0.6917864",
"0.6883472",
"0.6875181",
"0.68681556",
"0.6766498",
"0.67418456",
"0.67207",
"0.6716157",
"0.6713947",
"0.6698189",
"0.66980195",
"0.66793925",
"0.66624063",
"0.66595167",
"0.6646381",
"0.6641224"... | 0.0 | -1 |
validar que Una llamada recibida se este relacionando | @Test
public void addCallReceived() {
ICallsService iCallsService = new CallsServiceImpl(new ArrayList<>());
iCallsService.addCallReceived(new Call(1l));
Assert.assertTrue(1 == iCallsService.findAll().size());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n protected void validaRegras(ArquivoLoteVO entity) {\n\n }",
"private boolean validarFormulario() {\n boolean cumple=true;\n boolean mosntrarMensajeGeneral=true;\n if(!ValidacionUtil.tieneTexto(txtNombreMedicamento)){\n cumple=false;\n };\n if(!Valid... | [
"0.628673",
"0.6271148",
"0.6170817",
"0.61030114",
"0.597751",
"0.5960161",
"0.5912293",
"0.5858398",
"0.58207774",
"0.5817801",
"0.58156633",
"0.58062446",
"0.58062446",
"0.58062446",
"0.58062446",
"0.58062446",
"0.58062446",
"0.58062446",
"0.58062446",
"0.58062446",
"0.580... | 0.0 | -1 |
validar que el codigo de la llamada recibida se este relacionando en la lista | @Test
public void findById() {
ICallsService iCallsService = new CallsServiceImpl(new ArrayList<>());
iCallsService.addCallReceived(new Call(1l));
Assert.assertTrue(1l == iCallsService.findById(1l).getId().longValue());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private boolean checkListino() {\n /* variabili e costanti locali di lavoro */\n boolean ok = false;\n Date dataInizio;\n Date dataFine;\n AddebitoFissoPannello panServizi;\n\n try { // prova ad eseguire il codice\n dataInizio = th... | [
"0.67713946",
"0.59381455",
"0.5798191",
"0.5749734",
"0.569143",
"0.5638126",
"0.56159085",
"0.5612334",
"0.5587435",
"0.5546843",
"0.5537934",
"0.55023867",
"0.54976445",
"0.5493362",
"0.5489104",
"0.5487214",
"0.5463046",
"0.5448709",
"0.54425645",
"0.5435781",
"0.5426548"... | 0.0 | -1 |
y direction Determines how the moving object moves | public void move(){
x+=xDirection;
y+=yDirection;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setMovementY(int directionY) {\r\n movementY = directionY;\r\n }",
"public void moveY(int dir) { velocity.add(PVector.mult(up, speed * dir)); }",
"public void reverseDirectionY()\n\t{\n\t\t\n\t\tvy = -vy;\n\t}",
"public void moveY() {\n\t\tsetY( getY() + getVy() );\n\t}",
"public void... | [
"0.8192648",
"0.74943376",
"0.723012",
"0.7194967",
"0.71618354",
"0.71513855",
"0.70927864",
"0.7033318",
"0.70222586",
"0.69523036",
"0.6889491",
"0.6870418",
"0.6823151",
"0.6708505",
"0.6688642",
"0.6654492",
"0.66395044",
"0.66250014",
"0.65961456",
"0.65703475",
"0.6568... | 0.64540905 | 28 |
Sets button coordinates on screen | public void setCoords(int x, int y) {
setLayoutX(x);
setLayoutY(y);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setButtonDisplayLocation(int loc) {\r\n\t\t_buttonDisplayLocation = loc;\r\n\t}",
"private void setLocations(){\n\t\tbuttonArea.setSize(FRAME_WIDTH, 50);\n\t\tbuttonArea.setLocation(0, 0);\n\t\tboardOne.setSize(600,600);\n\t\tboardOne.setLocation(0,buttonArea.getHeight());\n\t\tboardTwo.setSize(600,6... | [
"0.6996962",
"0.67642534",
"0.6722918",
"0.6366649",
"0.63325375",
"0.6312506",
"0.62993515",
"0.6261172",
"0.6239373",
"0.622173",
"0.61941195",
"0.6085298",
"0.6080609",
"0.6080609",
"0.6080609",
"0.6073616",
"0.6049785",
"0.6047866",
"0.6042527",
"0.6040803",
"0.6038069",
... | 0.5824717 | 49 |
Checks if piece has an owner | public boolean isEmpty() {
if (player == ePlayer.none) return true;
return false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean isOwnerKnown() {\n\t\tif (owner == null && possibleOwners.size() == 1)\n\t\t\towner = possibleOwners.get(0);\n\t\t\t\n\t\treturn (owner == null);\n\t}",
"@Override\n public boolean isOwner(String groupingPath, String username) {\n return isMember(groupingPath + OWNERS, username);\n }"... | [
"0.68471205",
"0.6693386",
"0.6683465",
"0.6538784",
"0.6503863",
"0.64325756",
"0.63863575",
"0.6333142",
"0.62984896",
"0.62744087",
"0.6229721",
"0.62261",
"0.6111164",
"0.610102",
"0.6077352",
"0.6069889",
"0.60597026",
"0.60588205",
"0.6042373",
"0.6032091",
"0.59826976"... | 0.0 | -1 |
Checks if piece is active | public boolean isActiveImageOn() {
if (isActiveImageOn == true) return true;
return false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"boolean hasActive();",
"public boolean hasPiece()\r\n\t{\r\n\t\treturn piece != null;\r\n\t}",
"public boolean isOccupied() {\n return piece != null;\n }",
"public boolean isOccupied() {\n\t\treturn piece != null;\n\t}",
"public boolean isActivePlayerPiece(IPiece ipiece) {\n\n for (IPiece ... | [
"0.71956795",
"0.7031622",
"0.70163035",
"0.6935316",
"0.6867512",
"0.67245716",
"0.668336",
"0.66748697",
"0.66449225",
"0.66068536",
"0.6506858",
"0.6498915",
"0.6490283",
"0.6433491",
"0.6428545",
"0.6428545",
"0.6428545",
"0.63833964",
"0.635478",
"0.63532776",
"0.6350428... | 0.0 | -1 |
Activates piece and sets image to glowing space | public void setActiveImage() {
setGraphic(new ImageView(activePiece));
isActiveImageOn = true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void reactMain_region_digitalwatch_Display_glowing_GlowOn() {\n\t\tif (sCIButtons.topRightReleased) {\n\t\t\tnextStateIndex = 3;\n\t\t\tstateVector[3] = State.$NullState$;\n\n\t\t\ttimer.setTimer(this, 5, 2 * 1000, false);\n\n\t\t\tnextStateIndex = 3;\n\t\t\tstateVector[3] = State.main_region_digitalwatch_... | [
"0.63544875",
"0.6242791",
"0.6144422",
"0.61339116",
"0.61091805",
"0.6102603",
"0.59916836",
"0.5952238",
"0.5919449",
"0.58685625",
"0.5866647",
"0.58066046",
"0.5775525",
"0.57006043",
"0.56948596",
"0.56897587",
"0.5686826",
"0.5686826",
"0.5683214",
"0.5681024",
"0.5666... | 0.6258525 | 1 |
Sets piece image to white or black piece | public void setPlayer(boolean isWhiteTurn) {
if (isWhiteTurn == true) setGraphic(new ImageView(whitePiece));
if (isWhiteTurn == false) setGraphic(new ImageView(blackPiece));
isActiveImageOn = false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setBoard(){\n \n\t m_Pieces[3][3]= WHITE_PIECE;\n m_Pieces[4][4]= WHITE_PIECE;\n m_Pieces[3][4]= BLACK_PIECE;\n m_Pieces[4][3]= BLACK_PIECE;\n for(int x=0;x<WIDTH;x++){\n for(int y=0;y<HEIGHT;y++){\n if(... | [
"0.6612954",
"0.65371966",
"0.6532363",
"0.6362466",
"0.63580316",
"0.63580316",
"0.6317772",
"0.6308455",
"0.62310636",
"0.6128841",
"0.60913885",
"0.6077768",
"0.60594726",
"0.5989386",
"0.59845865",
"0.5980072",
"0.59476984",
"0.5937468",
"0.5927907",
"0.59205925",
"0.5915... | 0.57634276 | 33 |
Lectura de XML de spring con los beans | public static void main(String[] args) {
ApplicationContext ctx = new ClassPathXmlApplicationContext("beans-cp.xml");
SpringJdbc springJdbc=ctx.getBean(SpringJdbc.class);
springJdbc.actionMethod();
//Lectura de Bean
//OrganizationDao organizationDao = (OrganizationDao) ctx.getBean("organizationDao");
((ClassPathXmlApplicationContext) ctx).close();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void main(String[] args)\n {\n ApplicationContext context=new ClassPathXmlApplicationContext(\"beans.xml\");\n Movie movie=context.getBean(\"movie\",Movie.class);\n movie.displayActor();\n\n // intialize XmlBeanFactory with beanx.xml\n BeanFactory beanFactory=n... | [
"0.6385085",
"0.62522167",
"0.62140715",
"0.6088287",
"0.6073375",
"0.6044397",
"0.596",
"0.5958542",
"0.5915337",
"0.58728105",
"0.5868681",
"0.58319587",
"0.5822739",
"0.5821355",
"0.58134145",
"0.580716",
"0.57885915",
"0.5786012",
"0.577307",
"0.57728624",
"0.57654977",
... | 0.5716276 | 28 |
physical location of item | private Item(){} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Long getItemLocationId() {\r\n return itemLocationId;\r\n }",
"public int getLocation() {\n\t\treturn 0;\n\t}",
"public PVector getLoc() {\n return location;\n }",
"public PVector getLoc() {\n return location;\n }",
"@Nullable\n protected String location() {\n String loca... | [
"0.6755554",
"0.66249776",
"0.6618763",
"0.6618763",
"0.6556062",
"0.6497729",
"0.64766765",
"0.6475534",
"0.6468109",
"0.642313",
"0.6417052",
"0.6395075",
"0.6393325",
"0.63801354",
"0.6368711",
"0.6334289",
"0.6332129",
"0.63212043",
"0.63114375",
"0.6234995",
"0.6234885",... | 0.0 | -1 |
prevent default Constuctor for the Item class | protected Item(String name, int level, String location){
this.name = name;
this.level = level;
this.location = location;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private Item(){}",
"protected Item() {\n }",
"@SuppressWarnings(\"unused\")\n public Item() {\n }",
"public Item(){}",
"public Item() {}",
"public Item()\n {\n super();\n }",
"public Item() {\n\t}",
"public Item() {\n\t}",
"public Item() {\n }",
"public Item() {\n }",
... | [
"0.8806651",
"0.87184525",
"0.8575929",
"0.8514344",
"0.84873325",
"0.8462928",
"0.8408533",
"0.8408533",
"0.8291381",
"0.8291381",
"0.81791085",
"0.79517114",
"0.77699083",
"0.77096397",
"0.77076524",
"0.7654477",
"0.7550244",
"0.7533536",
"0.75120395",
"0.75040084",
"0.7498... | 0.6510101 | 87 |
method to return item name | protected String getName(){
return this.name;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getName()\r\n\t{\r\n\t\treturn theItem.getName();\r\n\t}",
"public String getName() {\n return item.getName();\n }",
"public String getItemName()\n {\n return itemName;\n }",
"public String getName() {\n\t\treturn itemName;\n\t}",
"public String getItemName() {\r\n retur... | [
"0.8637249",
"0.84667224",
"0.83652365",
"0.832071",
"0.8305821",
"0.8305821",
"0.8305821",
"0.8234951",
"0.8232058",
"0.8232058",
"0.8232058",
"0.8232058",
"0.8232058",
"0.8166161",
"0.80448854",
"0.7993519",
"0.7975322",
"0.7846647",
"0.7519038",
"0.7490104",
"0.74167866",
... | 0.0 | -1 |
method to return item level | protected int getLevel(){
return this.level;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int getItemLevel() {\treturn level; }",
"int getLevel();",
"int getLevel();",
"int getLevel();",
"int getLevel();",
"int getLevel();",
"public int getLevel()\r\n {\r\n return level;\r\n }",
"public int getLevel()\n {\n return m_level;\n }",
"public int getLevel()\n {\n ... | [
"0.797001",
"0.74425495",
"0.74425495",
"0.74425495",
"0.74425495",
"0.74425495",
"0.7413794",
"0.7412075",
"0.73817635",
"0.7338205",
"0.7330019",
"0.73260564",
"0.73108995",
"0.7304406",
"0.72565997",
"0.72565997",
"0.72565997",
"0.72565997",
"0.72565997",
"0.72565997",
"0.... | 0.7131515 | 41 |
change level value of an item | protected void setLevel(int level){
this.level = level;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setItemLevel(int level) { this.level = level; }",
"public void setLevel(int newlevel)\n {\n level = newlevel; \n }",
"public void setLevel (String newLevel)\n {\n this.level = newLevel; \n }",
"protected void restockItem(int x){\r\n this.level += x;\r\n }",
"public voi... | [
"0.7705982",
"0.76749927",
"0.72569597",
"0.7217828",
"0.72116435",
"0.7058518",
"0.7055173",
"0.69649404",
"0.68683785",
"0.68220407",
"0.6708092",
"0.6646229",
"0.66217554",
"0.66112655",
"0.65947425",
"0.6583989",
"0.6576528",
"0.6573158",
"0.6569806",
"0.656279",
"0.65565... | 0.679735 | 10 |
method to return item location | protected String getLocation(){
return this.location;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Long getItemLocationId() {\r\n return itemLocationId;\r\n }",
"public String getLocationStringForItem(Item item) {\n if (item != null) {\n if (item.getLocationString() == null) {\n loadLocationStringForItem(item);\n if (item.getLocationString() == ... | [
"0.70304483",
"0.6823181",
"0.67305917",
"0.6711315",
"0.66891986",
"0.66891986",
"0.6660791",
"0.6604487",
"0.6546831",
"0.6514906",
"0.64990735",
"0.6489671",
"0.6464773",
"0.6464773",
"0.6464773",
"0.6464773",
"0.6464773",
"0.6464773",
"0.6464773",
"0.6464773",
"0.64388716... | 0.0 | -1 |
change location of an item | protected void setLocation(String location){
this.location = location;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void placeItemInRoomAtCoords(WorldItem item, int row, int column) {\n Point targetPoint = getPointAtLocation(row, column);\n targetPoint.setContainedItem(item);\n if (item instanceof FlammableItem) {\n flammableItemCount++;\n }\n }",
"public void update(int location, Object o... | [
"0.66488236",
"0.66379845",
"0.66083246",
"0.6593377",
"0.6530565",
"0.6526533",
"0.6524454",
"0.6476782",
"0.6460728",
"0.6444939",
"0.64283645",
"0.6395338",
"0.63839346",
"0.63382375",
"0.63382375",
"0.6333086",
"0.6326388",
"0.62827146",
"0.6277228",
"0.62763774",
"0.6272... | 0.0 | -1 |
removes x amount of items from inventory | protected void pickItem(int x ){
this.level -=x;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void removeItem(int n)\n {\n items.remove(n);\n }",
"public void removeItem(Item iToRemove, int amount) {\n for (Item i : inventory) {\n if (iToRemove.getClass().equals(i.getClass())) {\n int tempQuantity = i.getQuantity() - amount;\n if (tempQu... | [
"0.70190567",
"0.6815913",
"0.6737243",
"0.6717097",
"0.67022294",
"0.6630958",
"0.6497851",
"0.64975876",
"0.6395727",
"0.63585985",
"0.6335413",
"0.63306504",
"0.63052803",
"0.6302141",
"0.6297901",
"0.6294064",
"0.62771094",
"0.6237509",
"0.62327635",
"0.6232153",
"0.61864... | 0.59732074 | 45 |
adds x amount of items from inventory | protected void restockItem(int x){
this.level += x;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n void testAdding100Items() {\n Inventory inventory = new Inventory();\n int itemsToAdd = 100;\n\n assertEquals(0, inventory.getItems(\"\").size());\n\n for (int i = 0; i < itemsToAdd; i++) {\n inventory.addItem(\"XXXXXXXX\" + String.format(\"%02d\", i), \"Name\", 20... | [
"0.7222848",
"0.71265376",
"0.7052831",
"0.69338256",
"0.68860227",
"0.68374026",
"0.68349916",
"0.67374927",
"0.67145723",
"0.66860354",
"0.6622044",
"0.65868884",
"0.6541422",
"0.65085524",
"0.64425033",
"0.6407916",
"0.63862497",
"0.6378323",
"0.63192827",
"0.6306657",
"0.... | 0.61780345 | 30 |
TODO Autogenerated method stub | public static void main(String[] args) {
int []arr1= {12,13,44};
int []arr2= {44,45,47,50};
int i,j;
int count=0;
int []merge=new int[arr1.length+arr2.length];
for(i=0;i<arr1.length;i++)
{
merge[i]=arr1[i];
count++;
}
for(i=0;i<arr2.length;i++)
{
merge[count++]=arr2[i];
}
for(i=0;i<merge.length;i++)
{
System.out.println(" " +merge[i]);
}
} | {
"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.