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
Inflate the menu; this adds items to the action bar if it is present.
@Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.menu_main, menu); return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tMenuInflater inflater = getMenuInflater();\n \tinflater.inflate(R.menu.main_activity_actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {...
[ "0.7246102", "0.7201358", "0.7194834", "0.7176498", "0.71066517", "0.7039537", "0.7037961", "0.70112145", "0.70094734", "0.69807225", "0.6944953", "0.69389373", "0.6933199", "0.6916928", "0.6916928", "0.6891486", "0.68831646", "0.68754137", "0.68745375", "0.68621665", "0.6862...
0.0
-1
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.7904975", "0.78056985", "0.77671826", "0.77275974", "0.7632173", "0.7622138", "0.75856143", "0.7531176", "0.7488386", "0.74576557", "0.74576557", "0.74391466", "0.7422802", "0.7403698", "0.7392229", "0.73873955", "0.73796785", "0.737091", "0.73627585", "0.7356357", "0.7346...
0.0
-1
Method for move activity with Intent
public void moveActivity(Class<?> kelas){ context.startActivity(new Intent(context,kelas)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void moveActivity(Class<?> kelas, Bundle bundle){\n Intent i = new Intent(context,kelas);\n i.putExtras(bundle);\n context.startActivity(i);\n }", "@Override\n public void onClick(View v) {\n startActivity(new Intent(StartPage.this,SafeMove.class));\n ...
[ "0.73907644", "0.70009375", "0.6932872", "0.6835294", "0.6684677", "0.66437477", "0.6638063", "0.66059566", "0.65932816", "0.6570239", "0.6474376", "0.64682364", "0.64664716", "0.64555275", "0.64298296", "0.6415103", "0.64018226", "0.63767064", "0.63485044", "0.62605757", "0....
0.7355048
1
Method for move activity and store data to destination activity
public void moveActivity(Class<?> kelas, Bundle bundle){ Intent i = new Intent(context,kelas); i.putExtras(bundle); context.startActivity(i); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void moveToActivity(ShenFenBean.DataBean dataBean) {\n }", "public void transferActivity() {\n Intent intent = new Intent(this, AddInfoActivity.class);\n this.startActivity(intent);\n }", "public static void moveNextActivity(Activity source, Class<?> destinationClass, ...
[ "0.6555605", "0.6531616", "0.6115225", "0.61043096", "0.5912301", "0.5895115", "0.57996696", "0.5717232", "0.5678976", "0.5651664", "0.5649727", "0.5633641", "0.5601695", "0.557831", "0.55229646", "0.5513582", "0.5511453", "0.55071414", "0.5491255", "0.5444305", "0.5443947", ...
0.599201
4
Method for switch or replace fragment from activity
public void switchFragment(@NonNull FragmentManager fragmentManager, @IdRes int containerViewId, @NonNull Fragment fragment, @NonNull String fragmentTag, @Nullable String backStackStateName) { fragmentManager .beginTransaction() .replace(containerViewId, fragment, fragmentTag) .addToBackStack(backStackStateName) .commit(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void replaceFragment(int pos) {\n Fragment fragment = null;\n switch (pos) {\n case 0:\n //mis tarjetas\n fragment = new CardsActivity();\n break;\n case 1:\n //buscador online\n fragment = new Ca...
[ "0.7797709", "0.75660974", "0.7544844", "0.7506351", "0.7496252", "0.74201924", "0.7405932", "0.7370361", "0.7282019", "0.72651756", "0.72621375", "0.7246042", "0.71788585", "0.71479625", "0.71479625", "0.7126492", "0.70144284", "0.70045656", "0.70045656", "0.7000446", "0.698...
0.0
-1
precondition: m > 0 && gcd(a, m) = 1
public static long modInverse(long a, long m) { a = mod(a, m); return a == 0 ? 0 : mod((1 - modInverse(m % a, a) * m) / a, m); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static int gcd(int m, int n) {\n if (n == 0)\n return m;\n else\n return gcd(n, m % n);\n }", "private static int gcd(int m, int n)\n {\n int mx = Math.max(m, n);\n int mn = Math.min(m, n);\n int remainder = 1;\n while (remainder != 0)...
[ "0.7717711", "0.76580197", "0.75578433", "0.7540945", "0.73892605", "0.72917897", "0.721865", "0.7160687", "0.6791751", "0.67709833", "0.6647628", "0.66226494", "0.6606749", "0.66059357", "0.64897835", "0.64283854", "0.64011943", "0.6376706", "0.63547117", "0.62892634", "0.62...
0.0
-1
TODO Autogenerated method stub
@Override public void onActivityCreated(Bundle savedInstanceState) { super.onActivityCreated(savedInstanceState); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
TODO Autogenerated method stub
@Override public void onResume() { super.onResume(); }
{ "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
Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
public static DataTransferConfig get(String name, Output<String> id, @Nullable DataTransferConfigState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new DataTransferConfig(name, id, state, options); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n @Transactional\n public State getState(long id) {\n Optional<State> result = stateRepository.findById(id);\n State state = null;\n if (result.isPresent()) {\n state = result.get();\n }\n else {\n throw new NotFoundException(\"Did not find s...
[ "0.55552137", "0.5303236", "0.5266404", "0.52128243", "0.51690173", "0.5071365", "0.50659233", "0.5059869", "0.5013853", "0.49337783", "0.48819798", "0.48624894", "0.47853798", "0.47695345", "0.47502232", "0.47008017", "0.4657893", "0.45889813", "0.4565367", "0.45538706", "0....
0.0
-1
TODO Autogenerated method stub
@Override public void actionPerformed(ActionEvent e) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
TODO Autogenerated method stub
@Override public void run() { Log.i("-------->localVersion", localVersion + ""); try { // String str = share.getString(getApplicationContext(), // "version_code", null); // localVersion = Double.parseDouble(str); localVersion = getPackageManager().getPackageInfo( getPackageName(), 0).versionCode; Httptool http = new Httptool(); List<NameValuePair> params = new ArrayList<NameValuePair>(); JSONObject obj = new JSONObject(http.httppost( Urllist.sender_check_version, params)); if (obj.getString("success").equals("true")) { JSONObject jsonObject = obj.getJSONObject("obj"); serverVersion = jsonObject.getDouble("version_num"); String version_code = jsonObject.getString("version_code"); // Log.i("--------->app_version", version_code + ""); share.saveString(getApplicationContext(), "version_code", version_code); } else { } Log.i("-------->localVersion", localVersion + ""); Log.i("-------->serverVersion", serverVersion + ""); if (localVersion == serverVersion) { Log.i("--------->", "版本号相同无需升级"); // LoginMain(); } else { // Log.i(TAG,"版本号不同 ,提示用户升级 "); Message msg = new Message(); msg.what = UPDATA_CLIENT; handler.sendMessage(msg); } } catch (Exception e) { // 待处理 Message msg = new Message(); msg.what = GET_UNDATAINFO_ERROR; handler.sendMessage(msg); e.printStackTrace(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
TODO Autogenerated method stub LoginMain();
public void onClick(DialogInterface dialog, int which) { System.exit(0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void Login() \r\n\t{\n\t\t\r\n\t}", "Login() { \n }", "public Login() {\r\n\t\tinitialize();\r\n\t}", "public static void main(String[] args) {\n\t\tLogin ms=new Login();\n\t\t\n\t\t\t\t\t\t\n\t}", "protected void login() {\n\t\t\r\n\t}", "public static void main(String[] args) {\n\t\tLo...
[ "0.8010081", "0.77184755", "0.7523762", "0.7512945", "0.7455683", "0.74342096", "0.7420837", "0.7349375", "0.73163277", "0.72870654", "0.71739966", "0.7157629", "0.70785713", "0.7033152", "0.7022623", "0.7003637", "0.698385", "0.69800526", "0.69641304", "0.6956959", "0.693805...
0.0
-1
TODO Autogenerated method stub
@Override protected void onResume() { super.onResume(); MobclickAgent.onResume(this); }
{ "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 protected void onPause() { super.onPause(); MobclickAgent.onPause(this); }
{ "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
The container for the robot. Contains subsystems, OI devices, and commands.
public RobotContainer() { // Create OI devices: gameController = new XboxController(OIConstants.xboxControllerPort); leftStick = new Joystick(OIConstants.leftJoystickPort); rightStick = new Joystick(OIConstants.rightJoystickPort); // Create subsystems: driveTrain = new DriveTrain(); shooter = new Shooter(gameController); turret = new Turret(gameController); intake = new Intake(); indexer = new Indexer(); climber = new Climber(gameController); // Create camera: limelightCamera = LimelightCamera.getInstance(); // Configure default commands: driveTrain.setDefaultCommand(new DriveWithJoysticks(driveTrain, leftStick, rightStick)); turret.setDefaultCommand(new RunTurretWithGameController(turret, gameController)); climber.setDefaultCommand(new RunClimberWithGameController(climber, gameController)); // Configure the button bindings configureButtonBindings(); initSmartDashboard(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public RobotContainer() {\n \n camServer = CameraServer.getInstance();\n driveCam = camServer.startAutomaticCapture(\"Driver View\", 0);\n driveCam.setResolution(160, 120);\n driveCam.setFPS(15);\n driveCam.setBrightness(50);\n // cameraThreader.start();\n\n leftJoy = new Joystick(LEFT_JOY_...
[ "0.7370769", "0.7274102", "0.72612125", "0.71421796", "0.7111673", "0.69013107", "0.68398744", "0.68231887", "0.6773327", "0.6603871", "0.65173554", "0.65022916", "0.65022916", "0.645273", "0.6354744", "0.6346953", "0.6323018", "0.6300003", "0.62191594", "0.6199752", "0.61974...
0.81112903
0
Tests that if the data object return all the data for an IP city the listener properly populates the tags.
@Test public void testThatIfAllDataIsProvidedAllGeoIpTagsAreSet() { final SettingValue settings = context.mock(SettingValue.class); context.checking(new Expectations() { { allowing(settings).getBooleanValue(); will(returnValue(Boolean.TRUE)); } }); SettingsReader settingsReader = new CachedSettingsReaderImpl() { @Override public SettingValue getSettingValue(final String path) { if ("COMMERCE/SYSTEM/GEOIP/enable".equals(path)) { return settings; } return null; } }; listener = new GeoIpTagger(); listener.setSettingsReader(settingsReader); geoIpService = new GeoIpService() { public GeoIpLocation resolveIpAddress(final String ipAddress) { GeoIpLocation geoIpLocation = new GeoIpLocationImpl(); geoIpLocation.setZipCode(ZIP_OR_POST_CODE); geoIpLocation.setCountryCode(COUNTRY_CODE); geoIpLocation.setState(STATE_OR_PROVINCE); geoIpLocation.setConnectionType(CONNECTION_TYPE); geoIpLocation.setIpRoutingType(ROUTING_TYPE); geoIpLocation.setCity(CITY); geoIpLocation.setTopLevelDomain(FIRST_LEVEL_DOMAIN); geoIpLocation.setSecondLevelDomain(SECOND_LEVEL_DOMAIN); geoIpLocation.setGmtTimeZone(GMT_TIME_ZONE); geoIpLocation.setContinent(CONTINENT); return geoIpLocation; } public void setProvider(final GeoIpProvider provider) { // Does nothing. } }; listener.setGeoProviderService(geoIpService); context.checking(new Expectations() { { allowing(session).getCustomerTagSet(); will(returnValue(tagSet)); } }); listener.execute(session, requestFacade); assertTag(ZIP_OR_POST_CODE, GeoIpTagger.GEOIP_ZIP_OR_POST_CODE, tagSet); assertTag(COUNTRY_CODE, GeoIpTagger.GEOIP_COUNTRY_CODE, tagSet); assertTag(STATE_OR_PROVINCE, GeoIpTagger.GEOIP_STATE_OR_PROVINCE, tagSet); assertTag(CONNECTION_TYPE, GeoIpTagger.GEOIP_CONNECTION_TYPE, tagSet); assertTag(ROUTING_TYPE, GeoIpTagger.GEOIP_ROUTING_TYPE, tagSet); assertTag(CITY, GeoIpTagger.GEOIP_CITY, tagSet); assertTag(FIRST_LEVEL_DOMAIN, GeoIpTagger.GEOIP_FIRST_LEVEL_DOMAIN, tagSet); assertTag(SECOND_LEVEL_DOMAIN, GeoIpTagger.GEOIP_SECOND_LEVEL_DOMAIN, tagSet); assertTag(GMT_TIME_ZONE, GeoIpTagger.GEOIP_GMT_TIME_ZONE, tagSet); assertTag(CONTINENT, GeoIpTagger.GEOIP_CONTINENT, tagSet); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test(priority = 3)\n\tpublic void verify_Weather_Data_Appears_OnSearching_By_City() {\n\t\tweatherResponse_city = WeatherAPI.getWeatherInfo(ReadWrite.getProperty(\"Noida_City\"),\n\t\t\t\tConfigFileReader.getProperty(\"appid\"), 200);\n\n\t}", "@Test\n\tpublic void testThatIfDataIsNullGeoIpTaggerIsNullSafe() {\...
[ "0.58097756", "0.5661796", "0.56139845", "0.5369397", "0.534773", "0.5290454", "0.528051", "0.52413684", "0.5191477", "0.5156998", "0.51458615", "0.512689", "0.51170826", "0.5057913", "0.5013855", "0.5001081", "0.49917918", "0.49373758", "0.4911074", "0.49063563", "0.48987457...
0.6066669
0
Tests that if the data object returns as null for an IP the listener does not populates tags and does not crash.
@Test public void testThatIfDataIsNullGeoIpTaggerIsNullSafe() { final SettingValue settings = context.mock(SettingValue.class); context.checking(new Expectations() { { allowing(settings).getBooleanValue(); will(returnValue(Boolean.TRUE)); } }); SettingsReader settingsReader = new CachedSettingsReaderImpl() { @Override public SettingValue getSettingValue(final String path) { if ("COMMERCE/SYSTEM/GEOIP/enable".equals(path)) { return settings; } return null; } }; listener = new GeoIpTagger(); listener.setSettingsReader(settingsReader); geoIpService = new GeoIpService() { public GeoIpLocation resolveIpAddress(final String ipAddress) { return null; } public void setProvider(final GeoIpProvider provider) { // Does nothing. } }; listener.setGeoProviderService(geoIpService); context.checking(new Expectations() { { allowing(session).getCustomerTagSet(); will(returnValue(tagSet)); } }); listener.execute(session, requestFacade); assertNullTag(GeoIpTagger.GEOIP_ZIP_OR_POST_CODE, tagSet); assertNullTag(GeoIpTagger.GEOIP_COUNTRY_CODE, tagSet); assertNullTag(GeoIpTagger.GEOIP_STATE_OR_PROVINCE, tagSet); assertNullTag(GeoIpTagger.GEOIP_CONNECTION_TYPE, tagSet); assertNullTag(GeoIpTagger.GEOIP_ROUTING_TYPE, tagSet); assertNullTag(GeoIpTagger.GEOIP_CITY, tagSet); assertNullTag(GeoIpTagger.GEOIP_FIRST_LEVEL_DOMAIN, tagSet); assertNullTag(GeoIpTagger.GEOIP_SECOND_LEVEL_DOMAIN, tagSet); assertNullTag(GeoIpTagger.GEOIP_GMT_TIME_ZONE, tagSet); assertNullTag(GeoIpTagger.GEOIP_CONTINENT, tagSet); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onDataNotAvailable() {\n Log.d(TAG, \"onDataNotAvailable: \");\n }", "@Test(expected = IllegalArgumentException.class)\r\n public void testDetectWithNullData() throws Exception {\r\n instance.detect(null);\r\n }", "public boolean hasData() {\n return (tags !...
[ "0.5871683", "0.5857135", "0.5729066", "0.5714618", "0.57099617", "0.568011", "0.55752563", "0.5356236", "0.5338289", "0.5328565", "0.5291821", "0.5238558", "0.5157908", "0.5149172", "0.5135718", "0.5128851", "0.5119347", "0.5111161", "0.5108809", "0.51032495", "0.5090493", ...
0.6108139
0
Tests that geoip tags are empty in spite of existing stub values in case of GEO IP setting value is set to FALSE.
@Test public void testGeoIpTaggingEventIsDisabled() { final SettingValue settings = context.mock(SettingValue.class); context.checking(new Expectations() { { allowing(settings).getBooleanValue(); will(returnValue(Boolean.FALSE)); } }); SettingsReader settingsReader = new CachedSettingsReaderImpl() { @Override public SettingValue getSettingValue(final String path) { if ("COMMERCE/SYSTEM/GEOIP/enable".equals(path)) { return settings; } return null; } }; listener = new GeoIpTagger(); listener.setSettingsReader(settingsReader); geoIpService = new GeoIpService() { public GeoIpLocation resolveIpAddress(final String ipAddress) { GeoIpLocation geoIpLocation = new GeoIpLocationImpl(); geoIpLocation.setZipCode(ZIP_OR_POST_CODE); geoIpLocation.setCountryCode(COUNTRY_CODE); geoIpLocation.setState(STATE_OR_PROVINCE); geoIpLocation.setConnectionType(CONNECTION_TYPE); geoIpLocation.setIpRoutingType(ROUTING_TYPE); geoIpLocation.setCity(CITY); geoIpLocation.setTopLevelDomain(FIRST_LEVEL_DOMAIN); geoIpLocation.setSecondLevelDomain(SECOND_LEVEL_DOMAIN); geoIpLocation.setGmtTimeZone(GMT_TIME_ZONE); geoIpLocation.setContinent(CONTINENT); return geoIpLocation; } public void setProvider(final GeoIpProvider provider) { // Does nothing. } }; listener.setGeoProviderService(geoIpService); context.checking(new Expectations() { { allowing(session).getCustomerTagSet(); will(returnValue(tagSet)); } }); listener.execute(session, requestFacade); assertNullTag(GeoIpTagger.GEOIP_ZIP_OR_POST_CODE, tagSet); assertNullTag(GeoIpTagger.GEOIP_COUNTRY_CODE, tagSet); assertNullTag(GeoIpTagger.GEOIP_STATE_OR_PROVINCE, tagSet); assertNullTag(GeoIpTagger.GEOIP_CONNECTION_TYPE, tagSet); assertNullTag(GeoIpTagger.GEOIP_ROUTING_TYPE, tagSet); assertNullTag(GeoIpTagger.GEOIP_CITY, tagSet); assertNullTag(GeoIpTagger.GEOIP_FIRST_LEVEL_DOMAIN, tagSet); assertNullTag(GeoIpTagger.GEOIP_SECOND_LEVEL_DOMAIN, tagSet); assertNullTag(GeoIpTagger.GEOIP_GMT_TIME_ZONE, tagSet); assertNullTag(GeoIpTagger.GEOIP_CONTINENT, tagSet); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n\tpublic void testThatIfDataIsNullGeoIpTaggerIsNullSafe() {\n\n\t\tfinal SettingValue settings = context.mock(SettingValue.class);\n\t\tcontext.checking(new Expectations() {\n\t\t\t{\n\t\t\t\tallowing(settings).getBooleanValue();\n\t\t\t\twill(returnValue(Boolean.TRUE));\n\n\t\t\t}\n\t\t});\n\t\t\n\t\tSetti...
[ "0.7413378", "0.69397706", "0.56026393", "0.55132174", "0.5485802", "0.546599", "0.5382692", "0.53818244", "0.53199023", "0.5298842", "0.5295111", "0.52597785", "0.52597785", "0.52597785", "0.52597785", "0.52539563", "0.52344495", "0.5230521", "0.5229304", "0.521559", "0.5211...
0.6824084
2
Test that the tagger doesn't allow exceptions with the geoip provider to leak out to the client.
@Test public void testGeoIpTaggingEventCatchesExceptions() { SettingsReader settingsReader = new CachedSettingsReaderImpl() { @Override public SettingValue getSettingValue(final String path) { throw new IllegalStateException("Simulated geoip issue"); } }; listener = new GeoIpTagger(); listener.setSettingsReader(settingsReader); try { listener.execute(session, requestFacade); // We should get here without an exception } catch (IllegalStateException e) { fail("Exception should not be received by tagger's client"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n\tpublic void testGeoIpTaggingEventIsDisabled() {\n\n\t\tfinal SettingValue settings = context.mock(SettingValue.class);\n\t\tcontext.checking(new Expectations() {\n\t\t\t{\n\t\t\t\tallowing(settings).getBooleanValue();\n\t\t\t\twill(returnValue(Boolean.FALSE));\n\n\t\t\t}\n\t\t});\n\t\t\n\t\tSettingsReader...
[ "0.6754113", "0.66769165", "0.5856459", "0.5673557", "0.5553274", "0.53879124", "0.5376186", "0.53367907", "0.52472377", "0.5239745", "0.5154862", "0.51423615", "0.51418555", "0.5111742", "0.50967634", "0.50412905", "0.5030289", "0.5022889", "0.5016819", "0.49674174", "0.4948...
0.7490025
0
TODO Autogenerated method stub
public static void main(String[] args) { QueueUsingLinkedList queue = new QueueUsingLinkedList(); queue.enqueue(6); queue.dequeue(); queue.enqueue(3); queue.enqueue(99); queue.enqueue(56); queue.dequeue(); queue.enqueue(43); queue.dequeue(); queue.enqueue(89); queue.enqueue(77); queue.dequeue(); queue.enqueue(32); queue.enqueue(232); }
{ "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
simulates the spring's bouncing function
public void boingg(Player player) { if (player.getCircle().getBoundsInParent().intersects(right.getBoundsInParent())) { if ((int) player.normalVelocityX == 0) { player.normalVelocityX = 4; } else { player.normalVelocityX = Math.abs(player.normalVelocityX) * springiness; } } else if (player.getCircle().getBoundsInParent().intersects(left.getBoundsInParent())) { if ((int) player.normalVelocityX == 0) { player.normalVelocityX = -4; } else { player.normalVelocityX = Math.abs(player.normalVelocityX) * -springiness; } } else { player.normalVelocityX *= springiness; } player.normalVelocityY *= -springiness; player.angularVelocity *= -springiness; rectangle.setFill(AssetManager.springSkin(false)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void bounce() {\n angle = -angle;\n }", "@Override\n\tpublic void collision(Ball ball) {\n PhysicsComponent gadgetPartToCollideWith = this.physicsComponentList.get(0);\n double minTimeUntilCollision = Double.MAX_VALUE;\n for(PhysicsComponent gadgetPart: physicsComponentList)...
[ "0.649482", "0.6351726", "0.6295301", "0.6277593", "0.6271051", "0.6256388", "0.62456596", "0.6221506", "0.61851484", "0.6171978", "0.6135035", "0.61156005", "0.6114649", "0.6111395", "0.6097381", "0.60611874", "0.6051932", "0.60368973", "0.60232", "0.60225075", "0.6003008", ...
0.6052591
16
/ Sample code to perform I/O: Use either of these methods for input BufferedReader BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String name = br.readLine(); // Reading input from STDIN System.out.println("Hi, " + name + "."); // Writing output to STDOUT Scanner Scanner s = new Scanner(System.in); String name = s.nextLine(); // Reading input from STDIN System.out.println("Hi, " + name + "."); // Writing output to STDOUT Write your code here
public static void main(String args[] ) throws Exception { Scanner s = new Scanner(System.in); String arrSizeAndNumber = s.nextLine(); String number = arrSizeAndNumber.split(" ")[1]; List<String> numbers = Arrays.asList(s.nextLine().split(" ")); AtomicInteger i= new AtomicInteger(1); AtomicInteger pos= new AtomicInteger(1); numbers.forEach((value)-> { if (value.equals(number)) pos.set(i.get()); i.getAndIncrement(); }); System.out.println(pos); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String[] arg) {\n\t\tBufferedReader br = new BufferedReader(\r\n\t\t new FileReader(\"input.in\"));\r\n\r\n\t\t// PrintWriter class prints formatted representations\r\n\t\t// of objects to a text-output stream.\r\n\t\tPrintWriter pw = new PrintWriter(new\r\n\t\t ...
[ "0.71852493", "0.7099826", "0.7045566", "0.7039867", "0.6963449", "0.68596566", "0.68502146", "0.6837287", "0.6831356", "0.68036014", "0.6798455", "0.6795513", "0.67697936", "0.66903967", "0.66747373", "0.65946186", "0.6573625", "0.6552213", "0.655078", "0.65035534", "0.64953...
0.0
-1
Created by kobe73er on 16/12/3.
public interface OrderService { void makeOrder(Order order); }
{ "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}", "public fina...
[ "0.61094207", "0.5972075", "0.5922198", "0.58368415", "0.58266306", "0.58266306", "0.58057964", "0.5751233", "0.57461023", "0.57311165", "0.57128036", "0.5687164", "0.56699634", "0.5665371", "0.5645419", "0.5640802", "0.56388235", "0.56370574", "0.5629272", "0.5626286", "0.56...
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.dashboard, menu); applyMenuThemeElements(menu, Color.WHITE); 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.72497207", "0.72041494", "0.7198533", "0.71808106", "0.71110344", "0.7044596", "0.7042557", "0.7015272", "0.70119643", "0.6984017", "0.6950008", "0.6944079", "0.6937662", "0.6921333", "0.6921333", "0.6894039", "0.6887707", "0.6880534", "0.68777215", "0.6867014", "0.6867014...
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_sync) { SyncManager.getInstance().startSync(this, getUserCredentials()); 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.7904669", "0.78062934", "0.77666116", "0.7727495", "0.7631956", "0.7622029", "0.75855523", "0.7530999", "0.7488249", "0.74583405", "0.74583405", "0.74391454", "0.742199", "0.7403733", "0.73921114", "0.7387281", "0.73795027", "0.73708874", "0.7363864", "0.7356251", "0.73459...
0.0
-1
Constructs an instance of this class.
public IllegalBlockingModeException() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Instantiation(){}", "Constructor() {\r\n\t\t \r\n\t }", "Reproducible newInstance();", "protected abstract void construct();", "public Instance() {\n }", "public Constructor(){\n\t\t\n\t}", "Instance createInstance();", "public Factory() {\n\t\tsuper();\n\t}", "public static Construtor c...
[ "0.7467778", "0.6828773", "0.67995214", "0.6750359", "0.6742812", "0.67366767", "0.65433073", "0.6446909", "0.6440812", "0.6429115", "0.63810164", "0.63770944", "0.6354002", "0.6354002", "0.6354002", "0.6351866", "0.63376313", "0.63376313", "0.63114053", "0.631082", "0.630148...
0.0
-1
Parametrized constructor for codemessage response.
public CodeMessage(HttpStatus code, T message) { this.code = code.value(); this.message = message; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public CodeMessage(Integer code, T message) {\n this.code = code;\n this.message = message;\n }", "public StatusMessage(int code, String message) {\n _code = code;\n _message = message;\n }", "private ResponseStatus(int code) {\n this.code = code;\n this.formatted = form...
[ "0.76956517", "0.7364523", "0.72891206", "0.7199849", "0.7190642", "0.6846862", "0.6844014", "0.68140846", "0.6762371", "0.6668776", "0.6632801", "0.658675", "0.65505517", "0.6484495", "0.6469561", "0.64020544", "0.6380098", "0.6328559", "0.6318873", "0.6250418", "0.6238609",...
0.74589777
1
Parametrized constructor for codemessage response.
public CodeMessage(Integer code, T message) { this.code = code; this.message = message; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public CodeMessage(HttpStatus code, T message) {\n this.code = code.value();\n this.message = message;\n }", "public StatusMessage(int code, String message) {\n _code = code;\n _message = message;\n }", "private ResponseStatus(int code) {\n this.code = code;\n this.forma...
[ "0.74589777", "0.7364523", "0.72891206", "0.7199849", "0.7190642", "0.6846862", "0.6844014", "0.68140846", "0.6762371", "0.6668776", "0.6632801", "0.658675", "0.65505517", "0.6484495", "0.6469561", "0.64020544", "0.6380098", "0.6328559", "0.6318873", "0.6250418", "0.6238609",...
0.76956517
0
NOTE THIS will fail under duplicates
public static int findLargest(int[] data){ int lo=0, hi=data.length-1; int mid = (lo+hi)/2; int N = data.length-1; while (lo <= hi){ int val = data[mid]; if(mid == 0 ) return (val > data[mid+1]) ? mid : -1; else if(mid == N) return (val > data[mid-1]) ? mid : -1; else{ int prev = data[mid-1]; int next = data[mid+1]; if(prev < val && val < next) lo=mid+1; else if(prev > val && val > next) hi = mid-1; else return mid; // prev > val && val > next // is the only other case mid = (lo+hi)/2; } } return -1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static void findDuplicate()\n\t{\n\n\t\tList<String> oList = null;\n\t\tSet<String> oSet = null;\n\t\ttry {\n\t\t\toList = new ArrayList<String>();\n\t\t\toList.add(\"Apple\");\n\t\t\toList.add(\"Boy\");\n\t\t\toList.add(\"Frog\");\n\t\t\toList.add(\"Dog\");\n\t\t\toList.add(\"Eagle\");\n\t\t\toList.add(\"Frog\");...
[ "0.59617", "0.5762889", "0.5714993", "0.5604087", "0.55982876", "0.55968034", "0.5503873", "0.545355", "0.5442686", "0.53912914", "0.53780526", "0.53741896", "0.5364216", "0.53490233", "0.53280973", "0.52819854", "0.5259271", "0.525367", "0.52417535", "0.5233024", "0.52270544...
0.0
-1
common logging deleging methods
@Override public boolean isDebugEnabled() { return innerLog.isDebugEnabled(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract protected void logInternal(int level, String message);", "void initializeLogging();", "abstract void initiateLog();", "public interface Log {\n\n /**\n * This is a method description.\n *\n * <p>Another description after blank line.\n *\n * @param handler 添加handler.\n * @author admin\n ...
[ "0.688363", "0.6878747", "0.6856045", "0.6832539", "0.68265665", "0.6758267", "0.6736297", "0.66813004", "0.6660159", "0.66268533", "0.66222537", "0.657637", "0.6555756", "0.6550367", "0.65261537", "0.65232015", "0.65200126", "0.6519301", "0.64989036", "0.6495042", "0.6487859...
0.0
-1
get timezone by city name or zone id
public TimeZone getTimeZone(String zoneId, String cityName) { if(zoneId != null && !zoneId.isEmpty()) { return getTimeZoneById(zoneId); } else { return getTimeZoneByCityName(cityName); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public TimeZone getTimeZoneByCityName(String name) {\n String arg = name.trim().replaceAll(\"\\\\s\", \"_\");\n for(String zoneId : zoneIds) {\n if(zoneId.endsWith(\"/\" + arg)) {\n return TimeZone.getTimeZone(zoneId);\n }\n }\n return TimeZone.getTi...
[ "0.76821387", "0.75378734", "0.7019594", "0.6992416", "0.67590123", "0.6692135", "0.6639967", "0.6436294", "0.62945575", "0.6127682", "0.60283864", "0.5997165", "0.5982608", "0.5952842", "0.5830467", "0.5786778", "0.5745131", "0.57436436", "0.57340294", "0.5703695", "0.567481...
0.6867261
4
get time zone by city name
public TimeZone getTimeZoneByCityName(String name) { String arg = name.trim().replaceAll("\\s", "_"); for(String zoneId : zoneIds) { if(zoneId.endsWith("/" + arg)) { return TimeZone.getTimeZone(zoneId); } } return TimeZone.getTimeZone("UTC"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "java.lang.String getZone();", "java.lang.String getTimeZone();", "int getUserTimeZoneCode();", "public static TimeZone getTimeZone(String ID);", "public static android.icu.util.TimeZone getTimeZone(java.lang.String ID, int type) { throw new RuntimeException(\"Stub!\"); }", "public TimeZone getTimeZone(St...
[ "0.6750941", "0.66984534", "0.64588976", "0.64141417", "0.63672", "0.6301809", "0.6276733", "0.6150724", "0.6113972", "0.61093223", "0.6080405", "0.6062269", "0.60261625", "0.59866863", "0.5938791", "0.59144866", "0.58501047", "0.58225906", "0.579204", "0.5784864", "0.5634262...
0.7766636
0
non static method 1.return type is void
public void test( ){ System.out.println("test method"); //no input, no output }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "void berechneFlaeche() {\n\t}", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "public void mo38117a() {\n }", "public void mo11518...
[ "0.71995467", "0.71995467", "0.715561", "0.7148536", "0.701119", "0.70076656", "0.69857234", "0.695496", "0.6942267", "0.69185346", "0.690953", "0.6906319", "0.6905464", "0.6892684", "0.68846077", "0.68683183", "0.6863055", "0.6862594", "0.68614626", "0.68600374", "0.6847897"...
0.0
-1
2.here void des't return type return type is int method name(value)
public int value(){ // no input , some output System.out.println("value method"); int a = 10; int b = 20; int c = a+b; return c ; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int returnInt(int x);", "public int a()\n {\n return 2;\n }", "static int type_of_ret(String passed){\n\t\treturn 1;\n\t}", "int getMethodValue();", "public int intValue();", "protected abstract int getValue(int paramInt);", "public int value();", "public int test1()\n\t{\n...
[ "0.6935009", "0.6858754", "0.66562825", "0.6614192", "0.661159", "0.6568024", "0.6549974", "0.65367573", "0.65359694", "0.6485062", "0.6484588", "0.6484588", "0.6484588", "0.64782244", "0.6474884", "0.64692897", "0.6455515", "0.6448876", "0.6438026", "0.64296204", "0.6427706"...
0.0
-1
return type is String
public String text(){ // no input , some output System.out.println("text method"); String s = "selenium"; return s ; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "String getString();", "String getString();", "String getString();", "public String asString();", "public String getString();", "String getTypeAsString();", "String getStringValue();", "String getStringValue();", "public abstract String getString();", "public abstract String getString();", "@Ove...
[ "0.7749604", "0.7749604", "0.7749604", "0.77062136", "0.76669776", "0.7305559", "0.7302393", "0.7302393", "0.7287804", "0.7287804", "0.7258937", "0.7234671", "0.7182717", "0.717542", "0.717542", "0.71523696", "0.71523696", "0.71135503", "0.7101139", "0.7093752", "0.70641077",...
0.0
-1
Inflate the layout for this fragment
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View view=inflater.inflate(R.layout.fragment_init, container, false); bt_connect = (Button) view.findViewById(R.id.server_Connect); bt_connect.setOnClickListener(new Button.OnClickListener() { public void onClick(View v) { // connect server connector.execute("get",Consts.SERVER_IP); Toast.makeText(getContext(),"connect Server is successed",Toast.LENGTH_SHORT); } }); bt_start = (Button) view.findViewById(R.id.moudle_start); bt_start.setOnClickListener(this); bt_stop = (Button) view.findViewById(R.id.moudle_stop); bt_stop.setOnClickListener(this); return view; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_main_allinfo, container, false);\n }", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup...
[ "0.6739604", "0.67235583", "0.6721706", "0.6698254", "0.6691869", "0.6687986", "0.66869223", "0.6684548", "0.66766286", "0.6674615", "0.66654444", "0.66654384", "0.6664403", "0.66596216", "0.6653321", "0.6647136", "0.66423255", "0.66388357", "0.6637491", "0.6634193", "0.66251...
0.0
-1
get current movie and load new intent with its details
@Override public void onItemClick(AdapterView<?> parent, View view, int position, long id) { MovieWithDetails movie = movies.get((NUM_ITEMS_PER_PAGE * increment) + position); Intent singleMovie = new Intent(ListViewActivity.this, SingleMovieActivity.class); singleMovie.putExtra("title", movie.getMovie().getTitle()); singleMovie.putExtra("year", String.valueOf(movie.getMovie().getYear())); singleMovie.putExtra("director", movie.getMovie().getDirector()); ArrayList<String> genres = new ArrayList<>(); ArrayList<String> stars = new ArrayList<>(); for (Genre g : movie.getGenres()) { genres.add(g.getName()); } for (Star s : movie.getStars()) { stars.add(s.getName()); } singleMovie.putStringArrayListExtra("genres", genres); singleMovie.putStringArrayListExtra("stars", stars); startActivity(singleMovie); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onClick(View view) {\n Intent intent = new Intent(context, MovieTrailerActivity.class); // makes intent\n\n // grab videolink\n//\n// String url = API_BASE_URL + \"/movie/\" + movie.getId() + \"/videos\"; // create url -- endpoint is v...
[ "0.6655388", "0.6619947", "0.66100174", "0.65515405", "0.64961934", "0.6376248", "0.6355445", "0.6333472", "0.6248669", "0.6167649", "0.6152692", "0.6120177", "0.6054631", "0.60390866", "0.60335374", "0.6000332", "0.59559655", "0.59319174", "0.5867516", "0.5865648", "0.580403...
0.608863
12
Lists all available metadata
public static ColumnData listTables(File home, String catalog, String schemaPattern, String tableNamePattern, String[] types) { Column[] columns = {new Column("Table1"), new Column("Table2"), new Column("Table3"), new Column("Table4")}; Data data = new Data(columns); CSVFileFilter ff = new CSVFileFilter(); for (String type : types) { if (type.equalsIgnoreCase("table")) { for (File f : home.listFiles((FileFilter) ff)) { String name = f.getName(); String tableName = name.substring(0, name.length() - 4); data.add(new String[]{tableName, tableName, tableName, tableName}); } } else if (type.equalsIgnoreCase("view")) { for (File f : home.listFiles(new SqlQueryFileFilter())) { String name = f.getName(); String tableName = name.substring(0, name.length() - 4); data.add(new String[]{tableName, tableName, tableName, tableName}); } } } return data; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Map<String, Object> getAllMetadata();", "List<MediaMetadata> getAll();", "java.util.List<java.lang.String>\n getMetadataList();", "java.util.List<java.lang.String>\n getMetadataList();", "public java.util.List<MetadataEntry> getMetadataList() {\n return metadata_;\n }", "java.util.Lis...
[ "0.8067605", "0.7654299", "0.7459768", "0.7459768", "0.7320178", "0.7096759", "0.7096759", "0.7096759", "0.7096759", "0.7096759", "0.6922535", "0.68671495", "0.6754415", "0.66427284", "0.6633401", "0.66253036", "0.6621319", "0.65394956", "0.64276284", "0.64237916", "0.6420975...
0.0
-1
we can use Traverson for traversing, and use RestTemplate to update the data
public IngredientModel addIngredient(Ingredient ingredient) { Traverson traverson = allIngredientsTraverson(); // use Traverson to navigate and get associated URL String ingredientsUrl = traverson.follow("ingredients").asLink().getHref(); // use RestTemplate to use REST services return restTemplate.postForObject(ingredientsUrl, ingredient, IngredientModel.class); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected abstract ResponseEntity<T> doRequest(String nextHref, RestTemplate template,\n HttpEntity<?> requestEntity);", "public interface LibraryService {\n\n /*\n\n 1.Search--Keyword\n 2.Get List\n A.Order by created time\n B.Refresh and ...
[ "0.5544333", "0.5461358", "0.53919774", "0.5374732", "0.5334392", "0.52927047", "0.52499384", "0.5233779", "0.51980615", "0.5176596", "0.5174298", "0.5173799", "0.51388305", "0.51082563", "0.5107156", "0.50481915", "0.50378054", "0.50155395", "0.5015503", "0.5006885", "0.5001...
0.0
-1
create Traverson as a HATEOAS/HAL JSON
public Traverson allIngredientsTraverson() { Traverson traverson = new Traverson(URI.create(INGREDIENTS_URI), MediaTypes.HAL_JSON); return traverson; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Tamagotchi tamagotchiToJson(JSONObject jsonObject) {\n String name = jsonObject.getString(\"name\");\n Tamagotchi tr = new Tamagotchi(name);\n return tr;\n }", "@PostMapping(value = \"/create\",consumes = MediaType.APPLICATION_JSON_VALUE)\n public InternationalTournaments creat...
[ "0.5380428", "0.52856857", "0.5279412", "0.5272612", "0.52524376", "0.5223277", "0.5184865", "0.5160206", "0.51583534", "0.5140449", "0.5137514", "0.51073235", "0.51062775", "0.51048005", "0.509295", "0.5087406", "0.5001167", "0.49770615", "0.4974246", "0.49702954", "0.496742...
0.5014449
16
Returns generated token for given user
@PostMapping(value = "/{userId}", produces = "application/json") public ResponseEntity<TokenDto> getToken(@PathVariable @UserValidator String userId){ return createResponse( TokenDto.builder().token(tokenService.getToken(userId)).build(), HttpStatus.CREATED ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "String createToken(User user);", "public TokenTO generateToken(UserTO user) {\n TokenTO res;\n\n res = mgrToken.createToken(Crypto.generateToken() + Crypto.generateToken());\n mgrToken.save(res);\n user.setToken(res);\n getDao().update(user);\n\n return res;\n }", "...
[ "0.83728784", "0.78741", "0.77710634", "0.77226347", "0.76728415", "0.76461196", "0.74613094", "0.7276168", "0.72501343", "0.7212195", "0.7158254", "0.7071309", "0.70528597", "0.70528597", "0.70528597", "0.70525086", "0.7034099", "0.69908893", "0.698231", "0.6945875", "0.6807...
0.61925787
42
FIXME red bomb disappears when hover over
public void clickExplode() { setBorder(UNLOCKED_BORDER); setIcon(HIT_MINE_PIC); setBackground(Color.RED); unlocked = true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void hover() {\n\t}", "public void hover();", "@Override\n\tprotected void onHover() {\n\n\t}", "private void displayEmptyHover() {\n if (strokeWeight == 0)\r\n noStroke();\r\n else\r\n stroke(0, 0, 0);\r\n strokeWeight(strokeWeight);\r\n ...
[ "0.7183976", "0.70359844", "0.65124685", "0.63619566", "0.6273351", "0.6121007", "0.6116362", "0.61050534", "0.6103749", "0.60995346", "0.60950947", "0.60885817", "0.60753864", "0.60476524", "0.6046681", "0.60385036", "0.6028903", "0.60207176", "0.60073304", "0.60063535", "0....
0.0
-1
beginusercode TODO Autogenerated method stub endusercode
public void getCosts() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void mo38117a() {\n }", "public void mo115190b() {\n }", "@Override\n public void func_104112_b() {\n \n }", "public void mo9848a() {\n }", "@Override\n\tpublic void returncode(int statecode) {\n\n\t}", "public void mo21791P() {\n }", "@Override\n\tpublic void or...
[ "0.6548732", "0.6518889", "0.64259833", "0.62637395", "0.623959", "0.62317336", "0.6194871", "0.6193032", "0.6190299", "0.6183939", "0.6182444", "0.6181498", "0.61758775", "0.6169592", "0.6166776", "0.61325103", "0.61153144", "0.6101467", "0.60934234", "0.6091851", "0.6084732...
0.0
-1
Inflate the layout for this fragment
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { return inflater.inflate(R.layout.fragment_b, container, false); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_main_allinfo, container, false);\n }", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup...
[ "0.6739604", "0.67235583", "0.6721706", "0.6698254", "0.6691869", "0.6687986", "0.66869223", "0.6684548", "0.66766286", "0.6674615", "0.66654444", "0.66654384", "0.6664403", "0.66596216", "0.6653321", "0.6647136", "0.66423255", "0.66388357", "0.6637491", "0.6634193", "0.66251...
0.0
-1
Part V: Kinematics of Swerve
public void drive(double speedX, double speedY, double rotation){ SwerveModuleState[] swerveModuleStates = swerveDriveKinematics.toSwerveModuleStates(new ChassisSpeeds(speedY, speedX, rotation)); //convert kinematics to states[] SwerveDriveKinematics.desaturateWheelSpeeds(swerveModuleStates, MAX_SPEED); //limits the speed setDesiredStates(swerveModuleStates); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public GuaraKinematics() {\n\t\t// TODO Auto-generated constructor stub\n\t\trob = new GuaraRobot();\n\t\ta2 = rob.a2();\n\t\ta3 = rob.a3();\n\t\ta4 = rob.a4();\n\n\t}", "public void update(Vehicle v, float dt) {\nPoint2D.Float p = v.getPosition();\r\nPoint2D.Float tp = target.getPosition();\r\nPoint2D.Float des...
[ "0.63469607", "0.57007176", "0.55774176", "0.5568193", "0.5547832", "0.5518839", "0.5473674", "0.54530257", "0.5450876", "0.54294974", "0.54073095", "0.54027003", "0.53577024", "0.53444076", "0.53435814", "0.5329422", "0.53283477", "0.5297201", "0.5294714", "0.52929586", "0.5...
0.0
-1
TODO Autogenerated method stub
public int sum(Integer x, Integer y) { return x+y; }
{ "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
public int multi(Integer x, Integer y) { return x*y; }
{ "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
public String methodInvoke() { return "1.1.1版本"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
getters and abstract setters
public abstract void setLoginInfo(@Nullable com.login.bean.UserInfo LoginInfo);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected abstract Set method_1559();", "public abstract void set(M newValue);", "public abstract void setValue(T value);", "String setValue();", "public void setAge(int age) { this.age = age; }", "@Override\n public void get() {}", "@Test\r\n\tpublic void testGettersSetters()\r\n\t{\r\n\t\tPerson p =...
[ "0.69815844", "0.6635031", "0.6496533", "0.6411286", "0.6397682", "0.6267466", "0.62011516", "0.6138512", "0.61306125", "0.61278534", "0.6127161", "0.6117235", "0.6111761", "0.6081368", "0.60647243", "0.6063969", "0.6038533", "0.60305554", "0.59379834", "0.5937182", "0.591478...
0.0
-1
/ GUITrainers can teach subjects with specialism 4, they can also teach the same subjects as teachers therefore if the specialism isnt 4, it checks if a teacher can teach the subject
public boolean canTeach(Subject subject) { if (subject.getSpecialism() == 4) { return true; } else { return super.canTeach(subject); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static boolean checkTeacher(Teacher t, String givenName, String givenSurname, String givenSubject) {\n\n if (t.getNome().toLowerCase().equals(givenName.toLowerCase())) {\n return true;\n }\n if (t.getCognome().toLowerCase().equals(givenSurname.toLowerCase())) {\n r...
[ "0.5882998", "0.58770305", "0.5820243", "0.5737892", "0.57281655", "0.5723291", "0.5635364", "0.5509926", "0.5495992", "0.54618126", "0.5443917", "0.5416847", "0.5372524", "0.53481174", "0.5346091", "0.5323215", "0.5316099", "0.53109205", "0.530738", "0.5300733", "0.5282885",...
0.7434818
0
Avvio del thread e gestione de i messagi in arrivo sul server da client o server
@Override public void run() { try { for(;;) { String mex = DalServer.readLine(); if(mex != null) System.out.println(mex); } } catch (Exception ex) { ex.toString(); System.exit(1); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void Thread() {\n\n Thread thread = new Thread ( new Runnable() {\n \n @Override\n public void run() {\n \n String mensagem = \"\";\n\n try {\n \n InputStreamReader isr = new InputStre...
[ "0.73428", "0.7212352", "0.71411526", "0.70550954", "0.6837244", "0.6835466", "0.6810074", "0.6807823", "0.6750933", "0.6717037", "0.670644", "0.6705688", "0.6705164", "0.66998494", "0.669763", "0.66968733", "0.66913766", "0.6683761", "0.6682571", "0.66536844", "0.6648824", ...
0.0
-1
Ensure that this.subDevices is never null and is always mutable
public Config setSubDevices(Set<DeviceCredential> subDevices) { this.subDevices = subDevices == null ? new HashSet<>() : new HashSet<>(subDevices); return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void addSubDevice(PhysicalDevice subDevice, String id);", "public void setHaveSub(){\n\t\tthis.haveSub = true;\n\t}", "public static void setCoreSub(ArrayList<Subject> aCoreSub) {\n coreSub = aCoreSub;\n }", "public final void setSubSystem(SubSystem subSystem){\n this.peripheralSubSystem = s...
[ "0.53750396", "0.53304887", "0.5277488", "0.52430874", "0.5160478", "0.5095499", "0.5055252", "0.49683344", "0.49230915", "0.49070576", "0.48832157", "0.48630658", "0.48580858", "0.4844809", "0.483982", "0.48386985", "0.4837009", "0.48037276", "0.4789998", "0.4789669", "0.478...
0.63375884
0
Write code here that turns the phrase above into concrete actions
@When("^customer clicks on the login link$") public void customer_clicks_on_the_login_link() throws Throwable { throw new PendingException(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract protected String performAction(String input);", "@Override\r\n\tpublic void action() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void visit(SimpleAction action)\r\n\t{\n\t\t\r\n\t}", "protected abstract Action stringToAction(String stringAction);", "@Override\n\tpublic void action() {\n\n\t}", "priv...
[ "0.6989324", "0.64658433", "0.6398834", "0.6353149", "0.63501525", "0.633518", "0.63232154", "0.63232154", "0.63232154", "0.6317274", "0.62379014", "0.61738145", "0.61690307", "0.61507595", "0.6110593", "0.6071837", "0.6065073", "0.6061467", "0.6035597", "0.6035597", "0.60355...
0.0
-1
Write code here that turns the phrase above into concrete actions
@Then("^customer is navigated to login form page$") public void customer_is_navigated_to_login_form_page() throws Throwable { throw new PendingException(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract protected String performAction(String input);", "@Override\r\n\tpublic void action() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void visit(SimpleAction action)\r\n\t{\n\t\t\r\n\t}", "protected abstract Action stringToAction(String stringAction);", "@Override\n\tpublic void action() {\n\n\t}", "priv...
[ "0.6989324", "0.64658433", "0.6398834", "0.6353149", "0.63501525", "0.633518", "0.63232154", "0.63232154", "0.63232154", "0.6317274", "0.62379014", "0.61738145", "0.61690307", "0.61507595", "0.6110593", "0.6071837", "0.6065073", "0.6061467", "0.6035597", "0.6035597", "0.60355...
0.0
-1
Write code here that turns the phrase above into concrete actions
@When("^customer enters valid email and valid password$") public void customer_enters_valid_email_and_valid_password() throws Throwable { throw new PendingException(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract protected String performAction(String input);", "@Override\r\n\tpublic void action() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void visit(SimpleAction action)\r\n\t{\n\t\t\r\n\t}", "protected abstract Action stringToAction(String stringAction);", "@Override\n\tpublic void action() {\n\n\t}", "priv...
[ "0.6989324", "0.64658433", "0.6398834", "0.6353149", "0.63501525", "0.633518", "0.63232154", "0.63232154", "0.63232154", "0.6317274", "0.62379014", "0.61738145", "0.61690307", "0.61507595", "0.6110593", "0.6071837", "0.6065073", "0.6061467", "0.6035597", "0.6035597", "0.60355...
0.0
-1
Write code here that turns the phrase above into concrete actions
@When("^click on login button$") public void click_on_login_button() throws Throwable { throw new PendingException(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract protected String performAction(String input);", "@Override\r\n\tpublic void action() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void visit(SimpleAction action)\r\n\t{\n\t\t\r\n\t}", "protected abstract Action stringToAction(String stringAction);", "@Override\n\tpublic void action() {\n\n\t}", "priv...
[ "0.6989324", "0.64658433", "0.6398834", "0.6353149", "0.63501525", "0.633518", "0.63232154", "0.63232154", "0.63232154", "0.6317274", "0.62379014", "0.61738145", "0.61690307", "0.61507595", "0.6110593", "0.6071837", "0.6065073", "0.6061467", "0.6035597", "0.6035597", "0.60355...
0.0
-1
Write code here that turns the phrase above into concrete actions
@Given("^customer is on home page$") public void customer_is_on_home_page() throws Throwable { throw new PendingException(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract protected String performAction(String input);", "@Override\r\n\tpublic void action() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void visit(SimpleAction action)\r\n\t{\n\t\t\r\n\t}", "protected abstract Action stringToAction(String stringAction);", "@Override\n\tpublic void action() {\n\n\t}", "priv...
[ "0.6989324", "0.64658433", "0.6398834", "0.6353149", "0.63501525", "0.633518", "0.63232154", "0.63232154", "0.63232154", "0.6317274", "0.62379014", "0.61738145", "0.61690307", "0.61507595", "0.6110593", "0.6071837", "0.6065073", "0.6061467", "0.6035597", "0.6035597", "0.60355...
0.0
-1
TODO Autogenerated method stub
@Override protected void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { List<query_status_Bean> query_status_list=new query_status_Dao().select(); request.setAttribute("query_status_list", query_status_list); request.getRequestDispatcher("query_status_list_jsp.jsp").forward(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
WebDriver driver = new ChromeDriver();
@BeforeClass public static void initDriver() { String baseUrl = "https://www.snaptravel.com/search?encrypted_user_id=5xqebwRCiWusH08KS2yJKA&otp=5549929985"; driver.get(baseUrl); System.out.println("In testing"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private WebDriver getDriver() {\n return new ChromeDriver();\n }", "public void setChromeDriver(){\n System.setProperty(\"webdriver.chrome.driver\", browserDriverPath);\n seleniumDriver = new ChromeDriver();\n }", "public static WebDriver chrome()\r\n\t{\r\n\t\tSystem.setProperty(\"w...
[ "0.82115024", "0.8072474", "0.8054619", "0.8009727", "0.7757982", "0.77381927", "0.7711436", "0.77039593", "0.7563572", "0.7532492", "0.7484464", "0.740001", "0.73492575", "0.734629", "0.7291202", "0.72894996", "0.7254091", "0.7246925", "0.7219103", "0.7212545", "0.7201065", ...
0.0
-1
The Factory for the model. It provides a create method for each nonabstract class of the model.
public interface RmFactory extends EFactory { /** * The singleton instance of the factory. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ RmFactory eINSTANCE = ru.capralow.dt.conversion.plugin.core.rm.impl.RmFactoryImpl.init(); /** * Returns a new object of class '<em>Registration Module</em>'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return a new object of class '<em>Registration Module</em>'. * @generated */ RegistrationModule createRegistrationModule(); /** * Returns a new object of class '<em>Exchange Plan Content</em>'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return a new object of class '<em>Exchange Plan Content</em>'. * @generated */ ExchangePlanContent createExchangePlanContent(); /** * Returns a new object of class '<em>Registration Rule</em>'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return a new object of class '<em>Registration Rule</em>'. * @generated */ RegistrationRule createRegistrationRule(); /** * Returns a new object of class '<em>Object Selection Rule</em>'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return a new object of class '<em>Object Selection Rule</em>'. * @generated */ ObjectSelectionRule createObjectSelectionRule(); /** * Returns a new object of class '<em>Exchange Plan Selection Rule</em>'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return a new object of class '<em>Exchange Plan Selection Rule</em>'. * @generated */ ExchangePlanSelectionRule createExchangePlanSelectionRule(); /** * Returns the package supported by this factory. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the package supported by this factory. * @generated */ RmPackage getRmPackage(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Model createModel();", "Model createModel();", "Model createModel();", "Model createModel();", "Model createModel();", "Model createModel();", "Model createModel();", "TestModelFactory getTestModelFactory();", "public UsermodelFactoryImpl() {\r\n\t\tsuper();\r\n\t}", "public SqliteModelFactoryImp...
[ "0.7157852", "0.7157852", "0.7157852", "0.7157852", "0.7157852", "0.7157852", "0.7157852", "0.7075211", "0.7052549", "0.6984592", "0.69750196", "0.6965814", "0.695733", "0.6949335", "0.6860817", "0.6811919", "0.6807112", "0.67560583", "0.66955787", "0.6657461", "0.66552806", ...
0.0
-1
Returns a new object of class 'Registration Module'.
RegistrationModule createRegistrationModule();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public RegistrationInfo getRegistrationInfo();", "Module createModule();", "public IUser getRegistrator(){\n\t\treturn User.get().\n\t\t\t\tsetPerson(Person.get()\n\t\t\t\t\t\t.setFirstname(\"Regisytator\")\n\t\t\t\t\t\t.setLastname(\"Registrator\")\n\t\t\t\t\t\t.setEmail(\"rr@ukr.net\")\n\t\t\t\t\t\t.build()\...
[ "0.628508", "0.6259543", "0.61343974", "0.6043633", "0.60058755", "0.5989915", "0.59811354", "0.5934901", "0.59229726", "0.59139526", "0.58959705", "0.58954966", "0.5895361", "0.5883366", "0.58613896", "0.5853116", "0.5828612", "0.5803229", "0.5801879", "0.57894003", "0.57732...
0.8405642
0
Returns a new object of class 'Exchange Plan Content'.
ExchangePlanContent createExchangePlanContent();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static DeliveryWrapper createDeliveryWrapper(TasOffer tasOffer)throws ManagerBeanException{\r\n\t\tOffer offer = tasOffer.getOffer();\r\n\t\tList<ITransferObject> offerLines = getOfferLines(offer);\r\n\t\t\r\n\t\tDeliveryWrapper deliveryWrapper = new DeliveryWrapper();\r\n\t\t\r\n\t\tDelivery delivery = ne...
[ "0.5609199", "0.5587006", "0.55212796", "0.5407325", "0.5403594", "0.52866536", "0.5277673", "0.52323973", "0.5167183", "0.51315254", "0.51155907", "0.50919837", "0.50652826", "0.5043829", "0.50274354", "0.50208336", "0.50206697", "0.5014908", "0.50067306", "0.49997053", "0.4...
0.8500813
0
Returns a new object of class 'Registration Rule'.
RegistrationRule createRegistrationRule();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Rule createRule();", "Rule createRule();", "Rule createRule();", "public RuleConfiguration() {\n\t\trule = new Rule();\n\t}", "private static Registrant makeNewRegistrantFromUserInput() {\n\t\tString input_name = getResponseTo(\"Enter registant's first and Last name: \");\r\n\t\tRegistrant new_Registrant =...
[ "0.62597525", "0.62597525", "0.62597525", "0.61311275", "0.5873996", "0.57455635", "0.5652705", "0.5636986", "0.55889493", "0.5573713", "0.556203", "0.5507128", "0.54747033", "0.54715943", "0.5389903", "0.5360555", "0.5358787", "0.5356115", "0.5283772", "0.52537656", "0.52522...
0.7883724
0
Returns a new object of class 'Object Selection Rule'.
ObjectSelectionRule createObjectSelectionRule();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "ExchangePlanSelectionRule createExchangePlanSelectionRule();", "protected Tool createSelectionTool() {\n return new SelectionTool(view());\n }", "protected void createSelection() {\r\n\t\tsel = new GraphSelection();\r\n\t}", "ResourceSelection createResourceSelection();", "Rule createRule();", ...
[ "0.6054424", "0.59237593", "0.589746", "0.5892156", "0.5689193", "0.5689193", "0.5689193", "0.5569599", "0.55437875", "0.5417734", "0.5396685", "0.53819865", "0.5297669", "0.5271747", "0.52504534", "0.5243292", "0.51344585", "0.51344585", "0.51326025", "0.51275736", "0.512558...
0.8764681
0
Returns a new object of class 'Exchange Plan Selection Rule'.
ExchangePlanSelectionRule createExchangePlanSelectionRule();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "ExchangePlanContent createExchangePlanContent();", "ObjectSelectionRule createObjectSelectionRule();", "ExprRule createExprRule();", "E7Rule createE7Rule();", "E11Rule createE11Rule();", "E12Rule createE12Rule();", "AssignmentRule createAssignmentRule();", "E10Rule createE10Rule();", "E4Rule create...
[ "0.5948299", "0.5753271", "0.57096237", "0.5705499", "0.57048064", "0.5577085", "0.5529224", "0.546976", "0.5466646", "0.5465081", "0.5465081", "0.54116184", "0.5395719", "0.53198236", "0.53153664", "0.52719545", "0.5262769", "0.5198117", "0.5198117", "0.5198117", "0.51526845...
0.86410606
0
Returns the package supported by this factory.
RmPackage getRmPackage();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "PackageType getRequiredPackage();", "public PackageNode getPackage();", "java.lang.String getPackage();", "public String getPackageName();", "public String getPackageName() {\n return pkg;\n }", "String getPackageName();", "public DsByteString getPackage() {\n return m_strPackage;\n }", ...
[ "0.7031596", "0.6824025", "0.6818806", "0.6752645", "0.67181015", "0.6704875", "0.6698022", "0.6678774", "0.6635858", "0.6556546", "0.65183675", "0.6501405", "0.6496429", "0.6481852", "0.6376274", "0.63505894", "0.6338929", "0.63388515", "0.6327788", "0.6314242", "0.63126606"...
0.0
-1
System.out.println("FileUploadServlet.storeInSession: " + request.getParameterMap());
@SuppressWarnings("unchecked") protected void storeInSession(HttpServletRequest request, HttpServletResponse response) throws IOException { ServletFileUpload upload = new ServletFileUpload(factory); try { if(ServletFileUpload.isMultipartContent(request)){ List<FileItem> fileItemList = upload.parseRequest(request); // JsonNode jparams = JacksonUtils.toNode(request.getParameter("params")); response.setContentType("text/html"); for(FileItem fileItem : fileItemList){ if(fileItem.isFormField()){ // Constants.LOGGER.info("FileUploadServlet.storeInSession - file item is form field::: " + fileItem); } else{ Constants.LOGGER.info("FileUploadServlet.storeImageInSession.NOT formField " + fileItem); // ImageFile imageFile = webClientBean.storeImageInUploads(fileItem); String id = UUID.randomUUID().toString(); request.getSession().setAttribute(id, fileItem); response.getWriter().print("<textarea>{target: 'SESSION',id: '" + id + "'}</textarea>"); } } } } catch (Exception exp) { Constants.LOGGER.error(exp.getMessage(),exp); JacksonUtils.serialize(EntityModel.createErrorMessage("FileUpload Exception", exp.getMessage()), response.getWriter()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void storeParameters(SessionSrvc session, HttpServletRequest req)\n {\n for (Enumeration paramNames = req.getParameterNames(); paramNames.hasMoreElements();)\n {\n\t String name = (String) paramNames.nextElement();\n\t // req.getSession().putValue(name, req.getParameter(name));\n\t session.putLo...
[ "0.69690686", "0.6674149", "0.6619859", "0.6611374", "0.64141744", "0.63853234", "0.62417847", "0.62258893", "0.60406286", "0.5948716", "0.58877623", "0.5854434", "0.58006847", "0.57917005", "0.5760776", "0.5748245", "0.57444626", "0.5723334", "0.5714398", "0.5707848", "0.570...
0.6816484
1
System.out.println("FileUploadServlet.storeInSessionFlashOrHTML5: " + request.getParameterMap());
@SuppressWarnings("unchecked") protected void storeInSessionFlashOrHTML5(HttpServletRequest request, HttpServletResponse response) throws IOException { ServletFileUpload upload = new ServletFileUpload(factory); try { if(ServletFileUpload.isMultipartContent(request)){ List<FileItem> fileItemList = upload.parseRequest(request); List<Map<String,Object>> jsonResponse = new ArrayList<Map<String,Object>>(); StringBuilder stringResponse = new StringBuilder(); String params = request.getParameter("params"); JsonNode jparams = JacksonUtils.toNode(params); String method = jparams.get("method").getTextValue();//request.getParameter("method"); logger.info("Upload file, METHOD: " + method); if("flash".equals(method)){ response.setContentType("text/plain"); } else{ response.setContentType("text/json"); } for(FileItem fileItem : fileItemList){ if(fileItem.isFormField()){ Constants.LOGGER.info("FileUploadServlet.storeInSessionFlashOrHTML5 - file item is form field::: " + fileItem); } else{ Constants.LOGGER.info("FileUploadServlet.storeInSessionFlashOrHTML5.NOT formField " + fileItem); // ImageFile imageFile = webClientBean.storeImageInUploads(fileItem); String id = UUID.randomUUID().toString(); request.getSession().setAttribute(id, fileItem); //--- RESPONSE - if("flash".equals(method)){ stringResponse.append(generateFlashResponse(fileItem, id)); } else{ //-- FireFox/HTML5 Map<String,Object> o = generateJsonResponse(fileItem); o.put("fileItemId", id); jsonResponse.add(o); } } } if("flash".equals(method)){ response.getWriter().print(stringResponse); } else{ JacksonUtils.serialize(jsonResponse, response.getWriter()); } } } catch (Exception exp) { Constants.LOGGER.error(exp.getMessage(),exp); JacksonUtils.serialize(EntityModel.createErrorMessage("FileUpload Exception", exp.getMessage()), response.getWriter()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@SuppressWarnings(\"unchecked\")\n\tprotected void storeInSessionHTML5(HttpServletRequest request, HttpServletResponse response) throws IOException {\n//\t\tSystem.out.println(\"FileUploadServlet.storeInSessionHTML5: \" + request.getParameterMap());\n\t\tServletFileUpload upload = new ServletFileUpload(factory);\n...
[ "0.6829899", "0.6632983", "0.64609873", "0.6144226", "0.61030143", "0.60959846", "0.59954804", "0.58865106", "0.5789663", "0.5788102", "0.5722162", "0.55781436", "0.55756825", "0.5565756", "0.55635613", "0.5563487", "0.5533447", "0.5530804", "0.55302006", "0.5530027", "0.5506...
0.7271579
0
System.out.println("FileUploadServlet.storeInSessionFlashOrHTML5: " + request.getParameterMap());
@SuppressWarnings("unchecked") protected void storeInSessionFlash(HttpServletRequest request, HttpServletResponse response) throws IOException { ServletFileUpload upload = new ServletFileUpload(factory); try { if(ServletFileUpload.isMultipartContent(request)){ List<FileItem> fileItemList = upload.parseRequest(request); Map<String,Object> jsonResponse = new HashMap<String,Object>(); response.setContentType("text/json"); for(FileItem fileItem : fileItemList){ if(fileItem.isFormField()){ logger.info("FileUploadServlet.storeInSessionFlash - file item is form field::: " + fileItem); } else{ logger.info("FileUploadServlet.storeInSessionFlash.NOT formField " + fileItem); String id = UUID.randomUUID().toString(); request.getSession().setAttribute(id, fileItem); //--- RESPONSE - jsonResponse = generateJsonResponse(fileItem); jsonResponse.put("id", id); jsonResponse.put("sessionAttributeId", id); } } //IE is very sensitive on the response JacksonUtils.serialize(jsonResponse, response.getWriter()); } } catch (Exception exp) { logger.error(exp.getMessage(),exp); JacksonUtils.serialize(EntityModel.createErrorMessage("Problem Uploading Audio", exp.getMessage()), response.getWriter()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@SuppressWarnings(\"unchecked\")\n\tprotected void storeInSessionFlashOrHTML5(HttpServletRequest request, HttpServletResponse response) throws IOException {\n\t\tServletFileUpload upload = new ServletFileUpload(factory);\n\t\t\n\t\ttry {\n\t\t\tif(ServletFileUpload.isMultipartContent(request)){\n\t\t\t\tList<FileI...
[ "0.7269931", "0.6829437", "0.64593214", "0.61426276", "0.6101668", "0.60973716", "0.5993362", "0.58843195", "0.5789527", "0.5787431", "0.57206553", "0.5577839", "0.55754715", "0.55656534", "0.55624866", "0.5560745", "0.55312634", "0.5530427", "0.5530195", "0.55300516", "0.550...
0.6631509
2
returns a JSON array and not JSON object as the Flash method
@SuppressWarnings("unchecked") protected void storeInSessionHTML5(HttpServletRequest request, HttpServletResponse response) throws IOException { // System.out.println("FileUploadServlet.storeInSessionHTML5: " + request.getParameterMap()); ServletFileUpload upload = new ServletFileUpload(factory); try { if(ServletFileUpload.isMultipartContent(request)){ List<FileItem> fileItemList = upload.parseRequest(request); List<Map<String,Object>> jsonResponse = new ArrayList<Map<String,Object>>(); response.setContentType("text/json"); for(FileItem fileItem : fileItemList){ if(fileItem.isFormField()){ logger.info("FileUploadServlet.storeInSessionHTML5 - file item is form field::: " + fileItem); } else{ logger.info("FileUploadServlet.storeInSessionHTML5.NOT formField " + fileItem); String id = UUID.randomUUID().toString(); request.getSession().setAttribute(id, fileItem); //-- FireFox/HTML5 Map<String,Object> o = generateJsonResponse(fileItem); o.put("sessionAttributeId", id); jsonResponse.add(o); } } //Json list JacksonUtils.serialize(jsonResponse, response.getWriter()); } } catch (Exception exp) { Constants.LOGGER.error(exp.getMessage(),exp); JacksonUtils.serialize(EntityModel.createErrorMessage("FileUpload Exception", exp.getMessage()), response.getWriter()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getJson();", "String getJson();", "String getJson();", "String getJson();", "String getJSON();", "JSONObject toJson();", "JSONObject toJson();", "private Object JSONArray(String estado) {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of gener...
[ "0.6564242", "0.63712347", "0.63712347", "0.63712347", "0.6361312", "0.6242026", "0.6242026", "0.61939883", "0.60997677", "0.5956178", "0.5943896", "0.5850881", "0.5842226", "0.58405125", "0.5816924", "0.5779898", "0.57371306", "0.57076365", "0.5704839", "0.5700236", "0.56610...
0.0
-1
Private construct that use the builder
private House(HouseBuilder builder) { this.surface = builder.surface; this.rooms = builder.rooms; this.bathrooms = builder.bathrooms; this.floors = builder.floors; this.garage = builder.garage; this.yard = builder.yard; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Builder() {}", "private Builder() {\n\t\t}", "private Builder() {\n }", "private Builder() {\n }", "private Builder()\n {\n }", "private Construct(Builder builder) {\n super(builder);\n }", "public Builder() {}", "public Builder() {}", "public Bui...
[ "0.8311735", "0.8305381", "0.81672674", "0.81672674", "0.8131507", "0.80071", "0.7755974", "0.7755974", "0.7755974", "0.7741234", "0.7679628", "0.76100254", "0.7569448", "0.75481296", "0.75481296", "0.7470021", "0.7138258", "0.71350884", "0.7082036", "0.7076072", "0.7062449",...
0.0
-1
Mozda treba da se zameni sa .findById(id); //WLQMPEK Razlika izmedju dve metode je sto getOne radi lazyLoding dok findById skida ceo Objekat.
@Override public Lekar findOne(Long id) { return lekarRepozitorijum.getOne(id); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic Object findById(long id) {\n\t\treturn null;\r\n\t}", "public Data findById(Object id);", "@Override\n\tpublic PI findById(Long id) throws NotFoundException {\n\t\treturn null;\n\t}", "public abstract T findOne(int id);", "T findOne(I id);", "@Override\r\n\t@Transactional(readOnly=t...
[ "0.7576187", "0.75246775", "0.7438553", "0.74069816", "0.7355556", "0.7293481", "0.72761893", "0.7246736", "0.72348195", "0.72278255", "0.72244215", "0.71874905", "0.7181766", "0.71805996", "0.7154508", "0.7153977", "0.714505", "0.71389556", "0.7136806", "0.71297634", "0.7129...
0.0
-1
Texture Manager GameOverMessage private List ranking; private Map score;
public SpaceShooter(UbiquiGamePlatform platform){ super(platform); this.platform = platform; gsm = new GameStateManager(); this.instance = this; // GameOverMessage vars // this.ranking = new ArrayList<Player>(); // this.score = new HashMap<Player, Integer>(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void gameOver() {\r\n\t\tSystem.out.println(\"[DEBUG LOG/Game.java] Game is over. Calculating points\");\r\n\t\tstatus = \"over\";\r\n\t\ttry {\r\n\t\t\tupdateBoard();\r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tupdateE...
[ "0.67880213", "0.66627043", "0.65003943", "0.6427053", "0.6414605", "0.637975", "0.63223505", "0.63042873", "0.62952137", "0.62760615", "0.62721205", "0.62638545", "0.6210588", "0.6196116", "0.6189497", "0.6121937", "0.6121937", "0.61142707", "0.6111255", "0.60922015", "0.607...
0.0
-1
/ Is called once when this minigame is being created
@Override public void create() { // This should come from the platform height = platform.getScreenDimension().getHeight(); width = platform.getScreenDimension().getWidth(); // create the drawing boards sb = new SpriteBatch(); sr = new ShapeRenderer(); // Push in first state gsm.push(new CountDownState(gsm)); // gsm.push(new PlayState(gsm)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void OnStart(){\n\t\t//create the random space background and put its priority behind everything else\n\t\tswitch ((int) (Math.random() * 3)){\n\t\t\tcase 0:\n\t\t\t\tbackground = new Background(R.drawable.spaceback_med,new Point(0,0),-1);\n\t\t\t\tbreak;\n\t\t\tcase 1:\n\t\t\t\tbackground = new Background(...
[ "0.690107", "0.6842472", "0.68017185", "0.6768452", "0.67451495", "0.6713344", "0.6688716", "0.6662931", "0.6641311", "0.66370827", "0.66345394", "0.66290575", "0.6623984", "0.6623142", "0.66182804", "0.66182804", "0.66182804", "0.6617611", "0.6603134", "0.65724015", "0.65704...
0.0
-1
/ Is called to update the status of the objects in the game
@Override public void update(float delta) { //Default update call delegate to GameStateManager gsm.update(delta); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void updateObjects()\r\n {\r\n //update states\r\n for (Ball ball : balls) {\r\n \tif(ball!=null)\r\n \t{\r\n\t \tif(ball.GetVisible()) ball.MoveDown();\r\n\r\n \t}\r\n \telse ball=null;\r\n }\r\n \r\n }", "public void update() {\r\n ...
[ "0.75236136", "0.7496819", "0.7351646", "0.7313552", "0.7143713", "0.7034862", "0.70280105", "0.70106226", "0.6836964", "0.67853266", "0.6766328", "0.67615616", "0.67526287", "0.67474467", "0.6689447", "0.66861016", "0.665333", "0.6636554", "0.66317374", "0.6623749", "0.66136...
0.0
-1
/ Is called when the screen is being rendered
@Override public void render(float delta) { //Default render call delegate to GameStateManager gsm.render(sb, sr); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void onDisplay() {\n\n\t}", "@Override\n\tpublic void render() {\n\t\tScreen.render();\n\t}", "protected void onComponentRendered()\n\t{\n\t}", "public void onDisplay() {\n }", "public void render(){\n//\t\tsetCards();\n//\t\tsetMurderInfo();\n\t}", "public void render() {\r\n\r\n }", "@Ov...
[ "0.7427113", "0.73931134", "0.7303252", "0.73019814", "0.71876", "0.7163901", "0.7151831", "0.71080923", "0.7089009", "0.7070944", "0.7024823", "0.70206326", "0.70154315", "0.70154315", "0.6988091", "0.6929346", "0.6907602", "0.6891879", "0.68705714", "0.68687576", "0.6851927...
0.0
-1
/ This function is being called when the game is over
@Override public void gameover(GameOverMessage state) { platform.notifyCurrGameOver(state); sb.dispose(); sr.dispose(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void gameOver() {\n\t\t\n\t}", "@Override\r\n\tpublic void gameOver() {\n\t\tgameOver = true;\r\n\t\tupdate();\r\n\t}", "public void gameOver() {\r\n\t\tgameFrame.gameOver();\r\n\t\tnotifyViews();\r\n\t}", "@Override\r\n\tpublic void gameOver() {\n\t\tover = true;\r\n\t\tupdate();\r\n\t}", "private...
[ "0.84948325", "0.82651", "0.8262557", "0.82032895", "0.817152", "0.8065909", "0.80481404", "0.79055023", "0.7843338", "0.7812964", "0.7767005", "0.7767005", "0.7733433", "0.77004623", "0.7698757", "0.769851", "0.7671089", "0.76138985", "0.7593894", "0.75888944", "0.75085616",...
0.0
-1
should return controller but there is still a bug
@Override public ControllerFace getControllerFace() { return ControllerFace.Controller_Cross_A; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Controller getController();", "public IController getController();", "IAnjaroController getController();", "public Controller getController()\n {\n return this.controller;\n }", "@Override\n\tprotected void setController() {\n\t\t\n\t}", "public static BaseStationController getController(...
[ "0.7756055", "0.75620764", "0.74231815", "0.6761162", "0.6689166", "0.6569201", "0.65432096", "0.648268", "0.6401753", "0.63924265", "0.6382687", "0.6382687", "0.6345008", "0.62731624", "0.62731624", "0.6257018", "0.617457", "0.61548537", "0.61395025", "0.6096942", "0.60908",...
0.0
-1
/ This function declares a GameInfo and returns it for the platform
@Override public GameInfo getGameInfo() { return gameInfo; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public GameInfo getGameInfo() throws InterruptedException, IOException, URISyntaxException {\n String json = caller.GET(\"game/status\");\n\n GsonBuilder builder = new GsonBuilder();\n builder.registerTypeAdapter(GameInfo.class, new GameInfoDeserializer());\n\n Gson gson = builder.creat...
[ "0.6366897", "0.6038755", "0.6017306", "0.5961161", "0.5863946", "0.58259016", "0.5673655", "0.5642879", "0.56236684", "0.56115234", "0.5576793", "0.55578166", "0.5534974", "0.553363", "0.54715985", "0.54658186", "0.54475254", "0.54444283", "0.54379034", "0.5432118", "0.54248...
0.7172151
0
Log.i(TAG, "ConnectedThread running"); Keep listening to the InputStream until an exception occurs
@Override public void run() { while (!stopThread) { try { //String outputMessage = mmInStream.available() + " bytes available"; //Log.i(TAG, outputMessage); // Read from the InputStream while (mmInStream.available() > 0) { synchronized (buffer) { if (bufferLast == buffer.length) { byte temp[] = new byte[bufferLast << 1]; System.arraycopy(buffer, 0, temp, 0, bufferLast); buffer = temp; } buffer[bufferLast++] = (byte) mmInStream.read(); } btSerialEvent(); } } catch (IOException e) { Log.e(TAG, e.getMessage()); break; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void run() {\r\n\t\t\r\n\t\tLog.d(TAG, \"begin ConnectedThread job\");\r\n\t\t\r\n\t\t// Receive buffer\r\n\t\tbyte[] buffer = new byte[256];\r\n\t\t// Amount of bytes read from InputStream\r\n\t\tint length = 0;\r\n\t\t\r\n\t\twhile(running){\r\n\t\t\t\r\n\t\t\ttry{\r\n\t\t\t\t\r\n\t\t\t\t//...
[ "0.7422511", "0.71375227", "0.6852076", "0.67837965", "0.6778182", "0.665968", "0.66374874", "0.65429485", "0.6520469", "0.6496311", "0.6448578", "0.6401255", "0.6395803", "0.63238573", "0.6323074", "0.629271", "0.6274774", "0.6268838", "0.62381756", "0.62285936", "0.6214152"...
0.60636675
31
/ Call this from the main Activity to send data to the remote device
public void write(byte[] bytes) { try { for(int i=0; i<bytes.length; i++) { mmOutStream.write(bytes[i] & 0xFF); } } catch (IOException e) { e.printStackTrace(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void onClickSend(View view) {\n //String string = editText.getText().toString();\n //serialPort.write(string.getBytes());\n //tvAppend(txtResponse, \"\\nData Sent : \" + string + \"\\n\");\n }", "void sendData(String msg) throws IOException\n {\n if ( msg.length() == 0 ) ...
[ "0.724187", "0.69892466", "0.6982699", "0.69194514", "0.6822423", "0.68183297", "0.67608047", "0.67178494", "0.6659885", "0.66434413", "0.6640375", "0.6618515", "0.66127104", "0.6571657", "0.65683883", "0.6543039", "0.6534829", "0.6496969", "0.64779055", "0.6437648", "0.64233...
0.0
-1
Returns the next byte in the buffer as an int (0255);
public int read() { if (bufferIndex == bufferLast) return -1; synchronized (buffer) { int outgoing = buffer[bufferIndex++] & 0xff; if (bufferIndex == bufferLast) { // rewind bufferIndex = 0; bufferLast = 0; } return outgoing; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private int readByte() {\n return src[srcPos++] & 0xFF;\n }", "private int nextWebSocketByte() throws IOException {\n while (payloadLength == 0L) {\n nextWebSocketFrame();\n if (isClosed() || isFailed()) {\n return EOF;\n }\n }\n int data =...
[ "0.683989", "0.6828225", "0.6799114", "0.679237", "0.64916", "0.64736503", "0.64399695", "0.63514537", "0.63146055", "0.62964606", "0.6234263", "0.6202177", "0.61856455", "0.6143603", "0.6118345", "0.6068073", "0.6068073", "0.6048023", "0.60448974", "0.6044538", "0.60395145",...
0.6040161
20
Returns the whole byte buffer.
public byte[] readBytes() { if (bufferIndex == bufferLast) return null; synchronized (buffer) { int length = bufferLast - bufferIndex; byte outgoing[] = new byte[length]; System.arraycopy(buffer, bufferIndex, outgoing, 0, length); bufferIndex = 0; // rewind bufferLast = 0; return outgoing; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "byte [] getBuffer ();", "@Override\r\n\tpublic byte[] getBytes() {\n\t\treturn buffer.array();\r\n\t}", "public ByteBuffer buffer() { return bb; }", "public byte [] getBuf() {\r\n return bop.getBuf();\r\n }", "public ByteBuffer toBuffer() {\n return ByteBuffer.wrap(buf, 0, count);\n }", "pu...
[ "0.76750374", "0.74814624", "0.7480394", "0.742623", "0.73975545", "0.7329596", "0.7278232", "0.72703594", "0.7231871", "0.7228978", "0.71984917", "0.7028441", "0.6977148", "0.6832698", "0.6751758", "0.67425966", "0.67425966", "0.6691413", "0.6632031", "0.65727824", "0.655934...
0.71859866
11
Returns the available number of bytes in the buffer, and copies the buffer contents to the passed byte[]
public int readBytes(byte outgoing[]) { if (bufferIndex == bufferLast) return 0; synchronized (buffer) { int length = bufferLast - bufferIndex; if (length > outgoing.length) length = outgoing.length; System.arraycopy(buffer, bufferIndex, outgoing, 0, length); bufferIndex += length; if (bufferIndex == bufferLast) { bufferIndex = 0; // rewind bufferLast = 0; } return length; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int getBytesInBufferAvailable() {\n if (this.count == this.pos) return 0;\n else return this.buf.length - this.pos;\n }", "protected abstract void getAtLeastBytes(ByteBuffer inputBuffer, int len) throws IOException;", "private final int copyBufferedBytes(byte[] dst, int off, int le...
[ "0.76570016", "0.71902", "0.69395244", "0.6874331", "0.678126", "0.67231023", "0.66700655", "0.65372103", "0.6528987", "0.64531106", "0.6436847", "0.6433265", "0.64305013", "0.63664436", "0.63628703", "0.63522065", "0.63154775", "0.6243919", "0.6230712", "0.62114525", "0.6203...
0.6208675
20
Returns a byte buffer until the byte interesting. If the byte interesting doesn't exist in the current buffer, null is returned.
public byte[] readBytesUntil(int interesting) { if (bufferIndex == bufferLast) return null; byte what = (byte) interesting; synchronized (buffer) { int found = -1; for (int k = bufferIndex; k < bufferLast; k++) { if (buffer[k] == what) { found = k; break; } } if (found == -1) return null; int length = found - bufferIndex + 1; byte outgoing[] = new byte[length]; System.arraycopy(buffer, bufferIndex, outgoing, 0, length); bufferIndex += length; if (bufferIndex == bufferLast) { bufferIndex = 0; // rewind bufferLast = 0; } return outgoing; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "byte peekByte() throws IOException;", "private byte nextByte(ByteBuffer inputBuffer) throws IOException {\n getAtLeastBytes(inputBuffer, 1);\n return inputBuffer.get();\n }", "byte [] getBuffer ();", "public byte get() throws TLVEncodingException {\r\n\t\tif (cursor >= limit)\r\n\t\t\tthrow ...
[ "0.6165694", "0.584689", "0.5783038", "0.57561314", "0.57498986", "0.57469", "0.5599719", "0.5519279", "0.547145", "0.54657316", "0.54622304", "0.54579175", "0.5427984", "0.5408731", "0.53911877", "0.53659105", "0.5357306", "0.5330887", "0.52877545", "0.5282544", "0.5250319",...
0.7514552
0
Returns the last byte in the buffer.
public int last() { if (bufferIndex == bufferLast) return -1; synchronized (buffer) { int outgoing = buffer[bufferLast - 1]; bufferIndex = 0; bufferLast = 0; return outgoing; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public char lastChar() {\n\t\tif (bufferIndex == bufferLast)\n\t\t\treturn (char) (-1);\n\t\treturn (char) last();\n\t}", "public T getLast() {\n if (this.getSize() > 0) {\n return buffer[index];\n }\n return null;\n }", "public int lastCharacter() {\n return string.co...
[ "0.73214716", "0.7102319", "0.6562", "0.6505567", "0.646265", "0.6225404", "0.6220312", "0.6108444", "0.60985625", "0.6067774", "0.60577196", "0.60068786", "0.5964445", "0.5957746", "0.5945044", "0.5938022", "0.592988", "0.59257275", "0.5889585", "0.58815104", "0.58782595", ...
0.736363
0
Reads a byte from the buffer as char.
public char readChar() { if (bufferIndex == bufferLast) return (char) (-1); return (char) last(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public char readChar() {\n return ((char) readLong());\n }", "public char readChar() throws IOException {\n\t\tbyte[] b = new byte[2];\n\n\t\tif (read(b, 0, 2) < 2) {\n\t\t\tthrow new EOFException();\n\t\t}\n\n\t\tchar c = (char) (b[0] << 8 | (b[1] & 0xFF));\n\t\treturn c;\n\t}", "@Override\n\tpublic...
[ "0.7486859", "0.7475015", "0.7442599", "0.72680885", "0.7266827", "0.7161554", "0.69356537", "0.6868244", "0.6763486", "0.67608273", "0.6749164", "0.67393833", "0.6739255", "0.6700931", "0.6655755", "0.66098976", "0.6550374", "0.6528764", "0.65043914", "0.6427532", "0.6419334...
0.7339457
3
Returns the last byte in the buffer as char.
public char lastChar() { if (bufferIndex == bufferLast) return (char) (-1); return (char) last(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public char readChar() {\n\t\tif (bufferIndex == bufferLast)\n\t\t\treturn (char) (-1);\n\t\treturn (char) last();\n\t}", "public int lastCharacter() {\n return string.codePointAt(string.length() - 1);\n }", "char getChar () { \n return m_pos < m_len ? m_buffer.charAt (m_pos) : '\\0';\n }",...
[ "0.71842647", "0.67544013", "0.6629584", "0.62162536", "0.6155508", "0.60720646", "0.6067332", "0.6066816", "0.5983117", "0.5965884", "0.5953389", "0.59447336", "0.5937914", "0.593047", "0.593047", "0.593047", "0.593047", "0.593047", "0.593047", "0.593047", "0.593047", "0.5...
0.807961
0
Ignore all the bytes read so far and empty the buffer.
public void clear() { bufferLast = 0; bufferIndex = 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void clearBuffer() {\n\t\tfor (int i = 0; i < buffer.length; i++) {\n\t\t\tbuffer[i] = 0x0;\n\t\t}\n\t}", "private void resetBuffer() {\n baos.reset();\n }", "public void clear() {\n this.init(buffer.length);\n }", "private void clearBuffer(ByteBuffer buffer) {\n while (numberL...
[ "0.72815853", "0.687425", "0.6755875", "0.674849", "0.6641008", "0.66345567", "0.661711", "0.65369946", "0.6482212", "0.6454462", "0.6430933", "0.64058185", "0.6273683", "0.6195119", "0.6162917", "0.61447126", "0.6129499", "0.6110553", "0.6107441", "0.60819685", "0.6080876", ...
0.6940163
1
/ Call this from the main Activity to shutdown the connection
public void cancel() { stopThread = true; try { mmSocket.close(); } catch (IOException e) { e.printStackTrace(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void shutdown() {\n clientTUI.showMessage(\"Closing the connection...\");\n try {\n in.close();\n out.close();\n serverSock.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public void shutdown() {\n m...
[ "0.7922116", "0.7371607", "0.7204088", "0.71792775", "0.7129182", "0.7114696", "0.7114679", "0.71071774", "0.7031592", "0.70229584", "0.701218", "0.6977698", "0.6977698", "0.6977698", "0.6977698", "0.69667864", "0.69621927", "0.69309497", "0.6925107", "0.6924764", "0.692195",...
0.0
-1
All fields but seed and noise must be set by caller
public TerrainObject build() { for(int i=0; i<paramsSet.length-3; i++) if(!paramsSet[i]) throw new IllegalArgumentException("Needed parameter (No. "+i+") for TerrainObject hasn't been set"); return new TerrainObject(x, y, z, xW, yW, zW, scale, seed, noise); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setSeed(int seed){\n this.seed = seed; \n }", "private PRNG() {\n java.util.Random r = new java.util.Random();\n seed = r.nextInt();\n mersenne = new MersenneTwister(seed);\n }", "public int getSeed(){\n return this.seed; \n }", "public void set...
[ "0.6862251", "0.67916626", "0.6764777", "0.67329866", "0.66955423", "0.6645102", "0.6542786", "0.6535569", "0.651409", "0.6511553", "0.64760375", "0.64646167", "0.6456767", "0.6397814", "0.63904375", "0.6327748", "0.6309735", "0.62996906", "0.6281922", "0.62761915", "0.626704...
0.0
-1
Construtor do elemento body da Nested Context Language (NCL).
public NCLBody() {}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ContextBodyBlock() {\n super();\n\r\n setChild(new List(), 0);\r\n setChild(new List(), 1);\r\n setChild(new List(), 2);\r\n\r\n }", "public ContextBodyBlock(List<Stmt> p0, List<ContextConstraint> p1, List<BodyDecl> p2) {\n setChild(p0, 0);\n setChild(p1, 1);\n...
[ "0.6225964", "0.61910135", "0.59446126", "0.56198764", "0.51691115", "0.5132768", "0.509959", "0.50766426", "0.5064601", "0.504642", "0.50418776", "0.502164", "0.49931195", "0.49907124", "0.49405417", "0.493001", "0.49276325", "0.4905161", "0.4887692", "0.48710364", "0.485539...
0.64517486
0
Construtor do elemento body da Nested Context Language (NCL).
public NCLBody(XMLReader reader, NCLElementImpl parent) { setReader(reader); setParent(parent); getReader().setContentHandler(this); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public NCLBody() {}", "public ContextBodyBlock() {\n super();\n\r\n setChild(new List(), 0);\r\n setChild(new List(), 1);\r\n setChild(new List(), 2);\r\n\r\n }", "public ContextBodyBlock(List<Stmt> p0, List<ContextConstraint> p1, List<BodyDecl> p2) {\n setChild(p0, 0);\n ...
[ "0.64517486", "0.6225964", "0.61910135", "0.59446126", "0.56198764", "0.51691115", "0.5132768", "0.509959", "0.50766426", "0.5064601", "0.504642", "0.50418776", "0.502164", "0.49931195", "0.49907124", "0.49405417", "0.493001", "0.49276325", "0.4887692", "0.48710364", "0.48553...
0.4905161
18
Adiciona uma porta ao corpo do documento NCL.
public boolean addPort(Pt port) { if(ports.add(port)){ //Se port existe, atribui este como seu parente if(port != null) port.setParent(this); notifyInserted(NCLElementSets.PORTS, port); return true; } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Fornecedor(int código, String nome, String data_cadastro, String n_documento) {\r\n super(código, nome, data_cadastro, n_documento);\r\n }", "public accionDocumentos() {\n \n }", "private void criaContaCliente (String cpf) {\n this.contasClientes.put(cpf, new Conta(cpf));\n ...
[ "0.59870046", "0.5755736", "0.5623767", "0.56083196", "0.5529796", "0.54403114", "0.54278034", "0.5424155", "0.54222167", "0.5415808", "0.5408766", "0.53975177", "0.5392953", "0.53843725", "0.53629845", "0.53471154", "0.5330282", "0.5318815", "0.5295475", "0.5291967", "0.5281...
0.0
-1
Remove uma porta do corpo do documento NCL.
public boolean removePort(String id) { for(Pt port : ports){ if(port.getId().equals(id)) return removePort(port); } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void remove() {\n\n\t\t\tsuprimirNodo(anterior);\n\n\t\t}", "@Override\r\n\tpublic void remove(int codigoLivro) throws BaseDadosException {\n\t\t\r\n\t}", "public void removerContato() {\n\t\tSystem.out.println(\"Digite o número do contato que deseja remover: \");\n\t\tint numeroContato = scanner.nextIn...
[ "0.6210451", "0.6200747", "0.6192919", "0.61144775", "0.60867536", "0.60838556", "0.6076656", "0.60512245", "0.6016838", "0.59876347", "0.5971027", "0.5965205", "0.5960532", "0.596032", "0.59535766", "0.59488857", "0.5942152", "0.591686", "0.58913785", "0.5883588", "0.5864669...
0.0
-1
Remove uma porta do corpo do documento NCL.
public boolean removePort(Pt port) { if(ports.remove(port)){ //Se port existe, retira o seu parentesco if(port != null) port.setParent(null); notifyRemoved(NCLElementSets.PORTS, port); return true; } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void remove() {\n\n\t\t\tsuprimirNodo(anterior);\n\n\t\t}", "@Override\r\n\tpublic void remove(int codigoLivro) throws BaseDadosException {\n\t\t\r\n\t}", "public void removerContato() {\n\t\tSystem.out.println(\"Digite o número do contato que deseja remover: \");\n\t\tint numeroContato = scanner.nextIn...
[ "0.6210451", "0.6200747", "0.6192919", "0.61144775", "0.60867536", "0.60838556", "0.6076656", "0.60512245", "0.6016838", "0.59876347", "0.5971027", "0.5965205", "0.5960532", "0.596032", "0.59535766", "0.59488857", "0.5942152", "0.591686", "0.58913785", "0.5883588", "0.5864669...
0.0
-1
Verifica se o corpo do documento NCL possui uma porta.
public boolean hasPort(String id) { for(Pt port : ports){ if(port.getId().equals(id)) return true; } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int qdtDocentesDisponibilidade(OfertaDisciplina of){\n \n of = ofertaDisciplinaFacade.inicializarColecaoDisponibilidades(of);\n \n //Set<Disponibilidade> disponibilidades = of.getDisponibilidades();\n Set<Disp> disponibilidades = of.getDispo();\n \n return di...
[ "0.57451665", "0.57446265", "0.57128924", "0.55934983", "0.5591065", "0.55352324", "0.55307496", "0.5490729", "0.545118", "0.5450026", "0.5445062", "0.5445062", "0.5445062", "0.54379", "0.5431519", "0.5427307", "0.54236263", "0.5415626", "0.53627527", "0.5358851", "0.53570837...
0.0
-1
Verifica se o corpo do documento NCL possui uma porta.
public boolean hasPort(Pt port) { return ports.contains(port); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int qdtDocentesDisponibilidade(OfertaDisciplina of){\n \n of = ofertaDisciplinaFacade.inicializarColecaoDisponibilidades(of);\n \n //Set<Disponibilidade> disponibilidades = of.getDisponibilidades();\n Set<Disp> disponibilidades = of.getDispo();\n \n return di...
[ "0.57451665", "0.57446265", "0.57128924", "0.55934983", "0.5591065", "0.55352324", "0.55307496", "0.5490729", "0.545118", "0.5450026", "0.5445062", "0.5445062", "0.5445062", "0.54379", "0.5431519", "0.5427307", "0.54236263", "0.5415626", "0.53627527", "0.5358851", "0.53570837...
0.0
-1
Verifica se o corpo do documento NCL possui alguma porta.
public boolean hasPort() { return !ports.isEmpty(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean comprobarExistencias(Libro libro){\n return libro.getCantidadCopias() > 0;\n }", "@Override\n\tpublic boolean estPleine() {\n\t\treturn getNbClients()==capacite;\n\t}", "public int qdtDocentesDisponibilidade(OfertaDisciplina of){\n \n of = ofertaDisciplinaFacade.inicializ...
[ "0.59517235", "0.5919169", "0.5780072", "0.5596194", "0.5594619", "0.5577717", "0.5575595", "0.55287457", "0.5514613", "0.5506986", "0.5493113", "0.5467538", "0.54672456", "0.54672456", "0.54672456", "0.54608256", "0.54556376", "0.5452657", "0.54492956", "0.54465353", "0.5431...
0.0
-1
Retorna as portas do corpo do documento NCL.
public Set<Pt> getPorts() { return ports; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "PetriNetDoc getPetrinet();", "public void listarDocDaDisciplina(){\r\n for(int i=0;i<docentes.size();i++){\r\n System.out.println(docentes.get(i).toString());\r\n }\r\n }", "public byte[] getDocparts()\n {\n if (true)\n throw new UnsupportedOperationException(\"...
[ "0.59717226", "0.55703187", "0.54029727", "0.528581", "0.52592796", "0.52281773", "0.51907116", "0.51681703", "0.5161948", "0.51319844", "0.51219356", "0.5118248", "0.51066965", "0.510655", "0.5088955", "0.50805277", "0.5038503", "0.50349367", "0.5030476", "0.5027523", "0.501...
0.0
-1