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 |
|---|---|---|---|---|---|---|
Create button handler. Make new instance of user. | @FXML public void createBT_handler(ActionEvent e) {
String getUser = userNameTF.getText();
if(getUser.trim().isEmpty()) {
Alert error = new Alert(AlertType.ERROR, "Please enter userName.", ButtonType.OK);
error.showAndWait();
return;
}
if(mgUsr.arrList.isEmpty()) {
Alert alert = new Alert(AlertType.CONFIRMATION, "Do you want to add new user?", ButtonType.YES, ButtonType.NO);
alert.showAndWait();
if (alert.getResult() == ButtonType.NO) {
return;
}
addToArrayList(getUser);
userNameTF.clear();
}
else if((duplicationCheck(getUser))==true) {
Alert alert = new Alert(AlertType.CONFIRMATION, "Do you want to add new user?", ButtonType.YES, ButtonType.NO);
alert.showAndWait();
if (alert.getResult() == ButtonType.NO) {
return;
}
addToArrayList(getUser);
userNameTF.clear();
}
else if((duplicationCheck(getUser))==false) {
Alert error = new Alert(AlertType.ERROR, "Input userName is already in the list", ButtonType.OK);
error.showAndWait();
userNameTF.clear();
return;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n public void handle(ActionEvent e) {\n CreateUser create = new CreateUser(txtUserName, txtEmail,\r\n txtFirstName, txtLastName, txtPassword);\r\n\r\n create.createUser(); //Call the createUser method.\r\n confirmUserStage.close(); //Close the ... | [
"0.70456207",
"0.69409776",
"0.681676",
"0.681277",
"0.680766",
"0.678672",
"0.6712822",
"0.6699198",
"0.66664994",
"0.6642668",
"0.6623406",
"0.6623073",
"0.6546183",
"0.6474351",
"0.6464085",
"0.6399869",
"0.6341731",
"0.6322081",
"0.6313972",
"0.6290723",
"0.62806475",
"... | 0.63563883 | 16 |
Delete button handler. Remove selected user from listview. | @FXML public void deleteBT_handler(ActionEvent e) {
if(list.getSelectionModel().getSelectedIndex() == -1) {
Alert error = new Alert(AlertType.ERROR, "Nothing Selected.\nPlease select correctly or add new User", ButtonType.OK);
error.showAndWait();
}
else {
Alert warning = new Alert(AlertType.WARNING,"Delete this User from list?", ButtonType.YES, ButtonType.NO);
warning.showAndWait();
if(warning.getResult() == ButtonType.NO){
return;
}
int idx = list.getSelectionModel().getSelectedIndex();
if(list.getSelectionModel().getSelectedItem().getUserName().equals("stock")) {
Alert error = new Alert(AlertType.ERROR, "You can't delete stock username", ButtonType.OK);
error.showAndWait();
return;
}
obs.remove(idx);
mgUsr.arrList.remove(idx);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@FXML\n\tpublic void deleteUser(ActionEvent e) {\n\t\tint i = userListView.getSelectionModel().getSelectedIndex();\n//\t\tUser deletMe = userListView.getSelectionModel().getSelectedItem();\n//\t\tuserList.remove(deletMe); this would work too just put the admin warning\n\t\tdeleteUser(i);\n\t}",
"@Override\n ... | [
"0.8097639",
"0.80371135",
"0.7560883",
"0.7379334",
"0.73545134",
"0.7331355",
"0.6990469",
"0.6987095",
"0.69819045",
"0.69109094",
"0.6815893",
"0.68067354",
"0.67898476",
"0.6758251",
"0.6735685",
"0.671155",
"0.66865474",
"0.6676035",
"0.6671272",
"0.66659296",
"0.665775... | 0.7359713 | 4 |
logout button handler. It saves all data through serialize. | @FXML public void logoutBT_handler(ActionEvent e) throws Exception {
mgUsr.conductSerializing();
FXMLLoader loginScene = new FXMLLoader(getClass().getResource("/view/login.fxml"));
Parent parent = (Parent) loginScene.load();
loginController login = loginScene.getController();
Scene loginControllerScene = new Scene(parent);
Stage window = (Stage)((Node)e.getSource()).getScene().getWindow();
login.start(window);
window.setScene(loginControllerScene);
window.show();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void logout() {\n\n if (WarehouseHelper.warehouse_reserv_context.getUser().getId() != null) {\n //Save authentication line in HisLogin table\n /*\n HisLogin his_login = new HisLogin(\n WarehouseHelper.warehouse_reserv_context.getUser().getId(),\n ... | [
"0.71150964",
"0.6998418",
"0.6997346",
"0.69905216",
"0.69555557",
"0.6861976",
"0.6860108",
"0.6839124",
"0.6835003",
"0.68034637",
"0.6798775",
"0.6724155",
"0.6668722",
"0.665044",
"0.6594036",
"0.65785146",
"0.65703756",
"0.65480214",
"0.6546716",
"0.6540602",
"0.6524213... | 0.6359972 | 36 |
/ Helper functions Helper function. Add to ArrayList with create button handler. | private void addToArrayList(String getName) {
User newUser = new User(getName);
mgUsr.arrList.add(newUser);
obs = FXCollections.observableArrayList(mgUsr.arrList);
setOnListView();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public AddList() {\n setTitleText(\"Add new List\");\n addButton = new JButton(\"Add\");\n addButton.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent actionEvent) {\n addButtonActionPerfo... | [
"0.7066863",
"0.7039597",
"0.7021137",
"0.6976634",
"0.69706637",
"0.6941669",
"0.6936138",
"0.6880373",
"0.68542",
"0.68249285",
"0.6803332",
"0.67266315",
"0.66464216",
"0.6638351",
"0.65980023",
"0.65234685",
"0.6516942",
"0.64479864",
"0.64259845",
"0.64147997",
"0.640911... | 0.0 | -1 |
Set on list view after addToArrayList method. | private void setOnListView() {
list.setItems(obs);
list.setCellFactory(new Callback<ListView<User>, ListCell<User>>(){
@Override
public ListCell<User> call(ListView<User> p) {
ListCell<User> cell = new ListCell<User>() {
@Override
protected void updateItem(User s, boolean bln) {
super.updateItem(s, bln);
if(s != null) {
setText(s.getUserName());
}else
setText("");
}
};
return cell;
}
});
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void updateListView() {\n adapter = new TableItemAdapter(this, tableItems);\n this.listView.setAdapter(adapter);\n }",
"public void update_list_view() {\n\n Collections.sort(mA.alarms);\n\n // make array adapter to bind arraylist to listview with new custom item layout\n ... | [
"0.66513354",
"0.65921146",
"0.6571577",
"0.65530676",
"0.6501351",
"0.6451814",
"0.64456105",
"0.6439507",
"0.64190584",
"0.64149845",
"0.64090407",
"0.63794065",
"0.6372735",
"0.63356906",
"0.6311568",
"0.6302836",
"0.62632406",
"0.6238624",
"0.6234856",
"0.62242955",
"0.62... | 0.70652515 | 0 |
Check duplicate user name. | private boolean duplicationCheck(String userName) {
boolean ret = true;
if(obs.isEmpty()) {
ret = true;
}
else {
for(int i=0; i<obs.size(); i++) {
if(obs.get(i).getUserName().compareTo(userName) == 0) {
ret = false;
break;
}
else
ret = true;
}
}
return ret;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"boolean duplicatedUsername(String username);",
"public static boolean userNameDuplicate(String arg_username) {\n\n\t\tboolean userNameFound = false;\n\n\t\tfor (User u0 : userInfoArray) {\n\t\t\tString currentUserName = ((User) u0).getUserName();\n\t\t\tif (arg_username.toUpperCase().equals(currentUserName.toUpp... | [
"0.81179035",
"0.76115024",
"0.7562117",
"0.755217",
"0.72444427",
"0.7231023",
"0.72015965",
"0.7197254",
"0.71788716",
"0.7128718",
"0.7073288",
"0.7024678",
"0.7005191",
"0.6992376",
"0.69709295",
"0.69560593",
"0.6945694",
"0.6889622",
"0.6852267",
"0.6831367",
"0.6817454... | 0.7221498 | 6 |
Start method not used | public void start(Stage mainStage) {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void start() {\n\n\t}",
"public void start() {}",
"public void start() {}",
"protected void start() {\n }",
"public void start()\n {\n }",
"public void start() {\n }",
"public void start() {\n\n\t}",
"public void start() {\n\t\t\n\t}",
"public void start() {\n\t\t\n\t}",
"... | [
"0.89058506",
"0.8902164",
"0.8902164",
"0.8871234",
"0.87811255",
"0.8711461",
"0.87052584",
"0.869624",
"0.869624",
"0.86666703",
"0.86263496",
"0.86117095",
"0.8599024",
"0.85828394",
"0.8563993",
"0.85631156",
"0.8556547",
"0.85380465",
"0.85380465",
"0.85380465",
"0.8538... | 0.0 | -1 |
Generates aspect based word lists from the given corpus | @SuppressWarnings({ "deprecation", "unchecked", "rawtypes" })
public String generateWordlists(Corpus co) {
long startTime = System.currentTimeMillis();
// Set up weka word vector
FastVector attributes;
Instances dataSet;
attributes = new FastVector();
attributes.addElement(new Attribute("aspect_id", (FastVector) null));
attributes.addElement(new Attribute("tokens", (FastVector) null));
dataSet = new Instances("BeerAspects", attributes, 0);
Corpus topReviews;
Corpus lowReviews;
// Do top and low for all aspects
for (Aspect aspect : Aspect.values()) {
// Only for actual aspects
if (aspect.equals(Aspect.NONE) || aspect.equals(Aspect.OVERALL))
continue;
topReviews = co.getTopReviews(aspect);
topReviews.analyze();
String tokens = topReviews.getTokenConcatenation(aspect);
Instance instance = new SparseInstance(2);
instance.setValue((Attribute) attributes.elementAt(0), aspect.name() + "_TOP");
instance.setValue((Attribute) attributes.elementAt(1), tokens);
dataSet.add(instance);
lowReviews = co.getLowReviews(aspect);
lowReviews.analyze();
tokens = lowReviews.getTokenConcatenation(aspect);
// System.out.println(tokens);
instance = new SparseInstance(2);
instance.setValue((Attribute) attributes.elementAt(0), aspect.name() + "_LOW");
instance.setValue((Attribute) attributes.elementAt(1), tokens);
dataSet.add(instance);
}
// System.out.println(dataSet.toString());
Instances dataFiltered = transformToWordVector(dataSet, co.getProps());
// System.out.println(dataFiltered.toString());
String pathsToLists = writeWordlists(dataFiltered);
writeArffFile(dataFiltered, this.outputDir+"wordvector.arff");
long stopTime = System.currentTimeMillis();
long elapsedTime = stopTime - startTime;
System.out.println("Generated wordlists in: " + elapsedTime / 1000 + " s");
return pathsToLists;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String writeWordlists(Instances data) {\n\t\tString result = \"\";\n\t\tString[] wordLists = new String[4];\n\t\tfor (int j = 0; j < wordLists.length; j++) {\n\t\t\twordLists[j] = \"\";\n\t\t}\n\n\t\t// Loop over all tokens (attributes)\n\t\tfor (int i = 1; i < data.numAttributes(); i++) {\n\t\t\tdouble[] s... | [
"0.62271386",
"0.6002466",
"0.5936127",
"0.5787483",
"0.5769907",
"0.57404685",
"0.5685615",
"0.56585217",
"0.56332105",
"0.56270576",
"0.55905783",
"0.55320156",
"0.5486745",
"0.54765475",
"0.54587334",
"0.54554063",
"0.5389376",
"0.53809327",
"0.53792626",
"0.53578776",
"0.... | 0.7225444 | 0 |
Writes one word list for each aspect | public String writeWordlists(Instances data) {
String result = "";
String[] wordLists = new String[4];
for (int j = 0; j < wordLists.length; j++) {
wordLists[j] = "";
}
// Loop over all tokens (attributes)
for (int i = 1; i < data.numAttributes(); i++) {
double[] scores = data.attributeToDoubleArray(i);
double[] aspectScores = new double[4];
String token = data.attribute(i).name();
// System.out.println("Token: " + token);
// Calculate aspect score by summing top and low scores
aspectScores[0] = scores[0] + scores[1]; // Aroma
aspectScores[1] = scores[2] + scores[3]; // Palate
aspectScores[2] = scores[4] + scores[5]; // Taste
aspectScores[3] = scores[6] + scores[7]; // Appearance
int maxIndex = 0;
double maxScore = 0;
for (int j = 0; j < aspectScores.length; j++) {
if (aspectScores[j] > maxScore) {
maxScore = aspectScores[j];
maxIndex = j;
// TODO Implement min threshold to include
}
}
// System.out.println("Max value and aspect: " + maxIndex + "/" + maxScore);
Double ratio = scores[maxIndex * 2] / scores[maxIndex * 2 + 1];
// System.out.println("Score ratio: " + ratio);
// Word is positive wrt aspect
if (ratio > 1) // TODO: Configurable threshold
wordLists[maxIndex] += token + " " + (scores[maxIndex * 2]-scores[maxIndex * 2 + 1]) + "\n";
// Word is negative wrt aspect
else if (ratio < 1)
wordLists[maxIndex] += token + " " + -1 * (scores[maxIndex * 2 + 1]-scores[maxIndex * 2]) + "\n";
// for (int j = 0; j < scores.length; j++) {
// System.out.print(scores[j] + ",");
// }
// System.out.println();
}// End loop over attributes
// Write lists to file
Writer out = null;
try {
for (int j = 0; j < wordLists.length; j++) {
String path = this.outputDir;
if (j == 0)
path += Aspect.AROMA.name();
if (j == 1)
path += Aspect.PALATE.name();
if (j == 2)
path += Aspect.TASTE.name();
if (j == 3)
path += Aspect.APPEARANCE.name();
path += ".txt";
out = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(path), "UTF-8"));
out.write(wordLists[j]);
out.close();
System.out.println("Wordlist written to: " + path + " (" + wordLists[j].split("\n").length + ")");
result += path+";";
}
} catch (IOException e) {
e.printStackTrace();
} finally {
try {
out.close();
} catch (IOException e) {
e.printStackTrace();
}
}
return result;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void writeList()\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\tPrintWriter writer = new PrintWriter(categoryName + \".txt\");\r\n\t\t\t\r\n\t\t\tfor(int i = 0; i < questions.size(); i++) // go through ArrayList\r\n\t\t\t{\r\n\t\t\t\twriter.println(questions.get(i).getQuestion() + \",\" + \r\n\t\t\t\t\t\t\t\t questi... | [
"0.6009858",
"0.5955486",
"0.5918252",
"0.58262706",
"0.57255685",
"0.5579382",
"0.5511102",
"0.54590917",
"0.5456363",
"0.5442664",
"0.54252726",
"0.5391373",
"0.5390013",
"0.537993",
"0.5352265",
"0.533418",
"0.53340614",
"0.5331565",
"0.53236145",
"0.5312224",
"0.5286663",... | 0.72023946 | 0 |
This is optionnal => use it if needed | @Override
public void onDestroy() {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void perish() {\n \n }",
"private stendhal() {\n\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"protected boolean func_70814_o() { return true; }",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Overrid... | [
"0.6257419",
"0.6250401",
"0.60910285",
"0.5909043",
"0.5902752",
"0.58492315",
"0.584015",
"0.58278745",
"0.5762241",
"0.5741113",
"0.5741113",
"0.5741113",
"0.5741113",
"0.5741113",
"0.5741113",
"0.5708236",
"0.5694986",
"0.5694986",
"0.5680886",
"0.5674457",
"0.56611377",
... | 0.0 | -1 |
set the daemon options; | public static void setDaemonOptions(OptionSet daemonOptions) {
LocalJVMTestBase.daemonOptions = daemonOptions;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setDaemonOptions(String[] args) {\n OptionSet opts=new OptionSet(args);\n setDaemonOptions(opts);\n }",
"public abstract void setOptions(String[] options) throws Exception;",
"private void setOptions() {\n cliOptions = new Options();\n cliOptions.addOption(Option.buil... | [
"0.80239475",
"0.64442897",
"0.6350003",
"0.61539686",
"0.6150641",
"0.6044336",
"0.60254693",
"0.5919943",
"0.5800024",
"0.578331",
"0.5687531",
"0.5648104",
"0.5636906",
"0.562228",
"0.5620699",
"0.5559356",
"0.5551405",
"0.55022943",
"0.54862297",
"0.54783905",
"0.54781777... | 0.75236243 | 1 |
set the daemon options from a string array | public void setDaemonOptions(String[] args) {
OptionSet opts=new OptionSet(args);
setDaemonOptions(opts);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public abstract void setOptions(String[] options) throws Exception;",
"public void setValue(String... values) throws DeviceOptionException;",
"void\t\tsetCommandOptions(String command, Strings options);",
"public static void setDaemonOptions(OptionSet daemonOptions) {\n LocalJVMTestBase.daemonOptions ... | [
"0.69223773",
"0.6245676",
"0.61639",
"0.6128444",
"0.6023063",
"0.6018451",
"0.599149",
"0.57868165",
"0.5762404",
"0.57202405",
"0.56816626",
"0.5634921",
"0.55995095",
"0.55835265",
"0.54116297",
"0.54115987",
"0.5410725",
"0.54018945",
"0.5395864",
"0.5377543",
"0.5365927... | 0.7210991 | 0 |
start a local daemon if the options request it | protected void setUp() throws Exception {
super.setUp();
TestHelper.demandStartDaemon(daemonOptions);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void startLocalServer() {\n \t boolean exists = (new File(addeMcservl)).exists();\n \t if (exists) {\n \t // Create and start the thread if there isn't already one running\n\t \tif (thread != null) {\n \t \t\tthread = new AddeThread();\n \t \t\tthread.start();\n \t\t System.out.... | [
"0.6694691",
"0.6278429",
"0.627379",
"0.61471796",
"0.6122141",
"0.6080401",
"0.6005772",
"0.5806892",
"0.5621672",
"0.5553031",
"0.5523783",
"0.5520301",
"0.54869205",
"0.5456049",
"0.54483134",
"0.5424448",
"0.5418488",
"0.54178286",
"0.54156137",
"0.5407827",
"0.53853446"... | 0.0 | -1 |
writing total namenodes first | @Override
public void write(DataOutput out) throws IOException {
out.writeInt(namenodes.size());
for(long nn : namenodes.keySet()) {
out.writeLong(nn);
String hostname = namenodes.get(nn).getAddress().getHostAddress()+":"+namenodes.get(nn).getPort();
Text.writeString(out,hostname);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void finalizeNam()\n {\n for(int tileY=0; tileY<30; tileY++)\n {\n for(int tileX=0; tileX<32; tileX++)\n {\n try\n {\n outputNAMstream.write(allTiles[tileX][tileY]);\n }catch(IOException e){}\n ... | [
"0.6372785",
"0.61490107",
"0.60499007",
"0.6003028",
"0.56050694",
"0.5568905",
"0.5557992",
"0.5536736",
"0.55283165",
"0.55234635",
"0.5419408",
"0.53721017",
"0.536738",
"0.53662455",
"0.53309405",
"0.5302562",
"0.52996325",
"0.52770764",
"0.52594894",
"0.52587885",
"0.52... | 0.5187828 | 28 |
/ renamed from: bav | public n baw() {
return this.ewZ;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void mo2508a(bxb bxb);",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void bbb() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"void mo46242a(bmc bmc);",
"void mo41086b();",
"void mo122... | [
"0.6134686",
"0.60811144",
"0.60811144",
"0.59563166",
"0.56390345",
"0.56129754",
"0.5600096",
"0.5556723",
"0.5535684",
"0.5522609",
"0.55217683",
"0.5518766",
"0.5484248",
"0.5480209",
"0.54591084",
"0.5447186",
"0.54447675",
"0.54347676",
"0.5429678",
"0.5412309",
"0.5408... | 0.0 | -1 |
TODO This function is an abomination and needs fixed. | public String getCustomerNamePreviewAsString() {
/* Test and then remove this */
// ArrayList<ServiceItem> serviceItemsArray = new
// ArrayList<>(this.serviceItems);
String customerNames = "";
int count = 0;
for (ServiceItem serviceItem : serviceItems) {
if (count == 0) {
customerNames += serviceItem.getServiceDescription();
}
if (count == 1) {
customerNames += ", " + serviceItem.getServiceDescription();
}
if (count == 2) {
customerNames += " ... plus " + (Math.abs(serviceItems.size() - 2)) + " more";
}
count++;
}
return customerNames;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void func_104112_b() {\n \n }",
"protected boolean func_70814_o() { return true; }",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"public void method_4270() {}",
"private void strin() {\n\n\t}",
"private void poetries() {\n\n\t}",
"@Override\n public void peri... | [
"0.55658144",
"0.54395723",
"0.538161",
"0.53263706",
"0.5279153",
"0.5232965",
"0.5230694",
"0.51716185",
"0.51428497",
"0.51311505",
"0.5064413",
"0.50568914",
"0.50536263",
"0.50371873",
"0.5032493",
"0.49996823",
"0.49757403",
"0.49422202",
"0.492783",
"0.49109358",
"0.48... | 0.0 | -1 |
AMQP Integrator Service Interface. | public interface AMQPIntegratorService {
void queueMessage(MailStructure email);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public interface QxService {\n String transmission(String data, String appId, String sign);\n}",
"public interface PoolingQueueService {\n\n void setIMessageProcessor(final IMessageProcessor iMessageProcessor) throws PoolingQueueException;\n\n MessageMapper cconn(String serialNumber, String contentType,... | [
"0.63719547",
"0.63433087",
"0.6308749",
"0.5948743",
"0.593905",
"0.58657193",
"0.58657193",
"0.5810896",
"0.57314646",
"0.5725554",
"0.5724929",
"0.5712706",
"0.5711805",
"0.5696315",
"0.5683895",
"0.5664071",
"0.5663842",
"0.5633924",
"0.56299686",
"0.5619024",
"0.5615273"... | 0.8030108 | 0 |
1 WelcomeService welcomeService = new WelcomeService(); | @RequestMapping("/")
public String doWelcome(Model model) {
List<String> welcomeMessage = welcomeService.getWelcomeMessage("RJuliart");
//2
model.addAttribute("myWelcomeMessage", welcomeMessage);
//3
return "welcomeNew";
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Service newService();",
"public interface HelloService {\n\n String greet (String userName);\n\n}",
"public interface HelloService {\n\n String hello(String userName);\n}",
"public void service() {\n\t}",
"public interface HelloService {\n String hello(String name);\n}",
"public interface HelloS... | [
"0.7273646",
"0.690445",
"0.68526834",
"0.6756251",
"0.67035556",
"0.6699704",
"0.66972333",
"0.6689683",
"0.66823274",
"0.6625546",
"0.6625546",
"0.6613252",
"0.65764034",
"0.65673",
"0.6526079",
"0.65049636",
"0.6498172",
"0.6486311",
"0.6432613",
"0.6415419",
"0.63560367",... | 0.0 | -1 |
Constructor of TurkeyMarket class. Print the creation message on terminal | public TurkeyMarket()
{
System.out.println("### Turkey Market is created. ###\n");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Market() {\n }",
"public TransferMarket() {\n }",
"public Supermarket() {\n }",
"public Supermarket() {\n }",
"public Trade() {\n\t}",
"public Supermarket()\n {\n }",
"protected Settlement() {\n // empty constructor\n }",
"public TradeData() {\r\n\r\n\t}",
"public... | [
"0.7252979",
"0.71070117",
"0.69525385",
"0.69508964",
"0.69328374",
"0.6896908",
"0.6422072",
"0.6337075",
"0.61698925",
"0.6090495",
"0.60532224",
"0.6040119",
"0.6014045",
"0.5986975",
"0.59815764",
"0.5958901",
"0.59544015",
"0.59271187",
"0.59236705",
"0.5919941",
"0.591... | 0.8938135 | 0 |
It asks for the desired phone model to be created. The phone is manufactured in Turkey factories in accordance with Turkey Market standards. | protected Phone createPhone(Models model)
{
Phone phone = null;
PhoneComponentFactory componentFactory = new TurkeyComponentFactory();
switch(model){
case MaximumEffort:
phone = new MaximumEffortModel(componentFactory);
phone.setName("Turkey - MaximumEffort Model");
break;
case IflasDeluxe:
phone = new IflasDeluxeModel(componentFactory);
phone.setName("Turkey - IflasDeluxe Model");
break;
case I_I_Aman_Iflas:
phone = new I_I_Aman_IflasModel(componentFactory);
phone.setName("Turkey - I-I-Aman-Iflas Model");
break;
}
System.out.println("-> Phone model is: " + phone.getName());
return phone;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static void addPhone() {\n\n Phone newPhone = new Phone(); // create new Phone object\n\n String make = Validate.readString(ASK_MAKE_PHONE); // Ask for and set the make\n\n newPhone.setMake(make); //... | [
"0.70649123",
"0.60430366",
"0.596616",
"0.5917362",
"0.583849",
"0.5805047",
"0.56693536",
"0.5588819",
"0.5558132",
"0.55456144",
"0.547299",
"0.544186",
"0.544186",
"0.544186",
"0.544186",
"0.544186",
"0.544186",
"0.544186",
"0.544186",
"0.544186",
"0.544186",
"0.544186"... | 0.7630692 | 0 |
this comes from any kind of trigger that connects to external sources (other than a database)... we collect it | @Override
public void update(Observable arg0, Object arg1) {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void trigger() {\n output.addNewEvent(\"Assinante \" + subscriberReconnect.getId() + \" deseja reconectar sua última ligação\");\n if (this.subscriberReconnect.isFree()) {\n takePhone();\n reestablishConnection();\n }\n }",
"protected void conne... | [
"0.543933",
"0.5394348",
"0.5376552",
"0.5363653",
"0.53266054",
"0.52349544",
"0.5222533",
"0.5214447",
"0.520939",
"0.5195405",
"0.5190581",
"0.51773334",
"0.5175311",
"0.5126705",
"0.5125243",
"0.5111067",
"0.5109836",
"0.510426",
"0.505483",
"0.50272226",
"0.50244224",
... | 0.0 | -1 |
4. Checking whether a string contains only digits | public static void main(String[] args) {
Q04.isDigits("12345");
Q04.isDigits("sd342");
Q04.isDigitsOpt1("567");
Q04.isDigitsOpt1("sdffs");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static boolean isNumber(String s) \r\n{ \r\n for (int i = 0; i < s.length(); i++) \r\n if (Character.isDigit(s.charAt(i)) \r\n == false) \r\n return false; \r\n\r\n return true; \r\n}",
"private boolean isNotNumeric(String s) {\n return s.matches(\"(.*)\\\\D(.*)\");\n }",... | [
"0.78079456",
"0.77816755",
"0.7667417",
"0.76544726",
"0.7594099",
"0.7561161",
"0.7514703",
"0.7513917",
"0.7483936",
"0.7465497",
"0.74536675",
"0.7420328",
"0.7405856",
"0.7375918",
"0.732893",
"0.73200923",
"0.727537",
"0.7237807",
"0.72209466",
"0.7214439",
"0.72091985"... | 0.0 | -1 |
Called when the activity is first created. | @Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
mButtonGetLocation = (Button) findViewById(R.id.btn_get_location);
mTextViewResult = (TextView) findViewById(R.id.tv_result_value);
mTextViewGPSStatus = (TextView) findViewById(R.id.tv_gps_status);
mMapView = (MapView) findViewById(R.id.map_view);
mMapController = mMapView.getController();
mMapController.setZoom(11);
setMapCenter(18.04, 59.35);
mDialog = new ProgressDialog(this);
mDialog.setOnCancelListener(new OnCancelListener() {
@Override
public void onCancel(DialogInterface dialog) {
mButtonGetLocation.setEnabled(true);
mLocationManager.removeUpdates(mLocationListener);
}
});
mLocationManager = (LocationManager) getSystemService(LOCATION_SERVICE);
mLocationListener = new LocationListener() {
@Override
public void onLocationChanged(Location location) {
// Called when a new location is found.
new PostDogShitTask().execute(location);
mLocationManager.removeUpdates(mLocationListener);
}
@Override
public void onStatusChanged(String provider, int status, Bundle extras) {
switch (status) {
case LocationProvider.AVAILABLE:
mTextViewGPSStatus.setText(mTextViewGPSStatus.getText().toString()
+ "GPS available again\n");
break;
case LocationProvider.OUT_OF_SERVICE:
mTextViewGPSStatus.setText(mTextViewGPSStatus.getText().toString()
+ "GPS out of service\n");
break;
case LocationProvider.TEMPORARILY_UNAVAILABLE:
mTextViewGPSStatus.setText(mTextViewGPSStatus.getText().toString()
+ "GPS temporarily unavailable\n");
break;
}
}
@Override
public void onProviderEnabled(String provider) {
Log.i(TAG, "Provider enabled");
}
@Override
public void onProviderDisabled(String provider) {
Log.i(TAG, "Provider disabled");
}
};
mapOverlays = mMapView.getOverlays();
Drawable drawable = this.getResources().getDrawable(R.drawable.poop);
itemizedoverlay = new HelloItemizedOverlay(drawable);
} | {
"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 |
Called when a new location is found. | @Override
public void onLocationChanged(Location location) {
new PostDogShitTask().execute(location);
mLocationManager.removeUpdates(mLocationListener);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public abstract void onLocationFound(@NonNull Location location);",
"void onNewLocationRecieved(LocationWrapper locationWrapper, LocationType type);",
"void onLocationFound(LatLng location);",
"void onLocationChanged( String newLocation ) {\n Uri uri = mUri;\n if (null != uri) {\n lo... | [
"0.70560163",
"0.688523",
"0.6790117",
"0.6705723",
"0.66008955",
"0.6555952",
"0.6498505",
"0.6479566",
"0.6414781",
"0.637474",
"0.637474",
"0.63430387",
"0.6311863",
"0.6226468",
"0.6206133",
"0.6204693",
"0.6192791",
"0.61876607",
"0.6185477",
"0.61665994",
"0.61613965",
... | 0.0 | -1 |
DogShit dogshit = new DogShit(location.getLongitude(), location.getLongitude(), new Date()); | protected void sendJsonWithGson(DogShit dogshit) {
Gson gson = new Gson();
// Convert java object to JSON format
String json = gson.toJson(dogshit);
sendJson(json);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Location() {\r\n \r\n }",
"public MyLocation() {}",
"public Population (Coordinate location){\n this.location = location;\n }",
"public Location() {\n }",
"Location createLocation();",
"Location createLocation();",
"Location createLocation();",
"public Location() {\n\t}"... | [
"0.66802484",
"0.65323144",
"0.653119",
"0.6529849",
"0.6512214",
"0.6512214",
"0.6512214",
"0.64017445",
"0.63662755",
"0.62096167",
"0.6153591",
"0.6081498",
"0.606564",
"0.60093224",
"0.59779507",
"0.5929438",
"0.59118646",
"0.58893335",
"0.58888894",
"0.5872626",
"0.58282... | 0.0 | -1 |
TODO Autogenerated method stub | @Override
protected boolean isRouteDisplayed() {
return false;
} | {
"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 |
main method, where the application starts | public static void main(String[] args){
//variable declarations with default values
Scanner input = new Scanner(System.in); //initialize Scanner for user input
int numberOfStudents = 0;
String Professor = "";
int randomNum = 0;
int minimum = 1; //set min for range for random numbers
int maximum = 16; //set max for range for random numbers
//Splash Screen
System.out.println( " @@@@@@@@@@ @@@ @@@ \n"
+ " @@@@@@@@@@@ @@@ @@@ \n"
+ " @@! @@! @@! @@! !@@ \n"
+ " !@! !@! !@! !@! @!! \n"
+ " @!! !!@ @!@ !@!@! \n"
+ " !@! ! !@! @!!! \n"
+ " !!: !!: !!: \n"
+ " :!: :!: :!: \n"
+ " ::: :: :: \n"
+ " : : : \n"
+ " @@@@@@@ @@@@@@@@ @@@@@@ @@@@@@@ @@@ @@@ @@@@@@@@ @@@@@@@ \n"
+ " @@@@@@@ @@@@@@@@ @@@@@@@@ @@@@@@@@ @@@ @@@ @@@@@@@@ @@@@@@@@ \n"
+ " @@! @@! @@! @@@ !@@ @@! @@@ @@! @@! @@@ \n"
+ " !@! !@! !@! @!@ !@! !@! @!@ !@! !@! @!@ \n"
+ " @!! @!!!:! @!@!@!@! !@! @!@!@!@! @!!!:! @!@!!@! \n"
+ " !!! !!!!!: !!!@!!!! !!! !!!@!!!! !!!!!: !!@!@! \n"
+ " !!: !!: !!: !!! :!! !!: !!! !!: !!: :!! \n"
+ " :!: :!: :!: !:! :!: :!: !:! :!: :!: !:! \n"
+ " :: :: :::: :: ::: ::: ::: :: ::: :: :::: :: ::: \n"
+ " : : :: :: : : : :: :: : : : : : :: :: : : : \n"
+ " @@@ @@@@@@ @@@@@@ \n"
+ " @@@ @@@@@@@ @@@@@@@@ \n"
+ " @@! !@@ @@! @@@ \n"
+ " !@! !@! !@! @!@ \n"
+ " !!@ !!@@!! @!@!@!@! \n"
+ " !!! !!@!!! !!!@!!!! \n"
+ " !!: !:! !!: !!! \n"
+ " :!: !:! :!: !:! \n"
+ " :: :::: :: :: ::: \n"
+ " : :: : : : : : \n"
+ " @@@@@@@@ @@@@@@ @@@@@@@@@@ @@@@@@@ @@@ @@@@@@@@ \n"
+ " @@@@@@@@ @@@@@@@@ @@@@@@@@@@@ @@@@@@@@ @@@ @@@@@@@@ \n"
+ " @@! @@! @@@ @@! @@! @@! @@! @@@ @@! @@! \n"
+ " !@! !@! @!@ !@! !@! !@! !@ @!@ !@! !@! \n"
+ " @!! @!@ !@! @!! !!@ @!@ @!@!@!@ !!@ @!!!:! \n"
+ " !!! !@! !!! !@! ! !@! !!!@!!!! !!! !!!!!: \n"
+ " !!: !!: !!! !!: !!: !!: !!! !!: !!: \n"
+ " :!: :!: !:! :!: :!: :!: !:! :!: :!: \n"
+ " :: :::: ::::: :: ::: :: :: :::: :: :: :::: \n"
+ " : :: : : : : : : : :: : :: : : :: :: \n");
System.out.println("\nIt happens during in our class when the sun eclipse happens... \n");
System.out.println("\nOur Professor starts talking weird gibberish words and all of the sudden her skin begins to change... \n");
System.out.println("\nHer skin starts to look grey and the veins are popping out as if it's pumping more blood... \n");
System.out.println("\nProfessor, is there something wrong? \n");
Professor = input.next();
System.out.println("\nWell " + Professor + " But I am kinda hungry!!!!");
System.out.println("How many students are here? Hmmm");
numberOfStudents = input.nextInt(); //get number of students from user and assign to numberOfStudents variable declared above
System.out.println("\nThere are ONLY " + numberOfStudents + " student(s) in class with you? Then I think");
//get a random number
randomNum = minimum + (int)(Math.random() * maximum);
if(randomNum >= 16){
System.out.println("\nI will let you all live for now!!");
}
else{
System.out.println("\nAll of you will be eaten by me. Rawr!!!...");
}
System.out.println( " @@@@@@@@ @@@@@@ @@@@@@@@@@ @@@@@@@@ \n"
+ " @@@@@@@@@ @@@@@@@@ @@@@@@@@@@@ @@@@@@@@ \n"
+ " !@@ @@! @@@ @@! @@! @@! @@! \n"
+ " !@! !@! @!@ !@! !@! !@! !@! \n"
+ " !@! @!@!@ @!@!@!@! @!! !!@ @!@ @!!!:! \n"
+ " !!! !!@!! !!!@!!!! !@! ! !@! !!!!!: \n"
+ " :!! !!: !!: !!! !!: !!: !!: \n"
+ " :!: !:: :!: !:! :!: :!: :!: \n"
+ " ::: :::: :: ::: ::: :: :: :::: \n"
+ " :: :: : : : : : : : :: :: \n"
+ " @@@@@@ @@@ @@@ @@@@@@@@ @@@@@@@ \n"
+ " @@@@@@@@ @@@ @@@ @@@@@@@@ @@@@@@@@ \n"
+ " @@! @@@ @@! @@@ @@! @@! @@@ \n"
+ " !@! @!@ !@! @!@ !@! !@! @!@ \n"
+ " @!@ !@! @!@ !@! @!!!:! @!@!!@! \n"
+ " !@! !!! !@! !!! !!!!!: !!@!@! \n"
+ " !!: !!! :!: !!: !!: !!: :!! \n"
+ " :!: !:! ::!!:! :!: :!: !:! \n"
+ " ::::: :: :::: :: :::: :: ::: \n"
+ " : : : : : :: :: : : : \n ");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void main() {\n \n }",
"public Main() {\r\n\t\tsuper();\r\n\t\tinitialize();\r\n\r\n\t}",
"public static void main()\n\t{\n\t}",
"public Main() {\n\t\tsuper();\n\t}",
"public Main() {\n \n \n }",
"public static void main(String[] args) {\n startApplication(... | [
"0.779591",
"0.76861465",
"0.74883914",
"0.7433349",
"0.74241626",
"0.74239296",
"0.7420126",
"0.7416425",
"0.7401366",
"0.73889",
"0.7383008",
"0.737438",
"0.7368402",
"0.7366931",
"0.7349209",
"0.7319444",
"0.7318234",
"0.7309689",
"0.7302061",
"0.72944605",
"0.7293373",
... | 0.0 | -1 |
private static String DELETE_DRIVER_BY_ID_FROM_CAR_DRIVER = "DELETE FROM car_driver WHERE driver_id=?"; | public void deleteFromCarDriverByCarId(int id) {
Transaction transaction = null;
try (Session session = HibernateUtil.getSessionFactory().openSession()) {
transaction = session.beginTransaction();
Query query = session.createQuery("from car");
List<Car> cars = query.getResultList();
System.out.println(cars);
// query.executeUpdate();
transaction.commit();
} catch (Exception e) {
if (transaction != null) {
transaction.rollback();
}
e.printStackTrace();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void deleteVehicle(String vehicleID);",
"int deleteByPrimaryKey(String idTipoComprobante) throws SQLException;",
"public static String delete(int id){\n String query=\"UPDATE empleado SET activo=0 WHERE idEmpleado=\"+id;\n return query;\n}",
"int deleteByExample(CTipoComprobanteExample example) throws ... | [
"0.7085991",
"0.7082926",
"0.70192605",
"0.6960533",
"0.6916613",
"0.6880378",
"0.6873181",
"0.68518084",
"0.68084925",
"0.6793949",
"0.67846334",
"0.67821074",
"0.6772308",
"0.6766798",
"0.6756041",
"0.67519015",
"0.6731466",
"0.6723709",
"0.6722341",
"0.6678549",
"0.6678344... | 0.67424494 | 16 |
Constroi uma cidade com os dados passados, usado para buscar a cidade no HashTable. | public Cidade(String nome){
super(0, nome, 0.0, 0.0);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"String getCidade();",
"public DAOImpl(String baseDatos, String usuario, String clave){\n this.baseDatos = baseDatos;\n this.usuario = usuario;\n this.clave = clave;\n }",
"public void iniciarTabuleiro(JogoTrilha tabuleiro){\n String corInicial = \"vazia\";\n \n... | [
"0.5825225",
"0.5671017",
"0.5615092",
"0.55655205",
"0.5504613",
"0.54623634",
"0.54145664",
"0.5381354",
"0.53805315",
"0.53782946",
"0.5372277",
"0.53701216",
"0.5369958",
"0.536517",
"0.5350829",
"0.5348158",
"0.53471833",
"0.5344116",
"0.53367573",
"0.53266054",
"0.53212... | 0.5345927 | 17 |
TODO Autogenerated method stub | public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
n = sc.nextInt();
for(int i = 0; i < n; i++) {
mg[i] = sc.nextInt();
sum += mg[i];
}
if(sum%3 != 0) {
System.out.println("no");
}else {
dfs(0, 0, 0);
if(f) {
System.out.println("yes");
}else {
System.out.println("no");
}
}
} | {
"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 |
Test of add method, of class Arithmetic. | @Test
public void testAdd() {
System.out.println("testing add");
Arithmetic arithmetic = new Arithmetic();
assertEquals("unexpected result of addition", 8, arithmetic.add(3,5));
assertEquals("unexpected result of addition", 6, arithmetic.add(0,6));
assertEquals("unexpected result of addition", -14, arithmetic.add(0,-14));
assertEquals("unexpected result of addition", 0, arithmetic.add(-5,5));
assertEquals("unexpected result of addition", -6, arithmetic.add(-12,6));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n public void addTest() {\n double expected = 5.5;\n double actual = calculatorApp.add();\n Assert.assertThat(\"Addition function in CalculatorApp: Expected != Real\", actual, is(expected));\n }",
"@Test(timeout = 50)\r\n\t// The below method is a test method\r\n\tpublic void tes... | [
"0.81502485",
"0.78253525",
"0.7812283",
"0.7720771",
"0.7681865",
"0.76385236",
"0.76028204",
"0.7579986",
"0.75193715",
"0.75192636",
"0.7515495",
"0.7478825",
"0.73598623",
"0.73342115",
"0.7291541",
"0.7271491",
"0.7242297",
"0.71539605",
"0.713983",
"0.7113065",
"0.70553... | 0.8781308 | 0 |
Creates a default IntelliJ class finder, a wrapper around JavaPsiFacade | public IntelliJClassFinderAdapter(Project project) {
javaPsiFacade = JavaPsiFacade.getInstance(project);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static PoiFinderInterface createPoiFinder(){\n\t\tif (Config.default_poi_api.equals(OSM)){\n\t\t\t//TODO: implement\n\t\t\tDebugger.println(\"GeoFactory - unknown PoiFinderInterface: \" + Config.default_poi_api, 1);\n\t\t\treturn null;\n\t\t}else if (Config.default_poi_api.equals(GOOGLE)){\n\t\t\treturn new... | [
"0.5654013",
"0.5598341",
"0.5508647",
"0.5359717",
"0.5075174",
"0.5052432",
"0.492068",
"0.49137285",
"0.48802093",
"0.4859431",
"0.48416877",
"0.48381352",
"0.48375207",
"0.48364148",
"0.48229763",
"0.48044825",
"0.47911656",
"0.47841924",
"0.47752804",
"0.47281784",
"0.47... | 0.7081934 | 0 |
Initialization of the cache with the already injected property | @PostConstruct
public void initCache() {
cache = Collections.synchronizedMap(new HashMap<>(cacheCapacity, 1));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void init() {\n\t\tif (cache != null) {\n\t\t\tcache.dispose();\n\t\t\tcache = null;\n\t\t}\n\t\tcache = cacheFactory.create(CacheFactoryDirective.NoDCE, \"test\");\n\t}",
"@PostConstruct\n\tpublic void init() {\n\t // TODO create cacheTreeMgr using HashMap or EhCache\n cacheTree = new CacheTree... | [
"0.7225579",
"0.6941024",
"0.6926059",
"0.68589276",
"0.6838643",
"0.68008536",
"0.67392576",
"0.63715005",
"0.63470995",
"0.633573",
"0.633069",
"0.62693834",
"0.6255838",
"0.6254392",
"0.6217354",
"0.6191877",
"0.6191877",
"0.6186116",
"0.6152466",
"0.6104159",
"0.60850126"... | 0.7439252 | 0 |
Create a new topic message from a response protobuf. | static TopicMessage ofSingle(ConsensusTopicResponse response) {
return new TopicMessage(
InstantConverter.fromProtobuf(response.getConsensusTimestamp()),
response.getMessage().toByteArray(),
response.getRunningHash().toByteArray(),
response.getSequenceNumber(),
new TopicMessageChunk[]{new TopicMessageChunk(response)},
response.hasChunkInfo() && response.getChunkInfo().hasInitialTransactionID() ?
TransactionId.fromProtobuf(response.getChunkInfo().getInitialTransactionID()) :
null
);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"static TopicMessage ofMany(List<ConsensusTopicResponse> responses) {\n // response should be in the order of oldest to newest (not chunk order)\n var chunks = new TopicMessageChunk[responses.size()];\n @Var TransactionId transactionId = null;\n var contents = new ByteString[responses.si... | [
"0.6548548",
"0.57043886",
"0.5600524",
"0.5558872",
"0.5514521",
"0.5472867",
"0.5469134",
"0.54375327",
"0.54289126",
"0.5367997",
"0.5325511",
"0.53215885",
"0.5315443",
"0.5290682",
"0.52545375",
"0.5223521",
"0.51909703",
"0.518345",
"0.5078026",
"0.5069692",
"0.50621337... | 0.7193888 | 0 |
Create a new topic message from a list of response's protobuf. | static TopicMessage ofMany(List<ConsensusTopicResponse> responses) {
// response should be in the order of oldest to newest (not chunk order)
var chunks = new TopicMessageChunk[responses.size()];
@Var TransactionId transactionId = null;
var contents = new ByteString[responses.size()];
@Var long totalSize = 0;
for (ConsensusTopicResponse r : responses) {
if (transactionId == null && r.getChunkInfo().hasInitialTransactionID()) {
transactionId = TransactionId.fromProtobuf(r.getChunkInfo().getInitialTransactionID());
}
int index = r.getChunkInfo().getNumber() - 1;
chunks[index] = new TopicMessageChunk(r);
contents[index] = r.getMessage();
totalSize += r.getMessage().size();
}
var wholeMessage = ByteBuffer.allocate((int) totalSize);
for (var content : contents) {
wholeMessage.put(content.asReadOnlyByteBuffer());
}
var lastReceived = responses.get(responses.size() - 1);
return new TopicMessage(
InstantConverter.fromProtobuf(lastReceived.getConsensusTimestamp()),
wholeMessage.array(),
lastReceived.getRunningHash().toByteArray(),
lastReceived.getSequenceNumber(),
chunks,
transactionId
);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"static TopicMessage ofSingle(ConsensusTopicResponse response) {\n return new TopicMessage(\n InstantConverter.fromProtobuf(response.getConsensusTimestamp()),\n response.getMessage().toByteArray(),\n response.getRunningHash().toByteArray(),\n response.getSequenceNu... | [
"0.622616",
"0.5830583",
"0.5403714",
"0.54010147",
"0.539158",
"0.52839464",
"0.520733",
"0.51642275",
"0.51263076",
"0.5064647",
"0.50305384",
"0.49972862",
"0.49944583",
"0.49492228",
"0.48970628",
"0.48793292",
"0.48574772",
"0.47781295",
"0.47779986",
"0.47495326",
"0.47... | 0.7858219 | 0 |
Initializes the categories found in each course | public Course() {
term = "";
subject = "";
number = 0;
newRoom = 0;
oldRoomLetter = "";
section = new String();
crossList = new String();
title = new String();
faculty = new String();
building = new String();
room = "";
startDate = "";
dayTime = new String();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void initialiseCategories() {\n\t\t_nzCategories = BashCmdUtil.bashCmdHasOutput(\"ls categories/nz\");\n\t\t_intCategories = BashCmdUtil.bashCmdHasOutput(\"ls categories/international\");\n\t}",
"private void loadCategories() {\n\t\tcategoryService.getAllCategories(new CustomResponseListener<Category[]>(... | [
"0.71674806",
"0.6448229",
"0.6413358",
"0.6360988",
"0.63484037",
"0.63084257",
"0.62436783",
"0.6008705",
"0.59217614",
"0.5879831",
"0.5876449",
"0.5799685",
"0.57907367",
"0.57642704",
"0.569799",
"0.5653823",
"0.5645815",
"0.5643675",
"0.56427544",
"0.56408197",
"0.56003... | 0.0 | -1 |
Extracts data from the file given and assigns each course with specific details for each category | public void extractData(Scanner in) {
while (in.hasNext()) {
in.useDelimiter(",(?=([^\"]*\"[^\"]*\")*[^\"]*$)");
term = (in.next());
subject = (in.next());
number = Integer.parseInt(in.next());
section = (in.next());
crossList = (in.next());
title = (in.next());
if (title.startsWith("\"")) {
String newTitle = title.substring(1, title.length() - 1);
title = "";
title = newTitle;
}
faculty = (in.next());
building = (in.next());
room = (in.next()); // Integer.parseInt(in.next());
if (Character.isLetter(room.charAt(room.length() - 1))) {
oldRoomLetter = room.substring(room.length() - 1);
String newRoomString = room.substring(0, room.length() - 1);
newRoom = Integer.parseInt(newRoomString);
} else {
newRoom = Integer.parseInt(room);
}
startDate = (in.next());
dayTime = (in.next());
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"static void loadCourse() {\n\t\tScanner inputStreamC = null; // create object variable for Course\n\n\t\ttry { // create Scanner object & assign to variable\n\t\t\tinputStreamC = new Scanner(new File(\"course.txt\"));\n\t\t\tinputStreamC.useDelimiter(\",\");\n\t\t} catch (FileNotFoundException e) {\n\t\t\tSystem.o... | [
"0.66011244",
"0.64689803",
"0.6372125",
"0.6167433",
"0.61516106",
"0.6092266",
"0.6059031",
"0.59871244",
"0.5754426",
"0.56894535",
"0.5645164",
"0.5630321",
"0.5526393",
"0.55175966",
"0.5488884",
"0.5482475",
"0.547952",
"0.53060967",
"0.52525806",
"0.5244616",
"0.521761... | 0.47649223 | 78 |
Extracts and returns the building in the present course | public String getBuilding() {
return building;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Building getBuilding();",
"public String getBuilding() {\n return building;\n }",
"public Building getBuilding() {\n return building;\n }",
"public static Building getBuilding(int index) {\n return buildings.get(index);\n }",
"public Rectangle getBuilding()\r\n {\r\n... | [
"0.65400976",
"0.61454904",
"0.5985249",
"0.57303023",
"0.56765014",
"0.5652952",
"0.5348631",
"0.52940756",
"0.5236657",
"0.5228283",
"0.5202876",
"0.5200103",
"0.5173082",
"0.5168342",
"0.515689",
"0.50970453",
"0.5080857",
"0.5062804",
"0.50407934",
"0.5029531",
"0.5029341... | 0.6183858 | 1 |
Extracts and returns the dayTime in the present course | public String getDayTime() {
return dayTime;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void getDateTime() {\n String todayDateTime = String.valueOf(Calendar.getInstance().getTime());\n\n // Calendar.getInstance().getTime() returns a long string of various data for today, split and access what we need\n String[] splitTime = todayDateTime.split(\" \");\n\n dayDate =... | [
"0.5849398",
"0.56810844",
"0.56810844",
"0.55421764",
"0.5536597",
"0.55191976",
"0.54998565",
"0.5499782",
"0.5437797",
"0.54242843",
"0.5386066",
"0.53514516",
"0.5351377",
"0.53260857",
"0.5321024",
"0.53162473",
"0.5306826",
"0.5306826",
"0.52406293",
"0.5236614",
"0.520... | 0.6221013 | 0 |
Extracts and returns the faculty in the present course while also temporally making each term uppercase to sort with | public String getFaculty() {
String tamperedFaculty = faculty.toUpperCase();
return tamperedFaculty;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void main(String[] args) {\n\n //challenge 1:\n\n List<String> topNames2015 = Arrays.asList(\n \"Amelia\",\n \"Olivia\",\n \"emily\",\n \"Isla\",\n \"Ava\",\n \"oliver\",\n \"Jack\",... | [
"0.584232",
"0.5703056",
"0.5483621",
"0.54574066",
"0.54136723",
"0.5283618",
"0.5275212",
"0.52220696",
"0.5165387",
"0.51370955",
"0.5132242",
"0.5131622",
"0.5110675",
"0.51022345",
"0.50527126",
"0.49895313",
"0.4978277",
"0.49630135",
"0.49383548",
"0.4935217",
"0.49300... | 0.60498655 | 0 |
Extracts and returns the room in the present course | public Integer getNewRoom() {
return newRoom;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Room getRoom();",
"Room getRoom();",
"public String getRoom() {\r\n return room;\r\n }",
"public java.lang.CharSequence getRoom() {\n return room;\n }",
"public String getRoom() {\n\t\treturn room;\n\t}",
"public java.lang.CharSequence getRoom() {\n return room;\n }",
"public Room... | [
"0.6495749",
"0.6495749",
"0.61217874",
"0.6055306",
"0.601802",
"0.59927773",
"0.59162813",
"0.59152573",
"0.58684576",
"0.5867129",
"0.5857174",
"0.5821256",
"0.57977444",
"0.57906324",
"0.5788869",
"0.57630175",
"0.575587",
"0.5747537",
"0.57136995",
"0.5673499",
"0.564682... | 0.0 | -1 |
Extracts and returns the room letter if present in the current course | public String getRoomLetter() {
return oldRoomLetter;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"java.lang.String getRoomName();",
"protected static String getRoomName() {\n System.out.println(\"Room Name?\");\n return keyboard.next();\n }",
"char getContactLetter();",
"public java.lang.CharSequence getRoom() {\n return room;\n }",
"java.lang.String getCourseName();",
"public ja... | [
"0.6456533",
"0.63957727",
"0.62535495",
"0.61948353",
"0.61587787",
"0.6120853",
"0.60260004",
"0.5976132",
"0.5937801",
"0.5906435",
"0.5866607",
"0.5851969",
"0.5846059",
"0.579494",
"0.57270366",
"0.5716335",
"0.5708151",
"0.5706463",
"0.56777185",
"0.56404656",
"0.562478... | 0.66992897 | 0 |
Extracts and returns the subject in the present course | public String getSubject() {
return subject;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public List<Subject> getsixthsubj(String course) {\n\t\treturn sub_dao.getsixthsubj(course);\r\n\t}",
"public List<Subject> getsecondsubj(String course) {\n\t\treturn sub_dao.getsecondsubj(course);\r\n\t}",
"public List<Subject> getfourthsubj(String course) {\n\t\treturn sub_dao.getfourthsubj(course);\r\n\t}",... | [
"0.7103285",
"0.70461166",
"0.7033233",
"0.6929501",
"0.69242096",
"0.6905465",
"0.6865939",
"0.6865939",
"0.6865939",
"0.6805002",
"0.6721043",
"0.6697837",
"0.6651931",
"0.6510134",
"0.6510134",
"0.6466144",
"0.6431218",
"0.64159477",
"0.6410331",
"0.6301353",
"0.6301156",
... | 0.61230665 | 40 |
Extracts and returns the title in the present course | public String getTitle() {
return title;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getCourseTitle() {\n return courseTitle;\n }",
"java.lang.String getCourseName();",
"java.lang.String getTitle();",
"java.lang.String getTitle();",
"java.lang.String getTitle();",
"java.lang.String getTitle();",
"java.lang.String getTitle();",
"@Override\n\tpublic java.lang.St... | [
"0.7145607",
"0.6853337",
"0.6649759",
"0.6649759",
"0.6649759",
"0.6649759",
"0.6649759",
"0.6446446",
"0.63869077",
"0.63869077",
"0.63869077",
"0.63869077",
"0.63869077",
"0.63869077",
"0.63869077",
"0.63869077",
"0.63869077",
"0.63869077",
"0.63869077",
"0.63869077",
"0.6... | 0.0 | -1 |
Overrides the toString method to customize towards each course printed | @Override
public String toString() {
String newSubject = subject.trim();
String newTitle = title.trim();
String newBuilding = building.trim();
String newDayTime = dayTime.trim();
String newFaculty = faculty.trim();
if (subject.length() > 5) {
newSubject = subject.substring(0, 29);
}
if (title.length() > 33) {
newTitle = title.substring(0, 29);
}
if (dayTime.length() > 34) {
newDayTime = dayTime.substring(0, 20);
}
if (building.length() > 6) {
newBuilding = building.substring(0, 29);
}
if (faculty.length() > 20) {
newFaculty = faculty.substring(0, 16);
}
return String.format("%-11s%-38s%-34s%-15s%-10s%-25s", "Sub: " + newSubject,
"Title: " + newTitle, " Day/Time: " + newDayTime, " Bldg: " + newBuilding,
"Rm: " + newRoom + oldRoomLetter, " Fac: " + newFaculty);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String toString() {\r\n return COURSE_ID + \"-\" + COURSE_NAME;\r\n }",
"@Override\n public String toString() {\n String str = \"\";\n \n str += String.format(\"%-20s: %s\\n\", \"Name\", name);\n str += String.format(\"%-20s: %s\\n\", \"Gender\", gender);\n str +=... | [
"0.7922472",
"0.7918088",
"0.7846163",
"0.7756148",
"0.77476597",
"0.7663338",
"0.7630664",
"0.7600177",
"0.75326693",
"0.749573",
"0.74809974",
"0.74132925",
"0.74098456",
"0.73801714",
"0.7350655",
"0.732605",
"0.71309066",
"0.6886574",
"0.68749243",
"0.6855969",
"0.6847142... | 0.6665648 | 35 |
Create an excel sheet | void createWorkSheet() {
wb = new HSSFWorkbook();
for (int SheetNumber = 0; SheetNumber < keywords.length - 1; SheetNumber++) {
sheet[SheetNumber] = wb.createSheet(keywords[SheetNumber]);
// Create row at index zero ( Top Row)
HSSFRow row = sheet[SheetNumber].createRow((short) 0);
String[] headers = {"Title", "Category", "Developer", "Description", "Release Date", "currentVersionReleaseDate", "Version", "Website", "Rating Counts", "Average User Rating", "Average User Rating For Current Version", "Market URL", "Size"};
for (int i = 0; i <= 12; i++) {
HSSFCell cell = row.createCell((short) i);
cell.setCellType(HSSFCell.CELL_TYPE_STRING);
cell.setCellValue(headers[i]);
excelFileCreated = false;
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void exportXLS() {\n\t\t// Create a Workbook\n\t\tWorkbook workbook = new HSSFWorkbook(); // new HSSFWorkbook() for\n\t\t\t\t\t\t\t\t\t\t\t\t// generating `.xls` file\n\n\t\t/*\n\t\t * CreationHelper helps us create instances of various things like DataFormat,\n\t\t * Hyperlink, RichTextString etc, in a for... | [
"0.7430604",
"0.7291646",
"0.7015456",
"0.6966836",
"0.69354105",
"0.69255817",
"0.6864426",
"0.6858721",
"0.684454",
"0.6796659",
"0.67920905",
"0.67841834",
"0.6778517",
"0.67781144",
"0.67143846",
"0.67058176",
"0.67011034",
"0.6698099",
"0.6670781",
"0.666562",
"0.6660577... | 0.79925835 | 0 |
The name of the file to write. | void createNewScriptFile(String scriptContent) {
String fileName = prop.getProperty("FileName");
try {
// Assume default encoding.
FileWriter fileWriter = new FileWriter(fileName);
// Always wrap FileWriter in BufferedWriter.
BufferedWriter bufferedWriter = new BufferedWriter(fileWriter);
// Note that write() does not automatically append a newline character.
bufferedWriter.write(scriptContent);
// Always close files.
bufferedWriter.close();
} catch (IOException ex) {
System.out.println("Error writing to file '" + fileName + "'");
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private String getFileName()\r\n {\r\n DateFormat format = new SimpleDateFormat(\"yyyy-MM-dd__HH_mm\");\r\n \r\n String ret = new String();\r\n ret += preferences.getPreference(UserPreferences.SAVE_LOCATION_PROP);\r\n ret += format.format(new Date());\r\n \r\n String notationStr = notation.ge... | [
"0.7114747",
"0.701735",
"0.701735",
"0.701735",
"0.701735",
"0.701735",
"0.701735",
"0.701735",
"0.701735",
"0.701735",
"0.68729186",
"0.6872228",
"0.67764205",
"0.6760545",
"0.67358017",
"0.67231303",
"0.67053246",
"0.6678722",
"0.66750383",
"0.66750383",
"0.66750383",
"0... | 0.0 | -1 |
mPointSize = DataSupport.where("remark 1 AND nmpreportdata_id = " + mNmpReportData.getId()).count(NmpReportPoint.class) | private int findLastIndex(int id) {
NmpReportPoint point = DataSupport.where("remark <> 1 AND nmpreportdata_id = " + id).findLast(NmpReportPoint.class);
if (point != null) {
int pointIndex = point.getPointIndex();
return Math.abs(pointIndex % 10000);
}
return 0;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Query(\"SELECT count(*) FROM DemoEntity d\")\r\n\tpublic Integer countDemo();",
"int findAllCount() ;",
"int getDataCount();",
"int getDataCount();",
"int getDataCount();",
"int getDataCount();",
"int getDataCount();",
"long countByExample(NjProductTaticsRelationExample example);",
"public int get... | [
"0.6493719",
"0.6180649",
"0.6159003",
"0.6159003",
"0.6159003",
"0.6159003",
"0.6159003",
"0.61453474",
"0.6111633",
"0.61113757",
"0.60873455",
"0.6038212",
"0.6033381",
"0.602903",
"0.60179675",
"0.6017085",
"0.59793365",
"0.5976143",
"0.5976143",
"0.5964839",
"0.5962967",... | 0.0 | -1 |
Classes must implement these method(s): | protected abstract Fragment createFragment(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\n public void perish() {\n \n }",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n\tpublic void anular() {\n\... | [
"0.7098399",
"0.6987606",
"0.6871016",
"0.68623275",
"0.6835805",
"0.67316103",
"0.6653224",
"0.6653224",
"0.6611416",
"0.65885556",
"0.65885556",
"0.6580156",
"0.65614754",
"0.64713836",
"0.6459139",
"0.643551",
"0.64269143",
"0.64269143",
"0.6423086",
"0.64204586",
"0.64193... | 0.0 | -1 |
/ if (this.getClass().equals(MainScreenActivity.class)) super.onBackPressed(); | @Override
public void onBackPressed() {
Intent homeIntent = new Intent(Intent.ACTION_MAIN);
homeIntent.addCategory( Intent.CATEGORY_HOME );
homeIntent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
startActivity(homeIntent);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void onActivityBackPressed() {\n super.onBackPressed();\n }",
"public void onBackPressed()\n {\n Log.v(TAG, \"onBackPressed......Called\");\n main.onBackPressed();\n }",
"@Override\n // Detect when the back button is pressed\n public void onBackPressed() {\n\n ... | [
"0.848035",
"0.8282749",
"0.82394254",
"0.8186001",
"0.8183525",
"0.8183525",
"0.8183525",
"0.8183525",
"0.8183525",
"0.8183525",
"0.8183525",
"0.81729215",
"0.81637037",
"0.81633645",
"0.8136785",
"0.81349325",
"0.8134672",
"0.81341255",
"0.81241864",
"0.81241864",
"0.812418... | 0.0 | -1 |
Initialize array demo data string [ ]. | public String[] initializeArrayDemoData(String eventType) {
if (eventType == EventNameConstants.OFFER_EVENT){
// richToken
inputArray = new String[6];
inputArray[0] = "1"; // sessionID
inputArray[1] = "6"; // userID
inputArray[2] = "HighNet_project"; // context
inputArray[3] = "milestone"; // keyword
inputArray[4] = "tasks"; // keyword
inputArray[5] = "leading"; //keyword
} if (eventType == EventNameConstants.USER_INFORMATION_EVENT) {
inputArray = new String[2];
inputArray[0] = "793dnj"; // sessionID
inputArray[1] = "6"; // 6 userID
} if (eventType == EventNameConstants.DOCUMENT_INFORMATION_EVENT) {
inputArray = new String[2];
inputArray[0] = "793dnj"; // sessionID
inputArray[1] = "1jQFZmcS__-CtScjqd3g5KKM8xepPnMSqaepy2ag2jNc"; // dokumentID
//inputArray[1] = "1jQFZmcS__-abakhbfeuqh'Pidei#peahd"; //gibts nicht
} if (eventType == EventNameConstants.PROJECT_INFORMATION_EVENT) {
inputArray = new String[2];
inputArray[0] = "793dnj"; // sessionID
inputArray[1] = "1"; // projectID
} if (eventType == EventNameConstants.DEPARTMENT_INFORMATION_EVENT) {
inputArray = new String[2];
inputArray[0] = "793dnj"; // sessionID
inputArray[1] = "IT"; // departmentName
} if (eventType == EventNameConstants.ALL_PROJECTS_EVENT
|| eventType == EventNameConstants.ALL_PROJECTROLES_EVENT
|| eventType == EventNameConstants.ALL_DEPARTMENTS_EVENT
|| eventType == EventNameConstants.ALL_COMPANIES_EVENT) {
inputArray = new String[1];
inputArray[0] = "793dnj"; // sessionID
} if (eventType == EventNameConstants.ADDITIONAL_USER_INFORMATION_EVENT) {
inputArray = new String[8];
inputArray[0] = "793dnj"; // sessionID
inputArray[1] = "873267"; // PersonID
inputArray[2] = "Peng"; // Vorname
inputArray[3] = "Scheng"; // Nachname
inputArray[4] = "peng.scheng@starcars.com"; // Email
inputArray[5] = "IT"; // Abteilung
inputArray[6] = "HighNet"; // Projekt
inputArray[7] = "Entwickler"; // Projektrolle
} if (eventType == EventNameConstants.DOCUMENT_CONTEXT_EVENT) {
inputArray = new String[2];
inputArray[0] = "Projektplanung_HighNet"; // DokumentName
inputArray[1] = "HighNet_Project"; // DokumentKontext
} if (eventType == EventNameConstants.DOCUMENT_CALL_EVENT) {
inputArray = new String[4];
inputArray[0] = "793dnj"; // sessionID
inputArray[1] = "Kristi"; // PersonVorname
inputArray[2] = "Misti"; // PersonNachname
inputArray[3] = "Projektplanung_HighNet"; // DokumentName
} if (eventType == EventNameConstants.LEARN_EVENT) {
inputArray = new String[3];
inputArray[0] = "Kristi"; // PersonVorname
inputArray[1] = "Misti"; // PersonNachname
inputArray[2] = "Projektplanung_HighNet"; // DokumentName
}
return inputArray;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void initData() {\n }",
"private void initData() {\n\t}",
"private void initData() {\n\n }",
"public void initData() {\n }",
"public void initData() {\n }",
"private void initializeArrays(){\n arrayOfBadges = new String[6];\n stateArray = new int[6];\n for (int i ... | [
"0.6435031",
"0.64307725",
"0.6372093",
"0.63488466",
"0.63488466",
"0.63393134",
"0.6285476",
"0.6228125",
"0.61777276",
"0.61687165",
"0.61644965",
"0.61579674",
"0.60826796",
"0.6068241",
"0.60580283",
"0.60475445",
"0.603084",
"0.6027085",
"0.60262144",
"0.60262144",
"0.6... | 0.59853566 | 28 |
UserModel userModel = new UserModel(); userModel.setId(1); userModel.setName("zhangsan"); | @ApiOperation(value="获取用户列表", notes="获取所有用户列表")
@PostMapping(value="/getUserList")
public List<UserModel> getUserList(@RequestBody UserModel model){
List<UserModel> list = new ArrayList<>();
list.add(model);
return list;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"UserModel()\n {/*Used for Gson*/}",
"public UserModel(){\n ID = 0; // The user's ID, largely used in conjuction with a database\n firstName = \"fname\"; //User's first name\n lastName = \"lname\"; // User's last name\n password= \"pass\"; ///User password\n username = \"test... | [
"0.79371655",
"0.7634105",
"0.754411",
"0.74475545",
"0.74307674",
"0.73341167",
"0.73154384",
"0.7232365",
"0.71797585",
"0.7004338",
"0.7004338",
"0.7004338",
"0.7004338",
"0.7004338",
"0.7004338",
"0.7004338",
"0.68159807",
"0.6683534",
"0.6640266",
"0.6623653",
"0.6606255... | 0.6206934 | 43 |
TODO Autogenerated method stub | @Override
public void dispose() {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.608016... | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public void init(IWorkbenchWindow window) {
this.window = window;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.608016... | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public void run(IAction action) {
try {
window.getActivePage().showView(JFreeChartView.ID);
} catch (PartInitException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.608016... | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public void selectionChanged(IAction action, ISelection selection) {
} | {
"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 |
springdata library EntityManager JdbcTemplate | public Author findById(int id) {
return HibernateSessionFactoryUtil.getSessionFactory().openSession().get(Author.class, id);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Bean\n public JdbcTemplate jdbcTemplate() {\n return new JdbcTemplate(dataSource());\n }",
"public DressDaoJdbc(NamedParameterJdbcTemplate jdbcTemplate) {\n this.jdbcTemplate = jdbcTemplate;\n }",
"@Repository\npublic interface JobMapper {\n @Select(\"SELECT * FROM \" + JOBTABLE + \"... | [
"0.6494833",
"0.6244716",
"0.6166598",
"0.6078126",
"0.6033804",
"0.59546274",
"0.5881454",
"0.5826496",
"0.5808785",
"0.58084816",
"0.5805078",
"0.5764055",
"0.57629454",
"0.57599247",
"0.5746321",
"0.57294565",
"0.57195956",
"0.5712393",
"0.56826997",
"0.5633556",
"0.560341... | 0.0 | -1 |
Creates a new instance of NamespaceHelper using an existing document. The document is not affected. If the prefix is null, the default namespace is used. | public NamespaceHelper(String _namespaceUri, String _prefix, Document _document)
{
Validate.notNull(_namespaceUri);
Validate.notNull(_document);
this.namespaceUri = _namespaceUri;
this.prefix = _prefix;
this.document = _document;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public NamespaceHelper(String _namespaceUri, String _prefix, String localName)\n throws ParserConfigurationException {\n this(_namespaceUri, _prefix, DocumentHelper.createDocument(_namespaceUri, getQualifiedName(\n _prefix, localName), null));\n }",
"public Namespace() {\n ... | [
"0.62880844",
"0.60369986",
"0.59152263",
"0.58361876",
"0.57327",
"0.571429",
"0.5700696",
"0.56771827",
"0.55715567",
"0.54572654",
"0.5434301",
"0.5425142",
"0.5403373",
"0.53734624",
"0.5338735",
"0.53313744",
"0.53309304",
"0.5330815",
"0.5315493",
"0.5302805",
"0.529711... | 0.71825075 | 0 |
Creates a new instance of NamespaceHelper. A new document is created using a document element in the given namespace with the given prefix. If the prefix is null, the default namespace is used. NamespaceHelper(" "svg", "svg"): <?xml version="1.0"> <svg:svg xmlns:svg=" </svg:svg> | public NamespaceHelper(String _namespaceUri, String _prefix, String localName)
throws ParserConfigurationException {
this(_namespaceUri, _prefix, DocumentHelper.createDocument(_namespaceUri, getQualifiedName(
_prefix, localName), null));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public NamespaceHelper(String _namespaceUri, String _prefix, Document _document)\n {\n Validate.notNull(_namespaceUri);\n Validate.notNull(_document);\n\n this.namespaceUri = _namespaceUri;\n this.prefix = _prefix;\n this.document = _document;\n }",
"@DOMSupport(DomLevel.... | [
"0.632456",
"0.5870469",
"0.57892853",
"0.57537353",
"0.5593765",
"0.554821",
"0.55302024",
"0.5527318",
"0.54831547",
"0.54667723",
"0.54408234",
"0.5409746",
"0.53923404",
"0.53867596",
"0.5366106",
"0.5336679",
"0.52877563",
"0.5274279",
"0.52733666",
"0.52410716",
"0.5236... | 0.6305798 | 1 |
Returns the document that is used to create elements. | public Document getDocument() {
return this.document;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Document getAsXMLDOM () {\r\n\r\n //code description\r\n\r\n return document;\r\n\r\n }",
"public Element getDocument() {\n\t\t\n\t\tElement retval = getRoot();\n\t\t\n\t\tList<Element> children;\n\t\t\n\t\tif ( retval.getName().equals(\"ROOT\") && (children = retval.getAllChildren()).size() > 0 )\... | [
"0.78152543",
"0.74305105",
"0.7312744",
"0.72264856",
"0.72222584",
"0.7216018",
"0.71614236",
"0.7063286",
"0.7039393",
"0.7008089",
"0.69771403",
"0.69404024",
"0.69147956",
"0.6909968",
"0.6904783",
"0.68813217",
"0.68813217",
"0.6861804",
"0.68404436",
"0.6831364",
"0.68... | 0.68716824 | 17 |
Returns the namespace URI of this NamespaceHelper. | public String getNamespaceURI() {
return this.namespaceUri;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"int getNamespaceUri();",
"public String getServerUri(String namespace);",
"public static String getURI() {\n return NS;\n }",
"public static String getURI() {\n\t\treturn NS;\n\t}",
"public String getNamespaceURL() {\n return namespaceURL;\n }",
"public java.lang.String getNameSpaceUR... | [
"0.7536269",
"0.7448044",
"0.7375282",
"0.73505837",
"0.72915727",
"0.7289311",
"0.7289311",
"0.7289311",
"0.6887411",
"0.6887411",
"0.6887411",
"0.6887411",
"0.6887411",
"0.6887411",
"0.6887411",
"0.67939454",
"0.67779654",
"0.67573977",
"0.67573977",
"0.67573977",
"0.674687... | 0.75554997 | 0 |
Returns the namespace prefix that is used to create elements. | public String getPrefix() {
return this.prefix;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public java.lang.String getNameSpacePrefix()\n {\n return nsPrefix;\n }",
"public java.lang.String getNameSpacePrefix()\n {\n return nsPrefix;\n }",
"public java.lang.String getNameSpacePrefix()\n {\n return nsPrefix;\n }",
"public String getFeedNamespacePrefix(String n... | [
"0.7923862",
"0.7923862",
"0.7923862",
"0.788021",
"0.7834165",
"0.7635956",
"0.75476706",
"0.7535741",
"0.7535741",
"0.7535741",
"0.7535741",
"0.7535741",
"0.7437795",
"0.7425711",
"0.7390244",
"0.73491746",
"0.73326653",
"0.7203547",
"0.7203547",
"0.72003585",
"0.72003585",... | 0.69669586 | 42 |
Returns the qualified name for a local name using the prefix of this NamespaceHelper. | public static String getQualifiedName(String prefix, String localName) {
if (prefix == null || prefix.equals("")) {
return localName;
}
return prefix + ":" + localName;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"String qualifiedName();",
"public String getLocalName()\n/* */ {\n/* 346 */ return this.name;\n/* */ }",
"@Override\n\t\tpublic String getLocalName() {\n\t\t\treturn null;\n\t\t}",
"String getQualifiedName(final String namespaceURI, final String localName) {\n final String qualified... | [
"0.70163095",
"0.68816847",
"0.67091775",
"0.6630071",
"0.6619638",
"0.66157854",
"0.65693563",
"0.65486884",
"0.65486884",
"0.64334553",
"0.6378374",
"0.6331614",
"0.6319801",
"0.6275916",
"0.6167082",
"0.6091654",
"0.6087251",
"0.60624075",
"0.60535717",
"0.6050713",
"0.604... | 0.7156115 | 0 |
Creates an element within the namespace of this NamespaceHelper object with a given local name containing a text node. createElement("text"): <prefix:text/>. | public Element createElement(String localName) {
return getDocument().createElementNS(getNamespaceURI(),
getQualifiedName(getPrefix(), localName));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Element createElement(String localName, String text) {\n Element element = createElement(localName);\n Text textNode = getDocument().createTextNode(text);\n element.appendChild(textNode);\n\n return element;\n }",
"@Override\n\tpublic final Text createTextNode(String data) {... | [
"0.73577505",
"0.6593403",
"0.6426856",
"0.63669336",
"0.63078076",
"0.6243712",
"0.59775895",
"0.5828247",
"0.56966233",
"0.5575442",
"0.5575442",
"0.5575442",
"0.5575442",
"0.5575442",
"0.5575442",
"0.5575442",
"0.5575442",
"0.5575442",
"0.5575442",
"0.5575442",
"0.5575442"... | 0.60396665 | 6 |
Creates an element within the namespace of this NamespaceHelper object with a given local name containing a text node. createElement("text", "Hello World!"): <prefix:text>Hello World!</prefix:text>. | public Element createElement(String localName, String text) {
Element element = createElement(localName);
Text textNode = getDocument().createTextNode(text);
element.appendChild(textNode);
return element;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static Element createElementNode(\r\n final Document doc, final String namespaceUri, final String prefix, final String tagName,\r\n final String textContent) throws Exception {\r\n\r\n Element newNode = doc.createElementNS(namespaceUri, tagName);\r\n newNode.setPrefix(prefix);\r\... | [
"0.6529066",
"0.6239365",
"0.61817175",
"0.6160574",
"0.59524286",
"0.59524286",
"0.59524286",
"0.59524286",
"0.59524286",
"0.59524286",
"0.59524286",
"0.59524286",
"0.59524286",
"0.59524286",
"0.59524286",
"0.59524286",
"0.59524286",
"0.59524286",
"0.59524286",
"0.59524286",
... | 0.7096881 | 0 |
Returns all children of an element in the namespace of this NamespaceHelper. | public Element[] getChildren(Element element) {
return DocumentHelper.getChildren(element, getNamespaceURI());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Element[] getChildren(Element element, String localName) {\n return DocumentHelper.getChildren(element, getNamespaceURI(), localName);\n }",
"public SeleniumQueryObject children() {\n\t\treturn ChildrenFunction.children(this, elements);\n\t}",
"public List<NamespaceNode> getChildNodes() {\n ... | [
"0.7077625",
"0.68264514",
"0.6777455",
"0.6630857",
"0.65876216",
"0.6578383",
"0.6439829",
"0.64308697",
"0.64224",
"0.6378099",
"0.63757724",
"0.63307065",
"0.63264346",
"0.6325504",
"0.63110656",
"0.63080597",
"0.6307148",
"0.6294926",
"0.62906337",
"0.62642497",
"0.62618... | 0.7387517 | 0 |
Returns all children of an element with a local name in the namespace of this NamespaceHelper. | public Element[] getChildren(Element element, String localName) {
return DocumentHelper.getChildren(element, getNamespaceURI(), localName);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public List getChildren(String name) {\n List elements = new ArrayList();\n NodeList nodes = element.getChildNodes();\n\n for (int i = 0; i < nodes.getLength(); i++) {\n Node node = nodes.item(i);\n\n if ((node.getNodeType() == Node.ELEMENT_NODE) && node.getNodeName().equ... | [
"0.656019",
"0.61505646",
"0.6126147",
"0.6098874",
"0.5926576",
"0.5901298",
"0.5797479",
"0.5691286",
"0.56732243",
"0.56478536",
"0.56157374",
"0.5529677",
"0.5426487",
"0.53998065",
"0.53920346",
"0.5339967",
"0.53130686",
"0.52788365",
"0.5276756",
"0.5265884",
"0.524146... | 0.65962017 | 0 |
Returns the first childr of an element with a local name in the namespace of this NamespaceHelper or null if none exists. | public Element getFirstChild(Element element, String localName) {
return DocumentHelper.getFirstChild(element, getNamespaceURI(), localName);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static Node findChildElement(Node node, String xmlLocalName) {\n if (node != null) {\n String nsUri = node.getNamespaceURI();\n for (Node child = node.getFirstChild(); child != null; child = child.getNextSibling()) {\n if (child.getNodeType() == Node.ELEMENT_NODE) {\n String nsU... | [
"0.684955",
"0.6670658",
"0.5956493",
"0.59060025",
"0.5879528",
"0.5871306",
"0.5852166",
"0.5839927",
"0.5765558",
"0.5742063",
"0.57088363",
"0.56926894",
"0.5664165",
"0.5616429",
"0.560168",
"0.55081606",
"0.54785544",
"0.5474662",
"0.5456748",
"0.5456748",
"0.53883225",... | 0.58953875 | 4 |
Returns the next siblings of an element with a local name in the namespace of this NamespaceHelper or null if none exists. | public Element[] getNextSiblings(Element element, String localName) {
return DocumentHelper.getNextSiblings(element, getNamespaceURI(), localName);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\t\tpublic Node getNextSibling()\r\n\t\t\t{\n\t\t\t\treturn null;\r\n\t\t\t}",
"@Override\n\tpublic Node getNextSibling() {\n\t\treturn null;\n\t}",
"@Override\n public Node next() {\n if (next == null) {\n throw new NoSuchElementException();\n }\n Node current =... | [
"0.5874998",
"0.5801096",
"0.5513356",
"0.542338",
"0.54041916",
"0.5391465",
"0.539104",
"0.5356254",
"0.53180933",
"0.528208",
"0.526496",
"0.5248921",
"0.52439404",
"0.51981586",
"0.5133794",
"0.5117374",
"0.51065487",
"0.5105343",
"0.51009005",
"0.50846756",
"0.50696945",... | 0.5837658 | 1 |
Returns the preceding siblings of an element with a local name in the namespace of this NamespaceHelper or null if none exists. | public Element[] getPrecedingSiblings(Element element, String localName) {
return DocumentHelper.getPrecedingSiblings(element, getNamespaceURI(), localName);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\t\tpublic Node getPreviousSibling()\r\n\t\t\t{\n\t\t\t\treturn null;\r\n\t\t\t}",
"@Override\n\tpublic Node getPreviousSibling() {\n\t\treturn null;\n\t}",
"public TreeNode getPreviousSibling ()\r\n {\r\n if (parent != null) {\r\n int index = parent.children.indexOf(this);\r\... | [
"0.6196112",
"0.60802317",
"0.59433067",
"0.58182156",
"0.56301135",
"0.5566162",
"0.55625427",
"0.5459541",
"0.5340118",
"0.5327466",
"0.5313457",
"0.5284961",
"0.52816695",
"0.52584845",
"0.52527463",
"0.5234043",
"0.52263165",
"0.519913",
"0.5140251",
"0.51240844",
"0.5118... | 0.7229327 | 0 |
Inflate the menu; this adds items to the action bar if it is present. | @Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.menu_main, menu);
if(names==null ||names=="" ){
menu.findItem(R.id.login).setTitle("登入");
}
else{
menu.findItem(R.id.login).setTitle("歡迎"+names);
}
this.menu = menu;
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tMenuInflater inflater = getMenuInflater();\n \tinflater.inflate(R.menu.main_activity_actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {... | [
"0.7246102",
"0.7201358",
"0.7194834",
"0.7176498",
"0.71066517",
"0.7039537",
"0.7037961",
"0.70112145",
"0.70094734",
"0.69807225",
"0.6944953",
"0.69389373",
"0.6933199",
"0.6916928",
"0.6916928",
"0.6891486",
"0.68831646",
"0.68754137",
"0.68745375",
"0.68621665",
"0.6862... | 0.0 | -1 |
Returns the specialized type set of this and type. The result should be a type set, so that every type, extends all types in type and this, iff it extends all types in the resulting type set. | public abstract Type getSpecializedType(Type type); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Set<Type> getSubTypes() {\r\n\t\tfinal Set<Type> subTypes = this.createSubTypes();\r\n\r\n\t\tfinal Set<Type> merged = new HashSet<Type>();\r\n\t\tmerged.addAll(subTypes);\r\n\t\tmerged.addAll(this.getNewSubTypes());\r\n\r\n\t\treturn Collections.unmodifiableSet(merged);\r\n\t}",
"public Set getTypeSet()\... | [
"0.6507021",
"0.63328326",
"0.61899805",
"0.60539156",
"0.5996721",
"0.5854639",
"0.5839778",
"0.5826098",
"0.5785243",
"0.57530415",
"0.5671975",
"0.55786616",
"0.55717534",
"0.54320055",
"0.5428695",
"0.54111236",
"0.53857046",
"0.5195662",
"0.5195662",
"0.5195662",
"0.5172... | 0.50132006 | 27 |
Returns the generalized type set of this and type. The result should be a type set, so that every type, is extended/implemented by one type in this and one type in type, iff it is extended/implemented by one type in the resulting type set. | public abstract Type getGeneralizedType(Type type); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Set<TypeDescriptor> getAllRelatedTypes() {\n final var types = getTypeParameters().stream()\n .flatMap(type -> type.getAllRelatedTypes().stream())\n .collect(Collectors.toCollection(HashSet::new));\n\n types.add(this);\n return types;\n }",
"public Set<Type> g... | [
"0.6743124",
"0.66941756",
"0.66304845",
"0.65531224",
"0.64976686",
"0.6129293",
"0.60434335",
"0.60155505",
"0.59337157",
"0.58481354",
"0.5839548",
"0.58067805",
"0.57549226",
"0.56580114",
"0.56580114",
"0.56580114",
"0.5645045",
"0.5645045",
"0.56203824",
"0.54854965",
"... | 0.55928695 | 19 |
Creates a range type set of this and bottom. The resulting type set contains all types, that extend all types in bottom and are extended by at least one type in this. Note that a RangeType will do this, but we normalize the bottom and top set. | public abstract Type createRangeType(ReferenceType bottom); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public List<BottomType> getBottomTypeList() {\n\t\treturn bottomTypeRepository.findAll();\r\n\t}",
"public Set<T> getRanges();",
"public SetOfRanges() {\n RangeSet = new Vector();\n }",
"Collection<Generalization> getPowertypeRanges();",
"public Set<Type> getSubTypes() {\r\n\t\tfinal Set<Type> su... | [
"0.580368",
"0.5587788",
"0.5073713",
"0.50581974",
"0.4877627",
"0.48599735",
"0.47931287",
"0.47426718",
"0.47108686",
"0.47049716",
"0.46548474",
"0.4644905",
"0.46304542",
"0.46196324",
"0.46094412",
"0.45963997",
"0.45953846",
"0.45888165",
"0.4561121",
"0.45534158",
"0.... | 0.6599086 | 0 |
Tells if all otherIfaces, are implemented by at least one ifaces or by clazz. This is a useful function for generalizing/specializing interface types or arrays. | protected static boolean implementsAllIfaces(ClassInfo clazz,
ClassInfo[] ifaces, ClassInfo[] otherIfaces) {
big: for (int i = 0; i < otherIfaces.length; i++) {
ClassInfo iface = otherIfaces[i];
if (clazz != null && iface.implementedBy(clazz))
continue big;
for (int j = 0; j < ifaces.length; j++) {
if (iface.implementedBy(ifaces[j]))
continue big;
}
return false;
}
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private boolean interfaceImplementsInterface(AClass ith) {\n\t\tEnumeration e = getImplements();\n\t\twhile (e.hasMoreElements()) {\n\t\t\tAClass i = ((Type) e.nextElement()).getRefType();\n\t\t\tif (i == ith) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\tif (i.interfaceImplementsInterface(ith)) {\n\t\t\t\treturn true;\... | [
"0.7021938",
"0.66417164",
"0.6585511",
"0.6483572",
"0.6322835",
"0.62219936",
"0.61775494",
"0.6128989",
"0.5846915",
"0.5804576",
"0.579213",
"0.5779921",
"0.5733993",
"0.56958354",
"0.5693942",
"0.5686888",
"0.56837183",
"0.55909705",
"0.55872184",
"0.5559614",
"0.5516198... | 0.8282099 | 0 |
Bitmap isn't used yet will be used soon | private void decodeOrStoreSavedBitmap(Bitmap bitmap, Result result) {
if (handler == null) {
savedResultToShow = result;
} else {
if (result != null) {
savedResultToShow = result;
}
if (savedResultToShow != null) {
Message message = Message.obtain(handler, R.id.decode_succeeded, savedResultToShow);
handler.sendMessage(message);
}
savedResultToShow = null;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void mo12205a(Bitmap bitmap);",
"Bitmap m7900a(Bitmap bitmap);",
"private void loadBitmap() {\n\n BitmapDrawable bitmapDrawable = (BitmapDrawable) this.getDrawable();\n\n if (bitmapDrawable != null)\n image = bitmapDrawable.getBitmap();\n }",
"Bitmap getBitmap(){\n Bitmap b... | [
"0.7647058",
"0.7428928",
"0.7300074",
"0.7102803",
"0.70347774",
"0.70335114",
"0.69433165",
"0.6875908",
"0.6772934",
"0.67583036",
"0.6743518",
"0.6708078",
"0.6623506",
"0.66134036",
"0.66090673",
"0.6607298",
"0.65769565",
"0.65758103",
"0.6564883",
"0.6561717",
"0.64931... | 0.0 | -1 |
A valid barcode has been found, so give an indication of success and show the results. | public void handleDecode(Result rawResult, Bitmap barcode, float scaleFactor) {
inactivityTimer.onActivity();
boolean fromLiveScan = barcode != null;
if (fromLiveScan) {
// Then not from history, so beep/vibrate and we have an image to draw on
beepManager.playBeepSoundAndVibrate();
}
//rawResult.getText() 结果
if (rawResult == null || TextUtils.isEmpty(rawResult.getText())) {
if (analyzeCallback != null) {
analyzeCallback.onAnalyzeFailed();
}
} else {
if (analyzeCallback != null) {
analyzeCallback.onAnalyzeSuccess(barcode, rawResult.getText());
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void onBarcodeDetected(Barcode barcode) {\n Log.d(TAG, \"Detected barcode with value: \" + barcode.displayValue);\n\n Intent returnIntent = new Intent();\n returnIntent.putExtra(INTENT_EXTRA_BARCODE_VALUE, barcode.displayValue);\n setResult(RESULT_OK, returnIntent);\n finish();\n }",
"pri... | [
"0.71288246",
"0.673602",
"0.66483694",
"0.64540684",
"0.6424349",
"0.6398408",
"0.63875175",
"0.6329508",
"0.6303933",
"0.6146107",
"0.6116086",
"0.61052716",
"0.6091854",
"0.60709864",
"0.6046512",
"0.59974563",
"0.5993374",
"0.5989893",
"0.5983306",
"0.59821594",
"0.597059... | 0.5566311 | 35 |
/ Have we sent a new mail notification on this account | public boolean isRingNotified() {
return mRingNotified;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"boolean hasNewMailNum();",
"private void sendNotification() {\n }",
"@Override\n\tpublic void setSendMailSuccess() {\n\t\t\n\t}",
"private void selfCheck()\n {\n createSession();\n\n // Verify that we can create a mail body\n ImmutableNotification notification = Notification.builde... | [
"0.68889",
"0.6395504",
"0.6345528",
"0.632767",
"0.6247358",
"0.6199073",
"0.6156257",
"0.6125118",
"0.606568",
"0.6057107",
"0.60050577",
"0.5996286",
"0.59942913",
"0.5966796",
"0.5928723",
"0.5916619",
"0.5897981",
"0.5890628",
"0.5846416",
"0.58400404",
"0.58394027",
"... | 0.0 | -1 |
Returns 1 for never. | public synchronized int getAutomaticCheckIntervalMinutes() {
return mAutomaticCheckIntervalMinutes;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"boolean isNoOp();",
"@Override\n\tpublic int isOrNoSet() {\n\t\treturn 0;\n\t}",
"boolean isNoop();",
"static void return_not_zero(String passed){\n\t\tif(!Z)\n\t\t\tcomplete_return_requirements();\n\t}",
"@Test\n\t\tpublic void woeIsMeUnreachabletest() {\n\t\t\tassertTrue(System.currentTimeMillis() > 0);\... | [
"0.65519834",
"0.6389192",
"0.63291305",
"0.62254",
"0.6189654",
"0.6178288",
"0.61578983",
"0.6129795",
"0.612731",
"0.6089212",
"0.60665333",
"0.6037673",
"0.59861165",
"0.59748346",
"0.59722275",
"0.5971871",
"0.59621865",
"0.59565157",
"0.5946872",
"0.592498",
"0.5924847"... | 0.0 | -1 |
Checks if this account has a drafts folder set. | public synchronized boolean hasDraftsFolder() {
return !K9.FOLDER_NONE.equalsIgnoreCase(mDraftsFolderName);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public synchronized boolean hasSpamFolder() {\n return !K9.FOLDER_NONE.equalsIgnoreCase(mSpamFolderName);\n }",
"public synchronized boolean hasTrashFolder() {\n return !K9.FOLDER_NONE.equalsIgnoreCase(mTrashFolderName);\n }",
"boolean isFolder();",
"boolean hasCampaignDraft();",
"publi... | [
"0.63271827",
"0.6074995",
"0.6059521",
"0.60365814",
"0.6035623",
"0.59607375",
"0.5909328",
"0.57371783",
"0.573494",
"0.5647735",
"0.5511438",
"0.54907155",
"0.5490039",
"0.5422202",
"0.53996426",
"0.5247058",
"0.5204879",
"0.5175901",
"0.5134306",
"0.51094294",
"0.5072876... | 0.852257 | 0 |
Checks if this account has a sent folder set. | public synchronized boolean hasSentFolder() {
return !K9.FOLDER_NONE.equalsIgnoreCase(mSentFolderName);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public synchronized boolean hasSpamFolder() {\n return !K9.FOLDER_NONE.equalsIgnoreCase(mSpamFolderName);\n }",
"public synchronized boolean hasDraftsFolder() {\n return !K9.FOLDER_NONE.equalsIgnoreCase(mDraftsFolderName);\n }",
"boolean hasDriveFolder();",
"@java.lang.Deprecated boolean ... | [
"0.7425958",
"0.665826",
"0.6334625",
"0.5839927",
"0.5807788",
"0.56777734",
"0.5647118",
"0.5633107",
"0.5585879",
"0.5545653",
"0.5520721",
"0.54318494",
"0.54272884",
"0.5422907",
"0.5393392",
"0.5375154",
"0.53508943",
"0.53508943",
"0.53508943",
"0.53508943",
"0.5350894... | 0.84852546 | 0 |
Checks if this account has a trash folder set. | public synchronized boolean hasTrashFolder() {
return !K9.FOLDER_NONE.equalsIgnoreCase(mTrashFolderName);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public synchronized boolean hasDraftsFolder() {\n return !K9.FOLDER_NONE.equalsIgnoreCase(mDraftsFolderName);\n }",
"@Override\n\tpublic boolean isInTrash();",
"public synchronized boolean hasSpamFolder() {\n return !K9.FOLDER_NONE.equalsIgnoreCase(mSpamFolderName);\n }",
"@Override\n\tpu... | [
"0.64481705",
"0.64349985",
"0.6315313",
"0.6063871",
"0.57442683",
"0.5704472",
"0.5626427",
"0.5575213",
"0.5543931",
"0.55283135",
"0.5456086",
"0.53836",
"0.5304047",
"0.52319545",
"0.51565593",
"0.5132427",
"0.5095372",
"0.50917757",
"0.5049467",
"0.5017881",
"0.5010962"... | 0.82145196 | 0 |
Checks if this account has an archive folder set. | public synchronized boolean hasArchiveFolder() {
return !K9.FOLDER_NONE.equalsIgnoreCase(mArchiveFolderName);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private boolean isArchive() {\n RepoPath repositoryPath = InternalRepoPathFactory.create(getRepoKey(), getPath());\n ItemInfo fileInfo = retrieveItemInfo(repositoryPath);\n return NamingUtils.getMimeType(fileInfo.getRelPath()).isArchive();\n }",
"public synchronized boolean hasTrashFolder... | [
"0.65852195",
"0.62052786",
"0.61684805",
"0.61561257",
"0.5881062",
"0.5850021",
"0.57584935",
"0.5753139",
"0.5685569",
"0.56596863",
"0.56450385",
"0.5615945",
"0.5611221",
"0.5569561",
"0.55619013",
"0.5536875",
"0.5530926",
"0.5530697",
"0.5525371",
"0.5509963",
"0.54702... | 0.8198015 | 0 |
Checks if this account has a spam folder set. | public synchronized boolean hasSpamFolder() {
return !K9.FOLDER_NONE.equalsIgnoreCase(mSpamFolderName);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public synchronized boolean hasSentFolder() {\n return !K9.FOLDER_NONE.equalsIgnoreCase(mSentFolderName);\n }",
"boolean hasMailInbox();",
"public synchronized boolean hasDraftsFolder() {\n return !K9.FOLDER_NONE.equalsIgnoreCase(mDraftsFolderName);\n }",
"public synchronized boolean hasT... | [
"0.6565026",
"0.58197176",
"0.57538205",
"0.55797094",
"0.55215335",
"0.5383136",
"0.536409",
"0.53287166",
"0.53287166",
"0.53287166",
"0.53287166",
"0.53287166",
"0.53287166",
"0.53287166",
"0.52884156",
"0.5278366",
"0.5263007",
"0.5182292",
"0.5094579",
"0.5090002",
"0.50... | 0.8328758 | 0 |
It'd be great if this actually went into the store implementation to get this, but that's expensive and not easily accessible during initialization | public boolean isSearchByDateCapable() {
return (getStoreUri().startsWith("imap"));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private Store() {\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initSelfData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initSelfData() {\n\t\t\r\n\t}",
"DataStore getDataStore ();",
"@Override\n\tprotected void lazyLoad() {\n\t}",
"@Override\n\tpubl... | [
"0.5970495",
"0.5740272",
"0.5658958",
"0.5658958",
"0.5630571",
"0.562736",
"0.557275",
"0.5567442",
"0.55510557",
"0.55276954",
"0.5513568",
"0.5509234",
"0.5508498",
"0.5497687",
"0.54532236",
"0.54349583",
"0.5422181",
"0.541615",
"0.54074347",
"0.54010075",
"0.53357506",... | 0.0 | -1 |
Examine the settings for the account and attempt to delete (possibly nonexistent) certificates for the incoming and outgoing servers. | public void deleteCertificates() {
LocalKeyStore localKeyStore = LocalKeyStore.getInstance();
Uri uri = Uri.parse(getStoreUri());
localKeyStore.deleteCertificate(uri.getHost(), uri.getPort());
uri = Uri.parse(getTransportUri());
localKeyStore.deleteCertificate(uri.getHost(), uri.getPort());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void resetCertificates()\n\t{\n\t\t// Reset memory. Don't use the inner save.\n\t\tfor (Castle castle : _castles.values())\n\t\t\tcastle.setLeftCertificates(300, false);\n\t\t\n\t\t// Update all castles with a single query.\n\t\ttry (Connection con = L2DatabaseFactory.getInstance().getConnection();\n\t\t\tP... | [
"0.5350456",
"0.51552314",
"0.51521283",
"0.50486296",
"0.50114834",
"0.4969154",
"0.49051335",
"0.48838443",
"0.48712638",
"0.48712638",
"0.48424608",
"0.47993514",
"0.479722",
"0.47888625",
"0.4780681",
"0.47668862",
"0.47413424",
"0.4735375",
"0.47039738",
"0.46953356",
"0... | 0.64061654 | 0 |
TODO Autogenerated method stub | @Override
public String getEmail() {
return null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.608016... | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public void setEmail(String email) {
} | {
"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 |
public static Map mapMillisecToMessage = new HashMap(); | public static String formatTimeInterval(final long intervalMilliseconds) {
long l = intervalMilliseconds;
final long hr = TimeUnit.MILLISECONDS.toHours(l);
final long min = TimeUnit.MILLISECONDS.toMinutes(l - TimeUnit.HOURS.toMillis(hr));
final long sec = TimeUnit.MILLISECONDS.toSeconds(l - TimeUnit.HOURS.toMillis(hr) - TimeUnit.MINUTES.toMillis(min));
// final long ms = TimeUnit.MILLISECONDS.toMillis(l - TimeUnit.HOURS.toMillis(hr) - TimeUnit.MINUTES.toMillis(min) - TimeUnit.SECONDS.toMillis(sec));
return String.format("%02d:%02d:%02d" /* + ".%03d" */, hr, min, sec /*, ms */);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static Map<Long,Message> getMessages(){\r\n\t\treturn messages;\r\n\t\t\r\n\t}",
"private static String m72668a(Map<String, String> map) {\n String str = \"msgId\";\n try {\n StringBuilder sb = new StringBuilder();\n sb.append(System.currentTimeMillis());\n s... | [
"0.6879094",
"0.6665653",
"0.640787",
"0.58260494",
"0.5797969",
"0.571981",
"0.5682494",
"0.5672873",
"0.56525797",
"0.55403364",
"0.5526885",
"0.5526555",
"0.552377",
"0.5420194",
"0.5404565",
"0.53638035",
"0.5362279",
"0.5358985",
"0.5358104",
"0.5348041",
"0.5347096",
... | 0.0 | -1 |
Add a new share runnable | public static void addShareRunnable(final Plugin plugin, final boolean async, final long ticks, final ShareRunnable runnable) {
if(ticks < 1) {
throw new IllegalArgumentException("The number of ticks can not be under 1");
}
List<ShareRunnableHandler> handlerList = async ? ASYNC_HANDLERS : SYNC_HANDLERS;
final ShareRunnableHandler handler = getOrCreateHandler(plugin, handlerList, ticks);
handler.addRunnable(runnable);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void onShareAdded(ShareEntry shareEntry);",
"private synchronized void addTask(Runnable runnable) {\r\n mTaskQueue.add(runnable);\r\n try {\r\n if (mPoolThreadHandler==null){\r\n mSemaphorePoolThreadHandler.acquire();\r\n }\r\n } catch (Interrupt... | [
"0.61935145",
"0.6052616",
"0.5857206",
"0.561383",
"0.55042356",
"0.54615915",
"0.54494077",
"0.5443856",
"0.53184336",
"0.52660495",
"0.5249658",
"0.52389747",
"0.52264196",
"0.5203789",
"0.51714927",
"0.5148007",
"0.51464266",
"0.5141611",
"0.51407325",
"0.5115275",
"0.510... | 0.61361855 | 1 |
Cancel all runnables contained in handler correspond to a number of ticks | private static void cancelHandler(final List<ShareRunnableHandler> handlerList, final long ticks) {
final ShareRunnableHandler handler = find(handlerList, ticks);
if(handler != null) {
handler.cancel();
handlerList.remove(handler);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void run() {\n myHandler.cancel(true);\n }",
"private void cancelTasks() {\n\t\ttimer.cancel();\n\t\ttimer.purge();\n\t}",
"public void cancelAll() {\n terminateScheduleTask();\n for (CancellableCommand request : outstandingRequests) {\n reques... | [
"0.6491682",
"0.6288141",
"0.61509866",
"0.61341524",
"0.60360616",
"0.5971316",
"0.5804902",
"0.57664",
"0.5745499",
"0.5690033",
"0.56819904",
"0.56488365",
"0.562966",
"0.5627748",
"0.5625806",
"0.56122994",
"0.5594366",
"0.5590821",
"0.5588498",
"0.5581829",
"0.5580072",
... | 0.65458685 | 0 |
Task 2: Implement me. | public ReceiveMessageResult pull(ReceiveMessageRequest receiveMessageRequest) {
return queueRequestHandler.processReceiveMessageRequest(receiveMessageRequest);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void smell() {\n\t\t\n\t}",
"private static void executeTask02() {\n }",
"public static void doExercise3() {\n // TODO: Complete Exercise 3 Below\n\n }",
"public static void doExercise2() {\n // TODO: Complete Exercise 2 Below\n\n }",
"public static void doExercise4() {\n ... | [
"0.6009817",
"0.5952924",
"0.5877882",
"0.58634317",
"0.5858554",
"0.5827652",
"0.58110034",
"0.5807505",
"0.5791863",
"0.576845",
"0.5758858",
"0.5758172",
"0.57450986",
"0.57267416",
"0.57260954",
"0.572556",
"0.5697776",
"0.56880105",
"0.56828094",
"0.56779855",
"0.5676644... | 0.0 | -1 |
Authenticate against a database, LDAP, file or whatever Throw an Exception if the credentials are invalid | private void authenticate( String loging, String sysLoging,String password,String sys_password) throws Exception {
if(!loging.equals(sysLoging) || !(sys_password.equals(password) )){
Exception e = new Exception();
throw e;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"boolean isAuthenticate(String username, String password) throws UserDaoException;",
"boolean authenticate(String userName, String password);",
"private void authenticate(String user, String pass) {\n }",
"User authenticate(String username, String password);",
"public void authenticate(LoginCredentials c... | [
"0.70828426",
"0.70613074",
"0.7026136",
"0.69824183",
"0.69187826",
"0.6837902",
"0.67598194",
"0.66580915",
"0.6629705",
"0.6585837",
"0.6581097",
"0.6520579",
"0.65093374",
"0.6498172",
"0.64393735",
"0.637451",
"0.6359628",
"0.6345397",
"0.63379407",
"0.6314695",
"0.63058... | 0.65539277 | 11 |
Issue a token (can be a random String persisted to a database or a JWT token) The issued token must be associated to a user Return the issued token | private String issueToken(String username) {
String token =TokenManagement.getTokenHS256(username,tokenSec,tokenduration);
return token;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"String createToken(User user);",
"@Transactional\n public UserToken generateToken() {\n if (!firebaseService.canProceed())\n return null;\n\n try {\n Optional<UserAuth> userOptional = Auditor.getLoggedInUser();\n if (!userOptional.isPresent()) return UNAUTHENTICA... | [
"0.68063",
"0.65504444",
"0.6534943",
"0.6492433",
"0.6344643",
"0.6309934",
"0.60889167",
"0.60733086",
"0.6023362",
"0.60157794",
"0.5980262",
"0.5976545",
"0.593304",
"0.5925833",
"0.58992994",
"0.58987236",
"0.58954245",
"0.58693695",
"0.58587545",
"0.58391786",
"0.582691... | 0.66670525 | 1 |
Takes a specific IP address or a range specified using the IP/Netmask (e.g. 192.168.1.0/24 or 202.24.0.0/14). | public IpAddressMatcher(List<String> listIpAddress) {
listnMaskBits= new ArrayList<Integer>();
listrequiredAddress =new ArrayList<InetAddress>();
for(String ipAddress : listIpAddress){
int nMaskBits;
if (ipAddress.indexOf('/') > 0) {
String[] addressAndMask = ipAddress.split("/");
ipAddress = addressAndMask[0];
nMaskBits = Integer.parseInt(addressAndMask[1]);
}else {
nMaskBits = -1;
}
listnMaskBits.add(nMaskBits);
listrequiredAddress.add(parseAddress(ipAddress));
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void main(String[] args) {\n byte[] ip = new byte[]{(byte) 192, (byte) 168, 1, 2};\n byte[] mask = new byte[]{(byte) 255, (byte) 255, (byte) 254, 0};\n byte[] netAddress = getNetAddress(ip, mask);\n print(ip); //11000000 10101000 00000001 00000010\n print(m... | [
"0.69797575",
"0.6112172",
"0.6112172",
"0.60042346",
"0.60042346",
"0.60042346",
"0.5971725",
"0.5971725",
"0.5971725",
"0.5971725",
"0.5971725",
"0.5971725",
"0.5971725",
"0.5971725",
"0.5957515",
"0.59496146",
"0.5904212",
"0.586478",
"0.586478",
"0.5863287",
"0.5853115",
... | 0.59544164 | 15 |
Admin Action General settings | public void doChangeTicketPrices(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void Admin_Configuration()\n\t{\n\t\tAdmin_Configuration.click();\n\t}",
"@Override\r\n\tpublic Map<String, Action> getAdminActons() {\n\t\treturn null;\r\n\t}",
"protected void configurePropertiesFromAction(Action a) {\n\tsetEnabled((a!=null?a.isEnabled():true));\n \tsetToolTipText((a!=null?(String)a.g... | [
"0.64883095",
"0.6300386",
"0.6274231",
"0.62709594",
"0.61681104",
"0.60105187",
"0.600232",
"0.59793323",
"0.5935415",
"0.5839401",
"0.5769681",
"0.5753355",
"0.57443315",
"0.57306474",
"0.5714694",
"0.56871635",
"0.5675756",
"0.5667",
"0.56248957",
"0.5620048",
"0.55863446... | 0.0 | -1 |
TODO Autogenerated method stub | public static void main(String[] args) {
String missing_characters = pangramfinder("Hi all I am shivani");
System.out.println(missing_characters);
} | {
"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 |
Create the brick pi instance. This will only occur on the "getBrickPi" call, and only if it has not already been created. | protected BrickPiCommunications(SpiChannel spiChannel) throws IOException {
try {
spi = SpiFactory.getInstance(spiChannel,
500000,
SpiMode.MODE_0);
} catch(Exception ex) {
LOGGER.error(ex.getMessage(), ex);
throw new IOException("Failed to open spi to BrickPi");
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public BrickControlPi() {\r\n\t}",
"RasPiBoard createRasPiBoard();",
"public PiButton()\n\t{\n\t\tpasswordLogic = new PINLogic();\n\t\tled = new PiLED(21, 22);\n\t\tbuzzer = new PiBuzzer();\n\t}",
"BOp createBOp();",
"Parking createParking();",
"private Brick generateBricks() {\n\t\tBrick randomBrick = n... | [
"0.7097254",
"0.61908716",
"0.6161786",
"0.5691546",
"0.5666058",
"0.55910665",
"0.54177237",
"0.5365168",
"0.5252967",
"0.5238897",
"0.521",
"0.5188087",
"0.51767343",
"0.5150651",
"0.51477903",
"0.5057871",
"0.50522536",
"0.50411403",
"0.49838975",
"0.49778962",
"0.49778777... | 0.5795431 | 3 |
Send a packet to the brick pi. | protected byte[] sendToBrickPi(byte[] toSend) {
byte resultBytes[] = new byte[] {};
if (DEBUG_LEVEL > 0) {
StringBuffer output = new StringBuffer();
output.append("Sending");
for (byte toAdd : toSend) {
output.append(" ");
output.append(Integer.toHexString(toAdd & 0xFF));
}
System.out.println(output.toString());
}
try {
resultBytes = spi.write(toSend);
if (DEBUG_LEVEL > 0) {
StringBuffer input = new StringBuffer();
input.append("Received ");
for (byte received : resultBytes) {
input.append(" ");
input.append(Integer.toHexString(received & 0xFF));
}
System.out.println(input.toString());
}
}
catch(IOException ex) {
LOGGER.error(ex.getMessage(), ex);
}
return resultBytes;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void send(Packet packet);",
"public void sendRequest(Pdu packet);",
"void SendPacket(int packetIdentifier);",
"public void sendPacket(Packet pPacket) {\n mPacket = pPacket;\r\n \r\n \r\n }",
"@Override\n\tpublic void sendPacket(JBPacket packet) {\n\t\t\n\t}",
"void sendPack... | [
"0.7492363",
"0.6931504",
"0.6919384",
"0.6829004",
"0.68042713",
"0.680135",
"0.67783695",
"0.66905963",
"0.6563234",
"0.65220094",
"0.65159875",
"0.64878213",
"0.64647484",
"0.6448514",
"0.6326755",
"0.6311056",
"0.630759",
"0.6290261",
"0.62836355",
"0.626203",
"0.6256282"... | 0.6101138 | 31 |
Decode an arbitrary number of bits from the bitset. | public static int decodeInt(int bitLength, byte[] incoming, int startingBitLocation) {
int value = 0;
while (bitLength-- > 0) {
value <<= 1;
int location = bitLength + startingBitLocation;
boolean set = ((incoming[location / 8] & (1 << (location % 8))) != 0);
if (set) {
value |= 1;
}
}
return value;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"BitField getLSBs(int digits);",
"private static int[] decodeControlByte(byte b) {\n int[] res = new int[4];\n byte slicer = 3;\n for (int i = 3; i >= 0; --i) {\n res[i] = (b & slicer) + 1;\n b >>= 2;\n }\n return res;\n }",
"public long decode(long va... | [
"0.54966885",
"0.5451849",
"0.54027563",
"0.53838634",
"0.5271423",
"0.5262877",
"0.52560264",
"0.52494556",
"0.5209645",
"0.5179201",
"0.5151382",
"0.5109568",
"0.5108218",
"0.50524926",
"0.5013852",
"0.4987465",
"0.49839428",
"0.49694902",
"0.49572885",
"0.49552855",
"0.494... | 0.5302037 | 4 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.