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 |
|---|---|---|---|---|---|---|
A helper to hide keyboard because that android design patter itself is bad for hiding keyboard | public static void hideKeyboardFrom(Context context, View view) {
if (view != null) {
InputMethodManager imm = (InputMethodManager) context.getSystemService(Activity.INPUT_METHOD_SERVICE);
imm.hideSoftInputFromWindow(view.getWindowToken(), 0);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void hideKeyboard(){\n\t\tInputMethodManager inputMethodManager = (InputMethodManager) getApplicationContext().getSystemService(Context.INPUT_METHOD_SERVICE);\n\t\tinputMethodManager.toggleSoftInput(InputMethodManager.HIDE_IMPLICIT_ONLY, 0);\n\t}",
"public void hideSoftKeyboard(){\n InputMethodMana... | [
"0.8607854",
"0.8232066",
"0.82017595",
"0.81868386",
"0.8178324",
"0.81716895",
"0.81604064",
"0.81497467",
"0.81339806",
"0.81316036",
"0.81258494",
"0.81258494",
"0.81205744",
"0.81112665",
"0.80983806",
"0.80553365",
"0.80363905",
"0.7963366",
"0.7926815",
"0.7904587",
"0... | 0.7237665 | 49 |
Parses the primary section entity ID from the request uri. | protected String parsePrimaryId(String uriTxt) {
String id = null;
int idx = uriTxt.lastIndexOf(QuickLinksAction.CHAR_SLASH);
if (idx < uriTxt.length())
id = uriTxt.substring(idx+1);
return id;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private Integer extractId(Request request) throws InvalidInputException {\n\t\tString intString = (String)request.getAttributes().get(RequestParamConstants.PARAM_META_ID);\n\t\tInteger id = null;\n\t\ttry {\n\t\t\tid = new Integer(intString);\n\t\t} catch (NumberFormatException e) {\n\t\t\tthrow new InvalidInputEx... | [
"0.5284825",
"0.52025944",
"0.51091516",
"0.500934",
"0.500281",
"0.49602345",
"0.4932574",
"0.49244753",
"0.49179086",
"0.48984736",
"0.4883615",
"0.48733932",
"0.48590252",
"0.48165968",
"0.47970712",
"0.47947022",
"0.47915596",
"0.47915596",
"0.4745974",
"0.4745974",
"0.46... | 0.6592277 | 0 |
Adds the favorite to the user's profile favorites. | protected void updateProfileFavorites(ActionRequest req, PageViewVO fav) throws ActionException {
log.debug("updateProfileFavorites...");
MyFavoritesAction mfa = new MyFavoritesAction(getActionInit());
mfa.setAttributes(getAttributes());
mfa.setDBConnection(dbConn);
boolean isDelete = Convert.formatBoolean(... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void addToFavorites() {\n\n favoriteBool = true;\n preferencesConfig.writeAddFavoriteTip(shownTipIndex);\n Toast.makeText(getContext(), \"Added to favorites.\", Toast.LENGTH_SHORT).show();\n\n }",
"public void favouriteUser() {\r\n\t\tif(favourited) {\r\n\t\t\tcurrentUser.unfavour... | [
"0.77086014",
"0.7406009",
"0.687075",
"0.6849626",
"0.6807747",
"0.6779497",
"0.6711759",
"0.66945547",
"0.6654614",
"0.66383135",
"0.6448181",
"0.63991416",
"0.63472766",
"0.6326491",
"0.62361073",
"0.6200467",
"0.61936903",
"0.61606294",
"0.61341465",
"0.61148643",
"0.6081... | 0.6519714 | 10 |
Updates the appropriate Favorite collection on the session. | @SuppressWarnings("unchecked")
protected void updateSessionFavorites(SMTSession session, PageViewVO fav, boolean isDelete) {
// get the Favs map off of the session.
Map<String,List<PageViewVO>> favMap = (Map<String,List<PageViewVO>>)session.getAttribute(MyFavoritesAction.MY_FAVORITES);
List<PageViewVO> favs = fa... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void saveFavorite(){\n //make sure movie is NOT already a favorite\n if(!mMovieStaff.alreadyFavorite(mMovie.getTMDBId())){\n //is a new favorite, favorite movie list status has changed\n mFavoriteChanged = true;\n\n //set movie item favorite status as true\n ... | [
"0.6886483",
"0.66207874",
"0.631244",
"0.61239797",
"0.60992783",
"0.60719675",
"0.606572",
"0.60336196",
"0.59790397",
"0.59746426",
"0.5926367",
"0.5907959",
"0.58892506",
"0.5876871",
"0.5852635",
"0.5783347",
"0.5727064",
"0.57179713",
"0.57145894",
"0.5703119",
"0.57021... | 0.724632 | 0 |
Iterates a List of PageViewVO and removes the page that matches the pageId passed in. | protected void removeFromSession(List<PageViewVO> pages, String favPageId) {
if (pages.isEmpty()) return;
// loop and remove
ListIterator<PageViewVO> li = pages.listIterator();
while (li.hasNext()) {
PageViewVO tmp = li.next();
if (favPageId.equalsIgnoreCase(tmp.getPageId())) {
li.remove();
break;... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void removePage(int index)\n {\n pages.remove(index);\n }",
"public synchronized void removeData(int pageId)\n\t\t{\n\t\t\tif (sessionIdentifier == null)\n\t\t\t{\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tgetManager().removePage(pageId);\n\t\t}",
"public void remove(@PAGE int page) {\n mPag... | [
"0.6092238",
"0.5610374",
"0.5573516",
"0.5548737",
"0.54643345",
"0.54221016",
"0.5416851",
"0.540953",
"0.53804785",
"0.5348807",
"0.53444946",
"0.53151023",
"0.5309161",
"0.52178943",
"0.51787335",
"0.5177916",
"0.5177382",
"0.5174104",
"0.5170631",
"0.5150273",
"0.5141476... | 0.66933995 | 0 |
Retrieves the map collection key by using the enum to validate the section value passed in. | protected String checkCollectionKey(String section) throws ActionException {
log.debug("evaluating section val: " + section);
String key = StringUtil.checkVal(section).toUpperCase();
try {
Section.valueOf(key);
} catch (Exception e) {
throw new ActionException("Unknown section value: " + section);
}
r... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static AbstractType<?> keyType(CollectionType<?> type)\n {\n return type.nameComparator();\n }",
"private static URLMapping getURLMappingByKey(String key, URLMappingEnum urlMappingEnum) {\n\n if (urlMappingEnum == URLMappingEnum.ACTION) {\n\n for (URLMapping urlMapping : ur... | [
"0.574965",
"0.5371903",
"0.52174085",
"0.52127606",
"0.52127606",
"0.52127606",
"0.52127606",
"0.52127606",
"0.52127606",
"0.5161142",
"0.5136229",
"0.5136229",
"0.5136229",
"0.5136229",
"0.5136229",
"0.5136229",
"0.5136229",
"0.5136229",
"0.5136229",
"0.5136229",
"0.5136229... | 0.6694656 | 0 |
Parses a user's favorites into a map of page views keyed by section (e.g. MARKET, COMPANY, etc.). | @SuppressWarnings("unchecked")
protected Map<String, List<PageViewVO>> processUserFavorites(ModuleVO mod)
throws ActionException {
log.debug("processUserFavorites...");
Map<String, List<PageViewVO>> pageMap = initializePageMap();
if (mod.getErrorCondition()) return pageMap;
List<FavoriteVO> favs = (List<F... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void populateFavoritesSections() {\n \tif (mUserProfile.userFavoriteAlbums != null && !Utils.isListEmpty(mUserProfile.userFavoriteAlbums.albums)) {\n \t\tmContainerFavoriteAlbums.setVisibility(View.VISIBLE);\n \t\t\n \t\tUserFavoriteAlbums userFavoriteAlbums = mUserProfile.userFavoriteAlbums;\n... | [
"0.63980716",
"0.63447785",
"0.5697689",
"0.5613639",
"0.55295163",
"0.545945",
"0.544981",
"0.5185372",
"0.5088193",
"0.5071896",
"0.5035194",
"0.5016374",
"0.5006748",
"0.4993676",
"0.4969845",
"0.496869",
"0.49389723",
"0.49035287",
"0.49034056",
"0.48899975",
"0.4886947",... | 0.6599482 | 0 |
Parses a Favorite asset to determine if it is a section page favorite. If so, the asset is parsed into a PageViewVO and is added to the appropriate collection of pages on the page map. | protected void processFavorite(Map<String,List<PageViewVO>> pages, FavoriteVO fav) {
try {
checkCollectionKey(fav.getTypeCd());
} catch (Exception e) {
// this fav is not a 'Section' type so return.
return;
}
// convert favorite into a PageViewVO
PageViewVO page = new PageViewVO();
page.setRefer... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@SuppressWarnings(\"unchecked\")\n\tprotected Map<String, List<PageViewVO>> processUserFavorites(ModuleVO mod) \n\t\t\tthrows ActionException {\n\t\tlog.debug(\"processUserFavorites...\");\n\t\tMap<String, List<PageViewVO>> pageMap = initializePageMap();\n\t\tif (mod.getErrorCondition()) return pageMap;\n\n\t\tLis... | [
"0.5514125",
"0.51570183",
"0.48480335",
"0.47219768",
"0.46772307",
"0.46452183",
"0.4614247",
"0.46121728",
"0.45823383",
"0.45184997",
"0.44629306",
"0.44595364",
"0.44413367",
"0.4429468",
"0.44195887",
"0.44176957",
"0.43791074",
"0.43719512",
"0.43359327",
"0.4332239",
... | 0.62778324 | 0 |
Initialize a Map of List of PageViewVO based on the key types enum. | protected Map<String,List<PageViewVO>> initializePageMap() {
Map<String,List<PageViewVO>> pm = new HashMap<>();
for (Section sect : Section.values()) {
pm.put(sect.name(), new ArrayList<>());
}
return pm;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"InfiniteMap<K,V> build(MapTypes type);",
"private static void createTypeMap() {\n\n }",
"private void populateScreenViewMap() {\n\n log.debug(\"Populating the screens\");\n\n for (Screen screen : Screen.values()) {\n\n AbstractScreenView view = Screens.newScreen(screen);\n\n // Keep track of... | [
"0.56517774",
"0.5625258",
"0.55136615",
"0.55048823",
"0.5482128",
"0.53983116",
"0.5363409",
"0.5351814",
"0.5334618",
"0.5320108",
"0.5304789",
"0.5262135",
"0.5258187",
"0.5227986",
"0.5223821",
"0.5189602",
"0.5173914",
"0.5156767",
"0.51258487",
"0.5122245",
"0.51208395... | 0.7403188 | 0 |
Created by L on 2016/10/7. | public interface JSONKeys {
String msgType = "msgType";// 消息类型
String userId = "userId";// 发送者Id
String friendId = "friendId";// 接收者Id
String friendName = "friendName";// 好友名
String sendTime = "sendTime";// 发送时间
String msgCotent = "msgCotent";// 聊天信息-文本信息
String voiceTime = "voiceTime";// 聊... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void perish() {\n \n }",
"private stendhal() {\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r... | [
"0.6002609",
"0.5784318",
"0.57816464",
"0.57742965",
"0.5743151",
"0.5743151",
"0.57384574",
"0.5701933",
"0.56781787",
"0.5644268",
"0.56320804",
"0.5606497",
"0.5598114",
"0.5593724",
"0.5590091",
"0.5583089",
"0.5576029",
"0.55754614",
"0.55698603",
"0.555478",
"0.5554628... | 0.0 | -1 |
A comma and the value separator is a semicolon | @Test public void testEuropeanComma() {
char comma = ';';
int n = random.nextInt(10) + 10;
String[] src = new String[n];
for (int i = 0; i < n; i++) {
src[i] = randomString();
}
println(Arrays.toString(src));
try (CSVUtil.Writer writer = CSVUtil.newWri... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Rule ListSeparator() {\n // No effect on value stack\n return Sequence(AnyOf(\",;\"), WhiteSpace());\n }",
"private String getCSVSeparator(){\n DecimalFormatSymbols s = new DecimalFormatSymbols(getLocale());\n if(s.getDecimalSeparator() == ',')\n return \";\";\n e... | [
"0.7207538",
"0.7195648",
"0.66490614",
"0.65609497",
"0.6399377",
"0.62804914",
"0.62603444",
"0.62486595",
"0.62147945",
"0.61656386",
"0.6108721",
"0.60933226",
"0.6087169",
"0.6082392",
"0.606017",
"0.5939043",
"0.5912011",
"0.5907849",
"0.5890873",
"0.58670634",
"0.58593... | 0.54778403 | 38 |
gw: training set dir Location of the directory (the path) taken from the cmd line (first arg) | public static void classifyWithAllWords(String[] args)
throws IOException
{
File dir_location = new File( args[0] );
// Listing of the directory (should contain 2 subdirectories: ham/ and spam/)
File[] dir_listing = new File[0];
// Check if the cmd line arg is a directory and list it
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic String getGANModelDirectory() {\n\t\treturn GANProcess.PYTHON_BASE_PATH+\"LodeRunnerGAN\";\n\t}",
"void setDirectory(File dir);",
"@attribute(value = \"\", required = true)\t\r\n\tpublic void setDir(String dir) {\r\n\t\tthis.dir = new File(dir);\r\n\t}",
"public void startTrainingMode() {... | [
"0.60886186",
"0.57081735",
"0.5695157",
"0.557939",
"0.55348504",
"0.5515155",
"0.550602",
"0.54871064",
"0.5445602",
"0.541634",
"0.5414581",
"0.5380302",
"0.5357071",
"0.5353806",
"0.5324003",
"0.5305847",
"0.5305503",
"0.5300043",
"0.52864194",
"0.52773875",
"0.527617",
... | 0.0 | -1 |
gw: training set dir Location of the directory (the path) taken from the cmd line (first arg) | public static void classifyWithLowerCaseWords(String[] args)
throws IOException
{
File dir_location = new File( args[0] );
// Listing of the directory (should contain 2 subdirectories: ham/ and spam/)
File[] dir_listing = new File[0];
// Check if the cmd line arg is a directory and lis... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic String getGANModelDirectory() {\n\t\treturn GANProcess.PYTHON_BASE_PATH+\"LodeRunnerGAN\";\n\t}",
"void setDirectory(File dir);",
"@attribute(value = \"\", required = true)\t\r\n\tpublic void setDir(String dir) {\r\n\t\tthis.dir = new File(dir);\r\n\t}",
"public void startTrainingMode() {... | [
"0.60898656",
"0.5708507",
"0.56954443",
"0.55805063",
"0.5535233",
"0.55152196",
"0.5505709",
"0.54877776",
"0.5445995",
"0.5416349",
"0.54144853",
"0.5380339",
"0.5356971",
"0.53539616",
"0.5324363",
"0.53071207",
"0.5306036",
"0.52998805",
"0.5286256",
"0.52783",
"0.527700... | 0.0 | -1 |
gw: training set dir Location of the directory (the path) taken from the cmd line (first arg) | public static void classifyWithHeaders(String[] args)
throws IOException
{
File dir_location = new File( args[0] );
// Listing of the directory (should contain 2 subdirectories: ham/ and spam/)
File[] dir_listing = new File[0];
// Check if the cmd line arg is a directory and list it
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic String getGANModelDirectory() {\n\t\treturn GANProcess.PYTHON_BASE_PATH+\"LodeRunnerGAN\";\n\t}",
"void setDirectory(File dir);",
"@attribute(value = \"\", required = true)\t\r\n\tpublic void setDir(String dir) {\r\n\t\tthis.dir = new File(dir);\r\n\t}",
"public void startTrainingMode() {... | [
"0.60886186",
"0.57081735",
"0.5695157",
"0.557939",
"0.55348504",
"0.5515155",
"0.550602",
"0.54871064",
"0.5445602",
"0.541634",
"0.5414581",
"0.5380302",
"0.5357071",
"0.5353806",
"0.5324003",
"0.5305847",
"0.5305503",
"0.5300043",
"0.52864194",
"0.52773875",
"0.527617",
... | 0.0 | -1 |
TODO Autogenerated method stub | public static void main(String[] args) throws FileNotFoundException {
File inFile = new File("result/in.txt");
File outFile = new File("result/out.txt");
int begin = 4;
Scanner cs = new Scanner(inFile);
PrintWriter out = new PrintWriter(outFile);
while(cs.hasNextLine())
{
String line = cs.nextLin... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.608016... | 0.0 | -1 |
TODO wyrzuca wyjatek, pobrac z query liczbe i obsluzyc | public boolean checkIfUserHadCheckedAttendanceToday(int userID, String date) {
connect();
boolean bool;
try {
ResultSet result = statement.executeQuery("SELECT EXISTS (SELECT date FROM Attendance" +
"WHERE studentID LIKE '" + userID + "" +
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void montaQuery(Publicacao object, Query q) {\t\t\n\t}",
"@Override\n\tpublic void queryData() {\n\t\t\n\t}",
"Query query();",
"public List<Object[]> getRetencionesAnuladas(int mes, int anio, int idOrganizacion, Sucursal sucursalFP, Sucursal sucursalRetencion, PuntoDeVenta puntoVentaRetencion, Strin... | [
"0.6110861",
"0.5901131",
"0.5768644",
"0.5706819",
"0.56891173",
"0.56691283",
"0.56579715",
"0.5572155",
"0.5567278",
"0.5542833",
"0.5510534",
"0.54471296",
"0.5428283",
"0.54253703",
"0.54212725",
"0.5415825",
"0.5408793",
"0.5407665",
"0.5405594",
"0.53999203",
"0.539368... | 0.0 | -1 |
Constructor to assign the class name to global variable | public VerifyCsoLogin()
{
testName_javaClass = this.getClass().getSimpleName();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void initialize(){\r\n\t\tinitialize(new CurrentClassGetter().getClassName());\r\n\t}",
"public GlobalVariable() {\n }",
"Object getClass_();",
"Object getClass_();",
"private Globals(){}",
"java.lang.String getClass_();",
"java.lang.String getClass_();",
"public Global() {\r\n }"... | [
"0.67528313",
"0.6262188",
"0.6101105",
"0.6101105",
"0.59649616",
"0.59537023",
"0.59537023",
"0.5941932",
"0.5931315",
"0.5860962",
"0.57985324",
"0.5782554",
"0.5774951",
"0.57673657",
"0.57565373",
"0.5750908",
"0.5715387",
"0.5708157",
"0.5701948",
"0.5700796",
"0.569477... | 0.54837966 | 51 |
Assigning Input, Output, Test data to entire test execution | @BeforeClass
public void beforeTestClass()
{
fBase.driver = driver;
fBase.testdataHashMap = testdataHashMap;
fBase.eTest = eTest;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n void execute_testingLotsOfBoundaryValues () {\n ihd2.initialize(sensor);\n ihd1.initialize(sensor);\n iad.initialize(ihd1, ihd2);\n\n\n// here i create array with data that i send in to test\n int testData[] = {0, -23, 45, 290, 50, -123, 200, 199, 201, -200, 5, 1, -1, 29};\n\... | [
"0.646767",
"0.6432612",
"0.6146421",
"0.61364573",
"0.6064798",
"0.605918",
"0.5939869",
"0.58722067",
"0.58279866",
"0.5815542",
"0.5808052",
"0.5779042",
"0.57530373",
"0.5752195",
"0.5728132",
"0.5718736",
"0.57149965",
"0.570902",
"0.57021856",
"0.56778485",
"0.56629425"... | 0.0 | -1 |
creates a water report and sets values | public PurityReport(ZonedDateTime date, int reportID, String reporterName,
Location location, OverallCondition condition,
int virusPPM, int contaminantPPM) {
this.date = date;
this.reportID = reportID;
this.reporterName = reporterName;
this... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public WaterReport() {\n virusPPM = -1;\n contaminantPPM = -1;\n }",
"void createReport(Report report);",
"public static void CreateReport() {\n\t\tString fileName = new SimpleDateFormat(\"'Rest_Country_Report_'YYYYMMddHHmm'.html'\").format(new Date());\n\t\tString path = \"Report/\" + fileNam... | [
"0.7284618",
"0.6626934",
"0.64101803",
"0.635651",
"0.62996536",
"0.6210082",
"0.61869144",
"0.6029457",
"0.59988683",
"0.59094554",
"0.5828778",
"0.5794138",
"0.57675797",
"0.5741706",
"0.56769574",
"0.5673391",
"0.5667794",
"0.5663752",
"0.5637273",
"0.5628635",
"0.5622857... | 0.0 | -1 |
a getter for the date of the report | public ZonedDateTime getDate() {
return date;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Date getReportDate() {\r\n return reportDate;\r\n }",
"public String Get_date() \n {\n \n return date;\n }",
"public String getDate(){\n\t\t\n\t\treturn this.date;\n\t}",
"public String getDate()\r\n\t{\r\n\t\treturn date;\r\n\t}",
"public String getDate()\r\n\t{\r\n\t\tretur... | [
"0.8207308",
"0.79830736",
"0.782665",
"0.78118324",
"0.78118324",
"0.78044724",
"0.77809757",
"0.77809757",
"0.77667665",
"0.7763302",
"0.7755",
"0.7748339",
"0.77131766",
"0.7708946",
"0.7705779",
"0.7696468",
"0.76921314",
"0.7687183",
"0.7687183",
"0.7687183",
"0.7687183"... | 0.0 | -1 |
a getter for the ID of the report | public int getID() {
return reportID;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Integer getReportId() {\n return reportId;\n }",
"public String getReportID() {\r\n\t\treturn lookupValue(Params.REPORT_ID);\r\n\t}",
"public String getReportId() {\r\n return reportId;\r\n }",
"public Long getReportId() {\n return reportId;\n }",
"public long getReport... | [
"0.80822456",
"0.80753815",
"0.8034053",
"0.7996062",
"0.77603745",
"0.74913454",
"0.7136687",
"0.7008749",
"0.6981863",
"0.6972835",
"0.6972835",
"0.6972835",
"0.6972835",
"0.6972835",
"0.6972835",
"0.6972835",
"0.69598776",
"0.69598776",
"0.69598776",
"0.69598776",
"0.69051... | 0.8614304 | 0 |
a getter for the name of the user who submitted the report | public String getReporterName() {
return reporterName;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getName() {\n return user.getName();\n }",
"@Override\n\tpublic String getUserName() {\n\t\treturn model.getUserName();\n\t}",
"@Override\n\tpublic String getUserName() {\n\t\treturn model.getUserName();\n\t}",
"@Override\n\tpublic java.lang.String getUserName() {\n\t\treturn _paper.g... | [
"0.78325397",
"0.775247",
"0.775247",
"0.7603613",
"0.75428593",
"0.7519756",
"0.75157136",
"0.748428",
"0.74788123",
"0.7474604",
"0.7456671",
"0.741772",
"0.7409019",
"0.7386693",
"0.7377525",
"0.7355634",
"0.7355634",
"0.7323497",
"0.7323497",
"0.7323497",
"0.7317891",
"... | 0.0 | -1 |
a getter for the location the water report is referring to | public Location getLocation() {
return location;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Reference location() {\n return getObject(Reference.class, FhirPropertyNames.PROPERTY_LOCATION);\n }",
"public String getLocation() {\n return this.location;\n }",
"public String getLocation() {\n return this.location;\n }",
"public String getLocation() {\n ... | [
"0.7689381",
"0.7633527",
"0.7633527",
"0.7633527",
"0.7633527",
"0.7633527",
"0.7628163",
"0.76021916",
"0.7549259",
"0.75487137",
"0.7536592",
"0.7525693",
"0.7523668",
"0.7523668",
"0.7521927",
"0.7505146",
"0.7505146",
"0.7503537",
"0.74914044",
"0.7487336",
"0.74801534",... | 0.7180938 | 65 |
a getter for the Enum condition of the water | public OverallCondition getCondition() {
return condition;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"String getCondition();",
"public Object getCondition();",
"int getConditionValue();",
"public WeatherCondition getCondition() {\n return condition;\n }",
"com.google.protobuf.ByteString getConditionBytes();",
"cn.infinivision.dataforce.busybee.pb.meta.Expr getCondition();",
"java.lang.String ... | [
"0.72968566",
"0.7106371",
"0.70816875",
"0.68728757",
"0.68547934",
"0.67757255",
"0.6761149",
"0.66573787",
"0.6563028",
"0.64729446",
"0.64624643",
"0.64566517",
"0.6433613",
"0.64180243",
"0.6378178",
"0.6326323",
"0.61971587",
"0.61897707",
"0.6164995",
"0.6162999",
"0.6... | 0.6671009 | 7 |
a getter for the virus PPM of the water | public int getVirusPPM() {
return virusPPM;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getPressure() {\n\t\treturn pressure;\n\t}",
"public String getPressure() {\n\t\treturn pressure;\n\t}",
"public float getPressure() {\n pressure = calculatePressure();\n return pressure;\n }",
"public byte[] getP() {\n return p;\n }",
"public static PVProperty getP... | [
"0.65687585",
"0.65687585",
"0.65673417",
"0.64955145",
"0.6479177",
"0.64682245",
"0.6450313",
"0.64326817",
"0.63870394",
"0.6366085",
"0.63580316",
"0.63505507",
"0.6336024",
"0.6297107",
"0.6295837",
"0.62852925",
"0.62838984",
"0.62210274",
"0.62167716",
"0.62044555",
"0... | 0.7669082 | 0 |
a getter for the contaminant PPM of the water | public int getContaminantPPM() {
return contaminantPPM;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public double getCoPpm()\n\t{\n\t\treturn coPpm;\n\t}",
"public Double getCpm() {\n return cpm;\n }",
"public int getMPValue() {\n return mPValue_;\n }",
"public int getMPValue() {\n return mPValue_;\n }",
"public float getPressure() {\n pressure = calculatePressure();\... | [
"0.7139246",
"0.69397956",
"0.6640086",
"0.6610957",
"0.65901166",
"0.65538156",
"0.6469151",
"0.6443226",
"0.64094925",
"0.63562834",
"0.6349852",
"0.6333374",
"0.6283403",
"0.62365675",
"0.62355435",
"0.6233365",
"0.623132",
"0.62219906",
"0.62084186",
"0.6191361",
"0.61678... | 0.7932244 | 0 |
/ Checks the existance of the header 'xrequestedwith' | public boolean isAjaxRequest() {
return ERXAjaxApplication.isAjaxRequest(context().request());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean hasReqHeaders() {\n return fieldSetFlags()[5];\n }",
"default boolean hasHeader() {\n return true;\n }",
"@Override\n public boolean containsHeader(String arg0) {\n return false;\n }",
"boolean hasRequest();",
"boolean hasRequest();",
"boolean hasRequest();",
"bool... | [
"0.6711263",
"0.65941924",
"0.63321084",
"0.62475014",
"0.62475014",
"0.62475014",
"0.62475014",
"0.62475014",
"0.62475014",
"0.62475014",
"0.62475014",
"0.62475014",
"0.62475014",
"0.619136",
"0.61699367",
"0.6069363",
"0.6051351",
"0.6028632",
"0.6026076",
"0.590122",
"0.58... | 0.0 | -1 |
Boolean varInvi = true; | @Override
public void onClick(View v) {
Intent int1 = new Intent(getApplicationContext(), lista.class);
int1.putExtra("variableInvitado", Sesion);
startActivity(int1 );
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"boolean hasVarValue();",
"boolean getVarReturn();",
"boolean getBoolean();",
"boolean getBoolean();",
"public void method_217(boolean var1) {}",
"public static void main(String[] args) {\n\r\n\r\n\t\t boolean value = true;\r\n\r\n\t\t value = false;\r\n\r\n\t\t System.out.println(\"T... | [
"0.69905657",
"0.6958513",
"0.66399956",
"0.66399956",
"0.6599073",
"0.65345955",
"0.6529456",
"0.6526914",
"0.65012157",
"0.64876777",
"0.64876777",
"0.64289606",
"0.640601",
"0.6380812",
"0.63792187",
"0.6371399",
"0.6370227",
"0.63683444",
"0.6365311",
"0.63517225",
"0.632... | 0.0 | -1 |
/ TextView textViewas = (TextView) findViewById(R.id.numcal); textViewas.setVisibility(View.VISIBLE); TextView textView2 = (TextView) findViewById(R.id.textcal); textView2.setVisibility(View.VISIBLE); | @Override
public void onClick(View v) {
if (txu.getText().toString().equals("")){
txu.setText("0");
}
TextView txu = (TextView) findViewById(R.id.total);
TextView txtBolus = (TextView) findViewById(R.id.txtBC);
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void nastavViews() {\n tv_steps = (TextView) findViewById(R.id.textview1);\n den = (TextView) findViewById(R.id.time1);\n kcalTv = (TextView) findViewById(R.id.kCalTv);\n df = new SimpleDateFormat(\"EEE, d. MMM\");\n df2 = new SimpleDateFormat(\"dd-MMM-yyyy\");\n c... | [
"0.69375306",
"0.69134134",
"0.6890428",
"0.6741745",
"0.6717904",
"0.6671316",
"0.6667214",
"0.654171",
"0.6497381",
"0.6364064",
"0.6357449",
"0.63363457",
"0.6325787",
"0.62836283",
"0.6272988",
"0.6247331",
"0.6242048",
"0.6234099",
"0.61900425",
"0.618119",
"0.6170987",
... | 0.6185102 | 19 |
Take appropriate action for each action item click | @Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case R.id.salir:
finish();
return true;
default:
return super.onOptionsItemSelected(item);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void issuedClick(String item);",
"@Override\n\t\t\t\t\t\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t\t\t\t\t\tMainActivity sct = (MainActivity) act;\n\t\t\t\t\t\t\t\t\tsct.onItemClick(posit2, 11);\n\t\t\t\t\t\t\t\t}",
"@Override\n public boolean onActionItemClicked(ActionMode mode, MenuItem item) {\n\n\n... | [
"0.75739783",
"0.7466974",
"0.72950786",
"0.70914495",
"0.7069994",
"0.7064883",
"0.705234",
"0.7013274",
"0.6977113",
"0.6918688",
"0.68949413",
"0.6888427",
"0.6810508",
"0.6777203",
"0.67675406",
"0.67573786",
"0.6751628",
"0.67396545",
"0.6738035",
"0.6737632",
"0.6729904... | 0.0 | -1 |
Inflate the menu; this adds items to the action bar if it is present. getMenuInflater().inflate(R.menu.main, menu); | @Override
public boolean onCreateOptionsMenu(Menu menu) {
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\t\t\t\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\t\t\t\tgetMenuInflater().inflate(R.menu.activity_main, menu);\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\r\n\t\treturn super.... | [
"0.8230093",
"0.81548685",
"0.8147321",
"0.8147321",
"0.8147321",
"0.8147321",
"0.8139778",
"0.8118505",
"0.8117212",
"0.8117212",
"0.8117212",
"0.81051034",
"0.8100998",
"0.8100998",
"0.8100998",
"0.8100998",
"0.8100998",
"0.8100998",
"0.80988204",
"0.80988204",
"0.80988204"... | 0.0 | -1 |
Write your code here | public static String reverseWordWise(String input) {
String output = "";
int index = 0;
for (int i = 0; i < input.length(); i++) {
if (input.charAt(i) == ' ') {
index = i+1;
output += input.charAt(i);
} else {
outpu... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void generateCode()\n {\n \n }",
"public void logic(){\r\n\r\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"private static void cajas() {\n\t\t\n\t}",
"void pramitiTechTutorials() {\n\t\n}",
"public void ganar() {\n // TODO implement here\n }",
"@Override\r... | [
"0.63849014",
"0.6282245",
"0.609384",
"0.5969596",
"0.5919565",
"0.58799326",
"0.5875124",
"0.58691454",
"0.5868616",
"0.5855494",
"0.58265156",
"0.582598",
"0.58234346",
"0.57725835",
"0.57709163",
"0.5769708",
"0.57687974",
"0.5748677",
"0.5737696",
"0.57376194",
"0.572957... | 0.0 | -1 |
/ Your class should be named Solution. Don't write main() function. Don't read input, it is passed as function argument. Print output as specified in the question | public static void findLargest(int input[][]){
int numRows = input.length;
int numCols = input[0].length;
int num = 0;
int ans = Integer.MIN_VALUE;
String row_or_col = "NA";
for (int i = 0; i < numRows; i++) {
int sum = 0;
for (int j = 0; j < numCols; j++) {
sum +... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void solution() {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\tSystem.out.println(solution());\r\n\t}",
"public static void main(String[] args) {\n\t\t\tSystem.out.println(Solution(5, 83));\n\t\t\t\n\t\t}",
"public static void main(String[] args) {\n\t\tSystem.out.println(solution(0));\... | [
"0.75544894",
"0.7449339",
"0.7344063",
"0.7252791",
"0.72445005",
"0.7229486",
"0.71954286",
"0.71607035",
"0.7130309",
"0.71241117",
"0.70734525",
"0.7056663",
"0.7028586",
"0.69980526",
"0.698333",
"0.694548",
"0.693278",
"0.6890846",
"0.6879249",
"0.6878304",
"0.6877132",... | 0.0 | -1 |
/ Your class should be named Solution Don't write main(). Don't read input, it is passed as function argument. Print output and don't return it. Taking input is handled automatically. | public static void leaders(int[] input) {
for (int i=0; i < input.length; i++) {
boolean leader = true;
int candidate = input[i];
// check if it's a leader
int j = i+1;
while (j<input.length) {
if (input[j] > input[i]) {
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void solution() {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\r\n\t\tSolution s = new Solution();\r\n\t}",
"public static void main(String[] args) {\n\t\tSystem.out.println(solution());\r\n\t}",
"public static void main(String[] args) {\n\t\tSystem.... | [
"0.76107115",
"0.7437779",
"0.736473",
"0.72855985",
"0.728182",
"0.7255596",
"0.7251086",
"0.72446245",
"0.71559066",
"0.7130934",
"0.71126676",
"0.70887375",
"0.7066973",
"0.6986178",
"0.6970083",
"0.6963553",
"0.6960707",
"0.68993396",
"0.68583995",
"0.68519676",
"0.684578... | 0.0 | -1 |
Helper Functions Precondition: key != null && key != "" | private Node<Value> get(Node<Value> x, String key, int d)
{
if (x == null) return null;
char c = key.charAt(d);
if (c > x.c) return get(x.right, key, d);
else if (c < x.c) return get(x.left, key, d);
else if (d < key.length()-1) ret... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static void checkForNullKey(String key) {\n if ( key == null ) {\n throw new NullPointerException();\n }\n }",
"private String check_Key(String key) throws JsonException {\r\n\t\tif (key == null || key.isEmpty()) {\r\n\t\t\tthrow new JsonException(\"The key must not null, or e... | [
"0.7598582",
"0.75716215",
"0.6881133",
"0.6611883",
"0.6591505",
"0.6449791",
"0.64208263",
"0.6420309",
"0.62972987",
"0.6284959",
"0.6264142",
"0.62248284",
"0.62131864",
"0.6081056",
"0.60765004",
"0.60397255",
"0.6028602",
"0.6010227",
"0.59617376",
"0.5885728",
"0.58678... | 0.0 | -1 |
Precondition: key != null && key != "" | private Node<Value> put(Node<Value> x, String key, Value val, int d)
{
char c = key.charAt(d);
if (x == null) { x = new Node<Value>(); x.c = c; }
if (c > x.c) x.right = put(x.right, key, val, d);
else if (c < x.c) x.left = put(x.left, key, val,... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static void checkForNullKey(String key) {\n if ( key == null ) {\n throw new NullPointerException();\n }\n }",
"private String check_Key(String key) throws JsonException {\r\n\t\tif (key == null || key.isEmpty()) {\r\n\t\t\tthrow new JsonException(\"The key must not null, or e... | [
"0.7615145",
"0.75807273",
"0.6963268",
"0.6902379",
"0.6643546",
"0.65328324",
"0.65277565",
"0.63992846",
"0.63428813",
"0.63428813",
"0.6283148",
"0.6204705",
"0.62029994",
"0.6118046",
"0.6114498",
"0.61126435",
"0.5992563",
"0.5940031",
"0.585199",
"0.5798326",
"0.577727... | 0.0 | -1 |
returns the min node in the same level of node x Precondition: x != null | private Node<Value> min(Node<Value> x)
{
while (x.left != null) x = x.left;
return x;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private Node min(Node x) {\n if (x.left == null)\n return x;\n else\n return min(x.left);\n }",
"public Node<E> getMin(Node<E> x) {\n\t\tif (x.getLeftChild() != sentinel) {\n\t\t\treturn getMin(x.getLeftChild()); //Recurisvely go throughs the left side of the tree until a n... | [
"0.84487927",
"0.83234155",
"0.8049694",
"0.79547507",
"0.7908666",
"0.7765832",
"0.773983",
"0.7712483",
"0.7682014",
"0.7675393",
"0.7655407",
"0.7636949",
"0.7629864",
"0.76171446",
"0.758857",
"0.756691",
"0.7559445",
"0.7547674",
"0.7542098",
"0.75163436",
"0.74840456",
... | 0.83214706 | 2 |
removes the subtrie rooted at the min node in the same level of x used as assistant to delete only, otherwise would destroy the trie Precondition: x != null | private Node<Value> delMin(Node<Value> x)
{
if (x.left == null) return x.right;
x.left = delMin(x.left);
return x;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void delete(Node<T> x) {\n decreaseKey(x, min.key);\n extractMin();\n }",
"public void deleteMin() {\n root = deleteMin(root);\n }",
"public void deleteMin() {\n root = deleteMin(root);\n }",
"public void deleteMin()\t\t\t\t//delete smallest key\n\t{\n\t\troot=deleteMin(root... | [
"0.7397829",
"0.7287364",
"0.7287364",
"0.6900219",
"0.688817",
"0.6743239",
"0.6616305",
"0.6603571",
"0.6595944",
"0.65892124",
"0.65749466",
"0.6517136",
"0.6500276",
"0.64912796",
"0.6475314",
"0.64326924",
"0.63879836",
"0.6373097",
"0.6373097",
"0.63635176",
"0.633381",... | 0.7265826 | 3 |
returns the max node in the same level of node x Precondition: x != null | private Node<Value> max(Node<Value> x)
{
while (x.right != null) x = x.right;
return x;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public SplayNode maximum(SplayNode x) {\n\t\t while(x.right != null)\n\t\t x = x.right;\n\t\t return x;\n\t\t }",
"private BinaryNode max(BinaryNode node) {\n if (node == null) return node.parent;\n else if (node.right == null) return node;\n else return max(node.right);\n }",... | [
"0.79565084",
"0.77228284",
"0.7676104",
"0.76711506",
"0.7669645",
"0.76055866",
"0.73993266",
"0.73480994",
"0.7302343",
"0.7266952",
"0.71950936",
"0.7170117",
"0.7169756",
"0.7158297",
"0.7155722",
"0.71275467",
"0.7095053",
"0.7085013",
"0.7078152",
"0.7058162",
"0.70380... | 0.7852394 | 1 |
removes the subtrie rooted at the max node in the same level of x used as assistant to delete only, otherwise would destroy the trie Precondition: x != null | private Node<Value> delMax(Node<Value> x)
{
if (x.right == null) return x.left;
x.right = delMax(x.right);
return x;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void deleteMax() {\n root = deleteMax(root);\n }",
"public void deleteMax() {\n root = deleteMax(root);\n }",
"public void delete(Node<T> x) {\n decreaseKey(x, min.key);\n extractMin();\n }",
"private A deleteLargest(int subtree) {\n return null; \n }",
"public v... | [
"0.7138388",
"0.7138388",
"0.6704454",
"0.66775453",
"0.6529372",
"0.65024424",
"0.6500068",
"0.64632285",
"0.64371085",
"0.6414801",
"0.63899857",
"0.6379738",
"0.63501775",
"0.6349395",
"0.63392895",
"0.6326257",
"0.62754196",
"0.62754196",
"0.627239",
"0.61860853",
"0.6165... | 0.7040448 | 2 |
Precondition: key != null && key != "" | private Node<Value> delete(Node<Value> x, String key, int d)
{
if (x == null) return null;
char c = key.charAt(d);
if (c > x.c) x.right = delete(x.right, key, d);
else if (c < x.c) x.left = delete(x.left, key, d);
else if (d < key.len... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static void checkForNullKey(String key) {\n if ( key == null ) {\n throw new NullPointerException();\n }\n }",
"private String check_Key(String key) throws JsonException {\r\n\t\tif (key == null || key.isEmpty()) {\r\n\t\t\tthrow new JsonException(\"The key must not null, or e... | [
"0.7615119",
"0.7579539",
"0.6961755",
"0.6902722",
"0.6641339",
"0.65320146",
"0.6527743",
"0.63981277",
"0.63416207",
"0.63416207",
"0.6283288",
"0.6204538",
"0.62031466",
"0.611632",
"0.6113176",
"0.6110939",
"0.5992873",
"0.5937752",
"0.585013",
"0.57969534",
"0.5774319",... | 0.0 | -1 |
Application Programming Interfaces Returns the number of keyvalue pairs in this symbol table. | public int size()
{ return N; } | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Integer sizeOfMap() {\n\t\tMap<String, String> simpleMap = createSimpleMap(\"Key\", \"Value\");\n numberOfEntries = 10;\n\t\treturn simpleMap.size();\n\t}",
"@Override\n public int getG2HashTableNumberOfEntries() throws G2AccessException {\n java.lang.Object retnValue = getAttributeValue (Syste... | [
"0.71046907",
"0.68844783",
"0.682745",
"0.67941827",
"0.6751361",
"0.67059845",
"0.6684444",
"0.66014457",
"0.65781003",
"0.6493754",
"0.6488195",
"0.64797443",
"0.64464873",
"0.6425917",
"0.64104414",
"0.6404782",
"0.6390445",
"0.6360703",
"0.634893",
"0.6334932",
"0.632026... | 0.0 | -1 |
Is the symbol table empty ? | public boolean isEmpty()
{ return N == 0; } | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean isEmpty (){\n\t\treturn hashTableSize == 0;\n\t}",
"boolean hasSymbol();",
"boolean hasSymbol();",
"public synchronized boolean fempty() {\n return table.isEmpty( ); // return if table is empty\n }",
"public boolean isSetSymbol() {\r\n return EncodingUtils.testBit(__isset_bitf... | [
"0.72125936",
"0.720058",
"0.720058",
"0.68761975",
"0.6836505",
"0.68282604",
"0.6777722",
"0.6735263",
"0.6604324",
"0.6600079",
"0.6569958",
"0.6555205",
"0.65195477",
"0.65170896",
"0.6465018",
"0.64634615",
"0.64569676",
"0.64536726",
"0.6444304",
"0.6435986",
"0.6427505... | 0.0 | -1 |
Does this symbol table contain the given key ? | public boolean contains(String key)
{ return get(key) != null; } | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"boolean containsKey(CoreLabel key);",
"public boolean contains(int key) {\n int hash = key % 7919;\n if (table[hash] == null)\n {\n return false;\n }\n else\n {\n ArrayList<Integer> al = table[hash].al;\n ... | [
"0.8086234",
"0.80726314",
"0.806774",
"0.80391026",
"0.79979",
"0.7963824",
"0.79316145",
"0.78868747",
"0.7860658",
"0.7814084",
"0.781323",
"0.7783461",
"0.77780414",
"0.76792175",
"0.76792175",
"0.76792175",
"0.76792175",
"0.76792175",
"0.7632448",
"0.7627756",
"0.7615058... | 0.7429501 | 36 |
Returns the value associated with the given key. | public Value get(String key)
{
if (key.equals("")) return null_str_val;
Node<Value> x = get(root, key, 0);
return x == null ? null : x.val;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public V getValue(K key);",
"public V getValue(K key);",
"public Value get(Key key);",
"public V get(K key) {\n if (null == key) {\n throw new IllegalStateException(\"Null value for key is \" +\n \"unsupported!\");\n }\n\n V result = null;\n\n Node<Pa... | [
"0.8175439",
"0.8175439",
"0.7979652",
"0.7953973",
"0.7794757",
"0.775339",
"0.770113",
"0.76934516",
"0.7687241",
"0.7658418",
"0.76402134",
"0.7634589",
"0.76187474",
"0.7611215",
"0.76074713",
"0.76027304",
"0.7580474",
"0.7537891",
"0.7471628",
"0.74469906",
"0.74469906"... | 0.7290926 | 44 |
Inserts the keyvalue pair into the symbol table, overwriting the old value with the new value if the key is already in the symbol table. | public void put(String key, Value val)
{
if (key.equals("")) {
if (null_str_val == null) ++N;
null_str_val = val;
return;
}
root = put(root, key, val, 0);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void insert(SymbolTableEntry newEntry) {\n if (table.containsKey(newEntry.getName())) {\n table.remove(newEntry.getName());\n }\n table.put(newEntry.getName(), newEntry);\n }",
"public void put(Object key, Object value) {\n\t\tint index = key.hashCode() % SLOTS;\n\t\t// ... | [
"0.6820363",
"0.6753513",
"0.6630974",
"0.65493304",
"0.64461416",
"0.6430341",
"0.6430341",
"0.63802904",
"0.63001746",
"0.6207619",
"0.6199297",
"0.6198205",
"0.6189198",
"0.61707383",
"0.6152024",
"0.6149929",
"0.6094755",
"0.60601985",
"0.60589457",
"0.60167056",
"0.59748... | 0.0 | -1 |
Removes the key from the set if the key is present. | public void delete(String key)
{
if (key.equals("")) {
if (null_str_val != null) --N;
null_str_val = null;
return;
}
root = delete(root, key, 0);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void remove(K key) {\n super.remove(key);\n keySet.remove(key);\n }",
"public boolean remove(K key);",
"public boolean remove(Key key) ;",
"boolean remove(K key);",
"boolean remove(K key);",
"public void remove(K key);",
"public <K> boolean remove(K key);",
"pub... | [
"0.7524336",
"0.74451125",
"0.733745",
"0.72817975",
"0.72817975",
"0.7265492",
"0.7230867",
"0.70661575",
"0.7027042",
"0.7027042",
"0.7027042",
"0.6993302",
"0.6991795",
"0.6991795",
"0.6991795",
"0.69781953",
"0.6962847",
"0.69627213",
"0.6952141",
"0.6952141",
"0.6952141"... | 0.0 | -1 |
Returns the string in the symbol table that is the longest prefix of query, or null, if no such string. | public String longestPrefixOf(String query)
{
Node<Value> x = root;
int d = 0, e = 0;
int len = query.length();
while (d < len)
{
if (x == null) break;
char c = query.charAt(d);
if (c > x.c) x = x.right;
els... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private String longestPrefix(String[] inputs){\n\t\tif(inputs == null || inputs.length == 0)\n\t\t\treturn \"\";\n\t\tif(inputs.length == 1)\n\t\t\treturn inputs[0];\n\t\tString prefix = inputs[0];\n\t\t\n\t\tfor(int i=0; i< inputs.length; i++){\n\t\t\twhile(inputs[i].indexOf(prefix) != 0){\n\t\t\t\tprefix = prefi... | [
"0.6186878",
"0.6068071",
"0.5976056",
"0.5818931",
"0.57407624",
"0.5719335",
"0.5716896",
"0.55427414",
"0.5535618",
"0.55071217",
"0.5479694",
"0.54464674",
"0.5436061",
"0.54265547",
"0.5362499",
"0.5361116",
"0.53477544",
"0.5341599",
"0.5330166",
"0.5328495",
"0.5327176... | 0.7357245 | 0 |
Returns all of the keys in the set that start with prefix. | public Iterable<String> keysWithPrefix(String prefix)
{
Queue<String> q = new Queue<String>();
Node x;
if (prefix.equals("")) {
if (null_str_val != null) q.enqueue("");
x = root;
} else x = get(root, prefix, 0).mid;
collect(x, prefix, q);
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Iterable<String> getKeys(String keyPrefix);",
"@Override\n public List<String> keysWithPrefix(String prefix) {\n List<String> results = new ArrayList<>();\n Node x = get(root, prefix, 0);\n collect(x, new StringBuilder(prefix), results);\n return results;\n }",
"public ... | [
"0.8061216",
"0.8021702",
"0.77009374",
"0.7368946",
"0.735758",
"0.70622617",
"0.69729805",
"0.69569486",
"0.6920836",
"0.6774875",
"0.6774528",
"0.67301226",
"0.6501354",
"0.6496701",
"0.6496701",
"0.6459661",
"0.64261395",
"0.63864213",
"0.6384492",
"0.6358506",
"0.6358506... | 0.7996394 | 2 |
Returns all of the keys in the symbol table that match pattern, where . symbol is rreated as a wildcard character. | public Iterable<String> keysThatMatch(String pattern)
{
Queue<String> q = new Queue<String>();
if ((pattern.equals("") || pattern.equals(".")) && null_str_val != null)
q.enqueue("");
collect(root, "", pattern, q);
return q;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Set<String> getKeysMatchingPattern(String pattern);",
"public Iterable<String> keysThatMatch(String pat) {\n LinkedList<String> q = new LinkedList<String>();\n collect(root, pat, \"\", q);\n return q;\n }",
"public List<String> getKeysByPattern(String patternKey){\n RKeys keys = ... | [
"0.76408297",
"0.6865932",
"0.66514987",
"0.62588775",
"0.6177704",
"0.60466504",
"0.5686566",
"0.55117685",
"0.54944557",
"0.54202044",
"0.53938186",
"0.53871363",
"0.53337383",
"0.5315635",
"0.5308372",
"0.53077275",
"0.53077275",
"0.52860963",
"0.52361196",
"0.5189354",
"0... | 0.6951308 | 1 |
Returns all keys in the symbol table as an Iterable. To iterate over all of the keys in the symbol table named st, use the foreach notation: for (Key key : st.keys()). | public Iterable<String> keys()
{ return keysWithPrefix(""); } | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Iterable<Key> keys();",
"public Iterable<Key> keys();",
"public Iterable<K> keys();",
"public Iterable<K> keys()\n {\n return new Iterable<K>()\n {\n public Iterator<K> iterator()\n {\n return ChainedHashTable.this.keysIterator();\n } // iterator()\n }; // n... | [
"0.7662974",
"0.7662974",
"0.74680996",
"0.7330015",
"0.7235882",
"0.71582705",
"0.710404",
"0.710404",
"0.7078348",
"0.6924222",
"0.67948925",
"0.673882",
"0.67332345",
"0.6730734",
"0.669804",
"0.66940916",
"0.6603418",
"0.6595312",
"0.6594481",
"0.6589094",
"0.6544277",
... | 0.69050926 | 10 |
Main Program Unit Test Unit test the TST data type | public static void main(String[] args)
{
// build symbol table from standard input
TST<Integer> st = new TST<Integer>();
for (int i = 0; !StdIn.isEmpty(); i++) {
String key = StdIn.readString();
st.put(key, i);
}
// print results
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n\tpublic void testGetType_1()\n\t\tthrows Exception {\n\t\tTreeData fixture = new TreeData((IFile) null, \"\", 1, 1);\n\n\t\tint result = fixture.getType();\n\n\t\t// add additional test code here\n\t\tassertEquals(1, result);\n\t}",
"static boolean test(Type t0)\r\n {\r\n String s0 = Types.stri... | [
"0.6338675",
"0.6304878",
"0.62793607",
"0.6248716",
"0.6204541",
"0.6118472",
"0.6118472",
"0.6118472",
"0.6057389",
"0.59676677",
"0.59394777",
"0.5912507",
"0.5846311",
"0.58227986",
"0.58201927",
"0.5819428",
"0.5802219",
"0.5798765",
"0.57944274",
"0.5784226",
"0.575499"... | 0.0 | -1 |
Created by 92915 on 2018/4/13. | public interface MySetContract {
interface View extends BaseContract.BaseView {
void startDocData(DocDataBean docDataBean);
void againDocData(int code);
void startSDocData(SDocDataBean sDocDataBean);
void againSDocData(int code);
}
interface Presenter extends BaseContract.B... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void perish() {\n \n }",
"private stendhal() {\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"public final void mo51373a() {\n }",
"@Override\r\n\tp... | [
"0.6104487",
"0.5989301",
"0.5882448",
"0.576908",
"0.576908",
"0.5766196",
"0.57637376",
"0.57382715",
"0.57290757",
"0.5668724",
"0.5668724",
"0.5668485",
"0.566609",
"0.5657657",
"0.5643485",
"0.5641768",
"0.56078804",
"0.55959004",
"0.55936813",
"0.5583366",
"0.55813706",... | 0.0 | -1 |
Runs tests for SimME server | public static Test suite() {
TestSuite suite = new TestSuite("Test for Server");
suite.addTestSuite(DatabaseTest.class);
suite.addTest(SuiteTestMenu.suite());
suite.addTestSuite(ServerGameTest.class);
suite.addTestSuite(ManagedGameTest.class);
suite.addTestSuite(UserManagerTest.class);
suite.addTestSu... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n public void serverStarts() {\n }",
"public static void runAllTests() {\n\t\trunClientCode(SimpleRESTClientUtils.getCToFServiceURL());\n\t\trunClientCode(SimpleRESTClientUtils.getCToFServiceURL(new String [] {\"100\"}));\n\t}",
"@Test\n\tpublic void runSend(){\n\t\tstandard();\n\t}",
"@Before\r\... | [
"0.6823252",
"0.6699096",
"0.65230703",
"0.63934535",
"0.6344744",
"0.6322692",
"0.62583864",
"0.62574923",
"0.62489253",
"0.6151097",
"0.6141699",
"0.6105424",
"0.6103066",
"0.60963094",
"0.6078143",
"0.60717756",
"0.6068201",
"0.605918",
"0.60585624",
"0.6005538",
"0.599836... | 0.5654818 | 72 |
TODO Autogenerated method stub | @Override
public void init() throws ServletException {
super.init();
pdmodel = new pedidoModel();
cmodel = new clienteModel();
cnmodel = new cancionModel();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.608016... | 0.0 | -1 |
TODO Autogenerated method stub | protected void service(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
String path = request.getServletPath();
try {
if (path.equals("/newpd")) {
destino = "createpd.jsp";
System.out.println("create new");
} else if (path.equals("/insertpd"))... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.66708666",
"0.65675074",
"0.65229905",
"0.6481001",
"0.64770633",
"0.64584893",
"0.6413091",
"0.63764185",
"0.6275735",
"0.62541914",
"0.6236919",
"0.6223816",
"0.62017626",
"0.61944294",
"0.61944294",
"0.61920846",
"0.61867654",
"0.6173323",
"0.61328775",
"0.61276996",
"0... | 0.0 | -1 |
TODO Autogenerated method stub | private void insert(HttpServletRequest request)throws Exception {
Pedido p = new Pedido();
Cliente c = new Cliente();
Cancion ca = new Cancion();
p.setCod_pedido(request.getParameter("codigo"));
ca.setCod_cancion(request.getParameter("cod_cancion"));
c.setCod_cliente(request.getParameter("cod_cliente")... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.608016... | 0.0 | -1 |
TODO Autogenerated method stub | protected void update(HttpServletRequest request) throws Exception {
Pedido p = new Pedido();
Cancion c = new Cancion();
Cliente cl = new Cliente();
String cod = (request.getParameter("codigo"));
String cod_cancion = (request.getParameter("cod_cancion"));
String cod_cliente = (request.getPa... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.66708666",
"0.65675074",
"0.65229905",
"0.6481001",
"0.64770633",
"0.64584893",
"0.6413091",
"0.63764185",
"0.6275735",
"0.62541914",
"0.6236919",
"0.6223816",
"0.62017626",
"0.61944294",
"0.61944294",
"0.61920846",
"0.61867654",
"0.6173323",
"0.61328775",
"0.61276996",
"0... | 0.0 | -1 |
TODO Autogenerated method stub | protected void delete(HttpServletRequest request) throws ServletException, IOException, Exception {
String cod = (request.getParameter("codigo"));
pdmodel.EliminarPedido(cod);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.608016... | 0.0 | -1 |
TODO Autogenerated method stub | protected String list(HttpServletRequest request, pedidoModel pdmodel)
throws Exception {
String error = null;
List<Pedido> list =pdmodel.Listarpedido();
if (list != null) {
request.setAttribute("lispedidos", list);
} else {
error = "Sin acceso a Base de datos";
}
return error;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.66708666",
"0.65675074",
"0.65229905",
"0.6481001",
"0.64770633",
"0.64584893",
"0.6413091",
"0.63764185",
"0.6275735",
"0.62541914",
"0.6236919",
"0.6223816",
"0.62017626",
"0.61944294",
"0.61944294",
"0.61920846",
"0.61867654",
"0.6173323",
"0.61328775",
"0.61276996",
"0... | 0.0 | -1 |
TODO Autogenerated method stub | protected String read(HttpServletRequest request, pedidoModel pdmodel)
throws ServletException, IOException, Exception {
String error = null;
String cod=(request.getParameter("codigo"));
Pedido ped = pdmodel.BuscarPedido(cod);
if (ped != null) {
request.setAttribute("pedido", ped);
} else {
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.608016... | 0.0 | -1 |
TODO Autogenerated method stub | protected void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
response.getWriter().append("Served at: ").append(request.getContextPath());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.66708666",
"0.65675074",
"0.65229905",
"0.6481001",
"0.64770633",
"0.64584893",
"0.6413091",
"0.63764185",
"0.6275735",
"0.62541914",
"0.6236919",
"0.6223816",
"0.62017626",
"0.61944294",
"0.61944294",
"0.61920846",
"0.61867654",
"0.6173323",
"0.61328775",
"0.61276996",
"0... | 0.0 | -1 |
TODO Autogenerated method stub | protected void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
doGet(request, response);
} | {
"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 |
Assignment1(); Assignment2(); Assignment3(); Assignment4(); Assignment5(); Assignment6(); Assignment7(); Assignment8(); Assignment9(1,2); Assignment9_1("soep"); | private static void assignment9_1(String tekst) {
System.out.println(new Date() + " - Main - " + tekst);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void main(String[] args) {\n System.out.println(\"*****************************Assignment 1 ********************************\");\n Assignment1 assignment1 = new Assignment1();\n assignment1.dataTypesMethod();\n int variable5 = Assignment1.variableAssignmentMethod(6);\n ... | [
"0.64097583",
"0.6133054",
"0.60300523",
"0.59336",
"0.58859885",
"0.5862387",
"0.58255416",
"0.58086103",
"0.57474506",
"0.5600394",
"0.5522218",
"0.5495705",
"0.5481722",
"0.5478117",
"0.5478045",
"0.5458411",
"0.5396355",
"0.5396355",
"0.5388264",
"0.5362017",
"0.5359917",... | 0.5326553 | 23 |
diagonal = == lower left corner = = top left corner is a single for loop? | private static void assignment6() {
for (int i = 0; i < 4;i++){
System.out.println();
for (int j = 0; j < 4; j++){
// System.out.print(" * ");
if (i <= j){
System.out.print(" * ");
} else {
System.ou... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static boolean isInDiagonal(int pos) {\n for (int i = 0; i < ColorFrames.BOARD_DIM; ++i) {\n if (1 + i * (ColorFrames.BOARD_DIM + 1) == pos || ColorFrames.BOARD_DIM + i * (ColorFrames.BOARD_DIM - 1) == pos)\n return true;\n }\n\n return false;\n }",
"@Tes... | [
"0.64345443",
"0.6360097",
"0.63319933",
"0.62240547",
"0.6221835",
"0.6194357",
"0.6178562",
"0.61449414",
"0.61132514",
"0.6099488",
"0.60666794",
"0.6051031",
"0.5979004",
"0.5922812",
"0.59095216",
"0.58799237",
"0.58695024",
"0.5839167",
"0.5837347",
"0.58357286",
"0.580... | 0.0 | -1 |
Get the current default connection from the Integrity client. | public IntegrityConnection getDefaultConnection() throws IntegrityExceptionEx
{
try
{
Command cmd = new Command(Command.IM, "servers");
Response resp = _cmdRunner.execute(cmd);
if (resp.getWorkItemListSize() > 0) // Connected to something.
{
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public JupiterConnector getDefault() {\n if (defaultConnection == null) {\n defaultConnection = new JupiterConnector(this,\n DEFAULT_NAME,\n redis.getPool(DEFAULT_NAME),\n ... | [
"0.6768037",
"0.67610794",
"0.6729616",
"0.6664584",
"0.6454768",
"0.643824",
"0.6411359",
"0.6388387",
"0.63875717",
"0.6379377",
"0.63478714",
"0.6273444",
"0.626618",
"0.62354666",
"0.6235412",
"0.62151414",
"0.6214712",
"0.6202091",
"0.61860454",
"0.6159012",
"0.61574626"... | 0.772498 | 0 |
Set the command runners defaults to those found in the connection. The connection is typically derived from a call to getDefaultConnection. | public void setRunnerDefaultFromConnection(IntegrityConnection conn)
{
_log.message("Setting command runner defaults " + conn.toString());
_cmdRunner.setDefaultHostname(conn.getHost());
_cmdRunner.setDefaultPort(conn.getPort());
_cmdRunner.setDefaultUsername(conn.getUser());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void initializeDefaultCommands()\n {\n m_chassis.setDefaultCommand(m_inlineCommands.m_driveWithJoystick);\n // m_intake.setDefaultCommand(null);\n m_chamber.setDefaultCommand(new ChamberIndexBalls());\n // m_launcher.setDefaultCommand(null);\n // m_climber.setDefaultCommand(null);\n ... | [
"0.60890657",
"0.5993636",
"0.59299207",
"0.5833481",
"0.5794384",
"0.5741531",
"0.57410276",
"0.57395893",
"0.5714085",
"0.5699332",
"0.56936854",
"0.5693374",
"0.568034",
"0.5665584",
"0.5656385",
"0.5634622",
"0.56174403",
"0.56113535",
"0.5604455",
"0.5603472",
"0.5603472... | 0.7498608 | 0 |
Run the application using Spring Boot and an embedded servlet engine. | public static void main(String[] args) {
// Tell server to look for accounts-server.properties or
// accounts-server.yml
System.setProperty("spring.config.name", "weather-server");
SpringApplication.run(WeatherServer.class, args);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void main(String[] args){\n // app.run(args);\r\n new SpringApplicationBuilder(MainApplication.class).web(true).run(args);\r\n }",
"public void run() {\n final Server server = new Server(8081);\n\n // Setup the basic RestApplication \"context\" at \"/\".\n // T... | [
"0.66772383",
"0.6510733",
"0.6342585",
"0.6257453",
"0.618954",
"0.6095858",
"0.60347307",
"0.6026154",
"0.60245717",
"0.5980793",
"0.59618396",
"0.59618396",
"0.59458065",
"0.59322244",
"0.59028673",
"0.5847758",
"0.5832146",
"0.58321285",
"0.58321285",
"0.58321285",
"0.583... | 0.54931545 | 55 |
TODO Autogenerated method stub | @Override
public boolean addUser(User user) {
Object object = null;
boolean flag = false;
try {
object = client.insert("addUser", user);
System.out.println("添加学生信息的返回值:" + object);
} catch (SQLException e) {
e.printStackTrace();
}
if (object != null) {
flag = true;
}
return flag;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.608016... | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public boolean deleteUser(int id) {
boolean flag = false;
Object object = null;
try {
object = client.delete("deleteUserById", id);
System.out.println("删除学生信息的返回值:" + object + ",这里返回的是影响的行数");
} catch (SQLException e) {
e.printStackTrace();
}
if (object != null) {
flag = true;
}
r... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.66708666",
"0.65675074",
"0.65229905",
"0.6481001",
"0.64770633",
"0.64584893",
"0.6413091",
"0.63764185",
"0.6275735",
"0.62541914",
"0.6236919",
"0.6223816",
"0.62017626",
"0.61944294",
"0.61944294",
"0.61920846",
"0.61867654",
"0.6173323",
"0.61328775",
"0.61276996",
"0... | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public boolean updateUser(User user) {
boolean flag = false;
Object object = false;
try {
object = client.update("updateStudent", user);
System.out.println("更新学生信息的返回值:" + object + ",返回影响的行数");
} catch (SQLException e) {
e.printStackTrace();
}
if (object != null) {
flag = true;
}
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.608016... | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public List<User> selectAllUser() {
List<User> users = null;
try {
users = client.queryForList("selectAllUser");
} catch (SQLException e) {
e.printStackTrace();
}
return users;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.66708666",
"0.65675074",
"0.65229905",
"0.6481001",
"0.64770633",
"0.64584893",
"0.6413091",
"0.63764185",
"0.6275735",
"0.62541914",
"0.6236919",
"0.6223816",
"0.62017626",
"0.61944294",
"0.61944294",
"0.61920846",
"0.61867654",
"0.6173323",
"0.61328775",
"0.61276996",
"0... | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public List<User> selectUserByName(String name) {
List<User> users = null;
try {
users = client.queryForList("selectUserByName", name);
} catch (SQLException e) {
e.printStackTrace();
}
return users;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.608016... | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public User selectUserById(int id) {
User user = null;
try {
user = (User) client.queryForObject("selectUserById", id);
} catch (SQLException e) {
e.printStackTrace();
}
return user;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.66708666",
"0.65675074",
"0.65229905",
"0.6481001",
"0.64770633",
"0.64584893",
"0.6413091",
"0.63764185",
"0.6275735",
"0.62541914",
"0.6236919",
"0.6223816",
"0.62017626",
"0.61944294",
"0.61944294",
"0.61920846",
"0.61867654",
"0.6173323",
"0.61328775",
"0.61276996",
"0... | 0.0 | -1 |
Broadcast SERVICE_READY_ACTION to inform that this service is now monitoring for beacons. | private void broadcastReadyAction() {
Log.d(TAG, "broadcastReadyAction start");
final Intent intent = new Intent();
intent.setAction(BeaconsMonitoringService.SERVICE_READY_ACTION);
getBaseContext().sendBroadcast(intent);
Log.d(TAG, "broadcastReadyAction end");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void onIBeaconServiceConnect();",
"@Override\n public void onServiceConnected(ComponentName className,\n IBinder service) {\n HomeActivityWatcherService.MyBinder binder = (HomeActivityWatcherService.MyBinder) service;\n mWatcherService = b... | [
"0.62322706",
"0.6172145",
"0.606287",
"0.5888429",
"0.58478254",
"0.5836148",
"0.5834863",
"0.5806974",
"0.5797838",
"0.5761465",
"0.5717421",
"0.57060426",
"0.5631631",
"0.5568756",
"0.55410266",
"0.5508395",
"0.55025154",
"0.5487961",
"0.5486029",
"0.5485145",
"0.54586893"... | 0.82489604 | 0 |
Created by 1 on 09.04.2016. | public interface ReaderAdapter {
String readChinese(String text);
String readEnglish(String text);
String readUrdu(String text);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void perish() {\n \n }",
"private stendhal() {\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@O... | [
"0.58109176",
"0.57105994",
"0.56745005",
"0.56583405",
"0.56145597",
"0.5592694",
"0.5573087",
"0.5558605",
"0.555386",
"0.555386",
"0.5544163",
"0.5524545",
"0.55165714",
"0.5512773",
"0.5495727",
"0.54489195",
"0.5447729",
"0.544528",
"0.544528",
"0.5436215",
"0.54313284",... | 0.0 | -1 |
Emit the calculated score to downstream. | public void calculateScores(OutputCollector collector, List<T> observationList) {
List<ScorePackage> packageList = getScores(observationList);
for (ScorePackage scorePackage : packageList) {
collector.emit(new Values(scorePackage.getId(), scorePackage.getScore(), scorePackage.getObj()));
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void emit() {\n counter.increment(METRIC_VALUE);\n }",
"@Override\n\tpublic void inputScore() {\n\n\t}",
"@Override\r\n\t\t\t\tpublic void run() {\n\t\t\t\t\tString msg = \"score@\";\r\n\t\t\t\t\tmsg += changeRank(duiduipeng);\r\n\t\t\t\t\tmsg += changeRank(ddt);\r\n\t\t\t\t\tmsg += changeRank(tuixia... | [
"0.64131284",
"0.6226742",
"0.6084205",
"0.6071431",
"0.6006169",
"0.59668195",
"0.5945137",
"0.5938547",
"0.5938547",
"0.58238393",
"0.5823194",
"0.5822209",
"0.58104086",
"0.5796177",
"0.5780892",
"0.5761501",
"0.576144",
"0.57300466",
"0.5724904",
"0.5716374",
"0.57047683"... | 0.56686705 | 23 |
Calculate the data instance anomaly score for given data instances and directly send to downstream. | public abstract List<ScorePackage> getScores(List<T> observationList); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static double calcError(Instances data, Instances data2) {\n\t\t// calculate the total l1 norm of the class values of the two data sets \n\t\tdouble error = 0;\n\t\tfor (int i=0; i < data.numInstances(); ++i) {\n\t\t\terror += Math.abs(data.instance(i).classValue() - data2.instance(i).classValue());\t\t\t\... | [
"0.546881",
"0.5429799",
"0.54273915",
"0.5372718",
"0.5308267",
"0.52917343",
"0.5229963",
"0.5194399",
"0.51538527",
"0.5110027",
"0.5077769",
"0.50542706",
"0.5047306",
"0.5040963",
"0.50178784",
"0.4998335",
"0.4977386",
"0.49191168",
"0.49177873",
"0.4909658",
"0.4908582... | 0.0 | -1 |
Recursive solution Time complexity O(n), space complexity O(n) because of recursion. | public boolean isSymmetric1(TreeNode root) {
if (root == null) return true;
return compare(root.left, root.right);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"static int solve(int n) \n\t{ \n\t // base case \n\t if (n < 0) \n\t return 0; \n\t if (n == 0) \n\t return 1; \n\t \n\t return solve(n-1) + solve(n-3) + solve(n-5); \n\t}",
"private static int betterSolution(int n) {\n return n*n*n;\n }",
"public static void main(String[] ar... | [
"0.7026614",
"0.66346157",
"0.6514104",
"0.64243066",
"0.6301366",
"0.6264188",
"0.62639624",
"0.62382853",
"0.6216481",
"0.6212849",
"0.61681426",
"0.615851",
"0.6138438",
"0.6132395",
"0.60932815",
"0.60627425",
"0.60367304",
"0.60156035",
"0.6002495",
"0.59630424",
"0.5962... | 0.0 | -1 |
using preorder tree traversal. | private boolean compare(TreeNode leftRoot, TreeNode rightRoot) {
// Good shortcut
//if(left==null || right==null) return left==right;
if (leftRoot == null && rightRoot == null) return true;
if (leftRoot == null || rightRoot == null) return false;
if (leftRoot.val != rightRoot.val... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void preorder()\r\n {\r\n preorder(root);\r\n }",
"public void preorder()\n {\n preorder(root);\n }",
"public void preorder()\n {\n preorder(root);\n }",
"public void preorder() {\n\t\tpreorder(root);\n\t}",
"@Override\r\n\tpublic List<Node<T>> getPreOrderTr... | [
"0.8698069",
"0.85139006",
"0.85139006",
"0.83053946",
"0.8178513",
"0.8127014",
"0.80881226",
"0.8082901",
"0.8057734",
"0.801996",
"0.7943258",
"0.7921807",
"0.790939",
"0.7873538",
"0.7854395",
"0.7826006",
"0.78218764",
"0.7817202",
"0.78084314",
"0.7804781",
"0.7794548",... | 0.0 | -1 |
Iterative solution, Time complexity O(n), space complexity O(n). same solution using one Queue. | public boolean isSymmetric(TreeNode root) {
if (root == null) return true;
Queue<TreeNode> ql = new LinkedList<>();
Queue<TreeNode> qr = new LinkedList<>();
ql.add(root.left);
qr.add(root.right);
while (!ql.isEmpty() && !qr.isEmpty()) {
TreeNode l = ql.remove(... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void popCostlyOperation(){\r\n Queue<Integer> queue=new LinkedList<>();\r\n Queue<Integer> supportQueue=new LinkedList<>();\r\n for(int i=0;i<10;++i){\r\n while(!queue.isEmpty())\r\n supportQueue.add(queue.poll());\r\n\r\n queue.add(i*i);\r\n ... | [
"0.6648536",
"0.659787",
"0.6543091",
"0.6441007",
"0.6418337",
"0.6368613",
"0.6364871",
"0.634881",
"0.6266047",
"0.62418604",
"0.614316",
"0.6081756",
"0.600223",
"0.5997164",
"0.5992701",
"0.5929807",
"0.5885382",
"0.5872084",
"0.58640003",
"0.58333474",
"0.5833062",
"0... | 0.0 | -1 |
This method is added as a shutdown hook to the runtime. | public void run(){
// Stop servlets
try{
server.stop();
}catch(Exception e){}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void shutdown() {\n\t}",
"public void shutdown()\n {\n // todo\n }",
"@Override\n\tpublic void shutdown()\n\t{\n\t}",
"@Override\n public void shutdown() {\n }",
"@Override\n public void shutdown() {\n }",
"@Override\n public void shutdown() {\n }",
"@Overri... | [
"0.8536924",
"0.8497699",
"0.84873885",
"0.84860116",
"0.84860116",
"0.84860116",
"0.8461015",
"0.84208137",
"0.84208137",
"0.84188986",
"0.83614045",
"0.83571434",
"0.8352906",
"0.8322628",
"0.8296565",
"0.828805",
"0.8287676",
"0.82542413",
"0.82188755",
"0.8126988",
"0.806... | 0.0 | -1 |
1. Read from json | private void setConfiguration(JSONObject config) throws JSONException{
if(config.has("api")){
JSONObject obj=config.getJSONObject("api");
if(obj.has("bind")){
bind=obj.getString("bind");
}
if(obj.has("port")){
port=obj.getInt("port");
}
}
if(config.has("streams")){
JSONObject obj=config.... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"abstract Object read(@NonNull JsonReader reader) throws IOException;",
"public Integer loadJSONFile()\n {\n JSONParser parser = new JSONParser();\n try{\n\n Object obj = parser.parse(new FileReader(\"/Users/rnuka/Desktop/sample.json\"));\n JSONObject jsonObj = (JSONObject)o... | [
"0.71090853",
"0.69922364",
"0.68872875",
"0.6731171",
"0.6713229",
"0.6598767",
"0.65959084",
"0.6583266",
"0.65578794",
"0.65556747",
"0.65263784",
"0.6523337",
"0.65222555",
"0.6494757",
"0.6493124",
"0.64748937",
"0.64748293",
"0.6437212",
"0.64137495",
"0.63764054",
"0.6... | 0.0 | -1 |
Utility method to read the contents of a text file | private String readFully(String filename) throws IOException{
BufferedReader reader = new BufferedReader(new FileReader(filename));
StringBuilder buf=new StringBuilder();
char[] data=new char[8192];
int num=reader.read(data);
while(num>-1){
buf.append(data,0,num);
num=reader.read(data);
}
return buf... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"String readText(FsPath path);",
"private void ReadTextFile(String FilePath) {\n\t\t\n\t\t\n\t}",
"public String readTextFromFile()\n\t{\n\t\tString fileText = \"\";\n\t\tString filePath = \"/Users/zcon5199/Documents/\";\n\t\tString fileName = filePath + \"saved text.txt\";\n\t\tFile inputFile = new File(fileNa... | [
"0.76173323",
"0.73238444",
"0.7266607",
"0.7265411",
"0.7254088",
"0.7248244",
"0.72470343",
"0.72157806",
"0.7098897",
"0.70762306",
"0.70554835",
"0.702229",
"0.69141376",
"0.6847902",
"0.6828666",
"0.68165016",
"0.6814422",
"0.6768964",
"0.6757109",
"0.675529",
"0.6743701... | 0.0 | -1 |
Setup and start the Jetty servlet container | private void startServlets(){
try{
server = new Server();
ServerConnector c = new ServerConnector(server);
c.setIdleTimeout(15000);
c.setAcceptQueueSize(256);
c.setPort(port);
if(!bind.equals("*")){
c.setHost(bind);
}
ServletContextHandler handler = new ServletContextHandler(server,"/", t... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@BeforeAll\n public static void start() throws Exception {\n server = new Server(0);\n ((QueuedThreadPool)server.getThreadPool()).setMaxThreads(20);\n ServletContextHandler context = new ServletContextHandler();\n context.setContextPath(\"/foo\");\n server.setHandler(context);\n context.addServl... | [
"0.682322",
"0.66335326",
"0.66194975",
"0.66139126",
"0.65873164",
"0.64432454",
"0.63634396",
"0.63060325",
"0.6190762",
"0.615131",
"0.6142651",
"0.6134122",
"0.6111622",
"0.61002827",
"0.6060891",
"0.60601807",
"0.6016291",
"0.5997577",
"0.59437263",
"0.5936013",
"0.59341... | 0.6670549 | 1 |
Starting point for the PhatData Stream server | public static void main(String args[]){
String configFile=null;
if(args.length==1){ // The only argument accepted for now is the path to a config file
configFile=args[0];
}else if(args.length==0){
}else{
System.out.println("ERROR! Phat Aggregates must be started with either one or zero configuration file... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void start() {\n \t\tinit();\n\t\tif(!checkBackend()){\n\t\t\tvertx.createHttpServer().requestHandler(new Handler<HttpServerRequest>() {\n\t\t\t\tpublic void handle(HttpServerRequest req) {\n\t\t\t\t String query_type = req.path();\t\t\n\t\t\t\t req.response().headers().set(\"Content-Type\", \"text/p... | [
"0.6240193",
"0.6211901",
"0.6204902",
"0.6166464",
"0.61233175",
"0.6122444",
"0.61040866",
"0.60628414",
"0.60279864",
"0.6026268",
"0.59960407",
"0.5988505",
"0.5961334",
"0.5953284",
"0.5929988",
"0.59182715",
"0.59165967",
"0.5907937",
"0.5902318",
"0.58982414",
"0.58864... | 0.0 | -1 |
/ Enter your code here. Read input from STDIN. Print output to STDOUT. Your class should be named Solution. | public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int n = in.nextInt();
long[] ar = new long[n];
for(int ar_r=0; ar_r<n; ar_r++){
ar[ar_r] = in.nextLong();
}
double[] result = findPlusMinus(n, ar);
System.out... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\r\n\t\tSolution s = new Solution();\r\n\t}",
"public static void main(String[] args) throws IOException {\n\t\t//Scanner in = new Scanner(System.in);\n\t\tBufferedReader in = new BufferedReader(new InputStreamReader(System.in... | [
"0.75280106",
"0.7303422",
"0.72608393",
"0.72363067",
"0.7178064",
"0.71745384",
"0.7022264",
"0.7022264",
"0.68939406",
"0.68699366",
"0.6857948",
"0.68238825",
"0.68213546",
"0.6809923",
"0.6807801",
"0.6805596",
"0.6782698",
"0.6770123",
"0.6755418",
"0.6753114",
"0.67508... | 0.0 | -1 |
Inflate the menu; this adds items to the action bar if it is present. | @Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.menu_create_shopping_list, menu);
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tMenuInflater inflater = getMenuInflater();\n \tinflater.inflate(R.menu.main_activity_actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {... | [
"0.72461367",
"0.7201596",
"0.7195268",
"0.7177002",
"0.71069986",
"0.7039653",
"0.70384306",
"0.70115715",
"0.7010647",
"0.69803435",
"0.6945406",
"0.69389313",
"0.6933442",
"0.69172275",
"0.69172275",
"0.6890826",
"0.6883689",
"0.687515",
"0.6874831",
"0.68615955",
"0.68615... | 0.0 | -1 |
Handle action bar item clicks here. The action bar will automatically handle clicks on the Home/Up button, so long as you specify a parent activity in AndroidManifest.xml. | @Override
public boolean onOptionsItemSelected(MenuItem item) {
int id = item.getItemId();
//noinspection SimplifiableIfStatement
if (id == R.id.action_settings) {
return true;
}
return super.onOptionsItemSelected(item);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public boolean onOptionsItemSelected(MenuItem item) { Handle action bar item clicks here. The action bar will\n // automatically handle clicks on the Home/Up button, so long\n // as you specify a parent activity in AndroidManifest.xml.\n\n //\n // HANDLE BACK BUTTON\n ... | [
"0.7904066",
"0.7804976",
"0.7766218",
"0.7726716",
"0.7631313",
"0.76221544",
"0.7584775",
"0.7530617",
"0.74878734",
"0.7457033",
"0.7457033",
"0.74380976",
"0.7421477",
"0.7402898",
"0.7391322",
"0.7386477",
"0.73788774",
"0.7370012",
"0.7362617",
"0.73555875",
"0.73451835... | 0.0 | -1 |
getItem is called to instantiate the fragment for the given page. Return a PlaceholderFragment (defined as a static inner class below). | @Override
public Fragment getItem(int position) {
switch(position){
case 0:
return ShoppingListSettings.newInstance(position + 1);
default:
return ShoppingListView.newInstance(position + 1);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public Fragment getItem(int position) {\n return PlaceholderFragment.newInstance(position);\n }",
"@Override\n public Fragment getItem(int position) {\n return WebPageFragment.newInstance(position);\n }",
"@NonNull\n\t\t@Override\n\t\tpu... | [
"0.72919405",
"0.71684223",
"0.7127443",
"0.70753",
"0.7005576",
"0.7005576",
"0.7005576",
"0.7005576",
"0.7005576",
"0.7005576",
"0.7005576",
"0.7005576",
"0.7005576",
"0.7005576",
"0.7005576",
"0.7005576",
"0.7005576",
"0.7005576",
"0.6994497",
"0.6977012",
"0.6955742",
"... | 0.0 | -1 |
Show 2 total pages. | @Override
public int getCount() {
return 2;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"int getPagesAmount();",
"long getAmountPage();",
"@Test\n\tpublic void shouldReturnSecondPageSortedByOriginalAmountAsc()\n\t{\n\n\t\tfinal SearchPageData<B2BDocumentModel> result = pagedB2BDocumentDao.getAllPagedDocuments(\n\t\t\t\tcreatePageableData(1, 2, \"byOriginalAmountAsc\"), Collections.singletonList(Ac... | [
"0.66394883",
"0.6310845",
"0.6247585",
"0.61983025",
"0.61640596",
"0.61640596",
"0.61640596",
"0.61640596",
"0.61383164",
"0.6091821",
"0.5991357",
"0.5966327",
"0.5966327",
"0.5966327",
"0.5889809",
"0.58841777",
"0.5883868",
"0.586598",
"0.5829298",
"0.5827352",
"0.579510... | 0.0 | -1 |
Returns a new instance of this fragment for the given section number. | public static ShoppingListSettings newInstance(int sectionNumber) {
ShoppingListSettings fragment = new ShoppingListSettings();
Bundle args = new Bundle();
args.putInt(ARG_SECTION_NUMBER, sectionNumber);
fragment.setArguments(args);
return fragment;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static MainFragment newInstance(int sectionNumber) {\n MainFragment fragment = new MainFragment();\n Bundle args = new Bundle();\n args.putInt(ARG_SECTION_NUMBER, sectionNumber);\n fragment.setArguments(args);\n return fragment;\n }",
"public s... | [
"0.7838247",
"0.77156085",
"0.7709555",
"0.7696671",
"0.7683662",
"0.7610332",
"0.75958824",
"0.7568688",
"0.7568688",
"0.7568688",
"0.7568688",
"0.7568688",
"0.7568688",
"0.7568688",
"0.7568688",
"0.7568688",
"0.7568688",
"0.7568688",
"0.7568688",
"0.7568688",
"0.7568688",
... | 0.693593 | 65 |
Returns a new instance of this fragment for the given section number. | public static ShoppingListView newInstance(int sectionNumber) {
ShoppingListView fragment = new ShoppingListView();
Bundle args = new Bundle();
args.putInt(ARG_SECTION_NUMBER, sectionNumber);
fragment.setArguments(args);
return fragment;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static MainFragment newInstance(int sectionNumber) {\n MainFragment fragment = new MainFragment();\n Bundle args = new Bundle();\n args.putInt(ARG_SECTION_NUMBER, sectionNumber);\n fragment.setArguments(args);\n return fragment;\n }",
"public s... | [
"0.78372097",
"0.7714463",
"0.77098584",
"0.7696848",
"0.7682352",
"0.7609775",
"0.7595413",
"0.7567707",
"0.7567707",
"0.7567707",
"0.7567707",
"0.7567707",
"0.7567707",
"0.7567707",
"0.7567707",
"0.7567707",
"0.7567707",
"0.7567707",
"0.7567707",
"0.7567707",
"0.7567707",
... | 0.7176293 | 58 |
For each bit position 132 in a 32bit integer, we count the number of integers in the array which have that bit set. Then, if there are n integers in the array and k of them have a particular bit set and (nk) do not, then that bit contributes k(nk) hamming distance to the total. | public int totalHammingDistance(int[] nums) {
int total = 0, n = nums.length;
for (int j = 0; j < 32; j++) {
int bitCount = 0;
for (int i = 0; i < n; i++)
bitCount += (nums[i] >> j) & 1;
total += bitCount * (n - bitCount);
}
return tota... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int totalHammingDistance(int[] nums) {\n int result = 0;\n for(int i = 0; i <= 31; i++){\n int count = 0;\n for(int j = 0; j < nums.length; j++){\n count = count + ((nums[j] >> i) & 1);\n }\n //for each position, it contributes to this... | [
"0.7352295",
"0.7000838",
"0.6812607",
"0.67206466",
"0.66597795",
"0.6628123",
"0.660448",
"0.6579854",
"0.6545326",
"0.652761",
"0.628459",
"0.6245521",
"0.62314326",
"0.62306064",
"0.62289673",
"0.6188799",
"0.6168517",
"0.614092",
"0.61020344",
"0.6086361",
"0.605165",
... | 0.7471814 | 0 |
Created by ANKUR on 20072016. | public interface Updater
{
public void updateDate(InfoOfMessage[] message, InfoOfFriends[] friends, InfoOfFriends[] unApprovedFriends, String userKey);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"public final void mo51373a() {\n }",
"@Override\n public void perish() {\n \n }",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"private stendhal() {\n\t}",
"protected boolean func_70814_o() { return true; }",
"@Override\r\n\tpubl... | [
"0.59966314",
"0.59965855",
"0.5981421",
"0.58925474",
"0.58759946",
"0.5839179",
"0.5822678",
"0.58113015",
"0.58113015",
"0.5807731",
"0.5794981",
"0.57880265",
"0.57880265",
"0.57880265",
"0.57880265",
"0.57880265",
"0.57597804",
"0.5756298",
"0.5744667",
"0.57271975",
"0.... | 0.0 | -1 |
Instantiate and add the three components. | private void init() {
setDefaultCloseOperation(EXIT_ON_CLOSE);
controlPanel = new ControlPanel(this);
canvas = new DrawingPanel(this);
shapeController = ShapeController.getInstance();
shapeController.setFactory(new RegularPolygonShapeFactory(6, 50));
optionsPanel = new R... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void createComponents() {\n\n add(createSetDataPanel(), BorderLayout.NORTH);\n add(createResourcesListAndButtonsPanel(), BorderLayout.CENTER);\n }",
"private void addComponents() {\n\t\tadd(newGame);\n\t\tadd(nameLabel);\n\t\tadd(nameField);\n\t\tadd(addPlayer);\n\t\tadd(gameTextPane);\n... | [
"0.709369",
"0.70657325",
"0.7056586",
"0.6898017",
"0.68294",
"0.6785829",
"0.6749771",
"0.6668065",
"0.6666552",
"0.6589314",
"0.65670127",
"0.6558332",
"0.64927995",
"0.6456568",
"0.6439989",
"0.64344186",
"0.6419747",
"0.6386218",
"0.6367513",
"0.6365596",
"0.63545495",
... | 0.0 | -1 |
System.out.println(SingetonDemo.getInstance() == singetonDemo.getInstance()); System.out.println(SingetonDemo.getInstance() == singetonDemo.getInstance()); System.out.println(SingetonDemo.getInstance() == singetonDemo.getInstance()); | public static void main(String[] args) {
// System.out.println(SingetonDemo.getInstance() == singetonDemo.getInstance());
// System.out.println(SingetonDemo.getInstance() == singetonDemo.getInstance());
for (int i = 0; i < 10; i++) {
new Thread(()->{
SingetonDemo.getIn... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void testGetInstance() {\n\t\tREDFinder finder = REDFinder.getInstance();\n\t\tassertSame(\"getInstance returned not the same object.\", finder,\n\t\t\t\tREDFinder.getInstance());\n\t}",
"@Test\n public void testGetInstance() {\n\n // singleton\n assertSame(GestionnaireRaccourcis.getInst... | [
"0.6959372",
"0.6918613",
"0.69077015",
"0.68884677",
"0.6665492",
"0.66227293",
"0.6596189",
"0.6584481",
"0.65577203",
"0.6534206",
"0.65130657",
"0.6427749",
"0.63874555",
"0.6344015",
"0.62366164",
"0.6219468",
"0.6209083",
"0.61799127",
"0.6175554",
"0.6145117",
"0.61065... | 0.69486076 | 1 |
TODO Autogenerated method stub | @Override
public int hashCode() {
return id;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.66708666",
"0.65675074",
"0.65229905",
"0.6481001",
"0.64770633",
"0.64584893",
"0.6413091",
"0.63764185",
"0.6275735",
"0.62541914",
"0.6236919",
"0.6223816",
"0.62017626",
"0.61944294",
"0.61944294",
"0.61920846",
"0.61867654",
"0.6173323",
"0.61328775",
"0.61276996",
"0... | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public boolean equals(Object arg0) {
Student s=(Student)arg0;
return this.id==s.id;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.608016... | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public int compareTo(Object ob) {
Student s=(Student)ob;
return (int)((this.marks-s.marks )*(1000));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.66708666",
"0.65675074",
"0.65229905",
"0.6481001",
"0.64770633",
"0.64584893",
"0.6413091",
"0.63764185",
"0.6275735",
"0.62541914",
"0.6236919",
"0.6223816",
"0.62017626",
"0.61944294",
"0.61944294",
"0.61920846",
"0.61867654",
"0.6173323",
"0.61328775",
"0.61276996",
"0... | 0.0 | -1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.