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
Simple product 4 with original price product gallery remove
public SimpleProduct4WithOriginalPriceDetailPage removeProductGalleryFromSimpleProduct4tWithOriginalPrice() { SpriiTestFramework.getInstance().waitForElement(By.xpath(firstImageElement), 20); Actions actions = new Actions(driver); WebElement target = driver.findElement(By.xpath(firstImageElement)); actions.moveToElement(target).perform(); SpriiTestFramework.getInstance().waitForElement(By.xpath(removeElement), 20); driver.findElement(By.xpath(removeElement)).click(); return new SimpleProduct4WithOriginalPriceDetailPage(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ConfigProductWithOriginalPriceDetailPage removeProductGalleryFromConfigProductWithOriginalPrice() {\n SpriiTestFramework.getInstance().waitForElement(By.xpath(firstImageElement), 20);\n Actions actions = new Actions(driver);\n WebElement target = driver.findElement(By.xpath(firstImageEl...
[ "0.763487", "0.7605745", "0.757634", "0.75401825", "0.7533771", "0.6226673", "0.6075714", "0.605001", "0.5965254", "0.5913904", "0.5875417", "0.58123094", "0.57768506", "0.57662344", "0.572267", "0.570856", "0.5677097", "0.56590104", "0.56312245", "0.56265783", "0.561353", ...
0.7651018
0
Simple product with special price product gallery remove
public SimpleProductWithSpecialPriceDetailPage removeProductGalleryFromSimpleProducttWithSpecialPrice() { SpriiTestFramework.getInstance().waitForElement(By.xpath(firstImageElement), 20); Actions actions = new Actions(driver); WebElement target = driver.findElement(By.xpath(firstImageElement)); actions.moveToElement(target).perform(); SpriiTestFramework.getInstance().waitForElement(By.xpath(removeElement), 20); driver.findElement(By.xpath(removeElement)).click(); return new SimpleProductWithSpecialPriceDetailPage(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ConfigProductWithSpecialPriceDetailPage removeProductGalleryFromConfigProductWithSpecialPrice() {\n SpriiTestFramework.getInstance().waitForElement(By.xpath(firstImageElement), 20);\n Actions actions = new Actions(driver);\n WebElement target = driver.findElement(By.xpath(firstImageElem...
[ "0.76737094", "0.7585872", "0.738182", "0.73232365", "0.72875947", "0.60870194", "0.5924223", "0.5919046", "0.58329", "0.57582664", "0.57259524", "0.572353", "0.56755984", "0.56323177", "0.56042576", "0.5601271", "0.5584559", "0.5578239", "0.5570644", "0.5553854", "0.55051035...
0.7725806
0
Zoom in and out
public ProductGalleryPage zoomIn() { SpriiTestFramework.getInstance().waitForElement(By.xpath(zoomInElement), 2000); driver.findElement(By.xpath(zoomInElement)).click(); return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void zoomIn() { zoomIn(1); }", "public void zoomIn() {\n if (scale < 0.8) {\n double scaleFactor = (scale + 0.03) / scale;\n currentXOffset = scaleFactor * (currentXOffset - viewPortWidth / 2) + viewPortWidth / 2;\n currentYOffset = scaleFactor * (currentYOffset - v...
[ "0.8078239", "0.80424184", "0.7859504", "0.7817262", "0.7805837", "0.77258563", "0.7689115", "0.768612", "0.76859677", "0.75396454", "0.75169903", "0.74341", "0.7429956", "0.73940045", "0.7369834", "0.7257147", "0.7246056", "0.72269386", "0.71876085", "0.71588755", "0.7149606...
0.66641486
48
Convert the given object to string with each line indented by 4 spaces (except the first line).
private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private String toIndentedString(Object object) {\n if (object == null) {\n return EndpointCentralConstants.NULL_STRING;\n }\n return object.toString().replace(EndpointCentralConstants.LINE_BREAK,\n EndpointCentralConstants.LINE_BREAK + EndpointCentralConstants.TAB_SPA...
[ "0.78847593", "0.75493765", "0.74971926", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0...
0.0
-1
TODO Autogenerated method stub
public static void main(String[] args) { System.out.println("git hi"); System.out.println("git 연습1"); }
{ "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
// Restorable State // //
protected void doGetRestorableState(RestorableSupport rs, RestorableSupport.StateObject context) { super.doGetRestorableState(rs, context); Iterable<? extends LatLon> iterable = this.getLocations(); if (iterable != null) rs.addStateValueAsLatLonList(context, "locationList", iterable); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void restoreState(Map<String, Object> state) {\n\n }", "public String getRestorableState()\n {\n RestorableSupport rs = RestorableSupport.newRestorableSupport();\n this.doGetRestorableState(rs, null);\n\n return rs.getStateAsXml();\n }", "public void saveStat...
[ "0.6578011", "0.6353664", "0.60833186", "0.5874091", "0.582609", "0.5773308", "0.5756806", "0.57403797", "0.57403797", "0.57403797", "0.57403797", "0.5700781", "0.5662848", "0.56186265", "0.5606361", "0.5600689", "0.5592368", "0.55824554", "0.55723566", "0.5570629", "0.555995...
0.0
-1
Constructor for the HealthStatus class.
public HealthStatusFormGUI(Tab healthStatusTab, StaffAccount loggedInUser, Stage parentStage) { this.parentTab = healthStatusTab; this.loggedInUser = loggedInUser; this.parentStage = parentStage; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Status() {\n }", "public Status() {\n\n }", "public Status(){\n this(StatusDescription.REGISTERED);\n }", "public StatusResource() {\n this.statusService = DeathStar.getStatusService();\n logger.log(Level.FINE, \"Status resource instantiated: {0}\", this);\n }", "pub...
[ "0.7419633", "0.7290066", "0.7139306", "0.6944759", "0.6851949", "0.67883635", "0.6765346", "0.6715887", "0.6614804", "0.65147775", "0.638234", "0.6339868", "0.6339868", "0.6323034", "0.62189245", "0.6190786", "0.6152365", "0.6129267", "0.61120087", "0.6092433", "0.6080644", ...
0.0
-1
Purpose: This method will make everything and display it.
public Tab showHealthStatusInfo( String cosmoId ) { this.cosmoID = cosmoId; Label title = new Label(FORM_TITLE); HBox titleBox = new HBox(); title.setFont(new Font(22)); mainBox = new ScrollPane(); if ( !(this.loggedInUser instanceof MedicalAdministrator) ) { this.btnSave.setVisible(false); } lblMessage = new Label(""); titleBox.getChildren().addAll(title, lblMessage, btnSave); titleBox.setSpacing(100); VBox contentBox = new VBox(); btnSave.setMinWidth(150); Label otherLbl = new Label("Other Information"); otherLbl.setFont(Font.font(22)); otherInfoTxt = new TextArea(); otherInfoTxt.setMaxWidth(700); otherInfoTxt.setMaxHeight(150); contentBox.getChildren().addAll(titleBox, createDiagnosisInfo(cosmoId), createMedicalConditions(cosmoId), createAllergiesInfo(cosmoId), createMedicationInfo(cosmoId), otherLbl, otherInfoTxt); contentBox.setSpacing(15); mainBox.setContent(contentBox); mainBox.setHbarPolicy(ScrollBarPolicy.NEVER); mainBox.setVbarPolicy(ScrollBarPolicy.ALWAYS); mainBox.setHmax(contentBox.getWidth()); mainBox.setPadding(new Insets(10, 10, 10, 10)); assignDiagnosisInfo(cosmoId + ""); this.parentTab.setContent(mainBox); return parentTab; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void makeDisplay() {\n\n\t\t// setLayout to be a BoxLayout\n\t\tsetLayout(new BoxLayout(this, BoxLayout.Y_AXIS));\n\t\t// call these methods ???? to be defined later\n\n\t\taddOscServerAddressPanel();\n\t\taddGlobalControlPanel();\n\t\taddFirstSynthPanel();\n\t\taddSecondSynthPanel();\n\t\taddThirdSynthPan...
[ "0.719633", "0.7160867", "0.7052845", "0.7052845", "0.70234853", "0.70234853", "0.70192975", "0.69651294", "0.6831864", "0.68237257", "0.68237257", "0.6805864", "0.6794447", "0.6747462", "0.6747462", "0.6747462", "0.67350936", "0.6692019", "0.66820705", "0.6650951", "0.659777...
0.0
-1
Purpose: Create the diagnosis controls
private HBox createDiagnosisInfo( String cosmoId ) { HBox mainBox = new HBox(); VBox leftVBox = new VBox(); VBox rightVBox = new VBox(); HBox familyPhysicianHBox = new HBox(); HBox participantDiagnosisHBox = new HBox(); HBox physicianPhoneNumberHBox = new HBox(); HBox dateCompletedHBox = new HBox(); HBox checkBoxesHBox = new HBox(); Label familyPhysicianLbl = new Label("Family Physician: "); Label participantDiagnosisLbl = new Label("Participant Diagnosis: "); Label physicianPhoneLbl = new Label("Physician Phone Number: "); Label dateCompletedLbl = new Label("Date Completed: "); familyPhysicianTxt = new Label(); participantDiagnosisTxt = new TextField(); physicianPhoneTxt = new Label(); dateCompletedTxt = new Label(); tylenolGiven = new CheckBox(); tylenolGiven.setText("Tylenol Given"); careGiverPermission = new CheckBox(); careGiverPermission.setText("Caregivers Permission given"); editableItems.add(careGiverPermission); editableItems.add(tylenolGiven); editableItems.add(dateCompletedTxt); editableItems.add(physicianPhoneTxt); editableItems.add(participantDiagnosisTxt); editableItems.add(familyPhysicianTxt); btnSave.setOnAction(event -> { lblMessage.setText(""); String[] info = new String[4]; info[0] = participantDiagnosisTxt.getText(); info[1] = tylenolGiven.isSelected() + ""; info[2] = careGiverPermission.isSelected() + ""; info[3] = otherInfoTxt.getText(); boolean success = helper.saveHealthStatusInfo(info, cosmoID); if ( success ) { assignDiagnosisInfo(cosmoId); lblMessage.setTextFill(Color.BLUE); lblMessage.setText("Save successful"); } else { lblMessage.setTextFill(Color.RED); lblMessage.setText("The save was unsuccesful."); } }); // Following is just adding stuff to their boxes and setting some // spacing and alignment familyPhysicianHBox.getChildren().addAll(familyPhysicianLbl, familyPhysicianTxt); familyPhysicianHBox.setSpacing(125); familyPhysicianHBox.setAlignment(Pos.CENTER_RIGHT); participantDiagnosisHBox.getChildren().addAll(participantDiagnosisLbl, participantDiagnosisTxt); participantDiagnosisHBox.setSpacing(SPACING); participantDiagnosisHBox.setAlignment(Pos.CENTER_RIGHT); physicianPhoneNumberHBox.getChildren().addAll(physicianPhoneLbl, physicianPhoneTxt); physicianPhoneNumberHBox.setSpacing(SPACING); physicianPhoneNumberHBox.setAlignment(Pos.CENTER_RIGHT); dateCompletedHBox.getChildren().addAll(dateCompletedLbl, dateCompletedTxt); dateCompletedHBox.setSpacing(SPACING); dateCompletedHBox.setAlignment(Pos.CENTER_RIGHT); checkBoxesHBox.getChildren().addAll(tylenolGiven, careGiverPermission); checkBoxesHBox.setSpacing(SPACING); leftVBox.getChildren().addAll(familyPhysicianHBox, participantDiagnosisHBox, checkBoxesHBox); leftVBox.setSpacing(SPACING); rightVBox.getChildren().addAll(physicianPhoneNumberHBox, dateCompletedHBox); rightVBox.setSpacing(SPACING); mainBox.getChildren().addAll(leftVBox, rightVBox); mainBox.setSpacing(SPACING * 2); return mainBox; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void buildControls() {\n\t\tsetLayout(new FillLayout());\n\t\tSashForm child = new SashForm(this, SWT.VERTICAL);\n\t\ttable = new Table(child, SWT.FULL_SELECTION | SWT.MULTI | SWT.BORDER );\n\t\ttable.addSelectionListener(createSelctionListener());\n\t\tviewer = buildAndLayoutTable(table);\n\t\taddDNDSuppo...
[ "0.6239742", "0.5996901", "0.57207793", "0.56797075", "0.5515573", "0.5475491", "0.5445119", "0.5406112", "0.5402976", "0.5374772", "0.5354567", "0.5352003", "0.53517556", "0.53432083", "0.5331106", "0.53305084", "0.529493", "0.5293143", "0.5283078", "0.5257811", "0.5250416",...
0.5761435
2
Purpose: assign diagnosis info for participants
private void assignDiagnosisInfo( String cosmoId ) { String[] info = helper.retrieveHealthStatusInfo(cosmoId); familyPhysicianTxt.setText(info[0]); physicianPhoneTxt.setText(info[1]); participantDiagnosisTxt.setText(info[2]); tylenolGiven.setSelected(Boolean.parseBoolean(info[3])); careGiverPermission.setSelected(Boolean.parseBoolean(info[4])); dateCompletedTxt.setText(info[5]); otherInfoTxt.setText(info[6]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void makeDiagnosis(Patient patient, String diagnosis) {\n patient.setDiagnosis(diagnosis);\n }", "@Override\r\n\tpublic void patientDisease() {\n\t\t\r\n\t\tSystem.out.println(\"Here I have attached the patients information\");\r\n\t\t\r\n\t}", "String diagnosis(String patient) {\n ret...
[ "0.6785023", "0.63479346", "0.6244886", "0.60178393", "0.58852166", "0.5814179", "0.58051306", "0.5602142", "0.5431959", "0.5360442", "0.52982813", "0.52583337", "0.5123187", "0.5057368", "0.504953", "0.5025888", "0.50024575", "0.49999827", "0.49978983", "0.49768692", "0.4965...
0.6552759
1
Purpose: Create the medical conditions table
private VBox createMedicalConditions( String cosmoId ) { VBox box = new VBox(); HBox controls = new HBox(); HBox buttons = new HBox(); Label medicalCondtionsLbl = new Label("Medical Conditions"); medicalCondtionsLbl.setFont(Font.font(22)); Button btnAddMedicalCondition = new Button("Add"); Button btnEditMedicalCondition = new Button("Edit"); Button btnDeleteMedicalCondition = new Button("Delete"); MedicalConditionsTableViewController controller = new MedicalConditionsTableViewController( cosmoId); TableView<QueryResult> table = controller.conditionTable; // Add the medical condition btnAddMedicalCondition .setOnMouseClicked(event -> { ManageMedicalConditionGUI manageMedicalCondition = new ManageMedicalConditionGUI( parentStage); manageMedicalCondition.showAddMedicalCondition(cosmoId); controller.refreshTable(cosmoId); }); // Editing a medical condition btnEditMedicalCondition .setOnMouseClicked(event -> { QueryResult condition = controller .getSelectedMedicalCondition(); if ( condition == null ) { Stage stage = new Stage(); PopUpMessage popup = new PopUpMessage( "Must select a medical condition to edit", stage); Scene scene = new Scene(popup.root, 300, 75); stage.initModality(Modality.APPLICATION_MODAL); stage.initOwner(parentStage); stage.setScene(scene); stage.showAndWait(); } else { ManageMedicalConditionGUI manageMedicalCondition = new ManageMedicalConditionGUI( parentStage); manageMedicalCondition.showUpdateMedicalCondition( condition, cosmoId); controller.refreshTable(cosmoId); } }); btnDeleteMedicalCondition .setOnMouseClicked(event -> { QueryResult condition = controller .getSelectedMedicalCondition(); if ( condition == null ) { Stage stage = new Stage(); PopUpMessage popup = new PopUpMessage( "Must select a medical condition to delete", stage); Scene scene = new Scene(popup.root, 300, 75); stage.initModality(Modality.APPLICATION_MODAL); stage.initOwner(parentStage); stage.setScene(scene); stage.showAndWait(); } else { Stage stage = new Stage(); PopUpCheck popup = new PopUpCheck( "Are you sure you want to delete the selected medical condition ?", stage); Scene scene = new Scene(popup.root, 450, 75); stage.initModality(Modality.APPLICATION_MODAL); stage.initOwner(parentStage); stage.setScene(scene); stage.showAndWait(); if ( popup.runCheck() ) { QueryResult.deleteCondition(table .getSelectionModel().getSelectedItem(), cosmoID); } controller.refreshTable(cosmoID); } }); if ( !(this.loggedInUser instanceof MedicalAdministrator) ) { btnAddMedicalCondition.setVisible(false); btnEditMedicalCondition.setVisible(false); btnDeleteMedicalCondition.setVisible(false); } buttons.getChildren().addAll(btnAddMedicalCondition, btnEditMedicalCondition, btnDeleteMedicalCondition); controls.getChildren().addAll(buttons); table.setMaxWidth(700); buttons.setSpacing(5); controls.setSpacing(380); box.getChildren().addAll(medicalCondtionsLbl, table, controls); return box; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void testAllMedicalConditionParametersPopulated() {\n Map<String, MedicalCondition> conditions = cache.getConditions(Service.NOTIFY);\n MedicalCondition condition = conditions.get(DIABETES_CONDITION);\n\n assertNotNull(condition);\n\n assertEquals(\"DIAB\", condition.getID());\n ...
[ "0.6140683", "0.5676381", "0.5662839", "0.54996175", "0.5472869", "0.54023695", "0.53997916", "0.5334643", "0.53324145", "0.528216", "0.5255567", "0.52097994", "0.52007186", "0.5139336", "0.5117623", "0.50864244", "0.5081693", "0.50706685", "0.5069354", "0.5029215", "0.502314...
0.5146781
13
Purpose: Create the allergies info for the participant
private VBox createAllergiesInfo( String cosmoID ) { VBox box = new VBox(); HBox controls = new HBox(); HBox buttons = new HBox(); Label allergiesLbl = new Label("Allergies"); allergiesLbl.setFont(Font.font(22)); Button btnAddAllergy = new Button("Add"); Button btnEditAllergy = new Button("Edit"); Button btnDelAllergy = new Button("Delete"); buttons.getChildren().addAll(btnAddAllergy, btnEditAllergy, btnDelAllergy); controls.getChildren().addAll(buttons); AllergiesTableViewController controller = new AllergiesTableViewController( cosmoID + ""); TableView<Allergies> table = controller.allergiesTable; btnEditAllergy.setOnAction(event -> { Allergies allergy = controller.getSelectedAllergy(); // If there is no allergy selected, then display a message if ( allergy == null ) { Stage stage = new Stage(); PopUpMessage popup = new PopUpMessage( "Must select an allergy to edit", stage); Scene scene = new Scene(popup.root, 300, 75); stage.initModality(Modality.APPLICATION_MODAL); stage.initOwner(parentStage); stage.setScene(scene); stage.showAndWait(); } else { ManageAllergyGUI manageAllergies = new ManageAllergyGUI( parentStage); manageAllergies.showUpdateAllergy(table.getSelectionModel() .getSelectedItem(), cosmoID); controller.refreshTable(cosmoID); } }); btnAddAllergy .setOnAction(event -> { ManageAllergyGUI manageAllergies = new ManageAllergyGUI( parentStage); manageAllergies.showAddAllergy(cosmoID); controller.refreshTable(cosmoID); }); btnDelAllergy .setOnAction(event -> { Allergies allergy = controller.getSelectedAllergy(); if ( allergy == null ) { Stage stage = new Stage(); PopUpMessage popup = new PopUpMessage( "Must select an allergy to delete", stage); Scene scene = new Scene(popup.root, 300, 75); stage.initModality(Modality.APPLICATION_MODAL); stage.initOwner(parentStage); stage.setScene(scene); stage.showAndWait(); } else { Stage stage = new Stage(); PopUpCheck popup = new PopUpCheck( "Are you sure you want to delete the selected allergy ?", stage); Scene scene = new Scene(popup.root, 300, 75); stage.initModality(Modality.APPLICATION_MODAL); stage.initOwner(parentStage); stage.setScene(scene); stage.showAndWait(); if ( popup.runCheck() ) { Allergies.deleteAllergy(table.getSelectionModel() .getSelectedItem(), cosmoID); } controller.refreshTable(cosmoID); } }); table.setMaxWidth(700); buttons.setSpacing(5); controls.setSpacing(485); if ( !(this.loggedInUser instanceof MedicalAdministrator) ) { btnAddAllergy.setVisible(false); btnEditAllergy.setVisible(false); btnDelAllergy.setVisible(false); } box.getChildren().addAll(allergiesLbl, table, controls); return box; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void createAllergyRecords(final Context context, final HashMap<String, String> data) {\n\n // Set initial state\n loader.setVisibility(View.VISIBLE);\n allergyRecyclerViewList.setVisibility(View.GONE);\n\n // Url\n String url = ServiceUrls.KEY_HEALTHBOOK_ALLERGIES.c...
[ "0.568192", "0.5229672", "0.52070576", "0.5067551", "0.50493574", "0.4947311", "0.49245158", "0.49123472", "0.49056888", "0.4905001", "0.4896372", "0.48657566", "0.48552564", "0.48460445", "0.48414952", "0.4833639", "0.4817034", "0.48144305", "0.48109978", "0.48044595", "0.47...
0.0
-1
Purpose: Create the medications info for the participant
private VBox createMedicationInfo( String cosmoId ) { VBox box = new VBox(); HBox controls = new HBox(); HBox buttons = new HBox(); Label medicationsLbl = new Label("Medications"); medicationsLbl.setFont(Font.font(22)); Button btnAddMedication = new Button("Add"); Button btnEditMedication = new Button("Edit"); Button btnDeleteMedication = new Button("Delete"); MedicationsTableViewController controller = new MedicationsTableViewController( cosmoId); TableView<Medication> table = controller.medicationsTable; btnAddMedication.setOnAction(event -> { ManageMedicationGUI manageMedicaiton = new ManageMedicationGUI( parentStage); manageMedicaiton.showAddMedication(cosmoId); controller.refreshTable(cosmoId); }); // Handle the editing of a medication btnEditMedication .setOnAction(event -> { // Get the selected medication Medication med = controller.getSelectedMedication(); if ( med == null ) { Stage stage = new Stage(); PopUpMessage popup = new PopUpMessage( "Must select an entry to edit", stage); Scene scene = new Scene(popup.root, 300, 75); stage.initModality(Modality.APPLICATION_MODAL); stage.initOwner(parentStage); stage.setScene(scene); stage.showAndWait(); } else { ManageMedicationGUI manageMedication = new ManageMedicationGUI( parentStage); manageMedication.showUpdateMedication(cosmoId, med); controller.refreshTable(cosmoId); } }); btnDeleteMedication .setOnAction(event -> { Medication med = controller.getSelectedMedication(); if ( med == null ) { Stage stage = new Stage(); PopUpMessage popup = new PopUpMessage( "Must select a medication entry to delete", stage); Scene scene = new Scene(popup.root, 300, 75); stage.initModality(Modality.APPLICATION_MODAL); stage.initOwner(parentStage); stage.setScene(scene); stage.showAndWait(); } else { Stage stage = new Stage(); PopUpCheck popup = new PopUpCheck( "Are you sure you want to delete the selected medication entry ?", stage); Scene scene = new Scene(popup.root, 450, 75); stage.initModality(Modality.APPLICATION_MODAL); stage.initOwner(parentStage); stage.setScene(scene); stage.showAndWait(); if ( popup.runCheck() ) { Medication.removeMedication(med.getMedicationName() .get(), cosmoID); controller.refreshTable(cosmoID); } } }); buttons.getChildren().addAll(btnAddMedication, btnEditMedication, btnDeleteMedication); controls.getChildren().addAll(buttons); table.setMaxWidth(700); buttons.setSpacing(5); controls.setSpacing(450); if ( !(this.loggedInUser instanceof MedicalAdministrator) ) { btnAddMedication.setVisible(false); btnDeleteMedication.setVisible(false); btnEditMedication.setVisible(false); } box.getChildren().addAll(medicationsLbl, table, controls); return box; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void crearmedico(Medico medicoSelec) {\n\t\tmedicoMapper.crearmedico(medicoSelec);\n\t}", "@Override\n\tpublic DAOIncidencias CrearInformesMedicos() {\n\t\treturn null;\n\t}", "private void makeMedicine() {\n\t\teating = true;\n\t\ttama.setLayoutX(200);\n\n\t\tmedicine = new Sprite(3, 3, 540, 478, new I...
[ "0.5511747", "0.5457669", "0.5433063", "0.53954244", "0.5342851", "0.53198934", "0.528255", "0.52398616", "0.5219671", "0.5203423", "0.51763123", "0.51744646", "0.5155609", "0.5155379", "0.5153329", "0.51486886", "0.51478106", "0.51467305", "0.50879407", "0.5081146", "0.50622...
0.46270263
96
TODO Autogenerated method stub
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String bscPeriod = request.getParameter("bscPeriod"); String department = request.getParameter("department"); String position = request.getParameter("position"); String bscEmployeeName = null; if (position.equals("Executive Manager Business Banking")){ bscEmployeeName = "NOZIZWE MULELA"; } else if (position.equals("Executive Manager Corporate Services")){ bscEmployeeName = "THEMBI DLAMINI"; }else if (position.equals("Executive Manager Credit")){ bscEmployeeName = "DUMASE NXUMALO"; }else if (position.equals("Executive Manager Finance")){ bscEmployeeName = "ZANELE DLAMINI"; }else if (position.equals("Executive Manager Internal Audit")){ bscEmployeeName = "TAWONGA SIFUNDZA"; }else if (position.equals("Executive Manager IT")){ bscEmployeeName = "PAUL WASWA"; }else if (position.equals("Executive Manager Legal and Board Secretary")){ bscEmployeeName = "SIFISO MDLULI"; }else if (position.equals("Executive Manager Marketing")){ bscEmployeeName = "LINDIWE SHONGWE"; }else if (position.equals("Executive Manager Operations")){ bscEmployeeName = "ENOC MAVIMBELA"; } String bscEmployeeSupervisor = "ZAKELE LUKHELE"; String subDepartment = "Exco"; String[] perspectives = request.getParameterValues("perspective"); String[] objectives = request.getParameterValues("objective"); String[] periods = request.getParameterValues("period"); String[] reportingFrequencies = request.getParameterValues("reportingFrequency"); String[] measures = request.getParameterValues("measure"); String[] bases = request.getParameterValues("base"); String[] stretches = request.getParameterValues("stretch"); String[] actuals = request.getParameterValues("actual"); ConnectionHelper connectionHelper = new ConnectionHelper(); con = connectionHelper.connect(); if (con != null) { String insertIssueSql = "INSERT INTO [dbo].[bscSDSBExcoScores] " + "([bscEmployeeName] " + ",[bscEmployeeSupervisor]" + ",[position]" + ",[department] " + ",[subDepartment] " + ",[bscPeriod] " + ",[perspective] " + ",[objective] " + ",[period] " + ",[reportingFrequencies] " + ",[measure] " + ",[base] " + ",[stretch] " + ",[actual]) " + "VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?)"; try { java.sql.PreparedStatement insertReportStatement = con.prepareStatement(insertIssueSql); for (int i = 0; i < measures.length; i++) { insertReportStatement.setString(1, bscEmployeeName); insertReportStatement.setString(2, bscEmployeeSupervisor); insertReportStatement.setString(3, position); insertReportStatement.setString(4, department); insertReportStatement.setString(5, subDepartment); insertReportStatement.setString(6, bscPeriod); insertReportStatement.setString(7, perspectives[i]); insertReportStatement.setString(8, objectives[i]); insertReportStatement.setString(9, periods[i]); insertReportStatement.setString(10, reportingFrequencies[i]); insertReportStatement.setString(11, measures[i]); insertReportStatement.setFloat(12, Float.valueOf(bases[i])); insertReportStatement.setFloat(13, Float.valueOf(stretches[i])); insertReportStatement.setFloat(14, Float.parseFloat(actuals[i])); System.out.println(Float.parseFloat(actuals[i])); insertReportStatement.executeUpdate(); } insertReportStatement.close(); con.close(); RequestDispatcher view = request .getRequestDispatcher("WEB-INF/technicalResources_bsc/bscExcoHome.jsp"); view.forward(request, response); } catch (SQLException e) { e.printStackTrace(); } finally { if (con != null) { try { ConnectionHelper.disconnect(con); } catch (SQLException e) { 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
1. Read the queries from trec topics
public static void out_top_results(Similarity similarity, String algorithmName) throws IOException, ParseException, IllegalAccessException, IllegalArgumentException, InvocationTargetException, NoSuchMethodException, SecurityException { TrecTopicsReader trecTopicReader = new TrecTopicsReader(); BufferedReader bufferedReader = new BufferedReader(new FileReader(Intialize.topicPath)); QualityQuery[] qualityQueries = trecTopicReader.readQueries(bufferedReader); // 2. Get calculate query score each document for(int queryIndex=0; queryIndex < qualityQueries.length; queryIndex++) { QualityQuery qualityQuery = qualityQueries[queryIndex]; String queryID = qualityQuery.getQueryID(); { String titleQuery = qualityQuery.getValue(Intialize.queryTitle); String cleanedTitleQuery = title_cleaning(titleQuery); scoreTrack titleQueryScore = EasySearch.query_scores(cleanedTitleQuery, queryID, similarity); String OutputFilePath = Intialize.outputDir + "/" + algorithmName + "ShortQuery" + ".txt"; titleQueryScore.write_top_results(OutputFilePath); } { String descQuery = qualityQuery.getValue(Intialize.queryDesc); String cleanedDescQuery = desc_cleaning(descQuery); scoreTrack descQueryScore = EasySearch.query_scores(cleanedDescQuery, queryID, similarity); String OutputFilePath = Intialize.outputDir + "/" + algorithmName + "LongQuery" + ".txt"; descQueryScore.write_top_results(OutputFilePath); } } System.out.println("All the queries have executed successfully."); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void convertTopics() throws Exception {\r\n final File file = new File(TOPICS);\r\n if(!file.exists()) {\r\n Main.outln(\"Could not read \\\"\" + file.getAbsolutePath() + \"\\\"\");\r\n return;\r\n }\r\n \r\n // scan all queries\r\n final FileInputStream fis = new FileInputS...
[ "0.7326416", "0.63344276", "0.5924003", "0.5707027", "0.56601113", "0.55950797", "0.5566224", "0.5547549", "0.5460037", "0.54229045", "0.54147595", "0.5414062", "0.5381646", "0.53239685", "0.5273119", "0.52565277", "0.5227811", "0.5223653", "0.52235967", "0.520545", "0.519010...
0.0
-1
Method to return rows and columns
public Piece piece(int row, int column) { if(!positionExists(row, column)) { throw new BoardException("Position not in the board"); } return pieces[row][column]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getCols();", "public int[] getRowAndCol() {\n return new int[]{myRow, myCol};\n }", "int getColumns();", "int getColumns();", "public int row();", "int getRows();", "int getRows();", "int getCol();", "public abstract int rows();", "public T cols( int begin, int end ) {\n ret...
[ "0.7623844", "0.7397305", "0.71701676", "0.71701676", "0.6813251", "0.66108936", "0.66108936", "0.6562348", "0.65534323", "0.6536029", "0.6479477", "0.6479477", "0.63628775", "0.63627726", "0.636102", "0.6340867", "0.6332392", "0.6312427", "0.6308165", "0.62985283", "0.622007...
0.0
-1
Method to return rows and columns from a position
public Piece piece(Position position) { if(!positionExists(position)) { throw new BoardException("Position not in the board"); } return pieces[position.getRow()][position.getColumn()]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private int colPos(int pos) {\r\n return pos % squareDimension;\r\n }", "private int rowPos(int pos) {\r\n return pos / squareDimension;\r\n }", "public int getPositionColumn(){return this.positionColumn;}", "public int[] getRowAndCol() {\n return new int[]{myRow, myCol};\n }", "private i...
[ "0.69820833", "0.67766404", "0.64967597", "0.6399086", "0.63811946", "0.6351856", "0.6345439", "0.63116395", "0.628212", "0.6217975", "0.6217975", "0.61796355", "0.61766934", "0.61477786", "0.61410767", "0.61313146", "0.61313146", "0.611871", "0.6098191", "0.60792017", "0.605...
0.0
-1
Method to put a piece on the board
public void placePiece(Piece piece, Position position) { if(thereIsAPiece(position)) { throw new BoardException("There is already a piece on position " + position); } pieces[position.getRow()][position.getColumn()] = piece; piece.position = position; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void putPiece(Piece piece, int x, int y)\r\n {\r\n if(isValidSqr(x, y))\r\n {\r\n board[x][y] = piece;\r\n if(piece != null) piece.setLocation(x, y);\r\n }\r\n }", "private void placePiece() {\r\n pieces[numPieces] = getRandomPoint();\r\n Game...
[ "0.80589724", "0.7430016", "0.74111587", "0.7395388", "0.73646826", "0.7344832", "0.72675633", "0.72510916", "0.72412825", "0.72214353", "0.71631074", "0.71436393", "0.7098667", "0.70555884", "0.7048538", "0.70078033", "0.69482046", "0.69063115", "0.6892616", "0.67919797", "0...
0.7319154
6
METHOD TO REMOVE A PIECE
public Piece removePiece(Position position) { if(!positionExists(position)) { throw new BoardException("Position not in the board"); } if(piece(position) == null) { return null; } Piece aux = piece(position); aux.position = null; pieces[position.getRow()][position.getColumn()] = null; return aux; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void removePaper(ConferencePaper pape){\r\n\t\tpapers.remove(pape);\r\n\t}", "public void remove () {}", "public void remove();", "public void remove();", "public void remove();", "public void remove();", "public void remove();", "void remove();", "void remove();", "void remove();", "voi...
[ "0.7179828", "0.68179834", "0.67560333", "0.67560333", "0.67560333", "0.67560333", "0.67560333", "0.66411805", "0.66411805", "0.66411805", "0.66411805", "0.66411805", "0.6606122", "0.6552649", "0.6552649", "0.6535588", "0.6535588", "0.6531792", "0.6497706", "0.64948124", "0.6...
0.0
-1
Method to verify if the position exists
private boolean positionExists(int row, int column) { return row >= 0 && row < rows && column >= 0 && column < columns; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean hasPosition();", "boolean hasPosition();", "boolean hasPosition();", "boolean hasPosition();", "@java.lang.Override\n public boolean hasPosition() {\n return position_ != null;\n }", "@java.lang.Override\n public boolean hasPosition() {\n return position_ != null;\n }", "p...
[ "0.8195138", "0.8195138", "0.8195138", "0.8195138", "0.78482956", "0.78482956", "0.7313655", "0.7313655", "0.7216532", "0.70947814", "0.70947814", "0.70947814", "0.7035529", "0.7035529", "0.7008975", "0.6702661", "0.66240567", "0.6621702", "0.66143835", "0.66000724", "0.65364...
0.7550546
6
Methode zum Einlesen von Artikeldaten aus einer Datei.
public void liesDaten(String datei) throws IOException { // PersistenzManager fuer Lesevorgaenge oeffnen pm.openForReading(datei); Artikel einArtikel; do { // Artikel-Objekt einlesen einArtikel = pm.ladeArtikel(); if (einArtikel != null) { // Artikel in die Liste einfuegen try { einfuegen(einArtikel); } catch (ArtikelExistiertBereitsException e) { System.err.println(e.getMessage()); e.printStackTrace(); } } } while (einArtikel != null); // Persistenz-Schnittstelle wieder schließen pm.close(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void liesDaten(String datei) throws IOException {\n pm.openForReading(datei);\n Artikel einArtikel;\n do {\n einArtikel = pm.ladeArtikel();\n if (einArtikel != null) {\n try {\n einfuegen(einArtikel);\n } catch (Arti...
[ "0.6195844", "0.6186897", "0.614107", "0.6057681", "0.6044791", "0.6023093", "0.60104007", "0.59560204", "0.5746081", "0.5729683", "0.5607599", "0.5514975", "0.5478998", "0.5473427", "0.5451465", "0.5433492", "0.54224914", "0.53913945", "0.5359475", "0.5357769", "0.53300446",...
0.6312389
0
Methode zum Schreiben der Artikeldaten in eine Datei.
public synchronized void schreibeDaten(String datei) throws IOException { // PersistenzManager fuer Schreibvorgaenge oeffnen pm.openForWriting(datei); if (!artikelBestand.isEmpty()) { Iterator<Artikel> iter = artikelBestand.iterator(); while (iter.hasNext()) { pm.speichereArtikel(iter.next()); } } // Persistenz-Schnittstelle wieder schließen pm.close(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic String toString() {\n\t\treturn \"Anfangsdatum: \" + this.get_Datum() \n\t\t\t\t+ \", Thema: \" + this.get_thema() \n\t\t\t\t+ \", Art: Theoriestunde\";\n\t}", "public void art() {\n arJ();\n }", "public void trenneVerbindung();", "void initData() {\r\n\t\tthis.daVinci = new Art...
[ "0.6179102", "0.61665034", "0.60283595", "0.5997865", "0.59290534", "0.59125364", "0.58851546", "0.58710593", "0.5768945", "0.5764728", "0.57645696", "0.5760516", "0.5750961", "0.57457864", "0.5734215", "0.57220894", "0.5718163", "0.5700141", "0.56934434", "0.5650772", "0.565...
0.5437076
39
Methode zum einfuegen eines Artikels in den Bestand.
public void einfuegen(Artikel artikel) throws ArtikelExistiertBereitsException { if (!artikelBestand.contains(artikel)) artikelBestand.add(artikel); else throw new ArtikelExistiertBereitsException(artikel, " - in 'einfuegen()'"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Artist getByName(String name);", "public Artista(String nombreArtista) {\n this.nombreArtista = nombreArtista;\n }", "public Vector<Artista> findAllArtisti();", "public Artikel ladeArtikel() throws IOException, ClassNotFoundException {\n \n Artikel artikel = liesArtikel(ois); //liesAr...
[ "0.6304432", "0.6239338", "0.62288415", "0.622541", "0.61692744", "0.6118973", "0.61117566", "0.6068615", "0.60584736", "0.59791726", "0.59548604", "0.59197384", "0.5844439", "0.58266187", "0.5798594", "0.57163846", "0.5680318", "0.56397796", "0.56354094", "0.56007296", "0.55...
0.5249741
39
Methode zum veraendern des Bestands eines Artikels.
public synchronized void bestandVeraendern(int artikelnummer, int anzahl) throws ArtikelExistiertNichtException, ArtikelBestandIstKeineVielfacheDerPackungsgroesseException { int index = -1; Iterator<Artikel> iter = artikelBestand.iterator(); while (iter.hasNext()) { Artikel artikel = iter.next(); if (artikel.getArtikelnummer() == artikelnummer) index = artikelBestand.indexOf(artikel); } if (index != -1) { artikelBestand.get(index).setBestand(artikelBestand.get(index).getBestand() + anzahl); } else throw new ArtikelExistiertNichtException(artikelnummer, " - in 'bestandErhoehen()'"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void art() {\n arJ();\n }", "public Artikel ladeArtikel() throws IOException, ClassNotFoundException {\n \n Artikel artikel = liesArtikel(ois); //liesArtikel(ois);\n \n return artikel;\n }", "public Artist getByName(String name);", "public Artista(String nombreArtista) {\n...
[ "0.6300663", "0.6094329", "0.60801977", "0.5957038", "0.59349054", "0.58793724", "0.5853761", "0.58498394", "0.58391804", "0.5834491", "0.5797582", "0.5788646", "0.57476866", "0.57439655", "0.5721831", "0.5683242", "0.56685495", "0.56435543", "0.55779785", "0.5497485", "0.547...
0.55265456
19
Methode die anhand der Artikelnummer einen Artikel zurueckgibt.
public Artikel getArtikel(int artikelnummer) throws ArtikelExistiertNichtException { Iterator<Artikel> iter = artikelBestand.iterator(); while (iter.hasNext()) { Artikel artikel = iter.next(); if (artikel.getArtikelnummer() == artikelnummer) { return artikel; } } throw new ArtikelExistiertNichtException(artikelnummer, " - in 'getArtikel()'"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getArtikelNummer() {\r\n\t\treturn artikelNummer;\r\n\t}", "void setNumberOfArtillery(int artillery);", "int getNumberOfArtillery();", "public int getArtikelAnzahl(){\n return key;\n }", "public Artista(String nombreArtista) {\n this.nombreArtista = nombreArtista;\n }", "pu...
[ "0.71120006", "0.62894744", "0.62544614", "0.6003388", "0.5907314", "0.5903714", "0.5728131", "0.5722145", "0.57089746", "0.56430346", "0.5602518", "0.55733895", "0.5518255", "0.5505051", "0.5473813", "0.5470473", "0.546962", "0.5444437", "0.5430447", "0.5423384", "0.54055595...
0.55048746
14
Methode um Artikel mit einer bestimmten Artikelnummer im Bestand zu suchen. Es wird eine Liste von Artikeln zurueckgegeben.
public List<Artikel> sucheArtikel(int artikelnummer) { List<Artikel> ergebnis = new Vector<Artikel>(); Iterator<Artikel> iter = artikelBestand.iterator(); while (iter.hasNext()) { Artikel artikel = iter.next(); if (artikel.getArtikelnummer() == artikelnummer) { ergebnis.add(artikel); } } Collections.sort(ergebnis, new SortierungNachArtikelnummer()); return ergebnis; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static List<Art> getArts() {\n try {\n List<Art> list = new ArrayList<>();\n Connection connection = Connector.getConnection();\n if (connection != null) {\n Statement statement = connection.createStatement();\n ResultSet rs = statement.e...
[ "0.6304152", "0.6265642", "0.6249132", "0.6150078", "0.60887265", "0.60175574", "0.6004223", "0.6000557", "0.5951123", "0.59320885", "0.5883628", "0.58667725", "0.58414114", "0.5829945", "0.58278674", "0.5783915", "0.5767745", "0.57418716", "0.57393044", "0.56749666", "0.5668...
0.603548
5
Methode um Artikel mit einer bestimmten Bezeichnug im Bestand zu suchen. Es wird eine Liste von Artikeln zurueckgegeben.
public List<Artikel> sucheArtikel(String bezeichnung) { List<Artikel> ergebnis = new Vector<Artikel>(); Iterator<Artikel> iter = artikelBestand.iterator(); while (iter.hasNext()) { Artikel artikel = iter.next(); if (artikel.getBezeichnung().toLowerCase().contains(bezeichnung.toLowerCase())) { ergebnis.add(artikel); } } Collections.sort(ergebnis, new SortierungNachBezeichnung()); return ergebnis; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<Artikel> sucheArtikel(String bezeichnung) {\n List<Artikel> suchErg = new Vector();\n Iterator<Artikel> it = artikelBestand.iterator();\n\n while (it.hasNext()) {\n Artikel artikel = it.next();\n if (artikel.getBezeichnung().equals(bezeichnung)) {\n ...
[ "0.63812625", "0.6228153", "0.6090067", "0.6020937", "0.596362", "0.5958042", "0.5810111", "0.57470506", "0.5730471", "0.5723331", "0.5650073", "0.5649853", "0.5635422", "0.5618715", "0.56108034", "0.5584959", "0.55648845", "0.5532375", "0.5509866", "0.55053556", "0.54821104"...
0.62012196
2
Methode um einen Artikel aus dem Bestand zu entfernen.
public synchronized void entfernen(int artikelnummer) throws ArtikelExistiertNichtException { int index = -1; Iterator<Artikel> iter = artikelBestand.iterator(); while (iter.hasNext()) { Artikel artikel = iter.next(); if (artikel.getArtikelnummer() == artikelnummer) index = artikelBestand.indexOf(artikel); } if (index != -1) artikelBestand.remove(index); else throw new ArtikelExistiertNichtException(artikelnummer, " - in 'entfernen()'"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Artista(String nombreArtista) {\n this.nombreArtista = nombreArtista;\n }", "public Artikel ladeArtikel() throws IOException, ClassNotFoundException {\n \n Artikel artikel = liesArtikel(ois); //liesArtikel(ois);\n \n return artikel;\n }", "void addArt(Art art);", "public L...
[ "0.6186103", "0.6005907", "0.59985614", "0.5955952", "0.58440894", "0.5786125", "0.57848924", "0.577486", "0.57505745", "0.57288027", "0.5727832", "0.5719394", "0.5633891", "0.56329536", "0.5582575", "0.55223197", "0.5496651", "0.5490784", "0.54185903", "0.54013485", "0.53920...
0.491261
49
Methode die den Artikelbestand zurueckgibt.
public List<Artikel> getArtikelBestand() { List<Artikel> ergebnis = new Vector<Artikel>(); ergebnis.addAll(artikelBestand); return ergebnis; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void art() {\n arJ();\n }", "public Artist getByName(String name);", "public Artista(String nombreArtista) {\n this.nombreArtista = nombreArtista;\n }", "public interface Gallery {\n\n /**\n * Add the specified art piece to the gallery, replacing an equivalent in the gallery...
[ "0.6398399", "0.6250588", "0.62246794", "0.6204414", "0.6181791", "0.6104194", "0.5947873", "0.589914", "0.58705175", "0.58682895", "0.58276415", "0.5777072", "0.5751182", "0.5715911", "0.5635335", "0.5620645", "0.56089675", "0.5604346", "0.56032693", "0.55717945", "0.5553366...
0.5775416
12
Methode die den Artikelbestand sortiert nach Artikelnummer zurueck gibt.
public List<Artikel> getArtikelBestandSortiertNachArtikelnummer() { List<Artikel> ergebnis = new Vector<Artikel>(); ergebnis.addAll(artikelBestand); Collections.sort(ergebnis, new SortierungNachArtikelnummer()); return ergebnis; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<Artikel> getArtikelBestandSortiertNachBezeichnung() {\n\t\tList<Artikel> ergebnis = new Vector<Artikel>();\n\t\tergebnis.addAll(artikelBestand);\n\t\tCollections.sort(ergebnis, new SortierungNachBezeichnung());\n\t\treturn ergebnis;\n\t}", "public List<Artikel> sucheArtikel(int artikelnummer) {\n\t\t...
[ "0.7264808", "0.669605", "0.6111226", "0.6003782", "0.5981463", "0.5978907", "0.5940729", "0.59306425", "0.588833", "0.5881973", "0.5852357", "0.58193886", "0.5790051", "0.5780042", "0.5773376", "0.57659036", "0.57653385", "0.57478684", "0.5746718", "0.5731007", "0.5718007", ...
0.76555955
0
Methode die den Artikelbestand sortiert nach Bezeichnung zurueck gibt.
public List<Artikel> getArtikelBestandSortiertNachBezeichnung() { List<Artikel> ergebnis = new Vector<Artikel>(); ergebnis.addAll(artikelBestand); Collections.sort(ergebnis, new SortierungNachBezeichnung()); return ergebnis; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<Artikel> getArtikelBestandSortiertNachArtikelnummer() {\n\t\tList<Artikel> ergebnis = new Vector<Artikel>();\n\t\tergebnis.addAll(artikelBestand);\n\t\tCollections.sort(ergebnis, new SortierungNachArtikelnummer());\n\t\treturn ergebnis;\n\t}", "private void sortAlphabet()\n {\n for(int i = ...
[ "0.72881097", "0.6531445", "0.6416737", "0.63593227", "0.6338343", "0.629277", "0.6171808", "0.61656374", "0.6162329", "0.60830694", "0.6080412", "0.6078787", "0.60732806", "0.605076", "0.60240597", "0.6020145", "0.5988709", "0.59828264", "0.59585184", "0.59540737", "0.595248...
0.7601154
0
Methode zum bearbeiten eines Artikels.
public synchronized void bearbeiten(int artikelnummer, double preis, String bezeichnung) throws ArtikelExistiertNichtException{ Artikel artikel = getArtikel(artikelnummer); artikel.setPreis(preis); artikel.setBezeichnung(bezeichnung); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void verarbeite() {\n\t\t\r\n\t}", "public void editarArtista() {\n\t\tArrayList<String> listString = new ArrayList<>();\r\n\t\tArrayList<ArtistaMdl> listArtista = new ArrayList<>();\r\n\t\tString[] possibilities = pAController.getArtista();\r\n\t\tfor (String s : possibilities) {\r\n\t\t\tString text = s...
[ "0.67374396", "0.63084537", "0.6220865", "0.61278373", "0.6092817", "0.6092232", "0.59749746", "0.59510887", "0.5947656", "0.58914304", "0.5891023", "0.5883984", "0.58786374", "0.5875738", "0.58658284", "0.57275003", "0.56790704", "0.5658086", "0.5622907", "0.5567233", "0.556...
0.5465661
27
for junit test only
public MTPostEditDistanceReportGenerator() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\t\t\tpublic void test() {\n\t\t\t}", "private void test() {\n\n\t}", "@Test\r\n\tpublic void test() {\r\n\t}", "@org.junit.Test\r\n\tpublic void test() {\n\t\t\t\t\r\n\t}", "@Test\r\n\tpublic void testSanity() {\n\t}", "@Override\n public void test() {\n \n }", "@Test\n\tvoid...
[ "0.76465076", "0.72604793", "0.7159581", "0.70973766", "0.70672655", "0.70668393", "0.7065871", "0.70353997", "0.7018654", "0.70059586", "0.70059586", "0.6931894", "0.6889554", "0.68749577", "0.6854958", "0.6837814", "0.6831235", "0.68105125", "0.6803497", "0.6802731", "0.679...
0.0
-1
Find MTed jobs and target locales.
private void findMTedJobs(List<Job> jobs, List<GlobalSightLocale> p_selectedTargetLocales, List<Job> mtedJobs, List<GlobalSightLocale> mtedTargetLocales) { Set<GlobalSightLocale> selectedTargetLocales = new HashSet<GlobalSightLocale>(); selectedTargetLocales.addAll(p_selectedTargetLocales); Set<Job> mtedJobsSet = new HashSet<Job>(); Set<GlobalSightLocale> mtedTargetLocalesSet = new HashSet<GlobalSightLocale>(); for (Job job : jobs) { for (Workflow w : job.getWorkflows()) { GlobalSightLocale gsl = w.getTargetLocale(); if (w.getMtTotalWordCount() > 0 && selectedTargetLocales.contains(gsl)) { mtedTargetLocalesSet.add(w.getTargetLocale()); mtedJobsSet.add(job); } } } mtedTargetLocales.addAll(mtedTargetLocalesSet); SortUtil.sort(mtedTargetLocales, new GlobalSightLocaleComparator(GlobalSightLocaleComparator.ISO_CODE, Locale.US)); mtedJobs.addAll(mtedJobsSet); SortUtil.sort(mtedJobs, new JobComparator(JobComparator.JOB_ID, Locale.US)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void searchJobs(String searchTerm) {\n\n for (int i = 0; i > PostJob.allJobs.size(); i++) {\n\n\n if (PostJob.allJobs.contains(searchTerm)) {\n int itemIndx = PostJob.allJobs.indexOf(searchTerm);\n String output = PostJob.allJobs.get(itemIndx);\n ...
[ "0.5122276", "0.4905143", "0.4873564", "0.48549938", "0.4829533", "0.48212972", "0.48094434", "0.47265846", "0.47250402", "0.4658697", "0.46579278", "0.4627973", "0.46210712", "0.45839867", "0.45416692", "0.45396575", "0.45257285", "0.4514299", "0.45099574", "0.4476401", "0.4...
0.7676704
0
Adds the table header to the sheet
private void addHeaderForSummary(Workbook p_workBook, Sheet p_sheet) { int col = 0; int row = SUMMARY_HEADER_ROW; Row summaryHeaderRow = getRow(p_sheet, row); Cell cell_A = getCell(summaryHeaderRow, col); cell_A.setCellValue(m_bundle.getString("lb_company")); cell_A.setCellStyle(m_style.getHeaderStyle()); p_sheet.setColumnWidth(col, 20 * 256); col++; Cell cell_B = getCell(summaryHeaderRow, col); cell_B.setCellValue(m_bundle.getString("lb_job_id")); cell_B.setCellStyle(m_style.getHeaderStyle()); p_sheet.setColumnWidth(col, 20 * 256); col++; Cell cell_C = getCell(summaryHeaderRow, col); cell_C.setCellValue(m_bundle.getString("lb_job_name")); cell_C.setCellStyle(m_style.getHeaderStyle()); p_sheet.setColumnWidth(col, 30 * 256); col++; Cell cell_D = getCell(summaryHeaderRow, col); cell_D.setCellValue(m_bundle.getString("lb_language")); cell_D.setCellStyle(m_style.getHeaderStyle()); p_sheet.setColumnWidth(col, 20 * 256); col++; Cell cell_E = getCell(summaryHeaderRow, col); cell_E.setCellValue(m_bundle.getString("lb_workflow_state")); cell_E.setCellStyle(m_style.getHeaderStyle()); p_sheet.setColumnWidth(col, 20 * 256); col++; Cell cell_F = getCell(summaryHeaderRow, col); cell_F.setCellValue(m_bundle.getString("lb_mt_word_count")); cell_F.setCellStyle(m_style.getHeaderStyle()); p_sheet.setColumnWidth(col, 20 * 256); col++; if (usePerplexity) { Cell cell = getCell(summaryHeaderRow, col); cell.setCellValue(m_bundle.getString("lb_perplexity_wordcount")); cell.setCellStyle(m_style.getHeaderStyle()); p_sheet.setColumnWidth(col, 20 * 256); col++; } Cell cell_G = getCell(summaryHeaderRow, col); cell_G.setCellValue(m_bundle.getString("lb_total_word_count")); cell_G.setCellStyle(m_style.getHeaderStyle()); p_sheet.setColumnWidth(col, 20 * 256); col++; Cell cell_H = getCell(summaryHeaderRow, col); cell_H.setCellValue(m_bundle.getString("lb_average_edit_distance")); cell_H.setCellStyle(m_style.getHeaderStyle()); p_sheet.setColumnWidth(col, 30 * 256); col++; Cell cell_I = getCell(summaryHeaderRow, col); cell_I.setCellValue(m_bundle.getString("lb_translation_error_rate")); cell_I.setCellStyle(m_style.getHeaderStyle()); p_sheet.setColumnWidth(col, 20 * 256); col++; Cell cell_J = getCell(summaryHeaderRow, col); cell_J.setCellValue(m_bundle.getString("lb_engine_name")); cell_J.setCellStyle(m_style.getHeaderStyle()); p_sheet.setColumnWidth(col, 20 * 256); col++; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public final void setTableHeader() {\n this.addColumn(java.util.ResourceBundle.\n getBundle(\"swt/client/module/game/resources/GameLogTableModel\").\n getString(\"column.date\"));\n this.addColumn(java.util.ResourceBundle.\n getBundle(\"swt/client/module/g...
[ "0.7441801", "0.7401684", "0.7272563", "0.7115856", "0.70425206", "0.6926362", "0.68465376", "0.6793675", "0.6689663", "0.6647371", "0.66139084", "0.659835", "0.6588346", "0.65840113", "0.6508384", "0.6498321", "0.64581126", "0.6382765", "0.63806367", "0.6364074", "0.63143593...
0.70822906
4
Remove duplicated translations(same tuId, same source/MT/target).
@SuppressWarnings("unused") private List<DetailedData> removeDuplicates(List<DetailedData> detailedDatas) { List<DetailedData> detailedDatasNoDuplicates = new ArrayList<DetailedData>(); long previousTuId = -1; String previousTarget = null; for (int i = detailedDatas.size() - 1; i >= 0; i--) { DetailedData data = detailedDatas.get(i); if (data.getTuId() != previousTuId || !data.getTarget().equals(previousTarget) || !TuvState.OUT_OF_DATE.getName().equalsIgnoreCase(data.getState())) { detailedDatasNoDuplicates.add(0, data); } previousTuId = data.getTuId(); previousTarget = data.getTarget(); } return detailedDatasNoDuplicates; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void filterTu(Element p_tu)\n {\n String srcLang = p_tu.attributeValue(Tmx.SRCLANG);\n if (srcLang == null)\n {\n srcLang = m_defaultSrcLang;\n }\n\n // can't use xpath here because xml:lang won't be matched\n List nodes = p_tu.selectNodes(\"./tuv\");...
[ "0.6382465", "0.5449416", "0.49775752", "0.49719957", "0.49241793", "0.4849435", "0.48459113", "0.4841291", "0.48343292", "0.4825272", "0.4820118", "0.4815259", "0.48137897", "0.48090386", "0.48004287", "0.4734653", "0.47231275", "0.47034252", "0.46998405", "0.46978697", "0.4...
0.47312376
16
For "Summary" sheet, it should ALWAYS include latest segments only.
private void removeOutOfDateData(List<DetailedData> detailedDatas) { for (Iterator<DetailedData> it = detailedDatas.iterator(); it.hasNext();) { DetailedData data = it.next(); if (TuvState.OUT_OF_DATE.getName().equalsIgnoreCase(data.getState())) { it.remove(); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void updateSummaries() { }", "protected void updateSummaries() { }", "java.lang.String getSummary();", "@Override\n\tpublic String getSummary() {\n\t\treturn null;\n\t}", "@Override\r\n\tpublic String getSummary() {\n\t\treturn null;\r\n\t}", "private void finishSegment() { \n synchroniz...
[ "0.49490887", "0.49490887", "0.48445576", "0.48035884", "0.47941208", "0.4772725", "0.47676235", "0.47588044", "0.4707753", "0.4699219", "0.4698924", "0.4694081", "0.46545738", "0.46507007", "0.46379966", "0.46178752", "0.46173313", "0.46131548", "0.4597019", "0.45942143", "0...
0.0
-1
Return source page IDs comma separated like "1,2,3".
@SuppressWarnings("rawtypes") private String getSourcePageIds(Job job) { StringBuilder spIds = new StringBuilder(); Iterator spIter = job.getSourcePages().iterator(); while (spIter.hasNext()) { SourcePage sp = (SourcePage) spIter.next(); spIds.append(sp.getId()).append(","); } String result = spIds.toString(); if (result.endsWith(",")) { return result.substring(0, result.length() - 1); } return ""; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "java.util.List<Integer> getSrcIdList();", "public static String [] productsIdList_get(String url){\n\t\tString [] arrList = null; \n\t\tDocument doc=doc_get(url); \n\t\tif(doc!=null){\n\t\t\tElements link_span=doc.select(\"body>div.searchwrap.w980>div#bodyRight>#search_result>#plist>#search_table>#productsIdList...
[ "0.61731726", "0.6011099", "0.55962044", "0.55213165", "0.55135024", "0.5459249", "0.5459249", "0.54431945", "0.5442393", "0.54296994", "0.54174995", "0.53536236", "0.5317755", "0.52968013", "0.52850145", "0.5276423", "0.5268164", "0.5233017", "0.52195656", "0.5179568", "0.51...
0.7710795
0
Gets the jobs and outputs workflow information.
private void addJobsForSummary(Workbook p_workbook, Sheet p_sheet, List<Job> p_jobs, List<GlobalSightLocale> p_targetLocales, Map<String, List<DetailedData>> dataMap) throws Exception { // If no MTed data in all jobs if (dataMap == null || dataMap.isEmpty()) { Row thirdRow = getRow(p_sheet, 3); Cell cell_A = getCell(thirdRow, 0); cell_A.setCellValue(m_bundle.getString("lb_no_mt_data")); CellStyle style = m_style.getContentStyle(); style.setWrapText(false); cell_A.setCellStyle(style); return; } IntHolder row = new IntHolder(3); int finishedJobNum = 0; for (Job job : p_jobs) { // Cancel generate reports. if (isCancelled()) { p_workbook = null; printMsg("Cancelled Report Generator. " + job); return; } // Sets Reports Percent. setPercent(++finishedJobNum); for (Workflow wf : job.getWorkflows()) { String key = getKey(job.getJobId(), wf.getTargetLocale().getId()); List<DetailedData> detailedData = dataMap.get(key); if (detailedData == null || detailedData.size() == 0) { continue; } String state = wf.getState(); if (Workflow.DISPATCHED.equals(state) || Workflow.EXPORTED.equals(state) || Workflow.EXPORT_FAILED.equals(state) || Workflow.ARCHIVED.equals(state) || Workflow.LOCALIZED.equals(state)) { addWorkflowSummary(p_workbook, p_sheet, job, wf, detailedData, row); } } printMsg("Finished Job: " + job); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String execute() {\n\t\t\n\t\tjobs = new ArrayList<Map<String, String>>();\n\t\tMap<String, String> job = new HashMap<String, String>();\n\t\tjob.put(\"title\", \"Java Developer\");\n\t\tjob.put(\"description\", \"Java Developer 1\");\n\t\tjob.put(\"location\", \"london\");\n\t\tjobs.add(job);\n\t\t\n\t\tjo...
[ "0.59599423", "0.5922928", "0.59059644", "0.5880612", "0.5863689", "0.5819247", "0.58027816", "0.5775033", "0.57702315", "0.5655121", "0.55925477", "0.55908215", "0.5546542", "0.55333", "0.5514952", "0.551324", "0.55090326", "0.55073524", "0.5497867", "0.5464218", "0.54495853...
0.0
-1
Gets the task for the workflow and outputs page information.
private void addWorkflowSummary(Workbook workBook, Sheet sheet, Job job, Workflow workflow, List<DetailedData> detailedData, IntHolder row) throws Exception { int col = 0; Row curRow = getRow(sheet, row.value); LinkedHashMap<String, ArrayList<String>> hypsegs = new LinkedHashMap<String, ArrayList<String>>(); LinkedHashMap<String, ArrayList<String>> refsegs = new LinkedHashMap<String, ArrayList<String>>(); // Company Cell cell_A = getCell(curRow, col); cell_A.setCellValue(getCompanyName(job.getCompanyId())); cell_A.setCellStyle(m_style.getContentStyle()); col++; // Job ID Cell cell_B = getCell(curRow, col); cell_B.setCellValue(job.getJobId()); cell_B.setCellStyle(m_style.getContentStyle()); col++; // Job Name Cell cell_C = getCell(curRow, col); cell_C.setCellValue(job.getJobName()); cell_C.setCellStyle(m_style.getContentStyle()); col++; // Language Cell cell_D = getCell(curRow, col); cell_D.setCellValue(workflow.getTargetLocale().toString()); cell_D.setCellStyle(m_style.getContentStyle()); col++; // Workflow State Cell cell_E = getCell(curRow, col); cell_E.setCellValue(workflow.getState()); cell_E.setCellStyle(m_style.getContentStyle()); col++; // MT Word Count Cell cell_F = getCell(curRow, col); cell_F.setCellValue(workflow.getMtTotalWordCount()); cell_F.setCellStyle(m_style.getContentStyle()); col++; // Perplexity passed word count if (usePerplexity) { Cell cell = getCell(curRow, col); cell.setCellValue(workflow.getPerplexityWordCount()); cell.setCellStyle(m_style.getContentStyle()); col++; } // Total Word Count Cell cell_G = getCell(curRow, col); cell_G.setCellValue(workflow.getTotalWordCount()); cell_G.setCellStyle(m_style.getContentStyle()); col++; // Average Edit Distance/char int totalLevDistance = 0; int totalTargetLength = 0; String mtEngineName = null; for (DetailedData data : detailedData) { totalLevDistance += data.getLevenshteinDistance(); totalTargetLength += data.getTarget().length(); if (mtEngineName == null) { mtEngineName = data.getMtEngineName(); if (mtEngineName != null && mtEngineName.toLowerCase().endsWith("_mt")) { mtEngineName = mtEngineName.substring(0, mtEngineName.length() - 3); } } ArrayList<String> hyps = new ArrayList<String>(); hyps.add(data.getMt()); hypsegs.put(String.valueOf(data.getTuId()), hyps); ArrayList<String> refs = new ArrayList<String>(); refs.add(data.getTarget()); refsegs.put(String.valueOf(data.getTuId()), refs); } float averageEditDistance = ((float) totalLevDistance / (float) totalTargetLength * 100); Cell cell_H = getCell(curRow, col); cell_H.setCellValue(Double.valueOf(this.get2DigitFormater().format(averageEditDistance))); cell_H.setCellStyle(m_style.getContentStyle()); col++; // Translation Error Rate (TER) Cell cell_I = getCell(curRow, col); cell_I.setCellValue(calculateTER(hypsegs, refsegs)); cell_I.setCellStyle(m_style.getContentStyle()); col++; // Engine Name Cell cell_J = getCell(curRow, col); cell_J.setCellValue(mtEngineName); cell_J.setCellStyle(m_style.getContentStyle()); col++; row.inc(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Task gatherTaskInfo() {\n \t\n \tString title;\n \t\n \tEditText getTitle = (EditText)findViewById(R.id.titleTextBox);\n \t//EditText itemNum = (EditText)findViewById(R.id.showCurrentItemNum);\n \t \t\n \t//gathering the task information\n \ttitle = getTitle.getText().toString();\n\n...
[ "0.65127003", "0.62310106", "0.6190832", "0.61457974", "0.61046076", "0.6092115", "0.60739917", "0.60739917", "0.5973673", "0.5910233", "0.58901566", "0.5815696", "0.5797973", "0.5784269", "0.57453704", "0.5739177", "0.5728353", "0.56433994", "0.5602189", "0.5555387", "0.5555...
0.0
-1
Set job and workflow status
private void setStates(HttpServletRequest p_request) { String reportOn = (String) p_request.getParameter("reportOn"); data.reportOnJobIds = "jobIds".equals(reportOn); if (data.reportOnJobIds) { // Report on Job IDs data.jobIds.clear(); String jobIdsStr = p_request.getParameter("jobIds"); if (jobIdsStr != null && jobIdsStr.length() != 0) { String[] jobIds = jobIdsStr.split(","); long jobId = 0; for (int i = 0; i < jobIds.length; i++) { try { jobId = Long.valueOf(jobIds[i].trim()); } catch (Exception e) { continue; } if (!data.jobIds.contains(jobId)) { data.jobIds.add(jobId); } } } data.needSearchJob = false; } else { String[] jobIds = p_request.getParameterValues("jobNameList"); data.needSearchJob = (jobIds == null); if (!data.needSearchJob) { data.jobIds.clear(); long jobId = 0; for (int i = 0; i < jobIds.length; i++) { jobId = Long.valueOf(jobIds[i]); if (!data.jobIds.contains(jobId)) { data.jobIds.add(jobId); } } } else { data.jobStateList.clear(); data.workflowStateList.clear(); String[] states = p_request.getParameterValues("jobStatus"); List<String> lst = new ArrayList<String>(); if (states != null) { lst = Arrays.asList(states); } if (lst.contains("*")) { data.jobStateList.add(Job.DISPATCHED); data.workflowStateList.add(Workflow.DISPATCHED); data.jobStateList.add(Job.LOCALIZED); data.workflowStateList.add(Workflow.LOCALIZED); data.jobStateList.add(Job.EXPORTED); data.jobStateList.add(Job.EXPORT_FAIL); data.workflowStateList.add(Workflow.EXPORTED); data.workflowStateList.add(Workflow.EXPORT_FAILED); data.jobStateList.add(Job.ARCHIVED); data.workflowStateList.add(Workflow.ARCHIVED); } else { if (lst.contains(Job.DISPATCHED)) { data.jobStateList.add(Job.DISPATCHED); data.workflowStateList.add(Workflow.DISPATCHED); } if (lst.contains(Job.LOCALIZED)) { data.jobStateList.add(Job.LOCALIZED); data.workflowStateList.add(Workflow.LOCALIZED); } if (lst.contains(Job.EXPORTED)) { data.jobStateList.add(Job.EXPORTED); data.workflowStateList.add(Workflow.EXPORTED); } if (lst.contains(Job.EXPORT_FAIL)) { data.jobStateList.add(Job.EXPORT_FAIL); data.workflowStateList.add(Workflow.EXPORT_FAILED); } if (lst.contains(Job.ARCHIVED)) { data.jobStateList.add(Job.ARCHIVED); data.workflowStateList.add(Workflow.ARCHIVED); } } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setWorkflowStatus(Status status) {\r\n workflowStatus = status;\r\n }", "public void setStatus(JobStatus status);", "public void setStatus(WorkflowInstanceStatus status) {\n this.status = status;\n }", "public void setJobStatus(Integer jobStatus) {\n this.jobStatus = jo...
[ "0.75669825", "0.7177548", "0.70769167", "0.69809365", "0.683753", "0.6816394", "0.67993027", "0.67993027", "0.65557766", "0.65288675", "0.64935863", "0.6390046", "0.6336227", "0.62871397", "0.6210555", "0.6192979", "0.61905", "0.6189524", "0.61849695", "0.6173518", "0.608616...
0.59598863
32
Calculate to return the average translation error rate.
private Double calculateTER(LinkedHashMap<String, ArrayList<String>> hypsegs, LinkedHashMap<String, ArrayList<String>> refsegs) { // in below args, only the "-N" is useful. The rest is fake parameters. String ref = "ref.txt"; String hyp = "hyp.txt"; String[] args = new String[] { "-r", ref, "-h", hyp, "-o", "sum", "-n", "outputFileName", "-N" }; boolean writeToFile = true; double totalTer = new TERtest().calculateTER(args, hypsegs, refsegs, writeToFile); return Double.valueOf(this.get2DigitFormater().format(totalTer * 100)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public double getAverage(){\n return getTotal()/array.length;\n }", "public double getAverageAccuracyLoss() {\n\t\tdouble sum = 0;\r\n\t\tdouble n = accLosses.size();\r\n\t\tfor(int i = 0; i < n; i++) {\r\n\t\t\tsum += accLosses.get(i);\r\n\t\t}\r\n\t\t\r\n\t\treturn sum/n; \r\n\t}", "double average(...
[ "0.6092414", "0.6046925", "0.603983", "0.5988893", "0.5939302", "0.5905968", "0.58849776", "0.58633256", "0.581802", "0.58171517", "0.5791951", "0.5763549", "0.5745374", "0.5735434", "0.57291377", "0.5720908", "0.57003874", "0.569579", "0.56899756", "0.567934", "0.56713784", ...
0.0
-1
Ensure jobs belong to current user's projects.
private void filterInvalidJobs(List<Job> jobs) { try { ArrayList<Project> projectList = (ArrayList<Project>) ServerProxy.getProjectHandler() .getProjectsByUser(m_userId); Set<Long> projectIds = new HashSet<Long>(); if (projectList != null && projectList.size() > 0) { for (Project pro : projectList) { projectIds.add(pro.getIdAsLong()); } } for (Iterator<Job> it = jobs.iterator(); it.hasNext();) { if (!projectIds.contains(it.next().getProjectId())) { it.remove(); } } } catch (Exception e) { logger.error(e); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public FreeStyleProject setupProjectForAuth(WebClient loggedInAdmin) \n throws Exception {\n FreeStyleProject job = this.createFreeStyleProject();\n HtmlPage jobConfigPage = (HtmlPage) loggedInAdmin.\n goTo(job.getShortUrl() + \"configure\");\n jobConfigPage = (HtmlPage) Util...
[ "0.60032773", "0.5371803", "0.53717566", "0.5336345", "0.53087574", "0.52961755", "0.52078015", "0.5184007", "0.51603043", "0.5125436", "0.51105237", "0.509929", "0.5094151", "0.50741214", "0.5068857", "0.50441396", "0.50251144", "0.50249684", "0.50057745", "0.4986997", "0.49...
0.53905284
1
define an event, set the event id and event type.
private DynamicSimuEvent create3PhaseFaultEvent(String faultBusId, BaseDStabNetwork net,double startTime, double durationTime){ DynamicSimuEvent event1 = DStabObjectFactory.createDEvent("BusFault3P@"+faultBusId, "Bus Fault 3P@"+faultBusId, DynamicSimuEventType.BUS_FAULT, net); event1.setStartTimeSec(startTime); event1.setDurationSec(durationTime); // define a bus fault BaseDStabBus faultBus = net.getDStabBus(faultBusId); AcscBusFault fault = CoreObjectFactory.createAcscBusFault("Bus Fault 3P@"+faultBusId, net, true /* cacheBusScVolt */); fault.setBus(faultBus); fault.setFaultCode(SimpleFaultCode.GROUND_3P); fault.setZLGFault(NumericConstant.SmallScZ); // add this fault to the event, must be consist with event type definition before. event1.setBusFault(fault); return event1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void makeEvent(String type) {\n\t\teventName = type;\n\t}", "public abstract void setEventType(Context context, NAEventType type);", "Event createEvent();", "Event createEvent();", "public Event(EventType type, String eventKey) \n\t{\n\t\tsuper();\n\t\tthis.evntType = type;\n\t\tthis.key = eventKey;...
[ "0.7572394", "0.68383855", "0.68058556", "0.68058556", "0.67520404", "0.6724042", "0.6723771", "0.67119396", "0.6545763", "0.6509089", "0.65040493", "0.64972025", "0.64827967", "0.6388157", "0.63846034", "0.634442", "0.6340696", "0.6310429", "0.630163", "0.6246459", "0.622098...
0.0
-1
O(N) where N is the length of both input Strings
public boolean isAnagram(String s, String t) { if (s.length() != t.length()) return false; // O(1) int[] charFrequency = new int[26]; // O(1) for (char c : s.toCharArray()) { // O(N) int index = c - 'a'; // O(1) charFrequency[index]++; // O(1) } for (char c : t.toCharArray()) { // O(N) int index = c - 'a'; // O(1) if (charFrequency[index] == 0) return false; // O(1) charFrequency[index]--; // O(1) } for (int i : charFrequency) { // O(26) -> O(1) if (i > 0) return false; // O(1) } return true; // O(1) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static String doit(final String string1, final String string2) {\n String shorterString; // a\n String longerString; // b\n if (string1.length() > string2.length()) {\n shorterString = string2;\n longerString = string1;\n } else {\n longerString = string...
[ "0.69752157", "0.68062186", "0.680107", "0.6795001", "0.67483777", "0.6655249", "0.658635", "0.65763307", "0.65632844", "0.6544873", "0.6531649", "0.65240437", "0.65067476", "0.6471866", "0.64543045", "0.64312816", "0.64109427", "0.6405889", "0.64001757", "0.6366868", "0.6359...
0.0
-1
Sets the inline properties for this entry
public void setInlineProperties(final EntityProviderWriteProperties inlineProperties) { this.inlineProperties = inlineProperties; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "final public void setInlineStyle(String inlineStyle)\n {\n setProperty(INLINE_STYLE_KEY, (inlineStyle));\n }", "public void setInline(boolean inline) {\n\t\tthis.inline = inline;\n\t}", "public void setInline(String inline) {\n if (\"true\".equalsIgnoreCase(inline)) {\n this.full...
[ "0.67561215", "0.66797644", "0.63923454", "0.55702865", "0.5567178", "0.5528518", "0.55083656", "0.5478523", "0.52296126", "0.5207521", "0.52046734", "0.5180274", "0.515742", "0.51303494", "0.51228", "0.51135343", "0.5071273", "0.505857", "0.5035398", "0.5031342", "0.4974669"...
0.76679975
0
TODO Autogenerated method stub
public static void main(String[] args) { int myage = 30; int herage=myage; System.out.println(herage); }
{ "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
Metodo que obtiene todas las solicitudes con estatus 2 'Validando'
public List<SolicitudDto> getSolsFValidando() throws BusinessException{ try { return solDao.getSolsFValidando(); } catch (IntegracionException ex) { LOGGER.error("Error en la consulta de las solicitudes", ex); throw new BusinessException(ex.getMessage(), ex); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private String validarEntradas()\n { \n return Utilitarios.validarEntradas(campoNomeAC, campoEnderecoAC, campoBairroAC, campoCidadeAC, campoUfAC, campoCepAC, campoTelefoneAC, campoEmailAC);\n }", "ValidationResponse validate();", "public void ValidationData() {\n try {\n C...
[ "0.5888599", "0.5871913", "0.5871148", "0.5742596", "0.57254577", "0.57208365", "0.5596948", "0.5581652", "0.54912347", "0.5484646", "0.5473001", "0.54481447", "0.54146147", "0.53997636", "0.5386046", "0.53835607", "0.53794754", "0.53794754", "0.537803", "0.5369238", "0.53524...
0.0
-1
TODO Autogenerated method stub
public Optional<Produto> cadastroCat(Long idCategoria, @Valid Produto newProduto) { 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
parse entity to dto
public static RequestDTO toDto(Reqs reqs) { RequestDTO dto = new RequestDTO(); if (reqs != null && reqs.getReqsId() != null && reqs.getReqsId() != 0) { dto.setRequestId(reqs.getReqsId()); dto.setRegistrationNo(reqs.getRegNo()); if (reqs.getVcase() != null) { Case vCase = reqs.getVcase(); dto.setCaseId(vCase.getCaseId()); if (vCase.getCompsCourt() != null) { dto.setCaseCourtSystem(DbCommonUtil.getDbValueOrEmpty(vCase.getCompsCourt() .getCompsCourtCd())); } if (vCase.getCaseType() != null) { dto.setCaseType(DbCommonUtil.getDbValueOrEmpty(vCase.getCaseType().getCaseTypeCd())); } dto.setCaseSerialNo(vCase.getCaseSerNo()); dto.setCaseYear(vCase.getCaseYr()); dto.setCaseNo(SvdCommonUtil.getCaseNo(vCase)); } dto.setRequestType(RequestTypeDTOAssembler.toDto(reqs.getReqsType())); dto.setRegistrationYear(reqs.getRegYr()); dto.setRegistrationSerialNo(DbCommonUtil.getDbValueOrEmpty(reqs.getRegSerNo())); dto.setSubmissionDatetime(reqs.getSubmitDt()); dto.setSequenceNoForCase(reqs.getSeqNoForCase()); dto.setHandlingAgent(HandlingAgentDTOAssembler.toDto(reqs.getHandlingAgt())); dto.setRequestStatusType(RequestStatusTypeDTOAssembler.toDto(reqs.getReqsStatus())); dto.setBailiffOffice(BailiffOfficeDTOAssembler.toDto(reqs.getBlfOffice())); dto.setVersionAndNanos(reqs.getVersion()); } return dto; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "V toDto(E entity);", "D mapToDTO(E entity);", "public abstract D convertToDto(T entity);", "public abstract T convertToEntity(D dto);", "E mapToEntity(D dto);", "E toEntity(V dto);", "Comment dtoToEntity(CommentDto commentDto);", "CommentDto entityToDto(Comment comment);", "public BUserDto convertE...
[ "0.7589467", "0.7502039", "0.7443437", "0.7392506", "0.71347123", "0.711995", "0.6993105", "0.6978238", "0.6871277", "0.6800399", "0.6761214", "0.6736168", "0.66168857", "0.6615002", "0.6596817", "0.65593827", "0.6535012", "0.65109247", "0.6505459", "0.65034765", "0.6498423",...
0.0
-1
parse entity list to dto list
public static List<RequestDTO> toDtoList(List<Reqs> reqses) { List<RequestDTO> dtos = new ArrayList<RequestDTO>(); if (!CommonUtil.isNullOrEmpty(reqses)) { for (Reqs reqs : reqses) { dtos.add(toDto(reqs)); } } return dtos; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract List<D> convertToDtos(List<T> entities);", "private List<ComentarioDTO> listEntity2DTO(List<ComentarioEntity> entityList) {\n List<ComentarioDTO> list = new ArrayList();\n for (ComentarioEntity entity : entityList) {\n list.add(new ComentarioDTO(entity));\n }\n ...
[ "0.7751323", "0.76303345", "0.75768226", "0.7553799", "0.7513703", "0.749882", "0.74694544", "0.74615306", "0.7444444", "0.74209195", "0.7366297", "0.72652066", "0.7249997", "0.72330976", "0.71915466", "0.7155241", "0.71516186", "0.7110041", "0.70681745", "0.70056516", "0.690...
0.0
-1
The body of this method is generated in a way you would not otherwise write. This is done to optimize the compiled bytecode for size and performance.
@NonNull public static EidttextListBinding bind(@NonNull View rootView) { int id; missingId: { ConstraintLayout constraintView = (ConstraintLayout) rootView; id = R.id.ed_name; EditText edName = ViewBindings.findChildViewById(rootView, id); if (edName == null) { break missingId; } id = R.id.tv_number; TextView tvNumber = ViewBindings.findChildViewById(rootView, id); if (tvNumber == null) { break missingId; } id = R.id.underLine; ImageView underLine = ViewBindings.findChildViewById(rootView, id); if (underLine == null) { break missingId; } return new EidttextListBinding((ConstraintLayout) rootView, constraintView, edName, tvNumber, underLine); } String missingId = rootView.getResources().getResourceName(id); throw new NullPointerException("Missing required view with ID: ".concat(missingId)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void generateCode()\n {\n \n }", "protected final void emitCode() {\n int bytecodeSize = request.graph.method() == null ? 0 : request.graph.getBytecodeSize();\n request.compilationResult.setHasUnsafeAccess(request.graph.hasUnsafeAccess());\n GraalCompiler.emitCode(...
[ "0.7303291", "0.65576524", "0.64139587", "0.6333925", "0.6258839", "0.6168256", "0.6075375", "0.6041545", "0.5965384", "0.5931437", "0.5921647", "0.5892899", "0.5891211", "0.58799446", "0.5860856", "0.58591735", "0.58568126", "0.58484924", "0.58244956", "0.58135086", "0.58060...
0.0
-1
Setting the global view
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { v = inflater.inflate(R.layout.fragment_home, container, false); // Initiating the recyclerview rv = (RecyclerView) v.findViewById(R.id.recyclerViewHomeFragment); // Initiating the adapter on the list of ingredients rv_adapt = new IngredientAdapter(getContext(), ingredients, this); rv.setLayoutManager(new LinearLayoutManager(getActivity())); rv.setAdapter(new AlphaInAnimationAdapter(rv_adapt)); rv.setItemAnimator(new LandingAnimator()); // Setting Progressbar size ProgressBar progressBar = v.findViewById(R.id.homeProgress); progressBar.setScaleY(3f); // Opening a connection to the database to get all of the ingredients DB_Communicator db_communicator = new DB_Communicator(getContext()); db_communicator.open(); // Adding all the ingredients we allow to exist // Hashmap because it conforms to DB logic (the arraylist has all of the columns for title) for (int i = 0; i < db_communicator.getIngredientsData(0).size(); i++) all_ingredients.put(db_communicator.getIngredientsData(0).get(i), db_communicator.getIngredientsData(db_communicator.getIngredientsData(0).get(i))); // Closing the database connection afterwards db_communicator.close(); // Initiating the auto complete input field AutoCompleteTextView ac_text = v.findViewById(R.id.auto_complete_input); // Setting the adapter on the ingredient list so we get choices once we type sth into // the auto_complete field ArrayAdapter<String> adapter = new ArrayAdapter<String>(getContext(), android.R.layout.simple_list_item_1, all_ingredients.keySet().toArray(new String[0])); // Setting the adapter to the auto_complete field ac_text.setAdapter(adapter); // This is the button to add ingredients final Button add_button = v.findViewById(R.id.button_add); // Initializing the search button final Button button_search = v.findViewById(R.id.button_search); // The TextChangeListener checks whether we type sth in the input field // if this is the case then we want the button to be pressable // NOTE: Of course we could also just check if the input is present within the HashMap // and then make the button clickable. The reason why I used this listener was to get // familiar with more functionality that is offered by Android. ac_text.addTextChangedListener(new TextWatcher() { @Override public void beforeTextChanged(CharSequence charSequence, int i, int i1, int i2) { } @Override public void onTextChanged(CharSequence charSequence, int i, int i1, int i2) { // If the text is being changed and is not empty and a valid ingredient then you can add ingredients if (!String.valueOf(charSequence).equals("") && all_ingredients.containsKey(charSequence.toString())) add_button.setEnabled(true); else add_button.setEnabled(false); } @Override public void afterTextChanged(Editable editable) { if (!ingredients.isEmpty()) button_search.setEnabled(true); else button_search.setEnabled(false); } }); // Setting up an onclick listener for the ingredient adding functionality // If the button is clicked then the item present in the autocomplete field is being added // to the ingredient list. add_button.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { addItem(0); Toast.makeText(getContext(), "Item was successfully added", Toast.LENGTH_SHORT).show(); } }); // Creating an onclick listener for it button_search.setOnClickListener(new View.OnClickListener() { // When we click on search then a new activity is being created and the // list of picked ingredients is being passed for later processing @Override public void onClick(View v) { // Setting progress as search loading indicator ProgressBar progressBar = (ProgressBar) getView().getRootView().findViewById(R.id.homeProgress); progressBar.setVisibility(ProgressBar.VISIBLE); Intent intent = new Intent(getActivity(), SearchResults.class); intent.putParcelableArrayListExtra(IngredientItem.class.getSimpleName(), ingredients); getActivity().startActivity(intent); } }); return v; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void setViews() {\n\n }", "@Override\n\tprotected void setView() {\n\t\tsetContentView(R.layout.activity_main);\n\t}", "private void registerViews() {\n\t}", "protected void viewSetup() {\n\t\t// TODO Auto-generated method stub\n\n\t}", "@Override\r\n\tprotected void initViews() {\n\t\t\r\n\t}",...
[ "0.68367296", "0.65506685", "0.6475996", "0.64422333", "0.6441898", "0.64384824", "0.6386156", "0.6358332", "0.63380283", "0.63316345", "0.63238645", "0.63207364", "0.63207364", "0.6305884", "0.6301852", "0.6300512", "0.6298027", "0.62822086", "0.6276709", "0.6276709", "0.626...
0.0
-1
If the text is being changed and is not empty and a valid ingredient then you can add ingredients
@Override public void onTextChanged(CharSequence charSequence, int i, int i1, int i2) { if (!String.valueOf(charSequence).equals("") && all_ingredients.containsKey(charSequence.toString())) add_button.setEnabled(true); else add_button.setEnabled(false); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void onClick(View view) {\n if(Ingredient.getText().length()>=0) {\n newRecipe.ingredients.add(Ingredient.getText().toString());\n //erase text box for next usage\n Ingredient.setText(\"\");\n\n }\n else {\...
[ "0.7114306", "0.67428833", "0.66707605", "0.6555373", "0.6310118", "0.62613183", "0.62593687", "0.6197671", "0.61447877", "0.6115551", "0.61012167", "0.60788244", "0.60239047", "0.5948115", "0.59466475", "0.5906419", "0.59021497", "0.5822216", "0.58044755", "0.5799215", "0.57...
0.68704367
1
When we click on search then a new activity is being created and the list of picked ingredients is being passed for later processing
@Override public void onClick(View v) { // Setting progress as search loading indicator ProgressBar progressBar = (ProgressBar) getView().getRootView().findViewById(R.id.homeProgress); progressBar.setVisibility(ProgressBar.VISIBLE); Intent intent = new Intent(getActivity(), SearchResults.class); intent.putParcelableArrayListExtra(IngredientItem.class.getSimpleName(), ingredients); getActivity().startActivity(intent); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n protected void onCreate(Bundle savedInstanceState)\n {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_search_diet_name);\n name = (EditText)findViewById(R.id.object_diet_name);\n submit = (Button) findViewById(R.id.submit_to_search_diet_name);...
[ "0.7389901", "0.72936064", "0.726366", "0.7251676", "0.69677824", "0.68673754", "0.67844373", "0.66823685", "0.66704595", "0.65137213", "0.6506602", "0.6430636", "0.63459516", "0.63328844", "0.63305986", "0.6317567", "0.6269811", "0.62573195", "0.6255652", "0.6218254", "0.620...
0.7068769
4
This is some fancy extra functionality I have implemented getting calories and nutritiousness from database
@Override public void ingredientInfo(int position) { // I created this dialog box with some additional information about ingredients // if an ingredient is being clicked then it pops up and we get more information about it Dialog dialog = new Dialog(getContext()); dialog.setContentView(R.layout.infobox_ingredient_dialog); // Creating an animation for the dialog information YoYo.with(Techniques.RollIn).repeat(0).repeatMode(1).duration(600).playOn(dialog.findViewById(R.id.infobox)); TextView info_title = (TextView) dialog.findViewById(R.id.info_title); TextView info_desc = (TextView) dialog.findViewById(R.id.info_desc); TextView info_kcal = (TextView) dialog.findViewById(R.id.info_kcal); TextView info_nutr = (TextView) dialog.findViewById(R.id.info_nutr); info_title.setText(ingredients.get(position).getTitle()); info_desc.setText(ingredients.get(position).getDesc()); info_kcal.setText(ingredients.get(position).getKcal()); info_nutr.setText(ingredients.get(position).getNutr()); dialog.show(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void fetchHolidayRentalHousesData();", "public String getHealthierFood(FoodItem item)\r\n\t{\r\n\t\tString result = \"\";\t\r\n\t\tif(item == null)\t\t\t\r\n\t\t\treturn result = \"No results for Image\";\r\n\t\tFoodSearch actualFood = searchFoodByActualName(item);\r\n\t\tFoodSearch otherSimilarFoods = searchFoo...
[ "0.6340808", "0.5942675", "0.5861502", "0.58472186", "0.5789303", "0.56919646", "0.55880946", "0.55778944", "0.55239415", "0.5516763", "0.54660916", "0.5462219", "0.54620624", "0.54488605", "0.5394326", "0.5371222", "0.53641343", "0.5348923", "0.5340981", "0.52956396", "0.529...
0.0
-1
In case we make a mistake with an ingredient it makes sense to have functionality to delete it again with a click on the delete symbol next to every ingredient, the ingredient can be remove again from the recyclerview
@Override public void deleteItem(int position) { // User feedback that he deleted an ingredient Toast.makeText(getContext(), "Deleted " + ingredients.get(position).getTitle() + " Successfully", Toast.LENGTH_SHORT).show(); // Actually removing the ingredient from the list ingredients.remove(position); // Notifying the adapter so he updates his display rv_adapt.notifyItemRemoved(position); // In case the last item was deleted, we shouldn't be able to perform a search if (ingredients.isEmpty()) { Button button_search = v.findViewById(R.id.button_search); button_search.setEnabled(false); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {\n myIngredients.remove(i);\n updateIngredientListView();\n }", "@Override\n public void onClick(View view) {\n ...
[ "0.74756444", "0.7382308", "0.7381195", "0.7097704", "0.68980074", "0.6852896", "0.683406", "0.6823227", "0.6730084", "0.67173076", "0.66935796", "0.6683468", "0.6677658", "0.66561943", "0.6574625", "0.6573407", "0.6555625", "0.65472156", "0.6545182", "0.65254223", "0.6500911...
0.7226195
3
Adding functionality for Ingredients
@Override public void addItem(int position) { // Getting the auto complete input field AutoCompleteTextView source = (AutoCompleteTextView) v.findViewById(R.id.auto_complete_input); // Getting the Title of the ingredient String title = source.getText().toString(); // Check if we have already added this ingredient boolean item_seen = false; // Creating a new object for the recyclerview that can later be displayed IngredientItem temp = new IngredientItem(R.drawable.ic_restaurant_menu_green_24dp, source.getText().toString(), all_ingredients.get(title).get(1), all_ingredients.get(title).get(2), all_ingredients.get(title).get(3)); // For every item in our recyclerview ... for (int i = 0; i < rv_adapt.getItemCount(); i++) // ... if the ingredient we want to add equals the item we recognize as it is already present within // our list of ingredients, then we set the item as already seen, so it does not get added again if (ingredients.get(i).getTitle().equals(title)) { // This log can be uncommented to check if the item is known yet // Log.d("Debug", ingredients.get(i).getTitle() + " " + title + " " + rv_adapt.getItemCount()); item_seen = true; } // If we recognize the item which should be added as a valid item and we haven't added it // yet, then we can add it now to our list of ingredients and notify our adaptor to refresh. if (all_ingredients.containsKey(title) && !item_seen) { // Notification in Logcat that item xyz has been added Log.d("Debug", "Adding " + title + " " + all_ingredients.get(title)); ingredients.add(temp); rv_adapt.notifyItemInserted(position); } // After adding an item the auto complete input field is getting emptied again, so // a new item can be added. Further the add button is being disabled for cosmetic purposes. source.setText(""); v.findViewById(R.id.button_add).setEnabled(false); // If we have 1+ Items in the recyclerview then the search is being enabled, as // it makes no sense to search for 0 items if (rv_adapt.getItemCount() > 0) v.findViewById(R.id.button_search).setEnabled(true); // Just a quick log to see which ingredients are present in our list // (Debugging purposes) Log.d("Debug", ingredients.toString()); // Notifying the adapter to refresh rv_adapt.notifyDataSetChanged(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void displayIngredients(Activity activity){\n List<IngredientsModel> ingrList = recipeModel.getIngredientsModels();\n\n if(activity != null){\n IngredientsRecyclerAdapter recyclerAdapter = new IngredientsRecyclerAdapter(ingrList);\n ingrRecycler.setLayoutManager(new Line...
[ "0.71558213", "0.6601407", "0.65510213", "0.6454446", "0.63954365", "0.6372038", "0.631692", "0.6233464", "0.62066394", "0.6135046", "0.60860205", "0.6069852", "0.60379785", "0.59681", "0.5892597", "0.5879391", "0.5874355", "0.5771751", "0.57650965", "0.5759471", "0.57367253"...
0.0
-1
thread that gets here is owner
public synchronized void setOwner(String s) { owner = s; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public synchronized Thread getAssociatedThread()\r\n {\r\n return associatedThread;\r\n }", "public void waitForAccess(KThread thread) \n\t\t{\n\t\t\tLib.assertTrue(Machine.interrupt().disabled());\n ThreadState waiterState = getThreadState(thread);\n ...
[ "0.5997442", "0.59897006", "0.5981151", "0.59119064", "0.57946736", "0.57680565", "0.57629204", "0.5718905", "0.57156855", "0.5709724", "0.5686449", "0.5611596", "0.5588626", "0.5583802", "0.55785674", "0.557177", "0.5528785", "0.55247873", "0.55171204", "0.5484468", "0.54844...
0.0
-1
thread that gets here is owner
public synchronized static String getOwner() { return owner; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public synchronized Thread getAssociatedThread()\r\n {\r\n return associatedThread;\r\n }", "public void waitForAccess(KThread thread) \n\t\t{\n\t\t\tLib.assertTrue(Machine.interrupt().disabled());\n ThreadState waiterState = getThreadState(thread);\n ...
[ "0.5997442", "0.59897006", "0.5981151", "0.59119064", "0.57946736", "0.57680565", "0.57629204", "0.5718905", "0.57156855", "0.5709724", "0.5686449", "0.5611596", "0.5588626", "0.5583802", "0.55785674", "0.557177", "0.5528785", "0.55247873", "0.55171204", "0.5484468", "0.54844...
0.53466916
52
this method writes the serialized message of the init players
@Override public void initPlayers(PlayerId ownId, Map<PlayerId, String> playerNames) { sendInstruction(MessageId.INIT_PLAYERS, Serdes.PLAYER_ID_SERDE.serialize(ownId), Serdes.STRING_LIST_SERDE.serialize((PlayerId.ALL.stream(). map(playerNames::get)). collect(Collectors.toList()))); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void sentInitInfo()\n\t{\n\t\ttry\n\t\t{\n\t\t\tJSONObject initInfo = new JSONObject();\n\t\t\tinitInfo.put(\"type\", \"init\");\n\t\t\tinitInfo.put(\"name\", name);\n\t\t\t\n\t\t\tos.println(initInfo.toString());\n\t\t\tos.flush();\n\t\t\t\n\t\t\tString rcvStr = is.readLine();\n\t\t\tJSONObject response = ...
[ "0.6293332", "0.61946434", "0.6154514", "0.61499786", "0.61129326", "0.6090069", "0.59773314", "0.5920953", "0.5785854", "0.5755028", "0.5672661", "0.56366813", "0.5612921", "0.5545273", "0.5514992", "0.5479041", "0.54621065", "0.5438521", "0.530322", "0.5284874", "0.52704847...
0.51623476
35
this method transmit to the client the info in parameter
@Override public void receiveInfo(String info) { sendInstruction(MessageId.RECEIVE_INFO, Serdes.STRING_SERDE.serialize(info)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void sentInitInfo()\n\t{\n\t\ttry\n\t\t{\n\t\t\tJSONObject initInfo = new JSONObject();\n\t\t\tinitInfo.put(\"type\", \"init\");\n\t\t\tinitInfo.put(\"name\", name);\n\t\t\t\n\t\t\tos.println(initInfo.toString());\n\t\t\tos.flush();\n\t\t\t\n\t\t\tString rcvStr = is.readLine();\n\t\t\tJSONObject response = ...
[ "0.621948", "0.6132958", "0.60264057", "0.5984307", "0.5955667", "0.59427524", "0.59374726", "0.5880982", "0.58390903", "0.5819518", "0.5815224", "0.5746646", "0.5737936", "0.5731951", "0.57209843", "0.5689313", "0.5657118", "0.5655131", "0.5649902", "0.5640989", "0.56401294"...
0.54998606
35
this method sendInstruction to the client the state updated to the client
@Override public void updateState(PublicGameState newState, PlayerState ownState) { sendInstruction(MessageId.UPDATE_STATE, Serdes.PUBLIC_GAME_STATE_SERDE.serialize(newState), Serdes.PLAYER_STATE_SERDE.serialize(ownState)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void sendCurrentState() {\n\ttry {\n\t channel.sendObject(getState());\n\t} catch (IOException e) {\n\t Log.e(\"423-client\", e.toString());\n\t}\n }", "private void sendUpdateConnectionInfo() {\n\n }", "void stateUpdate(String msg);", "@Override\n\tpublic void update(CcNoticereceive enti...
[ "0.7205763", "0.6438231", "0.6343285", "0.6138143", "0.61209446", "0.6102167", "0.6053525", "0.6050621", "0.6032214", "0.5950319", "0.5950196", "0.59363484", "0.58654964", "0.5831448", "0.58173704", "0.5801632", "0.5784621", "0.5759202", "0.5752653", "0.573953", "0.5727226", ...
0.0
-1
this method sendInstruction to the client the message to chose the initial cards among the tickets in parameter
@Override public void setInitialTicketChoice(SortedBag<Ticket> tickets) { sendInstruction(MessageId.SET_INITIAL_TICKETS, Serdes.TICKET_BAG_SERDE.serialize(tickets)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\t\tpublic void action() {\n\t\t\t\r\n\t\t\tACLMessage request = new ACLMessage (ACLMessage.REQUEST);\r\n\t\t\trequest.setProtocol(FIPANames.InteractionProtocol.FIPA_REQUEST);\r\n\t\t\trequest.addReceiver(new AID(\"BOAgent\",AID.ISLOCALNAME));\r\n\t\t\trequest.setLanguage(new SLCodec().getName());\t\r...
[ "0.5913266", "0.5911339", "0.57876825", "0.5774754", "0.57642365", "0.5757937", "0.573135", "0.56616324", "0.564294", "0.5566361", "0.55470157", "0.5413578", "0.54074883", "0.5375793", "0.5370471", "0.53471994", "0.5343069", "0.53385556", "0.5316325", "0.5296176", "0.5295469"...
0.5143058
46
this method sendInstruction to the client the message to chose the the initialTickets and receiveInstruction the tickets chosen by the player that he returns
@Override public SortedBag<Ticket> chooseInitialTickets() { sendInstruction(MessageId.CHOOSE_INITIAL_TICKETS); return Serdes.TICKET_BAG_SERDE.deserialize(receiveInstruction()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract void msgCookThisOrder(String choice, JiWaiter w, int tableNum);", "private void purchaseTickets() throws IOException\n {\n toServer.writeInt(sectionsSelected);\n toServer.writeInt(numTicketsWanted);\n\n setChanged();\n notifyObservers(new Integer(sectionsSelected));...
[ "0.5924469", "0.57849497", "0.5699449", "0.5623661", "0.55888015", "0.55333036", "0.5503209", "0.5457879", "0.5457518", "0.54470026", "0.54454327", "0.5423382", "0.54181606", "0.54158235", "0.54106015", "0.5409504", "0.54075086", "0.5391708", "0.53880423", "0.53870225", "0.53...
0.57665324
2
this method sendInstruction to the client that he has to choose the next turn et receiveInstruction the nextTurn chosen by him and returns it
@Override public ch.epfl.tchu.game.Player.TurnKind nextTurn() { sendInstruction(MessageId.NEXT_TURN); return Serdes.TURN_KIND_SERDE.deserialize(receiveInstruction()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void nextTurn() {\r\n\r\n\t\t// System.out.println(\"nextTurn================================================================================================\" + this.DiceNumber);\r\n\t\tif (gameState == GameState.Playing) {\r\n\t\t\tif (!isPlayerCall && currentTurnPlayer != null && !currentTurnPlayer.getPl...
[ "0.67051053", "0.6619749", "0.6316906", "0.6195867", "0.61178666", "0.6041464", "0.6035881", "0.6009797", "0.59797585", "0.597813", "0.5913794", "0.5903812", "0.5861531", "0.5853273", "0.5835146", "0.5746526", "0.5745365", "0.5742217", "0.57168233", "0.56935775", "0.56486845"...
0.6576073
2
this method sendInstruction to the client that he has received the tickets in parameter and receiveInstruction the cards that he chosen
@Override public SortedBag<Ticket> chooseTickets(SortedBag<Ticket> options) { sendInstruction(MessageId.CHOOSE_TICKETS, Serdes.TICKET_BAG_SERDE.serialize(options)); return Serdes.TICKET_BAG_SERDE.deserialize(receiveInstruction()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void procesarTramaEasyFuel(){\n switch (bufferRecepcion[4]){\n //TRAMA DE CONFIGURACION\n case 0x06:\n if(bufferRecepcion[5] == 0x01 || bufferRecepcion[5] == 0x02){\n //TRAMA DE CONFIGURACION\n //Log.v(\"NOMBRE EMBEDDED\", \"\...
[ "0.59860045", "0.59196544", "0.589645", "0.5820337", "0.58110356", "0.5750312", "0.5559467", "0.5521233", "0.5510172", "0.54931283", "0.5479446", "0.54695326", "0.544102", "0.5423451", "0.5409716", "0.5383148", "0.53574127", "0.53559434", "0.534676", "0.5340964", "0.53405595"...
0.0
-1
this method sendInstruction to the client to choose the slot he wants to draw , receives it and returns it
@Override public int drawSlot() { sendInstruction(MessageId.DRAW_SLOT); return Serdes.INTEGER_SERDE.deserialize(receiveInstruction()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void drawInstruction(Graphics2D g2d)\r\n\t{\r\n\t\tif(state==1)\r\n\t\t{\r\n\t\t\tg2d.fillRect((int)(0.4*size.width),(int)(0.3*size.height),(int)(0.3*size.width) , (int)(0.4*size.width));\r\n\t\t\tg2d.setColor(new Color(255,255,255));\r\n\t\t\tint x=(int)(0.4*size.getWidth());\r\n\t\t\tint y=(int)(0.4*size....
[ "0.57517326", "0.57213765", "0.5720782", "0.5547642", "0.54873246", "0.5436481", "0.5380787", "0.536255", "0.53543526", "0.533697", "0.5322351", "0.53126866", "0.5305945", "0.5284188", "0.51973456", "0.51945126", "0.51771516", "0.51585925", "0.5152347", "0.5126882", "0.511556...
0.6848797
0
this method sendInstruction to the client to claim a route he wants to claim , receives it and returns it
@Override public Route claimedRoute() { sendInstruction(MessageId.ROUTE); return Serdes.ROUTE_SERDE.deserialize(receiveInstruction()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void action() {\n ACLMessage acl = blockingReceive();\n System.err.println(\"Hola, que gusto \" + acl.getSender() + \", yo soy \" + getAgent().getName());\n new EnviarMensaje().enviarMensajeString(ACLMessage.INFORM, \"Ag4\", getAgent(), \"Hola agente, soy ...
[ "0.536265", "0.53434473", "0.5311882", "0.5176728", "0.5133637", "0.512227", "0.50945425", "0.5092898", "0.50870454", "0.5070783", "0.50096446", "0.5008969", "0.5003218", "0.49940884", "0.49848515", "0.49834114", "0.49658346", "0.49658176", "0.49536225", "0.49521762", "0.4951...
0.5873402
0
this method sendInstruction to the client to choose the claim cards he wants to play to claim the route , receives it and returns it
@Override public SortedBag<Card> initialClaimCards() { sendInstruction(MessageId.CARDS); return Serdes.CARD_BAG_SERDE.deserialize(receiveInstruction()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract String requestCard(byte[] messageRec) throws IOException;", "private void next() {\n\t\tParcel pc = Parcel.obtain();\n\t\tParcel pc_reply = Parcel.obtain();\n\t\ttry {\n\t\t\tSystem.out.println(\"DEBUG>>>pc\" + pc.toString());\n\t\t\tSystem.out.println(\"DEBUG>>>pc_replay\" + pc_reply.toString())...
[ "0.63353145", "0.59358287", "0.57679796", "0.5724767", "0.57027215", "0.5670019", "0.5631146", "0.5578373", "0.55727476", "0.5562005", "0.55386555", "0.55382675", "0.5531312", "0.55153596", "0.549814", "0.54562527", "0.5435126", "0.5423476", "0.5423441", "0.5388539", "0.53780...
0.0
-1
this method sendInstruction to the client the additional cards he wants to play to claim the underground route , receives it and returns it
@Override public SortedBag<Card> chooseAdditionalCards(List<SortedBag<Card>> options) { sendInstruction(MessageId.CHOOSE_ADDITIONAL_CARDS, Serdes.CARD_BAG_LIST_SERDE.serialize(options)); return Serdes.CARD_BAG_SERDE.deserialize(receiveInstruction()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void playRoadBuildingCard() {\n\t\t\r\n\t}", "void playCurrentStationCard();", "@Override\n\tpublic void execute() {\n\t\t\n\t\tif (GamesHandler.test) {\n\t\t\tserverModel = ServerFacadeTest.getSingleton().getGameModel(gameID);\n\t\t} else {\n\t\t\tserverModel = ServerFacade.getSingleton(...
[ "0.60504913", "0.6036183", "0.5952081", "0.59234464", "0.5895865", "0.5853504", "0.5801493", "0.57940185", "0.57520944", "0.57454383", "0.5711235", "0.5648397", "0.55955", "0.55572677", "0.553197", "0.5519851", "0.5498327", "0.5452131", "0.5448645", "0.5433535", "0.54266596",...
0.0
-1
This method is used to send a message to the client bound to the player.
public void sendToClient(String serializedMessage){ sendTo(messageWriter,serializedMessage); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void sendChatMessage(EntityPlayer player) {\n }", "public void sendMessage(String msg) {\n\t\tplayer.sendMessage(msg);\n\t}", "public void sendChat(String client, String message) {\n\t\t//enqueue(\"PRIVMSG #\"+myself+\" :.w \"+client + \" imGlitch \" + message); //whisper\n\t\tenqueue(...
[ "0.72704417", "0.7156229", "0.6941947", "0.6881512", "0.6859764", "0.6839282", "0.67942554", "0.6768764", "0.67588556", "0.672916", "0.6717352", "0.67172974", "0.67160505", "0.66676724", "0.66630435", "0.66506636", "0.6629289", "0.66281945", "0.6622235", "0.66026103", "0.6588...
0.0
-1
This method is used to verify if a message has been written in the socket of the client and write it in the socket of the manager
public void sendToManager(){ String receiveMessage; while((receiveMessage=receiveFrom(messageReader)) != null){ manager.manage(receiveMessage); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private boolean writeMsg(String msg) {\n // if Client is still connected send the message to it\n if (!socket.isConnected()) {\n close();\n return false;\n }\n // write the message to the stream\n try {\n sOutput.wr...
[ "0.6839156", "0.6761298", "0.6717299", "0.6219141", "0.6155109", "0.6110719", "0.6081046", "0.60393465", "0.60352004", "0.60279953", "0.6020513", "0.59265083", "0.59121555", "0.5901898", "0.58965474", "0.5895091", "0.58739585", "0.5866276", "0.58622104", "0.58431685", "0.5843...
0.0
-1
This method method is used by the client to send a message to the proxy that can be transmitted to the manager after
@Override public void sendToProxy(String message) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void sendToOtherServers(ProxyEvent proxyEvent) throws AppiaEventException {\n //\t\tSystem.out.println(\"Sending to other servers: \"+ proxyEvent);\n \t\tproxyEvent.storeMessage();\n \t\tproxyEvent.setDir(Direction.DOWN);\n \t\tproxyEvent.setChannel(vsChannel);\n \t\tproxyEvent.setSourceSession(this);\n \t...
[ "0.6486049", "0.6237777", "0.62323606", "0.6212106", "0.61194235", "0.6049445", "0.60434306", "0.6031462", "0.6028259", "0.60201114", "0.60056585", "0.5992667", "0.5980702", "0.5962779", "0.59445655", "0.59384435", "0.59384435", "0.59297377", "0.5894308", "0.58896804", "0.585...
0.7988202
0
This method is used to receive a message from a the socket of messages.
@Override public void receiveMessage(String message) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public synchronized Message receive() \r\n\tthrows IOException, SocketTimeoutException {\r\n\t\tbyte[] buffer = new byte[576];\r\n\t\tMessage msg = null;\r\n\t\twhile (msg == null) {\r\n\t\t\ttry {\r\n\t\t\t\tsocket.setSoTimeout(TIMEOUT);\r\n\t\t\t\tDatagramPacket response = new DatagramPacket(buffer,\r\n\t\t\t\t\...
[ "0.72272885", "0.72085714", "0.71958524", "0.6905347", "0.6830418", "0.67731667", "0.6754331", "0.6728379", "0.6721016", "0.6718673", "0.6703222", "0.6698821", "0.6659693", "0.6657816", "0.6655258", "0.66549355", "0.66513586", "0.6601308", "0.65922487", "0.6553731", "0.653799...
0.65944034
18
This method is used to notify the client that the routes in parameter are in the longest Trail.
@Override public void notifyLongest(List<Route> routes) { sendInstruction(MessageId.NOTIFY_LONGEST,Serdes.ROUTE_LIST_SERDE.serialize(routes)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onAllRoutesCompleted() {\n\n }", "public int getNombreLiaison()\t{\r\n \treturn this.routes.size();\r\n }", "protected abstract Deque<Vertex<AtomicReference>> getVehicleRoute(int entry, int exit);", "@Override\r\n\tpublic void onReCalculateRouteForTrafficJam() {\n\r\n\t}",...
[ "0.5539538", "0.5190973", "0.5121515", "0.5099624", "0.5091628", "0.5073393", "0.49973407", "0.49935204", "0.49827868", "0.49624658", "0.49385548", "0.4921713", "0.4920569", "0.49041292", "0.48779348", "0.48416218", "0.4836936", "0.48329347", "0.48233676", "0.4810487", "0.480...
0.6390108
0
Called when the activity is first created.
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.email); final EditText edittextEmailSubject = (EditText)findViewById(R.id.email_subject); final EditText edittextEmailText = (EditText)findViewById(R.id.email_text); Button buttonSendEmail_intent = (Button)findViewById(R.id.sendemail_intent); buttonSendEmail_intent.setOnClickListener(new Button.OnClickListener(){ public void onClick(View arg0) { // TODO Auto-generated method stub String emailAddress = "achan17@appeyroad.org"; String emailSubject = edittextEmailSubject.getText().toString(); String emailText = edittextEmailText.getText().toString(); String emailAddressList[] = {emailAddress}; Intent intent = new Intent(Intent.ACTION_SEND); intent.setType("plain/text"); intent.putExtra(Intent.EXTRA_EMAIL, emailAddressList); intent.putExtra(Intent.EXTRA_SUBJECT, emailSubject); intent.putExtra(Intent.EXTRA_TEXT, emailText); startActivity(Intent.createChooser(intent, "Choice App to send email:")); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t\tinit();\n\t}", "@Override\r\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\r\n\t}", "@Override\n\tpublic void onActivit...
[ "0.791686", "0.77270156", "0.7693263", "0.7693263", "0.7693263", "0.7693263", "0.7693263", "0.7693263", "0.7637394", "0.7637394", "0.7629958", "0.76189965", "0.76189965", "0.7543775", "0.7540053", "0.7540053", "0.7539505", "0.75269467", "0.75147736", "0.7509639", "0.7500879",...
0.0
-1
TODO Autogenerated method stub
public void onClick(View arg0) { String emailAddress = "achan17@appeyroad.org"; String emailSubject = edittextEmailSubject.getText().toString(); String emailText = edittextEmailText.getText().toString(); String emailAddressList[] = {emailAddress}; Intent intent = new Intent(Intent.ACTION_SEND); intent.setType("plain/text"); intent.putExtra(Intent.EXTRA_EMAIL, emailAddressList); intent.putExtra(Intent.EXTRA_SUBJECT, emailSubject); intent.putExtra(Intent.EXTRA_TEXT, emailText); startActivity(Intent.createChooser(intent, "Choice App to send 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
add triples to HBase
public void addRow(String tableName, String key, String columnFam, String columnName, String val) throws IOException { HTableInterface table = con.getTable(tableName); Put row = new Put(Bytes.toBytes(key)); row.add(Bytes.toBytes(columnFam.replaceAll("[^A-Za-z0-9 ]", "")), Bytes.toBytes(columnName.replaceAll("[^A-Za-z0-9 ]", "")), Bytes.toBytes(val)); table.put(row); // store full predicate URI String pred; if (columnFam.compareTo("literal") != 0) { pred = columnFam; } else { pred = columnName; } System.out.println("PRED ENTRY: " + pred + " " + pred.replaceAll("[^A-Za-z0-9 ]", "")); table = con.getTable("predicates"); row = new Put(Bytes.toBytes(pred.replaceAll("[^A-Za-z0-9 ]", ""))); row.add(Bytes.toBytes("URI"), Bytes.toBytes(""), Bytes.toBytes(pred)); table.put(row); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void createEntriesInBatch(Map<byte[], Double> table)\n throws RocksDBException {\n byte[] keyword;\n double weight;\n\n for (Entry<byte[], Double> it : table.entrySet()) {\n keyword = it.getKey();\n weight = it.getValue();\n db.put(keyword,...
[ "0.57451504", "0.5726982", "0.57241815", "0.5669737", "0.56527114", "0.5628472", "0.5609776", "0.55935585", "0.5592162", "0.5562579", "0.555523", "0.55410254", "0.5537342", "0.5507864", "0.54226357", "0.5403265", "0.5402998", "0.53307724", "0.52758336", "0.52732146", "0.52507...
0.5060026
44
TODO Autogenerated method stub
@Override public ArrayList<ArrayList<Value>> getResults(Value[] quad) throws IOException { 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
////////////////////////////////////////////////////// after process session Author : ThangPV Created Date : 16/09/2004 //////////////////////////////////////////////////////
public void afterProcessSession() throws Exception { try { if (server != null) { try { server.close(); } catch (Exception e) { logMonitor("close server error: " + e.getMessage()); } finally { server = null; } } Iterator<Integer> sessionIds = handlers.keySet().iterator(); while (sessionIds.hasNext()) { try { TCPHandler handler = handlers.get(sessionIds.next()); if (handler != null) { handler.stop(1000); } } catch (Exception e) { e.printStackTrace(); } } handlers.clear(); } finally { super.afterProcessSession(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void ProductVOSGetParmsFrameActual(String args[]) {\n\n // get url parameter values\n String sessionCode = ec.getArgument(args,sc.SESSIONCODE);\n String productStr = ec.getArgument(args,sc.PRODUCT);\n int product = Integer.parseInt(productStr.trim());\n String fileName = ec.getAr...
[ "0.5639393", "0.5537129", "0.5537129", "0.5537129", "0.5537129", "0.5537129", "0.5519427", "0.55158645", "0.55158645", "0.546696", "0.54284495", "0.54284495", "0.54284495", "0.5415772", "0.53801185", "0.534579", "0.5340603", "0.5326696", "0.53085315", "0.5297876", "0.5294696"...
0.0
-1
////////////////////////////////////////////////////// process session Author : ThangPV Created Date : 16/09/2004 //////////////////////////////////////////////////////
public void doProcessSession() throws Exception { try { checkInstance(); if ((server == null) || server.isClosed()) { server = new ServerSocket(listenPort, backLogSize); } TCPServer callbackServer = new TCPServer(server, this); callbackServer.start(); while (isAvailable()) { Thread.sleep(1000); } } catch (Exception e) { throw e; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n \tpublic void process() {\n \t\t\r\n \t}", "public PDDeviceNProcess getProcess() {\n/* 93 */ COSDictionary process = (COSDictionary)this.dictionary.getDictionaryObject(COSName.PROCESS);\n/* 94 */ if (process == null)\n/* */ {\n/* 96 */ return null;\n/* */ }\n/* 98 ...
[ "0.58440435", "0.5826954", "0.56998444", "0.5694436", "0.56772506", "0.5664899", "0.5623553", "0.56138015", "0.5592383", "0.5585351", "0.5576332", "0.554524", "0.554524", "0.554524", "0.554524", "0.554524", "0.55429965", "0.5537506", "0.5537506", "0.5510387", "0.5506659", "...
0.0
-1
This happens all the time in mineshafts and swamps/jungles
private BlockPos stuckInBlock(AltoClef mod) { BlockPos p = mod.getPlayer().getBlockPos(); if (isAnnoying(mod, p)) return p; if (isAnnoying(mod, p.up())) return p.up(); BlockPos[] toCheck = generateSides(p); for (BlockPos check : toCheck) { if (isAnnoying(mod, check)) { return check; } } BlockPos[] toCheckHigh = generateSides(p.up()); for (BlockPos check : toCheckHigh) { if (isAnnoying(mod, check)) { return check; } } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void toyPlacingfStuff(){\n //nu stiu daca asta ramane\n gettingBackToInitial();\n nearingTheWallBefore();\n parallelToTheWall();\n actualToyPlacing();\n }", "private void prepare_3_warten_auf_start() {\n if (stopBecause_wartenAufStart() ) {\n ...
[ "0.61359483", "0.613371", "0.6092652", "0.6046955", "0.6005264", "0.5991666", "0.59291285", "0.5885065", "0.5877082", "0.5801444", "0.5796402", "0.5791501", "0.5754575", "0.5750707", "0.57502717", "0.5731979", "0.57304764", "0.57281363", "0.5726623", "0.5725147", "0.57249916"...
0.0
-1
Loads the properties associated with the item selected in the file drop down list
protected void updateFromTemplate() { try { if (templateList.getSelectedItem() != null) { getConfigurer().loadPropertiesFromFile((String) templateList.getSelectedItem()); Iterator<PropertyInputPanel> it = propertyInputPanels.iterator(); while (it.hasNext()) { PropertyInputPanel panel = it.next(); Object currentValue = getConfigurer().getProperty(panel.getName()); if (currentValue != null && panel.isEnabled()) { panel.setValue(currentValue); } } } } catch (ClassCastException e) { Util.debugMsg("Saved template has incompatible data, it will be ignored"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void loadFile(){\n returnValue = this.showOpenDialog(null);\n if (returnValue == JFileChooser.APPROVE_OPTION) {\n selected = new File(this.getSelectedFile().getAbsolutePath());\n Bank.customer=(new CustomerFileReader(selected)).readCustomer();\n }\n }", "p...
[ "0.619737", "0.6196232", "0.6174098", "0.61427295", "0.6128252", "0.61124814", "0.6003167", "0.5967535", "0.5825372", "0.58000404", "0.57878304", "0.57505906", "0.5745925", "0.5739012", "0.5727784", "0.5727301", "0.571929", "0.5701581", "0.5676581", "0.56715167", "0.5670947",...
0.5524574
40
TODO Autogenerated method stub
@Override public String toString() { return "CTSbean [message "+ message+"]"; }
{ "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 a list from elements of HashMap
private static HashMap<Knight, Float> sortByY(HashMap<Knight, Float> hm) { List<Map.Entry<Knight, Float>> list = new LinkedList<Map.Entry<Knight, Float> >(hm.entrySet()); // Sort the list Collections.sort(list, new Comparator<Map.Entry<Knight, Float> >() { public int compare(Map.Entry<Knight, Float> o1, Map.Entry<Knight, Float> o2) { return -1*(o1.getValue()).compareTo(o2.getValue()); } }); // put data from sorted list to hashmap HashMap<Knight, Float> temp = new LinkedHashMap<Knight, Float>(); for (Map.Entry<Knight, Float> aa : list) { temp.put(aa.getKey(), aa.getValue()); } return temp; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static <K, T> List<T> convertMapToList(Map<K, T> map) {\r\n\t\t\r\n\t\t// Si la collection est nulle\r\n\t\tif(map == null) return null;\r\n\t\t\r\n\t\t// On retourne l'ensemble\r\n\t\treturn new ArrayList<T>(map.values());\r\n\t}", "public static <K,V> ArrayList<V> convertHashMapToArrayList(\n ...
[ "0.67827004", "0.6717797", "0.64709026", "0.63618165", "0.63529605", "0.62714493", "0.6162821", "0.61418587", "0.61238843", "0.60968685", "0.5995635", "0.5906735", "0.5898141", "0.5863987", "0.58562297", "0.5830712", "0.5818111", "0.5812796", "0.5764504", "0.5725471", "0.5670...
0.0
-1
do i really need these?
public void setPlayerUnit(Vector2 newpos, int id) { this.playerUnits.get(id).setPos(newpos); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected boolean func_70814_o() { return true; }", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "private stendhal() {\n\t}", "@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}", ...
[ "0.62513965", "0.59610397", "0.59342474", "0.5811812", "0.579079", "0.57884634", "0.5772769", "0.5739353", "0.57298076", "0.5729538", "0.5712448", "0.5704624", "0.5685619", "0.5657851", "0.5633735", "0.55605215", "0.5537795", "0.5533348", "0.5526894", "0.5510673", "0.5504693"...
0.0
-1
/Generates symbols of full range from "!" up to "~" in ASCII
static char[] generateFullRange(int length) { charArray = new char[length]; for (int i = 0; i < length; i++) { charArray[i] = RandomChar.generateFullRangeChar(); } return charArray; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "CharacterTarget put(char[] symbols, int from, int to) throws PrintingException;", "String symbol();", "public static String[] generateRegularAlphabet()\n {\n String[] regularAlphabet = new String[26];\n for(int index = 0; index<regularAlphabet.length; index++)\n {\n regularAl...
[ "0.6323514", "0.6034745", "0.5936677", "0.59157366", "0.5891908", "0.57684517", "0.5755347", "0.5733475", "0.5708018", "0.56767404", "0.56512326", "0.56247836", "0.560284", "0.5589407", "0.55767596", "0.5564438", "0.555017", "0.5546082", "0.5536068", "0.5526199", "0.55101335"...
0.0
-1
/Generates upper case symbols of range from "A" to "Z" in ASCII
public static char[] generateAZUpperRange(int length) { charArray = new char[length]; for (int i = 0; i < length; i++) { charArray[i] = RandomChar.generateAZUpperRangeChar(); } return charArray; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void printUpperCase()\n {\n for(char i = 'A'; i <= 'Z'; i++){\n System.out.print(i + \" \");\n }\n System.out.println();\n }", "private static char[] generateAlphabet() {\n char[] bet = new char[26];\n\n int i = 0;\n for(char alpha = 'A'; ...
[ "0.68228465", "0.67891717", "0.6788748", "0.6715313", "0.6517094", "0.6480094", "0.6404633", "0.6367958", "0.63679034", "0.6342419", "0.6252651", "0.6249263", "0.62472194", "0.6243108", "0.62261355", "0.6205757", "0.6198232", "0.6189211", "0.6177215", "0.6163962", "0.61533993...
0.65514183
4
/Generates lower case symbols of range from "a" to "z" in ASCII
static char[] generateAZLowerRange(int length) { charArray = new char[length]; for (int i = 0; i < length; i++) { charArray[i] = RandomChar.generateAZLowerRangeChar(); } return charArray; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void printLowerCase()\n {\n for(char i = 'a'; i <= 'z'; i++){\n System.out.print(i + \" \");\n }\n System.out.println();\n }", "private static char[] generateAlphabet() {\n char[] bet = new char[26];\n\n int i = 0;\n for(char alpha = 'A'; ...
[ "0.7079877", "0.676314", "0.66556215", "0.6620477", "0.6565907", "0.65628135", "0.6552958", "0.6458548", "0.64162254", "0.6403072", "0.632278", "0.6321165", "0.631033", "0.630362", "0.62712914", "0.62520266", "0.6216917", "0.617818", "0.61614376", "0.6153085", "0.61200535", ...
0.6675427
2
/Generates both an upper and lower case symbols of range from "a" to "z" in ASCII
static char[] generateAZBothCasesRange(int length) { charArray = new char[length]; int k; for (int i = 0; i < length; i++) { k = (int) (Math.random() * 2); if (k == 0) { charArray[i] = RandomChar.generateAZLowerRangeChar(); } else if (k == 1) { charArray[i] = RandomChar.generateAZUpperRangeChar(); } } return charArray; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static char[] generateAlphabet() {\n char[] bet = new char[26];\n\n int i = 0;\n for(char alpha = 'A'; alpha <= 'Z'; alpha++) {\n bet[i] = alpha;\n i++;\n }\n\n return bet;\n }", "static char[] generateAZLowercaseAndSpecial(int length) {\n ...
[ "0.6909125", "0.66712165", "0.66398674", "0.6566308", "0.6560129", "0.6533315", "0.6532265", "0.65248317", "0.65102255", "0.65029454", "0.6481819", "0.6471617", "0.6463946", "0.6401094", "0.6380608", "0.6374833", "0.63026506", "0.62782997", "0.62398255", "0.62219626", "0.6186...
0.65608877
4
/Generates both an upper and lowercase symbols of range from "a" to "z" and numbers in ASCII
static char[] generateAZBothCasesAndNumbers(int length) { charArray = new char[length]; int k; for (int i = 0; i < length; i++) { k = (int) (Math.random() * 3); if (k == 0) { charArray[i] = RandomChar.generateAZLowerRangeChar(); } else if (k == 1) { charArray[i] = RandomChar.generateAZUpperRangeChar(); } else if (k == 2) { charArray[i] = RandomChar.generateNumberChar(); } } return charArray; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private char[] alphanumeric(){\n StringBuffer buf=new StringBuffer(128);\n for(int i=48; i<= 57;i++)buf.append((char)i); // 0-9\n for(int i=65; i<= 90;i++)buf.append((char)i); // A-Z\n for(int i=97; i<=122;i++)buf.append((char)i); // a-z\n return buf.toString().toCharArray();\n }", "private stati...
[ "0.7081991", "0.7000228", "0.67165196", "0.6644468", "0.65909886", "0.65148586", "0.65131474", "0.6510591", "0.6446884", "0.6372861", "0.63133985", "0.6280616", "0.6279401", "0.625684", "0.6255893", "0.6242577", "0.62365454", "0.62162614", "0.62017316", "0.6197515", "0.619245...
0.637035
10
/Generates both an upper and lowercase symbols of range from "a" to "z" and special symbols in ASCII
static char[] generateAZBothCasesAndSpecial(int length) { charArray = new char[length]; int k; for (int i = 0; i < length; i++) { k = (int) (Math.random() * 3); if (k == 0) { charArray[i] = RandomChar.generateAZLowerRangeChar(); } else if (k == 1) { charArray[i] = RandomChar.generateAZUpperRangeChar(); } else if (k == 2) { charArray[i] = RandomChar.generateSpecChar(); } } return charArray; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static char[] generateAlphabet() {\n char[] bet = new char[26];\n\n int i = 0;\n for(char alpha = 'A'; alpha <= 'Z'; alpha++) {\n bet[i] = alpha;\n i++;\n }\n\n return bet;\n }", "private char[] alphanumeric(){\n StringBuffer buf=new StringBu...
[ "0.7063353", "0.7019666", "0.68015313", "0.67887646", "0.6644235", "0.6612728", "0.6472387", "0.6461682", "0.64129907", "0.6358171", "0.63264924", "0.62630606", "0.6222656", "0.6209745", "0.6168116", "0.61490464", "0.6137803", "0.6137803", "0.6137803", "0.612987", "0.6078408"...
0.64389795
8
/Generates lower case symbols of range from "a" to "z" and numbers in ASCII
static char[] generateAZLowercaseAndNumbers(int length) { charArray = new char[length]; int k; for (int i = 0; i < length; i++) { k = (int) (Math.random() * 2); if (k == 0) { charArray[i] = RandomChar.generateAZLowerRangeChar(); } else if (k == 1) { charArray[i] = RandomChar.generateNumberChar(); } } return charArray; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private char[] alphanumeric(){\n StringBuffer buf=new StringBuffer(128);\n for(int i=48; i<= 57;i++)buf.append((char)i); // 0-9\n for(int i=65; i<= 90;i++)buf.append((char)i); // A-Z\n for(int i=97; i<=122;i++)buf.append((char)i); // a-z\n return buf.toString().toCharArray();\n }", "public static...
[ "0.6897884", "0.6793696", "0.6648284", "0.6600082", "0.63788915", "0.63514227", "0.6351229", "0.63368505", "0.6327876", "0.62575775", "0.6245718", "0.62434924", "0.6217447", "0.6089307", "0.60827684", "0.6080794", "0.60496104", "0.60467494", "0.6045957", "0.6020842", "0.60070...
0.6549075
4
/Generates lower case symbols of range from "a" to "z" and specials in ASCII
static char[] generateAZLowercaseAndSpecial(int length) { charArray = new char[length]; int k; for (int i = 0; i < length; i++) { k = (int) (Math.random() * 2); if (k == 0) { charArray[i] = RandomChar.generateAZLowerRangeChar(); } else if (k == 1) { charArray[i] = RandomChar.generateSpecChar(); } } return charArray; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private char[] alphanumeric(){\n StringBuffer buf=new StringBuffer(128);\n for(int i=48; i<= 57;i++)buf.append((char)i); // 0-9\n for(int i=65; i<= 90;i++)buf.append((char)i); // A-Z\n for(int i=97; i<=122;i++)buf.append((char)i); // a-z\n return buf.toString().toCharArray();\n }", "private stati...
[ "0.68817985", "0.68006915", "0.67605394", "0.6723474", "0.6578026", "0.6559472", "0.6486983", "0.64648825", "0.641386", "0.6379357", "0.6285906", "0.6281822", "0.62632835", "0.6193528", "0.61819553", "0.6180578", "0.61774385", "0.6145453", "0.6073894", "0.6050599", "0.6034718...
0.68155074
1
/Generates lower case symbols of range from "a" to "z", numbers and special symbols in ASCII
static char[] generateAZLowercaseAndNumbersAndSpecial(int length) { charArray = new char[length]; int k; for (int i = 0; i < length; i++) { k = (int) (Math.random() * 3); if (k == 0) { charArray[i] = RandomChar.generateAZLowerRangeChar(); } else if (k == 1) { charArray[i] = RandomChar.generateNumberChar(); } else if (k == 2) { charArray[i] = RandomChar.generateSpecChar(); } } return charArray; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private char[] alphanumeric(){\n StringBuffer buf=new StringBuffer(128);\n for(int i=48; i<= 57;i++)buf.append((char)i); // 0-9\n for(int i=65; i<= 90;i++)buf.append((char)i); // A-Z\n for(int i=97; i<=122;i++)buf.append((char)i); // a-z\n return buf.toString().toCharArray();\n }", "private stati...
[ "0.69318366", "0.66561383", "0.6620216", "0.6597242", "0.6492778", "0.64186424", "0.6398833", "0.6263954", "0.6260839", "0.6252526", "0.6228833", "0.6202242", "0.6104188", "0.6099283", "0.6039919", "0.60236025", "0.6014459", "0.5945184", "0.5941973", "0.5907462", "0.5906357",...
0.64199686
5
/Generates symbols numbers of range from "0" to "9" in ASCII
static char[] generateNumbersRange(int length) { charArray = new char[length]; for (int i = 0; i < length; i++) { charArray[i] = RandomChar.generateNumberChar(); } return charArray; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static char toSymbol(int value) {\n char symbol;\n if (value < 10 && value > 1) {\n symbol = (char)(value + '0');\n } else if (value == 10) {\n symbol = 'T';\n } else if (value == 11) {\n symbol = 'J';\n } else if (value == 12) {\n ...
[ "0.6570081", "0.6446794", "0.64247674", "0.6416882", "0.63760144", "0.63442165", "0.6336322", "0.6289959", "0.62605315", "0.61515707", "0.609926", "0.60394263", "0.6029746", "0.6011225", "0.5994438", "0.59930295", "0.5975841", "0.5929417", "0.59100395", "0.58969706", "0.58519...
0.62178093
9
/Generates special symbols in ASCII
public static char[] generateSpecRange(int length) { charArray = new char[length]; for (int i = 0; i < length; i++) { charArray[i] = RandomChar.generateSpecChar(); } return charArray; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public SpecialChar insertSpecialChar() {\n SpecialChar specialChar = new SpecialChar();\n specialChar.setId(4491);\n specialChar.setSpecialCharA(\"! ' , . / : ; ? ^ _ ` | \"\n + \" ̄ 、 。 · ‥ … ¨ 〃 ­ ― ∥ \ ∼ ´ ~ ˇ \" + \"˘ ˝ ˚ ˙ ¸ ˛ ¡ ¿ ː\");\n specialChar.setSpecialCharB(\"...
[ "0.7055588", "0.6479342", "0.63923746", "0.6309312", "0.6257501", "0.61478317", "0.6132521", "0.6088955", "0.6076513", "0.6065949", "0.6048138", "0.60454977", "0.6044199", "0.6018566", "0.5987317", "0.59800124", "0.59769994", "0.59464204", "0.5938841", "0.5903699", "0.5901684...
0.0
-1
increment algorithm goes here if day is last of month day = 1, month increments if month is last month, day and month go to 1, year increments
public void increment() // Increments this IncDate to represent the next day. { boolean ly = false; if(((year % 4 == 0) && year % 100 != 0) || year % 400 == 0) { //leap year ly = true; } if ((month == 2 && day == 28 && !ly) || (month == 2 && day == 29 && ly)) { month = 3; day = 1; } else if (month == 2 && day == 28 && !ly) { day ++; } else if ((month == 4 || month == 6 || month == 9 || month == 11) && day == 30){ month ++; day = 1; } else if ((month == 1 || month == 3 || month == 5 || month == 7 || month == 8 || month == 10) && day == 31){ System.out.println("month is " + month); month ++; day = 1; } else if ((month == 12) && day == 31) { year ++; month = 1; day = 1; } else { day ++; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void increaseDay(){\n leapyear(year); //Call leapyear on year to check for leap year\r\n day++; //Increment day\r\n if(day > days[month-1]){ //If day reaches higher than the month's day\r\n day = 1; //Set day to zero\r\n month++...
[ "0.77277416", "0.69481707", "0.6795424", "0.6481091", "0.64461917", "0.6397658", "0.6134762", "0.6034361", "0.5924143", "0.5905056", "0.5902294", "0.5882407", "0.5873922", "0.58681905", "0.57950467", "0.57842404", "0.57555246", "0.5745787", "0.5708704", "0.56733185", "0.56457...
0.69364107
2
get the output file.
static File getOutputFileFromArguments(String[] args) { return new File(args[args.length - 1]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "String getFileOutput();", "public File getOutputFilePath() {\n return outputFile;\n }", "@Override\r\n\tpublic String getOutputFile() {\n\t\t\r\n\t\treturn fileOutputPath;\r\n\t}", "public File getOutput(){\n return outputDir;\n }", "public File getFile() {\n\t\treturn outputFile;\n\t}", ...
[ "0.7598711", "0.756548", "0.7548913", "0.73203903", "0.729528", "0.7274045", "0.723138", "0.7123023", "0.7076947", "0.7047615", "0.6981632", "0.69709295", "0.67648643", "0.67612284", "0.6684464", "0.664121", "0.6596802", "0.65960747", "0.6575586", "0.65743244", "0.65645367", ...
0.6327065
28