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
This function allows the user to select the directory they would like to use when constructing their Slideshow
private void changeDirectory() { directory = SlideshowManager.getDirectory(this); //use SlideshowManager to select a directory if (directory != null) //if a valid directory was selected... { JFrame loading = new JFrame("Loading..."); Image icon = new BufferedImage(1, 1, BufferedImage.TYPE_INT_ARGB_PRE); loading.setIconImage(icon); loading.setResizable(false); loading.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); loading.setSize(new Dimension(250,30)); loading.setLocationRelativeTo(null); loading.setVisible(true); timeline.reset(); timeline.setSlideDurationVisible(automated); timeline.setDefaultSlideDuration(slideInterval); m_ImageLibrary = ImageLibrary.resetLibrary(timeline, directory); //...reset the libraries to purge the current contents... JScrollPane spImages = new JScrollPane(m_ImageLibrary); spImages.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS); spImages.getVerticalScrollBar().setUnitIncrement(20); libraries.remove(0); libraries.add("Images", spImages); m_AudioLibrary.resetAudio(); m_AudioLibrary = AudioLibrary.resetLibrary(timeline, directory); JScrollPane spAudio = new JScrollPane(m_AudioLibrary); spAudio.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS); spAudio.getVerticalScrollBar().setUnitIncrement(20); libraries.remove(0); libraries.add("Audio", spAudio); loading.dispose(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private String setFolderPath(int selection) {\n\t\tString directory = \"\";\n\t\tswitch (selection) {\n\t\tcase 1:\n\t\t\tdirectory = \"\\\\art\";\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\tdirectory = \"\\\\mikons_1\";\n\t\t\tbreak;\n\t\tcase 3:\n\t\t\tdirectory = \"\\\\mikons_2\";\n\t\t\tbreak;\n\t\t}\n\t\treturn directo...
[ "0.61806065", "0.6037908", "0.60127246", "0.59716445", "0.5965534", "0.5924761", "0.58868265", "0.5851761", "0.5840536", "0.58166873", "0.58151084", "0.5812434", "0.5779322", "0.5770815", "0.5764809", "0.5748541", "0.57484686", "0.57130337", "0.56890154", "0.5660816", "0.5652...
0.7141142
0
This function returns the instance of SlideshowPlayer. If no instance exists, then one is created.
public static SlideshowEditor getInstance() { if (instance == null) { instance = new SlideshowEditor(); } return instance; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static synchronized Player getInstance(){\n if(Player.player == null){\n Player.player = new Player();\n }\n return Player.player;\n }", "public static MuzikoExoPlayer Instance() {\n if (instance == null) {\n instance = new MuzikoExoPlayer();\n }...
[ "0.6490951", "0.6443656", "0.63846636", "0.62273157", "0.59648335", "0.5853318", "0.58299327", "0.57942474", "0.57582587", "0.57582223", "0.5720068", "0.56876653", "0.5674476", "0.56697893", "0.56497586", "0.5607873", "0.55822575", "0.55796623", "0.55669296", "0.55398023", "0...
0.6933566
0
Don't zoom to current location if a user is manually entering points
private void onGpsLocationReady(MapFragment map) { if (getWindow().isActive() && (!inputActive || recordingEnabled)) { map.zoomToPoint(map.getGpsLocation(), true); } updateUi(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean allowZoom();", "@Override\n public void onDoubleTap(SKScreenPoint point) {\n mapView.zoomInAt(point);\n }", "private static void verifyViewPoint() {\n if (viewPoint.x < 0)\n viewPoint.x = 0;\n if (viewPoint.y < 0)\n viewPoint.y = 0;\n if (viewPoin...
[ "0.65542173", "0.6403388", "0.6295518", "0.615148", "0.612926", "0.6101497", "0.6089792", "0.6083628", "0.60208267", "0.60057807", "0.59998155", "0.5993947", "0.5968698", "0.5942951", "0.5941809", "0.5929606", "0.5925394", "0.5893786", "0.58927536", "0.58833617", "0.5852956",...
0.5785958
31
Updates the state of various UI widgets to reflect internal state.
private void updateUi() { final int numPoints = map.getPolyLinePoints(featureId).size(); final MapPoint location = map.getGpsLocation(); // Visibility state playButton.setVisibility(inputActive ? View.GONE : View.VISIBLE); pauseButton.setVisibility(inputActive ? View.VISIBLE : View.GONE); recordButton.setVisibility(inputActive && recordingEnabled && !recordingAutomatic ? View.VISIBLE : View.GONE); // Enabled state zoomButton.setEnabled(location != null); backspaceButton.setEnabled(numPoints > 0); clearButton.setEnabled(!inputActive && numPoints > 0); settingsView.findViewById(R.id.manual_mode).setEnabled(location != null); settingsView.findViewById(R.id.automatic_mode).setEnabled(location != null); if (intentReadOnly) { playButton.setEnabled(false); backspaceButton.setEnabled(false); clearButton.setEnabled(false); } // Settings dialog // GPS status boolean usingThreshold = isAccuracyThresholdActive(); boolean acceptable = location != null && isLocationAcceptable(location); int seconds = INTERVAL_OPTIONS[intervalIndex]; int minutes = seconds / 60; int meters = ACCURACY_THRESHOLD_OPTIONS[accuracyThresholdIndex]; locationStatus.setText( location == null ? getString(org.odk.collect.strings.R.string.location_status_searching) : !usingThreshold ? getString(org.odk.collect.strings.R.string.location_status_accuracy, location.accuracy) : acceptable ? getString(org.odk.collect.strings.R.string.location_status_acceptable, location.accuracy) : getString(org.odk.collect.strings.R.string.location_status_unacceptable, location.accuracy) ); locationStatus.setBackgroundColor( location == null ? getThemeAttributeValue(this, com.google.android.material.R.attr.colorPrimary) : acceptable ? getThemeAttributeValue(this, com.google.android.material.R.attr.colorPrimary) : getThemeAttributeValue(this, com.google.android.material.R.attr.colorError) ); collectionStatus.setText( !inputActive ? getString(org.odk.collect.strings.R.string.collection_status_paused, numPoints) : !recordingEnabled ? getString(org.odk.collect.strings.R.string.collection_status_placement, numPoints) : !recordingAutomatic ? getString(org.odk.collect.strings.R.string.collection_status_manual, numPoints) : !usingThreshold ? ( minutes > 0 ? getString(org.odk.collect.strings.R.string.collection_status_auto_minutes, numPoints, minutes) : getString(org.odk.collect.strings.R.string.collection_status_auto_seconds, numPoints, seconds) ) : ( minutes > 0 ? getString(org.odk.collect.strings.R.string.collection_status_auto_minutes_accuracy, numPoints, minutes, meters) : getString(org.odk.collect.strings.R.string.collection_status_auto_seconds_accuracy, numPoints, seconds, meters) ) ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void updateUI(){}", "@Override\r\n public void updateUI() {\r\n }", "protected void _updateWidgets()\n\t{\n\t\t// Show the title\n\t\tString title = _spItem.getTitleAttr() ;\n\t\tif( title != null )\n\t\t\t_obsTitle.setText( title ) ;\n\t\telse\n\t\t\t_obsTitle.setText( \"\" ) ;\n\n\t\tStr...
[ "0.720449", "0.71186393", "0.6978083", "0.6890965", "0.68653595", "0.68653595", "0.68653595", "0.68523324", "0.6681079", "0.6597969", "0.6571417", "0.6538615", "0.6382723", "0.6373803", "0.63229746", "0.63046634", "0.62973523", "0.6293828", "0.62801373", "0.6279188", "0.62768...
0.58114475
59
Convert the given object to string with each line indented by 4 spaces (except the first line).
private String toIndentedString(Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private String toIndentedString(Object object) {\n if (object == null) {\n return EndpointCentralConstants.NULL_STRING;\n }\n return object.toString().replace(EndpointCentralConstants.LINE_BREAK,\n EndpointCentralConstants.LINE_BREAK + EndpointCentralConstants.TAB_SPA...
[ "0.7886073", "0.75506985", "0.74986166" ]
0.7462953
87
Validates the JSON Object and throws an exception if issues found
public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { if (RoyaltyEntity.openapiRequiredFields.isEmpty()) { return; } else { // has required fields throw new IllegalArgumentException(String.format("The required field(s) %s in RoyaltyEntity is not found in the empty JSON string", RoyaltyEntity.openapiRequiredFields.toString())); } } Set<Entry<String, JsonElement>> entries = jsonObj.entrySet(); // check to see if the JSON string contains additional fields for (Entry<String, JsonElement> entry : entries) { if (!RoyaltyEntity.openapiFields.contains(entry.getKey())) { throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `RoyaltyEntity` properties. JSON: %s", entry.getKey(), jsonObj.toString())); } } if (jsonObj.get("account") != null && !jsonObj.get("account").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `account` to be a primitive type in the JSON string but got `%s`", jsonObj.get("account").toString())); } if (jsonObj.get("account_open_id") != null && !jsonObj.get("account_open_id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `account_open_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("account_open_id").toString())); } if (jsonObj.get("bind_login_name") != null && !jsonObj.get("bind_login_name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `bind_login_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("bind_login_name").toString())); } if (jsonObj.get("login_name") != null && !jsonObj.get("login_name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `login_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("login_name").toString())); } if (jsonObj.get("memo") != null && !jsonObj.get("memo").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `memo` to be a primitive type in the JSON string but got `%s`", jsonObj.get("memo").toString())); } if (jsonObj.get("name") != null && !jsonObj.get("name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void validateJson();", "public static void validateJsonObject(JsonObject jsonObj) throws IOException {\n if (jsonObj == null) {\n if (VoucherPackageSalesInfo.openapiRequiredFields.isEmpty()) {\n return;\n } else { // has required fields\n throw new IllegalArgumentException(St...
[ "0.8203461", "0.6949332", "0.6945078", "0.6726519", "0.6705012", "0.6679645", "0.6679158", "0.6663173", "0.6658404", "0.6605915", "0.6580855", "0.6536906", "0.6438707", "0.6415284", "0.63061184", "0.6246508", "0.62255776", "0.61933446", "0.6192022", "0.61842835", "0.616118", ...
0.703993
1
Create an instance of RoyaltyEntity given an JSON string
public static RoyaltyEntity fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, RoyaltyEntity.class); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "<T> T fromJson(String json, Class<T> type);", "<T> T fromJson(String source, Class<T> type);", "public <ENTITY extends IDomainResource> ENTITY parse(final String jsonString, final Class<ENTITY> targetClass)\n throws WebApplicationException\n {\n ENTITY entity = parseWithoutValidation(jsonS...
[ "0.6723152", "0.65252554", "0.6454739", "0.6272999", "0.6159504", "0.6157141", "0.6134517", "0.5968286", "0.5963455", "0.59563273", "0.5892227", "0.58585006", "0.58485216", "0.58478504", "0.5812986", "0.579768", "0.57882595", "0.5778314", "0.5770127", "0.57645005", "0.5723684...
0.83104694
0
Convert an instance of RoyaltyEntity to an JSON string
public String toJson() { return JSON.getGson().toJson(this); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract String toJsonString();", "public abstract String toJson();", "public abstract Object toJson();", "public String toJson() { return new Gson().toJson(this); }", "public static <T> String serizalize(T entity) {\n\t\t\n\t\tif (entity != null) {\n\t\t\tGson gson = new GsonBuilder()\n\t\t\t\t\t//...
[ "0.6943867", "0.6891794", "0.68673605", "0.6666249", "0.66629815", "0.6589793", "0.657596", "0.6490578", "0.6479957", "0.6457148", "0.6426226", "0.6397826", "0.6382273", "0.63595206", "0.63550234", "0.6327845", "0.62474436", "0.624052", "0.62077206", "0.6187451", "0.6187451",...
0.6622827
13
make constructor private for single instance control
private MyAlbumList() { albums = new ArrayList<Album>(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private ATCres() {\r\n // prevent to instantiate this class\r\n }", "private Instantiation(){}", "private SingleTon() {\n\t}", "private TMCourse() {\n\t}", "private Rekenhulp()\n\t{\n\t}", "private UI()\n {\n this(null, null);\n }", "private MApi() {}", "private GuiUtils()\r\n {...
[ "0.7326067", "0.7291705", "0.7241665", "0.7221598", "0.70936656", "0.7060179", "0.70038307", "0.6994371", "0.69702005", "0.6955097", "0.695126", "0.6905326", "0.68797904", "0.68397194", "0.67971075", "0.6794462", "0.6773234", "0.67712796", "0.676483", "0.6759978", "0.6759978"...
0.0
-1
deal out the singleton
public static MyAlbumList getInstance(Context ctx) throws IOException { if (albumList == null) { albumList = new MyAlbumList(); albumList.context = ctx; albumList.load(); } return albumList; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private SingletonDoubleCheck() {}", "private SingletonSigar(){}", "private SingletonEager(){\n \n }", "private Singleton(){}", "private Singleton()\n\t\t{\n\t\t}", "private Singleton() {\n\t}", "private SingletonSample() {}", "@Override\n\t\tpublic Object getInstance() {\n\t\t\treturn null;\n\t...
[ "0.7151822", "0.71054226", "0.704859", "0.70464283", "0.6920779", "0.68960845", "0.68664825", "0.6864157", "0.6792876", "0.6768103", "0.66980517", "0.66980517", "0.6679994", "0.6635296", "0.6607824", "0.66060597", "0.65049905", "0.64986193", "0.64787483", "0.6468542", "0.6437...
0.0
-1
name and artist are mandatory
public Album add(String name) { if (name == null) { throw new IllegalArgumentException("Album name is mandatory"); } // create Album object Album album = new Album(name); // if this is the first add, it's easy if (albums.size() == 0) { albums.add(album); try { store(); } catch (IOException e) { Toast.makeText(context, "Could not store albums to file", Toast.LENGTH_LONG).show(); } return album; } albums.add(album); // write through try { store(); return album; } catch (IOException e) { return null; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setArtist(String artist) {\n this.artist = artist;\n }", "public void setArtist(String artist) {\n this.artist = artist;\n }", "public void setArtist(String artist){\n\t\tthis.artist = artist;\n\t}", "public Song(String title, String artist) {\r\n this.title = title;\r\n ...
[ "0.6989104", "0.6989104", "0.69629335", "0.6818598", "0.6752604", "0.67185146", "0.6596576", "0.65441877", "0.648497", "0.64258146", "0.64258146", "0.6349233", "0.6321618", "0.63113207", "0.628092", "0.627636", "0.6272061", "0.6228859", "0.6216274", "0.61608994", "0.6150684",...
0.0
-1
TODO: We use recursion to find privileges inherited from roles, TODO: we need to filter recursive entries (even ROLE_NAME and GRANTEE)
@Override public String getUserGroupsQuery() { return "SELECT ROLE_NAME FROM INFORMATION_SCHEMA.ROLE_AUTHORIZATION_DESCRIPTORS WHERE GRANTEE=? AND ROLE_NAME!=GRANTEE;"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean allGranted(String roles);", "@Override\n\tpublic List<UserRole> buscarUserRoleSemPermissoes() {\n\t\t// TODO Auto-generated method stub\n\t\tQuery query = getCurrentSession().createQuery(\"select ur from UserRole ur where ur.permissions\");\n\t\treturn query.list();\n\t}", "PermissionInfo getRolePermis...
[ "0.5948298", "0.5871577", "0.58310217", "0.5761079", "0.5729141", "0.5695812", "0.5679026", "0.5666736", "0.5600915", "0.55906445", "0.5586581", "0.5573618", "0.5557712", "0.5557309", "0.54444635", "0.5440924", "0.5435822", "0.54167986", "0.54066765", "0.5405174", "0.5392728"...
0.5957391
0
todo: on failure voor get van campussen
@Override public void onFailure() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "String getCampoId();", "@Override\n\tpublic List<Campus> getAllCampus() {\n\t\tEntityManager em = emf.createEntityManager();\n\t\ttry {\n\t\t\tQuery query = em.createQuery(\"SELECT c FROM Campus AS c\");\n\t\t\t\n\t\t\treturn query.getResultList();\n\t\t\t\n\t\t} catch (NoResultException e) {\n\t\t\t\n\t\t}\n\t...
[ "0.55711216", "0.5530367", "0.5510023", "0.54878867", "0.5399955", "0.53996915", "0.5398687", "0.53323734", "0.53138745", "0.5313703", "0.52996296", "0.52893513", "0.52735627", "0.5265187", "0.5260087", "0.5254531", "0.5234016", "0.52286685", "0.5226613", "0.5219545", "0.5215...
0.0
-1
public static final String TABLE_Book = "book"; public static final String TABLE_Student = "student"; public static final String TABLE_Issue_Book = "issue_book";
public DBHandler(Context context) { super(context, DB_NAME, null, DB_VERSION); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "SqlTables(String tableName){\n\t\t\t this.tableName = tableName; \n\t\t}", "public void createTable(){\r\n String tableStudent = \"CREATE TABLE tableStudent (\"+\r\n \"studentId INT primary key,\"+\"studentName TEXT,\"+\r\n \"className TEXT)\";\r\n db.execSQL(tableStud...
[ "0.6396001", "0.6207996", "0.617171", "0.6141718", "0.5950985", "0.58583885", "0.5840544", "0.58299446", "0.5812275", "0.5799318", "0.5785284", "0.5765465", "0.5752271", "0.57516605", "0.57133824", "0.57118416", "0.57009435", "0.569471", "0.5650939", "0.56027657", "0.5591365"...
0.0
-1
Public methods used by CardIOActivity
public void setGuideAndRotation(Rect rect, int rotation) { mRotation = rotation; mGuide = rect; invalidate(); Point topEdgeUIOffset; if (mRotation % 180 != 0) { topEdgeUIOffset = new Point((int) (40 * mScale), (int) (60 * mScale)); mRotationFlip = -1; } else { topEdgeUIOffset = new Point((int) (60 * mScale), (int) (40 * mScale)); mRotationFlip = 1; } if (mCameraPreviewRect != null) { Point torchPoint = new Point(mCameraPreviewRect.left + topEdgeUIOffset.x, mCameraPreviewRect.top + topEdgeUIOffset.y); // mTorchRect used only for touch lookup, not layout mTorchRect = Util.rectGivenCenter(torchPoint, (int) (TORCH_WIDTH * mScale), (int) (TORCH_HEIGHT * mScale)); // mLogoRect used only for touch lookup, not layout Point logoPoint = new Point(mCameraPreviewRect.right - topEdgeUIOffset.x, mCameraPreviewRect.top + topEdgeUIOffset.y); mLogoRect = Util.rectGivenCenter(logoPoint, (int) (LOGO_MAX_WIDTH * mScale), (int) (LOGO_MAX_HEIGHT * mScale)); int[] gradientColors = { Color.WHITE, Color.BLACK }; GradientDrawable.Orientation gradientOrientation = GRADIENT_ORIENTATIONS[(mRotation / 90) % 4]; mGradientDrawable = new GradientDrawable(gradientOrientation, gradientColors); mGradientDrawable.setGradientType(GradientDrawable.LINEAR_GRADIENT); mGradientDrawable.setBounds(mGuide); mGradientDrawable.setAlpha(50); mLockedBackgroundPath = new Path(); mLockedBackgroundPath.addRect(new RectF(mCameraPreviewRect), Path.Direction.CW); mLockedBackgroundPath.addRect(new RectF(mGuide), Path.Direction.CCW); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void ActonCard() {\n\t}", "protected CardCommandAPDU() {\n }", "public abstract void queryRemoteCardInfo();", "private void cards() {\n newUserCard();\n editTypeCard();\n changePasswordCard();\n }", "public abstract void open(CaptchalogueCard card, OpenReason reason);", ...
[ "0.62345886", "0.61164933", "0.58031", "0.579511", "0.579365", "0.5755046", "0.5727988", "0.56007326", "0.5598741", "0.55706125", "0.55188394", "0.54928774", "0.54592013", "0.54276115", "0.54265904", "0.5417064", "0.5412473", "0.5391149", "0.53835154", "0.5381555", "0.5381143...
0.0
-1
/ create the card image with inside a rounded rect
private void decorateBitmap() { RectF roundedRect = new RectF(2, 2, mBitmap.getWidth() - 2, mBitmap.getHeight() - 2); float cornerRadius = mBitmap.getHeight() * CORNER_RADIUS_SIZE; // Alpha canvas with white rounded rect Bitmap maskBitmap = Bitmap.createBitmap(mBitmap.getWidth(), mBitmap.getHeight(), Bitmap.Config.ARGB_8888); Canvas maskCanvas = new Canvas(maskBitmap); maskCanvas.drawColor(Color.TRANSPARENT); Paint maskPaint = new Paint(Paint.ANTI_ALIAS_FLAG); maskPaint.setColor(Color.BLACK); maskPaint.setStyle(Paint.Style.FILL); maskCanvas.drawRoundRect(roundedRect, cornerRadius, cornerRadius, maskPaint); Paint paint = new Paint(); paint.setFilterBitmap(false); // Draw mask onto mBitmap Canvas canvas = new Canvas(mBitmap); paint.setXfermode(new PorterDuffXfermode(PorterDuff.Mode.DST_IN)); canvas.drawBitmap(maskBitmap, 0, 0, paint); // Now re-use the above bitmap to do a shadow. paint.setXfermode(null); maskBitmap.recycle(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "for (Card c : humanPlayerHand.getAllCards) {\n StackPane cardGrouping = new StackPane; // used to center the rectangle and text\n Rectangle card = new Rectangle(width, height); // where width and height are defined elsewhere\n card.setArcWidth(arcSize); // where arcSize is defined elsewhere\n ...
[ "0.60895044", "0.59526604", "0.5926959", "0.5870881", "0.5855277", "0.5707544", "0.5700358", "0.56980085", "0.56771415", "0.5672512", "0.56688446", "0.5667702", "0.5610951", "0.5606824", "0.5586799", "0.555803", "0.55253935", "0.5514462", "0.55039245", "0.5501868", "0.5488161...
0.0
-1
TODO move this into RequestTask, so we just get back a card image ready to go
public boolean isAnimating() { return (mState != 0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Image getCardImage(Card card) {\n return getImage(\"playing-cards/\" + card + \".png\");\n }", "public void retrieveDetailedImage(){\n //Build request for raw JSON data\n ImageRequest imageRequest = new ImageRequest(currentBook.thumbnail, new Response.Listener<Bitmap>() {\n ...
[ "0.68208784", "0.65054077", "0.6224112", "0.5937966", "0.5880058", "0.58254474", "0.5816917", "0.57290286", "0.5728182", "0.56986207", "0.5682678", "0.567147", "0.5655051", "0.56291807", "0.5588423", "0.5585652", "0.5584911", "0.5581786", "0.5571461", "0.55660635", "0.5566017...
0.0
-1
This method returns this object's policy context identifier.
public String getContextID() throws PolicyContextException { checkSetPolicyPermission(); return this.CONTEXT_ID; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "String getContextId();", "public String getContextId() {\n return contextId;\n }", "public int getContextId() {\n return contextId;\n }", "public java.lang.CharSequence getContextId() {\n return contextId;\n }", "public java.lang.CharSequence getContextId() {\n return contextId...
[ "0.68085027", "0.6760872", "0.67587066", "0.66171587", "0.66162556", "0.6464189", "0.6246302", "0.6187375", "0.6172981", "0.6172981", "0.61314386", "0.61219954", "0.6096446", "0.6066049", "0.60081303", "0.6005797", "0.59257346", "0.5861586", "0.58226734", "0.5710324", "0.5669...
0.83524466
0
Used to add permissions to a named role in this PolicyConfiguration. If the named Role does not exist in the PolicyConfiguration, it is created as a result of the call to this function. It is the job of the Policy provider to ensure that all the permissions added to a role are granted to principals "mapped to the role".
public void addToRole(String roleName, PermissionCollection permissions) throws PolicyContextException { assertStateIsOpen(); assert roleName != null; assert permissions != null; if (roleName != null && permissions != null) { checkSetPolicyPermission(); for(Enumeration e = permissions.elements(); e.hasMoreElements();) { this.getRolePermissions(roleName).add((Permission)e.nextElement()); writeOnCommit = true; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addToRole(String roleName, Permission permission)\n\tthrows PolicyContextException {\n\n assertStateIsOpen();\n\n\tassert permission != null;\n\tassert roleName != null;\n\t\n\tif (roleName != null && permission != null) {\n\t checkSetPolicyPermission();\n\t this.getRolePermissions(roleNam...
[ "0.73312044", "0.70227665", "0.6522288", "0.6520796", "0.6146486", "0.6125406", "0.61203223", "0.6106831", "0.61062115", "0.6046437", "0.60300905", "0.6021905", "0.6017411", "0.598818", "0.5942952", "0.59392226", "0.58313274", "0.5830057", "0.58170515", "0.57236767", "0.57096...
0.72136027
1
Used to add a single permission to a named role in this PolicyConfiguration. If the named Role does not exist in the PolicyConfiguration, it is created as a result of the call to this function. It is the job of the Policy provider to ensure that all the permissions added to a role are granted to principals "mapped to the role".
public void addToRole(String roleName, Permission permission) throws PolicyContextException { assertStateIsOpen(); assert permission != null; assert roleName != null; if (roleName != null && permission != null) { checkSetPolicyPermission(); this.getRolePermissions(roleName).add(permission); writeOnCommit = true; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addToRole(String roleName, PermissionCollection permissions)\n\tthrows PolicyContextException\n {\n assertStateIsOpen();\n\n\tassert roleName != null;\n\tassert permissions != null;\n\t\n\tif (roleName != null && permissions != null) {\n\t checkSetPolicyPermission();\n\t for(Enumeration...
[ "0.68329275", "0.68295443", "0.6490082", "0.63750255", "0.63507646", "0.6068636", "0.60109913", "0.60012203", "0.59811515", "0.59511346", "0.5927327", "0.59099776", "0.5853835", "0.58448565", "0.5840928", "0.58326924", "0.58123726", "0.580588", "0.57994586", "0.5799033", "0.5...
0.75538975
0
Used to add unchecked policy statements to this PolicyConfiguration.
public void addToUncheckedPolicy(PermissionCollection permissions) throws PolicyContextException { assertStateIsOpen(); assert permissions != null; if (permissions != null) { checkSetPolicyPermission(); for(Enumeration e = permissions.elements(); e.hasMoreElements();){ this.getUncheckedPermissions().add((Permission) e.nextElement()); writeOnCommit = true; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void removeUncheckedPolicy()\n\tthrows PolicyContextException{\n\n assertStateIsOpen();\n\n\tcheckSetPolicyPermission();\t\n\n\tif (uncheckedPermissions != null) {\n\t uncheckedPermissions = null;\n\t writeOnCommit = true;\n\t}\n }", "void clearPolicy() {\n policy = new Policy();\n ...
[ "0.5818856", "0.51956475", "0.51926225", "0.5030085", "0.49150318", "0.48530084", "0.48418474", "0.483471", "0.483471", "0.483471", "0.47920302", "0.478574", "0.478574", "0.47137764", "0.46688762", "0.46172866", "0.46159956", "0.45977435", "0.4597593", "0.4597327", "0.4589794...
0.53394574
1
Used to add a single unchecked policy statement to this PolicyConfiguration.
public void addToUncheckedPolicy(Permission permission) throws PolicyContextException{ assertStateIsOpen(); assert permission != null; if (permission != null) { checkSetPolicyPermission(); this.getUncheckedPermissions().add(permission); writeOnCommit = true; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void removeUncheckedPolicy()\n\tthrows PolicyContextException{\n\n assertStateIsOpen();\n\n\tcheckSetPolicyPermission();\t\n\n\tif (uncheckedPermissions != null) {\n\t uncheckedPermissions = null;\n\t writeOnCommit = true;\n\t}\n }", "@Override\n\tpublic Policy addPolicy(Policy policy) {\n...
[ "0.5417293", "0.5211767", "0.5166962", "0.5127057", "0.4968829", "0.496331", "0.49550167", "0.4937243", "0.48943636", "0.48131704", "0.4657341", "0.46410626", "0.45903072", "0.45847452", "0.44893792", "0.4485589", "0.4480615", "0.44619888", "0.44619888", "0.44176602", "0.4401...
0.5667337
0
Used to add excluded policy statements to this PolicyConfiguration.
public void addToExcludedPolicy(PermissionCollection permissions) throws PolicyContextException { assertStateIsOpen(); assert permissions != null; if (permissions != null) { checkSetPolicyPermission(); for(Enumeration e = permissions.elements(); e.hasMoreElements();){ this.getExcludedPermissions().add((Permission) e.nextElement()); writeOnCommit = true; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setExcludes(String excludes)\n {\n this.excludes = excludes;\n }", "protected Permissions getExcludedPolicy(){\n\treturn stateIs(INSERVICE_STATE) ? this.excludedPermissions : null;\n }", "public void removeExcludedPolicy()\n throws PolicyContextException{\n\n assertStateIsOpen...
[ "0.58538514", "0.5770055", "0.5635156", "0.5477326", "0.5432563", "0.5423106", "0.5331602", "0.5303609", "0.5285232", "0.5272496", "0.5209557", "0.5155565", "0.5155143", "0.5111595", "0.5106956", "0.5077196", "0.5064408", "0.5046724", "0.5042576", "0.5034487", "0.50300324", ...
0.5187529
11
Used to add a single excluded policy statement to this PolicyConfiguration.
public void addToExcludedPolicy(Permission permission) throws PolicyContextException{ assertStateIsOpen(); assert permission != null; if (permission != null) { checkSetPolicyPermission(); this.getExcludedPermissions().add(permission); writeOnCommit = true; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected Permissions getExcludedPolicy(){\n\treturn stateIs(INSERVICE_STATE) ? this.excludedPermissions : null;\n }", "public ExecutionPolicy not()\n\t{\n\t\treturn new NotRule(this);\n\t}", "public void removeExcludedPolicy()\n throws PolicyContextException{\n\n assertStateIsOpen();\n\n\tche...
[ "0.56500316", "0.55197966", "0.53543216", "0.51101893", "0.50530887", "0.5033694", "0.49494672", "0.4935229", "0.49071467", "0.48860204", "0.48090115", "0.47928354", "0.47208565", "0.4690128", "0.4671541", "0.46523535", "0.46489754", "0.4641644", "0.45927837", "0.45916227", "...
0.55284756
1
Used to remove a role and all its permissions from this PolicyConfiguration.
public void removeRole(String roleName) throws PolicyContextException{ assertStateIsOpen(); assert roleName != null; if(roleName != null && rolePermissionsTable != null) { checkSetPolicyPermission(); if (rolePermissionsTable.remove(roleName) != null) { if (rolePermissionsTable.isEmpty()) { rolePermissionsTable = null; } writeOnCommit = true; } else if (roleName.equals("*")) { boolean wasEmpty = rolePermissionsTable.isEmpty(); if (!wasEmpty) { rolePermissionsTable.clear(); } rolePermissionsTable = null; if (!wasEmpty) { writeOnCommit = true; } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void removeAdminRole()\r\n {\r\n getSemanticObject().removeProperty(swpres_adminRole);\r\n }", "public void removeRole(String roleName) throws UnsupportedOperationException;", "public void delRole( String role )\n {\n if ( this.roles != null )\n {\n this.roles.re...
[ "0.67745394", "0.67529136", "0.6635501", "0.65272987", "0.64893264", "0.6398914", "0.63744086", "0.62204903", "0.6195259", "0.6178093", "0.61306983", "0.61218834", "0.6054692", "0.6034195", "0.60300726", "0.6028641", "0.6024097", "0.59869266", "0.59430707", "0.5919725", "0.58...
0.6879168
0
Used to remove any unchecked policy statements from this PolicyConfiguration.
public void removeUncheckedPolicy() throws PolicyContextException{ assertStateIsOpen(); checkSetPolicyPermission(); if (uncheckedPermissions != null) { uncheckedPermissions = null; writeOnCommit = true; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void removePolicy(){\n\texcludedPermissions = null;\n\tuncheckedPermissions = null;\n\trolePermissionsTable = null;\n\tremovePolicyFile(true);\n\tremovePolicyFile(false);\n\tremovePolicyContextDirectory();\n\tinitLinkTable();\n\tpolicy = null;\n\twriteOnCommit = true;\n }", "void clearPolicy() {\n ...
[ "0.6625087", "0.652838", "0.58711755", "0.5609224", "0.5609224", "0.5444998", "0.5394449", "0.5389656", "0.5389656", "0.5389656", "0.5275579", "0.52260476", "0.52219194", "0.5219346", "0.51223445", "0.5100713", "0.50829864", "0.5060322", "0.5015812", "0.50124", "0.49785826", ...
0.7252007
0
Used to remove any excluded policy statements from this PolicyConfiguration.
public void removeExcludedPolicy() throws PolicyContextException{ assertStateIsOpen(); checkSetPolicyPermission(); if (excludedPermissions != null) { excludedPermissions = null; writeOnCommit = true; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void removePolicy(){\n\texcludedPermissions = null;\n\tuncheckedPermissions = null;\n\trolePermissionsTable = null;\n\tremovePolicyFile(true);\n\tremovePolicyFile(false);\n\tremovePolicyContextDirectory();\n\tinitLinkTable();\n\tpolicy = null;\n\twriteOnCommit = true;\n }", "protected Permissions getE...
[ "0.61639076", "0.5693763", "0.55316305", "0.5452113", "0.5451786", "0.5076334", "0.50254047", "0.50254047", "0.4959095", "0.49585602", "0.4958545", "0.49279064", "0.4914757", "0.48842147", "0.48663098", "0.48332813", "0.48214936", "0.47981176", "0.47247025", "0.46891052", "0....
0.7172936
0
This method is used to set to "inService" the state of the policy context whose interface is this PolicyConfiguration Object. Only those policy contexts whose state is "inService" will be included in the policy contexts processed by the Policy.refresh method. A policy context whose state is "inService" may be returned to the "open" state by calling the getPolicyConfiguration method of the PolicyConfiguration factory with the policy context identifier of the policy context. When the state of a policy context is "inService", calling any method other than commit, delete, getContextID, or inService on its PolicyConfiguration Object will cause an UnsupportedOperationException to be thrown.
public void commit() throws PolicyContextException{ synchronized(refreshLock) { if(stateIs(DELETED_STATE)){ String defMsg="Cannot perform Operation on a deleted PolicyConfiguration"; String msg=localStrings.getLocalString("pc.invalid_op_for_state_delete",defMsg); logger.log(Level.WARNING,msg); throw new UnsupportedOperationException(defMsg); } else { try { checkSetPolicyPermission(); if (stateIs(OPEN_STATE)) { generatePermissions(); setState(INSERVICE_STATE); } } catch(Exception e){ String defMsg="commit fail for contextod "+CONTEXT_ID; String msg=localStrings.getLocalString("pc.commit_failure",defMsg,new Object[]{CONTEXT_ID,e}); logger.log(Level.SEVERE,msg); throw new PolicyContextException(e); } if (logger.isLoggable(Level.FINE)){ logger.fine("JACC Policy Provider: PC.commit "+CONTEXT_ID); } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean inService() throws PolicyContextException{\n\tcheckSetPolicyPermission();\t\n\tboolean rvalue = stateIs(INSERVICE_STATE);\n \n if (logger.isLoggable(Level.FINE)) {\n logger.fine(\"JACC Policy Provider: inService: \" +\n (rvalue ? \"true \" : \"false \...
[ "0.62898225", "0.5159561", "0.50851935", "0.48832992", "0.48589656", "0.4800089", "0.47957882", "0.47924584", "0.4710724", "0.46954417", "0.46742126", "0.46533453", "0.4623091", "0.46117857", "0.455795", "0.45469528", "0.45047483", "0.4502832", "0.44927168", "0.44593742", "0....
0.53479165
1
Creates a relationship between this configuration and another such that they share the same principaltorole mappings. PolicyConfigurations are linked to apply a common principaltorole mapping to multiple seperately manageable PolicyConfigurations, as is required when an application is composed of multiple modules. Note that the policy statements which comprise a role, or comprise the excluded or unchecked policy collections in a PolicyConfiguration are unaffected by the configuration being linked to another.
public void linkConfiguration(PolicyConfiguration link) throws PolicyContextException { assertStateIsOpen(); String linkId = link.getContextID(); if (this.CONTEXT_ID == linkId) { String defMsg="Operation attempted to link PolicyConfiguration to itself."; String msg=localStrings.getLocalString("pc.unsupported_link_operation",defMsg); logger.log(Level.WARNING,msg); throw new IllegalArgumentException(defMsg); } checkSetPolicyPermission(); updateLinkTable(linkId); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void createASPolicy(){\n\t\t\n\t\t// First create for replicated objects\n\t\t//System.out.println(\"Inside ObjectBasedAnalyzer: createASPolicy\");\n\t\t\n\t\tcreateReplicatedObjectsPolicy();\n\t\t\t\t\n\t\t// Now for rest of objects\n\t\t\n//\t\tcreateOnlyDistributedObjectsPolicy();\n\t\t\n\t\tIterator<Str...
[ "0.4745534", "0.47151503", "0.46701923", "0.46360236", "0.45948339", "0.4554578", "0.4549489", "0.44932616", "0.44612122", "0.44500977", "0.43944058", "0.43874973", "0.43535364", "0.43492687", "0.43286335", "0.43155733", "0.4306514", "0.42862618", "0.4258264", "0.42449942", "...
0.5146705
0
Causes all policy statements to be deleted from this PolicyConfiguration and sets its internal state such that calling any method, other than delete, getContextID, or inService on the PolicyConfiguration will be rejected and cause an UnsupportedOperationException to be thrown. This operation has no affect on any linked PolicyConfigurations other than removing any links involving the deleted PolicyConfiguration.
public void delete() throws PolicyContextException { checkSetPolicyPermission(); synchronized(refreshLock) { try { removePolicy(); } finally { setState(DELETED_STATE); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void removePolicy(){\n\texcludedPermissions = null;\n\tuncheckedPermissions = null;\n\trolePermissionsTable = null;\n\tremovePolicyFile(true);\n\tremovePolicyFile(false);\n\tremovePolicyContextDirectory();\n\tinitLinkTable();\n\tpolicy = null;\n\twriteOnCommit = true;\n }", "@Override\r\n\tpublic void...
[ "0.65746444", "0.60479873", "0.6030811", "0.58469087", "0.58137566", "0.5684374", "0.5601103", "0.55794144", "0.5561671", "0.55127585", "0.54723054", "0.54489493", "0.532951", "0.5281718", "0.51748997", "0.51710045", "0.5142012", "0.5134449", "0.5131166", "0.5097928", "0.5082...
0.7273046
0
This method is used to determine if the policy context whose interface is this PolicyConfiguration Object is in the "inService" state.
public boolean inService() throws PolicyContextException{ checkSetPolicyPermission(); boolean rvalue = stateIs(INSERVICE_STATE); if (logger.isLoggable(Level.FINE)) { logger.fine("JACC Policy Provider: inService: " + (rvalue ? "true " : "false ") + CONTEXT_ID); } return rvalue; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean hasService();", "boolean hasService();", "boolean hasService();", "boolean hasService();", "boolean hasService();", "private boolean stateIs(int stateValue) {\n\tboolean inState = _stateIs(stateValue);\n\tif (stateValue == INSERVICE_STATE && !inState) {\n\t if (fileArrived(true) || fileArrived...
[ "0.62023467", "0.62023467", "0.62023467", "0.62023467", "0.62023467", "0.61918724", "0.6091488", "0.60670614", "0.60481644", "0.60481644", "0.60481644", "0.60102993", "0.60057276", "0.59759", "0.59759", "0.59134716", "0.5900899", "0.5843916", "0.5816593", "0.5816593", "0.5816...
0.8085945
0
The following methods are implementation specific
protected void checkSetPolicyPermission() { SecurityManager sm = System.getSecurityManager(); if (sm != null) { if (setPolicyPermission == null) { setPolicyPermission = new java.security.SecurityPermission("setPolicy"); } sm.checkPermission(setPolicyPermission); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n public void perish() {\n \n }", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\n public void func_104112_b(...
[ "0.62937796", "0.6286669", "0.6238451", "0.61882234", "0.61791515", "0.61664283", "0.6108708", "0.61025655", "0.60979694", "0.6060829", "0.6037392", "0.60344034", "0.60292834", "0.5994675", "0.59404975", "0.59404975", "0.5920933", "0.5908916", "0.5908916", "0.5872685", "0.585...
0.0
-1
get the policy object
protected java.security.Policy getPolicy(){ if (stateIs(INSERVICE_STATE)) { return this.policy; } if (logger.isLoggable(Level.FINEST)) { logger.finest("JACC Policy Provider: getPolicy ("+CONTEXT_ID+") is NOT in service"); } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Policy _get_policy(int policy_type);", "public Policy _get_policy(int policy_type) {\n throw new NO_IMPLEMENT(reason);\n }", "public com.vmware.converter.DVSPolicy getPolicy() {\r\n return policy;\r\n }", "public PolicyMap getPolicyMap();", "@Override\r\n\tpublic Policy getById(Integer ...
[ "0.8114049", "0.7391775", "0.7025899", "0.69773865", "0.69632804", "0.6686403", "0.66320604", "0.6630122", "0.65724206", "0.65297765", "0.6528546", "0.64773864", "0.6452213", "0.63688993", "0.6298969", "0.6271056", "0.62303936", "0.62292606", "0.6211037", "0.6111656", "0.6065...
0.7550172
1
get the policy object
protected Permissions getExcludedPolicy(){ return stateIs(INSERVICE_STATE) ? this.excludedPermissions : null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Policy _get_policy(int policy_type);", "protected java.security.Policy getPolicy(){\n\tif (stateIs(INSERVICE_STATE)) {\n\t return this.policy;\n\t} \n\tif (logger.isLoggable(Level.FINEST)) {\n\t logger.finest(\"JACC Policy Provider: getPolicy (\"+CONTEXT_ID+\") is NOT in service\");\n\t}\n\treturn null;\n ...
[ "0.8114049", "0.7550172", "0.7391775", "0.7025899", "0.69773865", "0.69632804", "0.6686403", "0.66320604", "0.6630122", "0.65724206", "0.65297765", "0.6528546", "0.64773864", "0.6452213", "0.63688993", "0.6298969", "0.6271056", "0.62303936", "0.62292606", "0.6211037", "0.6111...
0.53194875
85
called by PolicyWrapper to refresh context specific policy object.
protected void refresh(boolean force){ synchronized(refreshLock){ if (stateIs(INSERVICE_STATE) && (wasRefreshed == false || force || filesChanged())) { // find open policy.url int i = 0; String value = null; String urlKey = null; while (true) { urlKey = PROVIDER_URL+(++i); value = java.security.Security.getProperty(urlKey); if (value == null || value.equals("")) { break; } } try { java.security.Security.setProperty(urlKey,policyUrlValue); if (fileChanged(false)) { excludedPermissions = loadExcludedPolicy(); } // capture time before load, to ensure that we // have a time that precedes load captureFileTime(true); if (policy == null) { policy = getNewPolicy(); } else { policy.refresh(); if (logger.isLoggable(Level.FINE)){ logger.fine("JACC Policy Provider: Called Policy.refresh on contextId: "+CONTEXT_ID+" policyUrlValue was "+policyUrlValue); } } wasRefreshed = true; } finally { // can't setProperty back to null, workaround is to // use empty string java.security.Security.setProperty(urlKey,""); } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "ManagementLockObject refresh(Context context);", "@Override\r\n\tpublic void updatePolicy(Policy policy) {\n\t\tdao.updatePolicy(policy);\r\n\t\t\r\n\t}", "void clearPolicy() {\n policy = new Policy();\n }", "void updatePolicyHOlder(int policyHolderId , PolicyHolder policyHolder);", "private void...
[ "0.6552891", "0.6236189", "0.61143804", "0.60371137", "0.5862701", "0.5739332", "0.5737175", "0.5677933", "0.56716067", "0.56401056", "0.5538621", "0.5499891", "0.5419901", "0.5390179", "0.53524315", "0.53446084", "0.52953887", "0.5294698", "0.5281683", "0.52798563", "0.52762...
0.6351349
1
tests if policy file has arrived (via synchronization system). if File exists, also checks last modified time, in case file was not deleted on transition out of inservice state. Called when context is not inService to determine if it was needs to be transitioned because of file distribution.
private boolean fileArrived(boolean granted) { String name = getPolicyFileName(granted); File f = new File(name); boolean rvalue = ( f.exists() && _fileChanged(granted,f) ); if (logger.isLoggable(Level.FINE)){ logger.fine("JACC Policy Provider: file arrival check" + " type: " + (granted? "granted " : "excluded ") + " arrived: " + rvalue + " exists: " + f.exists() + " lastModified: " + f.lastModified() + " storedTime: " + lastModTimes[(int) (granted ? 1 : 0)] + " state: " + (this.state == OPEN_STATE ? "open " : "deleted ") + CONTEXT_ID); } return rvalue; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean fileExists(Context context, String filename)\r\n{\r\n File file = context.getFileStreamPath(filename);\r\n if(file == null || !file.exists())\r\n {\r\n return false;\r\n }\r\nreturn true;\r\n}", "FileState checkFileState(FsPath path);", "boolean hasRetrieveFile();", "private...
[ "0.6124834", "0.5927674", "0.58621055", "0.57879347", "0.56682163", "0.5642706", "0.5605923", "0.5588554", "0.55580515", "0.5548718", "0.55344516", "0.5521065", "0.5520728", "0.55195796", "0.54982877", "0.5495907", "0.5481724", "0.54794353", "0.54764247", "0.54759985", "0.547...
0.72298074
0
initilaize the internal data structures. if open, then mark state as open if remove, then remove any existing policy statements if fromFile (and not remove), then mark state as in service, and not requiring write on commit if fromFile (and remove), then remove and mark state as open
protected void initialize(boolean open, boolean remove, boolean fromFile) { synchronized(refreshLock) { String name = getPolicyFileName(true); if (open || remove) { setState(OPEN_STATE); } else { setState(INSERVICE_STATE); } try { if (remove) { removePolicy(); } policyUrlValue = sun.net.www.ParseUtil.fileToEncodedURL(new File(name)).toString(); if (fromFile && !remove) { uncheckedPermissions = null; rolePermissionsTable = null; excludedPermissions = loadExcludedPolicy(); initLinkTable(); captureFileTime(true); writeOnCommit = false; } wasRefreshed = false; } catch (java.net.MalformedURLException mue) { String defMsg="Unable to convert Policy file Name to URL: "+name; String msg=localStrings.getLocalString("pc.file_to_url",defMsg, new Object[]{name,mue}); logger.log(Level.SEVERE,msg); throw new RuntimeException(defMsg); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private FileManager()\n {\n bookFile.open(\"bookdata.txt\");\n hisFile.open(\"history.txt\");\n idFile.open(\"idpassword.txt\");\n createIDMap();\n createHisMap(Customer.getInstance());\n }", "public void resetStore() {\n try {\n db.close();\n ...
[ "0.5846824", "0.56678206", "0.56345767", "0.5509233", "0.5455938", "0.54519165", "0.527171", "0.5238771", "0.5229935", "0.5189742", "0.5174236", "0.51568663", "0.5102136", "0.50985575", "0.50949645", "0.50906694", "0.5084344", "0.50088364", "0.49867103", "0.49861455", "0.4977...
0.5861793
0
remove the directory used ot hold the context's policy files
private void removePolicyContextDirectory(){ String directoryName = getContextDirectoryName(); File f = new File(directoryName); if(f.exists()){ // WORKAROUND: due to existence of timestamp file in given directory // for SE/EE synchronization File[] files = f.listFiles(); if (files != null && files.length > 0) { for (int i = 0; i < files.length; i++) { files[i].delete(); } } //WORKAROUND: End if (!f.delete()) { String defMsg = "Failure removing policy context directory: "+directoryName; String msg=localStrings.getLocalString("pc.file_delete_error", defMsg); logger.log(Level.SEVERE,msg); throw new RuntimeException(defMsg); } else if(logger.isLoggable(Level.FINE)){ logger.fine("JACC Policy Provider: Policy context directory removed: "+directoryName); } File appDir = f.getParentFile(); // WORKAROUND: due to existence of timestamp file in given directory // for SE/EE synchronization File[] fs = appDir.listFiles(); if (fs != null && fs.length > 0) { boolean hasDir = false; for (int i = 0; i < fs.length; i++) { if (fs[i].isDirectory()) { hasDir = true; break; } } if (!hasDir) { for (int i = 0; i < fs.length; i++) { fs[i].delete(); } } } //WORKAROUND: End File[] moduleDirs = appDir.listFiles(); if (moduleDirs == null || moduleDirs.length == 0) { if (!appDir.delete()) { String defMsg = "Failure removing policy context directory: " + appDir; String msg = localStrings.getLocalString("pc.file_delete_error", defMsg); logger.log(Level.SEVERE,msg); throw new RuntimeException(defMsg); } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void removePolicy(){\n\texcludedPermissions = null;\n\tuncheckedPermissions = null;\n\trolePermissionsTable = null;\n\tremovePolicyFile(true);\n\tremovePolicyFile(false);\n\tremovePolicyContextDirectory();\n\tinitLinkTable();\n\tpolicy = null;\n\twriteOnCommit = true;\n }", "private void removePolicyF...
[ "0.7288538", "0.68208706", "0.6328023", "0.6068308", "0.6056553", "0.6022023", "0.6011502", "0.59609795", "0.59355575", "0.58667845", "0.5791924", "0.57890916", "0.57748926", "0.5754761", "0.5738609", "0.57046807", "0.5658921", "0.5652559", "0.56396556", "0.5631863", "0.56218...
0.81378543
0
remove the external (file) policy statements.
private void removePolicyFile(boolean granted){ String fileName = getPolicyFileName(granted); File f = new File(fileName); if(f.exists()){ if (!f.delete()) { String defMsg = "Failure removing policy file: "+fileName; String msg=localStrings.getLocalString("pc.file_delete_error", defMsg,new Object []{ fileName} ); logger.log(Level.SEVERE,msg); throw new RuntimeException(defMsg); } else if(logger.isLoggable(Level.FINE)){ logger.fine("JACC Policy Provider: Policy file removed: "+fileName); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void removePolicy(){\n\texcludedPermissions = null;\n\tuncheckedPermissions = null;\n\trolePermissionsTable = null;\n\tremovePolicyFile(true);\n\tremovePolicyFile(false);\n\tremovePolicyContextDirectory();\n\tinitLinkTable();\n\tpolicy = null;\n\twriteOnCommit = true;\n }", "public void unsetFilePlac(...
[ "0.7597148", "0.58375555", "0.580416", "0.5765959", "0.57202476", "0.5553409", "0.5541875", "0.54994076", "0.54849285", "0.5468867", "0.5441843", "0.5434851", "0.5424132", "0.5405062", "0.5380397", "0.53744227", "0.5352159", "0.5341338", "0.5306925", "0.5306851", "0.53021044"...
0.659885
1
remove the internal and external (file) policy statements.
private void removePolicy(){ excludedPermissions = null; uncheckedPermissions = null; rolePermissionsTable = null; removePolicyFile(true); removePolicyFile(false); removePolicyContextDirectory(); initLinkTable(); policy = null; writeOnCommit = true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void removePolicyFile(boolean granted){\n\tString fileName = getPolicyFileName(granted);\n\tFile f = new File(fileName);\n\tif(f.exists()){\n\t if (!f.delete()) {\n String defMsg = \"Failure removing policy file: \"+fileName; \n String msg=localStrings.getLocalString(\"pc.f...
[ "0.63597435", "0.603404", "0.59635115", "0.5706367", "0.57047856", "0.56646484", "0.5593844", "0.5513123", "0.5479585", "0.5478713", "0.54722166", "0.5451314", "0.5398186", "0.53827536", "0.5359774", "0.5343278", "0.53205776", "0.5287858", "0.5279761", "0.52673185", "0.525608...
0.77712715
0
checks if PolicyContex is in agrument state. Detects implicpit state changes resulting from distribution of policy files by synchronization system.
private boolean stateIs(int stateValue) { boolean inState = _stateIs(stateValue); if (stateValue == INSERVICE_STATE && !inState) { if (fileArrived(true) || fileArrived(false)) { if (logger.isLoggable(Level.FINE)){ logger.fine("JACC Policy Provider: file arrived transition to inService: " + " state: " + (this.state == OPEN_STATE ? "open " : "deleted ") + CONTEXT_ID); } // initialize(!open,!remove,fromFile) initialize(false,false,true); } inState = _stateIs(INSERVICE_STATE); } return inState; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean inService() throws PolicyContextException{\n\tcheckSetPolicyPermission();\t\n\tboolean rvalue = stateIs(INSERVICE_STATE);\n \n if (logger.isLoggable(Level.FINE)) {\n logger.fine(\"JACC Policy Provider: inService: \" +\n (rvalue ? \"true \" : \"false \...
[ "0.54006356", "0.5317085", "0.5186097", "0.5161771", "0.514682", "0.5083851", "0.5057588", "0.5056856", "0.50561154", "0.5029786", "0.4995359", "0.49529976", "0.49187118", "0.49055117", "0.48943618", "0.4894341", "0.48781967", "0.48614126", "0.48611733", "0.48600218", "0.4851...
0.5858798
0
This method workarounds a bug in PolicyParser.write(...).
private String escapeName(String name) { return (name != null && name.indexOf('"') > 0) ? name.replaceAll("\"", "\\\\\"") : name; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private boolean createPolicyFile\n\t(boolean granted, PolicyParser parser, boolean woc) throws java.io.IOException {\n\n\tboolean result = woc;\n\tcreatePolicyContextDirectory();\n\tremovePolicyFile(granted);\n\tString name = getPolicyFileName(granted);\n\tOutputStreamWriter writer = null;\n\ttry {\n\t if(logge...
[ "0.6013449", "0.5864846", "0.5729441", "0.5504033", "0.5480303", "0.542277", "0.5415767", "0.53884846", "0.5349822", "0.5319437", "0.52003366", "0.5168338", "0.5160326", "0.5106599", "0.50739014", "0.5063487", "0.5045902", "0.50399363", "0.50255996", "0.50180334", "0.50100946...
0.0
-1
optimization return if the rules have not changed
private void generatePermissions() throws java.io.FileNotFoundException, java.io.IOException { if (!writeOnCommit) return; // otherwise proceed to write policy file Map roleToSubjectMap = null; SecurityRoleMapperFactory factory=SecurityRoleMapperFactoryGen.getSecurityRoleMapperFactory(); if (rolePermissionsTable != null) { // Make sure a role to subject map has been defined for the Policy Context if (factory != null) { // the rolemapper is stored against the // appname, for a web app get the appname for this contextid SecurityRoleMapper srm = factory.getRoleMapper(CONTEXT_ID); if (srm != null) { roleToSubjectMap = srm.getRoleToSubjectMapping(); } if (roleToSubjectMap != null) { // make sure all liked PC's have the same roleToSubjectMap Set linkSet = (Set) fact.getLinkTable().get(CONTEXT_ID); if (linkSet != null) { Iterator it = linkSet.iterator(); while (it.hasNext()) { String contextId = (String)it.next(); if (!CONTEXT_ID.equals(contextId)) { SecurityRoleMapper otherSrm = factory.getRoleMapper(contextId); Map otherRoleToSubjectMap = null; if (otherSrm != null) { otherRoleToSubjectMap = otherSrm.getRoleToSubjectMapping(); } if (otherRoleToSubjectMap != roleToSubjectMap) { String defMsg="Linked policy contexts have different roleToSubjectMaps ("+CONTEXT_ID+")<->("+contextId+")"; String msg=localStrings.getLocalString("pc.linked_with_different_role_maps",defMsg,new Object []{CONTEXT_ID,contextId}); logger.log(Level.SEVERE,msg); throw new RuntimeException(defMsg); } } } } } } } if (roleToSubjectMap == null && rolePermissionsTable != null) { String defMsg="This application has no role mapper factory defined"; String msg=localStrings.getLocalString("pc.role_map_not_defined_at_commit",defMsg,new Object []{CONTEXT_ID}); logger.log(Level.SEVERE,msg); throw new RuntimeException (localStrings.getLocalString ("enterprise.deployment.deployment.norolemapperfactorydefine",defMsg)); } PolicyParser parser = new PolicyParser(false); // load unchecked grants in parser if (uncheckedPermissions != null) { Enumeration pEnum = uncheckedPermissions.elements(); if (pEnum.hasMoreElements()) { GrantEntry grant = new GrantEntry(); while (pEnum.hasMoreElements()) { Permission p = (Permission) pEnum.nextElement(); PermissionEntry entry = new PermissionEntry(p.getClass().getName(), p.getName(),p.getActions()); grant.add(entry); } parser.add(grant); } } // load role based grants in parser if (rolePermissionsTable != null) { Iterator roleIt = rolePermissionsTable.keySet().iterator(); while (roleIt.hasNext()) { boolean withPrincipals = false; String roleName = (String) roleIt.next(); Permissions rolePerms = getRolePermissions(roleName); Subject rolePrincipals = (Subject) roleToSubjectMap.get(roleName); if (rolePrincipals != null) { Iterator pit = rolePrincipals.getPrincipals().iterator(); while (pit.hasNext()){ Principal prin = (Principal) pit.next(); assert prin instanceof java.security.Principal; if (prin instanceof java.security.Principal) { withPrincipals = true; PrincipalEntry prinEntry = new PrincipalEntry(prin.getClass().getName(), escapeName(prin.getName())); GrantEntry grant = new GrantEntry(); grant.principals.add(prinEntry); Enumeration pEnum = rolePerms.elements(); while (pEnum.hasMoreElements()) { Permission perm = (Permission) pEnum.nextElement(); PermissionEntry permEntry = new PermissionEntry(perm.getClass().getName(), perm.getName(), perm.getActions()); grant.add(permEntry); } parser.add(grant); } else { String msg = localStrings.getLocalString("pc.non_principal_mapped_to_role", "non principal mapped to role "+roleName,new Object[]{prin,roleName}); logger.log(Level.WARNING,msg); } } } if (!withPrincipals) { String msg = localStrings.getLocalString("pc.no_principals_mapped_to_role", "no principals mapped to role "+roleName, new Object []{ roleName}); logger.log(Level.WARNING,msg); } } } writeOnCommit = createPolicyFile(true,parser,writeOnCommit); // load excluded perms in excluded parser if (excludedPermissions != null) { PolicyParser excludedParser = new PolicyParser(false); Enumeration pEnum = excludedPermissions.elements(); if (pEnum.hasMoreElements()) { GrantEntry grant = new GrantEntry(); while (pEnum.hasMoreElements()) { Permission p = (Permission) pEnum.nextElement(); PermissionEntry entry = new PermissionEntry(p.getClass().getName(), p.getName(),p.getActions()); grant.add(entry); } excludedParser.add(grant); } writeOnCommit = createPolicyFile(false,excludedParser,writeOnCommit); } if (!writeOnCommit) wasRefreshed = false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Input\n public boolean isOptimized() {\n return optimize;\n }", "public boolean has_unprocessed_rules();", "private void computeSat(){\n addVertexVisitConstraint();\n //add clause for each vertex must be visited only once/ all vertices must be on path\n addVertexPositionConst...
[ "0.6090777", "0.6004165", "0.5945495", "0.59100854", "0.58809566", "0.57395625", "0.5685418", "0.566396", "0.5643709", "0.56433344", "0.5451866", "0.5447712", "0.54330826", "0.5430834", "0.5430158", "0.54274476", "0.5420966", "0.5410133", "0.5403843", "0.53736097", "0.5364398...
0.0
-1
returns false if write succeeds. otherwise returns input woc (i.e. writeOnCommit)
private boolean createPolicyFile (boolean granted, PolicyParser parser, boolean woc) throws java.io.IOException { boolean result = woc; createPolicyContextDirectory(); removePolicyFile(granted); String name = getPolicyFileName(granted); OutputStreamWriter writer = null; try { if(logger.isLoggable (Level.FINE)){ logger.fine("JACC Policy Provider: Writing grant statements to policy file: "+name); } writer = new OutputStreamWriter(new FileOutputStream(name), "UTF-8"); parser.write(writer); result = false; } catch(java.io.FileNotFoundException fnfe) { String msg=localStrings.getLocalString("pc.file_error","file not found "+name, new Object []{name, fnfe}); logger.log(Level.SEVERE,msg); throw fnfe; } catch(java.io.IOException ioe){ String msg=localStrings.getLocalString("pc.file_write_error","file IO error on file "+name, new Object []{name,ioe}); logger.log(Level.SEVERE,msg); throw ioe; } finally { if (writer != null) { try { writer.close(); captureFileTime(granted); } catch (Exception e) { String defMsg="Unable to close Policy file: "+name; String msg=localStrings.getLocalString("pc.file_close_error",defMsg,new Object []{name,e}); logger.log(Level.SEVERE,msg); throw new RuntimeException(defMsg); } } } return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean canWrite();", "boolean shouldCommit();", "boolean isUsedForWriting();", "public boolean write() {\n return this.write;\n }", "public boolean ownWrite(Object data);", "protected boolean continueOnWriteError() {\n/* 348 */ return true;\n/* */ }", "@Override\n\tpublic boolean i...
[ "0.6399966", "0.6368003", "0.6318279", "0.61783594", "0.6049948", "0.60389245", "0.6029373", "0.6012725", "0.5996072", "0.59292465", "0.58220804", "0.5821107", "0.58164036", "0.5718381", "0.5675217", "0.5661511", "0.5643951", "0.5598006", "0.55451673", "0.551582", "0.5455715"...
0.0
-1
/ Positif Scenirio When I send a GET Request to the URL then HTTP Status code should be 200 And Content type should be Json And Status line should be HTTP 1.0 200 OK
@Test public void trial01() { spec1.pathParam("id", 3); Response response =given().spec(spec1).get("/{id}"); response.prettyPrint(); response.then().assertThat().statusCode(200).contentType(ContentType.JSON).statusLine("HTTP/1.1 200 OK"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Http.Status status();", "@Test\n\t \n\t public void getApi() {\n\t\t \n\t\t Response getIt=get(\"https://reqres.in/api/users?page=2\");\n\t\t getIt.prettyPrint();\n\t\t System.out.println(getIt.getStatusCode());\n\t\t System.out.println(getIt.getTime());\n\t\t \n\t\t //to validate\n\t\t int validGstatu...
[ "0.68354225", "0.682674", "0.66291565", "0.6582131", "0.65496004", "0.65453845", "0.65231913", "0.65127915", "0.6439634", "0.6401038", "0.6384065", "0.63303304", "0.6322806", "0.6316715", "0.629584", "0.6287078", "0.6286462", "0.62726897", "0.6256357", "0.62529725", "0.624608...
0.5747809
75
head added after so that you can see it in front.
Node getNode() { return new Group(body.getPolygon(), head.getPolygon()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void head();", "public void Head() {\n\n\t}", "@Override\r\n public void addFront(T b) {\r\n head = head.addFront(b);\r\n }", "@Test\n\tpublic void addNodeBeforeGiveNode() {\n\t\tSystem.out.println(\"Given a node as prev_node, insert a new node Before the given node \");\n\t\tdll.push(4);\n\t\tdl...
[ "0.6470402", "0.6440652", "0.6306535", "0.6271262", "0.6236452", "0.6227985", "0.6218916", "0.61922234", "0.6134971", "0.6134053", "0.6095956", "0.6094037", "0.6088567", "0.6069576", "0.6065987", "0.60659647", "0.6046164", "0.60451955", "0.5984684", "0.59769624", "0.59751356"...
0.0
-1
The pose used by winners!
Node getWinPose() { final Rectangle headCopy = new Rectangle(head); final Rectangle bodyCopy = new Rectangle(body); // TODO should the tank be pointing out or into the alert ¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿ needs more thought. right now it faces inward. feels more symmetric headCopy.rotate(pivot, -theta + Math.PI); bodyCopy.rotate(pivot, -theta + Math.PI); return new Group(bodyCopy.getPolygon(), headCopy.getPolygon()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getDesiredPose() {\n\t\treturn desiredPose;\n\t}", "public int getPoseID(){ return poseID;}", "public String getCurrentPoseName() {return currentPoseName;}", "public int getPoseDuration(){ return poseDuration;}", "public Pose2d getPose() {\n return m_odometry.getPoseMeters();\n }", "pub...
[ "0.7160649", "0.689967", "0.68810844", "0.6856653", "0.6576852", "0.65200466", "0.64756525", "0.64514464", "0.63811564", "0.63157904", "0.62925863", "0.6072724", "0.60678774", "0.60267633", "0.5811193", "0.5810775", "0.57465434", "0.5706549", "0.5681927", "0.5664984", "0.5547...
0.6067076
13
The direction of angles is reversed because the coordinate system is reversed.
private void right() { lastMovementOp = Op.RIGHT; rotate(TURNING_ANGLE); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Direction reverse()\n {\n return new Direction(dirInDegrees + (FULL_CIRCLE / 2));\n }", "public void reverseDirection() {\n\t\tdirection *= -1;\n\t\ty += 10;\n\t}", "void reverseDirection();", "private float reverseDirection(float dir) {\n if (dir < Math.PI) return (float) (dir+Math...
[ "0.72037256", "0.71874493", "0.6942468", "0.6898764", "0.68476874", "0.68151623", "0.6757012", "0.66139066", "0.6608197", "0.6587585", "0.6538363", "0.6411679", "0.630465", "0.62974906", "0.6284682", "0.6281044", "0.62774426", "0.6276378", "0.62477887", "0.6245003", "0.624094...
0.0
-1
TODO add edge mechanics, e.g. instead of just stopping the tank, we lower velocity/slide. The way this works is that we first grab possible collision candidates from the maze. Then we ensure there is actually a collision. Once we know there is a collision, we backtrack the tank until there is no collision.
private void handleMazeCollisions() { final ArrayList<Rectangle> segs = maze.getCollisionCandidates(getCenter()); for (int i = 0; i < segs.size(); i++) { if (!checkCollision(segs.get(i).getPolygon())) { // The tank does not intersect the seg. segs.remove(i); i--; } } if (segs.size() == 0) { // The tank does not intersect any of the segs. return; } Runnable reverseOp = null; // Backtrack. final Tank tank = this; // Need to declare this up here instead of in each case because java's switch cases share scope. So java would think // we are redeclaring a variable. final Point2D decomposedVelocity; switch (lastMovementOp) { case FORWARD: decomposedVelocity = Physics.decomposeVector(-1, theta); reverseOp = () -> tank.moveBy(decomposedVelocity); break; case REVERSE: decomposedVelocity = Physics.decomposeVector(1, theta); reverseOp = () -> tank.moveBy(decomposedVelocity); break; case RIGHT: reverseOp = () -> tank.rotate(-TURNING_ANGLE / 12); break; case LEFT: reverseOp = () -> tank.rotate(TURNING_ANGLE / 12); break; } do { assert reverseOp != null; reverseOp.run(); for (int i = 0; i < segs.size(); i++) { if (!checkCollision(segs.get(i).getPolygon())) { segs.remove(i); i--; } } } while (segs.size() > 0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void collide() {\n int collisionRange;\n \n if(isObstacle) {\n for(Thing thg: proximity) {\n if(\n thg.isObstacle\n &&\n !thg.equals(this)\n ) {\n collisionRange = (thg....
[ "0.6228715", "0.6116625", "0.6021622", "0.592796", "0.5871241", "0.5832235", "0.5802956", "0.578078", "0.5776146", "0.5694772", "0.56522954", "0.5627714", "0.56246036", "0.5612448", "0.55785555", "0.5566004", "0.5559047", "0.55398303", "0.5518442", "0.5518364", "0.5516699", ...
0.78761065
0
handle updates the state of the tank and the tank's bullets.
void handle(final long nanos) { bulletManager.update(nanos); if (activeOps.contains(Op.FIRE)) { bulletManager.addBullet( getBulletLaunchPoint(), getTheta(), nanos ); bulletManager.lock = true; } bulletManager.handleMazeCollisions(); if (bulletManager.isReloading()) { head.getPolygon().setFill(outOfAmmoHeadColor); } else { head.getPolygon().setFill(headColor); } if (activeOps.contains(Op.RIGHT)) { right(); } if (activeOps.contains(Op.LEFT)) { left(); } handleMazeCollisions(); if (activeOps.contains(Op.FORWARD)) { forward(); } if (activeOps.contains(Op.REVERSE)) { back(); } handleMazeCollisions(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void trackBullets(){\n for (int i = 0; i < bullets.size(); i++){\n Bullet tempBullet = bullets.get(i);\n //update the position of the bullets\n tempBullet.update();\n tempBullet.drawBullet();\n //check if the bullet hit the boundary, remove the b...
[ "0.6948332", "0.67833424", "0.6714785", "0.6490822", "0.6465136", "0.63517964", "0.63502187", "0.63259345", "0.61794865", "0.6157676", "0.6106718", "0.60468197", "0.60439795", "0.60393614", "0.60259765", "0.6006917", "0.59971166", "0.5991951", "0.5976234", "0.5972489", "0.597...
0.0
-1
To prevent someone from accidentally instantiating the contract class, give it an empty constructor.
public MetaDataContract() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Contract() {\n }", "private StoneContract() {\n }", "public Contracts() {\r\n super();\r\n \r\n }", "public ContractMethod() {\n }", "public BaseContract() {}", "private CatalogContract() {}", "private DishContract() {\n }", "public Contract() {\n // initial...
[ "0.86930716", "0.83890015", "0.8324607", "0.830322", "0.81006837", "0.8035093", "0.79511994", "0.7938716", "0.7933073", "0.7892574", "0.7821817", "0.78088", "0.7798501", "0.77876645", "0.7778599", "0.7762839", "0.7737825", "0.77108413", "0.77108413", "0.76641566", "0.7656838"...
0.635591
71
TODO: Autogenerated Javadoc Copyright 2013 Interbank IBK. Todos los derechos reservados. The Interface ParametroListarService.
public interface ParametroListarService { /** * Listar parametros. * Fecha: 22/08/2013 * * @param idPanel the id panel * @throws Exception the exception */ public void listarParametros(String idPanel) throws Exception; /** * Eliminar parametro. * Fecha: 22/08/2013 * * @throws Exception the exception */ public void eliminarParametro() throws Exception; /** * Limpiar lista parametro. * Fecha: 22/08/2013 * * @throws Exception the exception */ public void limpiarListaParametro() throws Exception; /** * Obtiene bean listar parametro. * Fecha: 22/08/2013 * * @return bean listar parametro */ public BeanListarParametro getBeanListarParametro(); /** * Establece el bean listar parametro. * * @param beanListarParametro el new bean listar parametro */ public void setBeanListarParametro(BeanListarParametro beanListarParametro); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "List<ParqueaderoEntidad> listar();", "public List<Perfil> perfilListar() {\r\n\r\n try {\r\n ControladorPerfil ctrlperfil = new ControladorPerfil();\r\n return ctrlperfil.getListaPerfil();\r\n } catch (Exception ex) {\r\n ex.printStackTrace();\r\n return ...
[ "0.6826827", "0.6690298", "0.66779053", "0.6650231", "0.65156", "0.6513449", "0.64954054", "0.62570393", "0.6205896", "0.6197024", "0.61727595", "0.6169214", "0.6136449", "0.6097154", "0.6089307", "0.6079605", "0.6049725", "0.6033282", "0.6021508", "0.59920025", "0.5977539", ...
0.7374498
0
Listar parametros. Fecha: 22/08/2013
public void listarParametros(String idPanel) throws Exception;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void limpiarListaParametro() throws Exception;", "java.util.List<datawave.webservice.query.QueryMessages.QueryImpl.Parameter> getParametersList();", "ParameterList getParameters();", "public BeanListarParametro getBeanListarParametro();", "List<FichaDocente> listarDocentesxParametroxFacultad(String ...
[ "0.71587956", "0.69691247", "0.6912664", "0.68278545", "0.6753573", "0.67502666", "0.66379535", "0.65609545", "0.6450242", "0.64274144", "0.64274144", "0.6408605", "0.6348502", "0.62856364", "0.62745905", "0.6255537", "0.62398905", "0.6227007", "0.62073106", "0.61089396", "0....
0.6781687
4
Eliminar parametro. Fecha: 22/08/2013
public void eliminarParametro() throws Exception;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void removeParameter(){\r\n \tMap<String,String> params = FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap();\r\n\t\tlong paramId = Long.parseLong(params.get(\"parameterId\"));\r\n\t\tthis.getLog().info(\"parameterId:\" + paramId);\r\n\t\t\r\n\t\tif(paramId != 0){\r\n\t\t\ttr...
[ "0.75529826", "0.7234671", "0.7177055", "0.7048808", "0.66299886", "0.66165936", "0.6614475", "0.65998244", "0.65713507", "0.6536065", "0.65288514", "0.64891505", "0.6484491", "0.64555544", "0.6353797", "0.6307708", "0.6289422", "0.6288322", "0.62180287", "0.62107235", "0.620...
0.7924823
0
Limpiar lista parametro. Fecha: 22/08/2013
public void limpiarListaParametro() throws Exception;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void remplireListeParam(){\r\n bddParam.add(\"id\");\r\n bddParam.add(\"site\");\r\n bddParam.add(\"smtp_serv\");\r\n bddParam.add(\"smtp_port\");\r\n bddParam.add(\"smtp_user\");\r\n bddParam.add(\"smtp_mail\");\r\n bddParam.add(\"smtp_pass\");\r\n bd...
[ "0.666926", "0.64476955", "0.62495244", "0.6105267", "0.6084749", "0.6039994", "0.603971", "0.60382867", "0.598614", "0.59645605", "0.59623325", "0.5938791", "0.59332067", "0.58932817", "0.5887997", "0.58824563", "0.5844594", "0.5841491", "0.5841491", "0.5817765", "0.58127093...
0.71403515
0
Obtiene bean listar parametro. Fecha: 22/08/2013
public BeanListarParametro getBeanListarParametro();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setBeanListarParametro(BeanListarParametro beanListarParametro);", "public void remplireListeParam(){\r\n bddParam.add(\"id\");\r\n bddParam.add(\"site\");\r\n bddParam.add(\"smtp_serv\");\r\n bddParam.add(\"smtp_port\");\r\n bddParam.add(\"smtp_user\");\r\n ...
[ "0.7022336", "0.6657112", "0.64540327", "0.6431403", "0.6356425", "0.6351529", "0.6313395", "0.62698036", "0.62037873", "0.6174074", "0.61381835", "0.61082006", "0.6098748", "0.60969687", "0.6070021", "0.6034866", "0.6020655", "0.59625655", "0.5962085", "0.5951218", "0.594773...
0.8181671
0
Establece el bean listar parametro.
public void setBeanListarParametro(BeanListarParametro beanListarParametro);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public BeanListarParametro getBeanListarParametro();", "public void limpiarListaParametro() throws Exception;", "List<ParqueaderoEntidad> listar();", "List<FichaDocente> listarDocentesxParametroxFacultad(String parametro, Integer integer);", "public void remplireListeParam(){\r\n bddParam.add(\"id\"...
[ "0.8181996", "0.69124067", "0.67638576", "0.66043735", "0.65831953", "0.642461", "0.63245326", "0.63181776", "0.63100874", "0.62852615", "0.6241519", "0.6226177", "0.6215519", "0.62044716", "0.6198932", "0.6186328", "0.6181916", "0.6181096", "0.6152434", "0.612359", "0.611139...
0.7771313
1
TODO Autogenerated method stub
@Override public void create(Board board) throws Exception { dao.insert(board); }
{ "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 class holding records for this type
@Override public Class<ReportVersionDataRecord> getRecordType() { return ReportVersionDataRecord.class; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public RecordRecord() {\n\t\tsuper(org.jooq.examples.cubrid.demodb.tables.Record.RECORD);\n\t}", "public Class<?> getRecordClass() \n\t{\n\t return recordClass ;\n\t}", "public DataRecord() {\n super(DataTable.DATA);\n }", "@Override\n public Class<Record> getRecordType() {\n return Re...
[ "0.68004626", "0.66954035", "0.64103794", "0.6398801", "0.6398801", "0.6398801", "0.6398801", "0.6393993", "0.6354873", "0.6192012", "0.61258304", "0.61258304", "0.61258304", "0.6104736", "0.60470754", "0.60470754", "0.60470754", "0.6040716", "0.6029211", "0.6020949", "0.6008...
0.0
-1
Create a report_version_data table reference
public ReportVersionData() { this("report_version_data", null); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void createReport(Report report);", "public ReportVersionData(String alias) {\n this(alias, REPORT_VERSION_DATA);\n }", "Report createReport();", "@Override\n\tpublic String createTable() {\n\t\t\t\treturn \"CREATE TABLE history_table_view(id number(8) primary key not null ,sqltext text, pointid v...
[ "0.6061201", "0.57847637", "0.5674248", "0.5638577", "0.5595093", "0.5563812", "0.5532259", "0.5520442", "0.5424101", "0.54200774", "0.5387263", "0.5264504", "0.521197", "0.5186997", "0.5175989", "0.51721585", "0.5123336", "0.51049775", "0.50534546", "0.49957326", "0.4985158"...
0.67405796
0
Create an aliased report_version_data table reference
public ReportVersionData(String alias) { this(alias, REPORT_VERSION_DATA); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public TableVersion(String alias) {\n this(DSL.name(alias), TABLE_VERSION);\n }", "public ReportVersionData() {\n this(\"report_version_data\", null);\n }", "private String getRevisionTableQuery() {\n \t\tfinal StringBuilder builder = new StringBuilder();\n \n \t\tbuilder.append(\"create ta...
[ "0.5396347", "0.52881503", "0.5260742", "0.5076279", "0.49984103", "0.495382", "0.49365667", "0.48794615", "0.47985476", "0.4742762", "0.4697971", "0.46496493", "0.46247303", "0.4615884", "0.45822975", "0.45780993", "0.45755526", "0.4574071", "0.45730373", "0.45604894", "0.45...
0.60596985
0
/ Both methods below are necessary for the sorting process made by the Ranking module. The first one implement a polynomial hash function, using a prime base B and a large prime modulo M to avoid collision.
@Override public int hashCode() { int B = 31, M = 1000000007, code = 0; for(int pos = 0; pos < this.objectA.length(); pos++) { code = ((this.objectA.charAt(pos) - 'a') + B * code) % M; } return (code * this.objectB) % M; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int _hash(int maximum);", "static int hash(int h) {\n\t\t // This function ensures that hashCodes that differ only by constant \n\t\t // multiples at each bit position have a bounded number of collisions \n\t\t // (approximately 8 at default load factor).\n\t\th ^= (h >>> 20) ^ (h >>> 12);\n\t\treturn h ^ (h >>>...
[ "0.6817722", "0.6495348", "0.64256024", "0.6399776", "0.63922024", "0.6326797", "0.63177884", "0.6262708", "0.6259835", "0.622911", "0.6227005", "0.622536", "0.6221346", "0.6195121", "0.6190928", "0.61809564", "0.61746025", "0.616513", "0.61384326", "0.6138049", "0.6132039", ...
0.6496703
1
Created by Mateusz on 29.10.2016.
@Repository @Transactional public interface MusicGenresRepository extends CrudRepository<MusicGenres, Long> { List<MusicGenres> findByNameLike(String name); }
{ "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\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n...
[ "0.6013131", "0.58491033", "0.58026767", "0.5711847", "0.5657861", "0.5649326", "0.5649326", "0.56208", "0.55926347", "0.5576018", "0.5557537", "0.5535161", "0.5518969", "0.5507973", "0.55029035", "0.5500603", "0.5497374", "0.5480033", "0.5480033", "0.5480033", "0.5480033", ...
0.0
-1
Check collision with player ship
public boolean colliding(PlayerShip ship){ if (CollisionChecker.check(ship.getLimits(), this.limits)) { this.addBonusToShip(ship); this.remove(); return true; } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean collidesShip(Ship s) {\n // establish a rectangle for the player ship\n Rectangle ship = new Rectangle((int)s.getX() + 5, (int)s.getY(), 30, 50);\n\n // determine if an enemy blast intersects ship rectangle\n for(int i = 0; i < enemyBarrage.size()...
[ "0.74628955", "0.7376721", "0.7223133", "0.7213659", "0.7095628", "0.7083149", "0.70758194", "0.7052173", "0.6997448", "0.6895229", "0.68480486", "0.6825784", "0.6793728", "0.67861664", "0.6731043", "0.671964", "0.67113394", "0.669479", "0.6653315", "0.6640491", "0.6620769", ...
0.686069
10
Add bonus to ship
protected abstract void addBonusToShip(Ship ship);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "BonusResponse add(Long customerId, Long authorizedBy, BonusRequest bonus);", "public void addShip(Ship ship){\n\n ship.setGamePlayers(this);\n myships.add(ship);\n }", "public void setBonus(double bonus){\r\n this.bonus = bonus;\r\n }", "public void addPlayerShip()\n\t{\n\t\t//if a Playe...
[ "0.6526067", "0.6443659", "0.6367306", "0.636178", "0.6361287", "0.6354971", "0.6333179", "0.63102806", "0.62861633", "0.6257914", "0.6168411", "0.6141083", "0.60944706", "0.59962404", "0.5974727", "0.5917969", "0.5893581", "0.5883571", "0.58808154", "0.58792114", "0.58757776...
0.86103255
0
Get default timer of bonus animation
protected abstract float getFrameTimeNormalAnimation();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic Double getTimer() {\n\t\treturn null;\n\t}", "Timer getTimer();", "double getDefaultTimerTrig();", "public int getTimer() {\n return getOption(ArenaOption.TIMER);\n }", "long getTimerPref();", "public Timer getOverallTimer();", "private void getOneToteTimer()\r\n\t{\r\n\t\...
[ "0.69024575", "0.6834719", "0.6778845", "0.677576", "0.6604487", "0.6530458", "0.6506302", "0.6435131", "0.6394464", "0.6368089", "0.634238", "0.62961566", "0.6204115", "0.61844486", "0.61554337", "0.61498", "0.61298615", "0.6104114", "0.6079244", "0.6049841", "0.6029528", ...
0.6128741
17
Get all frame names of bonus animation
protected abstract String[] getFrameNames();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "List<IKeyframe> getKeyframes();", "private void listFrames() {\n System.out.println(\"\\nFrames:\");\n MasterFrame master = world.getMasterFrame();\n System.out.println(master.getName() + \" moving at \" + master.getVelocity() + \"c.\");\n for (ReferenceFrame frame: world.getRelativeF...
[ "0.65548986", "0.65035343", "0.5965466", "0.59582806", "0.59491426", "0.5915164", "0.58728415", "0.58471197", "0.5804176", "0.5768749", "0.5768117", "0.57602257", "0.5710017", "0.5696305", "0.56945395", "0.5686188", "0.5684067", "0.5666329", "0.5662837", "0.5661713", "0.55847...
0.76275223
0
Toast.makeText(DrillSettingsActivity.this, "result is:" +result.getMinearea(), Toast.LENGTH_LONG).show();
@Override protected void onPostExecute(HoleDetail result) { editor = getPreference(); editor.remove("minearea"); editor.remove("geologysituation"); editor.putString("minearea", result.getMinearea()); editor.putString("geologysituation", result.getGeologysituation()); editor.putString("outerflag",result.getOutferlag()); editor.commit(); tv_minearea = (TextView) findViewById(R.id.settings_minearea); tv_geologysituation = (TextView) findViewById(R.id.settings_geologysituation); tv_minearea.setText(result.getMinearea()); tv_geologysituation.setText(result.getGeologysituation()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n public void onResult(String result)\r\n {\n handler.sendMessage(handler.obtainMessage(SHOWTOAST, \"SN = \"+result));\r\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent inten...
[ "0.6702021", "0.66253674", "0.648231", "0.6293942", "0.6232578", "0.62217057", "0.62116826", "0.6160354", "0.61285824", "0.61230403", "0.61077124", "0.61022884", "0.60955703", "0.60641277", "0.6029416", "0.60138893", "0.599774", "0.5994885", "0.5974107", "0.5961749", "0.59410...
0.6288513
4
SpinnerData data1 = adapter_hole.getItem(position);
@Override public void onItemSelected(AdapterView<?> parent, View view, int position, long id) { SpinnerData data1 = (SpinnerData) hole_adapter.getItem(position); Log.d(DEBUG_TAG, "钻孔id:"+data1.getId()+";钻孔holenumber:"+data1.getName()); new FetchDeploymentDataTask().execute(http_str+server+peopleurl+data1.getId()); // 获取项目经理、机长、班长 //Toast.makeText(DrillSettingsActivity.this, "url is:" +server+detailurl+data1.getId(), Toast.LENGTH_LONG).show(); new FetchHoleDetail().execute(http_str+server+detailurl+data1.getId()); // 获取钻孔的详细情况 // TextView tv = (TextView)view; // tv.setTextColor(getResources().getColor(R.color.black)); //设置颜色 // tv.setTextSize(15.0f); //设置大小 editor = getPreference(); // 保存到sharedpreference editor.putString("holeid", data1.getId()); editor.putString("holenumber", data1.getName()); editor.commit(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n\n quanHuyens = sqLite_quanHuyen.getDSQH(arrTinhTP.get(position).getId());\n adapterRecyclerViewChonQuan = new AdapterRecyclerViewChonQuan(quanHuyens, getApplicationContext())...
[ "0.7351485", "0.69525826", "0.6906445", "0.68614024", "0.6854327", "0.6814968", "0.67760676", "0.6743799", "0.67221415", "0.67211527", "0.6720682", "0.6705873", "0.6705146", "0.6696992", "0.6687794", "0.6672337", "0.6672337", "0.6650634", "0.663391", "0.66313857", "0.66312915...
0.73709434
0
String url =scenicImgUrl + a+"/"+b+"/"+c+"/"+d;
@RequestMapping("/files/{a}/{b}/{c}/{d}/{e}") public String playmusic(@PathVariable String a,@PathVariable String b,@PathVariable String c,@PathVariable String d,@PathVariable String e,HttpServletRequest request, HttpServletResponse response, ModelMap param) { String strBackUrl = "http://" + request.getServerName() //服务器地址 + ":" + request.getServerPort() //端口号 + request.getContextPath() //项目名称 + request.getServletPath() ; //请求页面或其他地址 ); param.put("fileUrl","http://192.168.1.87:18080/YlServer/files/Scenic/00000001/Attract/00000001/1.mp3"); return "playmusic"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public String imageUrl ();", "public String getURL() {\n\t\treturn RequestConstants.BASE_IMAGE_URL+_url;\n\t}", "private static String composeApiUrl(String string){\r\n\t\treturn API_BASE + API_VERSION + string;\r\n\t}", "String getUrl();", "String getUrl();", "String getUrl();", "String getUr...
[ "0.6098934", "0.59439677", "0.5741479", "0.574104", "0.574104", "0.574104", "0.574104", "0.574104", "0.56723183", "0.5665484", "0.5645773", "0.56394315", "0.56392574", "0.5612285", "0.55727595", "0.55707073", "0.552996", "0.5505368", "0.549455", "0.54852855", "0.5481575", "...
0.0
-1
API to find the route from source to destination
@GetMapping("/connected") @Override public String findCity(@NotNull @RequestParam("origin") String origin, @NotNull @RequestParam("destination") String destination) throws DataNotFoundException { LOG.info("Source..." + origin +".....Destination.."+ destination); if (StringUtils.isNotBlank(origin) && StringUtils.isNotBlank(destination)) { Set<String> traversal = cityRouteService.findRoute(getLoadCitiesGraph().getGraph(),origin); if(traversal.contains(destination)) return "yes"; else return "no"; } else { throw new DataNotFoundException("Unable to process this request due to source or destination missing"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "String getRouteDest();", "String viewRouteDetails(String source, String destination);", "public RouteResponse findRoute(RouteRequest routeRequest);", "Destination getDestination();", "void onSucceedFindDirection(List<RouteBeetweenTwoPointsDTO> route);", "GetDestinationResult getDestination(GetDestination...
[ "0.7210564", "0.71713567", "0.68792194", "0.6808037", "0.679137", "0.67657197", "0.6723108", "0.6701881", "0.6628586", "0.65636426", "0.65315676", "0.6524192", "0.650772", "0.6429105", "0.640533", "0.63635075", "0.6342403", "0.6331235", "0.63119376", "0.6247927", "0.6126242",...
0.6057437
28
Getter method for load cities
public LoadCities getLoadCitiesGraph() { return loadCitiesGraph; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public List<String> getCities() {\n\n List<Rout> routs = routDAO.getAll();\n HashSet<String> citiesSet = new HashSet<>();\n for (Rout r : routs) {\n citiesSet.add(r.getCity1());\n }\n List<String> cities = new ArrayList<>(citiesSet);\n\n return ci...
[ "0.71915656", "0.71474993", "0.7120165", "0.70405173", "0.69715077", "0.6967104", "0.69667387", "0.6935158", "0.69269305", "0.6901168", "0.6883386", "0.6856264", "0.6853241", "0.6844163", "0.6844163", "0.6844163", "0.68286157", "0.6828048", "0.6828048", "0.6828048", "0.680788...
0.6916842
9
TODO Autogenerated method stub
public static void main(String[] args) { ChromeMaximize(); browserMaximize(); browserMaximize1(); }
{ "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
Tools.trace("locking " + this,1); super.lock();
public void lock() { while (true) { try { if (super.tryLock(2, TimeUnit.SECONDS)) return; } catch (InterruptedException e) { trace("caught " + e); } //trace("failed to get lock", 1); //trace("owning thread: " + getOwner(), 1); //Thread.dumpStack(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void lock() {\r\n super.lock();\r\n }", "public void lock() {\n super.lock();\n }", "public void lock() {\n super.lock();\n }", "public void lock() {\n super.lock();\n }", "public void lock() {\n\n }", "public void lock() {\n\t\tlocked = true;\n\t}", "v...
[ "0.85806525", "0.8537585", "0.8537585", "0.8537585", "0.8271583", "0.7629762", "0.75773764", "0.73428196", "0.7291354", "0.71856725", "0.7123367", "0.70339125", "0.7027186", "0.6961583", "0.6961583", "0.6874365", "0.6860122", "0.6782606", "0.67816657", "0.67090195", "0.670772...
0.7648605
5
Tools.trace("locking " + this,1);
public boolean tryLock(long time, TimeUnit tu) throws InterruptedException { if (!super.tryLock(time, TimeUnit.SECONDS)) { traceLev("failed to get lock continueing .", 1); traceLev("owning thread: " + getOwner(), 1); return false; } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void lock() {\n\n }", "void lock();", "public void lock() {\n/* 254 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "public void lock() {\n\t\tlocked = true;\n\t}", "public void lock() {\r\n super.lock();\r\n }", "public void lock() {\n super.lock();\n }", "...
[ "0.7799809", "0.71946126", "0.7125515", "0.710813", "0.7094893", "0.70490783", "0.70490783", "0.70490783", "0.66335124", "0.6588006", "0.65394855", "0.652225", "0.6461015", "0.6427346", "0.6412503", "0.63748825", "0.6340975", "0.6335284", "0.6283229", "0.62688524", "0.6246605...
0.0
-1
trace("adding Idler " + inst);
public static void registerIdle(Idler inst) { iList.add(inst); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void id() {}", "public void addInstruction(){\n\n }", "private AddHarnessIdInterceptor() {}", "void id(int id) {}", "private void addAI(){\n\n }", "LWJGLProgramHandler()\r\n {\r\n //instance = this;\r\n }", "void setInstId(String instId);", "private void add() {\n\n\t}", "void ad...
[ "0.5953845", "0.5820281", "0.5737012", "0.5657399", "0.56541306", "0.5542223", "0.5541435", "0.5510179", "0.5459467", "0.54194665", "0.53512275", "0.5349265", "0.53393227", "0.5330403", "0.53231055", "0.52842283", "0.524908", "0.5245646", "0.524211", "0.5224849", "0.52201736"...
0.6284305
0
trace("inserting " + e);
public static synchronized void insert(JeyEvent e) { queue.addLast(e); EventQueue.class.notifyAll(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void insert(E e);", "public void insert()\n\t{\n\t}", "@Override\n\tpublic void insert() {\n\t\t\n\t}", "@Override\n\tpublic void insertProcess() {\n\t\t\n\t}", "@Override\r\n\tpublic String insert() {\n\t\treturn \"insert\";\r\n\t}", "public void insertUpdate(DocumentEvent e) {\n }", "int in...
[ "0.7060001", "0.70021623", "0.69914746", "0.6653964", "0.6568102", "0.6548939", "0.6447591", "0.642574", "0.6387557", "0.6363948", "0.63409483", "0.6338697", "0.62257695", "0.62213904", "0.6219722", "0.61948544", "0.61945504", "0.6179952", "0.6156488", "0.61489975", "0.613047...
0.0
-1
trace("inserting " + e);
public static synchronized void insert(IEvent e) { queue.addLast(e); EventQueue.class.notifyAll(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void insert(E e);", "public void insert()\n\t{\n\t}", "@Override\n\tpublic void insert() {\n\t\t\n\t}", "@Override\n\tpublic void insertProcess() {\n\t\t\n\t}", "@Override\r\n\tpublic String insert() {\n\t\treturn \"insert\";\r\n\t}", "public void insertUpdate(DocumentEvent e) {\n }", "int in...
[ "0.7060001", "0.70021623", "0.69914746", "0.6653964", "0.6568102", "0.6548939", "0.6447591", "0.642574", "0.6387557", "0.6363948", "0.63409483", "0.6338697", "0.62257695", "0.62213904", "0.6219722", "0.61948544", "0.61945504", "0.6179952", "0.6156488", "0.61489975", "0.613047...
0.0
-1
Queue that tracks consuming of the elements and may readd elements that were attempted to be consumed. E.g. when consumer fails to ack finish of processing of the element. TODO: consider making generic, current implementation works only with Strings
public interface TrackingQueue { /** * Adds element to the queue. * * @param element to add * @return future of the consuming result. It will be set when consuming is successfully reported to be completed */ ListenableFuture<String> add(Element element); /** * Take next available element from the queue act on it. * <p> * After element is taken it is no longer available for others to take unless it is not placed back to queue. * Element can be placed back in the following cases: * <ul> * <li> * By invoking {@link #add(Element)} method. In this case element will * be considered a new element never seen before. * Element will not be removed from list of "in-progress" elements list automatically. * </li> * <li> * By reporting {@link ConsumingStatus#FAILED} status via * {@link #recordProgress(String, String, ConsumingStatus, String)}. * Element will be rescheduled automatically and removed from the "in-progress" list. * </li> * <li> * Element can be rescheduled automatically based on the implementation logic of subclasses. * </li> * </ul> * </p> * * @param consumerId element consumer * @return next available element, or null if no element is available */ Element take(String consumerId); /** * Records progress of consuming the element. If element no longer belongs to this consumer this will be noted in * returned possession state as {@link PossessionState#NOT_POSSESSES}. This may happen e.g. if {@link TrackingQueue} * implementation decided that this consumer is dead and put it back to queue. * <p> * If {@link ConsumingStatus#FAILED} status is reported, * element will be placed back to queue automatically * </p> * <p> * If {@link ConsumingStatus#FINISHED_SUCCESSFULLY} status is reported * the queue no longer tracks the element consuming status. * </p> * * @param consumerId consumer that is processing the element and reporting the progress * @param elementId element to report progress on * @param status status of the consuming. * @param result current value of the result of consuming. * @return true if this consumer still possesses the element and can continue processing it. */ PossessionState recordProgress(String consumerId, String elementId, ConsumingStatus status, String result); /** * Removes element from the queue by element id. If element was being consumed, * @param elementId id of the element to remove * @return true if removed successfully or element was not present in the queue, false otherwise */ boolean remove(String elementId); /** * Removes all elements from the queue. See {@link #remove(String)} for more details. * @return true if all removed successfully, false otherwise */ boolean removeAll(); /** * Promotes element to the top of the queue. * @param elementId id of the element to promote * @return true if promoted successfully */ boolean toHighestPriority(String elementId); /** * Get all {@link QueuedElement} in the queue that are not being consumed. * * @return an iterator over the queued (but not being consumed) elements in this queue. The iterator returns elements * ordered in the way they are offered to be consumed starting with the top of the queue. */ Iterator<QueuedElement> getQueued(); /** * Get all {@link QueuedElement} that are being consumed. * * @return an iterator over the queue elements that are being consumed. */ Iterator<QueuedElement> getBeingConsumed(); /** * Get the size of the queue (both queued and being consumed). * * @return size of queue (both queued and being consumed). */ int size(); /** * Defines Tracking Queue Consuming Status. */ static enum ConsumingStatus { IN_PROGRESS, FINISHED_SUCCESSFULLY, FAILED } /** * Defines PossessionState. */ static enum PossessionState { POSSESSES, NOT_POSSESSES } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void requeue() {\n\t\tenqueue(queue.removeFirst());\n\t}", "@Override\r\n\tpublic void enqueueRear(E element) {\n\t\tif(sizeDeque == CAPACITY) return;\r\n\t\tif(sizeDeque == 0) {\r\n\t\t\tdata[backDeque] = element;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tbackDeque = (backDeque + 1)%CAPACITY;\r\n\t\t\tdata[backDeq...
[ "0.629704", "0.6253577", "0.61837125", "0.60614836", "0.5977534", "0.59772587", "0.5935156", "0.5863693", "0.5824093", "0.5822045", "0.5822045", "0.5822045", "0.5792678", "0.57681215", "0.5765364", "0.5741769", "0.5723115", "0.5722603", "0.57213324", "0.57163614", "0.5694875"...
0.6606866
0
Adds element to the queue.
ListenableFuture<String> add(Element element);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void add(Object element) {\n queue.put( new DelayedElement( element ) );\n }", "public void add(E element){\n\t\tArrayQueue<E> temp = new ArrayQueue<E>();\n\t\ttemp.enqueue(element);\n\t\tQ.enqueue(temp);\n\t}", "@Override\n\tpublic void addToQueue() {\n\t}", "public void enqueue(E element) ...
[ "0.7995981", "0.7829296", "0.7755941", "0.773302", "0.76983577", "0.74867326", "0.7179399", "0.7178945", "0.71731925", "0.7154764", "0.7039443", "0.7038005", "0.70306444", "0.7018691", "0.69878143", "0.6962852", "0.6951072", "0.6930302", "0.69261384", "0.6919595", "0.69033074...
0.0
-1
Removes element from the queue by element id. If element was being consumed,
boolean remove(String elementId);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void remove() {\n\t\tprocess temp = queue.removeFirst();\n\t}", "public void deleteFromQueue(Integer block_id){\n if(this.queue_set){\n if(this.queue.contains(block_id) == true){\n this.queue.remove(block_id);\n }\n if(this.queue.isEmpty())\n ...
[ "0.68044746", "0.6712099", "0.66841173", "0.6603812", "0.65722877", "0.6491674", "0.64834523", "0.64793503", "0.6453721", "0.6453721", "0.6453721", "0.6438762", "0.6430852", "0.64165676", "0.64141375", "0.6377938", "0.63529414", "0.63390905", "0.63270515", "0.63270515", "0.63...
0.6961148
0
Promotes element to the top of the queue.
boolean toHighestPriority(String elementId);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public E poll() {\n E tmp = (E)queue[0];\n System.arraycopy(queue, 1, queue, 0, size - 1);\n size--;\n return tmp;\n }", "public synchronized void promote(Tile tile) {\r\n if(tileQueue.contains(tile)) {\r\n try {\r\n tileQueue.remove(...
[ "0.6552587", "0.65491444", "0.6474043", "0.64601696", "0.6374938", "0.63328546", "0.63017386", "0.62666714", "0.62575924", "0.62519413", "0.6235655", "0.6233128", "0.6201622", "0.61944205", "0.6186225", "0.61630166", "0.61620873", "0.61433506", "0.6135839", "0.61289567", "0.6...
0.0
-1
Get the size of the queue (both queued and being consumed).
int size();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public long getQueueSize(){\n return queue.size();\n }", "int getQueueSize();", "public int getQueueSize() {\n return queue.getQueueSize();\n }", "public int getQueueSize() {\r\n\t\treturn this.queue.size();\r\n\t}", "public int queueSize() {\n\t\treturn queue.size();\t\n\t}", "public stati...
[ "0.8587164", "0.8567968", "0.85299236", "0.8496907", "0.84856105", "0.82720935", "0.82574844", "0.8231695", "0.8209418", "0.8203683", "0.8183819", "0.80774426", "0.80271804", "0.7908587", "0.7836789", "0.7764816", "0.7689206", "0.7687055", "0.7644499", "0.75702745", "0.756072...
0.0
-1
The class holding records for this type
@Override public Class<JIssueGroupRecord> getRecordType() { return JIssueGroupRecord.class; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public RecordRecord() {\n\t\tsuper(org.jooq.examples.cubrid.demodb.tables.Record.RECORD);\n\t}", "public Class<?> getRecordClass() \n\t{\n\t return recordClass ;\n\t}", "public DataRecord() {\n super(DataTable.DATA);\n }", "@Override\n public Class<Record> getRecordType() {\n return Re...
[ "0.68004626", "0.66954035", "0.64103794", "0.6398801", "0.6398801", "0.6398801", "0.6398801", "0.6393993", "0.6354873", "0.6192012", "0.61258304", "0.61258304", "0.61258304", "0.6104736", "0.60470754", "0.60470754", "0.60470754", "0.6040716", "0.6029211", "0.6020949", "0.6008...
0.0
-1
Create a public.issue_group table reference
public JIssueGroup() { this(DSL.name("issue_group"), null); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void allocateGroupId(){\n\t\trecords.add(new pair(this.groupname,currentId));\n\t\tthis.groupid = currentId;\n\t\tcurrentId++;\n\t\tConnection c = null;\n\t\tStatement stmt = null;\n\t\ttry{\n\t\t\tSystem.out.println(\"group setup\");\n\t\t\tSystem.out.println(this.groupid);\n\t\t\tClass.forName(\"org.postg...
[ "0.61252534", "0.6073808", "0.59836304", "0.588585", "0.58202463", "0.5775224", "0.5765524", "0.57145476", "0.5710131", "0.5651284", "0.5596132", "0.5596132", "0.55160624", "0.5473704", "0.544555", "0.5438455", "0.5434325", "0.5408774", "0.539379", "0.5335958", "0.53281176", ...
0.6311255
0
Create an aliased public.issue_group table reference
public JIssueGroup(String alias) { this(DSL.name(alias), ISSUE_GROUP); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "GroupRefType createGroupRefType();", "public JIssueGroup(Name alias) {\n this(alias, ISSUE_GROUP);\n }", "public JIssueGroup() {\n this(DSL.name(\"issue_group\"), null);\n }", "GroupCell createGroupCell();", "public void setGroupTable(String name) throws BuildException {\n dbTabl...
[ "0.57484174", "0.5690282", "0.5627831", "0.55854034", "0.55520785", "0.554511", "0.5268504", "0.52354777", "0.51054686", "0.4973432", "0.49726218", "0.49364522", "0.48586476", "0.485327", "0.485327", "0.48269066", "0.48108566", "0.4807659", "0.4766543", "0.4755757", "0.474742...
0.58015984
0
Create an aliased public.issue_group table reference
public JIssueGroup(Name alias) { this(alias, ISSUE_GROUP); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public JIssueGroup(String alias) {\n this(DSL.name(alias), ISSUE_GROUP);\n }", "GroupRefType createGroupRefType();", "public JIssueGroup() {\n this(DSL.name(\"issue_group\"), null);\n }", "GroupCell createGroupCell();", "public void setGroupTable(String name) throws BuildException {\n ...
[ "0.58015984", "0.57484174", "0.5627831", "0.55854034", "0.55520785", "0.554511", "0.5268504", "0.52354777", "0.51054686", "0.4973432", "0.49726218", "0.49364522", "0.48586476", "0.485327", "0.485327", "0.48269066", "0.48108566", "0.4807659", "0.4766543", "0.4755757", "0.47474...
0.5690282
2
Getter method for the Access Token
public static String getAccessToken() { return accessToken; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getAccessToken();", "String getAccessToken();", "String getAccessToken();", "public AccessToken getAccessToken() {\n return token;\n }", "public String getAccessToken() {\n return accessToken;\n }", "public String getAccessToken() {\n return accessToken;\n }", "...
[ "0.80908877", "0.7991717", "0.7991717", "0.7991017", "0.7867155", "0.7837911", "0.7798234", "0.77658975", "0.7697761", "0.7695888", "0.76569015", "0.76197064", "0.76197064", "0.7547032", "0.75083554", "0.7474643", "0.7414986", "0.7312742", "0.72672695", "0.7141458", "0.709224...
0.7808448
6
Kickoff the application and request for access token using Spotify Android SDK
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); loadMainActivity = (ProgressBar) findViewById(R.id.load_mainactivity); recyclerView = (RecyclerView)findViewById(R.id.recyclerview_for_main_activity); toolbar_main_activity = (Toolbar) findViewById(R.id.activity_main_toolbar); setSupportActionBar(toolbar_main_activity); AuthenticationRequest.Builder builder = new AuthenticationRequest.Builder (clientId, AuthenticationResponse.Type.TOKEN, redirectUri); AuthenticationRequest request = builder.build(); AuthenticationClient.openLoginActivity(this, request_Code, request); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n if(requestCode==request_Code){\n AuthenticationResponse response = AuthenticationClient.getResponse(resultCode,data);\n if(re...
[ "0.6716623", "0.6676525", "0.6268245", "0.6144993", "0.5850179", "0.56656903", "0.5647591", "0.5607106", "0.5605502", "0.55221134", "0.54479015", "0.54046786", "0.5398968", "0.5378022", "0.53473806", "0.5335448", "0.5332855", "0.53147024", "0.53147024", "0.53018695", "0.53012...
0.49258202
71
Fetch the authentication token using the Spotify Android SDK
@Override protected void onActivityResult(int requestCode, int resultCode, Intent data) { super.onActivityResult(requestCode, resultCode, data); if(requestCode==request_Code){ AuthenticationResponse response = AuthenticationClient.getResponse(resultCode,data); if(response.getType()==AuthenticationResponse.Type.TOKEN){ accessToken = response.getAccessToken(); }else{ } } new SpotifyNewRelease(accessToken).execute(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getTokenViaClientCredentials(){\n\t\t//Do we have credentials?\n\t\tif (Is.nullOrEmpty(clientId) || Is.nullOrEmpty(clientSecret)){\n\t\t\treturn 1;\n\t\t}\n\t\ttry{\n\t\t\t//Build auth. header entry\n\t\t\tString authString = \"Basic \" + Base64.getEncoder().encodeToString((clientId + \":\" + clientSecr...
[ "0.69330066", "0.6782733", "0.6770452", "0.6770452", "0.6749736", "0.6749552", "0.650303", "0.648835", "0.64834917", "0.64396393", "0.6311057", "0.6281432", "0.6210264", "0.6147989", "0.6095018", "0.6062734", "0.60540354", "0.6046713", "0.6045714", "0.6044652", "0.60184765", ...
0.67090935
6
Hides all View elements until the page is loaded and shows the progress bar.
public void showProgress(){ loadMainActivity.setVisibility(View.VISIBLE); recyclerView.setVisibility(View.INVISIBLE); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void showLoading()\n {\n relLoadingPanel.setVisibility(View.VISIBLE);\n ViewHelper.setViewGroupEnabled(scrMainContainer, false);\n }", "private void hideLoading()\n {\n relLoadingPanel.setVisibility(View.GONE);\n ViewHelper.setViewGroupEnabled(scrMainContainer, true);...
[ "0.7359385", "0.7327871", "0.72612727", "0.71239185", "0.7082534", "0.7078264", "0.6991439", "0.69697714", "0.69623977", "0.6957261", "0.6886361", "0.68624747", "0.6859377", "0.67613214", "0.6754566", "0.6734668", "0.66962755", "0.6677421", "0.66760343", "0.6648555", "0.66467...
0.7322872
2
Once the values of all View elements are loaded hides the progress bar and shows the data.
public void showData(){ loadMainActivity.setVisibility(View.INVISIBLE); recyclerView.setVisibility(View.VISIBLE); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void showProgress(){\n loadMainActivity.setVisibility(View.VISIBLE);\n recyclerView.setVisibility(View.INVISIBLE);\n }", "private void showDataView() {\n mLoadingIndicator.setVisibility(View.INVISIBLE);\n /* Finally, make sure the data is visible */\n mRecycleView.set...
[ "0.716416", "0.70276207", "0.69267", "0.68598145", "0.6847024", "0.6836971", "0.6813717", "0.6799597", "0.67912143", "0.6768747", "0.67538786", "0.6746012", "0.6736742", "0.6698788", "0.66544867", "0.6652294", "0.66513336", "0.6620093", "0.65900946", "0.65895075", "0.65688425...
0.6741112
12
Set the adapter for the MainActivity RecyclerView with data.
public void loadSpotifyNewReleaseData(List<CardAlbum> cardAlbumList){ //Setting the LayoutManager for the RecyclerView recyclerView.setLayoutManager(new LinearLayoutManager(this)); //Instantiating CardAdapter class using the defined constructor if(cardAlbumList.size() > 0) { cardAdapter = new CardAdapter(cardAlbumList, this); }else{ Log.d("NULLList","We are getting a Null List from the background thread !!!"); } //Giving the reference of the Adapter class instance to the RecyclerView recyclerView.setAdapter(cardAdapter); //Giving the reference of the Callback interface to the Card Adapter so that the CallbackInterface methods can be called upon events. cardAdapter.setCardClickCallBack(this); Toast.makeText(MainActivity.this,"New Releases from Spotify",Toast.LENGTH_SHORT).show(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void setRecyclerAdapter() {\n if (mRecyclerAdapter == null) {\n mRecyclerAdapter = new IssueResultsRecyclerAdapter(this, issueResult, mNation);\n mRecyclerView.setAdapter(mRecyclerAdapter);\n } else {\n ((IssueResultsRecyclerAdapter) mRecyclerAdapter).setConte...
[ "0.69537103", "0.69452965", "0.6934804", "0.688377", "0.68702906", "0.68348104", "0.6801398", "0.6775367", "0.6772365", "0.6701616", "0.6697953", "0.6695618", "0.66951215", "0.6684455", "0.6671339", "0.66637164", "0.6651875", "0.66278386", "0.6567192", "0.6546217", "0.6488104...
0.0
-1
Inflates the overflow menu at the toolbar
@Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.mainactivity_toolbar_overflowmenu,menu); return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.toolbar, menu);\n super.onCreateOptionsMenu(menu, inflater);\n\n }", "private void inflateToolbar() {\n\n mToolbar = (Toolbar) getView().findViewById(R.id.toolbar_fragment);\n\n ...
[ "0.64358616", "0.6274379", "0.62235886", "0.6198345", "0.61840063", "0.611221", "0.6033061", "0.60060537", "0.6001635", "0.5916781", "0.59106165", "0.5893252", "0.58813167", "0.58740956", "0.5866247", "0.5855075", "0.5835665", "0.5779827", "0.57710534", "0.5716799", "0.570384...
0.67400426
0
Provides dummy implementation for the MainActivity overflow menu at the toolbar
@Override public boolean onOptionsItemSelected(MenuItem item) { int selectedItmId = item.getItemId(); switch (selectedItmId){ case (R.id.item_action_refresh): new SpotifyNewRelease(accessToken).execute(); return true; case (R.id.find_web): Toast.makeText(MainActivity.this,"Find In Web Selected",Toast.LENGTH_SHORT).show(); return true; default: return super.onOptionsItemSelected(item); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.mainactivity_toolbar_overflowmenu,menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu)\n {\n /*Grabs the information from the overflow_menu resource in...
[ "0.723903", "0.68693036", "0.65008336", "0.64156073", "0.6411865", "0.64010805", "0.63681066", "0.6359496", "0.6340766", "0.6340766", "0.6323382", "0.6289417", "0.6280418", "0.62760043", "0.62748975", "0.6272607", "0.6248695", "0.6243863", "0.6238674", "0.6235833", "0.6221422...
0.0
-1
Behavior of the Application upon clicking the Card
@Override public void onCardClick(int position) { CardAlbum cardAlbum = cardAlbumListData.get(position); /** * Putting the Data inside a bundle nd sending to the DetailActivity. */ Intent intent = new Intent(this,DetailActivity.class); Bundle bundle = new Bundle(); bundle.putString(EXTRA_ALBUM_ID,cardAlbum.getAlbumId()); bundle.putString(EXTRA_ALBUM_NAME,cardAlbum.getAlbumName()); bundle.putString(EXTRA_ALBUM_ARTIST_NAME,cardAlbum.getArtistName()); bundle.putString(EXTRA_ALBUM_IMAGE,cardAlbum.getAlbumImageURL()); bundle.putString(EXTRA_ALBUM_RELEASE_DATE,cardAlbum.getAlbumReleaseDate()); bundle.putString(EXTRA_SPOTIFY_ACCESS_TOKEN,getAccessToken()); intent.putExtra(BUNDLE_EXTRA,bundle); startActivity(intent); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onClick(Card card) {\n }", "@Override\n public void onCardClick(String p) {\n }", "public void ActonCard() {\n\t}", "public void cardClicked(MouseEvent event) {\n try {\n // get current Stage\n Stage stage = (Sta...
[ "0.754555", "0.734828", "0.7215633", "0.7214966", "0.6938275", "0.6757888", "0.6752926", "0.66324407", "0.6627156", "0.6586627", "0.6549753", "0.65438205", "0.6463235", "0.6459754", "0.6451054", "0.63757306", "0.63684964", "0.6368261", "0.6341033", "0.6293409", "0.62755424", ...
0.0
-1
Behavior of the Application upon clicking the Button
@Override public void onCardButtonClick(int position) { CardAlbum cardAlbum = cardAlbumListData.get(position); Intent intent = new Intent(this,ArtistActivity.class); Bundle bundle = new Bundle(); bundle.putString(EXTRA_ALBUM_ARTIST_ID,cardAlbum.getArtistId()); bundle.putString(EXTRA_ALBUM_ARTIST_NAME,cardAlbum.getArtistName()); bundle.putString(EXTRA_SPOTIFY_ACCESS_TOKEN,getAccessToken()); intent.putExtra(BUNDLE_EXTRA,bundle); startActivity(intent); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void buttonClicked();", "void mainButtonPressed();", "public void buttonClicked() {\n mSanitizorGame.buttonClicked();\n }", "public void onButtonAPressed();", "public void ipcallButtonPressed() {\n\t\tdialButtonPressed(true) ;\n\t}", "public void activateButton() {\n\t\tif (isBrowser) t...
[ "0.7080953", "0.70016867", "0.69626415", "0.6859956", "0.6707961", "0.66967905", "0.66490185", "0.6607892", "0.66042244", "0.6600499", "0.65380144", "0.65220064", "0.6510823", "0.64986664", "0.6491112", "0.64830065", "0.64708304", "0.64533", "0.6449266", "0.64413995", "0.6438...
0.0
-1
Getter method for the accessToken
public String getAccessToken() { return accessToken; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getAccessToken();", "public String getAccessToken() {\n return accessToken;\n }", "public String getAccessToken() {\n return accessToken;\n }", "String getAccessToken();", "String getAccessToken();", "public static String getAccessToken() {\n return accessToken;\n ...
[ "0.82807887", "0.8259645", "0.8256304", "0.82460165", "0.82460165", "0.8225857", "0.813776", "0.8075986", "0.8075986", "0.8053668", "0.7964199", "0.7926748", "0.7876816", "0.78689647", "0.78649616", "0.760743", "0.7517249", "0.7500676", "0.74170417", "0.73399603", "0.73354137...
0.813606
7
Returns an instance of the Spotify Service
public SpotifyService getSpotifyService(){ //Creates and configures a REST adapter for Spotify Web API. SpotifyApi wrapper = new SpotifyApi(); if(!getAccessToken().equals("") && getAccessToken()!=null) { wrapper.setAccessToken(getAccessToken()); }else{ Log.d("SpotifyNewRelease","Invalid Access Token"); } SpotifyService spotifyService = wrapper.getService(); return spotifyService; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface SpotService {\n\n String haveSpot(String spotName);\n\n JSONObject spotByName(String spotName);\n\n JSONObject spotById(Long id);\n\n JSONObject getSpotComment(Long id, int pageNum, int size);\n\n List<Spot> getAllSpot();\n\n void saveComment(SpotComment comment, HttpServletReque...
[ "0.6127212", "0.598006", "0.5864511", "0.5858549", "0.5816003", "0.58039004", "0.58031386", "0.57682437", "0.57060474", "0.5696592", "0.56703764", "0.5660941", "0.5598903", "0.5586581", "0.55147123", "0.548542", "0.5453659", "0.54260963", "0.54250354", "0.54037577", "0.540047...
0.8389045
0
Returns a specific Spotify Album Instance by Id
public Album getSpotifyAlbumById(String albumId){ SpotifyService spotifyService = getSpotifyService(); Album spotifyAlbum = spotifyService.getAlbum(albumId); return spotifyAlbum; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "AlbumDTO findOne(Long id);", "@GET @Path(\"/id/{id}\")\n public Album findById(@PathParam(\"id\") String id) {\n return null;\n }", "SportAlbumPicture selectByPrimaryKey(String id);", "Artist getById(long id);", "@Override\n\tpublic Vn getSong(int id) {\n\t\treturn songDao.getSong(id);\n\t}", "@Over...
[ "0.7179391", "0.7100871", "0.6809857", "0.6661784", "0.66584516", "0.66497785", "0.65492433", "0.6461014", "0.64255625", "0.62301", "0.6207287", "0.6159147", "0.61378336", "0.6106747", "0.60777205", "0.6075307", "0.6026116", "0.6021521", "0.5841561", "0.5811", "0.5808942", ...
0.7872412
0