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
get the query to create the code fragment table
private String getCodeFragmentTableQuery() { final StringBuilder builder = new StringBuilder(); builder.append("create table CODE_FRAGMENT("); builder.append("CODE_FRAGMENT_ID LONG PRIMARY KEY,"); builder.append("OWNER_FILE_ID LONG,"); builder.append("CRD_ID LONG,"); builder.append("START_REVISION_ID LONG,"); builder.append("END_REVISION_ID LONG,"); builder.append("HASH LONG,"); builder.append("HASH_FOR_CLONE LONG,"); builder.append("START_LINE INTEGER,"); builder.append("END_LINE INTEGER,"); builder.append("SIZE INTEGER"); builder.append(")"); return builder.toString(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private String getCodeFragmentGenealogyTableQuery() {\n \t\tfinal StringBuilder builder = new StringBuilder();\n \n \t\tbuilder.append(\"create table CODE_FRAGMENT_GENEALOGY(\");\n \t\tbuilder.append(\"CODE_FRAGMENT_GENEALOGY_ID LONG PRIMARY KEY,\");\n \t\tbuilder.append(\"START_REVISION_ID LONG,\");\n \t\tbuilder...
[ "0.77425873", "0.7697729", "0.64372593", "0.6380568", "0.636232", "0.6273339", "0.6159444", "0.61401737", "0.609311", "0.6073765", "0.6064186", "0.6052947", "0.5953879", "0.5953879", "0.5953879", "0.59460986", "0.5935542", "0.59231377", "0.5869072", "0.58672893", "0.5864689",...
0.8662191
0
create indexes on the code fragment table
private void createCodeFragmentTableIndexes() throws Exception { dbManager .executeUpdate("create index CODE_FRAGMENT_ID_INDEX_CODE_FRAGMENT on CODE_FRAGMENT(CODE_FRAGMENT_ID)"); dbManager .executeUpdate("create index START_REVISION_ID_INDEX_CODE_FRAGMENT on CODE_FRAGMENT(START_REVISION_ID)"); dbManager .executeUpdate("create index END_REVISION_ID_INDEX_CODE_FRAGMENT on CODE_FRAGMENT(END_REVISION_ID)"); dbManager .executeUpdate("create index HASH_INDEX_CODE_FRAGMENT on CODE_FRAGMENT(HASH)"); dbManager .executeUpdate("create index HASH_FOR_CLONE_INDEX_CODE_FRAGMENT on CODE_FRAGMENT(HASH_FOR_CLONE)"); dbManager .executeUpdate("create index START_LINE_INDEX_CODE_FRAGMENT on CODE_FRAGMENT(START_LINE)"); dbManager .executeUpdate("create index END_LINE_INDEX_CODE_FRAGMENT on CODE_FRAGMENT(END_LINE)"); dbManager .executeUpdate("create index SIZE_INDEX_CODE_FRAGMENT on CODE_FRAGMENT(SIZE)"); dbManager .executeUpdate("create index START_END_REVISION_ID_INDEX_CODE_FRAGMENT on CODE_FRAGMENT(START_REVISION_ID,END_REVISION_ID)"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void createCodeFragmentGenealogyTableIndexes() throws Exception {\n \t\tdbManager\n \t\t\t\t.executeUpdate(\"create index CODE_FRAGMENT_GENEALOGY_ID_INDEX_CODE_FRAGMENT_GENEALOGY on CODE_FRAGMENT_GENEALOGY(CODE_FRAGMENT_GENEALOGY_ID)\");\n \t\tdbManager\n \t\t\t\t.executeUpdate(\"create index START_REVISIO...
[ "0.71684504", "0.715868", "0.6356076", "0.625142", "0.62223774", "0.62111473", "0.6012016", "0.59951127", "0.5982395", "0.59396136", "0.58721864", "0.5849717", "0.5800504", "0.5790608", "0.57866615", "0.57598996", "0.57168853", "0.57090616", "0.5702817", "0.56297153", "0.5614...
0.801211
0
get the query to create the clone set table
private String getCloneSetTableQuery() { final StringBuilder builder = new StringBuilder(); builder.append("create table CLONE_SET("); builder.append("CLONE_SET_ID LONG PRIMARY KEY,"); builder.append("OWNER_REVISION_ID LONG,"); builder.append("ELEMENTS TEXT NOT NULL,"); builder.append("NUMBER_OF_ELEMENTS INTEGER"); builder.append(")"); return builder.toString(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private String getCloneSetLinkTableQuery() {\n \t\tfinal StringBuilder builder = new StringBuilder();\n \n \t\tbuilder.append(\"create table CLONE_SET_LINK(\");\n \t\tbuilder.append(\"CLONE_SET_LINK_ID LONG PRIMARY KEY,\");\n \t\tbuilder.append(\"BEFORE_ELEMENT_ID LONG,\");\n \t\tbuilder.append(\"AFTER_ELEMENT_ID ...
[ "0.7628538", "0.7391384", "0.61764157", "0.61260104", "0.5862442", "0.5714579", "0.56903684", "0.5673139", "0.5633626", "0.56189287", "0.55954456", "0.5570712", "0.55499405", "0.55475384", "0.55240214", "0.5494879", "0.53929967", "0.5360812", "0.5350056", "0.5325115", "0.5322...
0.85250497
0
create indexes on the clone set table
private void createCloneSetTableIndexes() throws Exception { dbManager .executeUpdate("create index CLONE_SET_ID_INDEX_CLONE_SET on CLONE_SET(CLONE_SET_ID)"); dbManager .executeUpdate("create index OWNER_REVISION_ID_INDEX_CLONE_SET on CLONE_SET(OWNER_REVISION_ID)"); dbManager .executeUpdate("create index NUMBER_OF_ELEMENTS_INDEX_CLONE_SET on CLONE_SET(NUMVER_OF_ELEMENTS)"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void createCloneSetLinkTableIndexes() throws Exception {\n \t\tdbManager\n \t\t\t\t.executeUpdate(\"create index CLONE_SET_LINK_ID_INDEX_CLONE_SET_LINK on CLONE_SET_LINK(CLONE_SET_LINK_ID)\");\n \t\tdbManager\n \t\t\t\t.executeUpdate(\"create index BEFORE_ELEMENT_ID_INDEX_CLONE_SET_LINK on CLONE_SET_LINK(B...
[ "0.73810303", "0.730154", "0.7192399", "0.6620707", "0.64271116", "0.6260768", "0.62384224", "0.6229896", "0.6206161", "0.6165962", "0.6108375", "0.6026424", "0.5953598", "0.59213257", "0.591255", "0.5900581", "0.5816788", "0.58152825", "0.58098936", "0.5809762", "0.57916915"...
0.8279001
0
get the query to create the table for links of code fragments
private String getCodeFragmentLinkTableQuery() { final StringBuilder builder = new StringBuilder(); builder.append("create table CODE_FRAGMENT_LINK("); builder.append("CODE_FRAGMENT_LINK_ID LONG PRIMARY KEY,"); builder.append("BEFORE_ELEMENT_ID LONG,"); builder.append("AFTER_ELEMENT_ID LONG,"); builder.append("BEFORE_REVISION_ID LONG,"); builder.append("AFTER_REVISION_ID LONG,"); builder.append("CHANGED INTEGER"); builder.append(")"); return builder.toString(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private String getCodeFragmentTableQuery() {\n \t\tfinal StringBuilder builder = new StringBuilder();\n \n \t\tbuilder.append(\"create table CODE_FRAGMENT(\");\n \t\tbuilder.append(\"CODE_FRAGMENT_ID LONG PRIMARY KEY,\");\n \t\tbuilder.append(\"OWNER_FILE_ID LONG,\");\n \t\tbuilder.append(\"CRD_ID LONG,\");\n \t\t...
[ "0.73731524", "0.7045253", "0.6945308", "0.6089534", "0.5949834", "0.58411825", "0.5813475", "0.56857437", "0.5676237", "0.5634382", "0.5607911", "0.56027496", "0.5578774", "0.5523907", "0.5489511", "0.5442871", "0.5401608", "0.5249289", "0.5236054", "0.52347237", "0.51500237...
0.8251044
0
create indexes on the fragment link table
private void createCodeFragmentLinkTableIndexes() throws Exception { dbManager .executeUpdate("create index CODE_FRAGMENT_LINK_ID_INDEX_CODE_FRAGMENT_LINK on CODE_FRAGMENT_LINK(CODE_FRAGMENT_LINK_ID)"); dbManager .executeUpdate("create index BEFORE_ELEMENT_ID_INDEX_CODE_FRAGMENT_LINK on CODE_FRAGMENT_LINK(BEFORE_ELEMENT_ID)"); dbManager .executeUpdate("create index AFTER_ELEMENT_ID_INDEX_CODE_FRAGMENT_LINK on CODE_FRAGMENT_LINK(AFTER_ELEMENT_ID)"); dbManager .executeUpdate("create index BEFORE_REVISION_ID_INDEX_CODE_FRAGMENT_LINK on CODE_FRAGMENT_LINK(BEFORE_REVISION_ID)"); dbManager .executeUpdate("create index AFTER_REVISION_ID_INDEX_CODE_FRAGMENT_LINK on CODE_FRAGMENT_LINK(AFTER_REVISION_ID)"); dbManager .executeUpdate("create index CHANGED_INDEX_CODE_FRAGMENT_LINK on CODE_FRAGMENT_LINK(CHANGED)"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void createCodeFragmentTableIndexes() throws Exception {\n \t\tdbManager\n \t\t\t\t.executeUpdate(\"create index CODE_FRAGMENT_ID_INDEX_CODE_FRAGMENT on CODE_FRAGMENT(CODE_FRAGMENT_ID)\");\n \t\tdbManager\n \t\t\t\t.executeUpdate(\"create index START_REVISION_ID_INDEX_CODE_FRAGMENT on CODE_FRAGMENT(START_R...
[ "0.7081677", "0.6658573", "0.65830994", "0.63727415", "0.6247779", "0.6053434", "0.59244466", "0.59050083", "0.5870736", "0.58273774", "0.5676848", "0.5659942", "0.5656969", "0.5656829", "0.553107", "0.5530602", "0.5523277", "0.547341", "0.54421127", "0.542763", "0.53657967",...
0.7667853
0
get the query to create the table for links of clone sets
private String getCloneSetLinkTableQuery() { final StringBuilder builder = new StringBuilder(); builder.append("create table CLONE_SET_LINK("); builder.append("CLONE_SET_LINK_ID LONG PRIMARY KEY,"); builder.append("BEFORE_ELEMENT_ID LONG,"); builder.append("AFTER_ELEMENT_ID LONG,"); builder.append("BEFORE_REVISION_ID LONG,"); builder.append("AFTER_REVISION_ID LONG,"); builder.append("CHANGED_ELEMENTS INTEGER,"); builder.append("ADDED_ELEMENTS INTEGER,"); builder.append("DELETED_ELEMENTS INTEGER,"); builder.append("CO_CHANGED_ELEMENTS INTEGER,"); builder.append("CODE_FRAGMENT_LINKS TEXT NOT NULL"); builder.append(")"); return builder.toString(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private String getCloneSetTableQuery() {\n \t\tfinal StringBuilder builder = new StringBuilder();\n \n \t\tbuilder.append(\"create table CLONE_SET(\");\n \t\tbuilder.append(\"CLONE_SET_ID LONG PRIMARY KEY,\");\n \t\tbuilder.append(\"OWNER_REVISION_ID LONG,\");\n \t\tbuilder.append(\"ELEMENTS TEXT NOT NULL,\");\n \...
[ "0.78927106", "0.7126317", "0.65447944", "0.6172719", "0.57594824", "0.55919045", "0.52515304", "0.5230824", "0.5214588", "0.52107406", "0.5203192", "0.5163764", "0.51302004", "0.51212215", "0.5117605", "0.51077294", "0.5097262", "0.50745153", "0.50274694", "0.5016566", "0.49...
0.8463345
0
create indexes on the clone link table
private void createCloneSetLinkTableIndexes() throws Exception { dbManager .executeUpdate("create index CLONE_SET_LINK_ID_INDEX_CLONE_SET_LINK on CLONE_SET_LINK(CLONE_SET_LINK_ID)"); dbManager .executeUpdate("create index BEFORE_ELEMENT_ID_INDEX_CLONE_SET_LINK on CLONE_SET_LINK(BEFORE_ELEMENT_ID)"); dbManager .executeUpdate("create index AFTER_ELEMENT_ID_INDEX_CLONE_SET_LINK on CLONE_SET_LINK(AFTER_ELEMENT_ID)"); dbManager .executeUpdate("create index BEFORE_REVISION_ID_INDEX_CLONE_SET_LINK on CLONE_SET_LINK(BEFORE_REVISION_ID)"); dbManager .executeUpdate("create index AFTER_REVISION_ID_INDEX_CLONE_SET_LINK on CLONE_SET_LINK(AFTER_REVISION_ID)"); dbManager .executeUpdate("create index CHANGED_ELEMENTS_INDEX_CLONE_SET_LINK on CLONE_SET_LINK(CHANGED_ELEMENTS)"); dbManager .executeUpdate("create index ADDED_ELEMENTS_INDEX_CLONE_SET_LINK on CLONE_SET_LINK(ADDED_ELEMENTS)"); dbManager .executeUpdate("create index DELETED_ELEMENTS_INDEX_CLONE_SET_LINK on CLONE_SET_LINK(DELETED_ELEMENTS)"); dbManager .executeUpdate("create index CO_CHANGED_ELEMENTS_INDEX_CLONE_SET_LINK on CLONE_SET_LINK(CO_CHANGED_ELEMENTS)"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void createCloneGenealogyTableIndexes() throws Exception {\n \t\tdbManager\n \t\t\t\t.executeUpdate(\"create index CLONE_GENEALOGY_ID_INDEX_CLONE_GENEALOGY on CLONE_GENEALOGY(CLONE_GENEALOGY_ID)\");\n \t\tdbManager\n \t\t\t\t.executeUpdate(\"create index START_REVISION_ID_INDEX_CLONE_GENEALOGY on CLONE_GEN...
[ "0.7465917", "0.7354499", "0.6821275", "0.65172017", "0.64052075", "0.63506186", "0.6312324", "0.6212021", "0.60220766", "0.5865846", "0.58618623", "0.5854656", "0.5852837", "0.58434", "0.5789828", "0.5786915", "0.57780045", "0.57710415", "0.5735719", "0.5734312", "0.57174236...
0.7876605
0
get the query to create the table for genealogies of clones
private String getCloneGenealogyTableQuery() { final StringBuilder builder = new StringBuilder(); builder.append("create table CLONE_GENEALOGY("); builder.append("CLONE_GENEALOGY_ID LONG PRIMARY KEY,"); builder.append("START_REVISION_ID LONG,"); builder.append("END_REVISION_ID LONG,"); builder.append("CLONES TEXT NOT NULL,"); builder.append("CLONE_LINKS TEXT NOT NULL,"); builder.append("CHANGES INTEGER,"); builder.append("ADDITIONS INTEGER,"); builder.append("DELETIONS INTEGER,"); builder.append("DEAD INTEGER"); builder.append(")"); return builder.toString(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private String getCloneSetTableQuery() {\n \t\tfinal StringBuilder builder = new StringBuilder();\n \n \t\tbuilder.append(\"create table CLONE_SET(\");\n \t\tbuilder.append(\"CLONE_SET_ID LONG PRIMARY KEY,\");\n \t\tbuilder.append(\"OWNER_REVISION_ID LONG,\");\n \t\tbuilder.append(\"ELEMENTS TEXT NOT NULL,\");\n \...
[ "0.69539994", "0.6683552", "0.6542036", "0.63681436", "0.6021694", "0.5837198", "0.5799819", "0.5678791", "0.56645393", "0.5639571", "0.5614566", "0.5612893", "0.5478761", "0.5449382", "0.54378444", "0.5409962", "0.5395677", "0.5385088", "0.53780085", "0.5332846", "0.5303634"...
0.8287107
0
create indexes on the clone genealogy table
private void createCloneGenealogyTableIndexes() throws Exception { dbManager .executeUpdate("create index CLONE_GENEALOGY_ID_INDEX_CLONE_GENEALOGY on CLONE_GENEALOGY(CLONE_GENEALOGY_ID)"); dbManager .executeUpdate("create index START_REVISION_ID_INDEX_CLONE_GENEALOGY on CLONE_GENEALOGY(START_REVISION_ID)"); dbManager .executeUpdate("create index END_REVISION_ID_INDEX_CLONE_GENEALOGY on CLONE_GENEALOGY(END_REVISION_ID)"); dbManager .executeUpdate("create index CHANGES_INDEX_CLONE_GENEALOGY on CLONE_GENEALOGY(CHANGES)"); dbManager .executeUpdate("create index ADDITIONS_INDEX_CLONE_GENEALOGY on CLONE_GENEALOGY(ADDITIONS)"); dbManager .executeUpdate("create index DELETIONS_INDEX_CLONE_GENEALOGY on CLONE_GENEALOGY(DELETIONS)"); dbManager .executeUpdate("create index DEAD_INDEX_CLONE_GENEALOGY on CLONE_GENEALOGY(DEAD)"); dbManager .executeUpdate("create index START_END_REVISION_ID_INDEX_CLONE_GENEALOGY on CLONE_GENEALOGY(START_REVISION_ID,END_REVISION_ID)"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void createCodeFragmentGenealogyTableIndexes() throws Exception {\n \t\tdbManager\n \t\t\t\t.executeUpdate(\"create index CODE_FRAGMENT_GENEALOGY_ID_INDEX_CODE_FRAGMENT_GENEALOGY on CODE_FRAGMENT_GENEALOGY(CODE_FRAGMENT_GENEALOGY_ID)\");\n \t\tdbManager\n \t\t\t\t.executeUpdate(\"create index START_REVISIO...
[ "0.73410356", "0.7233015", "0.68178", "0.6814635", "0.6548253", "0.6490644", "0.6442192", "0.6411966", "0.63353425", "0.6328169", "0.627397", "0.61942476", "0.6133984", "0.61025155", "0.6077081", "0.6047708", "0.5999716", "0.59942085", "0.5991001", "0.59856135", "0.59809726",...
0.8356255
0
get the query to create the table for genealogies of code fragments
private String getCodeFragmentGenealogyTableQuery() { final StringBuilder builder = new StringBuilder(); builder.append("create table CODE_FRAGMENT_GENEALOGY("); builder.append("CODE_FRAGMENT_GENEALOGY_ID LONG PRIMARY KEY,"); builder.append("START_REVISION_ID LONG,"); builder.append("END_REVISION_ID LONG,"); builder.append("CODE_FRAGMENTS TEXT NOT NULL,"); builder.append("CODE_FRAGMENT_LINKS TEXT NOT NULL,"); builder.append("CHANGES INTEGER"); builder.append(")"); return builder.toString(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private String getCodeFragmentTableQuery() {\n \t\tfinal StringBuilder builder = new StringBuilder();\n \n \t\tbuilder.append(\"create table CODE_FRAGMENT(\");\n \t\tbuilder.append(\"CODE_FRAGMENT_ID LONG PRIMARY KEY,\");\n \t\tbuilder.append(\"OWNER_FILE_ID LONG,\");\n \t\tbuilder.append(\"CRD_ID LONG,\");\n \t\t...
[ "0.78157675", "0.7251096", "0.7075494", "0.65651727", "0.6345104", "0.63343054", "0.6315075", "0.6231496", "0.620574", "0.61609256", "0.61206895", "0.6095039", "0.60583365", "0.60574794", "0.6040154", "0.5949868", "0.59428376", "0.5852134", "0.585154", "0.58387274", "0.583436...
0.8437422
0
create indexes on the fragment genealogy table
private void createCodeFragmentGenealogyTableIndexes() throws Exception { dbManager .executeUpdate("create index CODE_FRAGMENT_GENEALOGY_ID_INDEX_CODE_FRAGMENT_GENEALOGY on CODE_FRAGMENT_GENEALOGY(CODE_FRAGMENT_GENEALOGY_ID)"); dbManager .executeUpdate("create index START_REVISION_ID_INDEX_CODE_FRAGMENT_GENEALOGY on CODE_FRAGMENT_GENEALOGY(START_REVISION_ID)"); dbManager .executeUpdate("create index END_REVISION_ID_INDEX_CODE_FRAGMENT_GENEALOGY on CODE_FRAGMENT_GENEALOGY(END_REVISION_ID)"); dbManager .executeUpdate("create index CHANGES_INDEX_CODE_FRAGMENT_GENEALOGY on CODE_FRAGMENT_GENEALOGY(CHANGES)"); dbManager .executeUpdate("create index START_END_REVISION_ID_INDEX_CODE_FRAGMENT_GENEALOGY on CODE_FRAGMENT_GENEALOGY(START_REVISION_ID,END_REVISION_ID)"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void createCodeFragmentTableIndexes() throws Exception {\n \t\tdbManager\n \t\t\t\t.executeUpdate(\"create index CODE_FRAGMENT_ID_INDEX_CODE_FRAGMENT on CODE_FRAGMENT(CODE_FRAGMENT_ID)\");\n \t\tdbManager\n \t\t\t\t.executeUpdate(\"create index START_REVISION_ID_INDEX_CODE_FRAGMENT on CODE_FRAGMENT(START_R...
[ "0.7281597", "0.6763796", "0.65987265", "0.6518587", "0.641466", "0.6248688", "0.60574454", "0.60031897", "0.59534615", "0.5941499", "0.58972853", "0.58472615", "0.58239555", "0.57379043", "0.5706338", "0.5686009", "0.56570685", "0.558388", "0.5577529", "0.5524851", "0.548171...
0.78951
0
get the query to create the table for genealogies of clones
private String getCrdQuery() { final StringBuilder builder = new StringBuilder(); builder.append("create table CRD("); builder.append("CRD_ID LONG PRIMARY KEY,"); builder.append("TYPE TEXT NOT NULL,"); builder.append("HEAD TEXT NOT NULL,"); builder.append("ANCHOR TEXT NOT NULL,"); builder.append("NORMALIZED_ANCHOR TEXT NOT NULL,"); builder.append("CM INTEGER,"); builder.append("ANCESTORS TEXT NOT NULL,"); builder.append("FULL_TEXT TEXT NOT NULL"); builder.append(")"); return builder.toString(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private String getCloneGenealogyTableQuery() {\n \t\tfinal StringBuilder builder = new StringBuilder();\n \n \t\tbuilder.append(\"create table CLONE_GENEALOGY(\");\n \t\tbuilder.append(\"CLONE_GENEALOGY_ID LONG PRIMARY KEY,\");\n \t\tbuilder.append(\"START_REVISION_ID LONG,\");\n \t\tbuilder.append(\"END_REVISION_...
[ "0.8287107", "0.69539994", "0.6683552", "0.6542036", "0.63681436", "0.6021694", "0.5799819", "0.5678791", "0.56645393", "0.5639571", "0.5614566", "0.5612893", "0.5478761", "0.5449382", "0.54378444", "0.5409962", "0.5395677", "0.5385088", "0.53780085", "0.5332846", "0.5303634"...
0.5837198
6
create indexes on the crd table
private void createCrdTableIndexes() throws Exception { dbManager.executeUpdate("create index CRD_ID_INDEX_CRD on CRD(CRD_ID)"); dbManager.executeUpdate("create index CM_INDEX_CRD on CRD(CM)"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void buildIndexes(Properties props)\n {\n Statement statement;\n try\n {\n statement = connection.createStatement();\n \n //Create Indexes\n statement.executeUpdate(\"CREATE INDEX CONFFRIENDSHIP_INVITEEID ON CONFFRIENDSHIP (I...
[ "0.7008038", "0.6679498", "0.6649382", "0.6615406", "0.66019326", "0.6468683", "0.64387906", "0.6428036", "0.6392488", "0.6383602", "0.632454", "0.62832224", "0.6267877", "0.6186032", "0.61725575", "0.60913426", "0.60843134", "0.6073183", "0.60548973", "0.60471684", "0.602315...
0.8278629
0
returns number of products
public int getNumberOfProducts(){ return this.products.size(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getProductCount();", "long getTotalProductsCount();", "public int getNumberOfProducts ()\n {\n return (numberOfProducts);\n }", "public int numberProduct() {\n\t\tint number = 0;\n\t\tfor (ItemCart item : listItemcart) {\n\t\t\tnumber += item.getQuantity();\n\t\t}\n\t\treturn number;\...
[ "0.8419918", "0.80473506", "0.8015081", "0.78494084", "0.78259987", "0.78000623", "0.7708411", "0.764397", "0.76283044", "0.74221474", "0.7376776", "0.73596", "0.7352965", "0.7207778", "0.709756", "0.69467", "0.69449687", "0.6881865", "0.6807373", "0.6798866", "0.6756361", ...
0.817555
1
returns specific product with id
public Product getProductWithId(int id) { for (Product s : products) { if (s.getId() == id) { return s;} } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Product getProductByID(Long id);", "CafeProduct getProductById(final Integer productId);", "Product getProductById(Integer productId);", "Product getProductById(Integer productId);", "public Product findProduct(int id)\n {\n for(Product product : stock)\n {\n if(id == product.ge...
[ "0.83678734", "0.8131474", "0.8082298", "0.8082298", "0.8008674", "0.796928", "0.7957915", "0.79293144", "0.78999394", "0.7845498", "0.7769684", "0.7751547", "0.7744233", "0.7727659", "0.7727649", "0.769861", "0.7693259", "0.7678938", "0.75829214", "0.7575004", "0.7570129", ...
0.8028475
4
returns specific product with name
public Product getProductWithName(String name) { for (Product s : products) { if (s.getName() == name) { return s;} } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Product getProductByProductName(String productName);", "public Product getProductFromName(String prodName) throws BackendException;", "Product getProductByName(String name) throws EntityNotFoundException;", "public List<productmodel> getproductbyname(String name);", "public Product selectProduct(String pro...
[ "0.82483137", "0.7994207", "0.7769496", "0.7538984", "0.7526315", "0.740369", "0.7318766", "0.73101896", "0.7203839", "0.71365386", "0.712926", "0.70916367", "0.70220566", "0.69934905", "0.6950669", "0.69146067", "0.691221", "0.6906685", "0.6905228", "0.6900065", "0.68973625"...
0.7966075
2
deletes specific product with
public boolean deleteProduct(Product s) { for (int i = 0; i < products.size(); i++) { if (products.get(i).equals(s)){ products.remove(i); return true; } } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void deleteProduct(Integer productId);", "public void deleteProduct(Product product) throws BackendException;", "public void Deleteproduct(Product objproduct) {\n\t\t\n\t}", "void deleteProduct(Long id);", "public void deleteProduct(Product product_1) {\n\r\n\t}", "void deleteProduct(Product product) thr...
[ "0.79156446", "0.78711534", "0.78509647", "0.78382933", "0.7797231", "0.7651167", "0.7598793", "0.75577915", "0.75230855", "0.747132", "0.74093044", "0.73902076", "0.7380623", "0.7306628", "0.72730666", "0.72307926", "0.7219728", "0.7145542", "0.71322805", "0.71305424", "0.70...
0.0
-1
adding a product in the list of products
public boolean addProduct(Product p) { // products.add(p); boolean prodExists = false; for(Product prod: products){ if(prod.getId() == p.getId()){ prodExists = true; break; } } if(!prodExists){ products.add(p); return true; } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addProductToList(Product aProduct){\n listOfProduct.add(aProduct);\n }", "public void addProduct(Product product);", "void addProduct(Product product);", "public void addProduct(Product p) {\n c.addProduct(p);\n }", "public void Addproduct(Product objproduct) {\n\t\t\n\t}", ...
[ "0.82470435", "0.82057816", "0.8204405", "0.81366175", "0.79219276", "0.7881773", "0.78653264", "0.7652937", "0.7551673", "0.75247437", "0.7470721", "0.7459657", "0.74305797", "0.74203", "0.7396675", "0.7393711", "0.737908", "0.73782456", "0.7366373", "0.7361545", "0.7323565"...
0.7668896
7
========================================================================= GETTERS & SETTERS =========================================================================
GameState getGameState() { return gameState; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void get() {\n\t\t\r\n\t}", "String setValue();", "@Override\n public void get() {}", "protected abstract Set method_1559();", "public int\t\tget() { return value; }", "public T get() {\n return value;\n }", "public T get() {\n return value;\n }", "public T get() ...
[ "0.657703", "0.6449824", "0.64442474", "0.64404577", "0.62172633", "0.6183475", "0.6168504", "0.6168504", "0.61240995", "0.60714406", "0.60444874", "0.59874547", "0.5973332", "0.59726346", "0.5954604", "0.5950236", "0.59339654", "0.59257454", "0.587815", "0.5858975", "0.58482...
0.0
-1
========================================================================= GAME LOGIC METHODS ========================================================================= / / Initialises a new game by loading the deck, spawning players, dealing the / cards and selecting the first active player.
void newGame() { logger.log("New game starting."); logger.log(divider); // Create the deck. createDeck(); logger.log("Deck loaded: " + deck.toString()); logger.log(divider); // Shuffle the deck. shuffleDeck(); logger.log("Deck shuffled: " + deck.toString()); logger.log(divider); // Create the players. createPlayers(); setGameState(GameState.PLAYERS_SPAWNED); // Deal cards to players' decks. deal(); for (Player player : players) { logger.log("Hand: " + player); } // Randomly select the active player for the first round. selectRandomPlayer(); setGameState(GameState.NEW_GAME_INITIALISED); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void startGame() {\n this.deck = new Deck();\n this.deck.shuffle(); //shuffle the deck\n Card card = this.deck.deal(this.getPlayerHand());\n card = this.deck.deal(this.getPlayerHand());\n card = this.deck.deal(this.getDealerHand());\n }", "public void initGame() {\n ...
[ "0.7643709", "0.7467578", "0.7259883", "0.709351", "0.6980248", "0.6957338", "0.6919284", "0.6862507", "0.6822533", "0.67852145", "0.6761866", "0.67506766", "0.6744723", "0.6729385", "0.67258567", "0.6713944", "0.6664755", "0.665978", "0.6658784", "0.66311175", "0.66110003", ...
0.72232103
3
/ / Initialises a new round by incrementing the round number.
void newRound() { // Increase the round number on every round. round++; // Write to the log file logger.log(divider); logger.log("\nRound " + round + " starting."); logger.log("Active player: " + activePlayer.getName()); // Log player name and topmost card for all players. for (Player player : players) { logger.log(player.getName() + "'s card: " + player.getTopMostCard() .toString()); } setGameState(GameState.NEW_ROUND_INITIALISED); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setUpNewRound(){\n int newRound = getRoundNum() + 1;\n getRound().getPlayer(0).clearPiles();\n getRound().getPlayer(1).clearPiles();\n mRound = new Round(players);\n setRoundNum(newRound);\n mRound.beginRound();\n }", "private void newRound() {\r\n\t\tball...
[ "0.77116436", "0.7642845", "0.76002944", "0.7382574", "0.7331508", "0.72250867", "0.7056623", "0.6971624", "0.6970771", "0.6941711", "0.6885689", "0.6859416", "0.6816283", "0.6714145", "0.668632", "0.6666278", "0.66325164", "0.6594545", "0.65459853", "0.6471252", "0.6451399",...
0.7107754
6
/ / Set the active category, either by asking the player or by / automatically selecting a category, depending on whether the active player / is human.
void selectCategory() { // If user is the active player, ask for the user's category. if (activePlayer.getIsHuman()) { setGameState(GameState.CATEGORY_REQUIRED); } // Or get AI active player to select best category. else { Card activeCard = activePlayer.getTopMostCard(); activeCategory = activeCard.getBestCategory(); } logger.log("Selected category: " + activeCategory + "=" + activePlayer.getTopMostCard().getCardProperties() .get(activeCategory)); logger.log(divider); setGameState(GameState.CATEGORY_SELECTED); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void chooseCategory(String category) {\n for (Category c : categories) {\n if (c.getName().equals(category)) {\n if (c.isActive()) {\n c.setInActive();\n } else {\n c.setActive();\n }\n }\n ...
[ "0.6818706", "0.64261466", "0.6093625", "0.6059444", "0.5994463", "0.59896153", "0.59862435", "0.5937596", "0.59373546", "0.5926992", "0.5926992", "0.58851254", "0.58753806", "0.5857157", "0.58532876", "0.5847313", "0.57305264", "0.5720553", "0.5717892", "0.57130194", "0.5712...
0.80497426
0
/ / Establish the result of the round by comparing the top card of all / players.
void computeResult() { // Get the winner (null if draw). roundWinner = compareTopCards(); if (roundWinner == null) { logger.log("Round winner: Draw"); logger.log(divider); // Increment statistic. numDraws++; } else { logger.log("Round winner: " + roundWinner.getName()); logger.log(divider); this.gameWinner = roundWinner; if (roundWinner.getIsHuman()) { // Increment statistic. humanWonRounds++; } } setGameState(GameState.ROUND_RESULT_COMPUTED); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Player compareTopCards() {\n // COMPARE CARDS\n int bestValue = activePlayer.getTopMostCard().getCardPropertyValue(activeCategory);\n // assume activePlayer will win the round and then test if this is true\n // if no other card beats or equals the ActivePlayer's card\n // the activ...
[ "0.73081964", "0.6747257", "0.67258525", "0.6688681", "0.6658655", "0.65403605", "0.6523996", "0.64688724", "0.6442842", "0.6430237", "0.6421008", "0.6419547", "0.6413972", "0.6360324", "0.63488233", "0.634789", "0.63126296", "0.63073015", "0.62788177", "0.62656844", "0.62487...
0.69947684
1
/ / Conclude the round by reallocating cards and eliminating players with no / remaining cards.
void concludeRound() { ArrayList<Card> currentTopCards = getCurrentTopCards(); transferCards(roundWinner, currentTopCards); eliminatePlayers(); logger.log("Communal Deck: " + deck); logger.log(divider); for (Player player : players) { logger.log("Hand: " + player); } logger.log("Round complete."); setGameState(GameState.ROUND_COMPLETE); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void endRound() {\n if (!myTurn()) {\n return;\n }\n if (this.board.getWinners().size() > 0 && this.playerId == board.getPlayers().get(board.getPlayers().size() - 1).playerId) {\n this.board.setRunning(false);\n }\n // currentPlayerNumber = (currentPl...
[ "0.72878504", "0.70766795", "0.6831051", "0.65679157", "0.6502139", "0.63984823", "0.63870645", "0.63811123", "0.6316383", "0.6273636", "0.6251209", "0.6247237", "0.6246335", "0.6243702", "0.62328064", "0.62307554", "0.62133276", "0.6203966", "0.6196183", "0.61696726", "0.616...
0.7230714
1
========================================================================= HELPER METHODS =========================================================================
private void createPlayers() { // create human player first Player human = new Player("Player 1", true); players.add(human); // create remaining AI Players for (int i = 0; i < numAIPlayers; i++) { Player AI = new Player("AI " + (i + 1), false); players.add(AI); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Util() { }", "private FormatUtilities() {}", "private Utils() {}", "private Utils() {}", "private Utils() {}", "private Utils() {}", "private void someUtilityMethod() {\n }", "private void someUtilityMethod() {\n }", "private ProcessorUtils() { }", "private BuilderUtils() {}...
[ "0.592968", "0.55935246", "0.5556247", "0.5556247", "0.5556247", "0.5556247", "0.5432809", "0.5432809", "0.5408275", "0.53593457", "0.5312574", "0.5301907", "0.5300907", "0.523296", "0.5226287", "0.52015305", "0.5197748", "0.5191343", "0.51890534", "0.5168794", "0.5166628", ...
0.0
-1
read in file to create the deck and shuffle
private void createDeck() { FileReader reader = null; try { try { reader = new FileReader(deckInputFile); Scanner in = new Scanner(reader); // read the top line column names of the file // e.g. description, size, speed etc. String categories = in.nextLine(); // loop through the file line by line, creating a card and adding to the deck while (in.hasNextLine()) { String values = in.nextLine(); Card newCard = new Card(categories, values); deck.add(newCard); } } finally { if (reader != null) { reader.close(); } } } catch (IOException e) { System.out.print("error"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void newDeck()\r\n\t{\r\n\t\t// attempts to read the file\r\n\t\ttry\r\n\t\t{\r\n\t\t\t// sets up file input\r\n\t\t\tFile file = new File(FILE_NAME);\r\n\t\t\tScanner inputFile = new Scanner(file);\r\n\t\t\t\r\n\t\t\t// creates counter for array input\r\n\t\t\tint i = 0;\r\n\t\t\t\r\n\t\t\t// reads card no...
[ "0.758206", "0.729948", "0.6924774", "0.66574186", "0.6551093", "0.63700956", "0.59496576", "0.58813196", "0.58640134", "0.5813405", "0.5796453", "0.5735376", "0.5735376", "0.56818634", "0.5615595", "0.5596302", "0.55924785", "0.5568273", "0.54996103", "0.54822445", "0.547362...
0.7315978
1
only deal while there are cards in the deck means cards can be dealt in a round robin fashion without worrying about how many players and cards there are
private void deal() { int index = 0; while (!deck.isEmpty()) { Card card = deck.get(0); players.get(index).receiveCard(card); deck.remove(0); if (index < players.size() - 1) { index++; } else { index = 0; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void dealCards () {\t\n\n\t\tint numOfPlayers = players.size();\n\t\tint count = 0;\n\t\tCard[] cards = deck.getDeck();\n\t\tfor (int i=0; i<cards.length; i++) {\n\t\t\t\t// Go through all the cards, for each player deal 1 card at a time\n\t\t\t\t(players.get(count % numOfPlayers).getCards()).add(cards[i]);...
[ "0.77708393", "0.7502764", "0.7487428", "0.7469387", "0.7462936", "0.7337355", "0.72563195", "0.72190535", "0.72001195", "0.71533936", "0.71279967", "0.7007043", "0.6976311", "0.69618815", "0.6958924", "0.6952104", "0.6926346", "0.69074094", "0.68882406", "0.68252563", "0.682...
0.7887842
0
A method to determine who the active player id when the game is initiated the first time.
private void selectRandomPlayer() { Random rand = new Random(); // Restrict random number range to available indexes in the players list. // - 1 to offset zero-based index numbering. int random = rand.nextInt(players.size()); activePlayer = players.get(random); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "UUID getActivePlayerId();", "public int getActivePlayer() {\n return activePlayer;\n }", "public String getCurrentPlayer() {\r\n return this.playerIds[this.currentPlayer];\r\n }", "public int getCurrentPlayer() {\n\t\treturn player;\n\t}", "public int activePlayer() {\n return th...
[ "0.7521401", "0.7060697", "0.7052427", "0.6834127", "0.67774117", "0.6767167", "0.66258055", "0.66258055", "0.65822536", "0.65483874", "0.65483874", "0.6524394", "0.64917743", "0.6482472", "0.64442426", "0.6436968", "0.6395738", "0.6368617", "0.634967", "0.6334871", "0.631567...
0.0
-1
A method to look at the selected category and compare the values for this category among the players and their top most cards
private Player compareTopCards() { // COMPARE CARDS int bestValue = activePlayer.getTopMostCard().getCardPropertyValue(activeCategory); // assume activePlayer will win the round and then test if this is true // if no other card beats or equals the ActivePlayer's card // the activePlayer will be returned as the winner Player currentWinner = activePlayer; for (Player player : players) { // if not the active player if (!(player == activePlayer)) { // check specific player value for the active category int value = player.getTopMostCard().getCardPropertyValue(activeCategory); if (bestValue < value) { bestValue = value; currentWinner = player; } // if value matches top value then there is a tie else if (bestValue == value) { currentWinner = null; } } } return currentWinner; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean playCard(Cards card, Players player) {\n boolean higher = false;\n int compare = 0;\n if (playedCards.size() == 0 || this.playAgain(player)) { //to check if it is a new game or this is a new round\n if (card instanceof TrumpCards) { //to check if the firs...
[ "0.674746", "0.599791", "0.57893175", "0.5733341", "0.55194956", "0.5466264", "0.5415201", "0.54131466", "0.5410101", "0.5364707", "0.5361245", "0.5328722", "0.5327315", "0.5323709", "0.5272946", "0.52652", "0.5216128", "0.5213797", "0.5209713", "0.51920426", "0.51382613", ...
0.6691946
1
This method will collect the current cards from all players and place them into a new array for the current round.
private ArrayList<Card> getCurrentTopCards() { // logic to get round cards from all players ArrayList<Card> currentTopCards = new ArrayList<>(); for (Player player : players) { player.submitActiveCard(currentTopCards); } return currentTopCards; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void play() {\n\n ArrayList<Card> cardsInMiddle = new ArrayList<>();\n\n Card[] lastCardsPlayed = new Card[numOfPlayers];\n\n //simulation of each player flipping their next card\n for (int i = 0; i < players.length; i++) {\n lastCardsPlayed[i] = players[i].getNextCard();\n ...
[ "0.714083", "0.7040971", "0.6955167", "0.6906502", "0.68351686", "0.67577785", "0.66299766", "0.64924353", "0.6485464", "0.6455784", "0.64105254", "0.6368022", "0.63512474", "0.6331027", "0.6321335", "0.6298745", "0.6285701", "0.62678313", "0.6258651", "0.6216335", "0.617196"...
0.7417435
0
Method to transfer the cards to the winner player if any or to the communal deck if there is a draw
private void transferCards(Player roundWinner, ArrayList<Card> currentTopCards) { // if there is a winner, the winner becomes the active player and takes round // cards if (roundWinner != null) { // set winner of round to be activePlayer for next round activePlayer = roundWinner; // take the pile of round cards roundWinner.takeAllCards(currentTopCards); // take communal cards if communal pile is not empty if (!deck.isEmpty()) { roundWinner.takeAllCards(deck); } } // if there is a draw, add round cards to the communal pile else { while (!currentTopCards.isEmpty()) { Card card = currentTopCards.get(0); deck.add(card); currentTopCards.remove(0); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void winner(Player p1, Player p2, GeneralDeck gameDeck){\n gameDeck.addCard(p1.getCard());\n gameDeck.addCard(p2.getCard());\n p1.clearCard();\n p2.clearCard();\n }", "private void transferCards(Player player) {\r\n\t\twhile(warPile.size() > 0) {\r\n\t\t\tplayer.addToWinning...
[ "0.70852613", "0.69706845", "0.6925056", "0.6733799", "0.6675677", "0.66698015", "0.6557963", "0.6556771", "0.65278697", "0.6525565", "0.64796656", "0.64736646", "0.64716357", "0.64655656", "0.6458853", "0.638941", "0.63856566", "0.638554", "0.6373755", "0.63669395", "0.63652...
0.74956834
0
check if any players have no cards and eliminate them
private void eliminatePlayers() { Iterator<Player> iter = players.iterator(); while (iter.hasNext()) { Player player = iter.next(); if (player.getList().isEmpty()) { iter.remove(); if (player.getIsHuman()) { setGameState(GameState.HUMAN_OUT); } // need to remember that due to successive draws, the active player could run // out of cards // select a new random player if player gets eliminated if (!players.contains(activePlayer)) { selectRandomPlayer(); } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void giveOutCards() {\n boolean shared = false;\n while (!shared) {\n for (Player player : this.players) {\n if (this.cards.size() == 0) {\n shared = true;\n } else {\n Card card = this.cards.get(0);\n ...
[ "0.7426649", "0.72093713", "0.7186355", "0.70157075", "0.67907506", "0.67155683", "0.66654354", "0.6606099", "0.6605211", "0.65549445", "0.65317065", "0.6531328", "0.65267366", "0.64415354", "0.63948417", "0.6304182", "0.62765914", "0.62674356", "0.6252479", "0.6249645", "0.6...
0.7510045
0
TODO Autogenerated method stub
public void addFjlx(Fjlx fx) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.66708666", "0.65675074", "0.65229905", "0.6481001", "0.64770633", "0.64584893", "0.6413091", "0.63764185", "0.6275735", "0.62541914", "0.6236919", "0.6223816", "0.62017626", "0.61944294", "0.61944294", "0.61920846", "0.61867654", "0.6173323", "0.61328775", "0.61276996", "0...
0.0
-1
TODO Autogenerated method stub
public void deleFjlx(Fjlx fx) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
TODO Autogenerated method stub
public List findAll() { return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
TODO Autogenerated method stub
public void updateFjlx(Fjlx fx) { }
{ "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
Created by Administrator on 2017/7/5.
public interface RequestServes { @GET("PlayVideo/{firstVideoId}") Call<JsonElement> getPlayVideo(@Path("firstVideoId") String firstVideoId); @GET Call<JsonElement> getData(@Url String url); @GET("{test}") Call<ResponseBody> getString(@Path("test") String test); @GET("users/{user}/repos") Call<ResponseBody> listRepos(@Path("user") String user); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private stendhal() {\n\t}", "@Override\n public void perish() {\n \n }", "@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\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Ov...
[ "0.6258407", "0.6108479", "0.58262104", "0.5821799", "0.57997555", "0.5784628", "0.57322735", "0.57152975", "0.571515", "0.5701442", "0.5693446", "0.56896096", "0.56838584", "0.56788206", "0.56788206", "0.56746966", "0.5663299", "0.5663299", "0.5653847", "0.5641255", "0.56350...
0.0
-1
Creates new form GDThemBanDoc
public GDThemBanDoc1() { initComponents(); btnQuayLai.addActionListener(this); this.setLocationRelativeTo(null); load(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "FORM createFORM();", "public void newDocument();", "Documento createDocumento();", "public void createAd(/*Should be a form*/){\n Ad ad = new Ad();\n User owner = this.user;\n Vehicle vehicle = this.vehicle;\n String \n// //ADICIONAR\n ad.setOwner();\n ad....
[ "0.70219857", "0.6832115", "0.65770787", "0.6280733", "0.6240124", "0.6240124", "0.6169676", "0.61640424", "0.6149566", "0.610659", "0.6081009", "0.6074707", "0.60394424", "0.6023322", "0.60003424", "0.60003424", "0.59965533", "0.5979608", "0.59568137", "0.59293455", "0.59120...
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") private void showDuLieu(){ try { tableMain.removeAll(); String[] arr= {"Mã Bạn Đọc ","Mã Tài Khoản","Tên Bạn Đọc" ,"Địa Chỉ","Số Điện Thoại","Ngày Sinh"}; DefaultTableModel model = new DefaultTableModel(arr, 0); Connection connection = DBConnection.getConnection(); String query = "SELECT * FROM dbo.BanDoc20173329"; PreparedStatement ps = connection.prepareStatement(query); ResultSet rs = ps.executeQuery(); while(rs.next()){ Vector vector = new Vector(); vector.add(rs.getString("MABANDOc20173329")); vector.add(rs.getString("mataikhoan20173329")); vector.add(rs.getString("tenbandoc20173329")); vector.add(rs.getString("diachi20173329")); vector.add(rs.getString("sodienthoai20173329")); vector.add(rs.getString("ngaysinh20173329")); model.addRow(vector); } DBConnection.closeConnection(connection); tableMain.setModel(model); tableMain.getSelectionModel().addListSelectionListener(new ListSelectionListener() { @Override public void valueChanged(ListSelectionEvent e) { if (tableMain.getSelectedRow()>=0) { tfMaBanDoc.setText(tableMain.getValueAt(tableMain.getSelectedRow(),0)+""); tfmataikhoan.setText(tableMain.getValueAt(tableMain.getSelectedRow(),1)+""); tftenbandoc.setText(tableMain.getValueAt(tableMain.getSelectedRow(),2)+""); tfdiachi.setText(tableMain.getValueAt(tableMain.getSelectedRow(),3)+""); tfsodienthoai.setText(tableMain.getValueAt(tableMain.getSelectedRow(),4)+""); tfngaysinh.setText(tableMain.getValueAt(tableMain.getSelectedRow(),5)+""); } } }); } catch (SQLException ex) { Logger.getLogger(QuanLyBangSach.class.getName()).log(Level.SEVERE, null, ex); }}
{ "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.73201853", "0.7291607", "0.7291607", "0.7291607", "0.7285772", "0.7248832", "0.721371", "0.72083634", "0.71965843", "0.7190274", "0.71847606", "0.71592176", "0.71481156", "0.70935035", "0.70799935", "0.70570904", "0.6987588", "0.6977819", "0.69557554", "0.6953564", "0.6945...
0.0
-1
GENFIRST:event_btndanhsachbandocActionPerformed TODO add your handling code here:
private void btndanhsachbandocActionPerformed(java.awt.event.ActionEvent evt) { showDuLieu(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void BanalisisActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void txtbuscarHCActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void botao_atirarActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void txtidDemActionPerformed(java.awt.event.Action...
[ "0.7788655", "0.77745306", "0.75319064", "0.74002683", "0.7347116", "0.7294422", "0.725956", "0.7208148", "0.7185291", "0.7180356", "0.7167345", "0.71543485", "0.71397054", "0.71390027", "0.7133713", "0.7124343", "0.7121187", "0.7113838", "0.71074045", "0.7090304", "0.7083127...
0.7075568
21
End of variables declaration//GENEND:variables
@Override public void actionPerformed(ActionEvent e) { if(e.getSource().equals(btnQuayLai)){ btnquaylaiclick();} }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void lavar() {\n\t\t// TODO Auto-generated method stub\n\t\t\n\t}", "public void mo38117a() {\n }", "@Override\r\n\tpublic void initVariables() {\n\t\t\r\n\t}", "private void assignment() {\n\n\t\t\t}", "private void kk12() {\n\n\t}", "public void gored() {\n\t\t\n\t}", "public void mo217...
[ "0.63617", "0.6280625", "0.61909467", "0.6095729", "0.6092663", "0.607037", "0.60523474", "0.605212", "0.6002499", "0.59878224", "0.5970378", "0.59679425", "0.5967425", "0.5965642", "0.596177", "0.5942055", "0.5908757", "0.589693", "0.589137", "0.5882839", "0.58795726", "0....
0.0
-1
a posicao 0 do vetor dados indica onde os dados devem ser inseridos
public boolean inserirEditarFuncionario(String[] dadosFuncionario) { if(!dadosFuncionario[3].matches("[0-9]+") || !dadosFuncionario[4].matches("[0-9]+")) { return false; } else { Funcionario fun = new Funcionario(dadosFuncionario[1], dadosFuncionario[2], dadosFuncionario[3], dadosFuncionario[4], dadosFuncionario[5], dadosFuncionario[6], dadosFuncionario[7] ); d.inserirEditarFuncionario(fun, Integer.parseInt(dadosFuncionario[0])); return true; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void insertar() {\n try {\n cvo.setNombre_cliente(vista.txtNombre.getText());\n cvo.setApellido_cliente(vista.txtApellido.getText());\n cvo.setDireccion_cliente(vista.txtDireccion.getText());\n cvo.setCorreo_cliente(vista.txtCorreo.getText());\n ...
[ "0.6832039", "0.67523146", "0.66558", "0.6610114", "0.6562338", "0.6541046", "0.65342706", "0.65306747", "0.65147066", "0.6512101", "0.650815", "0.649724", "0.64822984", "0.64644563", "0.6461368", "0.64357054", "0.63858247", "0.6384352", "0.6370394", "0.63467085", "0.63393635...
0.0
-1
int qtdCli = d.getQtdclientes();
public boolean removerCliente(int i) { String clienteRemovido = d.getClientes()[i].getNome(); // String aux; if(i == (d.getQtdclientes() - 1)) { // O Cliente a ser removido est� no final do array d.setQtdclientes(d.getQtdclientes() - 1); d.getClientes()[d.getQtdclientes()] = null; return true; } else { // o Cliente a ser removido est� no meio do array int cont = 0; while(d.getClientes()[cont].getNome().compareTo(clienteRemovido) != 0) { cont++; } //Rotina swap for(int j = cont; j < d.getQtdclientes() - 1; j++) { d.getClientes()[j] = null; d.getClientes()[j] = d.getClientes()[j+1]; } d.getClientes()[d.getQtdclientes()] = null; d.setQtdclientes(d.getQtdclientes() - 1); return true; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getClients()\r\n\t{\r\n\t\treturn numberOfClients;\r\n\t}", "public int getQtdInteresses() {\n\t\treturn this.qtdInteresses;\n\t}", "static void printActiveClients() {\n\t\tint count = 0;\n\t\tfor (ClientThread thread : threads) {\n\t\t\tif (thread != null) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t\tS...
[ "0.61169237", "0.5838241", "0.5718702", "0.5649068", "0.5647091", "0.5641023", "0.5575501", "0.55540097", "0.5538532", "0.55045474", "0.5480617", "0.54727596", "0.54489255", "0.544632", "0.54316056", "0.5421324", "0.5419451", "0.5411457", "0.53961897", "0.5396094", "0.5377702...
0.0
-1
String realPath = request.getServletContext().getRealPath("/img");
@RequestMapping("/fileUpload2") public ModelAndView fileUpload2(@RequestParam("file") CommonsMultipartFile file, HttpServletRequest request) throws IOException { String realPath = "/Users/leipu/IdeaProjects/ssm_test/src/main/webapp/fileUpload/"; // System.out.println("contextPath"+request.getSession().getServletContext().getRealPath("/fileUpload")+"111111"); // System.out.println("ServletPath"+request.getServletPath()+"2222222"); // System.out.println(request.getCharacterEncoding()+"33333"); String oldName = file.getOriginalFilename(); // System.out.println("oldname"+oldName); String newName = UUID.randomUUID().toString() + oldName.substring(oldName.lastIndexOf(".")); // // File dest = new File(realPath+File.separator+newName ); // file.transferTo(dest); mv.setViewName("index"); mv.addObject("upload","上传"); return mv; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void crearRutaImgPublicacion(){\n \n servletContext=(ServletContext) contexto.getExternalContext().getContext();\n String ruta=\"\";\n //Ruta real hasta la carpeta uploads\n ruta=servletContext.getRealPath(\"/upload/\");\n //Obtener el codigo del usuario de la sesio...
[ "0.6640089", "0.65953493", "0.65953493", "0.65953493", "0.65953493", "0.65522796", "0.65513283", "0.6353715", "0.62327385", "0.6216633", "0.62011796", "0.61239016", "0.61239016", "0.6100633", "0.59929806", "0.5940365", "0.5938516", "0.59276104", "0.5910241", "0.5850396", "0.5...
0.0
-1
Map map = new HashMap(); map.put("mgs","connection success"); map.put("status",200); return map;
@RequestMapping(value = "/testwebpack",method = RequestMethod.GET) @ResponseBody public String tetWebpack(){ return "connection successful"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Map<String, Object> send();", "public static Map<String, Object> mapSuccess() {\n\t\tMap<String, Object> modelMap = new HashMap<String,Object>(2);\n\t\tmodelMap.put(\"success\", true);\n\t\t\n\t\treturn modelMap;\n\t}", "@Override\n\tpublic void SuccessCallBack(Map<String, Object> map) {\n\t\t\n\t}", "@Overr...
[ "0.6277995", "0.62034035", "0.61758214", "0.5978488", "0.57720494", "0.57605886", "0.5755591", "0.5755427", "0.5650402", "0.563774", "0.5636446", "0.5612918", "0.5602773", "0.5586898", "0.55249065", "0.55195975", "0.5495795", "0.5489373", "0.5466204", "0.5466204", "0.5464289"...
0.0
-1
Check we get the right Exception for a null service.
public void testNullService() throws Exception { try { FileStoreIvornFactory.createIdent( null, "anything" ) ; } catch (FileStoreIdentifierException ouch) { return ; } fail("Expected FileStoreIdentifierException") ; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test(expected = CopilotServiceInitializationException.class)\n public void testCheckNullForInjectedValueFailure() {\n Helper.checkNullForInjectedValue(null, \"obj\");\n }", "@Test(expected = NuxeoFraSCAtiException.class)\n public void testThrowExceptionIfGetUnexistingService() throws NuxeoFraSC...
[ "0.6758439", "0.6695134", "0.6340661", "0.62658167", "0.6263817", "0.5994013", "0.5957381", "0.587081", "0.5866108", "0.5863159", "0.5839585", "0.5839123", "0.57701737", "0.57646805", "0.5750489", "0.5743769", "0.57283276", "0.5717904", "0.5710024", "0.56865954", "0.56767446"...
0.6775693
0
Check we get the right Exception for a null resource.
public void testNullResource() throws Exception { try { FileStoreIvornFactory.createIdent( "anything", null ) ; } catch (FileStoreIdentifierException ouch) { return ; } fail("Expected FileStoreIdentifierException") ; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void extractAffectedResource_null_throwIllegalArgumentException() {\n assertThrows(IllegalArgumentException.class, () -> MessageUtils.extractAffectedResource(null));\n }", "@Test(expected = IllegalArgumentException.class)\n public void testCheckNullFailure() {\n Helper.check...
[ "0.64039654", "0.63450855", "0.60110945", "0.60015607", "0.5967579", "0.5951644", "0.58926874", "0.5860047", "0.5835978", "0.57717216", "0.5769528", "0.5742734", "0.5737078", "0.57289433", "0.5714451", "0.5712792", "0.57127", "0.5704503", "0.56904507", "0.56882066", "0.568548...
0.6948108
0
Check we can cope with a service name.
public void testServiceName() throws Exception { assertEquals( "ivo://one.two/three#four", FileStoreIvornFactory.createIdent( "one.two/three", "four" ) ) ; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean hasServiceName();", "boolean hasServiceName();", "public boolean supportsService( String sServiceName )\n {\n return sServiceName.equals( __serviceName );\n }", "@Override\n public boolean isServiceSupported(String serviceName) {\n return serviceEndpoints.containsKey(serviceName)...
[ "0.7391038", "0.7391038", "0.67922425", "0.6588327", "0.64364696", "0.63765675", "0.63765675", "0.63765675", "0.63765675", "0.63765675", "0.63522595", "0.6313082", "0.6301191", "0.6301191", "0.6274026", "0.6274026", "0.61819816", "0.6065511", "0.6056103", "0.6035575", "0.6017...
0.61217934
17
Check we can cope with a service ivorn.
public void testServiceIvorn() throws Exception { assertEquals( "ivo://one.two/three#four", FileStoreIvornFactory.createIdent( "ivo://one.two/three", "four" ) ) ; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean hasService();", "boolean hasService();", "boolean hasService();", "boolean hasService();", "boolean hasService();", "void checkForAccServices();", "private void CheckIfServiceIsRunning() {\n\t\tLog.i(\"Convert\", \"At isRunning?.\");\n\t\tif (eidService.isRunning()) {\n//\t\t\tLog.i(\"Convert\"...
[ "0.65618235", "0.65618235", "0.65618235", "0.65618235", "0.65618235", "0.6540381", "0.6496933", "0.6341181", "0.6250157", "0.6250157", "0.6247612", "0.6149833", "0.60108787", "0.5975546", "0.5934323", "0.5916194", "0.5883094", "0.5883094", "0.5883094", "0.58826584", "0.586083...
0.56514364
33
Inititalize from Rules Execute Rules should pass the entire part object to this Side object
public void setTopObjectInitData() { this.partShape = 0; // L, T, Z, I, H, this.ABClines = 0; // if reflects lines for // ABC dims of // parts, by T // partDimA = 0f / myLevelShape.myMainPanel.scale; // partDimB = 0 / myLevelShape.myMainPanel.scale; // partDimC = 0 / myLevelShape.myMainPanel.scale; // partDimM = 0f / myLevelShape.myMainPanel.scale; this.partID = 999; this.stockCode = "Profile"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setSide(String side) {\n\t\tthis.side = side;\n\t}", "@Override\r\n\tpublic void buildPart() {\n\t\t\r\n\t}", "protected void setup() {\n\t\tgetContentManager().registerOntology(JADEManagementOntology.getInstance());\r\n getContentManager().registerLanguage(new SLCodec(), FIPANames.ContentLa...
[ "0.5392526", "0.5317334", "0.50650364", "0.49684155", "0.4960662", "0.49553496", "0.493601", "0.49239844", "0.49162242", "0.48875442", "0.4873861", "0.48702687", "0.48543072", "0.48341107", "0.48056188", "0.48026028", "0.4796796", "0.47865275", "0.47864613", "0.47831872", "0....
0.47515965
22
Creates a menu for a given game
public Menu(Game game) { this.game = game; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void createChooseGameUI()\n {\n \tHashMap<InventoryRunnable, InventoryItem> inventoryStuff = new HashMap<InventoryRunnable, InventoryItem>();\n \t\n \tInventoryRunnable gladiatorJoinRunnable = new GladiatorJoinInventoryRunnable(plugin);\n \t\n \tArrayList<String> gladiatorLore = new ArrayL...
[ "0.75743425", "0.73816395", "0.7065611", "0.6994046", "0.6957799", "0.6765334", "0.6728201", "0.6685327", "0.6659539", "0.6651285", "0.6590112", "0.6501578", "0.64990443", "0.64922047", "0.64813113", "0.6472419", "0.644267", "0.6418064", "0.6410458", "0.6409132", "0.64033943"...
0.69253606
5
Initializes the game menu
public void init() { Assets.init(); titleAnimation = new Animation(Assets.titleMoving, 180); startButton = new MenuButton((game.getWidth()/2 - 100), 220, 100, 200, MenuButtonType.START, this); highscoreButton = new MenuButton((game.getWidth()/2 - 100), 370, 100, 200, MenuButtonType.HIGHSCORE, this); backButton = new NavigationButton(37, 720, 120, 60, NavigationButton.NavButtonType.BACK, this.getGame()); tutorialButton = new MenuButton((game.getWidth()/2 - 100), 520, 100, 200, MenuButtonType.INSTRUCTIONS, this); showTutorial = false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void initMenu(){\n\t}", "public void initMenu() {\n\t\t\r\n\t\treturnToGame = new JButton(\"Return to Game\");\r\n\t\treturnToGame.setBounds(900, 900, 0, 0);\r\n\t\treturnToGame.setBackground(Color.BLACK);\r\n\t\treturnToGame.setForeground(Color.WHITE);\r\n\t\treturnToGame.setVisible(false);\r\n\t\treturn...
[ "0.7970476", "0.7858727", "0.78178847", "0.77859056", "0.778159", "0.7635407", "0.7543439", "0.73723114", "0.7351339", "0.732499", "0.7268696", "0.72212625", "0.7190975", "0.7188403", "0.7184167", "0.7161508", "0.7149145", "0.7131921", "0.7112034", "0.71107554", "0.71107554",...
0.74574214
7
Returns the game object
public Game getGame() { return game; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "GameObject getObject();", "public GameObject getGameObject()\n {\n return this.gameObject;\n }", "public Game getGame()\n {\n return game;\n }", "public static Game getGame() {\n return game;\n }", "protected Game getGame() {\n return game;\n }", "public Game getGame...
[ "0.77993", "0.7489014", "0.7230454", "0.7205157", "0.7192248", "0.7190842", "0.7164449", "0.7161005", "0.7153037", "0.71313107", "0.7128154", "0.71157104", "0.7106219", "0.7093472", "0.6963098", "0.69612765", "0.6869326", "0.6868219", "0.686681", "0.6853554", "0.6786322", "...
0.7077393
17
Returns the start button
public MenuButton getStartButton() { return startButton; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public JButton getStartButton() {\n\t\treturn startButton;\n\t}", "public Component startButton() {\n startButton = new JButton(\"Start\");\n setFocusable(false);\n return startButton;\n }", "public JButton getStartButton() {\n\t\treturn this.btnStartSystem;\n\t}", "public JoystickBut...
[ "0.85861903", "0.8341044", "0.8290928", "0.783211", "0.73473835", "0.7345671", "0.734051", "0.7083718", "0.70548415", "0.70378166", "0.6955225", "0.69038147", "0.6897665", "0.68498814", "0.6823589", "0.6817519", "0.6712351", "0.66852456", "0.6582097", "0.6575173", "0.65661657...
0.8399619
1
Returns the highscore button
public MenuButton getHighscoreButton() { return highscoreButton; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getHighscore()\n {\n return this.highscore;\n }", "public int getHighScore() {\n return highScore;\n }", "@Override\n\tpublic void buttonPress(Button button) {\n\t\tsuper.buttonPress(button);\n\t\tif(playerOneScore > highScore) {\n\t\t\thighScore = playerOneScore;\n\t\t\t\n\t\...
[ "0.67166126", "0.66228426", "0.6606138", "0.65492564", "0.65428233", "0.6516083", "0.64703494", "0.6437679", "0.63335174", "0.6314275", "0.61589205", "0.6130662", "0.6024625", "0.6019497", "0.5931414", "0.59224993", "0.59109056", "0.5861888", "0.5847609", "0.58317393", "0.582...
0.8388009
0
Returns the tutorial button
public MenuButton getTutorialButton() { return tutorialButton; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onClick(View v) {\n toggleTutorial();\n }", "private JMenuItem getJMenuItemTutorial() {\r\n if (jMenuItemTutorial == null) {\r\n jMenuItemTutorial = new JMenuItem();\r\n jMenuItemTutorial.setMnemonic(KeyEvent.VK_T);\r\n ...
[ "0.6620947", "0.6534452", "0.652793", "0.64220107", "0.632515", "0.62427497", "0.6170122", "0.6112902", "0.6111918", "0.610242", "0.6100459", "0.6051055", "0.60364765", "0.60217094", "0.6012032", "0.59988016", "0.59975976", "0.59951866", "0.59822863", "0.59712476", "0.5965672...
0.82927734
0
Makes changes to objects each frame
public void tick() { if (showTutorial) { if (backButton.isPressed()) { showTutorial = false; } } else { if (tutorialButton.isPressed()) { showTutorial = true; } titleAnimation.tick(); } startButton.tick(); highscoreButton.tick(); tutorialButton.tick(); backButton.tick(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void updateObjects()\r\n {\r\n //update states\r\n for (Ball ball : balls) {\r\n \tif(ball!=null)\r\n \t{\r\n\t \tif(ball.GetVisible()) ball.MoveDown();\r\n\r\n \t}\r\n \telse ball=null;\r\n }\r\n \r\n }", "@Override\n\tpublic void updat...
[ "0.65007347", "0.6473626", "0.6350935", "0.62718934", "0.62286705", "0.6199914", "0.6197187", "0.61222285", "0.60798407", "0.6052422", "0.5992779", "0.5990678", "0.598666", "0.59578466", "0.5933718", "0.5928542", "0.59103626", "0.59015", "0.5894012", "0.5878702", "0.58723897"...
0.0
-1
Draw images for each frame
public void render(Graphics g) { if (showTutorial) { g.drawImage(Assets.level1tutorial, 0, 0, getGame().getWidth(), getGame().getHeight(), null); backButton.render(g); } else { g.drawImage(Assets.menuBackground, 0, 0, getGame().getWidth(), getGame().getHeight(), null); startButton.render(g); highscoreButton.render(g); tutorialButton.render(g); g.drawImage(titleAnimation.getCurrentFrame(), 30,70, 550, 120, null); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void drawImages() {\n\t\t\r\n\t}", "@Override\n\tpublic void draw(GraphicsContext gc) {\n\t\t\tgc.drawImage(image.get(n), x, y);\n\t\tn++;\n\t\tif (n>=15) n=0;\n\t}", "public void updateImage() {\n Graphics2D g = img.createGraphics();\n for (Circle gene : genes) {\n gene.paint(...
[ "0.80102116", "0.6961101", "0.69200474", "0.6841202", "0.6798987", "0.6792725", "0.6769386", "0.6755518", "0.6754588", "0.6741208", "0.66733867", "0.66312563", "0.662417", "0.64860225", "0.6472216", "0.64708465", "0.6456301", "0.6434602", "0.6425997", "0.6417348", "0.6407683"...
0.0
-1
Constructor de la ventana Login
public Login() { initComponents(); //Centramos la ventana setLocationRelativeTo(null); //Confirmamos el tamaño setSize(375, 510); //Hacemos el tamaño fijo setResizable(false); //Metodo para cambiar la imagen de fondo //Instanciamos la imagen de fondo ImageIcon wallpaper = new ImageIcon("src/imagenes/wallpaperlogo.png"); //Asignamos la imagen de fondo al label de fondo y la redimensionamos junto al label Icon icono = new ImageIcon(wallpaper.getImage().getScaledInstance(label_wallpaper.getWidth(), label_wallpaper.getHeight(), Image.SCALE_DEFAULT)); label_wallpaper.setIcon(icono); this.repaint(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ControleurVueLogin() {\n\n\t}", "public Login() {\n\t\tsuper();\n\t}", "public login() {\r\n\t\tsuper();\r\n\t}", "public Login() {\n inicializarUsuarios();\n }", "private ServicioLogin() {\n super();\n }", "public Login() {\r\n\t\tinitialize();\r\n\t}", "public Login() {\n ...
[ "0.8234356", "0.8082912", "0.80812484", "0.8076403", "0.78586143", "0.7799286", "0.7764377", "0.7745389", "0.76852995", "0.76697147", "0.76630557", "0.7650913", "0.7606583", "0.76033217", "0.7565359", "0.7538862", "0.7538862", "0.7511124", "0.74448687", "0.7438334", "0.739460...
0.0
-1
Creamos un metodo sobreescrito que sustituya el icono de la ventana por nuestro logo
@Override public Image getIconImage() { Image retValue = Toolkit.getDefaultToolkit().getImage(ClassLoader.getSystemResource("imagenes/Icon.jpg")); return retValue; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void mudarIcone(String enderecoImg, int botao) {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }", "public void mostrarAyudaCM() {\n try {\n jLabel1.setIcon(new javax.swing.Im...
[ "0.71965593", "0.61774987", "0.61680347", "0.61680347", "0.6144327", "0.6127877", "0.6104535", "0.6104535", "0.6084824", "0.60432106", "0.5986807", "0.5944862", "0.5931908", "0.592374", "0.5906801", "0.5902008", "0.5897267", "0.5881752", "0.58805627", "0.5866519", "0.5866519"...
0.0
-1
/ The following are endpoints for automated health checks, so they don't return anything valuable other than a 200 or 404.
@Override public boolean isReceiving() { // set remotely, so we need to call botinfo() if (botinfo().getLastReceivedMessage() < clock.currentTimeMillis() - 10000) { throw new NotFoundException(); } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@GetMapping(path = ApiConstant.HEALTH_CHECK_API, produces = APPLICATION_JSON_VALUE)\n public ResponseEntity checkHealth() {\n logger.info(\"Health checking.\");\n HashMap<String, String> map = new HashMap<>();\n map.put(\"status\", \"OK\");\n return new ResponseEntity<>(map, HttpStat...
[ "0.6757959", "0.67150515", "0.66207206", "0.64186335", "0.630984", "0.63006496", "0.6295194", "0.62626374", "0.6186404", "0.6157642", "0.6125567", "0.6108428", "0.60685843", "0.6049095", "0.59689283", "0.5955976", "0.5952559", "0.59100664", "0.5882139", "0.584044", "0.5818835...
0.0
-1
ArrayList strings = new ArrayList(); strings.add(""); strings.add(""); strings.add(""); strings.add(""); ViewPagerManager viewPagerManager = new ViewPagerManager(getActivity(), strings, layout_home_point, viewpager_home); viewPagerManager.setLooping(false);
public void Moren_show() { List<HomeTypeBean> homeTypeBeanList = new ArrayList<>(); for (int i = 0; i < 10; i++) { HomeTypeBean homeTypeBean = new HomeTypeBean(); homeTypeBean.setAddressurl(""); homeTypeBean.setLogourl(""); homeTypeBean.setMerchantCount(""); homeTypeBean.setMtlevel(""); if (i == 0) { homeTypeBean.setMtname("美食"); } else if (i == 1) { homeTypeBean.setMtname("酒店"); } else if (i == 2) { homeTypeBean.setMtname("旅游"); } else if (i == 3) { homeTypeBean.setMtname("购物"); } else if (i == 4) { homeTypeBean.setMtname("爱美丽"); } else if (i == 5) { homeTypeBean.setMtname("健康"); } else if (i == 6) { homeTypeBean.setMtname(" 休闲娱乐"); } else if (i == 7) { homeTypeBean.setMtname("智能"); } else if (i == 8) { homeTypeBean.setMtname("生活服务"); } else { homeTypeBean.setMtname("更多"); } homeTypeBean.setType(""); homeTypeBean.setPkmertype(""); homeTypeBean.setParentpk(""); homeTypeBeanList.add(homeTypeBean); } ViewPagerGridView viewPagerGridView = new ViewPagerGridView(getActivity(), vp_home_gridview, layout_home_gridview_point, homeTypeBeanList, 10); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void initialisePaging() {\n\nList<Fragment> fragments = new Vector<Fragment>();\nfragments.add(Fragment.instantiate(this, Fragment0.class.getName()));\nfragments.add(Fragment.instantiate(this, Fragment1.class.getName()));\nfragments.add(Fragment.instantiate(this, Fragment2.class.getName()));\nthis.mPagerAd...
[ "0.6905282", "0.6788312", "0.6781467", "0.65867084", "0.6522511", "0.65042293", "0.6447218", "0.64324796", "0.627703", "0.6270355", "0.6267941", "0.6251245", "0.623598", "0.62262404", "0.62170315", "0.6214616", "0.6208688", "0.6205497", "0.6194108", "0.6183602", "0.61643565",...
0.57509005
95
MainActivity mainActivity = (MainActivity) activity; handler_home = mainActivity.getHandler();
@Override public void onAttach(Activity activity) { super.onAttach(activity); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface MainHandler {\n\n void onClickPushLocation(View view);\n void onClickAddFriend(View view);\n void onClickGoMap(View view);\n void onAutoPushLocation(View view, boolean checked);\n\n}", "@Override\n public void onCreate() {\n super.onCreate();\n// han = new Handler();...
[ "0.6450551", "0.64141107", "0.63907087", "0.6328463", "0.6220478", "0.6131762", "0.61084384", "0.6070543", "0.6042693", "0.6042693", "0.60371995", "0.60230094", "0.597086", "0.593373", "0.5905601", "0.588249", "0.5842996", "0.5842389", "0.58340466", "0.58276176", "0.5800255",...
0.0
-1
/ Find the best move based on the minimax algorithm This is the first iteration, where on Max We implement the first iteration here so we can find the best move instead of having min and max return both a score and location
private int minimax(TicTacToeBoard board, Cell thisTeam) throws TicTacToeException { int maxScore = -1; int multiplyer = 1; if(thisTeam != team) { multiplyer = -1; } TicTacToeWinner winner = board.winner(); if(winner != null) { return evaluateWinner(winner.getCell()); } List<Location> possibleMoves = board.emptySlots(); int thisScore; TicTacToeBoard currentBoard; for(Location l: possibleMoves) { currentBoard = board.copy(); currentBoard.makeMove(thisTeam, l); thisScore = multiplyer*minimax(currentBoard, TicTacToeBoard.oppositePlayer(thisTeam)); if(thisScore >= maxScore) { maxScore = thisScore; } } return multiplyer*maxScore; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Move getBestMove() {\r\n\t\tSystem.out.println(\"getting best move\");\r\n\t\tChessConsole.printCurrentGameState(this.chessGame);\r\n\t\tSystem.out.println(\"thinking...\");\r\n\t\t\r\n\t\tList<Move> validMoves = generateMoves(false);\r\n\t\tint bestResult = Integer.MIN_VALUE;\r\n\t\tMove bestMove = null;\...
[ "0.7553388", "0.7403312", "0.7320521", "0.72469544", "0.72216237", "0.7192147", "0.7187148", "0.7179768", "0.7148157", "0.706126", "0.6978078", "0.69587076", "0.69232714", "0.692212", "0.6870075", "0.6804982", "0.6788366", "0.67671233", "0.67521584", "0.6715925", "0.66918296"...
0.6812148
15
TODO Autogenerated method stub
public static void main(String[] args) { Scanner s = new Scanner(System.in); int Menge; double Preis; double Bestellwert; double Versandkosten = 5.50; double Rechnungsbetrag; System.out.println("Bitte geben Sie die gewünschte Menge ein:"); Menge = s.nextInt(); System.out.println(""); System.out.println("Bitte geben Sie den Preis ein:"); Preis = s.nextDouble(); System.out.println(""); s.close(); Bestellwert = Menge*Preis; if(Bestellwert<100) { Versandkosten = 5.50; }else if(Bestellwert>=100 && Bestellwert<200) { Versandkosten = 3.00; }else if(Bestellwert>=200) { Versandkosten = 0; } Rechnungsbetrag = Bestellwert+Versandkosten; System.out.println("Bestellwert: "+Bestellwert+"€ Versandkosten: "+Versandkosten+"€ Rechnunsbetrag: "+Rechnungsbetrag+"€"); }
{ "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
counting horizontal pieces in a row
public int h (board current, int x, int y,int position,int player) { x=x+position; if (x>18||x<0||y>18||y<0) { return -1; } if (current.board[y][x] == 0) { return 0; } else if (current.board[y][x] == player) { return 1; } else { return -1; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private int checkLines(){\r\n \tint contRows = 0;\r\n \t\r\n \tfor (float y = height; y >= 0 && contRows < 4; y--) {\r\n \t\tif (isFullRow(y)) {\r\n \t\t\tcontRows++;\r\n \t\t\tdeleteRow(y);\r\n \t\t}\r\n \t}\r\n \treturn contRows;\r\n }", "private int calculateRows(Container target...
[ "0.670498", "0.6622918", "0.65504926", "0.65270674", "0.64225525", "0.6308184", "0.6261386", "0.62301564", "0.62065214", "0.6199792", "0.6194666", "0.6184117", "0.6177613", "0.6170724", "0.61353815", "0.61034274", "0.60798556", "0.6070819", "0.60651094", "0.6056607", "0.60556...
0.0
-1
counting verticle pieces in a row
public int v (board current, int x, int y,int position,int player) { y=y+position; if (x>18||x<0||y>18||y<0) { return 0; } if (current.board[y][x] == 0) { return 0; } else if (current.board[y][x] == player) { return 1; } else { return -1; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected int countNeighbours(int col, int row){\n int Total = 0;\r\n Total = getCell(col-1,row-1)? ++Total : Total;\r\n Total = getCell(col,row-1)? ++Total : Total;\r\n Total = getCell(col+1,row-1)? ++Total : Total;\r\n Total = getCell(col-1,row)? ++Total : Total;\r\n Tot...
[ "0.6822461", "0.669956", "0.65989214", "0.65504664", "0.6540212", "0.644821", "0.64292425", "0.6406501", "0.6399303", "0.6356845", "0.63517314", "0.633229", "0.63212025", "0.6305099", "0.63028955", "0.6282075", "0.62490255", "0.6239976", "0.6228581", "0.6217606", "0.619734", ...
0.0
-1
//counting diagonal pieces in a row (this way \\)
public int d1 (board current, int x, int y,int position,int player) { x=x+position; y=y-position; if (x>18||x<0||y>18||y<0) { return 0; } if (current.board[y][x] == 0) { return 0; } else if (current.board[y][x] == player) { return 1; } else { return -1; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private int diagonalCount() {\n\t\treturn Math.abs(destRow-curRow) > Math.abs(destCol-curCol) ?\n\t\t\t Math.abs(destCol-curCol) : Math.abs(destRow-curRow);\n\t}", "public static int countDiag2(char[][] a, char c){\r\n int count = 0;\r\n for (int i = 0; i<a.length;i++){\r\n if (a[i][a.length-i-1] ==...
[ "0.7267195", "0.68425983", "0.664419", "0.65314597", "0.64990777", "0.6396695", "0.6392856", "0.63633156", "0.63207066", "0.62934613", "0.62345505", "0.6196451", "0.61382645", "0.6106312", "0.60501087", "0.60230523", "0.5948011", "0.5945384", "0.59390426", "0.59146196", "0.59...
0.0
-1
counting horizontal pieces in a row this way //
public int d2(board current, int x, int y,int position,int player) { x=x+position; y=y+position; if (x>18||x<0||y>18||y<0) { return 0; } if (current.board[y][x] == 0) { return 0; } else if (current.board[y][x] == player) { return 1; } else { return -1; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private int checkLines(){\r\n \tint contRows = 0;\r\n \t\r\n \tfor (float y = height; y >= 0 && contRows < 4; y--) {\r\n \t\tif (isFullRow(y)) {\r\n \t\t\tcontRows++;\r\n \t\t\tdeleteRow(y);\r\n \t\t}\r\n \t}\r\n \treturn contRows;\r\n }", "private int calculateRows(Container target...
[ "0.6610755", "0.64961135", "0.64019483", "0.63802713", "0.633981", "0.6215141", "0.6183756", "0.61766255", "0.61646473", "0.61107343", "0.6103334", "0.608656", "0.6074471", "0.6073748", "0.60425925", "0.6021522", "0.60096645", "0.598992", "0.59779793", "0.5971005", "0.5967822...
0.0
-1
if player is 1, then computer def, else computer attack
private int[] attdef(board current,int player) { int temp[][]=new int[100][100]; possible_location attack = new possible_location(); count_values attack_v = new count_values(); //get good location of possible pieces temp=attack.list_loc(current,player); //counting values for each possible pieces for (int i=0;i <= temp[99][99];i++ ) { temp[i][2]=attack_v.count_values(current,temp[i][0],temp[i][1],player); } //error handling, if there is no possible location, the computer decide a new location if (temp[99][99]<0) { temp[99][99] = 0; int i=8,j=8; while (current.board[i][j]!=0) { j++; if ((current.board[i][j]==0)) { i++; } } temp[0][0]=j; temp[0][1]=i; } int max=0,max_V=0; //find the best value for (int i=0;i<=temp[99][99];i++) { if (max<temp[i][2]) { max=temp[i][2]; max_V=i; } else if (max==temp[i][2]) { //if there is same highest value, the computer will random Random random = new Random(); if (random.nextInt(2)==0) { max=temp[i][2]; max_V=i; } } } //return computer's descision int descision[] = {temp[max_V][0],temp[max_V][1],temp[max_V][2]}; return descision; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void playerAttack() {\n if (playerTurn==true) {\n myMonster.enemHealth=myMonster.enemHealth-battlePlayer.str;\n }\n playerTurn=false;\n enemyMove();\n }", "void fight(Player attackingPlayer, Player attackedPlayer){\n\n // Ask what kind of attack\n Sc...
[ "0.73764694", "0.70416874", "0.69572425", "0.6885322", "0.6869473", "0.6869473", "0.6855912", "0.6854306", "0.68463266", "0.68284047", "0.6767038", "0.67667496", "0.67215246", "0.67086947", "0.6682832", "0.66670775", "0.66622627", "0.6624858", "0.66053164", "0.660428", "0.660...
0.0
-1
Se prepara la sentencia SQL a ejecutar en la BD
@Override public boolean insertar(ModelCliente cliente) { strSql = "INSERT INTO CLIENTE (ID_CLIENTE, NOMBRE, APELLIDO, NIT, TELEFONO, DIRECCION,ID_EMPRESA) " + "VALUES ( (SELECT ISNULL(MAX(ID_CLIENTE),0) + 1 FROM CLIENTE), " + "'" + cliente.getNombre() + "', " + "'" + cliente.getApellido()+ "', " + "'" + cliente.getNit() + "', " + "'" + cliente.getTelefono()+ "', " + "'" + cliente.getDireccion()+ "'," + "" + cliente.getIdEmpresa()+ "" + ")"; try { //se abre una conexión hacia la BD conexion.open(); //Se ejecuta la instrucción y retorna si la ejecución fue satisfactoria respuesta = conexion.executeSql(strSql); //Se cierra la conexión hacia la BD conexion.close(); } catch (ClassNotFoundException ex) { Logger.getLogger(DaoCliente.class.getName()).log(Level.SEVERE, null, ex); return false; } catch(Exception ex){ Logger.getLogger(DaoCliente.class.getName()).log(Level.SEVERE, null, ex); } return respuesta; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void ejecutarSql(String query) throws Exception {\n stmt.executeUpdate(query);\n }", "public String EjecutarSql() {\n String rta = \"\";\n try {\n Statement stmt = dbConecta.createStatement();\n rta += stmt.executeUpdate(CadenaSql);\n dbConecta.clos...
[ "0.71393514", "0.7063004", "0.70171124", "0.68474245", "0.6802962", "0.6751255", "0.67239124", "0.66913235", "0.6665771", "0.6625797", "0.65268344", "0.64762014", "0.6464105", "0.645851", "0.6392517", "0.635941", "0.6331868", "0.6321279", "0.6292893", "0.6283787", "0.62821805...
0.0
-1
Se prepara la sentencia SQL a ejecutar en la BD
@Override public boolean modificar(ModelCliente cliente) { strSql = "UPDATE CLIENTE " + "SET " + "NOMBRE = '" + cliente.getNombre() + "', " + "APELLIDO = '" + cliente.getApellido()+ "', " + "NIT = '" + cliente.getNit() + "', " + "TELEFONO = '" + cliente.getTelefono() + "', " + "DIRECCION = '" + cliente.getDireccion()+ "' " + "WHERE ID_CLIENTE = " + cliente.getIdCliente()+ " AND ID_EMPRESA = " + cliente.getIdEmpresa(); try { //se abre una conexión hacia la BD conexion.open(); //Se ejecuta la instrucción y retorna si la ejecución fue satisfactoria respuesta = conexion.executeSql(strSql); //Se cierra la conexión hacia la BD conexion.close(); } catch (ClassNotFoundException ex) { Logger.getLogger(DaoCliente.class.getName()).log(Level.SEVERE, null, ex); return false; } catch(Exception ex){ Logger.getLogger(DaoCliente.class.getName()).log(Level.SEVERE, null, ex); } return respuesta; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void ejecutarSql(String query) throws Exception {\n stmt.executeUpdate(query);\n }", "public String EjecutarSql() {\n String rta = \"\";\n try {\n Statement stmt = dbConecta.createStatement();\n rta += stmt.executeUpdate(CadenaSql);\n dbConecta.clos...
[ "0.71395195", "0.7062837", "0.70171964", "0.6847678", "0.68032473", "0.6751476", "0.67235994", "0.6691721", "0.66659755", "0.662562", "0.65268797", "0.6476579", "0.64642125", "0.6458638", "0.6392528", "0.6359501", "0.63320863", "0.6320997", "0.6292811", "0.62847435", "0.62824...
0.0
-1
Se prepara la sentencia SQL a ejecutar en la BD
@Override public boolean eliminar(ModelCliente cliente) { strSql = "DELETE CLIENTE WHERE ID_CLIENTE = " + cliente.getIdCliente(); try { //se abre una conexión hacia la BD conexion.open(); //Se ejecuta la instrucción y retorna si la ejecución fue satisfactoria respuesta = conexion.executeSql(strSql); //Se cierra la conexión hacia la BD conexion.close(); } catch (ClassNotFoundException ex) { Logger.getLogger(DaoCliente.class.getName()).log(Level.SEVERE, null, ex); return false; } catch(Exception ex){ Logger.getLogger(DaoCliente.class.getName()).log(Level.SEVERE, null, ex); } return respuesta; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void ejecutarSql(String query) throws Exception {\n stmt.executeUpdate(query);\n }", "public String EjecutarSql() {\n String rta = \"\";\n try {\n Statement stmt = dbConecta.createStatement();\n rta += stmt.executeUpdate(CadenaSql);\n dbConecta.clos...
[ "0.71395195", "0.7062837", "0.70171964", "0.6847678", "0.68032473", "0.6751476", "0.67235994", "0.6691721", "0.66659755", "0.662562", "0.65268797", "0.6476579", "0.64642125", "0.6458638", "0.6392528", "0.6359501", "0.63320863", "0.6320997", "0.6292811", "0.62847435", "0.62824...
0.0
-1
No need to wrap this in a command; failure will simply prevent startup of the application.
public void start() throws Exception { if (!getClient().admin().indices().exists(Requests.indicesExistsRequest(INDEX_NAME)).actionGet().isExists()) { getClient().admin().indices().prepareCreate(INDEX_NAME).execute().actionGet().isAcknowledged(); } //Create mapping for the key. Leave it not_analyzed so it doesn't tokenize the "-" delimiters PutMappingResponse response = getClient().admin().indices() .preparePutMapping(INDEX_NAME) .setType(TYPE_NAME) .setSource(buildMapping()) .execute().actionGet(); if (!response.isAcknowledged()) { throw new Exception("Could not define mapping."); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void executeWithFailure() {\n new SimpleCommandFailure(\"badRequest\", HystrixRuntimeException.FailureType.COMMAND_EXCEPTION).execute();\n }", "@Override\r\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\texecutable.feedbackExecutionError();\r\n\t\t\t\t\t}", "@Test\n void testFailure_un...
[ "0.62466127", "0.58906233", "0.5846621", "0.5766", "0.57656455", "0.57158077", "0.5663814", "0.5619375", "0.5617948", "0.561705", "0.56150764", "0.55960613", "0.5587615", "0.5546685", "0.553409", "0.55286616", "0.5521786", "0.5517388", "0.55155355", "0.55126995", "0.5504592",...
0.0
-1
Verwijder een eventueel bestaand logbestand
protected static Logger initLogger() { File logFile = new File("workshop2_slf4j.log"); logFile.delete(); return LoggerFactory.getLogger(Slf4j.class.getName()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void verwijderen(int id) {\n try {\n em.getTransaction().begin();\n Boek boek = zoek(id);\n em.remove(boek);\n em.getTransaction().commit();\n log.info(String.format(\"%s is verwijderd\", boek.getTitel()));\n } catch (Exception e) {\n ...
[ "0.620919", "0.5931417", "0.58330137", "0.5733033", "0.57206124", "0.57051045", "0.56457907", "0.559446", "0.5567074", "0.55359584", "0.5506228", "0.54849905", "0.5444819", "0.5424607", "0.5396418", "0.53875923", "0.5375984", "0.5360119", "0.5348036", "0.5314879", "0.5297617"...
0.0
-1
Called when the activity is first created.
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_sign_in_screen); etUserName = (EditText) findViewById(R.id.etUserName); etPass = (EditText) findViewById(R.id.etPass); btnSignIn = (Button) findViewById(R.id.btnSignIn); error = (TextView) findViewById(R.id.tv_error); login(); btnSignIn.setOnClickListener(this); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t\tinit();\n\t}", "@Override\r\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\r\n\t}", "@Override\n\tpublic void onActivit...
[ "0.791686", "0.77270156", "0.7693263", "0.7693263", "0.7693263", "0.7693263", "0.7693263", "0.7693263", "0.7637394", "0.7637394", "0.7629958", "0.76189965", "0.76189965", "0.7543775", "0.7540053", "0.7540053", "0.7539505", "0.75269467", "0.75147736", "0.7509639", "0.7500879",...
0.0
-1
onPostExecute displays the results of the AsyncTask.
@Override protected void onPostExecute(String result) { Toast.makeText(getBaseContext(), "You are Logged in!", Toast.LENGTH_LONG).show(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void onPostExecute() {\n }", "protected void onPostExecute() {\r\n\t}", "protected void onPostExecute() {\n }", "protected void onPostExecute() {\n }", "@Override\n protected void onPostExecute(String result) {\n // tvResult.setText(result);\n }", "prote...
[ "0.7648474", "0.7629248", "0.75970715", "0.75970715", "0.7503771", "0.7479748", "0.7479748", "0.74670684", "0.7463521", "0.7443436", "0.7440934", "0.74209803", "0.7395019", "0.73926663", "0.73926663", "0.7390195", "0.7390195", "0.7390195", "0.73754895", "0.73746675", "0.73669...
0.0
-1
TextWatcher would let us check validation error on the fly
private void login() { etUserName.addTextChangedListener(new TextWatcher() { public void afterTextChanged(Editable s) { Validation.hasText(etUserName); } public void beforeTextChanged(CharSequence s, int start, int count, int after){} public void onTextChanged(CharSequence s, int start, int before, int count){} }); // TextWatcher would let us check validation error on the fly etPass.addTextChangedListener(new TextWatcher() { public void afterTextChanged(Editable s) { Validation.hasText(etPass); } public void beforeTextChanged(CharSequence s, int start, int count, int after){} public void onTextChanged(CharSequence s, int start, int before, int count){} }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void onTextChangeListener()\n {\n final Drawable icon = getResources().getDrawable(R.drawable.icon_done);\n icon.setBounds(0,0,icon.getIntrinsicWidth(),icon.getIntrinsicHeight());\n\n eName.addTextChangedListener(new TextWatcher() {\n ...
[ "0.7217612", "0.72137743", "0.705067", "0.6870478", "0.68293935", "0.67378825", "0.66945267", "0.667383", "0.6658602", "0.65881014", "0.657191", "0.657191", "0.657191", "0.657191", "0.657191", "0.65672326", "0.6560628", "0.6525642", "0.65036273", "0.6498433", "0.6476228", "...
0.0
-1
end of keyreleased method
public void keyPressed(KeyEvent e) { athlete.keyPressed(e); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\t\t\tpublic void keyReleased(KeyEvent arg0) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void keyReleased(KeyEvent arg0) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void keyReleased(KeyEvent arg0) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void keyReleased(KeyEvent arg0) {\n\t\t\t\t\n...
[ "0.83620465", "0.83620465", "0.83620465", "0.83620465", "0.83620465", "0.8333624", "0.83240736", "0.832122", "0.832122", "0.832122", "0.832122", "0.832122", "0.832122", "0.832122", "0.83155656", "0.83130914", "0.831191", "0.831191", "0.831191", "0.831191", "0.831191", "0.83...
0.0
-1
Find the square root of a number passed in as a double type, with a second parameter precision. Solution: Do through binary search 1. if the number is less than 0, throw an exception. 2. if the number is the same as 0 or 1 return the same number. 3. else begin a typical binary search, set start =0, end = number 4. do while end start is greater than precision. 4.1. get average. 4.2. calculate the product of the average. 4.3. if the product equals the number, return the average. 4.4. if you fall lesser than the number, set start to mid 4.5. else set end to mid
public double sqrt(double number, double precision){ //if the number is less than 0, throw an exception. if(number <0) throw new IllegalArgumentException("Give a value greater than 0:"+number); //if the number is the same as 0 or 1 return the same number. if(number==0 ||number ==1) return number; else if (number >0 && number <1){ return 1/(sqrt((1/number),precision)); } else { //else begin a typical binary search //set start =0, end = number double start =0, mid =0, end = number; double midSq =0; //do while end -start is greater than precision. while (end - start> precision) { // get average. mid = (start+end)/2; //calculate the product of the average. midSq = mid * mid; //if the product equals the number, return the average. if(midSq == number) return mid; //if you fall lesser than the number, set start to mid else if(midSq < number) start = mid; //else set end to mid else end = mid; } return mid; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static double squareRoot(double num){\n double epsilon=.01;\n double ans=0;\n double increment=.001;\n int count=0;\n while(Math.abs(ans*ans-num)>epsilon){\n System.out.println(ans);\n ans+=increment;\n }\n if (Math.abs(ans*ans-num)<epsilon){\n...
[ "0.69473404", "0.63691777", "0.6351669", "0.6248314", "0.6170576", "0.61703795", "0.60980314", "0.5968031", "0.59109664", "0.59085125", "0.58930063", "0.57469076", "0.5642842", "0.54918104", "0.5483561", "0.5476046", "0.5471858", "0.5458944", "0.5452714", "0.54244876", "0.542...
0.78731817
0
Add a import to this java class.
public void addImport(String importPackage) { this.imports.add(importPackage); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Import createImport();", "Import createImport();", "public final void mIMPORT() throws RecognitionException {\r\n try {\r\n int _type = IMPORT;\r\n int _channel = DEFAULT_TOKEN_CHANNEL;\r\n // C:\\\\sandbox\\\\objc2j\\\\src\\\\ru\\\\andremoniy\\\\objctojavacnv\\\\antlr\\...
[ "0.69534904", "0.69534904", "0.6725619", "0.6674073", "0.6627767", "0.65441173", "0.6493138", "0.6484844", "0.6458705", "0.6438726", "0.63924414", "0.63078344", "0.6290767", "0.6200652", "0.61598575", "0.6149809", "0.6123182", "0.60847384", "0.6007032", "0.59881395", "0.59632...
0.69176817
2
below 3 methoda are for showing form , creating an object and adding a product
@RequestMapping("/addnewproduct")//, method=RequestMethod.POST) public String addProduct() { return "addproduct"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@FXML\n\tpublic void createProduct(ActionEvent event) {\n\t\tif (!txtProductName.getText().equals(\"\") && !txtProductPrice.getText().equals(\"\")\n\t\t\t\t&& ComboSize.getValue() != null && ComboType.getValue() != null && selectedIngredients.size() != 0) {\n\n\t\t\tProduct objProduct = new Product(txtProductName....
[ "0.7401173", "0.70079356", "0.68182087", "0.6804721", "0.6793999", "0.6708482", "0.6667449", "0.66652256", "0.6661043", "0.66406", "0.66106516", "0.6603158", "0.6559336", "0.6556024", "0.6547789", "0.6525589", "0.6449275", "0.6446732", "0.64315784", "0.6405051", "0.64050305",...
0.0
-1
/System.out.println(pob.getId()); int aa=sc.addNewProduct(pob); return new ModelAndView("operations","ops",null); / String filename=null;
@RequestMapping(value="/addproduct",method=RequestMethod.POST) public ModelAndView gotNewProduct(@ModelAttribute("addpro") Product pob,HttpServletRequest request,BindingResult result) { int res = 0; ServletContext context=request.getServletContext(); String path=context.getRealPath("./resources/"+pob.getId()+".jpg"); System.out.println("Path = "+path); //System.out.println("File name = "+pob.getImage().getOriginalFilename()); File f=new File(path); if(!pob.getImage().isEmpty()) { try { //filename=p.getImage().getOriginalFilename(); byte[] bytes=p.getImage().getBytes(); BufferedOutputStream bs=new BufferedOutputStream(new FileOutputStream(f)); bs.write(bytes); bs.close(); System.out.println("Image uploaded"); res=sc.addNewProduct(pob); System.out.println("Data Inserted"); } catch(Exception ex) { System.out.println(ex.getMessage()); } } else { res=0; } if(res>0) { //List<Product> products = ps.getAllProduct(); //model.addAttribute("products", products ); return new ModelAndView("index","", null); } else { return new ModelAndView("error","",null); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@RequestMapping(value=\"/editsave\",method = RequestMethod.POST) \r\n public ModelAndView editsave(@ModelAttribute(\"product\") Product product , HttpServletRequest request, \r\n\t\t\t@RequestParam(\"file\") MultipartFile file){ \r\n \t\r\n///////////////////////////////\r\n \tif (file.getSize()!=0)\r\n ...
[ "0.7174383", "0.7153512", "0.7119458", "0.70358527", "0.69892716", "0.69737214", "0.6708724", "0.6658023", "0.66209984", "0.6607572", "0.6603022", "0.6592631", "0.65723604", "0.651594", "0.64868087", "0.64790964", "0.645214", "0.6425762", "0.63289654", "0.6314352", "0.6302268...
0.81346387
0
below 3 methoda are for showing form , creating an object and adding a member
public String addMember()//value="addmember", method=RequestMethod.) { return "addmember"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addMember()\r\n\t{\r\n\t\tlistOfMembers.add(new Member(\r\n\t\t\t\tgetUserString(\"Enter Member's First Name\"),\r\n\t\t\t\tgetUserString(\"Enter Member's Surname\"),\r\n\t\t\t\tgetUserString(\"Enter Member's Email\"),\r\n\t\t\t\tgetUserString(\"Enter Member's Telephone\"),\r\n\t\t\t\tgetUserInt(\"Ente...
[ "0.6613143", "0.6418921", "0.6395822", "0.629348", "0.6183783", "0.6106251", "0.6100386", "0.6078334", "0.6070082", "0.6048569", "0.60430217", "0.60413665", "0.59950805", "0.59841347", "0.5983145", "0.59773654", "0.59753907", "0.597291", "0.59681255", "0.59560806", "0.5944746...
0.5629752
76
TODO Autogenerated method stub
@Override public List<User> getAll() { return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
Creates a new ClassOperator representing the given class. This constructor is usefull when you need an external representation of the operator.
public ClassOperator(Class type) { this(new StaticArgument(simplify(type.getName()))); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "ClassInstanceCreationExpression getClass_();", "Class createClass();", "public static NewExpression new_(Class type) { throw Extensions.todo(); }", "public PgOpclassRecord() {\n\t\tsuper(test.generated.pg_catalog.tables.PgOpclass.PG_OPCLASS);\n\t}", "public ClassNode(OClass clas) {\n\t\tname = clas.getName...
[ "0.63695514", "0.58336586", "0.5621845", "0.5596512", "0.5572527", "0.55266476", "0.54589856", "0.5457626", "0.52998704", "0.5183972", "0.5181481", "0.51589876", "0.5064488", "0.50497663", "0.50140935", "0.49635607", "0.49528223", "0.49164164", "0.4904811", "0.48500195", "0.4...
0.68684244
0
Determine whether an integer is a palindrome. Do this without extra space. click to show spoilers. Some hints: Could negative integers be palindromes? (ie, 1) If you are thinking of converting the integer to string, note the restriction of using extra space. You could also try reversing an integer. However, if you have solved the problem "Reverse Integer", you know that the reversed integer might overflow. How would you handle such case? There is a more generic way of solving this problem.
public static boolean isPalindrome(int x) { //特殊情况: //如上所述,当x <0时,x不是回文。 //如果数字的最后一位数字为0,为了成为回文, //数字的第一位数字也需要为0. //只有0满足此属性。 if (x < 0 || (x % 10 == 0 && x != 0)) { return false; } int revertedNumber = 0 ; while (x > revertedNumber ) { revertedNumber = revertedNumber * 10 + x%10 ; x /= 10 ; } //当长度是一个奇数时,我们可以通过revertedNumber / 10来摆脱中间的数字 //例如当输入为12321时,在while循环结束时,我们得到x = 12,revertedNumber = 123, //因为中间的数字并不重要(它总是等于自己),我们可以简单地去掉它。 return x == revertedNumber || x == revertedNumber / 10 ; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static boolean palindromeCheck(int x) {\n\t\tint original = x;\n\t\t//\tInitialize an integer to record the reverse of the input\n\t\tint reverse = 0;\n\t\t//\tInitialize an integer to track the remainder through the loop\n\t\tint remainder = 0;\n\t\t\n\t\twhile(x != 0) {\n\t\t\t//\tUse modulo to get the la...
[ "0.7729472", "0.7690674", "0.7674637", "0.76289624", "0.76140815", "0.76104134", "0.75322133", "0.7528225", "0.7526021", "0.74572194", "0.74436784", "0.7420616", "0.74148935", "0.7402288", "0.7364029", "0.73576576", "0.73160696", "0.73095495", "0.7306513", "0.7303724", "0.730...
0.7490498
9
Main driver of the PingPongTest
public static void main(String[] args) { PingPongServerFactory factory = new RealFactory(); Skeleton<PingPongServerFactory> skeleton = null; try { // take the localHost's hostname and create the skeleton at port 80 InetSocketAddress inet = new InetSocketAddress(InetAddress.getLocalHost().getHostName(), 80); skeleton = new Skeleton<PingPongServerFactory>(PingPongServerFactory.class, factory, inet); // start the skeleton and wait for requests skeleton.start(); } catch (Exception e) { e.printStackTrace(); try { skeleton.stop(); } catch (NullPointerException e1) { e1.printStackTrace(); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void ping() {}", "public static void ping() {}", "private MockarooPingHelper(){}", "public static void main(String[] args) {\n\t\t\n\t\t\t\tnew Pong();\n\t\t\t\n\t\t\n\t\t\t\n\t\t// TODO Auto-generated method stub\n\n\t}", "public static void main(String[] args) {\n\tPong5 pong = new Pong5(64...
[ "0.6846739", "0.6846739", "0.6720105", "0.65884936", "0.65322614", "0.64101875", "0.64054877", "0.63638675", "0.6285305", "0.62542003", "0.6244868", "0.61580634", "0.6152647", "0.60959876", "0.6090063", "0.59753513", "0.5933753", "0.5902662", "0.5886325", "0.58696723", "0.584...
0.6732241
2
create a ArrayList Object of long and assign it to a variable
public static void main(String[] args) { ArrayList<Long> lst = new ArrayList<>(); // C.R.U.D // Create, Read, Update, Delete // add item, insert an item, read item, update the item, remove the item, check the location ... lst.add( 12L ); // 12L is automatically converted to new Long(12L) ; because ArrayList only store object lst.add( 100L ); lst.add( 150L ); lst.add( 200L ); // practically you will not add null, but it possible // lst.add(null); System.out.println("lst = " + lst); // I want to insert 125 between 100L and 150L, basically 2nd and 3rd item lst.add(2,125L); System.out.println("lst = " + lst); System.out.println("lst item count = " + lst.size()); System.out.println("lst.get(3) = " + lst.get(3)); // updating value at certain index : set method lst.set(3,195L); System.out.println("NEW VALUE FOR lst.get(3) = " + lst.get(3)); System.out.println("lst = " + lst); // removing item by its value // lst.remove(100L); // System.out.println("lst after removing 100 = " + lst); // removing item by its index // lst.remove(2); // System.out.println("lst after removing by index = " + lst); // looking for location of certain item System.out.println("\nLocation of 100L is using lst.indexOf(100L) " + lst.indexOf(100L)); System.out.println("\nLocation of 23L is using lst.indexOf(23L) " + lst.indexOf(23L)); // Check whether a list is empty or not System.out.println("\nlst.size() > 0 = " + (lst.size() > 0)); System.out.println("\nlst.isEmpty() = " + lst.isEmpty()); // how do I delete everything inside my ArrayList // lst.clear(); // System.out.println("\nlst.isEmpty() = " + lst.isEmpty()); // System.out.println("lst = " + lst); // check whether we have certain item or not System.out.println("\nlst.contains(100L) = " + lst.contains(100L)); System.out.println("lst.contains(10L) = " + lst.contains(10L)); // how do I check whether a list contains an item without using contains // use indexOf method, if it return -1, it means we don't have it System.out.println("DO I HAVE 10L = " + (lst.indexOf(10L) != -1)); ArrayList<Integer> lst2 = new ArrayList<>(); lst2.add(5); lst2.add(3); lst2.add(4); lst2.add(2); lst2.indexOf(3); System.out.println("\nlst2 = " + lst2); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void createListFromLong(ArrayList<Integer> list, long l) {\n\n\t\tint individualNum = 0;\n\t\n\t\twhile(l > 0) {\n\t\t\tindividualNum = (int) (l % 10);\n\t\t\tl /= 10;\n\t\t\t\n\t\t\tlist.add(individualNum);\n\t\t}\n\t\t\n\t\tCollections.reverse(list);\n\t}", "abstract public long[] getBlockListAsL...
[ "0.7008214", "0.67173344", "0.625767", "0.625767", "0.62357694", "0.623042", "0.6179352", "0.61629874", "0.6133605", "0.61208594", "0.61104316", "0.6087019", "0.5932691", "0.5894725", "0.58838934", "0.5828458", "0.58234227", "0.5816496", "0.57969594", "0.57950145", "0.5751031...
0.515776
85
Interface for events management. The methods inside can be called remotly or with jaxrs rest api. It is not possible to update an existing event.
@Remote public interface IEventsResource { public String createEvent(EventTO newEventTO, String idApp) throws EntityNotFoundException, UnauthorizedException; public EventTO getEvent(String id, String idApp) throws EntityNotFoundException, UnauthorizedException; public List<EventTO> getEvents(String idApp) throws EntityNotFoundException; public Response restCreateEvent(EventTO newEventTO, String idApp) throws EntityNotFoundException, UnauthorizedException; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface Event extends Serializable {\n\n Long getEventId();\n\n String getEventTitle();\n\n String getEventDescription();\n\n Long getEventAssignerId();\n\n Date getOriginalEventStartDate();\n\n Date getEventStartDate();\n\n /***\n * Sets the new start date for new generating even...
[ "0.7351651", "0.732059", "0.7256721", "0.689526", "0.689526", "0.6852544", "0.6846935", "0.6815921", "0.6815921", "0.6815253", "0.68032384", "0.6779493", "0.67398643", "0.6737209", "0.67348754", "0.6728717", "0.6665818", "0.662385", "0.66197896", "0.65504885", "0.65390444", ...
0.6530665
23
Constructor Parse, analyse and prepare pathdata from a dpath expression
public DPath(String path) throws Exception { if (!setUpDpath(path)) { throw new Exception(); } doSpesificationPart(path); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public final XPath constructPath(){\r\n \tif(path == null){\r\n \t\tpath = new XPath(getPathArray());\r\n \t}\r\n\t\treturn path;\r\n }", "public PathExpressionIF createPathExpression();", "public Triple createPath(Expression subject, Atom predicate, Expression object, Expression exp){\t\t\r\n\t\t...
[ "0.57889163", "0.57555", "0.56101644", "0.5418042", "0.5361059", "0.5347172", "0.5198878", "0.5186832", "0.5105643", "0.5063829", "0.5055647", "0.50398624", "0.5010081", "0.497758", "0.49679413", "0.49669367", "0.4950908", "0.493518", "0.49293113", "0.48959827", "0.48800334",...
0.4830639
23
Do the actual extract according to dpath
public DocumentFragment getExtract(Document wDoc, Module mod, PIcommand cmd) { // assuming that the dpath is legal and that the globals describing // the performance is ok // prepare a fragment we will collect extracts into DocumentFragment df = mod.getDoc().createDocumentFragment(); // find headers in "flat document-sequence" wDoc.normalize(); NodeList elist = wDoc.getElementsByTagName("*"); // and locate starters starters = new ArrayList<Element>(); for (int ix = 0; ix < elist.getLength(); ix++) { Element e = (Element) elist.item(ix); String ename = e.getTagName(); //System.out.println(ename); if (((ename.startsWith("h") || (ename.startsWith("H"))) && (ename.length() == 2))) { int level = 0; try { level = Integer.parseInt(ename.substring(1)); } catch (Exception ex) { continue; } String content = e.getTextContent().trim(); content = content.replace('\n', ' '); //System.out.println(""+level+" "+content); // compare to legal dpath if (level < dpath.size()) { while (matcher.length() < level) { matcher += "0"; } String T = dpath.get(level); if ((T.compareTo(NO_VALUE) == 0) || (T.compareTo(content) == 0)) { matcher = matcher.substring(0, level) + "0"; if ((level == dpath.size() - 1) && (matcher.indexOf("X") == -1)) { starters.add(e); } } else { matcher = matcher.substring(0, level) + "X"; } } } } // we have the starters and are ready to do extracting if (starters.isEmpty()) { // no starters and we retun an empty fragment mod.getReporter().pushMessage("empty_dpath_extract", cmd.getValue(PIcommand.DPATH)); return df; } for (int ix = 0; ix < starters.size(); ix++) { Node targetNode = starters.get(ix); String tmp = ((Element) targetNode).getTagName().substring(1); int starterLevel = Integer.parseInt(tmp); boolean more = true; while (more) { //if(isWanted(targetNode)) // df.appendChild(mod.getDoc().importNode(targetNode,true)); df.appendChild(selectFrom(targetNode, mod)); targetNode = targetNode.getNextSibling(); if (targetNode != null) { if (targetNode.getNodeType() == Node.ELEMENT_NODE) { String tName = ((Element) targetNode).getTagName(); if ((tName.length() == 2) && ("123456".indexOf(tName.charAt(1)) != -1) && ((tName.startsWith("h")) || (tName.startsWith("H")))) { int targetLevel = Integer.parseInt(tName.substring(1)); if (targetLevel <= starterLevel) { more = false; } } } } else { more = false; } } } return df; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void testExtractDetailsUsingPath() {\n\t\t\n\t\tString href = when().\n\t\t\t\t\t\tget(\"http://jsonplaceholder.typicode.com/photos/1\").\n\t\t\t\t\t then().\n\t\t\t\t\t contentType(ContentType.JSON).\n\t\t\t\t\t body(\"albumId\", equalTo(1)).\n\t\t\t\t\t extract().\n\t\t\t\t\t path(\"url\");\n\t...
[ "0.5441076", "0.52539796", "0.51996875", "0.5101845", "0.5073095", "0.50658506", "0.4981363", "0.49769858", "0.49696788", "0.49159014", "0.4878811", "0.48074076", "0.47535324", "0.47330114", "0.47229767", "0.46999928", "0.46861783", "0.46745944", "0.4665588", "0.46528956", "0...
0.660755
0
Can we use this node or someone below in the tree
private DocumentFragment selectFrom(Node n, Module mod) { DocumentFragment local_df = mod.getDoc().createDocumentFragment(); if (isWanted(n)) { local_df.appendChild(mod.getDoc().importNode(n.cloneNode(true), true)); if (local_df.getLastChild().getNodeName().compareToIgnoreCase("img") == 0) { // we make this a default wxtimage or not //((Element)local_df.getLastChild()).setAttribute("class","wxtimage"); } return local_df; } if (n.hasChildNodes()) { Node child = n.getFirstChild(); while (child != null) { local_df.appendChild(selectFrom(child, mod)); child = child.getNextSibling(); } } return local_df; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected boolean traverseThisNode(iNamedObject node)\n\t{\n\t\treturn true;\n\t}", "boolean usedByNode(Long id);", "boolean hasIsNodeOf();", "public boolean isRealNode();", "public boolean isRealNode();", "public abstract boolean isUsing(Long graphNode);", "public AppDbObjectTreeExtensionUsageToggleNo...
[ "0.6741073", "0.63830537", "0.622523", "0.6194766", "0.6194766", "0.61459464", "0.6099021", "0.60859615", "0.60316676", "0.60316676", "0.60223824", "0.5970042", "0.5956363", "0.5910429", "0.5887721", "0.5879236", "0.58669543", "0.5859632", "0.5858803", "0.5839274", "0.5831699...
0.0
-1
Check if this node is on the wantedlist
private boolean isWanted(Node n) { if (use_All) { return true; } String name = n.getNodeName(); for (int ix = 0; ix < remove_tags.length; ix++) { if (name.compareTo(remove_tags[ix]) == 0) { return false; } } for (int ix = 0; ix < add_tags.length; ix++) { if (name.compareTo(add_tags[ix]) == 0) { return true; } } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean isInList();", "boolean hasList();", "public boolean hasList() {\n return msgCase_ == 5;\n }", "public boolean hasList() {\n return msgCase_ == 5;\n }", "Boolean isCurrentListDoneList();", "private boolean checkInList(String ip, int port) {\r\n\t\tif(this.ip.equals(ip) &...
[ "0.72209454", "0.6473353", "0.6176103", "0.61744523", "0.6061865", "0.60151565", "0.59690857", "0.5936067", "0.5936067", "0.59208006", "0.59208006", "0.5920591", "0.58962685", "0.5882826", "0.5795913", "0.5792407", "0.5748165", "0.5747646", "0.5747646", "0.5747646", "0.573474...
0.5964369
7
Parse the dpath string and establish a list of targets
private boolean setUpDpath(String S) { if (S == null) { return false; } S = S.trim(); // remove the specification/filter part if found S = removeSpesificationPart(S); //-------------------------- // the we go for the path S = S.trim(); // do special cases if (S.compareTo("*") == 0) { S = NO_VALUE; } if (S.compareTo("/") == 0) { S = NO_VALUE + "/" + NO_VALUE; } if (S.startsWith("/")) { S = NO_VALUE + S; } dpath = new ArrayList<String>(6); dpath.add(ROOT); // as level 0 if (S.isEmpty()) { dpath.add(NO_VALUE); } // introduce space to make sure we count correct S = S.replaceAll("\\Q//\\E", "/ /"); String[] parts = S.split("/"); for (int ix = 0; ix < parts.length; ix++) { if (parts[ix].trim().isEmpty()) { dpath.add(NO_VALUE); } else { dpath.add(parts[ix].trim()); } } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void processPath(String str) {\r\n if (str.equals(\"\")) {\r\n return;\r\n }\r\n\r\n int id1 = Integer.valueOf(str.split(\"->\")[0].trim());\r\n int id2 = Integer.valueOf(str.split(\"->\")[1].trim());\r\n Node node1 = null;\r\n Node node2 = null;\r\n\r\n...
[ "0.52128726", "0.498038", "0.4911647", "0.48779398", "0.48088232", "0.4777976", "0.47477764", "0.4563967", "0.45019385", "0.4494909", "0.44925353", "0.44912672", "0.44897592", "0.44389695", "0.44305104", "0.44269636", "0.4409896", "0.43576682", "0.43549624", "0.4302619", "0.4...
0.4059019
63
Remove filter from dpath string
static private String removeSpesificationPart(String S) { if (S.endsWith("]")) { int pos = S.lastIndexOf("["); if (pos != -1) { return S.substring(0, pos); } } return S; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "String filter(String value);", "@Override\r\n public void removeFilterValue(String value) {\n }", "java.lang.String getFilter();", "private static String normalizePathString(String path) {\n String noUnion = removePrefix(path, \"union:/\");\n // Remove scheme marker\n String noSche...
[ "0.5622771", "0.5555906", "0.5505429", "0.54551715", "0.53953755", "0.5392025", "0.5340719", "0.53114134", "0.52942985", "0.5288159", "0.5280475", "0.5266582", "0.5248284", "0.5238348", "0.52048767", "0.51661867", "0.51612186", "0.5081105", "0.5080583", "0.50796384", "0.50478...
0.45340392
77
Analyze the filter part of a dpath Set filtervariables accordingly
private String doSpesificationPart(String S) { // a dpath has the form:[a,b,c] or [*] // [*]: include everything, same as no filter // [a,b,c]: include a and b and c // possible values are: // h:all headers, p:paragraphs, t:tables, l:lists, f:formulas, i:images S = S.trim(); //------------------------- // initiate filters add_tags = new String[0]; remove_tags = new String[0]; use_All = true; //--------------------------- // do we have a filter at all if (S.endsWith("]")) { int pos = S.lastIndexOf("["); if (pos != -1) { String filter = S.substring(pos + 1, S.length() - 1); // prepare the pathpart to return: S = S.substring(0, pos); //-------------------- // here we go // use nothing ? if (filter.isEmpty()) { use_All = false; return S; } // use everything ? if (filter.trim().compareTo("*") == 0) { use_All = true; return S; } // starts with everything, and reduce with -? /* if(filter.startsWith("*")) { use_All=true; remove_tags=filter.substring(1).trim().split(","); for(int ix=0;ix<remove_tags.length;ix++) { String tmp=remove_tags[ix].trim(); tmp=tmp.replaceFirst("-", "").trim(); remove_tags[ix]=tmp; } return S; } */ // we have a strait add situation use_All = false; add_tags = filter.split(","); for (int ix = 0; ix < add_tags.length; ix++) { String tmp = add_tags[ix].trim(); add_tags[ix] = tmp; } return S; } } return S; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean simpleBind(Filter f){\n// List<String> list = f.getVariables();\n// \n// for (Exp exp : this){\n// if (exp.isEdge() || exp.isPath() || exp.isValues() || exp.isBind()){\n// \n// }\n// }\n \n return true;\n }", "public void s...
[ "0.5685015", "0.5631174", "0.5609024", "0.5581235", "0.5504166", "0.54510397", "0.54194844", "0.5417068", "0.5323057", "0.5302507", "0.52833724", "0.5224124", "0.52228326", "0.5210153", "0.516613", "0.51463014", "0.5143881", "0.51344293", "0.51320237", "0.51281166", "0.512695...
0.0
-1
Prints the calculated specifications
public void printSpecs(int i) { try { System.out.println(i + ". " + name + " - " + sipp + " - " + carType + " - " + doorsCarType + " - " + transmision + " - " + fuel + " - " + ac); } catch (Exception e) { System.out.println("VehicleDTO printSpec error " + e.getMessage()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void printSpecification(PrintStream ps);", "public void printSummary() {\n\t\tSystem.out.println(MessageFormat.format(\"\\nSummary:\\n Name: {0}\\n Range: 1 to {1}\\n\", this.name, this.numSides));\n\t}", "public String printFormat(){\n return \"The workout: \" + getName() + \" should be done for \"...
[ "0.7119246", "0.691146", "0.672742", "0.6721266", "0.6671022", "0.6656419", "0.66302705", "0.66300654", "0.6543379", "0.65004396", "0.6425841", "0.6422343", "0.641469", "0.63957554", "0.63889533", "0.63864124", "0.63318396", "0.6312734", "0.6309674", "0.6290567", "0.62813956"...
0.6198368
29
Prints the calculated scores
public void printScore(int i) { try { System.out.println(i + ". " + name + " - " + vehicleScore + " - " + rating + " - " + sumScore); } catch (Exception e) { System.out.println("VehicleDTO printSpec error " + e.getMessage()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void printScore() {\n\n\t}", "private void printScore() {\r\n View.print(score);\r\n }", "public void printScore()\n {\n if (score.isEmpty())\n System.out.println(\"\\nThe score is currently empty\");\n else\n {\n for (int i = 0; i < s...
[ "0.79867035", "0.7822866", "0.7607605", "0.7604396", "0.7387831", "0.73394036", "0.72073877", "0.7196419", "0.7182021", "0.71523166", "0.71425986", "0.7041503", "0.6995743", "0.6970647", "0.69366753", "0.69082797", "0.68877715", "0.6875786", "0.686029", "0.68502414", "0.68299...
0.66933006
29