query
stringlengths
8
1.54M
document
stringlengths
9
312k
negatives
listlengths
19
20
metadata
dict
4. VisitorComment validation Success or Failure
@Test public void testCommentSuccess() throws IOException { VisitorCommentsDto comments = MasterData.getCommentDtoDetails(); Set<ConstraintViolation<VisitorCommentsDto>> violations = validator.validate(comments); yakshaAssert(currentTest(), violations.isEmpty() ? true : false, boundaryTestFile); ...
[ "private static void validateScorecardComment(\r\n HttpServletRequest request, Comment comment, String errorMessageProperty) {\r\n // Validate parameters\r\n ActionsHelper.validateParameterNotNull(request, \"request\");\r\n ActionsHelper.validateParameterNotNull(comment, \"comment\")...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
On back pressed method created to exit application instead of hitting the login page. Checks to see if there are no items in the backstack (indicitive of being back at the Home Activity). If that is the case, it exits the application. It also sets the tab selected to the Home tab if the backstack is at one.
@Override public void onBackPressed() { if (getSupportFragmentManager().getBackStackEntryCount() == 0) { Intent intent = new Intent(Intent.ACTION_MAIN); intent.addCategory(Intent.CATEGORY_HOME); intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); startActivity(in...
[ "@Override\n public void onBackPressed() {\n super.onBackPressed();\n //TODO fix backstack\n System.exit(0);\n }", "@Override\n public void onBackPressed() {\n returnHomeScreen();\n finish();\n }", "private void backPressHandling() {\r\n FragmentManager manager = getSupport...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Use this to add an alert to the specified screen.
public void addAlert(int screenId, AlertType type, int delay, String title, String url, String text, String phoneNumber) { Element alert = mDocument.createElement("Alert"); alert.setAttribute("Type", type.toString()); alert.setAttribute("Delay", delay > 0 ? String.valueOf(delay) : "FOREVER"); mScreens.g...
[ "public void addScreenMessage(String msg);", "public static void alert(Alert alert) {\n alerter.alert(alert);\n }", "public boolean attachPopupScreen(PopupScreen screen);", "public void addAlert(String alert) {\n\t\talertsList.add(alert);\n\t\t// now call alertFound()\n\t\t// alertFound();\n\t}", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Listens and handles device connection events
public interface DeviceConnectionListener { void onConnectSuccess(BTSocket clientSocket); void onConnectionError(Exception exception, String where); }
[ "public void listen() {\n DeviceManager cpuUsage = new CPUUsageManager();\n cpuUsage.printStatus();\n \n }", "interface UsbConnectionListener {\n void onUsbConnectionChanged(boolean connected, long functions, int powerRole, int dataRole);\n }", "void onConnectedDeviceChanged(St...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
M2M Sourcecode vs. Bytecode ClassA extends ClassB extends ClassC. ClassA calls a Method from ClassC, Bytecode does not count this. ClassA makes a superCall to ClassC, Bytecode count this as Coupling to ClassB. Checks if Bytecode counts Methodcalls in this case different than Sourcecode.
@Test void bytecodeShouldCountRightSuperCallInInheritanceHirarchie() { final Map<String, Integer> innerMapS = getInnerMapByCouplingTagForSourcecode(CouplingTag.METHOD_TO_METHOD, "examples.example3.ClassA"); final Map<String, Integer> innerMapB = getInnerMapByCouplingTagForBytecode(CouplingTag.METHOD_TO_METHOD...
[ "@Test\n\tvoid interfaceCallByCastedObjectShouldBeCountedAsM2MBytecode() {\n\t\tfinal Map<String, Integer> innerMap = getInnerMapByCouplingTagForBytecode(CouplingTag.METHOD_TO_METHOD,\n\t\t\t\t\"examples.example3.ClassA\");\n\n\t\tassertEquals(1, innerMap.get(\"examples.example3.Interface\"),\n\t\t\t\t\"M2M-Couplin...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Updates the usereditable metadata for a single version of a given artifact. Only the clienteditable metadata can be updated. Client editable metadata includes e.g. name and description.
void updateArtifactVersionMetaData(String groupId, String artifactId, String version, EditableArtifactMetaDataDto metaData) throws ArtifactNotFoundException, VersionNotFoundException, RegistryStorageException;
[ "@Path(\"/{groupId}/artifacts/{artifactId}/versions/{version}/meta\")\n @PUT\n @Consumes(\"application/json\")\n void updateArtifactVersionMetaData(@PathParam(\"groupId\") String groupId,\n @PathParam(\"artifactId\") String artifactId, @PathParam(\"version\") String version,\n EditableMetaData data);",...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
setValues only fundamental frequencies
public void calcOneSampleFreqLevelAllHarms() {//single sample of fundamental - actual key center freq //current buffer of song playing double cosSum = 0, sinSum = 0; for(int key=0;key<numValsToProcess;++key) {//for every key being compared cosSum =0;sinSum=0; float[] harmonics = freqHarmsToUse[key]; //...
[ "public void calcAllSmplFundFreqLevel() {//multiple samples of fundamental\n\t\t//current buffer of song playing\n\t\tdouble cosSum = 0, sinSum = 0;\t\t\n\t\tfor(int key=0;key<numValsToProcess;++key) {//for every key being compared\n\t\t\tcosSum =0;sinSum=0;\n\t\t\tfloat[] harmSamples = exampleFreqsToUse[key][0];//...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Determines if the specified point mass is in this center of mass.
public boolean containsMass(PointMass m) { synchronized (masses) { for (PointMass pointMass : masses) { if (pointMass == m) return true; } return false; } }
[ "boolean isCenter(Place p) {\n if (listOfCenters.contains(p)) {\n return true;\n }\n return false;\n }", "boolean isCenter(int x, int y) {\n return isCenter(pl(x, y));\n }", "public boolean pointInsidecircle(Point P) {\n\t\tdouble dist = getCenter().distancefrompoint...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
get the endState .
public String getEndState() { return endState; }
[ "String getDesiredEndState();", "State getStateEnd();", "public IState getEndState(){\n\t\treturn end;\n\t}", "public boolean isEndState() {\n return isEndState;\n }", "public E finishedState() {\r\n\t\treturn this.values[this.values.length - 1];\r\n\t}", "public void onStateSetEnd(STATE...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
get list id of all foods in the cart
private ArrayList<Integer> getOrderFoodId(List<FoodOrder> orders){ ArrayList<Integer> tot = new ArrayList<>(); for(FoodOrder order: orders){ tot.add(order.getFoodId()); } return tot; }
[ "public List<String> getFoodCategoryIdsFromShared(){\n List<String> list = new ArrayList<>();\n SharedPreferences sp = getSharedPreferences(\"CATEGORIES\", Context.MODE_PRIVATE);\n for (int i = 0; i < sp.getInt(\"FoodCategoryIdSize\", 0); i++){\n //get each food category id\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set the icon manager This is typically only used if you want to retrieve icons from a nonstandard location
public void setIconManager(@NonNull PresetIconManager mgr) { iconManager = mgr; }
[ "void setIconPath(String iconPath);", "public void setMenuIconsManager(AcideMenuIconsManager iconsManager) {\r\n\t\t_iconsManager = iconsManager;\r\n\t}", "public void setSetupIcon( Object setupIcon ) {\r\n this.setupIcon = setupIcon;\r\n }", "public void setIcon(String value) {\n icon = valu...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Check whether some posts are loading or not
private boolean is_loading_posts(){ return mLoadUserPostsTask != null && !mLoadUserPostsTask.isCancelled() && mLoadUserPostsTask.hasOnPostExecuteListener() && mLoadUserPostsTask.getStatus() != AsyncTask.Status.FINISHED; }
[ "public void autoLoadPosts() {\n if (!autoLoadMore || noMore) return;\n\n autoLoadMore = false;\n loadPosts();\n }", "private void loadMorePosts() {\n if (afterParam == null) {\n return;\n }\n\n int totalItemCount = llm.getItemCount();\n int lastVisib...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Private method to setClassFields field, method selects all fieldBody Strings from classBody field and adds them to classFields ArrayList
private void setClassFields() throws Exception { classFields = new ArrayList<>(); // regex to match a fullFieldBody String fieldRegex = "(private|public|protected)\\s+\\S+\\s+\\S+(\\s+\\S+)?(?=(\\s+)?(;|=))"; ArrayList<String> allFieldBodyMatches = new ArrayList<>(); Pattern pattern = Pattern.compile(fi...
[ "@SuppressWarnings(\"unchecked\")\n\tprivate void populateFields() {\n\t\tClassNode classNode = new ClassNode();\n\t\tTraceClassVisitor tcv = new TraceClassVisitor(classNode, new PrintWriter(System.out));\n\t\tclassReader.accept(tcv, ClassReader.EXPAND_FRAMES);\n\t\tthis.classNode = classNode;\n\t\tthis.method = ne...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The LogicalMessage interface represents a protocol agnostic XML message and contains methods that provide access to the payload of the message.
public interface LogicalMessage { /** Gets the message payload as an XML source, may be called * multiple times on the same LogicalMessage instance, always * returns a new Source that may be used to retrieve the entire * message payload. * * <p>If the returned Source is an instance of DOMSou...
[ "public interface ISystemMessageData extends Serializable\n{\n /**\n * @return The date and time when the system message was last modified. May be\n * <code>null</code>.\n */\n @Nullable\n LocalDateTime getLastUpdateDT ();\n\n /**\n * @return The type of system message. Never <code>null</code>.\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
=================================================================================== private =================================================================================== initAudioFocusChangeListener
private void initAudioFocusChangeListener() { mAudioFocusChangeListener = new AudioManager.OnAudioFocusChangeListener() { //------------------------------------------------------------------------------- // onAudioFocusChange //---------------------------------------------------------------------...
[ "public void requestFocus() {\t\r\n\t\t\r\n\t\tresult = audioMan.requestAudioFocus(focusChangeListener, AudioManager.STREAM_MUSIC, AudioManager.AUDIOFOCUS_GAIN);\r\n\t\t\r\n\t\t}", "public interface OnAudioFocusChangeListener {\n\t\t/**\n\t\t * Called on the listener to notify it the audio focus for this listener...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the value of the 'kGSuperPopCategory' field. 1K Super Population
public Gel_BioInf_Models.KGSuperPopCategory getKGSuperPopCategory() { return kGSuperPopCategory; }
[ "public Gel_BioInf_Models.KGSuperPopCategory getKGSuperPopCategory() {\n return kGSuperPopCategory;\n }", "public void setKGSuperPopCategory(Gel_BioInf_Models.KGSuperPopCategory value) {\n this.kGSuperPopCategory = value;\n }", "public Gel_BioInf_Models.KGPopCategory getKGPopCategory() {\n return...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
FIXME protected for now to handle clones Initialize some of the servers instance values from properties.
protected void initializeProperties() throws ServerHandlerInitException { String defhost = null; String rootstr = null; String spacestr = null; boolean ip_host = props.getBoolean(DEFHOSTIP_P, false); try { if (ip_host) defhost = InetAddress.getLocalHost().getHostAddre...
[ "private ServerConfig() {\n initFields();\n }", "private ServerSync() {\n initFields();\n }", "public static void init(){\n\t\tserverInfos.add(new ServerInfo(\"10.10.103.177\", \"root\", \"123456\"));\n\t\t//serverInfos.add(new ServerInfo(\"10.10.103.178\", \"root\", \"123456\"));\n\t\t//serverI...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns a new object of class 'Array Value'.
ArrayValue createArrayValue();
[ "Array createArray();", "ArrayType createArrayType();", "public ArrayValue( Object array )\n\t{\n\t\tthis( array, (byte) 0, null, 0 );\n\t}", "public static ArrayNode newArrayNode() {\n return objectMapper.createArrayNode();\n }", "ArrayProxyValue createArrayProxyValue();", "public ArrayValue(JA...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Needs an ArrayList of LottoDay to return the 5 most frequent mega numbers
public int[] hotM(ArrayList<LottoDay> list) { int [] megaF = new int [28]; //stores number of occurrences for each mega number int[] check = new int [5]; //stores the highest mega numbers int counter =0; //counts occurrences int high=0; //checks for the highest mega numbers //fill megaF with the number of o...
[ "public int [] hotN(ArrayList<LottoDay> list)\n\t{ \n\t\tint high=0;//checks for the highest number\n\t\tint[] numF = new int [48];// stores the frequency of each number\n\t\tint[] highest= new int [5]; //stores the 5 highest numbers\n\t\tint counter =0;\n\t\t//hot numbers for 1-47\n\t\tfor(int i=0; i<list.size...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
scan values in the TrashContainer enum clsss
public static void main(String[] args) { for (TrashContainer c : TrashContainer.values()) { // display container name, size, and color; the // latter value results from a call to color() System.out.println(c + ":\t Size " + c.size() + " gal. \tColor " + color(c)); } }
[ "void examineContainers(){\n\t\t\tif (this.receptacle != null)//checks and sees if there's any containers in the location.\n\t\t\t\tfor (int i = 0; i < this.receptacle.size(); i++)\n\t\t\t\t\tif (!(this.receptacle.get(i) instanceof SpecialtyContainer))//if it's a hidden container, you don't know it's there, but it ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/Returns a new camera zoom value in the form of float, amount of zoom is calculated by taking the difference in the current distance between fingers and the previous one
public static float PinchCameraZoom(Vector2 currentDistanceBetweenFingers, Vector2 previousDistanceBetweenFingers, float cameraZoom, float zoomSpeed) { if(currentDistanceBetweenFingers.len2() > previousDistanceBetweenFingers.len2()) { cameraZoom -= zoomSpeed; } else if(cu...
[ "float getCameraZoomLevel();", "double getZoom();", "public double getCameraZoom() {\n\t\treturn cameraZoom;\n\t}", "public double getZoomFactor();", "public float getZoomFactor() { return zoomFactor; }", "public void zoomIn() {\n\t\t// the closest the user can get is 0.5 (after the calculation)\n\t\tif (...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns grid columns collection.
@CollectionNode public GridColumns getColumns() { return externalColumns; }
[ "Column[] getColumns() { return columns; }", "List<String> getColumns();", "private ColumnData[] getColumns() {\n ColumnData[] cols = new ColumnData[ ndim_ ];\n for ( int i = 0; i < ndim_; i++ ) {\n cols[ i ] = (ColumnData) dataSelectors_[ i ].getMainSelector()\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method writes and rewrites to the .kml new location every time a spy updates his location successfully.
public static void writeFile() { String content = String.format("<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n" + "<kml xmlns=\"http://earth.google.com/kml/2.2\"\n" + "><Document>\n" + "<Style id=\"style1\">\n" + "<IconStyle>\n" + "...
[ "public void setUsersLastLocationOnMap()\n {\n String locationFoundFileName = \"lastLocationFound\";\n\n try {\n\n String lat = String.valueOf(gMap.getCameraPosition().target.latitude);\n String lng = String.valueOf(gMap.getCameraPosition().target.longitude);\n Stri...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__XTypeLiteral__Group__4__Impl" $ANTLR start "rule__XTypeLiteral__Group__5" ../org.xtext.example.helloxcore.ui/srcgen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:12672:1: rule__XTypeLiteral__Group__5 : rule__XTypeLiteral__Group__5__Impl ;
public final void rule__XTypeLiteral__Group__5() throws RecognitionException { int stackSize = keepStackSize(); try { // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:12676:1: ( rule__XTypeLiteral_...
[ "public final void rule__XTypeLiteral__Group__4() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:12647:1: ( rule__X...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This AddEditCardListener contains the callback methods that the HomeActivity implements to communicate with the fragment
public interface AddEditCardListener { //called after a card has been successfully added or edited void onAddEditCardSuccess(long rowID); }
[ "void addCardListener(CardListener listener);", "void onAddEditCardSuccess(long rowID);", "public interface OnCardSelectedListener {\n void cardSelected(int newPosition, int oldPosition, int totalElements);\n }", "public void onCardModified(AbstractCard card) {\n\n }", "private void setUpCredit...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__RootSistema__Group__4__Impl" $ANTLR start "rule__RootSistema__Group__5" ../org.xtext.estilos.ui/srcgen/org/xtext/ui/contentassist/antlr/internal/InternalEstilos.g:452:1: rule__RootSistema__Group__5 : rule__RootSistema__Group__5__Impl rule__RootSistema__Group__6 ;
public final void rule__RootSistema__Group__5() throws RecognitionException { int stackSize = keepStackSize(); try { // ../org.xtext.estilos.ui/src-gen/org/xtext/ui/contentassist/antlr/internal/InternalEstilos.g:456:1: ( rule__RootSistema__Group__5__Impl rule__RootSistema__Gr...
[ "public final void rule__RootSistema__Group__4() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.estilos.ui/src-gen/org/xtext/ui/contentassist/antlr/internal/InternalEstilos.g:427:1: ( rule__RootSistema__Group__4__Impl rule__Roo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the object with the settings used for calls to pullGitCommits.
public UnaryCallSettings<PullGitCommitsRequest, Empty> pullGitCommitsSettings() { return pullGitCommitsSettings; }
[ "public UnaryCallSettings.Builder<PullGitCommitsRequest, Empty> pullGitCommitsSettings() {\n return pullGitCommitsSettings;\n }", "public UnaryCallSettings<PushGitCommitsRequest, Empty> pushGitCommitsSettings() {\n return pushGitCommitsSettings;\n }", "public UnaryCallSettings.Builder<PushGitCommits...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Query one or all network info from VIM, the rest URI:/vimadapter/v1/re/networks
@GET @Path("/networks") public String getNetwork(HttpContext context, @QueryParam("vim") String vim, @QueryParam("network") String id) throws ServiceException { JSONObject paramJson = new JSONObject(); paramJson.put("id", id); paramJson.put("vim", vim); r...
[ "public static void listNetworksCommand()\n \t{\n \t\tCell cell = WindowFrame.getCurrentCell();\n \t\tif (cell == null) return;\n \t\tNetlist netlist = cell.getUserNetlist();\n \t\tint total = 0;\n \t\tfor(Iterator it = netlist.getNetworks(); it.hasNext(); )\n \t\t{\n \t\t\tNetwork net = (Network)it.next();\n \t\t\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
A method to transfer an item from one monster to another.
public void transferItem(Items item) throws Exception { if (item.getHolder() instanceof Monsters) { item.setHolder(null); this.addAnchor(item); } else if (item.getHolder() instanceof Backpacks) { item.setHolder(null); this.addAnchor(item); } else throw new Exception("The transaction is only pos...
[ "@Override\r\n\tpublic void transferItems(Robot from, Robot to)\r\n\t{\r\n\t\tfrom.transferItems(to);\r\n\t}", "void giveItemAwayTo(IUnit targetUnit, IEquipableItem item);", "void pickup(EntityItem item);", "public void takeItem(Item item) {\n\t\tInspectable myitem = currentRoom.inventory.pickItem(item);\n\t\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Method to populate hash array and search all spectra
public void runSpectraSearchOptimizer() { //Load in information from each library file try { //Read in MSP Files readMSP(); //Sort arrays by mass, lowest to highest Collections.sort(librarySpectra); updateProgress(100,"% - Sorting Libraries",true); //Bin MSP LibrarySpectra binMasses(); ...
[ "List<SpectrumDetail> findSpectra(final List<String> spectrumReferences);", "public void addSpectra(List<ISpectrum> added);", "private List<String> getSpectrumIdsFound()\r\n\t{\r\n\t\treturn this.spectrumIdsFound;\r\n\t}", "private List<SpectrumInterface> fetchSpectrum(List<String> spectrumIds)\r\n\t{\r\n\t\t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
A remote device represent a device which the system communicate with. Example of systems are "BOXEE", "XBMC" and "Squeezbox". Remote devices are dynamically created on application start or added from the discovery services.
public interface RemoteDevice { public enum RemoteDeviceType { Boxee, TelldusLive; } /** * This method returns the identifier of the remote device instance and is always the * same. * * The identifier should not contain any information that might change on the device and * is only used i...
[ "public RemoteDeviceType getRemoteDeviceType();", "Device createDevice();", "public SmartHomeDevice getCustomDevice(String id);", "public void addDevice(RemoteDevice remoteDevice)\r\n {\r\n\t_internalList.addElement(remoteDevice);\r\n }", "LogicalDevice createLogicalDevice();", "java.lang.String get...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
To know if user is connected.
public static boolean isConnected() { return StringUtils.isNotBlank(Http.Context.current().session().get(ConstantUtils.EMAIL)); }
[ "static boolean isConnected() {\n return session.contains(\"username\");\n }", "public static boolean isConnected() {\n\t\treturn session.get(USER_COOKIE) != null;\n\t}", "public static boolean isConnected() { return irc != null && irc.isConnected(); }", "public boolean isConnected() {\n\t\t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
getRecordIdentifier will return the document name
@Override public String getRecordIdentifier(){ return get("documentName"); }
[ "public String documentIdentifier();", "public String getRecordId();", "java.lang.String getDocumentId();", "java.lang.String getClientRecordId();", "public int getRecordID();", "long getRecordId();", "public String getRecordId() {\n return recordId;\n }", "public long getRecordNumber();", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method returns the value of the database column hb_org.orglevel
public String getOrglevel() { return orglevel; }
[ "public Integer getOrgLevel() {\n return orgLevel;\n }", "public Integer getLevelOrganizationId() {\n return levelOrganizationId;\n }", "public ScGridColumn<AcFacilityDestinationMapping> newLevelColumn()\n {\n return newLevelColumn(\"Level\");\n }", "public void setOrgLevel(In...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
================================================================================ Types ================================================================================ [24] FieldType ::= Identifier | BaseType | ContainerType
Rule FieldType() { // Push 1 FieldTypeNode onto the value stack return Sequence( FirstOf( ContainerType(), Identifier(), BaseType()), actions.pushFieldTypeNode()); }
[ "public FieldType getType();", "FieldType getType();", "FieldType newFieldType(String id, ValueType valueType, QName name, Scope scope);", "FieldType createFieldType();", "public abstract Class getFieldType();", "com.google.cloud.datacatalog.FieldType getType();", "com.google.cloud.datacatalog.FieldType...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
returns coordinate if it has a next coordinate, otherwise return null
public Coordinate next(){ if(iterator.hasNext()){ return iterator.next(); } return null; }
[ "public Waypoint getNextPoint(){\n\t\tif (curIndex_ >= route_.size()){\n\t\t\treturn null;\n\t\t}else{\n\t\t\treturn route_.get(curIndex_++);\n\t\t}\n\n\t}", "default Point2D occupyNextFreePlace(Token token) {\n\t\tToken[] tokens = getTileTokens();\n\t\tfor (int i = 0; i < tokens.length; i++) {\n\t\t\tif (tokens[...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Tests createKeyPressEvent(). Failed in all modes due to HtmlUnit bug:
public void testTriggerKeyPressEvent() { KeyPressEventListener listener = new KeyPressEventListener(); EventCreator creator = new EventCreator() { @Override public NativeEvent createEvent(boolean ctrlKey, boolean altKey, boolean shiftKey...
[ "@Test\n public void testKeyTyped() {\n System.out.println(\"keyTyped\");\n KeyEvent e = null; \n //instance.keyTyped(e);\n }", "@Test(timeout=300000)\n public void test0() throws Throwable {\n JButton jButton0 = new JButton(\"\");\n FrameConfirmKeyListener frameConf...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Unregister a network evaluator
public boolean unregisterNetworkEvaluator(NetworkEvaluator evaluator) { for (NetworkEvaluator registeredEvaluator : mEvaluators) { if (registeredEvaluator == evaluator) { localLog("Unregistered network evaluator: " + evaluator.getName()); return true; } ...
[ "private void unregisterSWANSensor(){\n\t\t\n\t\tExpressionManager.unregisterExpression(this, String.valueOf(REQUEST_CODE));\n\t\t\n\t}", "private void unregister() {\n\t\tgetLocalInstance().setData(null);\n\t\tmodule.getEntityProvider().removeData(this);\n\t\tsetNotDummy(false);\n\t}", "public static void unRe...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Stats is an interface for classes used to hold a single set of statistics from a data system
public interface DataStats { // publicly accessible methods - replaces original properties /*************************************************************************** * Gets the channel number for these stats * * @return the channel number *****************************************...
[ "abstract T createStats();", "public interface StatsManager {\n /**\n * A method that returns the value of a specific statistic.\n *\n * @param statistic The statistic to be queried.\n * @return The value of the statistic.\n */\n int getStat(Statistic statistic);\n\n /**\n * A met...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
when request is picked this function determine if the request is eligible for freezing button, therefore: non frozen requests, only opened requests, and requests that arent in closing stage
@FXML void clickRequestsTbl(MouseEvent event) { btnFreeze.setVisible(false); selectedRequest = tblRequest.getSelectionModel().getSelectedItem(); if(selectedRequest.getStatus().equals("opened")&&!selectedRequest.getCurrentStage().equals("Closing")) { if(LoginCont...
[ "@FXML\r\n\t\t void clickFreeze(ActionEvent event) {\r\n\t\t\t if(LoginController.getLoggedUser().getRole().equals(\"Manager\")) {\r\n\t\t\t\t \tObjectManager msg = new ObjectManager(selectedRequest.getIdReq(), MsgEnum.UNFREEZE_REQUEST);\r\n\t\t\t\t \tclient.handleMessageFromClientUI(msg);\r\n\t\t\t\t \ttry ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Switches the frustum/projection to perspective. This function is a noop in 2D which must always be orthographic.
@JsMethod public native void switchToPerspectiveFrustum();
[ "public void toPerspective()\n\t{\n\t\tthis.near = this.cameraP.near;\n\t\tthis.far = this.cameraP.far;\n\t\tthis.cameraP.setFieldOfView(this.fov / this.zoom);\n\t\tthis.cameraP.updateProjectionMatrix();\n\t\tthis.projectionMatrix = this.cameraP.projectionMatrix;\n\n\t\tthis.inPerspectiveMode = true;\n\t\tthis.inOr...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
If the provided test is true invoke the consumer.
public RequestBuilder ifTrue(boolean test, ThrowingConsumer<RequestBuilder> consumer) throws Exception { if (test) { consumer.accept(this); } return this; }
[ "public void invokeTest() {\n\t\t\t\n\t\t}", "public RequestBuilder ifFalse(boolean test, ThrowingConsumer<RequestBuilder> consumer) throws Exception {\n return ifTrue(!test, consumer);\n }", "public void ifSuccessful(Consumer<T> consumer) {\n if (isSuccessful()) {\n consumer.accept(result...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Removes leading 0s from integral image after composite creation.
private static <T> RandomAccessibleInterval<T> removeLeadingZeros( final RandomAccessibleInterval<T> input, final RectangleShape shape) { // Remove 0s from integralImg by shifting its interval by +1 final long[] min = Intervals.minAsLongArray(input); final long[] max = Intervals.maxAsLongArray(input); for (...
[ "private void removeLeadingZeros()\n {\n //remove leading zeros\n for(int i = 40-numDigits; i < 40; i++)\n {\n if (intArray[i]==0)\n numDigits--;\n }\n }", "private String removeLeadingZeros(Double input) {\n\t\tString strInput = Double.toString(input);\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
End of addVertex Method: updateEdges Purpose: Used to create edges after all vertices are saved and manupulated
public void updateEdges() { Vertex prevVert = vertices.get(0); for(int i = 1; i < vertices.size(); i++){ edges.add(new Edge(prevVert, vertices.get(i))); prevVert = vertices.get(i); } // At the end of the for loop, prevVert will get update to the last // ve...
[ "public void addAllEdges() {\n Vertex current, next;\n for (int currentIndex = 0; currentIndex < vertextNodes.size() - 1; currentIndex++) {\n current = vertextNodes.get(currentIndex);\n for (int nextIndex = currentIndex + 1; nextIndex < vertextNodes.size(); nextIndex++) {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ you complete this. Assume that two albums are equal if they have the same name and the same artist.
public boolean equals(Album other) { if (this.name.equals(other.name) && this.artist.equals(other.artist) && this.songs.containsAll(other.songs) && other.songs.containsAll(this.songs)) { return true; } else { return false; } }
[ "boolean sameArtist(Artist that) {\r\n\t\treturn this.name.equals(that.name); \r\n\t\t// && this.painting.samePainting(that.painting);\r\n\t}", "@Override\n public boolean equals(Object obj) {\n if (obj.getClass().equals(Album.class)){\n return name.equals(((Album)obj).name) && artist.equals(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Deletes all entries from Vocabulary table
public void emptyTable() { VocabularyDAO.getDb() .execSQL("delete from " + VocabularyDAO.TABLE_NAME); }
[ "public static void deleteVocab(Context context){\n Toast.makeText(context, \"deleted\", Toast.LENGTH_SHORT).show();\n DatabaseReference vocabRef=FirebaseDatabase.getInstance().getReference().child(\"user\").child(FirebaseAuth.getInstance().getUid()).child(\"vocab\").child(currentVocabId);\n vo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method sets the value of the database column sys_company_type_print_bill.bill_type_code
public void setBillTypeCode(Integer billTypeCode) { this.billTypeCode = billTypeCode; }
[ "public void setBillType(Integer billType) {\n this.billType = billType;\n }", "public Integer getBillTypeCode() {\n return billTypeCode;\n }", "public void setTYPE_CODE(BigDecimal TYPE_CODE) {\r\n this.TYPE_CODE = TYPE_CODE;\r\n }", "public void setJP_BankAccountType (String JP_...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Remove an element from the queue. If the random number is odd, the last element of the queue will be removed. Otherwise the first element of the queue will be removed
@Override public E poll() { if (queue.isEmpty()) { throw new IllegalArgumentException("There's no element to remove in Random Qeuue"); } if (r.nextInt() % 2 == 1) { return queue.removeFirst(); } else { return queue.removeLast(); } }
[ "public void remove() {\n if (count == 0) {\n return;\n }\n \n Random rand = new Random();\n int index = rand.nextInt(count);\n for (int i = index; i < count - 1; i++) {\n list[i] = list[i+1];\n }\n count--; \n }", "public void remo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Function to outline (i.e., group together) the specified rows
public void groupRows(int intFirstRow, int intLastRow) { checkPreRequisites(); HSSFWorkbook workbook = openFileForReading(); HSSFSheet worksheet = getWorkSheet(workbook); worksheet.groupRow(intFirstRow, intLastRow); writeIntoFile(workbook); }
[ "public String toString()\n {return \"Grouping: (\" + startCol + \", \" + startRow + \") ~ (\" + endCol + \", \" + endRow + \")\";}", "private void groupRows(HSSFSheet newSheet) {\n\t\t// TODO Auto-generated method stub\n\t\tint startRowPos = 0, endRowPos = 0;\n\t\t/* colums from excel file */\n\t\tString stat...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
determine the interest rate that should be used based on the duration of the loan / savings period
private double getInterestRate(int duration) { if (duration < shortTermInterestDuration) { return shortTermInterestRate; } else if (duration < mediumTermInterestDuration) { return mediumTermInterestRate; } else { return longTermInterestRate; } }
[ "double getInterestRate();", "public double calculateInterestRate(ILoan loan) {\r\n\t\treturn calculatorApr.getInterest(loan);\r\n\t}", "@Nonnegative\r\n\tdouble getLoanInterestRate();", "public void getInterest()\r\n {\r\n\t\tint datediff = seconddate - firstdate;\r\n rate = .05/365;\r\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Metodo che restituisce una Collection di Posizione contenente tutte le Posizioni in una Biblioteca che contengono un determinato Libro.
public Collection<Posizione> visualizzaPosizioniLibro(String isbn, String isil) { Biblioteca biblioteca = bibliotecaDAO.doRetriveById(isil); List<Posizione> posizioni = posizioneDAO.doRetriveByLibroAndBiblioteca(isbn, isil); for(Posizione p : posizioni){ p.setBiblioteca(bibl...
[ "public Set<CatDocumentos> loadCatDocumentoss();", "public abstract java.util.Collection getProducto_servicio_peticion();", "public abstract java.util.Collection getTecnico_peticion();", "public void consulterLivre() {\n\t\tSystem.out.println(\"Voici la liste des livres de la bibliothèque\");\r\n\t\tLivreDao....
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Tests set|getHorizontalTabSpacing(). Defaults tested by constructor tests.
public void testHorizontalTabSpacing() { doValuesTest(new int[] { 0, 8, 56, 144, 200 }, null, false, new ValueAccess() { public int get() { return dvbtlm.getHorizontalTabSpacing(); } public void set(int value) { ...
[ "public void setTabSpacing(Extent newValue) {\n setProperty(PROPERTY_TAB_SPACING, newValue);\n }", "public Extent getTabSpacing() {\n return (Extent) getProperty(PROPERTY_TAB_SPACING);\n }", "public TabRuler(float autoSpacing) {\r\n fAutoSpacing = autoSpacing;\r\n }", "void s...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__Empresa__DireccionAssignment_3_1" $ANTLR start "rule__Empresa__EmailAssignment_4_1" ../org.xtext.catalogo.ui/srcgen/org/xtext/ui/contentassist/antlr/internal/InternalCatalogo.g:3342:1: rule__Empresa__EmailAssignment_4_1 : ( ruleEString ) ;
public final void rule__Empresa__EmailAssignment_4_1() throws RecognitionException { int stackSize = keepStackSize(); try { // ../org.xtext.catalogo.ui/src-gen/org/xtext/ui/contentassist/antlr/internal/InternalCatalogo.g:3346:1: ( ( ruleEString ) ) // ../org.xtext...
[ "public final void rule__Empresa__DireccionAssignment_3_1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.catalogo.ui/src-gen/org/xtext/ui/contentassist/antlr/internal/InternalCatalogo.g:3331:1: ( ( ruleEString ) )\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Listener do TextField txfNumeroMesa
@FXML void initialize() throws SQLException{ txfNumeroMesa.textProperty().addListener(new ChangeListener<String>() { @Override public void changed(ObservableValue<? extends String> observable, String oldValue, String newValue) { if (!newValue.matches("\\d*")) { ...
[ "public static void campoTextoTipoNumero(javax.swing.JTextField campo) {\n campo.addKeyListener(new java.awt.event.KeyAdapter() {\n @Override\n public void keyReleased(java.awt.event.KeyEvent e) {\n }\n\n @Override\n public void keyTyped(java.awt.event.K...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
mrqcof method to adjust parameter estimates based on partial derivatives
private void mrqcof(double atry[], double alpha[][], double beta[]) { double sig2i, dy, wt; int i,j,k,l,m; try { dyda = new double[ma]; for (j = 0; j < mfit; j++) { for (k = 0; k <= j; k++) { alpha[j][k] = 0.0; } beta[j] = 0.0; } chisq = 0.0; for (i = 0; i < ndat...
[ "public void fitPSF( int flag) {\n run =true;\n // FIXME set a best X\n DoubleShapedVector x = null;\n double best_cost = Double.POSITIVE_INFINITY;\n // Check input data and get dimensions.\n if (data == null) {\n fatal(\"Input data not specified.\");\n }...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The method fetch fetches a resultset from the database, specifically created for the Attribute object
@Override public ResultSet fetch(Object o) { Logger logger = Logger.getLogger("defaultLogger"); logger.info("fetching attributes in DAOAttribute"); String name = (String)o; DBcon db = new Oraclecon("tool"); con = db.getConnection(); Statement st; ResultSet rs = null; try { st = con.createStatement()...
[ "public Attribute fetchAttributeById(int attribId);", "public PersistedAttribute fetchByPrimaryKey(long id);", "public Attribute fetchAttribute(String key, String value);", "T fetch(String identifier);", "FetchFirst createFetchFirst();", "public PersistedAttributeType fetchByPrimaryKey(long id);", "publ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Verifies the include(ConfigBuilder) and getConfig() work properly. This test follows a bit of an unusual approach in that it picks a few known config classes, populates them using their builders and reflection, then uses reflection once again to compare expected output (generated using their builders) with output from ...
@Test @SuppressWarnings("unchecked") public void testGetConfig() throws Exception { // Select a few classes to test dynamically. val testClasses = new HashMap<Class<?>, Supplier<ConfigBuilder<?>>>(); testClasses.put(ReadIndexConfig.class, ReadIndexConfig::builder); testClasses.pu...
[ "@Test\n public void testBuilder() throws Exception {\n final int propertyCount = 20;\n // Create three raw Properties.\n val p1 = buildProperties(0, propertyCount / 2, 0);\n val p2 = buildProperties(propertyCount / 4, propertyCount / 2, 100);\n val p3 = buildProperties(propert...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Dispatch a new event in the event thread, waiting for the result and returning it.
public static Object dispatchEventAsyncAndWait(Object target,String method,Object[] params) throws InterruptedException { checkDeadLock(USER); ensureAlive(USER); EventItem item=_thread[USER].addEvent(target,method,params); synchronized(item.endLock) { if(item.resultAvailable) { ...
[ "DispatchOutcome dispatchEvent(EventEnvelope event);", "public void queueEvent(Runnable r) {\n mNativeThread.queueEvent(r);\n }", "public NetActionEvent getLocalEvent()\n {\n synchronized (sync)\n {\n if (event == null)\n {\n try\n {...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Return the list of referenced elements. Typically this will only contain ElementDeclarations if we are dealing with a 'reference'.
public List<ElementDeclaration> getReferencedElements() { return referencedElements; }
[ "public final List<Element> getReferences() {\r\n return this.getReferences(true, true);\r\n }", "public ArrayList<String> getElementRefs() {\n\t\treturn elementRefs;\n\t}", "public Set<DependencyElement> getReferences() {\n\t\treturn Collections.unmodifiableSet(references);\n\t}", "public List<XmlE...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
imports the stashed tempChannels from the specified guild
private void importStashedChannelsForGuild(IGuild guild) { List<IUser> users = guild.getUsers(); List<IVoiceChannel> channels = guild.getVoiceChannels(); Iterator<TempChannel> iterator = stashedChannels.parallelStream() // only import TempChannels .filter(T -> T.getChannel().getGuild().equals(guild)) // i...
[ "private void stashChannelsAndRemoveMap(IGuild guild) {\r\n\t\tLogger.info(\"Stashing {} tempChannels from guild {}.\", tempChannelsByGuild.get(guild).getAllTempChannel().size(), guild.getName());\r\n\t\tif(tempChannelsByGuild.get(guild) != null) {\r\n\t\t\tstashedChannels.addAll(tempChannelsByGuild.get(guild).getA...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the user name of the person who is currently logged on to the Windows operating system.
@SuppressWarnings("StringSplitter") public static String LoggedInUserName() { final var userNameBuf = new char[10000]; final var size = new IntByReference(userNameBuf.length); final var result = NativeMethods.Secur32.INSTANCE.GetUserNameEx( ...
[ "public static String getOsUserName() {\n\n return System.getProperty(\"user.name\");\n }", "public String getOsUser() {\n Map<String, String> envp = getEnvironmentVariables0();\n String user = System.getProperty(\"user.name\", envp.get(\"USER\")); //$NON-NLS-1$ //$NON-NLS-2$\n retu...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
description indents to the proper level in the output note: flags the indentation level with "|" when flag = true requires none guarantees proper number of indentation spaces have been put into the output
public void outputActualIndentation() { for (int steps = 1; steps <= indentLevel; steps++) { outputJALPrintStream.print(" "); } if (showMarkerFlag) { outputJALPrintStream.print("|"); } }
[ "private void indent() {\n for (int i = 0; i < level; i++) {\n buffer.append(\" \");\n }\n }", "private void indent() {\n\t\tfor (int i = 0; i < level; i++) {\n\t\t\tSystem.out.print(\" \");\n\t\t}\n\t}", "public void setIndent(boolean indent);", "private static String indentation(int level)\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Derives motion state from the current cell pattern confidence
private void getMotionStateFromCurrentCellPattern() { if (location.getCellPatternQuality() <= LocationConstants.MOTION_STATE_MOVING_CONFIDENCE_LIMIT) location.setMotionState( Location.MotionState.MOVING ); else if (location.getCellPatternQuality() >= LocationConstants.MOTION_STATE_STATIONARY_CON...
[ "protected double[] getState(Environment environment) {\n\t\tdouble[] state = new double[15 + 3*8*NUM_EL];\n\n\t\tint[] egoPos = environment.getMarioEgoPos();\n\t\tbyte[][] obs = environment.getMergedObservationZZ(zLevelScene, zLevelEnemies);\n\n\t\t//\t\tif (currentFloatPos==null) currentFloatPos = environment.get...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the value of the model2PosDistr property.
public void setModel2PosDistr(double value) { this.model2PosDistr = value; }
[ "public void setModel1PosDistr(double value) {\r\n this.model1PosDistr = value;\r\n }", "public void setModel4PosDistr(double value) {\r\n this.model4PosDistr = value;\r\n }", "public void setModel2NegDistr(double value) {\r\n this.model2NegDistr = value;\r\n }", "public void setModel3PosDistr(dou...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Rend la HashMap ensembleBlocs
public HashMap getEnsembleBlocs() { return ensembleBlocs; }
[ "private void constructBiMaps() {\n srcGeneIdToPositionMap = HashBiMap.create();\n int temp = 1;\n for (Gene e : source.getGenes()) {\n srcGeneIdToPositionMap.put(e.getGeneId(), temp++);\n }\n tgtGeneIdToPositionMap = HashBiMap.create();\n temp = 1;\n for ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Selection templates are eligible for "Surround With" should be filtered based on whether the surrounding code makes sense (computed by the language plugins)
public boolean accept(CodeTemplate template) { if (templates != null && template != null && template.getParametrizedText().indexOf("${selection") != -1) { // NOI18N return templates.contains(template.getAbbreviation()) || (template.getParametrizedText().indexOf("allowSurround") != -1); // NOI18N ...
[ "@Override\n protected boolean shouldVisitSubtreeOfInternalMatchedNode(IMNode node) {\n return (node.getSchemaTemplateId() == NON_TEMPLATE)\n && super.shouldVisitSubtreeOfFullMatchedNode(node);\n }", "boolean isAllowSubstitutable();", "@Test\n\t public void lowLeve...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a Log4JComponentMonitor with a given Logger instance class. The class name is used to retrieve the Logger instance.
public Log4JComponentMonitor(final Class<?> loggerClass) { this(loggerClass.getName()); }
[ "public Log4JComponentMonitor(final Logger logger) {\n this();\n this.logger = logger;\n }", "public static ComponentMonitor LOG4J() {\n return new Log4JComponentMonitor();\n }", "public Log4JComponentMonitor(final Class<?> loggerClass, final ComponentMonitor delegate) {\n this...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
=== Get EntryBlock by ID ===
@GetMapping("/entryblock/{id}") public EntryBlock getEntryBlockById(@PathVariable long id){ Optional<EntryBlock> entryBlock = entryBlockRepo.findById(id); if (!entryBlock.isPresent()) ResponseEntity.notFound().build(); return entryBlock.get(); }
[ "public Block getBlock(String id) {\n\t\treturn this.blocks.get(Long.valueOf(id));\n\t}", "Block getBlock(int id) {\n return getBlock(id, 0);\n }", "public Block getBlockByID(Integer blockID){\n for (Block block : this.blocks) {\n if(block.getID().equals(blockID))\n {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Replaces the metatags for a metric. Metatags cannot use any of the reserved tag names.
public void setMetatags(Map<String, String> metatags, String key) { if (metatags != null) { TSDBEntity.validateTags(metatags); _metatags.clear(); _metatags.putAll(metatags); _key = key; } }
[ "public void alterarMetadados(Dataset dataset) throws SenseRDFException;", "protected void invalidateAllTags() {\n\n\t\tfor (String name : dataNames) {\n\n\t\t\tsetDataValueForAnimationsHandler(name, null);\n\t\t}\n\t}", "void setMetaLocal(Map<Integer, String> newMetaTable);", "public void setTags(UniqueTagLi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__ObjectRestriction__Alternatives" $ANTLR start "rule__RelationTypeRestriction__Alternatives_3" ../org.eclipse.osee.framework.core.dsl.ui/srcgen/org/eclipse/osee/framework/core/dsl/ui/contentassist/antlr/internal/InternalOseeDsl.g:1778:1: rule__RelationTypeRestriction__Alternatives_3 : ( ( ( rule__Relat...
public final void rule__RelationTypeRestriction__Alternatives_3() throws RecognitionException { int stackSize = keepStackSize(); try { // ../org.eclipse.osee.framework.core.dsl.ui/src-gen/org/eclipse/osee/framework/core/dsl/ui/contentassist/antlr/internal/InternalOseeDsl.g:17...
[ "public final void rule__RelationTypeRestriction__Group__3__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.eclipse.osee.framework.core.dsl.ui/src-gen/org/eclipse/osee/framework/core/dsl/ui/contentassist/antlr/internal/Internal...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
For each event, obtain the shortest dependency path between the event each timex in its sentence. If no such paths exist, assign the event to the DCT Else, choose the shortest path. If same length, choose one with most govtodep pointing arrows If still more than one, choose the first one in the list
public void addContextNearestTimexInPath() { // First get the DCT Timex List<Timex> dctTimexList = doc.getDocstamp(); Timex dct = dctTimexList.get(0); if (dct == null) { return; } // Get timexes, events, and dependencies (by sid) for the document. List<List<Timex>> timexesBySentId = doc.getTimexesBy...
[ "public void findShortestPaths() throws Exception {\n\t\t// Queue to store nodes with updated distance from the source node.\n\t\tQueue<axg137230_Node> queue = new LinkedList<>();\n\t\tqueue.add(nodes[source]); // add source node the queue.\n\t\twhile (!queue.isEmpty()) {\n\t\t\taxg137230_Node u = queue.remove();\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__ImpliesOpExp__Group_1__2__Impl" $ANTLR start "rule__XorOpExp__Group__0" InternalOCLlite.g:4013:1: rule__XorOpExp__Group__0 : rule__XorOpExp__Group__0__Impl rule__XorOpExp__Group__1 ;
public final void rule__XorOpExp__Group__0() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalOCLlite.g:4017:1: ( rule__XorOpExp__Group__0__Impl rule__XorOpExp__Group__1 ) // InternalOCLlite.g:4018:2: rule__XorOpExp__Group__0__Impl rule...
[ "public final void rule__ImpliesOpExp__Group__0__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalOCLlite.g:3894:1: ( ( ruleXorOpExp ) )\n // InternalOCLlite.g:3895:1: ( ruleXorOpExp )\n {\n // In...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Stmnt_LST_Elem: (Repeat | Asg | Read | Comment) next=Stmnt_LST_Elem?;
public Stmnt_LST_ElemElements getStmnt_LST_ElemAccess() { return (pStmnt_LST_Elem != null) ? pStmnt_LST_Elem : (pStmnt_LST_Elem = new Stmnt_LST_ElemElements()); }
[ "Fgmnt_LST_Elem createFgmnt_LST_Elem();", "public L2ListElem getNext() { \r\n return next;\r\n }", "public OpenLinkedList() {\r\n strList = new LinkedList<String>();\r\n }", "public ElementIterator (PositionList<E> L) {\n\t\tlist = L;\n\t\tcursor = (list.isEmpty())? null : list.first();\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Linearly interpolates between the two specified colors. c = c1(1m) + c2m
public static int interpolateColor(int c1, int c2, double m){ double r1 = r_normalized(c1); double g1 = g_normalized(c1); double b1 = b_normalized(c1); double a1 = a_normalized(c1); double r2 = r_normalized(c2); double g2 = g_normalized(c2); double b2 = b_normalized(c2); double a2 = a_normalized(c2);...
[ "private static final Color interpolateColorLinear( final Color fst, final Color snd, final double f ) {\n final double f1m = 1 - f;\n int red = (int) Math.round( fst.getRed() * f1m + snd.getRed() * f );\n int green = (int) Math.round( fst.getGreen() * f1m + snd.getGreen() * f );\n int b...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Create own Packet and EventManager for the server
private void setupServer() { EventManager eventManager = new EventManager(); PacketManager packetManager = new PacketManager(); //Register the Server Listener eventManager.registerListener(new de.dragonlabs.scaleadapter.example.server.handler.MessageListener()); eventManager...
[ "public static void registerPackets() {\n ReforgedMod.network = NetworkRegistry.INSTANCE.newSimpleChannel(ReforgedMod.ID);\n int packetId = 0;\n ReforgedMod.network.registerMessage(MessageCustomReachAttack.Handler.class, MessageCustomReachAttack.class,\n packetId++, Side.SERVER);...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Load viewpoints from XML file
private void loadDefaultViewpointsFile() throws IOException, JDOMException { // Load localised file from bundle URL url = FileLocator.find(Platform.getBundle(BUNDLE_ID), new Path("$nl$/" + VIEWPOINTS_FILE)); //$NON-NLS-1$ url = FileLocator.resolve(url); Document doc = new SAXBui...
[ "private void importLocation(IXMLElement xml) throws XMLFormatException{\n\t\tif (!xml.getName().equals(\"view\"))\n\t\t\tthrow new XMLFormatException(\"Root element must be <view>\");\n\t\tEnumeration children = xml.enumerateChildren();\n\t\twhile (children.hasMoreElements()){\n\t\t\tIXMLElement child = (IXMLEleme...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the "documentation" element
public org.hl7.fhir.String getDocumentation() { synchronized (monitor()) { check_orphaned(); org.hl7.fhir.String target = null; target = (org.hl7.fhir.String)get_store().find_element_user(DOCUMENTATION$4, 0); if (target == null) { ...
[ "public Documentation getDocumentation() {\n return documentation;\n }", "String getDocumentation();", "public List<Element> getDocumentationElements();", "public String getDocumentation() {\r\n return getComment().getDocumentation();\r\n }", "public String getDocumentation( ) {\r\n\r\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "ruleSingleDependencies" $ANTLR start "entryRulePackageName" InternalMyDsl.g:4139:1: entryRulePackageName returns [EObject current=null] : iv_rulePackageName= rulePackageName EOF ;
public final EObject entryRulePackageName() throws RecognitionException { EObject current = null; EObject iv_rulePackageName = null; try { // InternalMyDsl.g:4139:52: (iv_rulePackageName= rulePackageName EOF ) // InternalMyDsl.g:4140:2: iv_rulePackageName= rulePackageN...
[ "public final EObject ruleSingleDependencies() throws RecognitionException {\n EObject current = null;\n\n EObject lv_dependencies_0_0 = null;\n\n EObject lv_dependencies_1_0 = null;\n\n\n\n \tenterRule();\n\n try {\n // InternalMyDsl.g:4095:2: ( ( ( (lv_dependencies_0_...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test the method 'hashCodeType'
@Test public void hashCodeTypeTest() { LogResult test1 = new LogResult(); test1.setTimestamp(1); test1.setLevel(LogLevel.INFO); test1.setRequestId("TS"); test1.setAccountId("TS"); test1.setCallId("TS"); test1.setMessage("TS"); Object testObject = new Object(); t...
[ "@Override public int hashCode() { return 5*type.hashCode() + 7*getName().hashCode(); }", "@Test\n\tpublic void testHashCode() {\n\t\tassertTrue(AbstractImportTypeImpl.UPDATE_TYPE.hashCode() != AbstractImportTypeImpl.INSERT_TYPE.hashCode()); // NOPMD\n\t}", "@Test\n public void testHashCode() {\n System.out...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/if the currently displayed contract is the first in the list of contracts,then you cannot view a nonexistent contract behind it.
@Override public void actionPerformed(ActionEvent e) { if(theModel.getCurrentContractNum() == 2) { return; } try { //retrieve the contract behind the currently displayed contract. theModel.nextContract(); } ...
[ "@Override\r\n \r\n public void actionPerformed(ActionEvent e) {\r\n if(theModel.getCurrentContractNum() == 0) {\r\n return;\r\n }\r\n try {\r\n //retrieve the contract behind the currently displayed contract.\r\n theModel....
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method should not use with the propose to add or remove elements from this list. If you need to work with the mapping list, you should use the MappingService class.
public ArrayList<Mapping> getMappings() { return new ArrayList<Mapping>(mappings); }
[ "void updateMappingUI(){\n if ( null!=mappingList ) {\n mappingList.setListData(mapping.toArray());\n mappingList.updateUI();\n }\n }", "public Mapping getMapping() {\n\t\t// FIXME Tranform list into mapping\n\t\treturn m;\n\t}", "public java.util.List<Mapping> getMapping() { \n\t\tif (myMappi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Setter for the reporting configuration file.
public final void setReportingConfig(final File cheaderConfig) { this.headerConfig = cheaderConfig; }
[ "public void setConfigfile (File file)\n {\n _configfile = file;\n }", "protected void setConfigFilePath(String configFilePath){\n this.configFilePath = configFilePath;\n }", "public void setReportPath(String reportConfigPath) {\r\n\r\n\t\tthis.reportConfigPath = reportConfigPath;\r\n\t}"...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the raw classpath elements obtained from ClassLoaders.
public List<String> getRawClasspathElements() { return rawClasspathElements; }
[ "public List<ClasspathRelativePath> getRawClasspathElements() {\n return rawClasspathElements;\n }", "public List<File> getClasspathElements() {\n\t\tthis.parseSystemClasspath();\n\t return classpathElements;\n\t}", "List<IRuntimeClasspathEntry> getRuntimeClasspath();", "private static ImmutableL...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Determines the current players draft choice
public void draftChoice(Game game){ game.draftEvent(); game.displayMessage(this.getName() + " currently has " + this.getNumTroops() + " troops left to give"); }
[ "public void gameDraft(){\n this.displayMessage(\"Starting the draft phase for player: \" + this.getCurrentPlayer());\n\n currentPlayer.bonusTroops();//Calculates the number of troops to be distributed\n\n //Keep asking player to send troops to territories until there are no more troops to send...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
GST computation section wise functions
public JSONObject getGSTComputation_Sales_Section_1(JSONObject params) throws JSONException, ServiceException { JSONObject reqParams = new JSONObject(params, JSONObject.getNames(params)); reqParams.put("isGSTINnull", false); reqParams.put("registrationType", Constants.GSTRegType_Regular); ...
[ "private void processSegment() {\n double total = 0;\n for (int i = 0; i < 12; ++i) total += segment_totals[i];\n if (total > 0) {\n for (int i = 0; i < 12; ++i) segment_totals[i] /= total;\n }\n for (int f = 0; f < filters.size(); ++f) {\n KeyProbabilityFilter...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method set up alarm to the android system. Before it set up the alarm it will cancel all the previous alarms so that in case the user delete an event or change the silent attribute the alarm will be properly adjusted For each calendar event, two alarms will be set up. The first is to silent the phone when event st...
public void setAlarm(Context context) { ArrayList<CalendarEvent> mEvents= new ArrayList<CalendarEvent>(); EventManager em = new EventManager(context); mEvents= em.getAllSilentEvent(); int i=0; cancelAlarm(context); SharedPreferences.Editor editor = reqCodes.edit(); ...
[ "public void setAlarms() {\n SharedPreferences preferences = appContext.getSharedPreferences(appContext.getString(R.string.preferences_filename), Context.MODE_PRIVATE);\n final SharedPreferences.Editor editor = preferences.edit();\n String bedtime = preferences.getString(\"BED_ID\", appContext....
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
SubscribeChannelGraph launches a streaming RPC that allows the caller to receive notifications upon any changes to the channel graph topology from the point of view of the responding node. Events notified include: new nodes coming online, nodes updating their authenticated attributes, new channels being advertised, upd...
public void subscribeChannelGraph(lnrpc.Rpc.GraphTopologySubscription request, io.grpc.stub.StreamObserver<lnrpc.Rpc.GraphTopologyUpdate> responseObserver) { asyncUnimplementedUnaryCall(getSubscribeChannelGraphMethod(), responseObserver); }
[ "public java.util.Iterator<lnrpc.Rpc.GraphTopologyUpdate> subscribeChannelGraph(\n lnrpc.Rpc.GraphTopologySubscription request) {\n return blockingServerStreamingCall(\n getChannel(), getSubscribeChannelGraphMethod(), getCallOptions(), request);\n }", "public void subscribeChannelGraph(lnr...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Verifies that COPY command reports an error when used with PreparedStatement parameter.
public void testPreparedStatementWithParameter() { GridTestUtils.assertThrows(log, new Callable<Object>() { @Override public Object call() throws Exception { PreparedStatement pstmt = conn.prepareStatement( "copy from \"" + BULKLOAD_TWO_LINES_CSV_FILE ...
[ "public void testPreparedStatementWithExecuteQuery() {\n GridTestUtils.assertThrows(log, new Callable<Object>() {\n @Override public Object call() throws Exception {\n PreparedStatement pstmt = conn.prepareStatement(BASIC_SQL_COPY_STMT);\n\n pstmt.executeQuery();\n\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Reads XML string that was returned from Student Life, parses it, then creates a list of event objects.
public static ArrayList<Event> getEventsFromStudentLife(String xml) throws ParseException, ParserConfigurationException, SAXException, IOException { Document doc = loadXMLFromString(xml); doc.getDocumentElement().normalize(); NodeList nList = doc.getElementsByTagName("channel"); Array...
[ "public static void loadEventsFromXML()\n\t{\n\t\ttry {\n\t\t\tdecoder = new XMLDecoder(new BufferedInputStream(new FileInputStream(\"Events.xml\")));\n\t\t\t eventRepo.setEventList((ArrayList<EventBase>) decoder.readObject());\n\t\t\t decoder.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-ge...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a new unbound method with given name, returntype and parameters
HxMethod createMethod(final HxType returnType, final String methodName, final HxType... parameterTypes);
[ "Method createMethod();", "HxMethod createMethod(final String returnType,\n final String methodName,\n final String... parameterTypes);", "protected ResourceMethod defineMethod( String theName, JavaType theReturnType, HttpVerb theHttpVerb, String theMethodPath ) {\r...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Description: Verify the remaining languages are displaying on clicking the drop down
@Test(priority=6) public void verifyRemaininglanguagedisplaysOnclickingLanguageDropdown() throws Exception { OverviewTradusPROPage overviewObj=new OverviewTradusPROPage(driver); explicitWaitFortheElementTobeVisible(driver,overviewObj.overviewPageVerificationElement); click(overviewObj.languageAtHeader); String...
[ "public void clickAdminMenuLanguagesSubMenuLanguages() {\n try {\n this.webDriverWait.until(ExpectedConditions.visibilityOf(adminMenuLanguagesSubMenuLanguages));\n adminMenuLanguagesSubMenuLanguages.click();\n System.out.println(adminMenuLanguagesSubMenuLanguages + \" was cli...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method is used instead of a constructor and returns a new instance of RestaurantDetailFragment. The Parcelor library adds the Restaurant object to a bundle and set the bundle as the argument for our new RestaurantDetail Fragment. This allows us to access necessary data when a new instance of our fragment is create...
public static RestaurantDetailFragment newInstance(ArrayList<Restaurant> restaurants, Integer position) { RestaurantDetailFragment restaurantDetailFragment = new RestaurantDetailFragment(); Bundle args = new Bundle(); args.putParcelable(Constants.EXTRA_KEY_RESTAURANTS, Parcels.wrap(restaurants...
[ "@Override\n protected Fragment createFragment() {\n Intent intent = getIntent();\n\n long id = intent.getLongExtra(MovieDetailFragment.EXTRA_ID, -1);\n return MovieDetailFragment.newInstance(id);\n }", "public Restaurant(Restaurant oldres){\n this.name = new String(oldres.name);...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the value of the 'var35' field.
public com.dj.model.avro.LargeObjectAvro.Builder setVar35(java.lang.CharSequence value) { validate(fields()[36], value); this.var35 = value; fieldSetFlags()[36] = true; return this; }
[ "public void setVar35(java.lang.CharSequence value) {\n this.var35 = value;\n }", "public com.dj.model.avro.LargeObjectAvro.Builder setVar33(java.lang.Integer value) {\n validate(fields()[34], value);\n this.var33 = value;\n fieldSetFlags()[34] = true;\n return this;\n }", "public com...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set the alternative mail
public void setAlternateMail(String mail) { this.alternateMailAddress = mail; }
[ "public void setAlternativeEmail(String setAlt){\n this.mailAlternative = setAlt;\n }", "public void setAlternateEmail(String altemail) { this.alternateEmail = altemail; }", "public void setalternate(String altmail)\n\t{\n\t\tthis.alternateEmail=altmail;\n\t}", "public void setMail (String newVar) {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
searchLebihBesar digunakan untuk mencari daftarAtlet yang lebih ringan dari otherAtlet dengan membuat method array yang digunakan untuk menyimpan data yang lebih ringan antara daftarAtlet dengan otherAtlet
public static Atlet[] searchLebihKecil(Atlet daftarAtlet[], Atlet otherAtlet) { Atlet result[] = new Atlet[daftarAtlet.length]; for (int i = 0; i < daftarAtlet.length; i++) { //melakukan perbandingan antara otherAtlet dengan daftarAtlet //jika > 0 maka result [i] = daftarAtl...
[ "public static Atlet[] searchLebihBesar(Atlet daftarAtlet[], Atlet otherAtlet) {\r\n Atlet result[] = new Atlet[daftarAtlet.length];\r\n for (int i = 0; i < result.length; i++) {\r\n //melakukan perbandingan antara otherAtlet dengan daftarAtlet \r\n //jika < 0 maka result [i] = d...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Return a copy of this ClusterView
ClusterView copy();
[ "public ClusterView() {\n\n\t}", "public ClusterDef as_cluster_def() {\n return cluster_def;\n }", "public com.tangosol.net.Cluster getCluster()\n {\n return __m_Cluster;\n }", "public String getCluster() {\n return this.cluster;\n }", "public interface Cluster...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Checks if given extension is lossless audio format.
public boolean isLosslessAudioFormat(String extension) { return lossless.contains(extension); }
[ "public boolean isLossyAudioFormat(String extension) {\n\t\treturn lossy.contains(extension);\n\t}", "public boolean isWarningAudioFotmat(String extension) {\n\t\treturn warning.contains(extension);\n\t}", "public static boolean hasAudioExtension(String string)\n {\n \tboolean hasAudio = false;\n \tif(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Removing all Favourite Songs from the Db list
public static void removeAllSongsFromFavourites(Realm realm) { realm.executeTransaction(r -> realm.where(FavouriteSongModel.class).findAll().deleteAllFromRealm()); }
[ "public void removeAllFavorites() {\r\n SQLiteDatabase db = helper.getWritableDatabase();\r\n db.beginTransaction();\r\n\r\n // Removes all the favorites that not in the last search:\r\n db.delete(DBConsts.Table_Places.TABLE_NAME, DBConsts.Table_Places.COLUMN_IsInHistory ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the day number in week.
public int getDayNumberInWeek() { return dayNumberInWeek; }
[ "@NonNull public int weekDay() {\n\t\tint num;\n\n\t\tnum = ( (23*month) / 9) + day + 4 + year + (year / 4 ) - \n\t\t\t\t(year / 100) + (year / 400);\n\n\t\tif( month >= 3 ) return (num - 2 ) % 7;\n\t\treturn ( num ) % 7;\n\n\t}", "public int GetDay(){\n\t\treturn this.date.get(Calendar.DAY_OF_WEEK);\n\t}", "pu...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns true if field oiltype is set (has been assigned a value) and false otherwise
public boolean isSetOiltype() { return __isset_bit_vector.get(__OILTYPE_ISSET_ID); }
[ "public boolean isSetType() {\n return this.type != null;\n }", "boolean getFieldTypeIdNull();", "boolean hasSetopType();", "public boolean hasType() {\n return fieldSetFlags()[2];\n }", "public boolean hasFuelType() {\n return fieldSetFlags()[1];\n }", "public boolean isSetField() {\r...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }