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
Called when the activity is first created.
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.photo_question); dispatchTakePictureIntent(ACTION_TAKE_PHOTO_B); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t\tinit();\n\t}", "@Override\r\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\r\n\t}", "@Override\n\tpublic void onActivit...
[ "0.791686", "0.77270156", "0.7693263", "0.7693263", "0.7693263", "0.7693263", "0.7693263", "0.7693263", "0.7637394", "0.7637394", "0.7629958", "0.76189965", "0.76189965", "0.7543775", "0.7540053", "0.7540053", "0.7539505", "0.75269467", "0.75147736", "0.7509639", "0.7500879",...
0.0
-1
Some lifecycle callbacks so that the image can survive orientation change
@Override protected void onSaveInstanceState(Bundle outState) { outState.putParcelable(BITMAP_STORAGE_KEY, mImageBitmap); outState.putParcelable(VIDEO_STORAGE_KEY, mVideoUri); outState.putBoolean(IMAGEVIEW_VISIBILITY_STORAGE_KEY, (mImageBitmap != null) ); outState.putBoolean(VIDEOVIEW_VISIBILITY_STORAGE_KEY, (...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void onSetOrientation() {\n }", "@Override\n protected void onImageLaidOut() {\n super.onImageLaidOut();\n final Drawable drawable = getDrawable();\n if (drawable == null) {\n return;\n }\n\n float drawableWidth = drawable.getIntrinsicWidth();\n ...
[ "0.63694733", "0.6324585", "0.6321235", "0.6080445", "0.60553265", "0.6037144", "0.5951786", "0.5936445", "0.5881285", "0.58570343", "0.5852309", "0.5815089", "0.57968014", "0.5765131", "0.57578063", "0.5752912", "0.57467276", "0.57437646", "0.57303894", "0.5728767", "0.57002...
0.0
-1
Indicates whether the specified action can be used as an intent. This method queries the package manager for installed packages that can respond to an intent with the specified action. If no suitable package is found, this method returns false.
public static boolean isIntentAvailable(Context context, String action) { final PackageManager packageManager = context.getPackageManager(); final Intent intent = new Intent(action); List<ResolveInfo> list = packageManager.queryIntentActivities(intent, PackageManager.MATCH_DEFAULT_ONLY); return list.siz...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static boolean isIntentAvailable(Context context, String action) {\n final PackageManager packageManager = context.getPackageManager();\n final Intent intent = new Intent(action);\n List<ResolveInfo> list =\n packageManager.queryIntentActivities(intent,\n ...
[ "0.8037924", "0.6221447", "0.6129802", "0.6115386", "0.6054635", "0.59920543", "0.5948625", "0.5907565", "0.58194137", "0.57495123", "0.573548", "0.57340354", "0.5692715", "0.5684876", "0.5656438", "0.5643525", "0.56426436", "0.5629708", "0.5617314", "0.5612565", "0.55873495"...
0.79917467
1
Returns an instantiated preprocessor, with a short, predefined list of stop words
@BeforeEach void get_preprocessor() throws IOException, SQLException, ClassNotFoundException { preprocessor = new Preprocessor(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n // Test that the preprocessor removes the relevant stop words\n void removeStopWords01() {\n List<String> stop_words = new ArrayList<>();\n List<String> words = new ArrayList<>(stop_words);\n words.add(\"vigtig\");\n assertEquals(\"vigtig\", preprocessor.removeStopWords(wo...
[ "0.62017846", "0.5352991", "0.5352184", "0.5322177", "0.52654916", "0.52633816", "0.52615654", "0.5227526", "0.52259225", "0.5194617", "0.5160943", "0.51579165", "0.51277655", "0.5112115", "0.5089485", "0.5026662", "0.5019198", "0.49663886", "0.4928786", "0.49147242", "0.4903...
0.0
-1
Tests the removal of symbols
@Test void cleanText01() { String responseSymbols = "hej ,den. der ++ super-mand"; String[] responseSymbolsClean = {"hej", "den", "der", "supermand"}; List<String> cleaned = preprocessor.cleanText(responseSymbols); assertArrayEquals(responseSymbolsClean, cleaned.toArray()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n\tpublic void testRemoveAllAlphaNumerics() {\n\t\tString result = sp.removeNonAlphaNum(testString);\n\t\tassertEquals(\"Strings do not match.\", removeAlphaNumTest, result);\n\t}", "@Test\n\tpublic void removePunctTest() {\n\t\tString test1 = \"hello.\";\n\t\tString test2 = \"hello,\";\n String tes...
[ "0.64773595", "0.6344115", "0.62617916", "0.6194403", "0.5926361", "0.5863055", "0.5853073", "0.5833175", "0.58201635", "0.581197", "0.581197", "0.57710993", "0.57178104", "0.56947803", "0.5675901", "0.5639941", "0.5589878", "0.5584865", "0.5583393", "0.5578368", "0.55765355"...
0.62954956
2
Tests that it converts text to lower case
@Test void cleanText02() { String responseCasing = "CAPS"; String[] responseCasingClean = {"caps"}; List<String> cleaned = preprocessor.cleanText(responseCasing); assertArrayEquals(responseCasingClean, cleaned.toArray()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected String normalize(String text) {\r\n\t\tString normalized = text.toLowerCase();\r\n\t\treturn normalized;\r\n\t}", "private void toLower() {\n System.out.print(\"ToLower(\");\n text.print();\n System.out.print(\")\");\n }", "public void assertTextPresentIgnoreCase(String expect...
[ "0.7201617", "0.714042", "0.7003557", "0.69634366", "0.68954754", "0.6780871", "0.6769881", "0.6736804", "0.6723628", "0.6708377", "0.6686398", "0.6630551", "0.66253984", "0.66022444", "0.66020364", "0.6582914", "0.65774393", "0.65147924", "0.6408522", "0.6391837", "0.6356951...
0.0
-1
Test that the preprocessor removes the relevant stop words and keeps every other word
@Test // Test that the preprocessor removes the relevant stop words void removeStopWords01() { List<String> stop_words = new ArrayList<>(); List<String> words = new ArrayList<>(stop_words); words.add("vigtig"); assertEquals("vigtig", preprocessor.removeStopWords(words).get(0)); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n\tpublic void testRemoveAllStopWords() {\n\t\tString result;\n\t\ttry {\n\t\t\tresult = sp.removeStopWords(stopWords);\n\t\t\tassertEquals(\"Strings not equal. They should be empty.\", \"\", result);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private static String removeStopWo...
[ "0.73503286", "0.64882165", "0.6299911", "0.62621987", "0.6176983", "0.61466587", "0.59709305", "0.58977246", "0.58856463", "0.5884728", "0.5881678", "0.584806", "0.5753113", "0.5692922", "0.56812185", "0.56130606", "0.5607266", "0.554883", "0.55392116", "0.5521767", "0.54713...
0.8287742
0
Mayor naturalidad en cuanto a la gestion de las cajas Implementando la interfaz Iterable podemos usar el foreach directamente Sin tener que llamar al metodo getList
@Override public Iterator<T> iterator() { return lista.iterator(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<Comentario> listaComentarioPorCodigo(Long codigo);", "public List<CuentaContableDimensionContable> getListaCuentaContables()\r\n/* 329: */ {\r\n/* 330:391 */ List<CuentaContableDimensionContable> lista = new ArrayList();\r\n/* 331:392 */ for (CuentaContableDimensionContable cuentaContabl...
[ "0.61726886", "0.60758555", "0.5918684", "0.588969", "0.5863182", "0.58409667", "0.58377665", "0.5814673", "0.5788841", "0.57880086", "0.5764049", "0.57545304", "0.5733201", "0.5732841", "0.57297295", "0.57113546", "0.5692399", "0.5690925", "0.5690562", "0.5672802", "0.5662",...
0.5620937
31
Get balance for an account
@RequestMapping(value = "/balance", method = RequestMethod.GET) public List<BigDecimal> getBalances(Principal principal) { try { return accountDAO.getCurrentBalance(principal.getName()); } catch (Exception ex) { System.out.println(ex); } return null; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Integer getAccountBalance(int account_id){\n Account a = cache.get(account_id);\n if(a != null) return a.getBalance();\n\n try (\n Statement s = rawDataSource.getConnection().createStatement();\n ResultSet res = s.executeQuery(\n \"SE...
[ "0.78725964", "0.78506", "0.7741254", "0.76251775", "0.7620186", "0.75281644", "0.75281644", "0.7462607", "0.7438505", "0.7426185", "0.7391129", "0.7391129", "0.7386345", "0.7386345", "0.7382183", "0.73526084", "0.7345333", "0.7298765", "0.72936535", "0.7274791", "0.7274791",...
0.6733363
88
TODO Autogenerated method stub
public static void main(String[] args) throws InterruptedException { for(int i=0;i<5;i++){ Thread unsafe = new Thread(new ThreadSafe()); unsafe.start(); TimeUnit.SECONDS.sleep(2); } }
{ "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
Subscribing for Goals and Plans events. BDI v3 doesn't support Goals and Plans listeners. For that reason we have to subscribe for events to let JBdiEmo know that goal/plan was added/finished
public void goalsAndPlansMonitoring() { monitor.subscribeToEvents(new IFilter<IMonitoringEvent>() { public boolean filter(IMonitoringEvent event) { Map<String, Object> properties = event.getProperties(); if (properties == null || properties.get("details") == null) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void addGoalObserver(GoalObserver obs);", "private void handlePlanFinishedEvent() {\n for (String myActivePlanKey : myActivePlans.keySet()) {\n\n boolean isStillActive = false;\n\n // Iterate currently active access plans\n for (RPlan plan : internalFeature.getCapability()...
[ "0.5953259", "0.57765675", "0.55086887", "0.5483667", "0.54343563", "0.53440607", "0.5324621", "0.531717", "0.52700055", "0.52486545", "0.52084786", "0.5154838", "0.5154569", "0.5133448", "0.5117126", "0.50725836", "0.50596505", "0.504296", "0.50329643", "0.50297886", "0.5018...
0.7491417
0
Iterate plan instances stored in my active plan map to find if we have record of plan which is no longer active
private void handlePlanFinishedEvent() { for (String myActivePlanKey : myActivePlans.keySet()) { boolean isStillActive = false; // Iterate currently active access plans for (RPlan plan : internalFeature.getCapability().getPlans()) { // If plan instance store...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean decrementPlannedInstances();", "public boolean allDestroyed()\n {\n\n \tcalculateTotalHitsRequired();\n \tint hits = 0;\n \tfor (int row = 0; row < NUM_ROWS; row++){\n \t\tfor(int col = 0; col < NUM_COLS; col++){\n \t\t\tif(grid[row][col] == HIT)\n \t\t\t\thits++;\n \t\t}\n \t}...
[ "0.5420406", "0.5192128", "0.5077853", "0.50197446", "0.4945388", "0.49211934", "0.4908115", "0.48946425", "0.4877922", "0.48622987", "0.48600408", "0.48223093", "0.4820019", "0.4818575", "0.48140168", "0.48121545", "0.481004", "0.48070577", "0.48065045", "0.4804658", "0.4798...
0.5407816
1
Get currently active access goals
private void handleGoalFinishedEvent() { Collection<RGoal> agentActiveGoals = internalFeature.getCapability().getGoals(); // Iterate goal instances stored in my active goal map to find if we have record of goal which is no longer active for (String myActiveGoalKey : myActiveGoals.keySet()) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<String> getGoals() {\n\t\treturn this.goals;\n\t}", "public String getGoal();", "@java.lang.Override\n public java.util.List<POGOProtos.Rpc.QuestGoalProto> getGoalsList() {\n return goals_;\n }", "public int getAchievements() {\n return achievements;\n }", "final Goal goal ()\n ...
[ "0.6568392", "0.6185273", "0.6123382", "0.606649", "0.6061477", "0.60265183", "0.5986861", "0.5964248", "0.58603334", "0.58569527", "0.58448845", "0.5790937", "0.5787351", "0.5772676", "0.57721645", "0.57689637", "0.5744731", "0.5727227", "0.5709914", "0.56736827", "0.5665824...
0.0
-1
constructor for playercontrolled, lichspawned skeletons
public skeletalArcher(Stats toCopy, int casterInt){ super("Skeletal Archer", toCopy); scaleDifficulty(.5f); Dex = Math.round(casterInt * .75f); charProperty = new Undead(); buildSkills(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Multi_Player()\r\n {\r\n \r\n }", "public Player(){\n default_init();\n }", "public Player(String password) {\n\t\tsuper(/* Settings.HOSTED ? */Settings.START_PLAYER_LOCATION);\n\t\tsetHitpoints(Settings.START_PLAYER_HITPOINTS);\n\t\tthis.password = password;\n\t\tappearence = new...
[ "0.6928011", "0.6794745", "0.6679225", "0.66300976", "0.6614179", "0.6471525", "0.64620495", "0.6455655", "0.64549774", "0.6452822", "0.6444825", "0.64446586", "0.6422816", "0.64003456", "0.639384", "0.6391155", "0.6391155", "0.6363361", "0.63588524", "0.63470757", "0.6346885...
0.0
-1
toDate for format 1
public static Date toDateFormat_1(String dateString) { return stringToDate(dateString, DATE_FORMAT_1); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "java.lang.String getToDate();", "DateFormat getSourceDateFormat();", "public String ConvertDate(){\r\n//\t\tDate date=JavaUtils.getSystemDate();\r\n//\t DateFormat df = new SimpleDateFormat(\"yyyy/MM/dd\");\r\n\t String pattern = \"yyyy-MM-dd\";\r\n\t SimpleDateFormat simpleDateFormat = new SimpleDate...
[ "0.66468894", "0.62734973", "0.60766214", "0.6075777", "0.5948401", "0.58565885", "0.5848251", "0.5837488", "0.5826514", "0.581313", "0.58030105", "0.58030105", "0.57909924", "0.575583", "0.5755292", "0.57341397", "0.5727837", "0.57266897", "0.5720177", "0.57128096", "0.56929...
0.5300886
62
toDate for format 2
public static Date toDateFormat_2(String dateString) { return stringToDate(dateString, DATE_FORMAT_2); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "java.lang.String getToDate();", "DateFormat getSourceDateFormat();", "public java.lang.String getToDate() {\n java.lang.Object ref = toDate_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n ...
[ "0.6781247", "0.61988217", "0.6114765", "0.60911036", "0.60435414", "0.59906185", "0.59181166", "0.58778006", "0.58621734", "0.584047", "0.5828991", "0.5808079", "0.5765214", "0.57570994", "0.5752861", "0.57122993", "0.56692976", "0.56399447", "0.56366277", "0.56012344", "0.5...
0.57800096
12
toDate for format 4
public static Date toDateFormat_4(String dateString) { return stringToDate(dateString, DATE_FORMAT_4); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "java.lang.String getToDate();", "DateFormat getSourceDateFormat();", "public java.lang.String getToDate() {\n java.lang.Object ref = toDate_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n ...
[ "0.6954353", "0.6411487", "0.6176564", "0.61229056", "0.60768974", "0.60635114", "0.60377574", "0.6023334", "0.6013995", "0.60106987", "0.5995357", "0.5976854", "0.5969302", "0.5896514", "0.5886588", "0.5886588", "0.58546424", "0.58544004", "0.58381635", "0.5799805", "0.57080...
0.53931177
55
toDate for format 5
public static Date toDateFormat_9(String dateString) { return stringToDate(dateString, DATE_FORMAT_9); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "java.lang.String getToDate();", "DateFormat getSourceDateFormat();", "public java.lang.String getToDate() {\n java.lang.Object ref = toDate_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n ...
[ "0.6908069", "0.61565447", "0.6135642", "0.6092805", "0.6072514", "0.6065287", "0.60609186", "0.60070956", "0.60033447", "0.59738415", "0.5968833", "0.59229684", "0.58967894", "0.58882326", "0.58882326", "0.5846548", "0.5846005", "0.57944965", "0.57708645", "0.57273215", "0.5...
0.0
-1
toString for format 1
public static String toStringFormat_1(Date date) { return dateToString(date, DATE_FORMAT_1); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String toString()\n {\n return toString((Format) null);\n }", "protected abstract String format();", "@VTID(8)\r\n java.lang.String format();", "@Override\n\tpublic String toString()\n\t{\n\t\treturn toString(Locale.getDefault(Locale.Category.FORMAT));\n\t}", "public String toString(...
[ "0.7722427", "0.76889795", "0.75624174", "0.74554235", "0.72562444", "0.7237527", "0.7063333", "0.69974035", "0.695571", "0.69508535", "0.68904126", "0.688497", "0.68630666", "0.68630666", "0.68630666", "0.68630666", "0.68630666", "0.68630666", "0.68630666", "0.68630666", "0....
0.6500946
92
toString for format 4
public static String toStringFormat_4(Date date) { return dateToString(date, DATE_FORMAT_4); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@VTID(8)\r\n java.lang.String format();", "protected abstract String format();", "protected String getToStringFormat()\n {\n return getClass().getSimpleName() + \"@\"\n + Integer.toHexString(hashCode()) + \": { \"\n + \"offset = 0x\" + Integer.toHexString(offset) + \"...
[ "0.79680145", "0.7913555", "0.7559528", "0.7549993", "0.75423414", "0.7530248", "0.7358727", "0.73537415", "0.7342899", "0.7167098", "0.71281725", "0.7096519", "0.7096519", "0.7096519", "0.7012571", "0.7004398", "0.6972969", "0.69399357", "0.6905775", "0.6892784", "0.6858066"...
0.6787448
28
toString for format 2
public static String toStringFormat_2(Date date) { return dateToString(date, DATE_FORMAT_2); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected abstract String format();", "@VTID(8)\r\n java.lang.String format();", "public String toString()\n {\n return toString((Format) null);\n }", "public String toString(){\n return \"Format: \" + format +\", \" + super.toString(); \n }", "@Override\n\tpublic String toStr...
[ "0.7746173", "0.7437306", "0.731921", "0.72512376", "0.7064306", "0.69465506", "0.69465506", "0.69465506", "0.6939407", "0.68415046", "0.6807857", "0.67864215", "0.6744432", "0.6735906", "0.6710868", "0.6670103", "0.6665177", "0.6652677", "0.6634686", "0.6631297", "0.6600038"...
0.6860065
9
toString for format 7
public static String toStringFormat_7(Date date) { return dateToString(date, DATE_FORMAT_7); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@VTID(8)\r\n java.lang.String format();", "protected abstract String format();", "public String toString()\n {\n return toString((Format) null);\n }", "@Override\n\tpublic String toString()\n\t{\n\t\treturn toString(Locale.getDefault(Locale.Category.FORMAT));\n\t}", "@Override\n public f...
[ "0.7567287", "0.75208867", "0.7344582", "0.73404825", "0.70923054", "0.70487976", "0.69424456", "0.6907392", "0.6856822", "0.68204266", "0.67894906", "0.6784633", "0.6766673", "0.67454386", "0.67269874", "0.6711623", "0.6702584", "0.66951275", "0.66697073", "0.66333115", "0.6...
0.6603328
22
get max time in that day.
public static Date getMaxDate(String dateStr, String dateFormat) { Date dt = stringToDate(dateStr, dateFormat); Calendar cal = Calendar.getInstance(); cal.setTime(dt); cal.set(Calendar.HOUR, 23); cal.set(Calendar.MINUTE, 59); cal.set(Calendar.SECOND, 59); return cal.getTime(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public long getMaxTime()\n {\n return times[times.length - 1];\n }", "public Integer getMaxTime() {\n return maxTime;\n }", "public int getMaxTime() { return _maxTime; }", "public long getMaxTime(){\n long max;\n if(myPlaces_ra != null){\n // max variable set to the f...
[ "0.76413363", "0.7587206", "0.7521716", "0.7124301", "0.7057219", "0.6901418", "0.68415165", "0.6612506", "0.64951247", "0.64888227", "0.64745975", "0.6467175", "0.64178807", "0.6280853", "0.62131", "0.61963594", "0.6191228", "0.61904675", "0.61721367", "0.6147843", "0.610002...
0.0
-1
get max time in that day.
public static Date getMaxDate(Date dt) { Calendar cal = Calendar.getInstance(); cal.setTime(dt); cal.set(Calendar.HOUR, 23); cal.set(Calendar.MINUTE, 59); cal.set(Calendar.SECOND, 59); return cal.getTime(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public long getMaxTime()\n {\n return times[times.length - 1];\n }", "public Integer getMaxTime() {\n return maxTime;\n }", "public int getMaxTime() { return _maxTime; }", "public long getMaxTime(){\n long max;\n if(myPlaces_ra != null){\n // max variable set to the f...
[ "0.76410127", "0.75876355", "0.75215304", "0.71245867", "0.7058057", "0.69020104", "0.661273", "0.649464", "0.6489307", "0.64743084", "0.64679784", "0.64187956", "0.6281686", "0.6212326", "0.6196432", "0.6190886", "0.6190712", "0.6172078", "0.6146101", "0.610027", "0.60769325...
0.68413377
6
get min time in that day.
public static Date getMinDate(String dateStr, String dateFormat) { Date dt = stringToDate(dateStr, dateFormat); return getMinDate(dt); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public long getMinTime()\n {\n return times[0];\n }", "public Integer getMinTime() {\n return minTime;\n }", "public final double getMinTime() {\n\t\treturn minTime;\n\t}", "public static Date getMinDate() {\n Calendar cal = Calendar.getInstance();\n cal.set(1970, 1, 1, 1, 1, 1);...
[ "0.7591752", "0.7395848", "0.73846054", "0.7069165", "0.69039935", "0.6848822", "0.6806916", "0.6778508", "0.6737432", "0.64857006", "0.6440319", "0.6388785", "0.63807714", "0.6364236", "0.6318208", "0.6273954", "0.62692547", "0.62487376", "0.6240286", "0.6187664", "0.6163397...
0.0
-1
get min time in that day.
public static Date getMinDate(Date dt) { Calendar cal = Calendar.getInstance(); cal.setTime(dt); cal.set(Calendar.HOUR_OF_DAY, 0); cal.set(Calendar.MINUTE, 0); cal.set(Calendar.SECOND, 0); return cal.getTime(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public long getMinTime()\n {\n return times[0];\n }", "public Integer getMinTime() {\n return minTime;\n }", "public final double getMinTime() {\n\t\treturn minTime;\n\t}", "public static Date getMinDate() {\n Calendar cal = Calendar.getInstance();\n cal.set(1970, 1, 1, 1, 1, 1);...
[ "0.7591752", "0.7395848", "0.73846054", "0.7069165", "0.6848822", "0.6806916", "0.6778508", "0.6737432", "0.64857006", "0.6440319", "0.6388785", "0.63807714", "0.6364236", "0.6318208", "0.6273954", "0.62692547", "0.62487376", "0.6240286", "0.6187664", "0.6163397", "0.6157414"...
0.69039935
4
Called when the activity is first created.
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); //Initialize a LoadViewTask object and call the execute() method new LoadViewTask().execute(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t\tinit();\n\t}", "@Override\r\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\r\n\t}", "@Override\n\tpublic void onActivit...
[ "0.791686", "0.77270156", "0.7693263", "0.7693263", "0.7693263", "0.7693263", "0.7693263", "0.7693263", "0.7637394", "0.7637394", "0.7629958", "0.76189965", "0.76189965", "0.7543775", "0.7540053", "0.7540053", "0.7539505", "0.75269467", "0.75147736", "0.7509639", "0.7500879",...
0.0
-1
Before running code in the separate thread
@Override protected void onPreExecute() { //Initialize the ViewSwitcher object viewSwitcher = new ViewSwitcher(LoadingScreenActivity.this); viewSwitcher.addView(ViewSwitcher.inflate(LoadingScreenActivity.this, R.layout.loadingscreen, null)); pb_progressBar = (ProgressBar) viewSwitcher.f...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void before() {\n process = Thread.currentThread();\n }", "protected void runBeforeIteration() {}", "public void prePerform() {\n // nothing to do by default\n }", "protected abstract void preRun();", "protected void runBeforeIterations() {}", "@Override\n public void preRun...
[ "0.72266024", "0.70627624", "0.69942516", "0.6892265", "0.6823737", "0.6792928", "0.6733103", "0.6617669", "0.6545852", "0.6472091", "0.64520097", "0.63690794", "0.63690406", "0.6352673", "0.62929654", "0.62929654", "0.62819964", "0.6280368", "0.626234", "0.62611866", "0.6213...
0.0
-1
The code to be executed in a background thread.
@Override protected Void doInBackground(Void... params) { //Get the current thread's token synchronized (this) { MyApplication app = (MyApplication) getApplication(); while(app.getSyncStatus()); } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void backgroundExecution() {\n // This moves the time consuming operation to a child thread.\n Thread thread=new Thread(null, doBackgroundThreadProcessing, \"Background\");\n thread.start();\n }", "private void backgroundThreadProcessing() {\n // [ ... Time consuming operat...
[ "0.7357961", "0.67702913", "0.6744981", "0.66711724", "0.6659476", "0.6622586", "0.65996796", "0.65067387", "0.64896595", "0.64896595", "0.647636", "0.647636", "0.647636", "0.647636", "0.647636", "0.647636", "0.647636", "0.646942", "0.646942", "0.6454589", "0.6454589", "0.6...
0.0
-1
After executing the code in the thread
@Override protected void onPostExecute(Void result) { viewSwitcher.addView(ViewSwitcher.inflate(LoadingScreenActivity.this, R.layout.player, null)); viewSwitcher.showNext(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\t\t\tpublic void run() {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void run() {\n\t\t\t\t\r\n\t\t\t}", "protected void finishExecution() {\r\n\r\n\t}", "@Override\r\n\t\tprotected void run() {\n\t\t\t\r\n\t\t}", "protected void runAfterIteration() {}", "@Override\n\t\t\tpublic void ...
[ "0.695242", "0.695242", "0.6942144", "0.6901483", "0.6897269", "0.68600756", "0.68600756", "0.6858083", "0.68456686", "0.6834461", "0.68143696", "0.68143696", "0.677494", "0.6767786", "0.6739638", "0.6717203", "0.66880155", "0.66606", "0.66557646", "0.66557646", "0.6648059", ...
0.0
-1
Override the default back key behavior
@Override public void onBackPressed() { //Emulate the progressDialog.setCancelable(false) behavior //If the first view is being shown if(viewSwitcher.getDisplayedChild() == 0) { //Do nothing return; } else { //Finishes the current Activity super.onBackP...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void keyBack() {\n\t\t\n\t}", "public void keyBackIsPressed(){}", "public abstract boolean onBackPressed(boolean isSystemBackKey);", "@Override\n\tpublic void onBackKeyPressed() {\n\treturn;\t\n\t}", "@Override\n\tpublic void onBackKeyPressed() {\n\t\treturn;\n\t}", "@Override\n pu...
[ "0.8330744", "0.8184911", "0.7996109", "0.7977396", "0.7950214", "0.78564864", "0.7647515", "0.7578124", "0.7556771", "0.7508911", "0.75046676", "0.7493232", "0.7484217", "0.7425154", "0.74228173", "0.7408533", "0.7404005", "0.73981595", "0.73981595", "0.73972857", "0.7385476...
0.0
-1
Returns the value to which the specified key is mapped, or 1 if it contains no mapping for the key.
public int get(int key) { int index = getIndexForKey(key); Entry entries = table[index]; for(Entry entry = entries; entry != null; entry = entry.next){ if(entry.key == key){ entry.removeEntry(); entry.addBefore(header); return entry.va...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int get(int key) {\n return hashMap.stream()\n .filter(pair -> pair[0] == key)\n .findAny()\n .map(pair -> pair[1])\n .orElse(-1);\n }", "public int get(int key) {\n if(!map.containsKey(key)) return -1;\n return map.get(ke...
[ "0.7615606", "0.72679424", "0.72588736", "0.6982947", "0.6724841", "0.67201185", "0.67194164", "0.67014486", "0.6629226", "0.66259325", "0.66052496", "0.64833313", "0.6403999", "0.6393196", "0.63782454", "0.63327223", "0.6320339", "0.6314853", "0.6284822", "0.62451947", "0.62...
0.0
-1
Associates the specified value with the specified key in this cache. If it previously contained a mapping for the key, the old value is replaced.
public void put(int key, int value) { int index = getIndexForKey(key); Entry entries = table[index]; for(Entry entry = entries; entry != null; entry = entry.next){ if(entry.key == key){ entry.value = value; entry.removeEntry(); entry.a...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void put(Key key, Value val);", "public void put(K key, T value) {\n synchronized (cacheMap) {\n cacheMap.put(key, new CacheObject(value));\n }\n }", "public void put(Object key, Object value) {\n \t\tLog.i(TAG, String.format(\"Cache put key: %s, value: %s\", key, value.toStr...
[ "0.74429184", "0.7428241", "0.742751", "0.72148365", "0.7211529", "0.72104007", "0.7178468", "0.7117321", "0.7076287", "0.70706546", "0.7067746", "0.7032101", "0.7027806", "0.6998096", "0.6962981", "0.69574165", "0.6944534", "0.6944307", "0.69434404", "0.6942636", "0.6942079"...
0.0
-1
This method is invoked by put If the number of keys exceeds the capacity from put operation, evict the least recently used key
protected void removeEldestEntry(){ Entry lastEntry = header.before; header.before = header.before.before; header.before.after = header; int index = getIndexForKey(lastEntry.key); Entry entries = table[index]; Entry prevEntry = null; for(Entry entry = entries; e...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void evictedElement(T key);", "public synchronized void evict()\n {\n // push next flush out to avoid attempts at multiple simultaneous\n // flushes\n deferFlush();\n\n // walk all buckets\n SafeHashMap.Entry[] aeBucket = m_aeBucket;\n int cBuckets...
[ "0.7024615", "0.6519934", "0.64907366", "0.6474405", "0.6404271", "0.6374666", "0.6347023", "0.63444096", "0.6299813", "0.6254028", "0.62446725", "0.62164444", "0.6183856", "0.6142966", "0.6127148", "0.61147743", "0.6111034", "0.60798764", "0.60391015", "0.6032685", "0.600711...
0.0
-1
used to set the layout of each row in the ListView. Set information about the items that are going to be shown in the ListView.
public ReceiptAdapter(Context context,LinkedList<Receipt> receipts) { super(); mContext = context; rec = receipts; inflater = (LayoutInflater) mContext .getSystemService(Context.LAYOUT_INFLATER_SERVICE); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\t\tpublic View getView(int position, View convertView, ViewGroup parent) {\n\n\t\t\tLayoutInflater inflater = (LayoutInflater) mContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n\t\t\tView view = inflater.inflate(R.layout.list_item_table_row_read, parent, false);\n\t\t\tSet<Entry<String, Json...
[ "0.6591799", "0.6433775", "0.6358574", "0.6306234", "0.6298702", "0.62842304", "0.6277378", "0.6268884", "0.6266869", "0.6250464", "0.62346065", "0.622586", "0.6186876", "0.6175156", "0.6149319", "0.61390185", "0.60935056", "0.6092293", "0.6079593", "0.6070045", "0.6059426", ...
0.0
-1
cache for okhttp client
private HttpCache(@NonNull Context context) { mCache = new Cache(new File(context.getExternalCacheDir(), CacheConfig.FILE_DIR), CacheConfig.FILE_SIZE); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static OkHttpClient createCachedClient(final Context context) {\n File httpCacheDirectory = new File(context.getCacheDir(), \"cache_file\");\n Cache cache = new Cache(httpCacheDirectory, 20 * 1024 * 1024);\n OkHttpClient okHttpClient = new OkHttpClient.Builder().addNetworkInterceptor(n...
[ "0.73574924", "0.63352835", "0.63229275", "0.61673737", "0.6075254", "0.6037545", "0.6036752", "0.59867764", "0.59833723", "0.59779966", "0.59219646", "0.5878875", "0.58537346", "0.5801428", "0.57526654", "0.57507133", "0.57068974", "0.5698065", "0.5689056", "0.56594574", "0....
0.5638208
20
cache fresh time is 2 minutes make cache control from cacheType
public static CacheControl getCacheControl(int cacheType) { switch (cacheType) { case CACHE_NETWORK: { return CacheControl.FORCE_NETWORK; } case CACHE_IF_HIT: { return new CacheControl.Builder() ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private CacheWrapper<AccessPointIdentifier, Integer> createCache() {\n return new CacheWrapper<AccessPointIdentifier, Integer>() {\n \n @Override\n public void put(AccessPointIdentifier key, Integer value) {\n cache.put(key, value);\n }\n ...
[ "0.65344936", "0.6467074", "0.63651484", "0.633888", "0.6299416", "0.6154073", "0.6139097", "0.6121892", "0.60675997", "0.6016023", "0.60085845", "0.59866166", "0.5922831", "0.5917595", "0.5907731", "0.58830655", "0.58702487", "0.5853149", "0.58510566", "0.5842945", "0.583926...
0.0
-1
initialize the library instance
public Boolean drcryptefile(String privkey,String pubkey,String filedcry,String output) throws Exception{ PGPLib pgp = new PGPLib(); //bdlo had les lien String privateKeyFile = "C:/Users/saad1/Desktop/project-chffrement/src/openpgp/DataFiles/"+privkey; String privateKeyPass = "985632"; @SuppressWarnings("dep...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void initialize() {\n \t\n }", "public void initialize()\n {\n }", "public void initialize() {\n // empty for now\n }", "public void init() {}", "public void init() {}", "public void init() {\n \n }", "private void init() {\n }", "private void init() {\n...
[ "0.7975878", "0.79341125", "0.7886277", "0.78677833", "0.78677833", "0.78509134", "0.78344065", "0.7807377", "0.7807377", "0.7807377", "0.7807377", "0.7806889", "0.7802901", "0.7802901", "0.77959865", "0.779328", "0.77815765", "0.77800715", "0.77800715", "0.7774245", "0.77580...
0.0
-1
Calculate the next interval time. interval is must be greater or equals 1. When ABORT(0) is returned, the retry process is stopped.
@IntRange(from = 0L) long interval(int retryCount, long elapsedTime);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract long retryAfter();", "public int setInterval(){\r\n if(interval == 0){\r\n gamePanel.setGameLoop(false);\r\n\r\n gamePanel.GameOver();\r\n time.cancel();\r\n }\r\n return --interval;\r\n }", "@Override\n public int nextScheduledInterval(...
[ "0.6079158", "0.6037634", "0.6001009", "0.59152424", "0.5681079", "0.55070555", "0.55042017", "0.5450806", "0.5429401", "0.542529", "0.53987396", "0.53619194", "0.5332696", "0.531587", "0.5280709", "0.5270731", "0.5263617", "0.52174443", "0.51839185", "0.51634663", "0.5146732...
0.69261885
0
The Interface Action. This handles the actions
public interface Action { /** * Execute. * * @param router the router * @param request the request * @return the response */ public Response execute(Router router, Request request); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void action() {\n }", "@Override\n public void action() {\n }", "@Override\n public void action() {\n }", "@Override\r\n\tpublic void action() {\n\t\t\r\n\t}", "@Override\n\tpublic void action() {\n\n\t}", "public interf...
[ "0.7292059", "0.7292059", "0.7292059", "0.71406966", "0.6992149", "0.6863872", "0.6679271", "0.6599667", "0.6573273", "0.6573273", "0.6573273", "0.6573273", "0.65153146", "0.64824927", "0.64773256", "0.64614564", "0.643421", "0.6423192", "0.6406425", "0.6396205", "0.63930565"...
0.0
-1
Constructs a new DatabaseCommandInterpreter for the given Session
DatabaseCommandInterpreter(Session s) { session = s; database = s.getDatabase(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "DatabaseSession openSession();", "DatastoreSession createSession();", "protected abstract SESSION newSessionObject() throws EX;", "public SessionDao() {\n super(Session.SESSION, com.scratch.database.mysql.jv.tables.pojos.Session.class);\n }", "public QueryExecution createQueryExecution(String qry...
[ "0.52774835", "0.5240435", "0.5235672", "0.52051127", "0.5190335", "0.5177092", "0.51707476", "0.50690645", "0.5034312", "0.50217915", "0.494388", "0.49418062", "0.48990774", "0.4884757", "0.4884757", "0.4884757", "0.48419547", "0.4768094", "0.4750145", "0.4750132", "0.473300...
0.7605551
0
Executes the SQL String. This method is always called from a block synchronized on the database object.
Result execute(String sql) { Result result; String token; int cmd; JavaSystem.gc(); result = null; cmd = Token.UNKNOWNTOKEN; try { tokenizer.reset(sql); while (true) { tokenizer.setPartMarker(); se...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void execute (String query) throws java.sql.SQLException {\n try {\n /*\n if (query.indexOf('(') != -1)\n Logger.write(\"VERBOSE\", \"DB\", \"execute(\\\"\" + query.substring(0,query.indexOf('(')) + \"...\\\")\");\n else\n Logger.write(\"...
[ "0.64970034", "0.6470741", "0.64499134", "0.63752234", "0.6372601", "0.6272709", "0.6267825", "0.6262421", "0.61992824", "0.6165703", "0.6098665", "0.6050728", "0.6041185", "0.60313004", "0.6019161", "0.601287", "0.60067356", "0.59862584", "0.5982947", "0.5972854", "0.5955254...
0.56606
47
Responsible for parsing and executing the SCRIPT SQL statement
private Result processScript() throws IOException, HsqlException { String token = tokenizer.getString(); ScriptWriterText dsw = null; session.checkAdmin(); try { if (tokenizer.wasValue()) { if (tokenizer.getType() != Types.VARCHAR) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "final public SqlStatement ScriptStatement() throws ParseException {SqlStatement st = null;\n switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {\n case USE:\n case CREATE:\n case DROP:\n case SET:\n case INSERT:\n case ALTER:\n case LOCK:\n case UNLOCK:\n case START:\n case COMMIT:\n case...
[ "0.68482864", "0.6618432", "0.64617914", "0.6340527", "0.6262464", "0.61917734", "0.6073497", "0.6033338", "0.60028726", "0.5862372", "0.5862372", "0.5851728", "0.58380973", "0.57958305", "0.5791401", "0.577654", "0.5746422", "0.57344013", "0.57199144", "0.5677754", "0.566733...
0.7086898
0
Responsible for handling CREATE ... All CREATE command require an ADMIN user except: CREATE TEMP [MEMORY] TABLE
private void processCreate() throws HsqlException { boolean unique = false; int tableType; boolean isTempTable = false; String token; session.checkAdmin(); session.checkDDLWrite(); session.setScripting(true); if (tokenizer.isGetThis(Token.T_GLOBAL)...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void CreatTable() {\n String sql = \"CREATE TABLE IF NOT EXISTS \" + TABLE_NAME\n + \" (name varchar(30) primary key,password varchar(30));\";\n try{\n db.execSQL(sql);\n }catch(SQLException ex){}\n }", "private static void createDatabase(String restricte...
[ "0.6197806", "0.6197397", "0.6141532", "0.6116834", "0.60394263", "0.59729975", "0.59477323", "0.5944572", "0.59317714", "0.5931252", "0.5925312", "0.59199303", "0.5903807", "0.5894398", "0.58693546", "0.58612883", "0.5795595", "0.57903767", "0.5780891", "0.5777393", "0.57753...
0.69172746
0
Process a bracketed column list as used in the declaration of SQL CONSTRAINTS and return an array containing the indexes of the columns within the table.
private int[] processColumnList(Table t, boolean acceptAscDesc) throws HsqlException { HashMappedList list = Parser.processColumnList(tokenizer, acceptAscDesc); int size = list.size(); int[] col = new int[siz...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "List<String> getColumnIdentifiers();", "public Set<String> getColumnIndices() {\n Set<String> columnIndices = new HashSet<>();\n for (String index : indices) {\n columnIndices.add(escapeIndex(index));\n }\n return columnIndices;\n }", "final public ColumnConstraint Col...
[ "0.54164755", "0.53258175", "0.5243196", "0.5216671", "0.51624453", "0.5114543", "0.50707185", "0.5066963", "0.5058717", "0.50452894", "0.5034474", "0.50254834", "0.50233626", "0.49843097", "0.49829417", "0.49829346", "0.49702352", "0.49555656", "0.49462387", "0.4936345", "0....
0.59678644
0
Responsible for handling the execution of CREATE TRIGGER SQL statements. typical sql is: CREATE TRIGGER tr1 AFTER INSERT ON tab1 CALL "pkg.cls"
private void processCreateTrigger() throws HsqlException { Table t; boolean isForEach; boolean isNowait; int queueSize; String triggerName; boolean isQuoted; String sWhen; String sOper; String tableName; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void exportToInsertSql() {\n\n if (destTableNameList.isEmpty()) {\n JOptionPane.showMessageDialog(this, \"No table is selected.\");\n return;\n }\n final StringBuilder sb = new StringBuilder();\n for (final String tableName : destTableNameList) {\n ...
[ "0.5689965", "0.56377405", "0.5614305", "0.56104326", "0.55718607", "0.5560608", "0.5480989", "0.54336274", "0.5415957", "0.5391292", "0.53592634", "0.53530157", "0.53095794", "0.53001946", "0.52223575", "0.52128536", "0.5181117", "0.5171236", "0.5163714", "0.5135803", "0.513...
0.711095
0
Responsible for handling the creation of table columns during the process of executing CREATE TABLE DDL statements.
private Column processCreateColumn(HsqlName hsqlName) throws HsqlException { boolean isIdentity = false; long identityStart = database.firstIdentity; long identityIncrement = 1; boolean isPrimaryKey = false; String typeName; int ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void processCreateTable(int type) throws HsqlException {\n\n String token = tokenizer.getName();\n HsqlName schemaname =\n session.getSchemaHsqlNameForWrite(tokenizer.getLongNameFirst());\n\n database.schemaManager.checkUserTableNotExists(session, token,\n sch...
[ "0.6835335", "0.68073565", "0.67392784", "0.66788393", "0.6662861", "0.65476555", "0.65134996", "0.6470997", "0.6470997", "0.6449337", "0.64334947", "0.64151764", "0.6395137", "0.63912284", "0.63839906", "0.6346422", "0.63247657", "0.6323965", "0.62405014", "0.6112869", "0.60...
0.6300854
18
Responsible for handling constraints section of CREATE TABLE ...
private HsqlArrayList processCreateConstraints(Table t, boolean constraint, int[] primarykeycolumn) throws HsqlException { String token; HsqlArrayList tcList; Constraint tempConst; HsqlName pkHsqlName; // fredt@users 20020225 - comment // HSQLDB relies on pri...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected abstract void defineConstraints();", "private void processCreateTable(int type) throws HsqlException {\n\n String token = tokenizer.getName();\n HsqlName schemaname =\n session.getSchemaHsqlNameForWrite(tokenizer.getLongNameFirst());\n\n database.schemaManager.checkUserT...
[ "0.70573294", "0.66636926", "0.65842336", "0.6555551", "0.6555551", "0.6523515", "0.64252156", "0.6356566", "0.6304337", "0.6220053", "0.6213203", "0.61645055", "0.6150333", "0.6112151", "0.6108215", "0.6063981", "0.605725", "0.60416925", "0.60274065", "0.6008962", "0.60023",...
0.62115
11
Responsible for handling check constraints section of CREATE TABLE ...
private void processCreateCheckConstraintCondition(Constraint c) throws HsqlException { tokenizer.getThis(Token.T_OPENBRACKET); Parser parser = new Parser(session, database, tokenizer); Expression condition = parser.parseExpression(); tokenizer.getThis(Token.T_CLOSEBRACKET)...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected abstract void defineConstraints();", "public CheckConstraints() {\n this(DSL.name(\"CHECK_CONSTRAINTS\"), null);\n }", "@Test(timeout = 4000)\n public void test053() throws Throwable {\n DBCheckConstraint dBCheckConstraint0 = new DBCheckConstraint(\"alter table\", false, \"Pg`v\", ...
[ "0.6702884", "0.66656697", "0.66343236", "0.65797436", "0.65153664", "0.64040124", "0.63875294", "0.6300861", "0.62475574", "0.62409776", "0.6188639", "0.6175364", "0.6175364", "0.60833144", "0.6046992", "0.6046479", "0.60263205", "0.6025461", "0.59904426", "0.5984985", "0.59...
0.6540362
4
Responsible for handling the execution CREATE TABLE SQL statements.
private void processCreateTable(int type) throws HsqlException { String token = tokenizer.getName(); HsqlName schemaname = session.getSchemaHsqlNameForWrite(tokenizer.getLongNameFirst()); database.schemaManager.checkUserTableNotExists(session, token, schemaname.name...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void createTables() throws SQLException\r\n {\r\n createTableMenuItems();\r\n createTableOrdersWaiting();\r\n }", "public void doCreateTable();", "private void processCreate() throws HsqlException {\n\n boolean unique = false;\n int tableType;\n boolean isTe...
[ "0.76604074", "0.7491111", "0.7372311", "0.72326", "0.7064349", "0.7035906", "0.7024731", "0.6996028", "0.6905549", "0.68769956", "0.6873564", "0.6862981", "0.68366563", "0.6829997", "0.6823054", "0.6808904", "0.67852926", "0.67636335", "0.675748", "0.67530787", "0.6749339", ...
0.74263644
2
Responsible for handling the execution CREATE VIEW SQL statements.
private void processCreateView() throws HsqlException { String name = tokenizer.getName(); HsqlName schemaname = session.getSchemaHsqlNameForWrite(tokenizer.getLongNameFirst()); int logposition = tokenizer.getPartMarker(); database.schemaManager.checkUserViewNotExists(sessi...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void createView(View view) throws SQLException {\n\t\tSQLCommand.runMetaDataCommand(m_connection, I18N.getLocalizedMessage(\"Create View\"), getCreateSQL(view));\n\t}", "public void testCreateView()\n throws Exception\n {\n String sql = \"create schema s4\";\n stmt.execute(sql);\n\...
[ "0.7094545", "0.70322615", "0.67773426", "0.66618437", "0.64642185", "0.6434826", "0.6302982", "0.620367", "0.615144", "0.61357886", "0.6079273", "0.60523367", "0.5987537", "0.58672345", "0.5784242", "0.57787", "0.5763109", "0.5756976", "0.5747637", "0.5695481", "0.565976", ...
0.83441883
0
Responsible for handling tail of ALTER TABLE ... RENAME ...
private void processAlterTableRename(Table t) throws HsqlException { String schema = t.getSchemaName(); String newName; boolean isquoted; // ensures that if temp table, it also belongs to this session /* if (!t.equals(session, name)) { throw Trace.error(Trace.TABL...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void processAlterSchemaRename() throws HsqlException {\n\n String name = tokenizer.getSimpleName();\n\n tokenizer.getThis(Token.T_RENAME);\n tokenizer.getThis(Token.T_TO);\n\n String newName = tokenizer.getSimpleName();\n boolean isQuoted = tokenizer.wasQuotedIdentifier...
[ "0.7243671", "0.69618934", "0.69596624", "0.69130564", "0.6752381", "0.6650366", "0.6340812", "0.6297209", "0.61975926", "0.61318004", "0.6103539", "0.60552764", "0.60239774", "0.58948326", "0.5890475", "0.57920367", "0.57788545", "0.5776769", "0.57285976", "0.57100815", "0.5...
0.7514227
0
Handles ALTER TABLE statements. ALTER TABLE RENAME TO ALTER INDEX RENAME TO ALTER TABLE ADD CONSTRAINT FOREIGN KEY (, ...) REFERENCE (, ...) [ON DELETE CASCADE] ALTER TABLE ADD CONSTRAINT UNIQUE (, ...)
private void processAlter() throws HsqlException { String token; session.checkAdmin(); session.checkDDLWrite(); session.setScripting(true); token = tokenizer.getSimpleToken(); switch (Token.get(token)) { case Token.INDEX : { processAlterIn...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void processAlterTable() throws HsqlException {\n\n String tableName = tokenizer.getName();\n String schema =\n session.getSchemaNameForWrite(tokenizer.getLongNameFirst());\n Table t = database.schemaManager.getUserTable(session, tableName,\n schema);\n Str...
[ "0.7208597", "0.6838767", "0.6684471", "0.6334106", "0.6317034", "0.6250686", "0.62025875", "0.59922296", "0.5932181", "0.58601344", "0.58566517", "0.5763262", "0.57547605", "0.56444657", "0.5627394", "0.56167835", "0.5605844", "0.5511097", "0.5511011", "0.54797184", "0.54686...
0.616186
7
Handles ALTER TABLE DDL.
private void processAlterTable() throws HsqlException { String tableName = tokenizer.getName(); String schema = session.getSchemaNameForWrite(tokenizer.getLongNameFirst()); Table t = database.schemaManager.getUserTable(session, tableName, schema); String token; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "final public SqlStatement AlterStatement() throws ParseException {SqlStatement st;\n jj_consume_token(ALTER);\n st = AlterTableStatement();\nreturn st;\n}", "public void parseAlterTable(StatementTree sTree) {\r\n\r\n\t}", "private void processAlter() throws HsqlException {\n\n String token;\n\n ...
[ "0.6580439", "0.64437", "0.6401567", "0.6277514", "0.62227213", "0.6100176", "0.59827775", "0.5884196", "0.58620405", "0.5812503", "0.5809683", "0.5602863", "0.55508834", "0.5464532", "0.5426716", "0.5397795", "0.5394018", "0.53937227", "0.5357297", "0.5326048", "0.53185993",...
0.7260342
0
Responsible for handling tail of ALTER COLUMN ... RENAME ...
private void processAlterColumnRename(Table t, Column column) throws HsqlException { String newName = tokenizer.getSimpleName(); boolean isquoted = tokenizer.wasQuotedIdentifier(); if (t.findColumn(newName) > -1) { throw Trace.error(Trace...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void renameColumns()\r\n {\r\n \tfor (int i=0;i<this.tempTableAColumnsShortName.size();i++)\r\n \t{\r\n \t\tthis.requete.append(\"\\n ALTER TABLE \"+this.tempTableA+\" RENAME \"+this.tempTableAColumnsShortName.get(i)+\" TO \"+this.tempTableAColumnsLongName.get(i)+\";\");\r\n \t}\r\n \t\r\...
[ "0.72435987", "0.67250407", "0.6712951", "0.65421706", "0.65089655", "0.6493188", "0.6440549", "0.6335847", "0.6277691", "0.62402004", "0.6144233", "0.60072386", "0.5905514", "0.5794649", "0.56907064", "0.5682654", "0.56791836", "0.56368536", "0.56222147", "0.5576811", "0.556...
0.7019431
1
only the one supported operation, so far
private void processAlterSchema() throws HsqlException { processAlterSchemaRename(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getOperation();", "@Override\n\tpublic String operation() {\n\t\treturn adaptee.specificOperation();\n\t}", "String getOperation();", "String getOperation();", "Operation getOperation();", "public String getOperation() {return operation;}", "public void setOperation(String op) {this.opera...
[ "0.7185728", "0.716557", "0.70675164", "0.70675164", "0.7032765", "0.69579434", "0.69161355", "0.6914628", "0.683111", "0.67112285", "0.66269785", "0.66148174", "0.65586257", "0.655611", "0.65513563", "0.6534591", "0.65204567", "0.65204567", "0.65204567", "0.6513159", "0.6497...
0.0
-1
Responsible for handling parse and execute of SQL DROP DDL
private void processDrop() throws HsqlException { String token; boolean isview; session.checkReadWrite(); session.checkAdmin(); session.setScripting(true); token = tokenizer.getSimpleToken(); isview = false; switch (Token.get(token)) { c...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "String getDropSql(String type, String name);", "@Override\n protected void doClean() throws SQLException {\n for (String dropStatement : generateDropStatements(name, \"V\", \"VIEW\")) {\n jdbcTemplate.execute(dropStatement);\n }\n\n // aliases\n for (String dropStatement...
[ "0.70579857", "0.69056004", "0.65324", "0.6481121", "0.63750136", "0.62868035", "0.6283641", "0.62159", "0.6166882", "0.6145054", "0.6101311", "0.60422", "0.5988408", "0.5984768", "0.59521973", "0.5941161", "0.5933299", "0.5930799", "0.5909437", "0.59019196", "0.5885774", "...
0.756201
0
Responsible for handling the execution of GRANT and REVOKE SQL statements.
private void processGrantOrRevoke(boolean grant) throws HsqlException { int right; Object accessKey; String token; session.checkAdmin(); session.checkDDLWrite(); session.setScripting(true); right = 0; token = tokenizer.getSimpleToken(); toke...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void processRoleGrantOrRevoke(boolean grant) throws HsqlException {\n\n String token;\n HsqlArrayList list = new HsqlArrayList();\n String role;\n GranteeManager granteeManager = database.getGranteeManager();\n\n do {\n role = tokenizer.getSimp...
[ "0.6522404", "0.64051175", "0.61571753", "0.5934117", "0.572468", "0.572468", "0.571931", "0.5521105", "0.5498647", "0.5414987", "0.53963387", "0.5395089", "0.5395089", "0.53746563", "0.5372459", "0.53512704", "0.53488153", "0.53391296", "0.5330202", "0.5296074", "0.5286485",...
0.6918237
0
Responsible for handling CONNECT
private void processConnect() throws HsqlException { String userName; String password; User user; tokenizer.getThis(Token.T_USER); userName = getUserIdentifier(); if (tokenizer.isGetThis(Token.T_PASSWORD)) { // legacy log statement or connect statement ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void connect() {}", "protected abstract void onConnect();", "protected void onConnect() {}", "@Override\n\tpublic void connect() {\n\t\t\n\t}", "@Override\n\tpublic void connect() {\n\t\t\n\t}", "public void connecting() {\n\n }", "public abstract void onConnect();", "protected void connect...
[ "0.7477287", "0.7351558", "0.72755307", "0.7177487", "0.7177487", "0.711421", "0.71033067", "0.70873976", "0.7078613", "0.7070999", "0.7056273", "0.7011853", "0.7011853", "0.7011853", "0.70101386", "0.69118094", "0.6762923", "0.6757045", "0.66946787", "0.6685175", "0.65962887...
0.0
-1
Responsible for handling the execution of SET SQL statements
private void processSet() throws HsqlException { String token; session.setScripting(true); token = tokenizer.getSimpleToken(); switch (Token.get(token)) { case Token.PROPERTY : { HsqlDatabaseProperties p; session.checkAdmin(); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void setValues(PreparedStatement ps) throws SQLException;", "public JSObject execSet(JSArray set) throws Exception {\n JSObject retObj = new JSObject();\n // Open the database for writing\n SQLiteDatabase db = null;\n long lastId = Long.valueOf(-1);\n int changes = 0;\n ...
[ "0.6487283", "0.63656414", "0.63546133", "0.6233702", "0.6229888", "0.6185722", "0.6170511", "0.5998795", "0.5927963", "0.5926636", "0.5926137", "0.58216584", "0.5819838", "0.5819468", "0.5810963", "0.58089787", "0.57919884", "0.57886297", "0.57865447", "0.5678986", "0.564541...
0.71020806
0
Retrieves boolean value corresponding to the next token.
private boolean processTrueOrFalse() throws HsqlException { String sToken = tokenizer.getSimpleToken(); if (sToken.equals(Token.T_TRUE)) { return true; } else if (sToken.equals(Token.T_FALSE)) { return false; } else { throw Trace.error(Trace.UNEXPECT...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean nextBoolean() {\n this.inputStr = this.s.nextLine();\n\n if (inputStr.toLowerCase().contains(\"true\")) {\n return true;\n } else if (inputStr.toLowerCase().contains(\"false\")) {\n return false;\n } else if (inputStr.toLowerCase().contains(\"t\") ||...
[ "0.71831846", "0.6875367", "0.6826249", "0.670872", "0.66969013", "0.66969013", "0.66969013", "0.66969013", "0.66969013", "0.66969013", "0.6691588", "0.66905415", "0.6594636", "0.65731084", "0.6527043", "0.63945824", "0.6390775", "0.6303623", "0.6303623", "0.6230548", "0.6170...
0.6121777
22
Responsible for handling the execution of COMMIT [WORK]
private void processCommit() throws HsqlException { tokenizer.isGetThis(Token.T_WORK); session.commit(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void commit() {\n }", "public void commit() {\n }", "@Override\n\tpublic void commit() {\n\n\t}", "void commit();", "void commit();", "@Override\n public void commit() {\n }", "protected void post_commit_hook() { }", "public void commit() {\n doCommit();\n }", "public abstract void ...
[ "0.7157803", "0.6987831", "0.6966347", "0.6956031", "0.6956031", "0.69268847", "0.69224596", "0.6908965", "0.68975765", "0.6827728", "0.6816719", "0.6780981", "0.670908", "0.6649707", "0.66259396", "0.66220784", "0.65776515", "0.65660906", "0.65503675", "0.6550018", "0.642434...
0.78846633
0
Responsible for handling the execution of ROLLBACK SQL statements.
private void processRollback() throws HsqlException { String token; boolean toSavepoint; token = tokenizer.getSimpleToken(); toSavepoint = false; if (token.equals(Token.T_WORK)) { // do nothing } else if (token.equals(Token.T_TO)) { toke...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void rollBack();", "@Override\r\n\t\tpublic void rollback() throws SQLException {\n\t\t\t\r\n\t\t}", "private void rollBackJMS() throws JMSException {\n\t\t session.rollback();\n\t\t log(\"JMS session rolled back ...., commit counter: \" + commitCounter);\n\n\t }", "private void rollBackAll() {\...
[ "0.7558348", "0.7321203", "0.73105234", "0.7186935", "0.7136271", "0.71214503", "0.7090257", "0.69896406", "0.68036354", "0.6781002", "0.6767891", "0.66904366", "0.6683306", "0.6683306", "0.6629184", "0.66011924", "0.65609396", "0.6546741", "0.6444388", "0.6423986", "0.640347...
0.74389035
1
Responsible for handling the execution of SAVEPOINT SQL statements.
private void processSavepoint() throws HsqlException { String token; token = tokenizer.getSimpleName(); session.savepoint(token); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void executeSchemaOperations() {\n }", "private void processRollback() throws HsqlException {\n\n String token;\n boolean toSavepoint;\n\n token = tokenizer.getSimpleToken();\n toSavepoint = false;\n\n if (token.equals(Token.T_WORK)) {\n\n // do...
[ "0.5797388", "0.5765681", "0.5762483", "0.5736602", "0.5716919", "0.56580245", "0.56393063", "0.5468717", "0.5435418", "0.54318255", "0.5419083", "0.54180515", "0.5404253", "0.54039437", "0.5397253", "0.53936607", "0.53833926", "0.53806126", "0.53743005", "0.532712", "0.53072...
0.6734513
0
Responsible for handling the execution of SHUTDOWN SQL statements
private void processShutdown() throws HsqlException { int closemode; String token; // HUH? We should *NEVER* be able to get here if session is closed if (!session.isClosed()) { session.checkAdmin(); } closemode = Database.CLOSEMODE_NORMAL; token...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void shutdown() throws SQLException;", "public void shutdown() {\r\n \t\tMsg.debugMsg(DB_REGULAR.class, \"Database is shutting down\");\r\n \t\tStatement st;\r\n \t\ttry {\r\n \t\t\tst = conn.createStatement();\r\n \t\t\tst.execute(\"SHUTDOWN\");\r\n \t\t} catch (SQLException e) {\r\n \t\t\te.printStackTrace();\...
[ "0.71996856", "0.71348244", "0.6976536", "0.64987314", "0.64599955", "0.62277466", "0.6107719", "0.60787565", "0.60314196", "0.5988677", "0.5968193", "0.59493494", "0.5919011", "0.5918587", "0.5895517", "0.58878607", "0.5884675", "0.5884675", "0.5884675", "0.5884675", "0.5880...
0.72757643
0
Responsible for handling CHECKPOINT [DEFRAG].
private void processCheckpoint() throws HsqlException { boolean defrag; String token; session.checkAdmin(); session.checkDDLWrite(); defrag = false; token = tokenizer.getSimpleToken(); if (token.equals(Token.T_DEFRAG)) { defrag = true; } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void method_2145() {\r\n // $FF: Couldn't be decompiled\r\n }", "private void method_7082(class_1293 param1) {\r\n // $FF: Couldn't be decompiled\r\n }", "private void method_7083() {\r\n // $FF: Couldn't be decompiled\r\n }", "protected void method_2241() {\r\n // $FF: Co...
[ "0.53205353", "0.5270065", "0.5256754", "0.5172728", "0.51538366", "0.5136426", "0.51193255", "0.5010282", "0.50020826", "0.5001194", "0.49842897", "0.49612433", "0.49608532", "0.4946581", "0.49266753", "0.49125507", "0.49115092", "0.49023145", "0.49023145", "0.48452553", "0....
0.57991964
0
new methods / simplifications
private HsqlName newIndexHsqlName(String name, boolean isQuoted) throws HsqlException { return HsqlName.isReservedName(name) ? database.nameManager.newAutoName("USER", name) : database.nameManager.newHsqlName(name, isQuoted); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}", "protected abstract Set method_1559();", "@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n protected void getExras() {\n }", "@Override\n\tprotected void getExras() {\n...
[ "0.6192596", "0.6156955", "0.5878624", "0.58033967", "0.5797093", "0.5793679", "0.5772691", "0.5763611", "0.5761536", "0.5715133", "0.5696243", "0.56957793", "0.56880206", "0.56880206", "0.5674256", "0.5670573", "0.5659846", "0.5629549", "0.5621251", "0.5620544", "0.56165123"...
0.0
-1
Checks if the attributes of the Column argument, c, are compatible with the operation of adding such a Column to the Table argument, t.
private void checkAddColumn(Table t, Column c) throws HsqlException { boolean canAdd = true; if (t.findColumn(c.columnName.name) != -1) { throw Trace.error(Trace.COLUMN_ALREADY_EXISTS, c.columnName.name); } if (c.isPrimaryKey() && t.hasPrimaryKey()) { canAdd = ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean supportsColumnCheck() {\n \t\treturn true;\n \t}", "private boolean checkTypes(Table thisTable, Hashtable<String, Object> inputColNameValue) throws BPlusEngineException {\n Enumeration<String> colNameValue = inputColNameValue.keys();\n Hashtable<String, String> tableColNameType = thi...
[ "0.59223706", "0.5842256", "0.5674517", "0.5657617", "0.5541641", "0.542915", "0.5409904", "0.53883165", "0.5381487", "0.5340282", "0.5312344", "0.52825755", "0.52366096", "0.5234849", "0.51498646", "0.5147044", "0.5111181", "0.5086946", "0.5064036", "0.50475454", "0.5047086"...
0.73768073
0
Handles ALTER INDEX RENAME.
private void processAlterIndexRename() throws HsqlException { String name = tokenizer.getName(); String schema = session.getSchemaNameForWrite(tokenizer.getLongNameFirst()); tokenizer.getThis(Token.T_RENAME); tokenizer.getThis(Token.T_TO); String newName = tokeni...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void processAlterSchemaRename() throws HsqlException {\n\n String name = tokenizer.getSimpleName();\n\n tokenizer.getThis(Token.T_RENAME);\n tokenizer.getThis(Token.T_TO);\n\n String newName = tokenizer.getSimpleName();\n boolean isQuoted = tokenizer.wasQuotedIdentifier...
[ "0.61843526", "0.5885547", "0.58654827", "0.58654827", "0.57517964", "0.57420033", "0.5665829", "0.56353146", "0.56212175", "0.553195", "0.5521249", "0.5516079", "0.5461044", "0.54168814", "0.53570205", "0.5349707", "0.5343977", "0.5278342", "0.5271467", "0.5237274", "0.52209...
0.82272977
0
Handles ALTER SCHEMA ... RENAME TO .
private void processAlterSchemaRename() throws HsqlException { String name = tokenizer.getSimpleName(); tokenizer.getThis(Token.T_RENAME); tokenizer.getThis(Token.T_TO); String newName = tokenizer.getSimpleName(); boolean isQuoted = tokenizer.wasQuotedIdentifier(); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void processAlterSchema() throws HsqlException {\n processAlterSchemaRename();\n }", "@Override\n public boolean rollbackSMO() {\n String alterTableString = \"ALTER TABLE %s RENAME TO %s;\";\n String cmdString = String.format(alterTableString, toName, fromName);\n try {\n Stateme...
[ "0.72041786", "0.6706592", "0.66741735", "0.6643106", "0.6457457", "0.6242741", "0.5778228", "0.563659", "0.55439126", "0.55293554", "0.55009305", "0.5497684", "0.5484116", "0.54622877", "0.54565305", "0.54489404", "0.5445845", "0.54351753", "0.5403166", "0.53942627", "0.5345...
0.7565016
0
Responsible for handling tail of ALTER TABLE ... DROP COLUMN ...
private void processAlterTableDropColumn(Table t) throws HsqlException { String token; int colindex; token = tokenizer.getName(); colindex = t.getColumnNr(token); session.commit(); TableWorks tableWorks = new TableWorks(session, t); tableWorks.dropColum...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test(enabled = false)\n public void testAlterTableDropColumn() throws Exception {\n String tableName = createTable();\n String colDropped = \"id\";\n String query = \"alter table \" + tableName + \" replace columns (name string)\";\n\n runCommand(query);\n\n assertColum...
[ "0.77010965", "0.70799774", "0.702593", "0.7019297", "0.6949046", "0.6682024", "0.6618382", "0.65549475", "0.6465907", "0.6453149", "0.6340278", "0.6332248", "0.6319156", "0.62587494", "0.61746556", "0.6169708", "0.61128044", "0.6092572", "0.6013859", "0.59733236", "0.5849992...
0.7882176
0
Responsible for handling tail of ALTER TABLE ... DROP CONSTRAINT ...
private void processAlterTableDropConstraint(Table t) throws HsqlException { processAlterTableDropConstraint(t, tokenizer.getName()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void processAlterTableDropConstraint(Table t,\n String cname) throws HsqlException {\n\n session.commit();\n\n TableWorks tableWorks = new TableWorks(session, t);\n\n tableWorks.dropConstraint(cname);\n\n return;\n }", "public void removetable(Connection connecti...
[ "0.8024008", "0.65260226", "0.62872434", "0.62781876", "0.6209023", "0.6202583", "0.61975175", "0.6159518", "0.61295277", "0.61015564", "0.6071047", "0.6065231", "0.6061001", "0.6002855", "0.5947537", "0.5924294", "0.5866836", "0.5864622", "0.5828306", "0.5822874", "0.5800746...
0.7975085
1
Responsible for handling tail of ALTER TABLE ... DROP CONSTRAINT ...
private void processAlterTableDropConstraint(Table t, String cname) throws HsqlException { session.commit(); TableWorks tableWorks = new TableWorks(session, t); tableWorks.dropConstraint(cname); return; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void processAlterTableDropConstraint(Table t)\n throws HsqlException {\n processAlterTableDropConstraint(t, tokenizer.getName());\n }", "public void removetable(Connection connection) throws SQLException\n {\n\tStringBuffer sbremove = new StringBuffer();\n\tsbremove.append(\" DROP TABLE C...
[ "0.79744893", "0.6526515", "0.6287016", "0.627802", "0.62074506", "0.6203175", "0.6197862", "0.6160933", "0.6128601", "0.61014134", "0.60703385", "0.606462", "0.6061533", "0.60011697", "0.59458333", "0.59238833", "0.5866487", "0.58644235", "0.5827442", "0.5822025", "0.5800829...
0.8023923
0
If an invalid alias is encountered while processing an old script, simply discard it.
private void processCreateAlias() throws HsqlException { String alias; String methodFQN; try { alias = tokenizer.getSimpleName(); } catch (HsqlException e) { if (session.isProcessingScript()) { alias = null; } else { t...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static String cleanAlias(String alias) {\r\n char[] chars = alias.toCharArray();\r\n\r\n // short cut check...\r\n if (!Character.isLetter(chars[0])) {\r\n for (int i = 1; i < chars.length; i++) {\r\n // as soon as we encounter our first letter, return the sub...
[ "0.57287204", "0.53534627", "0.52299535", "0.5138847", "0.512217", "0.49855706", "0.49667144", "0.4960432", "0.4960432", "0.4950715", "0.4888956", "0.4881261", "0.48456642", "0.47851774", "0.47687945", "0.47622633", "0.47606242", "0.47568926", "0.47445515", "0.4705397", "0.47...
0.43986505
51
limitations in Tokenizer dictate that initial value or increment must be positive
private void processCreateSequence() throws HsqlException { /* CREATE SEQUENCE <name> [AS {INTEGER | BIGINT}] [START WITH <value>] [INCREMENT BY <value>] */ int type = Types.INTEGER; long increment = 1; long start = 0; String name ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic boolean increment() throws TokenizerException {\n\t\t\n\t\t StringBuffer res = new StringBuffer();\n\n\t\t\tToken current_token=t_stream.next();\n\t\t\tif(current_token==null)\n\t\t\t\treturn false;\n\t\t\tString str=current_token.getTermText();\n\t\t\tchar [] buf=current_token.getTermBuffer();...
[ "0.64425474", "0.601358", "0.5921804", "0.58440834", "0.5826574", "0.57147074", "0.56888413", "0.5666073", "0.5658681", "0.56364757", "0.56336975", "0.56332755", "0.56239116", "0.5616655", "0.56163776", "0.56097513", "0.5552951", "0.55205", "0.55120814", "0.550452", "0.548445...
0.0
-1
CREATE SCHEMA PUBLIC in scripts should pass this, so we do not throw if this schema is created a second time
private void processCreateSchema() throws HsqlException { String name = tokenizer.getSimpleName(); boolean isquoted = tokenizer.wasQuotedIdentifier(); if (session.isSchemaDefintion()) { throw Trace.error(Trace.INVALID_IDENTIFIER); } tokenizer.getThis(Token.T_A...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Schema createSchema();", "public void createNewSchema() throws SQLException {\n ResultSet resultSet = databaseStatement.executeQuery(\"select count(datname) from pg_database\");\n int uniqueID = 0;\n if(resultSet.next()) {\n uniqueID = resultSet.getInt(1);\n }\n if(u...
[ "0.7491512", "0.7108822", "0.67236984", "0.6650726", "0.64041555", "0.6210577", "0.61830324", "0.61480874", "0.60002077", "0.59962106", "0.58559424", "0.5841426", "0.5841426", "0.5751447", "0.5721507", "0.57083595", "0.57070845", "0.5669904", "0.5643258", "0.56238914", "0.560...
0.69686466
2
PRE: we assume only one DML or DQL has been submitted and simply ignore anything following the first sucessfully compliled statement
private Result processExplainPlan() throws IOException, HsqlException { String token; Parser parser; int cmd; CompiledStatement cs; Result result; String line; LineNumberReader lnr; tokenizer.getT...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void prepareExecuteNoSelect() {\n setCallFromStatement();\n // The statement is no longer require so can be released.\n clearStatement();\n\n super.prepareExecuteNoSelect();\n }", "private void processCommit() throws HsqlException {\n tokenizer.isGetThis(Token.T_WORK)...
[ "0.63520825", "0.5786075", "0.5749769", "0.569161", "0.5685558", "0.56641996", "0.56490743", "0.56487197", "0.5644287", "0.56145996", "0.5593857", "0.5589866", "0.5579622", "0.5577352", "0.5559373", "0.55540925", "0.5540742", "0.55357933", "0.55226845", "0.55142295", "0.55100...
0.0
-1
Processes a SELECT INTO for a new table.
Result processSelectInto(Result result, HsqlName intoHsqlName, int intoType) throws HsqlException { // fredt@users 20020215 - patch 497872 by Nitin Chauhan // to require column labels in SELECT INTO TABLE int colCount = result.getColumnCount(); for (int i =...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void processCreate() throws HsqlException {\n\n boolean unique = false;\n int tableType;\n boolean isTempTable = false;\n String token;\n\n session.checkAdmin();\n session.checkDDLWrite();\n session.setScripting(true);\n\n if (tokenizer.isGetThis...
[ "0.57762975", "0.5551534", "0.5535768", "0.5347774", "0.5313545", "0.5207816", "0.51788694", "0.5107868", "0.50811386", "0.5044978", "0.49706736", "0.4969745", "0.49378508", "0.4902405", "0.4877091", "0.48075435", "0.4802065", "0.478889", "0.47705084", "0.47693688", "0.474798...
0.7884169
0
Logs the DDL for a table created with INTO. Uses two dummy arguments for getTableDDL() as the new table has no FK constraints.
private void logTableDDL(Table t) throws HsqlException { StringBuffer tableDDL; String sourceDDL; tableDDL = new StringBuffer(); DatabaseScript.getTableDDL(database, t, 0, null, true, tableDDL); sourceDDL = DatabaseScript.getDataSource(t); database.logger.write...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void exportToInsertSql() {\n\n if (destTableNameList.isEmpty()) {\n JOptionPane.showMessageDialog(this, \"No table is selected.\");\n return;\n }\n final StringBuilder sb = new StringBuilder();\n for (final String tableName : destTableNameList) {\n ...
[ "0.60217637", "0.5989113", "0.595234", "0.5950614", "0.59498805", "0.5767494", "0.5757196", "0.55359596", "0.5533541", "0.5490904", "0.5470374", "0.54337645", "0.54197073", "0.53905034", "0.5371836", "0.536009", "0.53470534", "0.53387314", "0.53349864", "0.5312292", "0.529848...
0.7632592
0
Responsible for handling the execution of GRANT/REVOKE role... statements.
private void processRoleGrantOrRevoke(boolean grant) throws HsqlException { String token; HsqlArrayList list = new HsqlArrayList(); String role; GranteeManager granteeManager = database.getGranteeManager(); do { role = tokenizer.getSimpleToken(); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void processGrantOrRevoke(boolean grant) throws HsqlException {\n\n int right;\n Object accessKey;\n String token;\n\n session.checkAdmin();\n session.checkDDLWrite();\n session.setScripting(true);\n\n right = 0;\n token = tokenizer.getSimpleToken(...
[ "0.6664335", "0.62860775", "0.6061269", "0.5978935", "0.5936847", "0.59173876", "0.58358616", "0.58358616", "0.5833293", "0.58114564", "0.57923925", "0.57342", "0.57342", "0.5721369", "0.5721369", "0.57027185", "0.5684329", "0.5675823", "0.5609652", "0.55883044", "0.55465746"...
0.701012
0
Created by denail on 17/08/28.
public interface AntrianSendAPI { String URL_FILE = "/response_place.php"; @FormUrlEncoded @POST(URL_FILE) void reserve( @Field("api_key") String apiKey, @Field("antrian_numb") Integer antrianNumb, @Field("antrian_code") String antrianCode, @Field("user_t...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "private stendhal() {\n\t}", "public final void mo51373a() {\n }", "@Override\n public void func_104112_b() {\n \n }", "@Overri...
[ "0.603132", "0.5896938", "0.58361137", "0.5831666", "0.5801012", "0.575431", "0.5747322", "0.5747322", "0.5691553", "0.5690157", "0.5677893", "0.56746674", "0.567427", "0.5673118", "0.56599265", "0.5652207", "0.5631945", "0.56305164", "0.5628346", "0.5620597", "0.5604972", ...
0.0
-1
Toast.makeText(InspectTaskList.this, "id = " + position, Toast.LENGTH_SHORT).show();
@Override public void onItemClick(AdapterView<?> parent, View view, int position, long id) { int relpos = position - 1; Intent intent = new Intent(); intent.setClass(InspectTaskList.this, InspectTaskDetail.class); // getEntity i...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onClick(View v) {\n Toast.makeText(RecycleTestActivity.this, pos + \"\", Toast.LENGTH_SHORT)\n .show();\n }", "@Override\n public void onClick(View v) {\n Toast.ma...
[ "0.7289885", "0.6999027", "0.69795495", "0.69665456", "0.6850214", "0.6845477", "0.67818946", "0.66957366", "0.6655642", "0.6626337", "0.66104174", "0.65772116", "0.6555764", "0.65308523", "0.65240836", "0.65236664", "0.6513842", "0.6504488", "0.64863425", "0.64605063", "0.64...
0.66737133
8
orderId is an alias to additionalProjectName
public String getOrderId() { return additionalProjectName; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "String getOrderId();", "String getOrderStatusId();", "public Order(int _orderId){\n this.orderId = _orderId;\n }", "Order placeNewOrder(Order order, Project project, User user);", "public void setOrderId(int value) {\n this.orderId = value;\n }", "com.google.protobuf.StringValue getOr...
[ "0.62344646", "0.5775928", "0.57616717", "0.5726632", "0.56805164", "0.5671165", "0.5631789", "0.5631789", "0.5578257", "0.5578257", "0.55680627", "0.5486919", "0.53977484", "0.5356404", "0.5349317", "0.5337475", "0.53346115", "0.53346115", "0.53346115", "0.5328824", "0.52941...
0.76138765
0
Interval after which check for internet and database sync is done
@Override public void initialize(URL arg0, ResourceBundle arg1) { theController = Controller.getInstance(); /* * Checks for internet after a certain interval and modifies UI accordingly */ timer = new Timer(); timer.schedule(new TimerTask() { @Override public void run() { Platform.r...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Scheduled(fixedDelay = 10000)\n\tpublic void verificaConexao() {\n\t\tverificaConexao(internet);\n\t\tverificaConexao(vpn);\n\t}", "public void fullSync() {\n if (checkboxRepository.findOne(1).isCheckboxState()) {\n now = LocalDateTime.now();\n\n logger.info(\"De sync start\");\n ...
[ "0.6147184", "0.5911621", "0.573715", "0.5713403", "0.5701666", "0.5680038", "0.5637244", "0.5628316", "0.56199807", "0.55965483", "0.55707216", "0.55704176", "0.5565108", "0.55522996", "0.5547536", "0.5541669", "0.5539373", "0.5535828", "0.55301964", "0.55262625", "0.5478362...
0.0
-1
Handles login button on homescreen
@FXML public void handleLoginButton() throws IOException{ String username = tfUsernameLogin.getText(); String password = pfPasswordLogin.getText(); userCred = theController.isValidUser(username, password); if(userCred.equals("manager")){ loginSuccess = true; consoleScreen.setDisable(false); ac...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@FXML\n\tprivate void handleLogin() {\n\t \n\t\t\t\ttry {\n\t\t\t\t\tmain.showHomePageOverview(username.getText(),password.getText());\n\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\n\t}", "public void login() {\n present...
[ "0.78140527", "0.75123394", "0.7437678", "0.74050957", "0.7380213", "0.73209023", "0.7316257", "0.7270287", "0.7194055", "0.7178548", "0.71675617", "0.71674216", "0.7133675", "0.7091812", "0.7075397", "0.7071703", "0.70534825", "0.69867367", "0.69833654", "0.6977981", "0.6968...
0.7171626
10
handles console button on top pane
@FXML private void handleConsoleButton() throws IOException{ AnchorPane cmdPane = (AnchorPane) FXMLLoader.load(getClass().getResource("/guiFXML/ConsoleScreenFXML.fxml")); try { anchCmdController.getChildren().clear(); anchCmdController.getChildren().add(cmdPane); } catch (Exception e) { e.printSt...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void okButtonActionPerformed() {\n\n saveConsoleText(consoleTextArea);\n\n setVisible(false);\n\n if (mainFrame == null && !isBasicUI) {\n System.exit(0);\n }\n }", "public void setupButton() {\n\t\tHBox buttonPane = new HBox();\n\t\tbuttonPane.setPrefHeight(20);...
[ "0.6710121", "0.6343089", "0.633518", "0.62656564", "0.59811616", "0.590931", "0.59074134", "0.58963615", "0.58717185", "0.5865475", "0.58493155", "0.58372134", "0.5822317", "0.58148354", "0.5814512", "0.578752", "0.57803863", "0.5766283", "0.57605183", "0.57498837", "0.57271...
0.7171504
0
handles Action Items button on top pane
@FXML private void handleActionItemsButton() throws IOException{ AnchorPane cmdPane = (AnchorPane) FXMLLoader.load(getClass().getResource("/guiFXML/ActionItemsFXML.fxml")); try { anchCmdController.getChildren().clear(); anchCmdController.getChildren().add(cmdPane); } catch (Exception e) { e.print...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void handleUpdateItemButtonAction(ActionEvent event) {\n //delete all panes on actionHolderPane and add the updateItemPane\n setAllChildrenInvisible();\n updateItemPane.setVisible(true);\n this.handleOnShowAnimation(actionHolderPane);\n }", "@Override\n public boolean onA...
[ "0.6519673", "0.6484782", "0.6420812", "0.63419354", "0.6298199", "0.62694705", "0.6240422", "0.6120102", "0.6102417", "0.60721976", "0.6065557", "0.60247743", "0.602438", "0.6016078", "0.6009824", "0.6009824", "0.6009824", "0.6009824", "0.60078526", "0.59760624", "0.59700286...
0.70410466
0
handles Members button on top pane
@FXML private void handleMemberScreenButton() throws IOException{ AnchorPane cmdPane = (AnchorPane) FXMLLoader.load(getClass().getResource("/guiFXML/MemberScreenFXML.fxml")); try { anchCmdController.getChildren().clear(); anchCmdController.getChildren().add(cmdPane); } catch (Exception e) { e.pri...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void onMembersClick();", "@Override\n\tpublic void mouseClicked(MouseEvent m) {\n\t\tArrayList<FriendAccount> al;\n\t\ttry{\n\t\t\tJLabel l = (JLabel) m.getSource();\n\t\t\tif(l.getText().equals(\"Sign up\")){\n\t\t\t\tframe1.dispose();\n\t\t\t\t/*frame2.add(p,BorderLayout.CENTER);\n\t\t\t\tframe2.add(p_south,Bo...
[ "0.76205343", "0.6165983", "0.61624175", "0.6114157", "0.6084835", "0.604874", "0.60305774", "0.59994584", "0.59824586", "0.5969727", "0.5954857", "0.5907166", "0.5901876", "0.58878994", "0.5880758", "0.5844309", "0.5844249", "0.5834611", "0.5767547", "0.57494736", "0.5742386...
0.6397233
1
handles Teams button on top pane
@FXML private void handleTeamScreenButton() throws IOException{ AnchorPane cmdPane = (AnchorPane) FXMLLoader.load(getClass().getResource("/guiFXML/TeamScreenFXML.fxml")); try { anchCmdController.getChildren().clear(); anchCmdController.getChildren().add(cmdPane); } catch (Exception e) { e.printSt...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void open(Plugin plugin, SpoutPlayer splayer) {\n\n GenericPopup popup = new GenericPopup();\n int width = splayer.getMainScreen().getMaxWidth();\n int height = splayer.getMainScreen().getMaxHeight();\n pluginLeg.log(\"aight\" + width + \"\" + height);\n\n// int width = sp...
[ "0.59930164", "0.5908551", "0.5879518", "0.58721125", "0.5845119", "0.5808531", "0.5763012", "0.57577646", "0.5756834", "0.57542205", "0.5752558", "0.5748092", "0.5709677", "0.56830096", "0.56643206", "0.56461895", "0.5639467", "0.56188256", "0.5615427", "0.5604958", "0.56043...
0.6147133
0
handles Quit button on top pane
@FXML private void handleQuitButton(){ timer.cancel(); System.exit(0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void clickedQuitButton(Button button) {\r\n System.exit(0);\r\n }", "private void quitButtonActionPerformed(ActionEvent evt) {\r\n\t\tlogger.info(\"Quit button Clicked.\");\r\n\t\tSystem.exit(0);\r\n\t}", "public void quit()\r\n {\r\n brokerage.logout(this);\r\n myWindow = nul...
[ "0.730875", "0.703633", "0.7006236", "0.6990392", "0.6983739", "0.6895671", "0.68916863", "0.68729436", "0.6850268", "0.68429077", "0.68379056", "0.68258005", "0.6806987", "0.6790444", "0.67822397", "0.6774663", "0.6765839", "0.67442185", "0.67238", "0.6718529", "0.66788703",...
0.6647
24
Gets the value of the isExtentExpiration property.
public boolean isIsExtentExpiration() { return isExtentExpiration; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setIsExtentExpiration(boolean value) {\n this.isExtentExpiration = value;\n }", "@Range(min = 0)\n\t@NotNull\n\tpublic Integer getExpiration() {\n\t\treturn this.expiration;\n\t}", "public long getExpiration() {\n return expiration;\n }", "public String getExpi...
[ "0.7343451", "0.6844912", "0.6763103", "0.6515478", "0.63143605", "0.62964284", "0.62639827", "0.62522584", "0.6215", "0.62021476", "0.6191914", "0.6185691", "0.6145318", "0.6119516", "0.60704833", "0.60157824", "0.60108024", "0.60024595", "0.6001979", "0.5998231", "0.599721"...
0.86732703
0
Sets the value of the isExtentExpiration property.
public void setIsExtentExpiration(boolean value) { this.isExtentExpiration = value; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean isIsExtentExpiration() {\n return isExtentExpiration;\n }", "public void setExpiration(long expiration) {\n this.expiration = expiration;\n }", "@Override\n public final void setExpiration(double expirationTime) {\n safetyHelper.setExpiration(expirat...
[ "0.73740613", "0.65701985", "0.624167", "0.6182795", "0.59737223", "0.59529495", "0.5918992", "0.5916451", "0.5888197", "0.58652705", "0.58558583", "0.5851475", "0.5726039", "0.5723361", "0.5723361", "0.57185674", "0.57137907", "0.56956756", "0.5540433", "0.5439961", "0.54060...
0.84888387
0
C.Reg01 A user should be able to register an account
@Test public void testUserCanBeRegistered() { assert username.length() > 3 && username.length() < 16; registerUser(username, password); assertNotNull(userService.getUser(username)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void registerUser()\n {\n /*AuthService.createAccount takes a Consumer<Boolean> where the result will be true if the user successfully logged in, or false otherwise*/\n authService.createAccount(entryService.extractText(namedFields), result -> {\n if (result.isEmpty()) {\n ...
[ "0.71409833", "0.69534", "0.6862058", "0.6838682", "0.6718808", "0.67148364", "0.67103773", "0.6708008", "0.66862935", "0.6678905", "0.6671979", "0.665198", "0.6641986", "0.65748066", "0.6569741", "0.6562508", "0.6548064", "0.6541623", "0.65411013", "0.6531313", "0.65008646",...
0.6179461
54
C.Reg02 A username should be between 3 and 16 characters, exclusive
@Test public void testInvalidUsernameLessThan4Characters() { username = username.substring(0, 3); assert username.length() <= 3; registerUser(username, password); assertNull(userService.getUser(username)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static Boolean testUsername(String username){\n\t\t//Setting Up Regex -> All Numbers and Letters maximum 14 signs\n\t\tString pattern =\"[A-z1-9]{2,14}\";\n\t\tPattern p = Pattern.compile(pattern);\n\t\tMatcher m = p.matcher(username);\n\t\t\t\n\t\tif(m.matches() && !username.isEmpty()){\n\t\t\treturn true...
[ "0.75347954", "0.74259114", "0.6924497", "0.6840333", "0.68158424", "0.6772046", "0.6690559", "0.66662186", "0.6600451", "0.6554866", "0.6454555", "0.6411326", "0.63876253", "0.63761866", "0.6354821", "0.63540035", "0.6323", "0.62660897", "0.62660897", "0.62660897", "0.626608...
0.689634
3
C.Reg02 A username should be between 3 and 16 characters, exclusive
@Test public void testInvalidUsernameGreaterThan15Characters() { username = UUID.randomUUID().toString(); assert username.length() >= 16; registerUser(username, password); assertNull(userService.getUser(username)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static Boolean testUsername(String username){\n\t\t//Setting Up Regex -> All Numbers and Letters maximum 14 signs\n\t\tString pattern =\"[A-z1-9]{2,14}\";\n\t\tPattern p = Pattern.compile(pattern);\n\t\tMatcher m = p.matcher(username);\n\t\t\t\n\t\tif(m.matches() && !username.isEmpty()){\n\t\t\treturn true...
[ "0.75347954", "0.74259114", "0.6924497", "0.689634", "0.6840333", "0.68158424", "0.6772046", "0.66662186", "0.6600451", "0.6554866", "0.6454555", "0.6411326", "0.63876253", "0.63761866", "0.6354821", "0.63540035", "0.6323", "0.62660897", "0.62660897", "0.62660897", "0.6266089...
0.6690559
7
C.Reg03 A password must match in two field inputs
@Test public void testNonMatchingPasswords() { registerUser(username, password, password + password, email, email, forename, surname, null); assertNull(userService.getUser(username)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean hasPassword2();", "void validatePassword(String usid, String password) throws Exception;", "boolean isMatchPassword(Password toCheck) throws NoUserSelectedException;", "@Override\r\n\tpublic boolean validatePassword(String arg0, String arg1) {\n\t\treturn false;\r\n\t}", "@Test(priority=1)\n\tpubli...
[ "0.7366613", "0.73289055", "0.71838146", "0.7166625", "0.70707333", "0.70215786", "0.6923852", "0.69114727", "0.6833324", "0.67865086", "0.677441", "0.67733365", "0.6754499", "0.6754499", "0.6754499", "0.6754499", "0.6754499", "0.6754499", "0.6754499", "0.6754499", "0.6750808...
0.0
-1
C.Reg04 A password must contain numbers and letters
@Test public void testPasswordHasNumbersAndLetters() { registerUser(username, "123456789"); assertNull(userService.getUser(username)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void validatePassword(){\n //Only Checking For Word Type Password With Minimum Of 8 Digits, At Least One Capital Letter,At Least One Number,At Least One Special Character\n Boolean password = Pattern.matches(\"^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9](?=.*[!@#$%^&*()])).{8,}$\",getPassword());\n ...
[ "0.7780907", "0.74977803", "0.73996013", "0.72572243", "0.72572243", "0.72572243", "0.7239375", "0.7194309", "0.7105534", "0.7084797", "0.7075482", "0.7071356", "0.7064201", "0.7064201", "0.7041576", "0.7037647", "0.703462", "0.70134395", "0.6997778", "0.6997778", "0.6997778"...
0.0
-1
C.Reg05 A password must be greater than 7 characters
@Test public void testPasswordGreaterThan7Characters() { password = "123456a"; assert password.length() <= 7; registerUser(username, password); assertNull(userService.getUser(username)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void validatePassword(){\n //Only Checking For Word Type Password With Minimum Of 8 Digits, At Least One Capital Letter,At Least One Number,At Least One Special Character\n Boolean password = Pattern.matches(\"^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9](?=.*[!@#$%^&*()])).{8,}$\",getPassword());\n ...
[ "0.7765495", "0.7721129", "0.7491792", "0.7491792", "0.7491792", "0.74628454", "0.74441946", "0.74441946", "0.7420256", "0.7379139", "0.72857434", "0.7280928", "0.72577983", "0.72577983", "0.72577983", "0.72577983", "0.72577983", "0.72577983", "0.72577983", "0.72577983", "0.7...
0.7277131
12
C.Reg06 An email address must match in two field inputs
@Test public void testNonMatchingEmails() { registerUser(username, password, password, email, "1" + email, forename, surname, null); assertNull(userService.getUser(username)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void validate(String email);", "protected void validateEmail(){\n\n //Creating Boolean Value And checking More Accurate Email Validator Added\n\n Boolean email = Pattern.matches(\"^[A-Za-z]+([.+-]?[a-z A-z0-9]+)?@[a-zA-z0-9]{1,6}\\\\.[a-zA-Z]{2,6},?([.][a-zA-z+,]{2,6})?$\",getEmail());\n Sy...
[ "0.73611563", "0.70830905", "0.68240607", "0.68200356", "0.67519516", "0.6688622", "0.66743654", "0.6658113", "0.66399366", "0.66033494", "0.66033494", "0.66033494", "0.66033494", "0.65667695", "0.6559015", "0.6532892", "0.6532892", "0.6532892", "0.6532892", "0.65158", "0.651...
0.0
-1
C.Reg07 An email address must be valid
@Test public void testInvalidEmail() { email = "1@1.1"; registerUser(username, password, password, email, email, forename, surname, null); assertNull(userService.getUser(username)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void validate(String email);", "private boolean isEmailValid(String email) {\n return true;\r\n }", "@Test(priority=1)\n\tpublic void testEmailValidity() {\n\t\tsignup.clearAllFields();\n\t\tsignup.enterId(\"123@abc\");\n\t\tsignup.clickSubmit();\n\t\tList<String> errors = signup.getErrors();\n\t\tAs...
[ "0.80469894", "0.800014", "0.7893316", "0.7879804", "0.78244865", "0.78244865", "0.78244865", "0.78244865", "0.7743413", "0.77137125", "0.77118295", "0.7681903", "0.76768804", "0.76617134", "0.75407314", "0.7526816", "0.7512425", "0.75111175", "0.74660623", "0.74529904", "0.7...
0.6813236
90