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 |
|---|---|---|---|---|---|---|
Set the discourseId, iff IQ item is mapped to a Discourse. | public void setDiscourseId(Long discourseId) { this.discourseId = discourseId; } | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Long getDiscourseId() { return discourseId; }",
"public void setIdCourse(Long idCourse) {\n this.idCourse = idCourse;\n }",
"public void setIdDiscord(String idDiscord) {\n\t\tthis.idDiscord = idDiscord;\n\t}",
"public void setCourseID(int courseID) {\n this.courseID = courseID;\n }... | [
"0.6755385",
"0.66178304",
"0.59795606",
"0.58074635",
"0.5755819",
"0.5681284",
"0.55320835",
"0.5496237",
"0.54852545",
"0.5434697",
"0.5413999",
"0.5401976",
"0.53734666",
"0.5360979",
"0.53433406",
"0.5335244",
"0.53170174",
"0.52832574",
"0.52760327",
"0.52696025",
"0.52... | 0.7117883 | 0 |
METHODS FOR SORTING Returns the relative path to the appropriate image. | public static String getSortImage(String columnName,
String sortByColumn, Boolean isAscending) {
String imgIcon = "images/trans_spacer.gif";
if (sortByColumn != null && sortByColumn.equals(columnName)) {
imgIcon = isAscending ? "images/grid/up.gif" : "images/grid/down.gif";
}
return imgIcon;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static JwComparator<AcPost> getImagePathComparator()\n {\n return AcPostTools.instance.getImagePathComparator();\n }",
"java.lang.String getImagePath();",
"String getImagePath();",
"String getImagePath();",
"public static String getOrderImagesPath() {\n\t\treturn \"/home/ftpshared/Order... | [
"0.6983521",
"0.63470393",
"0.6233355",
"0.6233355",
"0.6062491",
"0.60122037",
"0.594348",
"0.5894518",
"0.576427",
"0.5756206",
"0.57494265",
"0.57230884",
"0.5685261",
"0.5616713",
"0.5596388",
"0.55904007",
"0.5571093",
"0.5566416",
"0.55640876",
"0.55610317",
"0.5537714"... | 0.5594191 | 15 |
Gets the current sortBy parameters. | public static SortParameter[] getSortByParameters(String sortByColumn, Boolean isAscending) {
SortParameter[] sortParams = ASC_DATASET_PARAMS;
if (sortByColumn.equals(COLUMN_DATASET)) {
if (isAscending) {
sortParams = ASC_DATASET_PARAMS;
} else {
sortParams = DESC_DATASET_PARAMS;
}
} else if (sortByColumn.equals(COLUMN_USER)) {
if (isAscending) {
sortParams = ASC_USER_PARAMS;
} else {
sortParams = DESC_USER_PARAMS;
}
} else if (sortByColumn.equals(COLUMN_STATUS)) {
if (isAscending) {
sortParams = ASC_STATUS_PARAMS;
} else {
sortParams = DESC_STATUS_PARAMS;
}
} else if (sortByColumn.equals(COLUMN_LAST_UPDATE)) {
if (isAscending) {
sortParams = ASC_LAST_UPDATE_PARAMS;
} else {
sortParams = DESC_LAST_UPDATE_PARAMS;
}
}
return sortParams;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public LSPSortByField[] getSortByFields () {\r\n return sortByFields;\r\n }",
"public ArrayList<SortingRule> get_sort_by() {\n\t\treturn sort_by;\n\t}",
"public final String getSortBy() {\n return this.sortBy;\n }",
"public ProductSearchSortBy getSortBy() {\r\n\t\treturn sortBy;\r\n\t}",
... | [
"0.6657385",
"0.63428",
"0.620778",
"0.61682725",
"0.6155712",
"0.60849077",
"0.59228945",
"0.58972406",
"0.5871237",
"0.5841883",
"0.5824279",
"0.5821106",
"0.5816625",
"0.5810857",
"0.57888305",
"0.57526916",
"0.56605875",
"0.56476223",
"0.56476223",
"0.56476223",
"0.564762... | 0.652384 | 1 |
SORTING COMPARATOR Comparator object used for sorting. | public static Comparator<ImportQueueDto> getComparator(SortParameter... sortParameters) {
return new ImportQueueDtoComparator(sortParameters);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected Comparator<?> getInitialSortOrderComparator() {\n MetaData md = PmTableImpl.this.getOwnMetaDataWithoutPmInitCall();\n return (md.initialBeanSortComparatorClass != null)\n ? (Comparator<?>)ClassUtil.newInstance(md.initialBeanSortComparatorClass)\n : null;\n }",
"private st... | [
"0.6610415",
"0.655877",
"0.6505474",
"0.6454848",
"0.63788575",
"0.6316831",
"0.62774116",
"0.62538517",
"0.61157006",
"0.6080931",
"0.60548",
"0.60458887",
"0.60448855",
"0.6001768",
"0.5995091",
"0.5957365",
"0.5912905",
"0.59019",
"0.58997333",
"0.5890269",
"0.58863115",
... | 0.5425649 | 58 |
constructor with error message | public BaseException(String message) {
super(message);
setErrorCode();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Error(String message) {\r\n \tsuper(message);\r\n \t}",
"public Error() {\n }",
"public ErrorMessage() {\n\t}",
"public SMSLibException(String errorMessage)\n/* 10: */ {\n/* 11:34 */ super(errorMessage);\n\n/* 12: */ }",
"public MyException() {\n super(\"This is my me... | [
"0.79731846",
"0.76924187",
"0.7365308",
"0.7257605",
"0.7246013",
"0.7165723",
"0.710336",
"0.7083699",
"0.70731425",
"0.7048703",
"0.70329666",
"0.70011795",
"0.69793147",
"0.6958975",
"0.695703",
"0.69276804",
"0.6907643",
"0.6844017",
"0.6843322",
"0.6833012",
"0.68055063... | 0.66929734 | 42 |
return the error code | public String getErrorCode() {
return errorCode;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"int getErrcode();",
"int getErrorCode();",
"public int getErrcode() {\n return errcode_;\n }",
"public int getErrcode() {\n return errcode_;\n }",
"public static int error () {\n System.out.println(\"ERROR\");\n hasError = true;\n return -1;\n }",
"public int g... | [
"0.86431193",
"0.80883425",
"0.8057261",
"0.803618",
"0.78758246",
"0.76894146",
"0.76841074",
"0.7652997",
"0.75913894",
"0.75651044",
"0.7462247",
"0.7459938",
"0.7297022",
"0.7291616",
"0.7274922",
"0.7270449",
"0.72695506",
"0.72695506",
"0.7250577",
"0.72484744",
"0.7229... | 0.65460664 | 59 |
each child class should be set there own error code | protected abstract void setErrorCode(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public abstract void OnError(int code);",
"@Override\n\tpublic void setWrongError() {\n\t\t\n\t}",
"public abstract void setError(String message);",
"ErrorCodes(int code){\n this.code = code;\n //this.message = message;\n }",
"@Override\n\t\t\t\t\t\t\tpublic void error(Exception e) {\n\t\t... | [
"0.65056646",
"0.64665705",
"0.6371069",
"0.6256555",
"0.6107764",
"0.6106705",
"0.6095896",
"0.6047685",
"0.598034",
"0.5970608",
"0.5970608",
"0.5970608",
"0.5970608",
"0.5970608",
"0.5970608",
"0.5970608",
"0.5970608",
"0.5970608",
"0.5970608",
"0.5970608",
"0.5970608",
... | 0.71068156 | 0 |
Returns an empty instance of this class | public static PhoneNumber emptyPhone() {
return EMPTY_PHONE_NUMBER;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static Empty getInstance() {\n return instance;\n }",
"public static Query empty() {\n return new Query();\n }",
"@SuppressWarnings(\"unused\")\n public NoConstructor() {\n // Empty\n }",
"@Nonnull\n public static <T> PlayList<T> empty()\n {... | [
"0.74527705",
"0.7078083",
"0.6998747",
"0.68279994",
"0.6733842",
"0.6630634",
"0.6610201",
"0.6608405",
"0.65770215",
"0.656905",
"0.6564851",
"0.6547569",
"0.65080446",
"0.6445754",
"0.64419967",
"0.6436236",
"0.6408827",
"0.6403545",
"0.63761234",
"0.633987",
"0.6315491",... | 0.0 | -1 |
Returns phone number without country code | public String getPhoneNumber() {
return mPhoneNumber;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"java.lang.String getPhoneNumber();",
"java.lang.String getPhoneNumber();",
"java.lang.String getPhoneNumber();",
"java.lang.String getPhonenumber();",
"java.lang.String getPhone();",
"java.lang.String getUserPhone();",
"public static String unformatPhoneNumber(String phoneNo) {\n if (!TextUtils.... | [
"0.762505",
"0.762505",
"0.762505",
"0.7455709",
"0.7075213",
"0.68710923",
"0.6803568",
"0.66987014",
"0.6572036",
"0.65205556",
"0.6494124",
"0.6485083",
"0.64840436",
"0.6476223",
"0.6467579",
"0.6443556",
"0.6439001",
"0.6424977",
"0.6416403",
"0.6386238",
"0.63812774",
... | 0.618384 | 43 |
Returns 2 char country ISO | public String getCountryIso() {
return mCountryIso;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"java.lang.String getCountry();",
"java.lang.String getCountry();",
"String toAlpha2(final String iso3166Alpha3);",
"String toAlpha3(final String iso3166Alpha2);",
"java.lang.String getCountryCode();",
"java.lang.String getCountryCode();",
"java.lang.String getCountryName();",
"String getCountryCode()... | [
"0.75122225",
"0.75122225",
"0.7437496",
"0.7226472",
"0.71832806",
"0.71832806",
"0.7098703",
"0.6979567",
"0.68219745",
"0.6766147",
"0.6761635",
"0.6750512",
"0.6696765",
"0.6692498",
"0.6615337",
"0.66069037",
"0.65988785",
"0.65862143",
"0.65388775",
"0.65370417",
"0.653... | 0.67389303 | 12 |
Nurse n = new Nurse(0, "JULIA", "NOWAK", "normalna"); | private void generate(){
nurses.add(new Nurse(1, "ZUZANNA", "KOWALSKA", "normalna"));
nurses.add(new Nurse(2, "ZOFIA", "WISNIEWSKA", "normalna"));
nurses.add(new Nurse(3, "MAJA", "WOJCIK", "normalna"));
nurses.add(new Nurse(4, "HANNA", "KOWALCZYK", "normalna"));
nurses.add(new Nurse(5, "AMELIA", "KAMINSKA", "normalna"));
nurses.add(new Nurse(6, "ALICJA", "LEWANDOWSKA", "normalna"));
nurses.add(new Nurse(7, "MARIA", "ZIELINSKA", "normalna"));
nurses.add(new Nurse(8, "ALEKSANDRA", "WOZNIAK", "normalna"));
nurses.add(new Nurse(9, "OLIWIA", "SZYMANSKA", "normalna"));
nurses.add(new Nurse(10, "NATALIA", "DABROWSKA", "normalna"));
nurses.add(new Nurse(11, "WIKTORIA", "KOZLOWSKA", "normalna"));
nurses.add(new Nurse(12, "EMILIA", "JANKOWSKA", "bez_nocnych"));
nurses.add(new Nurse(13, "ANTONINA", "WOJCIECHOWSKA", "normalna", 32));
nurses.add(new Nurse(14, "LAURA", "KWIATKOWSKA", "normalna", 24));
nurses.add(new Nurse(15, "POLA", "MAZUR", "normalna", 24));
nurses.add(new Nurse(16, "IGA", "KRAWCZYK", "normalna", 24));
// nurses.add(new Nurse(17, "ANNA", "KACZMAREK", "normalna"));
// nurses.add(new Nurse(18, "LILIANA", "PIOTROWSKA", "normalna"));
// nurses.add(new Nurse(19, "MARCELINA", "GRABOWSKA", "normalna"));
// nurses.add(new Nurse(20, "GABRIELA", "PAWLOWSKA", "normalna"));
// nurses.add(new Nurse(21, "MICHALINA", "MICHALSKA", "normalna"));
// nurses.add(new Nurse(22, "KORNELIA", "ZAJAC", "normalna"));
// nurses.add(new Nurse(23, "NIKOLA", "KROL", "normalna"));
// nurses.add(new Nurse(24, "HELENA", "JABLONSKA", "normalna"));
// nurses.add(new Nurse(25, "JULIA", "WIECZOREK", "normalna"));
// nurses.add(new Nurse(26, "JULIA", "NOWAKOWSKA", "normalna"));
// nurses.add(new Nurse(27, "MILENA", "MAJEWSKA", "normalna"));
// nurses.add(new Nurse(28, "MARTYNA", "WROBEL", "normalna"));
// nurses.add(new Nurse(29, "JAGODA", "STEPIEN", "normalna"));
// nurses.add(new Nurse(30, "MAGDALENA", "OLSZEWSKA", "normalna"));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Nurse()\r\n {\r\n firstName = \"\";\r\n familyName = \"\";\r\n ID = IDCreator;\r\n\t\t\tIDCreator++;\r\n }",
"Student4(int i, String n) {\n id = i;\n name = n;\n\n }",
"public Student()\n {\n lname = \"Tantiviramanond\";\n fname = \"Ancha... | [
"0.78525597",
"0.71050787",
"0.70530105",
"0.6958132",
"0.67922205",
"0.67216593",
"0.66960925",
"0.6681275",
"0.66346014",
"0.66199946",
"0.6610923",
"0.6591792",
"0.65147823",
"0.65114826",
"0.6504006",
"0.64998156",
"0.64964896",
"0.64964896",
"0.64964896",
"0.6495178",
"0... | 0.0 | -1 |
real time this is the place where we have to register/add all the "service/MQ/Endpoint" to the mediator. | public void addUser(User user) {
System.out.println("adding user :"+user.toString());
userList.add(user);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected void onEndpointConnected(Endpoint endpoint) {}",
"private void setupMqttEndpoint() {\n\n this.mqttEndpoint\n .publishHandler(this::publishHandler)\n .publishAcknowledgeHandler(this::pubackHandler)\n .publishReleaseHandler(this::pubrelHandler)\n ... | [
"0.6511682",
"0.63555443",
"0.6320652",
"0.61630857",
"0.6058195",
"0.604476",
"0.6017889",
"0.59452707",
"0.59452707",
"0.5935031",
"0.58845943",
"0.5877571",
"0.5861216",
"0.585608",
"0.58519155",
"0.58292073",
"0.58229053",
"0.5821918",
"0.58034986",
"0.57645905",
"0.57615... | 0.0 | -1 |
ajout de la police | @Override
public void onBindViewHolder(LeaderboardViewHolder holder, int position) {
Typeface typeface = Typeface.createFromAsset(mCtx.getAssets(), "BTTF.ttf");
//set les margin des paramètres
//params.setMargins(0, 20, 0, 0);
//holder.getmCardView().setAlpha(0.6f);
holder.getmTextViewView().setTextSize(18);
//suivant la position
if(position==0) {
holder.getmCardView().setCardBackgroundColor(Color.parseColor("#ffd700"));
holder.getmImageView().setImageResource(R.drawable.ic_or);
holder.getmTextViewView().setTypeface(typeface);
if(tableaudemerde[0] == null){
holder.getmTextViewView().setText(R.string.iftextnull);
}else{
holder.getmTextViewView().setText("Score : " + String.valueOf(tableaudemerde[position]));
}
}
else if(position==1) {
holder.getmCardView().setCardBackgroundColor(Color.parseColor("#CECECE"));
holder.getmImageView().setImageResource(R.drawable.ic_argent);
holder.getmTextViewView().setTypeface(typeface);
if(tableaudemerde[1] == null){
holder.getmTextViewView().setText(R.string.iftextnull);
}
else{
holder.getmTextViewView().setText("Score : " + String.valueOf(tableaudemerde[position]));
}
}
else if(position==2) {
holder.getmCardView().setCardBackgroundColor(Color.parseColor("#cd7f32"));
holder.getmImageView().setImageResource(R.drawable.ic_bronze);
holder.getmTextViewView().setTypeface(typeface);
if(tableaudemerde[2] == null){
holder.getmTextViewView().setText(R.string.iftextnull);
}
else{
holder.getmTextViewView().setText("Score : " + String.valueOf(tableaudemerde[position]));
}
}
else if(tableaudemerde[position] == null) {
holder.getmTextViewView().setTypeface(typeface);
holder.getmTextViewView().setText(">");
holder.getmTextViewView().setTextSize(30);
holder.getmImageView().setImageResource(R.drawable.delorean1);
}
else {
holder.getmTextViewView().setTextSize(20);
holder.getmTextViewView().setTypeface(typeface);
holder.getmTextViewView().setText("Score : " + String.valueOf(tableaudemerde[position]));
holder.getmImageView().setImageResource(R.drawable.ic_trophee);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public tambahtoko() {\n initComponents();\n tampilkan();\n form_awal();\n }",
"public PoliceEdit() {\n initComponents();\n showDate();\n showTime();\n PoliceEdit();\n \n\n }",
"public AdminJP() {\n initComponents();\n aplicarTextPrompt... | [
"0.6040914",
"0.59809023",
"0.5897623",
"0.5838972",
"0.5776661",
"0.5714994",
"0.57012767",
"0.56778055",
"0.56567",
"0.5649244",
"0.55539566",
"0.5547978",
"0.5526691",
"0.55158335",
"0.5492498",
"0.54340106",
"0.5433981",
"0.54337704",
"0.54316854",
"0.5430177",
"0.5428312... | 0.0 | -1 |
Checks the error listener for an expected error. The properties of the error event will be compared with the expected values. | private void checkErrorListener(final EventType<? extends ConfigurationErrorEvent> type, final EventType<?> opType, final String key, final Object value) {
final Throwable exception = listener.checkEvent(type, opType, key, value);
assertInstanceOf(SQLException.class, exception);
listener = null; // mark as checked
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n public void testGetPropertyError() throws ConfigurationException {\n setUpErrorConfig().getProperty(\"key1\");\n checkErrorListener(ConfigurationErrorEvent.READ, ConfigurationErrorEvent.READ, \"key1\", null);\n }",
"public void calculateError(double expected) {\n error = ne... | [
"0.59909296",
"0.56294835",
"0.55764395",
"0.54935116",
"0.54794174",
"0.54360914",
"0.5297812",
"0.52899",
"0.52857125",
"0.5281978",
"0.5267491",
"0.52651864",
"0.5234916",
"0.5231009",
"0.52176213",
"0.51983225",
"0.5188406",
"0.5183958",
"0.5173518",
"0.51438797",
"0.5137... | 0.5739294 | 1 |
/ Thread.sleep may or may not help with the database is already in use exception. Thread.sleep(1000); set up the datasource | @BeforeEach
public void setUp() throws Exception {
helper = new DatabaseConfigurationTestHelper();
helper.setUp();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private DataSource() {\n Connection tmpConn = null;\n while(tmpConn == null) {\n try {\n tmpConn = DriverManager.getConnection(CONNECTION_STRING);\n } catch(SQLException e) {\n print(\"Couldn't connect to \" + DB_NAME + \" database: \" + e.getMessag... | [
"0.68518066",
"0.6836796",
"0.6655244",
"0.66416967",
"0.6613981",
"0.65164363",
"0.6360596",
"0.63273305",
"0.6309394",
"0.6307079",
"0.62921435",
"0.627108",
"0.6252215",
"0.6250412",
"0.6250339",
"0.6243237",
"0.6237215",
"0.62190163",
"0.62120926",
"0.6205961",
"0.6205161... | 0.0 | -1 |
Creates a database configuration with default values. | private PotentialErrorDatabaseConfiguration setUpConfig() throws ConfigurationException {
return helper.setUpConfig(PotentialErrorDatabaseConfiguration.class);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic DataConfig createDefaultConfig() {\n\t\treturn new DataConfig();\n\t}",
"public static JdbcOption getDefaultDatabase(ProjectConfig projectConfig) throws Exception {\n\t\treturn getDefaultDatabaseFromFile(projectConfig.getDatabasesPath() + Constants.FILE_SEPERATOR + Constants.DB_SETTINGS_XML_F... | [
"0.65780336",
"0.6577712",
"0.63979197",
"0.6383712",
"0.63746583",
"0.63383806",
"0.62800074",
"0.6276734",
"0.6207977",
"0.60766286",
"0.6052184",
"0.6049976",
"0.60479295",
"0.60222185",
"0.5965997",
"0.5960203",
"0.5922408",
"0.5895172",
"0.58936125",
"0.583146",
"0.58112... | 0.0 | -1 |
Prepares a test for a database error. Sets up a config and registers an error listener. | private PotentialErrorDatabaseConfiguration setUpErrorConfig() throws ConfigurationException {
final PotentialErrorDatabaseConfiguration config = setUpConfig();
setUpErrorListener(config);
return config;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void setUpErrorListener(final PotentialErrorDatabaseConfiguration config) {\n // remove log listener to avoid exception longs\n config.clearErrorListeners();\n listener = new ErrorListenerTestImpl(config);\n config.addEventListener(ConfigurationErrorEvent.ANY, listener);\n ... | [
"0.76572025",
"0.66679764",
"0.6633391",
"0.6133397",
"0.6080927",
"0.60703117",
"0.5988544",
"0.5977649",
"0.5766325",
"0.5750694",
"0.57430285",
"0.57252485",
"0.5721598",
"0.5697526",
"0.56962657",
"0.56918985",
"0.567911",
"0.56619436",
"0.56194395",
"0.5611753",
"0.55932... | 0.622179 | 3 |
Creates an error listener and adds it to the specified configuration. | private void setUpErrorListener(final PotentialErrorDatabaseConfiguration config) {
// remove log listener to avoid exception longs
config.clearErrorListeners();
listener = new ErrorListenerTestImpl(config);
config.addEventListener(ConfigurationErrorEvent.ANY, listener);
config.failOnConnect = true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n public void testLogErrorListener() throws ConfigurationException {\n final DatabaseConfiguration config = helper.setUpConfig();\n assertEquals(1, config.getEventListeners(ConfigurationErrorEvent.ANY).size());\n }",
"public interface ErrorListener {\r\n /**\r\n * Responds to the... | [
"0.61491823",
"0.6055734",
"0.60224247",
"0.6016629",
"0.59656",
"0.590993",
"0.5705817",
"0.5699095",
"0.56630117",
"0.56569976",
"0.5647039",
"0.5608524",
"0.54797363",
"0.5477013",
"0.5456493",
"0.5440804",
"0.5403321",
"0.5352156",
"0.5311382",
"0.5214448",
"0.51811177",
... | 0.695975 | 0 |
if an error listener is defined, we check whether an error occurred | @AfterEach
public void tearDown() throws Exception {
if (listener != null) {
listener.done();
}
helper.tearDown();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\t\tprotected boolean onError(final Exception e) {\n\t\t\treturn false;\n\t\t}",
"private void checkErrorListener(final EventType<? extends ConfigurationErrorEvent> type, final EventType<?> opType, final String key, final Object value) {\n final Throwable exception = listener.checkEvent(type, o... | [
"0.68018204",
"0.6635719",
"0.66120684",
"0.654431",
"0.65213054",
"0.6356628",
"0.6356628",
"0.6356628",
"0.6293777",
"0.6265589",
"0.6220336",
"0.6196923",
"0.61889535",
"0.6174077",
"0.6152345",
"0.61091244",
"0.6105265",
"0.6089805",
"0.60826844",
"0.60808724",
"0.6079454... | 0.0 | -1 |
Tests whether a commit is performed after a property was added. | @Test
public void testAddPropertyDirectCommit() throws ConfigurationException {
helper.setAutoCommit(false);
final DatabaseConfiguration config = helper.setUpConfig();
config.addPropertyDirect("key", "value");
assertTrue(config.containsKey("key"));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"boolean shouldCommit();",
"private synchronized boolean shouldCommit(Message m) {\n\n\t\tboolean flag = false;\n\n\t\ttry {\n\t\t\t// get the commit flag set by the FailoverQSender\n\t\t\tflag = m.getBooleanProperty(FailoverQSender.COMMIT_PROPERTY_NAME);\n\n//\t\t\tif (flag) {\n//\t\t\t\t// check if message prop... | [
"0.6891236",
"0.6311668",
"0.61877006",
"0.61604494",
"0.5944653",
"0.58962864",
"0.5890517",
"0.5875404",
"0.57732123",
"0.5709339",
"0.56656235",
"0.5659802",
"0.5608195",
"0.56066895",
"0.55799866",
"0.55306387",
"0.5493297",
"0.5481573",
"0.5441771",
"0.5435504",
"0.54161... | 0.5523886 | 16 |
Tests handling of errors in addPropertyDirect(). | @Test
public void testAddPropertyError() throws ConfigurationException {
setUpErrorConfig().addProperty("key1", "value");
checkErrorListener(ConfigurationErrorEvent.WRITE, ConfigurationEvent.ADD_PROPERTY, "key1", "value");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n public void testGetPropertyError() throws ConfigurationException {\n setUpErrorConfig().getProperty(\"key1\");\n checkErrorListener(ConfigurationErrorEvent.READ, ConfigurationErrorEvent.READ, \"key1\", null);\n }",
"@Test(expected = IllegalStateException.class)\n @org.junit.Ignore\... | [
"0.6434318",
"0.63648045",
"0.6293658",
"0.60517645",
"0.6050945",
"0.60493803",
"0.599817",
"0.5986075",
"0.5939933",
"0.5905086",
"0.578079",
"0.5748843",
"0.574292",
"0.5737658",
"0.5725126",
"0.5694992",
"0.5693808",
"0.569166",
"0.5687266",
"0.56809026",
"0.56549096",
... | 0.7054968 | 0 |
Tests adding a property containing the list delimiter. When this property is queried multiple values should be returned. | @Test
public void testAddWithDelimiter() throws ConfigurationException {
final DatabaseConfiguration config = setUpConfig();
config.setListDelimiterHandler(new DefaultListDelimiterHandler(';'));
config.addProperty("keyList", "1;2;3");
final String[] values = config.getStringArray("keyList");
assertArrayEquals(new String[] {"1", "2", "3"}, values);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n public void testGetPropertyAsList() {\n System.out.println(\"getPropertyAsList\");\n Properties props = new Properties();\n String key = \"testProp\";\n props.setProperty(key, \"alpha, beta, gamma\");\n List<String> expResult = Arrays.asList(\"alpha\", \"beta\", \"ga... | [
"0.6894668",
"0.6797777",
"0.67127967",
"0.6576561",
"0.6475411",
"0.6319092",
"0.62304395",
"0.60949373",
"0.5827644",
"0.57510537",
"0.56749046",
"0.54444975",
"0.53612524",
"0.53486294",
"0.5347811",
"0.5327402",
"0.5324043",
"0.5301906",
"0.52937293",
"0.5267914",
"0.5266... | 0.6339437 | 5 |
Tests whether a commit is performed after a clear operation. | @Test
public void testClearCommit() throws ConfigurationException {
helper.setAutoCommit(false);
final Configuration config = helper.setUpConfig();
config.clear();
assertTrue(config.isEmpty());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"boolean shouldCommit();",
"protected boolean attemptCommit() {\n \t\t\tpretendCommit();\n \t\t\tif (isValid()) {\n \t\t\t\tfDocumentUndoManager.commit();\n \t\t\t\treturn true;\n \t\t\t}\n \t\t\treturn false;\n \t\t}",
"@Test\r\n\tpublic void testCommit()\r\n\t\tthrows Exception\r\n\t{\r\n\t\ttry{\r\n\t\t\ttes... | [
"0.71724695",
"0.6401418",
"0.6300548",
"0.6212012",
"0.6118197",
"0.60951626",
"0.6082518",
"0.6077814",
"0.6034961",
"0.5991906",
"0.5931158",
"0.5925207",
"0.59242666",
"0.5918413",
"0.5915508",
"0.5888531",
"0.5845165",
"0.58186835",
"0.58174413",
"0.5782883",
"0.5776576"... | 0.6170273 | 4 |
Tests handling of errors in clear(). | @Test
public void testClearError() throws ConfigurationException {
setUpErrorConfig().clear();
checkErrorListener(ConfigurationErrorEvent.WRITE, ConfigurationEvent.CLEAR, null, null);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void clearError() {\n\n }",
"public boolean clear() throws Exception;",
"@TestOnly\n void clear() throws IOException;",
"public void clear() throws Exception;",
"public void testClear() {\n assertEquals(this.stack.size(), 10, 0.01);\n this.stack.clear();\n ass... | [
"0.7289522",
"0.7236746",
"0.7221367",
"0.71937805",
"0.6769233",
"0.6563542",
"0.65144867",
"0.64977634",
"0.64687234",
"0.64682275",
"0.6465806",
"0.64513403",
"0.6450804",
"0.6435036",
"0.6428211",
"0.6332755",
"0.630566",
"0.6288966",
"0.6251211",
"0.623637",
"0.61652994"... | 0.68910265 | 4 |
Tests whether a commit is performed after a property was cleared. | @Test
public void testClearPropertyCommit() throws ConfigurationException {
helper.setAutoCommit(false);
final Configuration config = helper.setUpConfig();
config.clearProperty("key1");
assertFalse(config.containsKey("key1"));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"boolean shouldCommit();",
"@Override\n\tfinal public boolean hasDoneChanges() {\n\t\treturn false;\n\t}",
"private synchronized boolean shouldCommit(Message m) {\n\n\t\tboolean flag = false;\n\n\t\ttry {\n\t\t\t// get the commit flag set by the FailoverQSender\n\t\t\tflag = m.getBooleanProperty(FailoverQSender... | [
"0.6361448",
"0.63105416",
"0.60800153",
"0.5937306",
"0.5816668",
"0.5710392",
"0.5706931",
"0.5698444",
"0.5670345",
"0.56665593",
"0.5664232",
"0.565753",
"0.5618603",
"0.56067514",
"0.5568932",
"0.5561371",
"0.55293274",
"0.5514403",
"0.54899997",
"0.5422007",
"0.54078543... | 0.6675584 | 0 |
Tests handling of errors in clearProperty(). | @Test
public void testClearPropertyError() throws ConfigurationException {
setUpErrorConfig().clearProperty("key1");
checkErrorListener(ConfigurationErrorEvent.WRITE, ConfigurationEvent.CLEAR_PROPERTY, "key1", null);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void clearProperty(String key);",
"void clearProperty(String key);",
"@Test\n public void testClearError() throws ConfigurationException {\n setUpErrorConfig().clear();\n checkErrorListener(ConfigurationErrorEvent.WRITE, ConfigurationEvent.CLEAR, null, null);\n }",
"@Test\n public void... | [
"0.6339408",
"0.6339408",
"0.62982666",
"0.62373495",
"0.6114926",
"0.60443044",
"0.6008131",
"0.5990557",
"0.5973028",
"0.5945777",
"0.59419936",
"0.58416915",
"0.5834552",
"0.58245313",
"0.58066803",
"0.5792414",
"0.5779445",
"0.5769871",
"0.5734327",
"0.57329285",
"0.57311... | 0.7800742 | 0 |
Tests that another configuration is not affected when clearing properties. | @Test
public void testClearPropertyMultipleOtherConfig() throws ConfigurationException {
final DatabaseConfiguration config = helper.setUpMultiConfig();
final DatabaseConfiguration config2 = helper.setUpMultiConfig(DatabaseConfiguration.class, CONFIG_NAME2);
config2.addProperty("key1", "some test");
config.clearProperty("key1");
assertFalse(config.containsKey("key1"));
assertTrue(config2.containsKey("key1"));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n public void testClearPropertyCommit() throws ConfigurationException {\n helper.setAutoCommit(false);\n final Configuration config = helper.setUpConfig();\n config.clearProperty(\"key1\");\n assertFalse(config.containsKey(\"key1\"));\n }",
"@Test\n public void testClea... | [
"0.73040694",
"0.70260376",
"0.66023755",
"0.65106964",
"0.64549536",
"0.61855274",
"0.59893346",
"0.5953011",
"0.594345",
"0.59093475",
"0.58594537",
"0.583775",
"0.5828974",
"0.5778871",
"0.5773145",
"0.5765329",
"0.5739187",
"0.5732905",
"0.57295114",
"0.5712338",
"0.57117... | 0.8129844 | 0 |
Tests handling of errors in containsKey(). | @Test
public void testContainsKeyError() throws ConfigurationException {
assertFalse(setUpErrorConfig().containsKey("key1"));
checkErrorListener(ConfigurationErrorEvent.READ, ConfigurationErrorEvent.READ, "key1", null);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n public void testCoh3710_keySetContains()\n {\n doExpiryOpTest(new Runnable()\n {\n public void run()\n {\n NamedCache cache = getNamedCache(getCacheName0());\n\n assertFalse(cache.keySet().contains(Integer.valueOf(1)));\n ... | [
"0.6696878",
"0.6610152",
"0.6494556",
"0.6452126",
"0.6391127",
"0.633006",
"0.63068646",
"0.6300849",
"0.62750226",
"0.6268286",
"0.6268068",
"0.6251321",
"0.6202829",
"0.6202829",
"0.6202829",
"0.6202829",
"0.6202829",
"0.6201996",
"0.6190266",
"0.61897284",
"0.6184402",
... | 0.69445145 | 0 |
Tests whether a CLOB as a property value is handled correctly. | @Test
public void testExtractPropertyValueCLOB() throws ConfigurationException, SQLException {
final ResultSet rs = mock(ResultSet.class);
final Clob clob = mock(Clob.class);
final String content = "This is the content of the test CLOB!";
when(rs.getObject(DatabaseConfigurationTestHelper.COL_VALUE)).thenReturn(clob);
when(clob.length()).thenReturn(Long.valueOf(content.length()));
when(clob.getSubString(1, content.length())).thenReturn(content);
final DatabaseConfiguration config = helper.setUpConfig();
assertEquals(content, config.extractPropertyValue(rs));
verify(rs).getObject(DatabaseConfigurationTestHelper.COL_VALUE);
verify(clob).length();
verify(clob).getSubString(1, content.length());
verifyNoMoreInteractions(rs, clob);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic boolean handlesNullVsEmptyLOBs() {\n\t\treturn false;\n\t}",
"@Test\n public void testExtractPropertyValueCLOBEmpty() throws ConfigurationException, SQLException {\n final ResultSet rs = mock(ResultSet.class);\n final Clob clob = mock(Clob.class);\n\n when(rs.getObject... | [
"0.6469143",
"0.631128",
"0.63003665",
"0.6013425",
"0.5933275",
"0.5812365",
"0.579753",
"0.55438983",
"0.55304027",
"0.53797126",
"0.5370832",
"0.5323477",
"0.53127795",
"0.528796",
"0.5233543",
"0.5232842",
"0.51975",
"0.51779884",
"0.51312053",
"0.50681114",
"0.5055121",
... | 0.68008304 | 0 |
Tests whether an empty CLOB is correctly handled by extractPropertyValue(). | @Test
public void testExtractPropertyValueCLOBEmpty() throws ConfigurationException, SQLException {
final ResultSet rs = mock(ResultSet.class);
final Clob clob = mock(Clob.class);
when(rs.getObject(DatabaseConfigurationTestHelper.COL_VALUE)).thenReturn(clob);
when(clob.length()).thenReturn(0L);
final DatabaseConfiguration config = helper.setUpConfig();
assertEquals("", config.extractPropertyValue(rs));
verify(rs).getObject(DatabaseConfigurationTestHelper.COL_VALUE);
verify(clob).length();
verifyNoMoreInteractions(rs, clob);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic boolean handlesNullVsEmptyLOBs() {\n\t\treturn false;\n\t}",
"@Test\n public void testExtractPropertyValueCLOB() throws ConfigurationException, SQLException {\n final ResultSet rs = mock(ResultSet.class);\n final Clob clob = mock(Clob.class);\n final String content = \... | [
"0.765353",
"0.6125166",
"0.6042326",
"0.6026483",
"0.58973587",
"0.5880812",
"0.58725524",
"0.5741343",
"0.5702554",
"0.567939",
"0.5652121",
"0.56218684",
"0.55854964",
"0.5574315",
"0.55610996",
"0.55558604",
"0.554009",
"0.5537524",
"0.5527542",
"0.55235445",
"0.5507536",... | 0.7675687 | 0 |
Tests handling of errors in getKeys(). | @Test
public void testGetKeysError() throws ConfigurationException {
final Iterator<String> it = setUpErrorConfig().getKeys();
checkErrorListener(ConfigurationErrorEvent.READ, ConfigurationErrorEvent.READ, null, null);
assertFalse(it.hasNext());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test(expected = IllegalArgumentException.class)\n public void testGetIllegalKey() {\n String dummy = ev.get(\"_illegal_key\");\n fail(\"Should not get here after getting bs key.\");\n }",
"@Test\n public void testGetKey() {\n DefaultPieDataset d = new DefaultPieDataset();\n ... | [
"0.7240947",
"0.6687144",
"0.66722625",
"0.64726484",
"0.6464092",
"0.64624035",
"0.6445331",
"0.64435095",
"0.6417295",
"0.63613254",
"0.6323713",
"0.6317273",
"0.625044",
"0.6248302",
"0.6222516",
"0.61658674",
"0.6152556",
"0.61066747",
"0.60352206",
"0.6034306",
"0.596561... | 0.75198823 | 0 |
Tests obtaining a property as list whose value contains the list delimiter. Multiple values should be returned. | @Test
public void testGetListWithDelimiter() throws ConfigurationException {
final DatabaseConfiguration config = setUpConfig();
config.setListDelimiterHandler(new DefaultListDelimiterHandler(';'));
final List<Object> values = config.getList("keyMulti");
assertEquals(Arrays.asList("a", "b", "c"), values);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n public void testGetPropertyAsList() {\n System.out.println(\"getPropertyAsList\");\n Properties props = new Properties();\n String key = \"testProp\";\n props.setProperty(key, \"alpha, beta, gamma\");\n List<String> expResult = Arrays.asList(\"alpha\", \"beta\", \"ga... | [
"0.76240623",
"0.6984267",
"0.68435603",
"0.6659397",
"0.6606165",
"0.6504991",
"0.63145983",
"0.6181859",
"0.6165593",
"0.5994434",
"0.5989114",
"0.5988964",
"0.59080565",
"0.58912504",
"0.58210325",
"0.5802846",
"0.5800103",
"0.5786583",
"0.57802314",
"0.577594",
"0.5685093... | 0.6909395 | 2 |
Tests obtaining a property whose value contains the list delimiter when delimiter parsing is disabled. | @Test
public void testGetListWithDelimiterParsingDisabled() throws ConfigurationException {
final DatabaseConfiguration config = setUpConfig();
assertEquals("a;b;c", config.getString("keyMulti"));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n public void testGetListWithDelimiter() throws ConfigurationException {\n final DatabaseConfiguration config = setUpConfig();\n config.setListDelimiterHandler(new DefaultListDelimiterHandler(';'));\n final List<Object> values = config.getList(\"keyMulti\");\n assertEquals(Arra... | [
"0.7033895",
"0.69783145",
"0.6708216",
"0.667264",
"0.6422022",
"0.6347569",
"0.61617535",
"0.6133456",
"0.5961856",
"0.5907989",
"0.58561957",
"0.5807149",
"0.5715494",
"0.56009847",
"0.5562513",
"0.55435896",
"0.54961026",
"0.54615146",
"0.5443541",
"0.543612",
"0.541058",... | 0.7440613 | 0 |
Tests handling of errors in getProperty(). | @Test
public void testGetPropertyError() throws ConfigurationException {
setUpErrorConfig().getProperty("key1");
checkErrorListener(ConfigurationErrorEvent.READ, ConfigurationErrorEvent.READ, "key1", null);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void testGetProperty()\n {\n assertEquals(\"MSM Extension not present, or incorrect specification version -\", MSM_SPECIFICATION_VERSION,\n System.getProperty(MSM_PROPERTY_NAME));\n }",
"private String getRequiredStringProperty(String property) throws MissingRequiredTestPropert... | [
"0.7056362",
"0.6770466",
"0.6660468",
"0.65582424",
"0.6544634",
"0.6543709",
"0.65344685",
"0.65344685",
"0.65344685",
"0.65329164",
"0.6477684",
"0.646352",
"0.6337354",
"0.62997174",
"0.62659055",
"0.62406296",
"0.62205327",
"0.62033135",
"0.62000716",
"0.62000716",
"0.61... | 0.73273045 | 0 |
Tests handling of errors in isEmpty(). | @Test
public void testIsEmptyError() throws ConfigurationException {
assertTrue(setUpErrorConfig().isEmpty());
checkErrorListener(ConfigurationErrorEvent.READ, ConfigurationErrorEvent.READ, null, null);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void testIsEmpty() {\n init();\n assertTrue(\"empty\", FListInteger.isEmpty(l0));\n assertFalse(\"nonempty\", FListInteger.isEmpty(l1));\n }",
"public void testIsEmpty() {\n assertTrue(this.empty.isEmpty());\n assertFalse(this.stack.isEmpty());\n }",
"private vo... | [
"0.71636313",
"0.70736825",
"0.70670724",
"0.68332803",
"0.68332803",
"0.67574316",
"0.6747321",
"0.6718766",
"0.6713354",
"0.6713354",
"0.6713354",
"0.6713354",
"0.6713354",
"0.6713354",
"0.6713354",
"0.6713354",
"0.6713354",
"0.6713354",
"0.6713354",
"0.6713354",
"0.6713354... | 0.0 | -1 |
Tests whether the configuration has already an error listener registered that is used for logging. | @Test
public void testLogErrorListener() throws ConfigurationException {
final DatabaseConfiguration config = helper.setUpConfig();
assertEquals(1, config.getEventListeners(ConfigurationErrorEvent.ANY).size());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n public void testLogErrorListener()\n {\n assertEquals(\"No default error listener registered\", 1,\n new DefaultConfigurationBuilder().getErrorListeners().size());\n }",
"public static boolean isErrorEnabled() {\n\n return errorLogger.isErrorEnabled();\n }",
"pr... | [
"0.64525104",
"0.62469316",
"0.6042414",
"0.597918",
"0.593461",
"0.58137596",
"0.57490796",
"0.57482994",
"0.57482994",
"0.5728502",
"0.56860554",
"0.55866593",
"0.5560454",
"0.5551591",
"0.5551591",
"0.55245304",
"0.5511941",
"0.54940575",
"0.54856914",
"0.54685605",
"0.546... | 0.6880587 | 0 |
Tests setProperty() if the property value contains the list delimiter. | @Test
public void testSetPropertyWithDelimiter() throws ConfigurationException {
final DatabaseConfiguration config = helper.setUpMultiConfig();
config.setListDelimiterHandler(new DefaultListDelimiterHandler(';'));
config.setProperty("keyList", "1;2;3");
final String[] values = config.getStringArray("keyList");
assertArrayEquals(new String[] {"1", "2", "3"}, values);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static boolean isListProperty(String prop) {\n prop = prop.intern();\n for (int i = 0; i < listProperties.length; i++) {\n if (prop == listProperties[i]) {\n return true;\n }\n }\n return false;\n }",
"@Test\n public void testGetPrope... | [
"0.70661837",
"0.6687238",
"0.64254594",
"0.6283442",
"0.62780803",
"0.6019349",
"0.60162294",
"0.59895086",
"0.5771056",
"0.56862515",
"0.5679255",
"0.5644152",
"0.56054616",
"0.55385154",
"0.5477012",
"0.54065263",
"0.5394578",
"0.53915495",
"0.5356741",
"0.53504735",
"0.53... | 0.69253427 | 1 |
Created by hero on 2017/11/23. | public interface HttpConstants {
String BASE_URL = "http://apis.tudou.com/";
String REQUEST_HTTP_URL = "classification/v1/startPage";
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void perish() {\n \n }",
"private stendhal() {\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r... | [
"0.6153202",
"0.60432446",
"0.593701",
"0.58265406",
"0.5820046",
"0.57923913",
"0.57923913",
"0.5711609",
"0.5705594",
"0.5658881",
"0.5633018",
"0.56318945",
"0.5612796",
"0.5603013",
"0.5599181",
"0.55987763",
"0.5575448",
"0.55717194",
"0.55602884",
"0.5542588",
"0.553526... | 0.0 | -1 |
return elem.getElemFunc().integrate(ElemFuncType.F, ElemFuncType.d2Fdx, l, m)elem.getElemFunc().integrate(ElemFuncType.F, ElemFuncType.F, l, m); Weak form | protected double Klm(Element elem, Integer l, Integer m){
return elem.getElemFunc().integrate(ElemFuncType.dFdx, ElemFuncType.dFdx, l, m)+elem.getElemFunc().integrate(ElemFuncType.F, ElemFuncType.F, l, m);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int F()\r\n/* 24: */ {\r\n/* 25: 39 */ return aqt.a(0.5D, 1.0D);\r\n/* 26: */ }",
"public abstract Function derivative();",
"public abstract double integral(double a, double b, int n);",
"protected float j()\r\n/* 67: */ {\r\n/* 68: 80 */ return 1.5F;\r\n/* 69: */ }",... | [
"0.55695844",
"0.5546839",
"0.5482797",
"0.54602563",
"0.5408279",
"0.53867304",
"0.53782225",
"0.5298997",
"0.528639",
"0.5235823",
"0.5228969",
"0.52100736",
"0.5197411",
"0.519511",
"0.5177904",
"0.51687616",
"0.5157996",
"0.5134593",
"0.5121852",
"0.50972676",
"0.5097127"... | 0.5852591 | 0 |
TODO Autogenerated method stub | @Override
public void execute(JobExecutionContext arg0) throws JobExecutionException {
CommonJdbcDao commonDao = (CommonJdbcDao)arg0.getJobDetail().getJobDataMap().get("CommonJdbcDao");
ScriptManager.getScriptManager().loadInnerServers(commonDao);
ScriptManager.getScriptManager().loadAccount(commonDao);
System.out.println("CronTriggerJob = " + System.currentTimeMillis());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.608016... | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public void setColor(String color) {
this.color=color;
System.out.println("我用"+color+"颜色进行填充。");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.608016... | 0.0 | -1 |
TODO: Confirmation of details | @Override
public void actionPerformed(ActionEvent e) {
JOptionPane.showConfirmDialog(OverCounterForm.this, "Check this");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void autoDetails() {\n\t\t\r\n\t}",
"@Override\n\tpublic void getDetail() {\n\t\t\n\t}",
"public abstract String showDetails();",
"java.lang.String getDetails();",
"abstract String getDetails();",
"@Override\n\tpublic Object getDetails() {\n\t\treturn details;\n\t}",
"@Override\n public Objec... | [
"0.7599898",
"0.68883145",
"0.6725919",
"0.6667308",
"0.66649634",
"0.6553317",
"0.6536992",
"0.65195316",
"0.65169394",
"0.6485547",
"0.64547074",
"0.6435128",
"0.63850343",
"0.63668",
"0.6361417",
"0.63368106",
"0.63243073",
"0.63117",
"0.63048226",
"0.62958723",
"0.6289926... | 0.0 | -1 |
TODO: Confirmation of details | @Override
public void actionPerformed(ActionEvent e) {
JOptionPane.showConfirmDialog(OverCounterForm.this, "Check this out");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void autoDetails() {\n\t\t\r\n\t}",
"@Override\n\tpublic void getDetail() {\n\t\t\n\t}",
"public abstract String showDetails();",
"java.lang.String getDetails();",
"abstract String getDetails();",
"@Override\n\tpublic Object getDetails() {\n\t\treturn details;\n\t}",
"@Override\n public Objec... | [
"0.7599898",
"0.68883145",
"0.6725919",
"0.6667308",
"0.66649634",
"0.6553317",
"0.6536992",
"0.65195316",
"0.65169394",
"0.6485547",
"0.64547074",
"0.6435128",
"0.63850343",
"0.63668",
"0.6361417",
"0.63368106",
"0.63243073",
"0.63117",
"0.63048226",
"0.62958723",
"0.6289926... | 0.0 | -1 |
Method generated by IntelliJ IDEA GUI Designer >>> IMPORTANT!! <<< DO NOT edit this method OR call it in your code! | private void $$$setupUI$$$() {
createUIComponents();
overCounterForm = new JPanel();
overCounterForm.setLayout(new com.intellij.uiDesigner.core.GridLayoutManager(16, 2, new Insets(30, 30, 30, 30), -1, -1));
overCounterForm.setMinimumSize(new Dimension(450, 650));
overCounterForm.setPreferredSize(new Dimension(450, 650));
final com.intellij.uiDesigner.core.Spacer spacer1 = new com.intellij.uiDesigner.core.Spacer();
overCounterForm.add(spacer1, new com.intellij.uiDesigner.core.GridConstraints(0, 1, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_CENTER, com.intellij.uiDesigner.core.GridConstraints.FILL_VERTICAL, 1, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));
medicineicon.setHorizontalAlignment(10);
medicineicon.setText("");
overCounterForm.add(medicineicon, new com.intellij.uiDesigner.core.GridConstraints(1, 0, 1, 2, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_CENTER, com.intellij.uiDesigner.core.GridConstraints.FILL_NONE, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
final com.intellij.uiDesigner.core.Spacer spacer2 = new com.intellij.uiDesigner.core.Spacer();
overCounterForm.add(spacer2, new com.intellij.uiDesigner.core.GridConstraints(2, 1, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_CENTER, com.intellij.uiDesigner.core.GridConstraints.FILL_VERTICAL, 1, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));
final com.intellij.uiDesigner.core.Spacer spacer3 = new com.intellij.uiDesigner.core.Spacer();
overCounterForm.add(spacer3, new com.intellij.uiDesigner.core.GridConstraints(12, 1, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_CENTER, com.intellij.uiDesigner.core.GridConstraints.FILL_VERTICAL, 1, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));
final JLabel label1 = new JLabel();
label1.setHorizontalAlignment(10);
label1.setText("Check Over-The-Counter Medication");
overCounterForm.add(label1, new com.intellij.uiDesigner.core.GridConstraints(3, 0, 1, 2, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_CENTER, com.intellij.uiDesigner.core.GridConstraints.FILL_NONE, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
final com.intellij.uiDesigner.core.Spacer spacer4 = new com.intellij.uiDesigner.core.Spacer();
overCounterForm.add(spacer4, new com.intellij.uiDesigner.core.GridConstraints(14, 1, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_CENTER, com.intellij.uiDesigner.core.GridConstraints.FILL_VERTICAL, 1, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));
prescriptionNameTextField = new JTextField();
prescriptionNameTextField.setHorizontalAlignment(0);
prescriptionNameTextField.setMargin(new Insets(5, 5, 5, 5));
prescriptionNameTextField.setText("Prescription Name");
overCounterForm.add(prescriptionNameTextField, new com.intellij.uiDesigner.core.GridConstraints(7, 1, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_WEST, com.intellij.uiDesigner.core.GridConstraints.FILL_HORIZONTAL, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_WANT_GROW, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
enterMedicationDetailsManuallyButton = new JButton();
enterMedicationDetailsManuallyButton.setMargin(new Insets(5, 14, 5, 14));
enterMedicationDetailsManuallyButton.setText("Enter Medication Details Manually");
enterMedicationDetailsManuallyButton.setToolTipText("Brings up a form where you can fill up the details for the over-the-counter medication manually.");
overCounterForm.add(enterMedicationDetailsManuallyButton, new com.intellij.uiDesigner.core.GridConstraints(13, 0, 1, 2, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_CENTER, com.intellij.uiDesigner.core.GridConstraints.FILL_HORIZONTAL, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_SHRINK | com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_GROW, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
final com.intellij.uiDesigner.core.Spacer spacer5 = new com.intellij.uiDesigner.core.Spacer();
overCounterForm.add(spacer5, new com.intellij.uiDesigner.core.GridConstraints(6, 1, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_CENTER, com.intellij.uiDesigner.core.GridConstraints.FILL_VERTICAL, 1, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));
final com.intellij.uiDesigner.core.Spacer spacer6 = new com.intellij.uiDesigner.core.Spacer();
overCounterForm.add(spacer6, new com.intellij.uiDesigner.core.GridConstraints(4, 1, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_CENTER, com.intellij.uiDesigner.core.GridConstraints.FILL_VERTICAL, 1, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));
final JLabel label2 = new JLabel();
label2.setEnabled(false);
label2.setHorizontalAlignment(0);
label2.setHorizontalTextPosition(0);
label2.setText("Please provide the following information:");
overCounterForm.add(label2, new com.intellij.uiDesigner.core.GridConstraints(5, 0, 1, 2, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_CENTER, com.intellij.uiDesigner.core.GridConstraints.FILL_NONE, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
final JLabel label3 = new JLabel();
label3.setText("Name of prescription");
overCounterForm.add(label3, new com.intellij.uiDesigner.core.GridConstraints(7, 0, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_WEST, com.intellij.uiDesigner.core.GridConstraints.FILL_NONE, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
final JLabel label4 = new JLabel();
label4.setText("Barcode value");
overCounterForm.add(label4, new com.intellij.uiDesigner.core.GridConstraints(8, 0, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_WEST, com.intellij.uiDesigner.core.GridConstraints.FILL_NONE, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
a13DigitsFormattedTextField = new JFormattedTextField();
a13DigitsFormattedTextField.setHorizontalAlignment(0);
a13DigitsFormattedTextField.setMargin(new Insets(5, 5, 5, 5));
a13DigitsFormattedTextField.setText("13 digits");
overCounterForm.add(a13DigitsFormattedTextField, new com.intellij.uiDesigner.core.GridConstraints(8, 1, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_WEST, com.intellij.uiDesigner.core.GridConstraints.FILL_HORIZONTAL, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_WANT_GROW, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
manufacturerNameFormattedTextField = new JFormattedTextField();
manufacturerNameFormattedTextField.setHorizontalAlignment(0);
manufacturerNameFormattedTextField.setMargin(new Insets(5, 5, 5, 5));
manufacturerNameFormattedTextField.setText("Manufacturer Name");
overCounterForm.add(manufacturerNameFormattedTextField, new com.intellij.uiDesigner.core.GridConstraints(9, 1, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_WEST, com.intellij.uiDesigner.core.GridConstraints.FILL_HORIZONTAL, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_WANT_GROW, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
formattedTextField3 = new JFormattedTextField();
formattedTextField3.setMargin(new Insets(5, 5, 5, 5));
overCounterForm.add(formattedTextField3, new com.intellij.uiDesigner.core.GridConstraints(10, 1, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_WEST, com.intellij.uiDesigner.core.GridConstraints.FILL_HORIZONTAL, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_WANT_GROW, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
numberOfTabletsInFormattedTextField = new JFormattedTextField();
numberOfTabletsInFormattedTextField.setHorizontalAlignment(0);
numberOfTabletsInFormattedTextField.setMargin(new Insets(5, 5, 5, 5));
numberOfTabletsInFormattedTextField.setText("Number of tablets in packet");
overCounterForm.add(numberOfTabletsInFormattedTextField, new com.intellij.uiDesigner.core.GridConstraints(11, 1, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_WEST, com.intellij.uiDesigner.core.GridConstraints.FILL_HORIZONTAL, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_WANT_GROW, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
final JLabel label5 = new JLabel();
label5.setText("Name of manufacturer");
overCounterForm.add(label5, new com.intellij.uiDesigner.core.GridConstraints(9, 0, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_WEST, com.intellij.uiDesigner.core.GridConstraints.FILL_NONE, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
final JLabel label6 = new JLabel();
label6.setText("Prescription strength");
overCounterForm.add(label6, new com.intellij.uiDesigner.core.GridConstraints(10, 0, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_WEST, com.intellij.uiDesigner.core.GridConstraints.FILL_NONE, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
final JLabel label7 = new JLabel();
label7.setText("Tablets in packet");
overCounterForm.add(label7, new com.intellij.uiDesigner.core.GridConstraints(11, 0, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_WEST, com.intellij.uiDesigner.core.GridConstraints.FILL_NONE, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
cancelButton = new JButton();
cancelButton.setMargin(new Insets(5, 14, 5, 14));
cancelButton.setText("Cancel");
overCounterForm.add(cancelButton, new com.intellij.uiDesigner.core.GridConstraints(15, 0, 1, 2, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_CENTER, com.intellij.uiDesigner.core.GridConstraints.FILL_HORIZONTAL, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_SHRINK | com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_GROW, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tprotected void UpdateUI() {\n\t\t\n\t}",
"@Override\n\tprotected void UpdateUI() {\n\t\t\n\t}",
"@Override\n\tpublic void guiTinNhan() {\n\n\t}",
"@Override\n\tprotected void setValueOnUi() {\n\n\t}",
"@Override\n public void initGUI() {\n\n }",
"private void $$$setupUI$$$() {\n ST = ... | [
"0.6945452",
"0.6945452",
"0.6776231",
"0.6601092",
"0.65425783",
"0.6493928",
"0.64546704",
"0.6454461",
"0.6437399",
"0.6408297",
"0.63614184",
"0.63257545",
"0.62919855",
"0.628411",
"0.62810224",
"0.62511367",
"0.62081164",
"0.6168259",
"0.6136767",
"0.6136767",
"0.613676... | 0.61444783 | 18 |
TODO Autogenerated method stub | public static void main(String[] args) {
int[] a={9,7,6,4,5,6,2,4,1,5,6,9,7,8};
System.out.println("排序前的数组如下:"+Arrays.toString(a));
int temp;
for(int i=1;i<a.length;i++){
temp=a[i];
int j=i-1;
while(j>=0&&a[j]>temp){
a[j+1]=a[j];
--j;
}
a[j+1]=temp;
}
System.out.println("排序后的数组如下"+Arrays.toString(a));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.608016... | 0.0 | -1 |
Creates new form ZobrazUdalost | public ZobrazUdalost() {
initComponents();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public creacionempresa() {\n initComponents();\n mostrardatos();\n }",
"public String nuevo() {\n\n\t\tLOG.info(\"Submitado formulario, accion nuevo\");\n\t\tString view = \"/alumno/form\";\n\n\t\t// las validaciones son correctas, por lo cual los datos del formulario estan en\n\t\t// el atribut... | [
"0.6663084",
"0.65561754",
"0.6473439",
"0.6414488",
"0.63770294",
"0.6306076",
"0.6283022",
"0.62019914",
"0.6148371",
"0.61248994",
"0.6119344",
"0.61191714",
"0.61100906",
"0.6108907",
"0.6097925",
"0.6085656",
"0.60360956",
"0.603485",
"0.60242325",
"0.6020867",
"0.601158... | 0.62877077 | 6 |
This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always regenerated by the Form Editor. | @SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
jPanel1 = new javax.swing.JPanel();
jPanel2 = new javax.swing.JPanel();
jButton3 = new javax.swing.JButton();
jButton2 = new javax.swing.JButton();
jButton1 = new javax.swing.JButton();
jPanel3 = new javax.swing.JPanel();
jLabel3 = new javax.swing.JLabel();
jPanel4 = new javax.swing.JPanel();
jLabel1 = new javax.swing.JLabel();
jLabel2 = new javax.swing.JLabel();
jLabel4 = new javax.swing.JLabel();
jLabel5 = new javax.swing.JLabel();
jLabel6 = new javax.swing.JLabel();
jLabel7 = new javax.swing.JLabel();
setLayout(new java.awt.BorderLayout());
jPanel1.setLayout(new java.awt.BorderLayout());
jPanel2.setLayout(new javax.swing.BoxLayout(jPanel2, javax.swing.BoxLayout.LINE_AXIS));
jButton3.setText("Uprav");
jPanel2.add(jButton3);
jButton2.setText("Prihlasit/Odhlasit");
jPanel2.add(jButton2);
jButton1.setText("Zrusit");
jPanel2.add(jButton1);
jPanel1.add(jPanel2, java.awt.BorderLayout.EAST);
add(jPanel1, java.awt.BorderLayout.PAGE_END);
jPanel3.setLayout(new java.awt.GridLayout(0, 1));
jLabel3.setText("Nazov");
jPanel3.add(jLabel3);
jPanel4.setLayout(new java.awt.GridLayout(1, 2));
jLabel1.setText("Od: Cas");
jPanel4.add(jLabel1);
jLabel2.setText("Do: Cas");
jPanel4.add(jLabel2);
jPanel3.add(jPanel4);
jLabel4.setText("Kapacita:");
jPanel3.add(jLabel4);
jLabel5.setText("Cena:");
jPanel3.add(jLabel5);
jLabel6.setText("Popis");
jPanel3.add(jLabel6);
jLabel7.setText("Povinny:");
jPanel3.add(jLabel7);
add(jPanel3, java.awt.BorderLayout.CENTER);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Form() {\n initComponents();\n }",
"public MainForm() {\n initComponents();\n }",
"public MainForm() {\n initComponents();\n }",
"public MainForm() {\n initComponents();\n }",
"public frmRectangulo() {\n initComponents();\n }",
"public form() {\n ... | [
"0.73191476",
"0.72906625",
"0.72906625",
"0.72906625",
"0.72860986",
"0.7248112",
"0.7213479",
"0.72078276",
"0.7195841",
"0.71899796",
"0.71840525",
"0.7158498",
"0.71477973",
"0.7092748",
"0.70800966",
"0.70558053",
"0.69871384",
"0.69773406",
"0.69548076",
"0.69533914",
"... | 0.0 | -1 |
Scanner scan_hsb=new Scanner(System.in); String ko = scan_hsb.next(); System.out.println("Enter String"); | void scanner_hsb(String ko){
System.out.println(ko);
// scan_hsb.close();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void getString()\n\t{\n\t\t\n\t\tScanner s=new Scanner(System.in);\n\t\t\n\t\t//Here Scanner is the class name, a is the name of object, \n\t\t//new keyword is used to allocate the memory and System.in is the input stream. \n\t\t\n\t\tSystem.out.println(\"Entered a string \");\n\t\tString inputString... | [
"0.793408",
"0.7637405",
"0.7622358",
"0.7575835",
"0.75393385",
"0.74786097",
"0.7426475",
"0.73582923",
"0.7298885",
"0.727372",
"0.72692513",
"0.7115754",
"0.7084239",
"0.7076847",
"0.70568407",
"0.7039112",
"0.6997437",
"0.6968627",
"0.6962905",
"0.69485146",
"0.69310606"... | 0.70976156 | 12 |
constructors Construct a Unit, its UnitType, and its exponent | Unit(Apfloat unitIn, UnitType utIn, int expIn) {
unitValue = unitIn;
unitType = utIn;
exponent = expIn;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Unit(String unitIn, UnitType utIn, int expIn) {\n\t\tthis(new Apfloat(unitIn, APFLOATPRECISION), utIn, expIn);\n\t}",
"Unit() {\n\t\tthis(new Apfloat(\"0.0\", APFLOATPRECISION), SCALAR, 1);\n\t}",
"Unit(Apfloat unitIn, UnitType utIn) {\n\t\tthis(unitIn, utIn, 1);\n\t}",
"public UnitP\n (\n UnitP un... | [
"0.6865281",
"0.68328524",
"0.66032916",
"0.6500166",
"0.64789164",
"0.6440444",
"0.6370046",
"0.63176256",
"0.63169676",
"0.6283083",
"0.62728304",
"0.62117064",
"0.61786646",
"0.61204517",
"0.6070494",
"0.6064916",
"0.60550433",
"0.60505396",
"0.6035583",
"0.60319674",
"0.6... | 0.682718 | 2 |
Construct a unit except that the exponent is set as 1 | Unit(Apfloat unitIn, UnitType utIn) {
this(unitIn, utIn, 1);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Unit() {\n\t\tthis(new Apfloat(\"0.0\", APFLOATPRECISION), SCALAR, 1);\n\t}",
"public abstract double toBasicUnit(double unit);",
"Unit(String unitIn, UnitType utIn, int expIn) {\n\t\tthis(new Apfloat(unitIn, APFLOATPRECISION), utIn, expIn);\n\t}",
"public abstract Quantity<Q> create(Number value, Unit<Q> un... | [
"0.6479448",
"0.60498494",
"0.581749",
"0.57888067",
"0.56831485",
"0.566306",
"0.5631938",
"0.5551148",
"0.5478209",
"0.5453422",
"0.5450966",
"0.53611004",
"0.5315059",
"0.52747226",
"0.52674425",
"0.5262269",
"0.5249129",
"0.5247641",
"0.5228922",
"0.52082205",
"0.5190297"... | 0.5512739 | 8 |
Construct a Unit, its UnitType, and its exponent | Unit(String unitIn, UnitType utIn, int expIn) {
this(new Apfloat(unitIn, APFLOATPRECISION), utIn, expIn);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Unit(Apfloat unitIn, UnitType utIn, int expIn) {\n\t\tunitValue = unitIn;\n\t\tunitType = utIn;\n\t\texponent = expIn;\n\t}",
"public abstract Quantity<Q> create(Number value, Unit<Q> unit);",
"Unit() {\n\t\tthis(new Apfloat(\"0.0\", APFLOATPRECISION), SCALAR, 1);\n\t}",
"Unit(Apfloat unitIn, UnitType utIn) ... | [
"0.67339116",
"0.63187575",
"0.6239383",
"0.6205636",
"0.6123762",
"0.6122084",
"0.6117053",
"0.60872597",
"0.60788816",
"0.6063293",
"0.6023487",
"0.59349644",
"0.5898546",
"0.5847372",
"0.58425534",
"0.58315146",
"0.5829795",
"0.5720601",
"0.5668494",
"0.56211406",
"0.55998... | 0.66840935 | 1 |
Construct a unit except that the exponent is set as 1 | Unit(String unitIn, UnitType utIn) {
this(new Apfloat(unitIn, APFLOATPRECISION), utIn, 1);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Unit() {\n\t\tthis(new Apfloat(\"0.0\", APFLOATPRECISION), SCALAR, 1);\n\t}",
"public abstract double toBasicUnit(double unit);",
"Unit(String unitIn, UnitType utIn, int expIn) {\n\t\tthis(new Apfloat(unitIn, APFLOATPRECISION), utIn, expIn);\n\t}",
"public abstract Quantity<Q> create(Number value, Unit<Q> un... | [
"0.6480523",
"0.60505617",
"0.58185923",
"0.5789564",
"0.56839454",
"0.5663755",
"0.5633317",
"0.5514659",
"0.5478893",
"0.5455002",
"0.5450864",
"0.536114",
"0.5315456",
"0.5275728",
"0.5268114",
"0.52613264",
"0.524957",
"0.52472",
"0.52300996",
"0.52080613",
"0.51889724",
... | 0.55530584 | 7 |
Construct a unit with a value of zero and unit type of Scalar that is, a default value | Unit() {
this(new Apfloat("0.0", APFLOATPRECISION), SCALAR, 1);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public NullUnit() {\n super(1, 0, new InvalidLocation(), 0);\n }",
"public static Unit getDefaultUnit() {\r\n return (Unit)getDefaultUnit(AngularMeasurement.class);\r\n }",
"public Object getDefaultValue();",
"public Object getDefaultValue();",
"T getDefaultValue();",
"public String getDefa... | [
"0.6306742",
"0.62166274",
"0.6024049",
"0.6024049",
"0.59344715",
"0.5898656",
"0.58964425",
"0.5872379",
"0.58128524",
"0.58048326",
"0.5746639",
"0.5687714",
"0.56400675",
"0.5632258",
"0.5606113",
"0.55951476",
"0.55660075",
"0.5559266",
"0.5525518",
"0.55046016",
"0.5504... | 0.7154562 | 0 |
Gets the UnitType of the Unit | public UnitType getUnitType() {
return unitType;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public UnitTypes GetCurrentUnitType()\n {\n return MethodsCommon.GetTypeFromUnit(Unit);\n }",
"public gov.weather.graphical.xml.dwmlgen.schema.dwml_xsd.UnitType.Enum getUnit()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apac... | [
"0.8133051",
"0.7948433",
"0.77553505",
"0.7211622",
"0.70716155",
"0.7062968",
"0.70148414",
"0.6992227",
"0.69912076",
"0.6929132",
"0.69094527",
"0.678381",
"0.6767663",
"0.6715157",
"0.66797906",
"0.665636",
"0.66458565",
"0.66458565",
"0.66458565",
"0.6598101",
"0.658997... | 0.81625384 | 0 |
private X x = new X("xxxH"); | public H(String a, String b, String c, String d, String e, String f, String g, String h, X x) {
super(a, b, c, d, e, f, g, x);
this.h = h;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public XObject(){\n }",
"public XObject(){\r\n }",
"public A(int x)\n {\n xValue = x;\n }",
"public SuperClass(int x)\r\n {\r\n _x = x;\r\n }",
"private SingletonClass() {\n x = 10;\n }",
"private Ex() {\n }",
"private R() {\n\n }",
"private E() {}",
"pub... | [
"0.720649",
"0.7170864",
"0.673659",
"0.6701604",
"0.6584974",
"0.60969585",
"0.5992893",
"0.59448254",
"0.5897944",
"0.5862486",
"0.5861979",
"0.5750117",
"0.573098",
"0.5729011",
"0.570057",
"0.5680997",
"0.56807196",
"0.5667893",
"0.5654872",
"0.5646505",
"0.5644123",
"0... | 0.59643215 | 7 |
once the user logged in | @RequestMapping(Mappings.INDEX)
public ModelAndView index(){
ModelAndView mv = new ModelAndView(ViewNames.INDEX);
return mv;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void loggedInUser() {\n\t\t\n\t}",
"public void login() {\n\t\tloggedIn = true;\n\t}",
"private void masuk(){\n Preferences.setLoggedInUser(getBaseContext(),Preferences.getRegisteredUser(getBaseContext()));\n Preferences.setLoggedInStatus(getBaseContext(), true);\n startActivity(ne... | [
"0.79283714",
"0.7446181",
"0.71110004",
"0.71031237",
"0.70633394",
"0.68275803",
"0.6808764",
"0.6804934",
"0.67526805",
"0.67340434",
"0.67071706",
"0.6695672",
"0.6683689",
"0.66697514",
"0.66671705",
"0.66497123",
"0.6647357",
"0.6641553",
"0.6623902",
"0.6542875",
"0.65... | 0.0 | -1 |
once user logout out | @RequestMapping(Mappings.LOGOUT)
public String logout(){
return "redirect:/login";
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void logout() {\n \n }",
"public void Logout() {\n \t\t\t\n \t\t}",
"@Override\r\n\tpublic void logout() {\n\t\t\r\n\t}",
"void logoutDone();",
"private void doLogout() {\r\n\t\tdoctor.setOnline(0);\r\n\t\t// Set doctor as logged out\r\n\t\tdbAdapter.updateDoctor(doctor);\r\n\t\t// Release... | [
"0.8099993",
"0.8038928",
"0.8037546",
"0.80015045",
"0.79432654",
"0.7874783",
"0.7874783",
"0.78655213",
"0.78521574",
"0.78169817",
"0.7786999",
"0.77260983",
"0.77256",
"0.7723842",
"0.7691622",
"0.7678988",
"0.76629406",
"0.7652548",
"0.7645026",
"0.7633451",
"0.7615013"... | 0.0 | -1 |
============== ADD PRODUCTS =============== | @GetMapping(Mappings.ADD_PRODUCT)
public ModelAndView add_product(){
Product product = new Product();
ModelAndView mv = new ModelAndView(ViewNames.ADD_PRODUCT);
mv.addObject("product", product);
return mv;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void addProduct()\n {\n System.out.println(\"|➕| Add new Product:\\n\");\n System.out.println(\"|➕| Enter ID\\n\");\n int id = Integer.parseInt(reader.getInput());\n System.out.println(\"|➕| Enter Name\\n\");\n String name = reader.getInput();\n manager.addProdu... | [
"0.8049334",
"0.8025874",
"0.80149466",
"0.7933256",
"0.7867566",
"0.78590894",
"0.77730346",
"0.773096",
"0.76271194",
"0.74916714",
"0.74451864",
"0.73692924",
"0.7363577",
"0.73538846",
"0.73215395",
"0.7299841",
"0.72947127",
"0.72772574",
"0.7239898",
"0.7239494",
"0.721... | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public OAuth2AccessToken enhance(OAuth2AccessToken accessToken, OAuth2Authentication authentication) {
isc.intake2.online_test.entities.User user = userService.findByName(((User) authentication.getPrincipal()).getUsername());
final Map<String, Object> additionalInfo = new HashMap<String, Object>();
additionalInfo.put("userId",user.getId());
additionalInfo.put("fullName", user.getUserFirstName() + " " + user.getUserLastName());
additionalInfo.put("userRole", user.getUserType().getUserTypeName());
((DefaultOAuth2AccessToken) accessToken).setAdditionalInformation(additionalInfo);
return accessToken;
} | {
"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 |
/ renamed from: a | public final void mo41681a(C15824kr krVar) throws RemoteException {
if (krVar.f44552d != null) {
krVar.f44552d.mo41468a(this.f44538a);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public interface C4521a {\n /* renamed from: a */\n void mo12348a();\n }",
"public interface C1423a {\n /* renamed from: a */\n void mo6888a(int i);\n }",
"interface bxc {\n /* renamed from: a */\n void mo2508a(bxb bxb);\n}",
"interface C33292a {\n /* renamed fr... | [
"0.62497115",
"0.6242887",
"0.61394435",
"0.61176854",
"0.6114027",
"0.60893",
"0.6046901",
"0.6024682",
"0.60201293",
"0.5975212",
"0.59482527",
"0.59121317",
"0.5883635",
"0.587841",
"0.58703005",
"0.5868436",
"0.5864884",
"0.5857492",
"0.58306104",
"0.5827752",
"0.58272064... | 0.0 | -1 |
TODO: how to handle when given is empty | @Test
void shouldNotReturnFailureWhenActualDoesNotContainGivenEntries() {
Target t = new Target(new HashMap<String, String>() {{
put("hello", "world");
put("foo", "bar");
}});
DefaultValidator<Target> validator = new DefaultValidator<>(Target.class);
validator.ruleForMap(Target::getMap).doesNotContain(array(entry("name", "sean")));
ValidationResult validationResult = validator.validate(t);
assertTrue(validationResult.isValid());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n public void testWithEmptyString() throws org.nfunk.jep.ParseException\n {\n Stack<Object> parameters = CollectionsUtils.newParametersStack(\"\");\n function.run(parameters);\n assertEquals(TRUE, parameters.pop());\n }",
"private void checkForEmptyLine() throws OutmatchingPar... | [
"0.63711953",
"0.61976564",
"0.6011647",
"0.6009147",
"0.5960147",
"0.5953561",
"0.5870515",
"0.58324444",
"0.58139193",
"0.57187986",
"0.57159275",
"0.57077754",
"0.56549275",
"0.55715066",
"0.55475336",
"0.5539996",
"0.5495584",
"0.54823446",
"0.54461807",
"0.54458183",
"0.... | 0.0 | -1 |
TODO: not sure this is appropriate | @SuppressWarnings("unchecked")
@Test
void shouldThrowExceptionWhenGivenEntriesIsEmpty() {
DefaultValidator<Target> validator = new DefaultValidator<>(Target.class);
assertThrows(IllegalArgumentException.class, () -> validator.ruleForMap(Target::getMap).doesNotContain(new MapEntry[0]));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"public void method_4270() {}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n\tpublic void grabar() {... | [
"0.5791955",
"0.5636724",
"0.55144966",
"0.55123043",
"0.5491161",
"0.5481341",
"0.5472228",
"0.54436463",
"0.54293406",
"0.53658736",
"0.5339569",
"0.5329671",
"0.5324428",
"0.5308426",
"0.5299904",
"0.52606624",
"0.52559483",
"0.52267027",
"0.52126396",
"0.5182188",
"0.5168... | 0.0 | -1 |
TODO: use this or remove | private static Stream<Arguments> shouldReturnFailureWhenActualContainsAtLeastOneGivenValueSource() {
return Stream.of(
Arguments.of((Object) MoreArrays.array(Maps.entry("hello", "world"))),
Arguments.of((Object) MoreArrays.array(Maps.entry("name", "sean"), Maps.entry("foo", "bar")))
);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void perish() {\n \n }",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Over... | [
"0.59241426",
"0.58406943",
"0.5799903",
"0.5777382",
"0.57582146",
"0.57441914",
"0.57346094",
"0.57205826",
"0.56404024",
"0.55740416",
"0.5513783",
"0.54924506",
"0.54811805",
"0.54811805",
"0.54712737",
"0.54554003",
"0.5450764",
"0.5432042",
"0.5432042",
"0.54319906",
"0... | 0.0 | -1 |
/ Runtime: 1 ms, faster than 100.00% of Java online submissions for Power of Four. Memory Usage: 33.2 MB, less than 6.67% of Java online submissions for Power of Four. | public boolean isPowerOfFour(int num) {
if(num <= 0) return false;
while(num != 1)
{
if(num % 4 !=0) return false;
num /= 4;
}
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void main(String[] args) {\n\t\tArrayList<Integer> primelist = sieve(7071);\n\t\tArrayList<Double> second = new ArrayList<Double>();\n\t\tfor(int one : primelist) \n\t\t\tsecond.add(Math.pow(one, 2));\n\t\tArrayList<Double> third = new ArrayList<Double>();\n\t\tprimelist = sieve(368);\n\t\tfor(int on... | [
"0.61368704",
"0.60292864",
"0.5978572",
"0.59652776",
"0.59604037",
"0.5947159",
"0.58931583",
"0.58789444",
"0.5853271",
"0.5840653",
"0.58204854",
"0.5818976",
"0.58153737",
"0.57885325",
"0.5774306",
"0.57647365",
"0.5756481",
"0.57494724",
"0.57352173",
"0.5708644",
"0.5... | 0.0 | -1 |
solves system of nonlinear equations | public static double [][] iteration (double X01, double X02){
double [][] x=new double[10][2];
for (int i=0; i<x.length; i++){
x[i][0]= (A[0][0]*X01 + A[0][1]*X02)+B[0];
X01=x[i][0];
x[i][1]= (A[1][0]*X01 + A[1][1]*X02)+B[1];
X02=x[i][1];
}
return x;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n public void test15() throws Throwable {\n IllinoisSolver illinoisSolver0 = new IllinoisSolver();\n Tanh tanh0 = new Tanh();\n AllowedSolution allowedSolution0 = AllowedSolution.LEFT_SIDE;\n double double0 = illinoisSolver0.solve(22, (UnivariateRealFunction) tanh0, (-0.5), (double) 22... | [
"0.6291821",
"0.6204254",
"0.61943144",
"0.6158727",
"0.60347396",
"0.6010942",
"0.59580135",
"0.59397876",
"0.592386",
"0.5904346",
"0.58901274",
"0.58736855",
"0.5872556",
"0.58709455",
"0.58417344",
"0.582979",
"0.58281106",
"0.58271533",
"0.57841045",
"0.5755592",
"0.5752... | 0.0 | -1 |
calculate Logarithm of the max norm of a A | public static double [] logarithm (double [][]x){
double [] log=new double [x.length-1];
for(int i=0; i<x.length-1;i++){
double[] xk1=x[i+1];
double[] xk=x[i];
log[i]=Math.log10(Math.max( Math.abs(xk1[0] - xk[0]), Math.abs(xk1[1] - xk[1]) ));
}
return log;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static double log(double a){ \n // migrated from jWMMG - the origin of the algorithm is not known.\n if (Double.isNaN(a) || a < 0) {\n return Double.NaN;\n } else if (a == Double.POSITIVE_INFINITY) {\n return Double.POSITIVE_INFINITY;\n } else... | [
"0.6744831",
"0.6000833",
"0.59893006",
"0.59658045",
"0.59643906",
"0.59132344",
"0.5851904",
"0.5783178",
"0.5773512",
"0.5771717",
"0.57579565",
"0.5685206",
"0.56455153",
"0.56050277",
"0.5591484",
"0.5581837",
"0.55750835",
"0.55261666",
"0.5522809",
"0.55208373",
"0.551... | 0.5848683 | 7 |
Lectura del fitxer de text. | public Vector<String> LecturaFitxer()
{
Vector<String> filas= new Vector<String>();
if (this.ftxt.GetFile().exists())
{
try
{
BufferedReader br=this.ftxt.ObrirFitxerLectura();
while (br.ready())
{
filas.add(br.readLine());
}
this.ftxt.TancarFitxerDeLectura(br);
}
catch (IOException e)
{
GestorDiscConstants.PS(GestorDiscConstants.ERROR_IO);
}
}
return filas;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static String textInicial(){\n\t\treturn \"******** Joc del SENKU ********\\n\"\n\t\t\t\t+ \"Es tracta d'eliminar totes les fitxes 'X' del taulell menys una.\\n\"\n\t\t\t\t+ \"Per fer-ho qualsevol fitxa pot saltar una altra fitxa i col·locar/-se a una posició buida.\\n\"\n\t\t\t\t+ \"La fitxa saltada s'elim... | [
"0.6438193",
"0.6373671",
"0.6184843",
"0.61228323",
"0.60309577",
"0.59137034",
"0.58483034",
"0.580064",
"0.5798268",
"0.5795023",
"0.5786072",
"0.5770802",
"0.5752071",
"0.57457024",
"0.5743801",
"0.5742821",
"0.5730219",
"0.57085836",
"0.57021695",
"0.56999886",
"0.569148... | 0.5997277 | 5 |
Create a bunch of thing just for kicks | @Test
// TODO: Fix this test
@Disabled
public void getActuatorPrometheusData() throws Exception {
createABunchOfThings(10, true); // OK results
createABunchOfThings(5, false); // Failed results
// Now get Metrics
LOGGER.info(RUNNING_CHAR + "Getting prometheus data /actuator/prometheus GET");
CompletionStage<GetMetricsGrpcResponse> mockMetricsResponse = CompletableFuture.supplyAsync(() ->
GetMetricsGrpcResponse.newBuilder()
.setTotalmessagesreceived(20L)
.setAveragemessageage(1000L)
.setCount(42L)
.build());
Mockito.when(client.getMetrics(any())).thenReturn(mockMetricsResponse);
MvcResult mvcResult = mockMvc.perform(get("/actuator/prometheus").contentType(MediaType.APPLICATION_JSON)
.accept(MediaType.ALL_VALUE))
.andExpect(status().isOk())
.andReturn();
String responseData = mvcResult.getResponse().getContentAsString();
System.out.println(responseData);
assertTrue(responseData.contains("thingverse_active_thing_count"), FAILURE_CHAR + "Response did not contain expected string");
assertTrue(responseData.contains("thingverse_average_message_age"), FAILURE_CHAR + "Response did not contain expected string");
assertTrue(responseData.contains("thingverse_total_messages_received"), FAILURE_CHAR + "Response did not contain expected string");
assertTrue(responseData.contains("thingverse_http_server_request"), FAILURE_CHAR + "Response did not contain expected string");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void create () {\n // TODO random generation of a ~100 x 100 x 100 world\n }",
"public void generete() {\n int minQuantFig = 1,\r\n maxQuantFig = 10,\r\n minNum = 1,\r\n maxNum = 100,\r\n minColor = 0,\r\n maxColor = (... | [
"0.6387044",
"0.5853699",
"0.58350474",
"0.58319986",
"0.5813685",
"0.57404757",
"0.57335687",
"0.569859",
"0.5678837",
"0.56506705",
"0.5638344",
"0.5633303",
"0.5633174",
"0.5632757",
"0.56315583",
"0.5628829",
"0.5613022",
"0.5611885",
"0.56067866",
"0.5588472",
"0.5580168... | 0.0 | -1 |
Got last known location. In some rare situations this can be null. | @Override
public void onSuccess(Location location) {
if (location != null) {
Toast.makeText(PassengerLocationActivity.this,"An Ambulance request had been made ! ",Toast.LENGTH_SHORT).show();
requestAmbulance.put("username", ParseUser.getCurrentUser().getUsername());
ParseGeoPoint userLocation = new ParseGeoPoint(location.getLatitude(),location.getLongitude());
requestAmbulance.put("passengerLocation",userLocation);
requestAmbulance.saveInBackground(new SaveCallback() {
@Override
public void done(ParseException e) {
if (e == null){
Toast.makeText(PassengerLocationActivity.this,"An Ambulance is on the way ! ",Toast.LENGTH_SHORT).show();
}
else
Toast.makeText(PassengerLocationActivity.this,"Error occurred - could not save!",Toast.LENGTH_SHORT).show();
}
});
}
else
Toast.makeText(PassengerLocationActivity.this,"Error occurred!Please try again",Toast.LENGTH_SHORT).show();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private Location getLastKnownLocation(){\n \t \tLocation loc = LocationUtil.getBestLastKnowLocation(ctx);\t\n \t \tStatus.getCurrentStatus().setLocation(loc);\t\n \t \treturn loc;\n \t}",
"public Location getLastLocation() {\n\t\tif (mLocationClient.isConnected()) {\n\t\t\treturn mLocationClient.getLast... | [
"0.82976794",
"0.79686725",
"0.78017765",
"0.7698573",
"0.76815736",
"0.7583506",
"0.7569769",
"0.7552742",
"0.7535778",
"0.7415372",
"0.7393789",
"0.72912264",
"0.72161716",
"0.72039974",
"0.7203695",
"0.72034955",
"0.71807975",
"0.7135884",
"0.7133322",
"0.70981014",
"0.709... | 0.0 | -1 |
The fifth and last state of a poker match is the river. | River(Match match) {
this.match = match;
availableBet = new ArrayList<>();
availableBet.add(Bet.CALL);
availableBet.add(Bet.FOLD);
availableBet.add(Bet.RAISE);
availableBet.add(Bet.CHECK);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"River(Match match) {\r\n this.match = match;\r\n availableBet = new ArrayList<>();\r\n availableBet.add(Bet.CHECK);\r\n availableBet.add(Bet.FOLD);\r\n availableBet.add(Bet.RAISE);\r\n availableBet.add(Bet.ALLIN);\r\n }",
"void matchEnd(boolean winner);",
"private int fourOfaKind() {\n\t\tif... | [
"0.56213576",
"0.5526622",
"0.5316568",
"0.53022146",
"0.52862346",
"0.524452",
"0.5233836",
"0.5216572",
"0.5207587",
"0.51843494",
"0.51803815",
"0.5180254",
"0.5169012",
"0.51632416",
"0.5141661",
"0.51380265",
"0.51274335",
"0.5123758",
"0.5108488",
"0.5102766",
"0.509330... | 0.53721064 | 2 |
from StackOverflow post by Dave Discoid, at | public double getAngle(float x, float y )
{
double dx = x - centerX;
// Minus to correct for coord re-mapping
double dy = -(y - centerY);
double inRads = Math.atan2(dy,dx);
// We need to map to coord system when 0 degree is at 3 O'clock, 270 at 12 O'clock
if (inRads < 0)
inRads = Math.abs(inRads);
else
inRads = 2*Math.PI - inRads;
return Math.toDegrees(inRads);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected boolean func_70814_o() { return true; }",
"public void method_4270() {}",
"@Override\n public void func_104112_b() {\n \n }",
"private void m50366E() {\n }",
"private void kk12() {\n\n\t}",
"public final void mo51373a() {\n }",
"private static void cajas() {\n\t\t\n\t}"... | [
"0.58606344",
"0.581255",
"0.56182253",
"0.5579475",
"0.54326355",
"0.5432073",
"0.5427588",
"0.5404399",
"0.5398087",
"0.5387073",
"0.53832966",
"0.5359471",
"0.5339923",
"0.5328878",
"0.53133005",
"0.5282545",
"0.52800196",
"0.52692753",
"0.524116",
"0.5240441",
"0.52202964... | 0.0 | -1 |
"Call to 'super()' must be first statement in constructor body" fuck you too | protected void lateParse(JsonObject object, Class<T> resultClass) {
JsonArray array = object.getAsJsonArray("result");
for (int i = 0; i < array.size(); i++)
result.add(constructInstanceFromJson(resultClass, array.get(i).getAsJsonObject()));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"_ExtendsNotAbstract() {\n super(\"s\"); // needs this if not default ctor;\n }",
"Constructor() {\r\n\t\t \r\n\t }",
"public Constructor(){\n\t\t\n\t}",
"public b3(){\n super();\n }",
"public aed(World paramaqu)\r\n/* 9: */ {\r\n/* 10: 24 */ super(paramaqu);\r\n/* 11: */... | [
"0.72044",
"0.71490115",
"0.71137613",
"0.70336866",
"0.6995776",
"0.6865167",
"0.6846705",
"0.68327695",
"0.68285483",
"0.6826886",
"0.6798221",
"0.67758954",
"0.6772788",
"0.67594063",
"0.67594063",
"0.67551225",
"0.6739502",
"0.6713254",
"0.67109346",
"0.6707165",
"0.67013... | 0.0 | -1 |
Creates an input dialog with OK and Cancel buttons. Note that the dialog will have no visual representation (no widgets) until it is told to open. Note that the open method blocks for input dialogs. | public ManualResultsDialog(
Shell parentShell,
String dialogTitle,
String dialogMessage,
String initialValue,
String htmlDescription,
IInputValidator validator)
{
super(parentShell);
this.title = dialogTitle;
message = dialogMessage;
if ( initialValue == null ) {
value = "";
} // $NON-NLS-1$
else {
value = initialValue;
}
this.validator = validator;
this.html = htmlDescription;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected void dialog() {\n TextInputDialog textInput = new TextInputDialog(\"\");\n textInput.setTitle(\"Text Input Dialog\");\n textInput.getDialogPane().setContentText(\"Nyt bord nr: \");\n textInput.showAndWait()\n .ifPresent(response -> {\n if (!re... | [
"0.73429585",
"0.6914223",
"0.68628526",
"0.6331222",
"0.62616396",
"0.6207243",
"0.6160939",
"0.6119423",
"0.60992527",
"0.6060061",
"0.599031",
"0.5947301",
"0.59337276",
"0.58856475",
"0.5824524",
"0.58017236",
"0.5795457",
"0.57631385",
"0.57165205",
"0.5693597",
"0.56542... | 0.0 | -1 |
Implemented with InputDialog which is extremely limiting and will need to be extended to handle a proper dialog. | public ManualResultsDialog(
String testCaseName,
String html,
IInputValidator validator)
{
this(TestLinkView.viewer.getControl().getShell(), testCaseName,
"Enter test case results note:", "", html, validator);
this.create();
this.setBlockOnOpen(true);
Button ok = this.getButton(IDialogConstants.OK_ID);
Button cancel = this.getButton(IDialogConstants.CANCEL_ID);
ok.setText("Passed");
cancel.setText("Failed");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected void dialog() {\n TextInputDialog textInput = new TextInputDialog(\"\");\n textInput.setTitle(\"Text Input Dialog\");\n textInput.getDialogPane().setContentText(\"Nyt bord nr: \");\n textInput.showAndWait()\n .ifPresent(response -> {\n if (!re... | [
"0.73294526",
"0.6798291",
"0.66666895",
"0.66463476",
"0.6620942",
"0.6522054",
"0.652013",
"0.65184313",
"0.6513838",
"0.64915943",
"0.64793366",
"0.6458037",
"0.6385886",
"0.63476515",
"0.62826705",
"0.6245342",
"0.6179033",
"0.6138595",
"0.61285466",
"0.61194474",
"0.6104... | 0.0 | -1 |
/ (nonJavadoc) Method declared on Dialog. | protected void buttonPressed(
int buttonId)
{
value = text.getText();
if ( value != null && value.length() > 10 ) {
int ret = FAILED;
if ( buttonId == IDialogConstants.OK_ID ) {
ret = PASSED;
} else if ( buttonId == IDialogConstants.CLOSE_ID ) {
ret = BLOCKED;
}
setReturnCode(ret);
close();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\t\t\t\tpublic void onDialogMenuPressed() {\n\r\n\t\t\t\t}",
"private void initDialog() {\n }",
"@Override\n public void onShow(DialogInterface arg0) {\n\n }",
"@Override\n public void onClick(\n ... | [
"0.7225248",
"0.70481884",
"0.69689316",
"0.69635457",
"0.6957476",
"0.6957476",
"0.6957476",
"0.6957476",
"0.6947849",
"0.6932522",
"0.6929159",
"0.69166726",
"0.69166726",
"0.69166726",
"0.6913246",
"0.69003683",
"0.69003683",
"0.689552",
"0.6882216",
"0.6882216",
"0.688221... | 0.0 | -1 |
/ (nonJavadoc) Method declared on Dialog. | protected Control createDialogArea(
Composite parent)
{
// create composite
Composite composite = (Composite) super.createDialogArea(parent);
// create label
Label categoryLabel = new Label(composite, SWT.WRAP);
categoryLabel.setText("");
GridData cData = new GridData(
GridData.GRAB_HORIZONTAL | GridData.GRAB_VERTICAL
| GridData.HORIZONTAL_ALIGN_FILL | GridData.VERTICAL_ALIGN_CENTER);
cData.widthHint = convertHorizontalDLUsToPixels(
IDialogConstants.MINIMUM_MESSAGE_AREA_WIDTH);
categoryLabel.setLayoutData(cData);
categoryLabel.setFont(parent.getFont());
// create browser
Browser browser = new Browser(composite, SWT.NONE);
GridData grid = new GridData(SWT.FILL, SWT.FILL, true, true, 300, 40);
browser.setLayoutData(grid);
browser.setText(html);
browser.setVisible(true);
// create entry request message
if ( message != null ) {
Label label = new Label(composite, SWT.WRAP);
label.setText(message);
GridData data = new GridData(
GridData.GRAB_HORIZONTAL | GridData.GRAB_VERTICAL
| GridData.HORIZONTAL_ALIGN_FILL | GridData.VERTICAL_ALIGN_CENTER);
data.widthHint = convertHorizontalDLUsToPixels(
IDialogConstants.MINIMUM_MESSAGE_AREA_WIDTH);
label.setLayoutData(data);
label.setFont(parent.getFont());
}
// Data entry text area
text = new Text(composite, SWT.MULTI | SWT.WRAP | SWT.V_SCROLL);
grid = new GridData(SWT.FILL, SWT.FILL, true, true, 80, 8);
text.setLayoutData(grid);
text.addModifyListener(new ModifyListener()
{
public void modifyText(
ModifyEvent e)
{
validateInput();
}
});
// Error message text area
errorMessageText = new Text(composite, SWT.READ_ONLY);
errorMessageText.setLayoutData(
new GridData(GridData.GRAB_HORIZONTAL | GridData.HORIZONTAL_ALIGN_FILL));
errorMessageText.setBackground(errorMessageText.getDisplay()
.getSystemColor(SWT.COLOR_WIDGET_BACKGROUND));
applyDialogFont(composite);
return composite;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\t\t\t\tpublic void onDialogMenuPressed() {\n\r\n\t\t\t\t}",
"private void initDialog() {\n }",
"@Override\n public void onShow(DialogInterface arg0) {\n\n }",
"@Override\n public void onClick(\n ... | [
"0.72242856",
"0.70488286",
"0.6968076",
"0.6962169",
"0.69562554",
"0.69562554",
"0.69562554",
"0.69562554",
"0.69469947",
"0.6931361",
"0.69280183",
"0.6915535",
"0.6915535",
"0.6915535",
"0.6911987",
"0.68991584",
"0.68991584",
"0.68962586",
"0.6881024",
"0.6881024",
"0.68... | 0.0 | -1 |
Returns the ok button. | protected Button getOkButton()
{
return okButton;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public JButton getOkButton(){\n\t\treturn okButton;\n\t}",
"public JButton getOkButton() {\n return okButton;\n }",
"private RButton getOkButton() {\n if (okButton == null) {\n okButton = new RButton();\n okButton.setText(\"<%= ivy.cms.co(\\\"/Buttons/ok\\\") %>\");\n okButton.setNa... | [
"0.8578191",
"0.8520935",
"0.8500211",
"0.81281555",
"0.7993029",
"0.7960164",
"0.7950971",
"0.7911682",
"0.7852278",
"0.7839435",
"0.782218",
"0.77407885",
"0.7641661",
"0.7629279",
"0.76254475",
"0.76236993",
"0.7597355",
"0.7433054",
"0.7433054",
"0.7433054",
"0.7433054",
... | 0.87656265 | 0 |
Returns the text area. | protected Text getText()
{
return text;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getTextoArea() {\n\t\treturn textArea.getText();\n\t}",
"TEXTAREA createTEXTAREA();",
"private JTextArea getJTextArea() {\r\n\t\tif (jTextArea == null) {\r\n\t\t\tjTextArea = new JTextArea();\r\n\t\t\tjTextArea.setBounds(new Rectangle(11, 5, 139, 127));\r\n\t\t\tjTextArea.setText(\"This is the st... | [
"0.81172955",
"0.7968299",
"0.77000844",
"0.75925773",
"0.75506043",
"0.75290453",
"0.74638426",
"0.74221605",
"0.73414564",
"0.7222687",
"0.71432793",
"0.7141908",
"0.7013381",
"0.69787925",
"0.6977651",
"0.69599557",
"0.6959767",
"0.6952817",
"0.6925706",
"0.6844488",
"0.68... | 0.6666305 | 26 |
Returns the string typed into this input dialog. | public String getValue()
{
return value;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getTextInput(){\r\n\t\treturn textInput.getText();\r\n\t}",
"public String getInput() {\r\n return getText();\r\n }",
"public static String getInputText(){\n\t\treturn textArea.getText();\n\t}",
"public String getText(){\n return input.getText().toString();\n }",
"public s... | [
"0.7417593",
"0.73528904",
"0.68548423",
"0.67931044",
"0.6694345",
"0.6671984",
"0.66547805",
"0.66025037",
"0.65569705",
"0.6491495",
"0.6448554",
"0.64353347",
"0.6428749",
"0.640445",
"0.63893646",
"0.6382091",
"0.63534296",
"0.63234764",
"0.6319364",
"0.63130635",
"0.630... | 0.0 | -1 |
Validates the input. The default implementation of this framework method delegates the request to the supplied input validator object; if it finds the input invalid, the error message is displayed in the dialog's message line. This hook method is called whenever the text changes in the input field. | protected void validateInput()
{
String errorMessage = null;
if ( validator != null ) {
errorMessage = validator.isValid(text.getText());
}
// Bug 16256: important not to treat "" (blank error) the same as null
// (no error)
setErrorMessage(errorMessage);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n @Nullable\r\n public Prompt acceptInput(@NotNull ConversationContext context, @Nullable String input) {\r\n if (isInputValid(context, input)) {\r\n return acceptValidatedInput(context, input);\r\n } else {\r\n String failPrompt = getFailedValidationText(conte... | [
"0.62705284",
"0.61491925",
"0.5944592",
"0.5590343",
"0.5527846",
"0.54462147",
"0.5417943",
"0.5412842",
"0.53810936",
"0.537866",
"0.5376913",
"0.53201205",
"0.5243012",
"0.5232137",
"0.522332",
"0.522306",
"0.52145296",
"0.52112836",
"0.5198342",
"0.5198272",
"0.5158927",... | 0.7421604 | 0 |
Sets or clears the error message. If not null, the OK button is disabled. | public void setErrorMessage(
String errorMessage)
{
errorMessageText.setText(errorMessage == null ? "" : errorMessage); // $NON-NLS-1$
okButton.setEnabled(errorMessage == null);
errorMessageText.getParent().update();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void setErrorMessage(String errorMessage);",
"private void setErrorMessage() {\n messageLabel.setText(NbBundle.getMessage(JavaFXPlatformCustomizer.class, \"Customizer_Invalid_Platform_Msg\")); // NOI18N\n }",
"public abstract void setError(String message);",
"@Override\n\tpublic void setEmptyError(... | [
"0.6862864",
"0.68626827",
"0.68240225",
"0.67849284",
"0.67479223",
"0.6574959",
"0.6533408",
"0.6523466",
"0.6376966",
"0.6365598",
"0.6331957",
"0.62740856",
"0.62685335",
"0.6191157",
"0.61743957",
"0.6161105",
"0.61520815",
"0.6122713",
"0.6117976",
"0.6091454",
"0.60714... | 0.7121906 | 0 |
Cell assignment complete,the current cell end | void completeCell(Sheet sheet, Row row, Cell cell, ExcelField excelField, Field field, int index, int colIndex, boolean isHead); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void punishment(){\n\t\tthis.cell = 0;\n\t}",
"EndCell(int x, int y) {\r\n this.x = x;\r\n this.y = y;\r\n this.left = null;\r\n this.top = null;\r\n this.right = null;\r\n this.bottom = null;\r\n }",
"private boolean moveToNextCell() {\r\n positionInArray++;\r\n ... | [
"0.6478005",
"0.62925637",
"0.62327415",
"0.6172974",
"0.6072838",
"0.5938998",
"0.59352165",
"0.59235966",
"0.59183764",
"0.5910899",
"0.58983433",
"0.5864871",
"0.5853335",
"0.5832447",
"0.58145314",
"0.58035725",
"0.579812",
"0.5784433",
"0.5745584",
"0.57083094",
"0.57032... | 0.69624853 | 0 |
Cell are assigned before, then after the data converter and before the auto merge | default Object assignmentBefore(Sheet sheet, Row row, Cell cell, ExcelField excelField, Field field, int index, int colIndex, boolean isHead, Object value) {
return value;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void handle_merged_cells(Sheet sheet) {\n\t \tfor (int i = 0 ; i < sheet.getNumMergedRegions() ; i++) {\n\t \t//don't merge beyond sheet\n\t \t\tCellRangeAddress merged_region = sheet.getMergedRegion(i);\n\t \t\tint c_f = merged_region.getFirstColumn();\n\t \t\tint c_l = merged_region.getLas... | [
"0.6243785",
"0.591629",
"0.5854527",
"0.5774251",
"0.5764296",
"0.57513934",
"0.57338095",
"0.5660781",
"0.5606098",
"0.5583147",
"0.5574861",
"0.5556931",
"0.5525766",
"0.5496729",
"0.5494106",
"0.5493462",
"0.54898953",
"0.54691637",
"0.5453979",
"0.5436688",
"0.542145",
... | 0.5624877 | 8 |
/ variable for allergy yes or no if allergy is yes> we will check if pet allergy if peanut allergy if polen allergy if no allergy you are lucky | public static void main(String[] args) {
boolean allergy=true;
boolean petAllergy=false;
boolean peanatAllergy=true;
boolean pollenAllergy=false;
if (allergy) {
System.out.println("Lets do further check");
if (petAllergy) {
System.out.println("Please no cats or dogs in the house");
} else if (peanatAllergy){
System.out.println("Dont eat peanat butter");
}else if (pollenAllergy) {
System.out.println("Dont clean ");}
}else {
System.out.println("You are lucky");
}
System.out.println("-----------Example 2----------");
/*
* If todays is friday we will watch movie but would like to check the date
* if date is 13--> watching scary movie
* and if its is not--> i will watch comedy, action
*
* if no Friday --> i am studying
*/
boolean Friday=false;
int date=4;
boolean monday=true;
if (Friday) {
if (date==13) {
System.out.println("We will watch a scary movie");
}else {
System.out.println("Watch a comedy");
}
}else {
if(monday) {
System.out.println("I am not studying,Im working");
}else {
System.out.println("I have class at Syntax");
}
}
System.out.println("----------Example 3------");
/*
* check if assignment is completed
* if assignment is complited:
* if score >90--> great job
* if score >80--> good job;
* if score >70--> please study more
*/
boolean assignment=false;
int score=92;
if (assignment) {
if(score>90) {
System.out.println("Great job!");
}else if (score>80) {
System.out.println("Good job");
}else if (score>70) {
System.out.println("Pleaase study more");
}else {
System.out.println("Good job for trying,but must study!");
}
}else {
System.out.println("You should always complete all assignments");
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void answerYesOrNo() {\n List<String> Yes = additionalDB.get(\"Yes\");\n List<String> No = additionalDB.get(\"No\");\n if (random.nextBoolean())\n \tresponsesList.add(new Response(getRandomElementFromList(Yes)));\n else responsesList.add(new Response(getRandomElementFromL... | [
"0.6525937",
"0.615471",
"0.6144895",
"0.6096188",
"0.5996875",
"0.5950685",
"0.5908066",
"0.589326",
"0.5815377",
"0.58151937",
"0.57945585",
"0.57719135",
"0.57657063",
"0.5759378",
"0.57399917",
"0.5739712",
"0.5708782",
"0.5703853",
"0.56909376",
"0.56872964",
"0.5677319"... | 0.66743994 | 0 |
Call back after asynchronous load completes | public interface OnLoadMoreListener {
void onLoadMore();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void onLoaderFinished();",
"public abstract void loaded();",
"public abstract boolean isLoadCompleted();",
"public void onLoadComplete() {\n\t\t\r\n\t}",
"@Override\r\n public void loadAfter(@NonNull LoadParams params, @NonNull LoadCallback callback) {\n }",
"public void onLoadComplete(){\n\t\tif (... | [
"0.71108615",
"0.68610007",
"0.6847017",
"0.68001753",
"0.67538047",
"0.6679333",
"0.6632008",
"0.66047007",
"0.65469724",
"0.65114355",
"0.6504692",
"0.6502966",
"0.64903045",
"0.6477586",
"0.6453909",
"0.6436773",
"0.64325434",
"0.64317954",
"0.6408852",
"0.6373303",
"0.636... | 0.0 | -1 |
private double averageDeliveryTime; private double averagePrice; private double deliveryTimeSum; private double priceSum; private int count; | public Journey(String destination, String origin, Priority priority,
float weightPrice, float volumePrice, ArrayList<Path> usedPaths, DayOfWeek dow) {
this.destination = destination;
this.origin = origin;
this.priority = priority;
this.weightPrice = weightPrice;
this.volumePrice = volumePrice;
this.usedPaths = usedPaths;
this.dow = dow;
this.isActive = true;
this.timesUsed = 0;
this.totalCost = 0;
this.totalPrice = 0;
// this.averageDeliveryTime = averageDeliveryTime;
// this.averagePrice = averagePrice;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public double sum() {\n/* 196 */ return this.mean * this.count;\n/* */ }",
"public double getGrossSales() {\n return grossSales;\n}",
"public double getTotalPayments(){return this.total;}",
"public double getPrice(){return price;}",
"public int totalOrdersTaken();",
"double getTotalProfit();"... | [
"0.6364855",
"0.6271354",
"0.61995786",
"0.6185882",
"0.6178295",
"0.614434",
"0.6135518",
"0.6111864",
"0.61033547",
"0.6080505",
"0.6067916",
"0.6042908",
"0.6012219",
"0.6005039",
"0.59681404",
"0.5961756",
"0.5939697",
"0.5931971",
"0.5921923",
"0.5885661",
"0.5882339",
... | 0.0 | -1 |
PLEASE DO NOT CALL THIS METHOD | public Double getPrice(int weight, int volume){
//System.out.println("getPrice method in Journey called. should have been a delivery.");
double price = weightPrice*weight + volumePrice*volume;
price = Math.round(price * 100);
totalPrice += (price/100);
return price/100;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void perish() {\n \n }",
"private stendhal() {\n\t}",
"@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\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"pu... | [
"0.6966959",
"0.67938447",
"0.6765118",
"0.6611615",
"0.6595424",
"0.6562797",
"0.6547997",
"0.6535932",
"0.6535932",
"0.6458498",
"0.64551437",
"0.64551437",
"0.64537066",
"0.6442744",
"0.64084774",
"0.6407",
"0.63498634",
"0.6325613",
"0.63247883",
"0.6321414",
"0.632014",
... | 0.0 | -1 |
PLEASE DO NOT CALL THIS METHOD | public float getCost(int weight, int volume) {
//System.out.println("getCost method in Journey called. should have been a delivery.");
timesUsed++;
float total = 0;
for(Path p: usedPaths){
try {
total += p.calcCost(weight, volume);
} catch (OverweightException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (ExceededVolumeException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
totalCost += total;
return total;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void perish() {\n \n }",
"private stendhal() {\n\t}",
"@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\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"pu... | [
"0.6966959",
"0.67938447",
"0.6765118",
"0.6611615",
"0.6595424",
"0.6562797",
"0.6547997",
"0.6535932",
"0.6535932",
"0.6458498",
"0.64551437",
"0.64551437",
"0.64537066",
"0.6442744",
"0.64084774",
"0.6407",
"0.63498634",
"0.6325613",
"0.63247883",
"0.6321414",
"0.632014",
... | 0.0 | -1 |
Queries caB2B and returns a mapping of service URLs to Cab2bServices. | public Map<String,Cab2bService> getServices() throws Exception {
Map<String,Cab2bService> services = new HashMap<String,Cab2bService>();
DefaultHttpClient httpclient = new DefaultHttpClient();
try {
String queryURL = GSSProperties.getCab2b2QueryURL()+"/services";
HttpGet httpget = new HttpGet(queryURL);
ResponseHandler<String> responseHandler = new BasicResponseHandler();
String result = httpclient.execute(httpget, responseHandler);
JSONObject json = new JSONObject(result);
for(Iterator i = json.keys(); i.hasNext(); ) {
String modelGroupName = (String)i.next();
JSONArray urls = json.getJSONArray(modelGroupName);
for(int k=0; k<urls.length(); k++) {
JSONObject jsonService = urls.getJSONObject(k);
String serviceURL = jsonService.getString("url");
boolean searchDefault = false;
if (jsonService.has("searchDefault")) {
searchDefault = "true".equals(jsonService.getString("searchDefault"));
}
Cab2bService service = new Cab2bService(
serviceURL, modelGroupName, searchDefault);
services.put(serviceURL, service);
}
}
}
finally {
httpclient.getConnectionManager().shutdown();
}
log.info("Retrieved " + services.size() + " services from caB2B");
return services;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Map<String, List<String>> getServices();",
"public List<CatalogService> getService(String service);",
"public Map listServices() throws IOException\n\t{\n\t\treturn request(GET, address(null, null));\n\t}",
"public Map getESBComponents()\n\t{\t\n\t\tMap endPoints = (Map)cache( \"components\" );\t\t\n\... | [
"0.60675144",
"0.5906865",
"0.5497336",
"0.53598094",
"0.5345638",
"0.53265524",
"0.53104484",
"0.52953017",
"0.51581377",
"0.51497144",
"0.5147186",
"0.5137276",
"0.5137276",
"0.51259637",
"0.5124942",
"0.5124942",
"0.5116362",
"0.5089222",
"0.50656223",
"0.50580853",
"0.501... | 0.8254594 | 0 |
Query caB2B for a keyword search on a particular service or caB2B modelGroup. | public String search(String searchString, String serviceGroup, List<String> serviceUrls) throws Exception {
DefaultHttpClient httpclient = new DefaultHttpClient();
DataServiceGroup group = cab2bTranslator.getServiceGroupByName(serviceGroup);
try {
String url = GSSProperties.getCab2b2QueryURL()+"/search/";
HttpPost httppost = new HttpPost(url);
List <NameValuePair> nvps = new ArrayList <NameValuePair>();
nvps.add(new BasicNameValuePair("searchString", searchString));
nvps.add(new BasicNameValuePair("modelGroup", group.getCab2bName()));
for(String serviceUrl : serviceUrls) {
nvps.add(new BasicNameValuePair("serviceUrl", serviceUrl));
}
httppost.setEntity(new UrlEncodedFormEntity(nvps, HTTP.UTF_8));
ResponseHandler<String> responseHandler = new BasicResponseHandler();
return httpclient.execute(httppost, responseHandler);
}
finally {
httpclient.getConnectionManager().shutdown();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"SearchResultCompany search(String keywords);",
"public void search() {\n String q = this.query.getText();\n String cat = this.category.getValue();\n if(cat.equals(\"Book\")) {\n searchBook(q);\n } else {\n searchCharacter(q);\n }\n }",
"public void se... | [
"0.6347481",
"0.5747548",
"0.56368244",
"0.55290675",
"0.54503673",
"0.5419594",
"0.5388749",
"0.53122663",
"0.52880013",
"0.5285113",
"0.52663624",
"0.5252074",
"0.5247074",
"0.5246826",
"0.522187",
"0.5209272",
"0.5207027",
"0.52031606",
"0.5177553",
"0.51746494",
"0.514605... | 0.5782875 | 1 |
Component c = renderer.getListCellRendererComponent( list, value, index, isSelected, cellHasFocus); Component c = renderer; | @Override public Component getListCellRendererComponent(JList<? extends F> list, F value, int index, boolean isSelected, boolean cellHasFocus) {
JTableHeader header = table.getTableHeader();
renderer.setFont(header.getFont());
if (index == pressedRowIndex) {
renderer.setBackground(Color.GRAY);
} else if (index == rollOverRowIndex) {
renderer.setBackground(Color.WHITE);
} else if (isSelected) {
renderer.setBackground(Color.GRAY.brighter());
} else {
renderer.setForeground(header.getForeground());
renderer.setBackground(header.getBackground());
}
renderer.setText(Objects.toString(value, ""));
return renderer;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Component getListCellRendererComponent(JList jlist, \n Object value, \n int cellIndex, \n boolean isSelected, \n boolean... | [
"0.80146295",
"0.78319013",
"0.7744788",
"0.7686002",
"0.755125",
"0.75041497",
"0.7410198",
"0.7406667",
"0.7390721",
"0.7332317",
"0.72682667",
"0.72487056",
"0.7207204",
"0.7195834",
"0.7193845",
"0.71111894",
"0.70421153",
"0.7038757",
"0.70055383",
"0.69802123",
"0.69487... | 0.7592137 | 4 |
/ Finds the field named fieldName on class clazz. If there are shadowed fields with that name the user is asked to chose one of them. | public Field findField(Inspector insp, Class<?> clazz, String fieldName)
throws FieldNotFoundException, InvalidOptionException {
Map<String, Field> fields = ReflectionHelper.findAllFields(clazz,
fieldName);
Field field;
if (fields.size() == 0) {
throw new FieldNotFoundException(fieldName);
} else if (fields.size() == 1) {
// get the only element of the map
field = fields.values().iterator().next();
} else {
// ask user to chose the which shadowed field is to be inspected
field = this.askFieldFromUser(insp, fields);
}
return field;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static Field getField(Class<?> clazz, String fieldToFind)\n throws SecurityException, NoSuchFieldException {\n Class<?> type = clazz;\n Field field = null;\n do {\n Field[] fields = type.getDeclaredFields();\n for (Field f : fields) {\n b... | [
"0.7601514",
"0.76007795",
"0.7085864",
"0.6894456",
"0.6774419",
"0.67363906",
"0.6724367",
"0.6612696",
"0.66051733",
"0.6567912",
"0.6485379",
"0.6360325",
"0.63186806",
"0.63084584",
"0.63025504",
"0.6301889",
"0.62043846",
"0.61975706",
"0.61818093",
"0.61727786",
"0.615... | 0.8221484 | 0 |
What is the top line for the terminal screen | Node<UnderlyingData> getTopLineNode(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int getLineTop(int line){\n return getLineHeight() * line;\n }",
"public String getCurrentScreenDisplay();",
"public int getTop(){\n\t\treturn platformHitbox.y;\n\t}",
"public abstract TnScreen getCurrentScreen();",
"public String getScreen() {\n\t\treturn screen;\n\t}",
"public Measurem... | [
"0.6234501",
"0.6012009",
"0.57059985",
"0.5678625",
"0.56292856",
"0.5598973",
"0.55827856",
"0.5563389",
"0.5562693",
"0.55463195",
"0.554149",
"0.54876703",
"0.54735374",
"0.5452916",
"0.54515845",
"0.54225445",
"0.54117215",
"0.5408672",
"0.54044694",
"0.54044694",
"0.538... | 0.0 | -1 |
Set the new top line for this terminal screen | void setTopLineNode(Node<UnderlyingData> topLineNode); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setTop() {\n reset(State.TOP);\n }",
"private void drawTopBorder(StringBuffer canvas) {\n \t\t\tfor (int i=0; i<width; i++)\r\n \t\t\t\tcanvas.append('_'); //Top bar.\r\n \t\t\tcanvas.append('\\n');}",
"public UtilsPadding setTop(Number top) {\n if (jsBase == null) {\n ... | [
"0.619786",
"0.5714814",
"0.5710655",
"0.5595445",
"0.55807436",
"0.5564018",
"0.5526354",
"0.55167496",
"0.5516177",
"0.5514243",
"0.54416275",
"0.53957695",
"0.5329996",
"0.5327915",
"0.5312596",
"0.53094584",
"0.52914333",
"0.5284751",
"0.5276003",
"0.5275054",
"0.52445716... | 0.5531296 | 6 |
What is the bottom line for the terminal screen | Node<UnderlyingData> getBottomLineNode(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void win(){\n System.out.println(\"\\n\" + getAnsiGreen() +\n \"██╗░░░██╗░█████╗░██╗░░░██╗░░░░██╗░░░░░░░██╗░█████╗░███╗░░██╗░░░\\n\" +\n \"╚██╗░██╔╝██╔══██╗██║░░░██║░░░░██║░░██╗░░██║██╔══██╗████╗░██║░░░\\n\" +\n \"░╚████╔╝░██║░░██║██║░░░██║░░░░╚██╗█... | [
"0.59516853",
"0.5911043",
"0.5803067",
"0.5694313",
"0.56871486",
"0.5618015",
"0.56133753",
"0.5613242",
"0.56062114",
"0.5600524",
"0.5592103",
"0.55825895",
"0.55199015",
"0.5510271",
"0.5465092",
"0.5463606",
"0.544981",
"0.542831",
"0.54258436",
"0.54031646",
"0.5400314... | 0.0 | -1 |
Set the new bottom line for this terminal screen | void setBottomLineNode(Node<UnderlyingData> bottomLineNode); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setBottom() {\n reset(State.BOTTOM);\n }",
"public void newLine() {\n\t\tcommandLine.append(\"\\n\");\n\t}",
"public int getLineBottom(int line){\n return getLineHeight() * (line + 1);\n }",
"public void modifyBottomGuideline(Guideline guideline) {\n guideline.setGuidel... | [
"0.6195583",
"0.5877672",
"0.5658531",
"0.55780697",
"0.5561605",
"0.5543354",
"0.5536419",
"0.5499287",
"0.54676723",
"0.54596144",
"0.5409405",
"0.5360863",
"0.52782077",
"0.52467775",
"0.52417046",
"0.52329737",
"0.522649",
"0.5226285",
"0.52203315",
"0.5213683",
"0.519924... | 0.52954686 | 12 |
The next node to the provided | Optional<Node<UnderlyingData>> nextNode(Node<UnderlyingData> node); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public DNode getNext() { return next; }",
"public Nodo getnext ()\n\t\t{\n\t\t\treturn next;\n\t\t\t\n\t\t}",
"public Node getNext() { return next; }",
"public node getNext() {\n\t\t\treturn next;\n\t\t}",
"public Node setNextNode(Node node);",
"public ListNode<T> getNext();",
"public SlideNode getNex... | [
"0.76801866",
"0.75756747",
"0.7566086",
"0.75476193",
"0.74791723",
"0.74564207",
"0.7439971",
"0.74396926",
"0.73973686",
"0.73973686",
"0.73937327",
"0.7388346",
"0.7373073",
"0.7372774",
"0.7372774",
"0.73165435",
"0.7311879",
"0.7309314",
"0.72901255",
"0.7283736",
"0.72... | 0.67390084 | 78 |
The previous node to the provided | Optional<Node<UnderlyingData>> prevNode(Node<UnderlyingData> node); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public node getPrevious() {\n\t\t\treturn previous;\n\t\t}",
"public Node getPrevious() {\n return previous;\n }",
"public Node getPrev() {\n return null;\n }",
"public Node getPrev()\r\n\t{\r\n\t\treturn prev;\r\n\t}",
"public Node<T> previous() {\r\n return previous... | [
"0.8638066",
"0.85585266",
"0.8384236",
"0.83129996",
"0.8297543",
"0.82367176",
"0.82161844",
"0.8176375",
"0.81711805",
"0.8138159",
"0.8111252",
"0.8099046",
"0.8043426",
"0.80376035",
"0.80113965",
"0.8007234",
"0.7978213",
"0.79223263",
"0.7911696",
"0.7863814",
"0.78582... | 0.7927923 | 17 |
What is the current line for the terminal screen | Node<UnderlyingData> getCurrentLineNode(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"String getCurrentLine();",
"public int getCurrentLine() {\n return buffer.lineNumber();\n }",
"private int getCurrentLineByCursor() {\n return Math.min((int)cursor.getY() / lineHeight + 1, textBuffer.getMaxLine()-1);\n }",
"public String getLine() {\r\n\t\treturn currentString;\r\n\t}",
... | [
"0.7605841",
"0.702621",
"0.70090437",
"0.70086426",
"0.6931742",
"0.6763188",
"0.6655331",
"0.66382504",
"0.65438014",
"0.65373665",
"0.65101886",
"0.6495537",
"0.64799446",
"0.647052",
"0.64658964",
"0.64422816",
"0.64420205",
"0.63960576",
"0.6377025",
"0.63536614",
"0.631... | 0.0 | -1 |
Set the new current line for this terminal screen | void setCurrentLineNode(Node<UnderlyingData> currentLineNode); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void markLine() {\n lineMark = cursor;\n }",
"public void newLine() {\n\t\tcommandLine.append(\"\\n\");\n\t}",
"public void newChatLine(String line) {\n\t\tSystem.out.println(line);\n\t}",
"public void appendLine() {\n\t\t\tmBuilder.append(NewLineChar);\n\t\t\tlastAppendNewLine = true;\n\t\t}",
"... | [
"0.65165734",
"0.6505872",
"0.6433536",
"0.63895285",
"0.623037",
"0.62276137",
"0.6201761",
"0.61806107",
"0.6162649",
"0.6133479",
"0.6105823",
"0.61018455",
"0.6096705",
"0.60734373",
"0.60710424",
"0.6069249",
"0.6038613",
"0.6029618",
"0.59964925",
"0.59774935",
"0.59155... | 0.5847943 | 23 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.