query
stringlengths
8
1.54M
document
stringlengths
9
312k
negatives
listlengths
19
20
metadata
dict
Marks the leaf "cellaccessmode" with operation "create".
public void markCellAccessModeCreate() throws JNCException { markLeafCreate("cellAccessMode"); }
[ "public void markMajorActionCreate() throws JNCException {\n markLeafCreate(\"majorAction\");\n }", "public void markMajorAbateCreate() throws JNCException {\n markLeafCreate(\"majorAbate\");\n }", "public void markMinorAbateCreate() throws JNCException {\n markLeafCreate(\"minorAbate...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The functions that a Cart item should have to interact with Database
public interface CartItemDao { /** * Add the cart item into cart * * @param cartItem */ void addCartItem(CartItem cartItem); /** * Remove the cart item from cart * * @param CartItemId */ void removeCartItem(int CartItemId); /** * Clear the cart * * @param cart */ void removeAllCartItems(Cart cart); }
[ "hipstershop.Demo.CartItem getItem();", "void addCartItem(CartItem cartItem);", "public void insertCart(Cart cart) throws UserApplicationException;", "public interface IShoppingCart {\n\t/**\n\t * add a simple product to the cart\n\t * \n\t * @param product\n\t */\n\tpublic Product addProduct(String name, Str...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Pulls the column names from the fitting criteria columns for a single markov chain
private ArrayList<String> populateTableColumnNames(){ ArrayList<String> columnNames = new ArrayList<>(); if(this.digPopGUIInformation.getFittingCriteriaColumnNames() != null){ columnNames = this.digPopGUIInformation.getFittingCriteriaColumnNames(); } else{ //Census Value Names columnNames.addAll(Arrays.asList("ID","Census Region Trait" ,"Census Region Total","Survey Trait Table" ,"Survey Trait Select","Survey Trait Field" ,"Survey Total Table", "Survey Total Field" , "User Entered Description", "Trait Weight")); this.digPopGUIInformation.setFittingCriteriaColumnNames(columnNames); } return columnNames; }
[ "abstract String[] getColumnNamesForConstraint(String constraintName);", "private String generateColumnNames() {\n String text = SUBJECT_ID + DELIMITER\n + SUBJECT_AGE + DELIMITER\n + SUBJECT_GENDER + DELIMITER\n + LEFT_CHOICE + DELIMITER\n + RIGH...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Generates a (relative) directory name based on a class name. Uses the appropriate separators for the platform.
public static String generateDirectorynameFromClassname(String classname) { // the generated directory name is usable on both Linux and Windows // (which uses \ as a separator). return OUTPUT_FOLDER_PREFIX + classname.replace('.', '/') + '/'; // File tmp = new File(OUTPUT_FOLDER_PREFIX + classname.replace('.', // '/') + '/'); // return tmp.getAbsolutePath(); }
[ "protected final String toClassFileName(final String name) {\n String className = name.replace('.', File.separatorChar);\n\n className = className.replace('/', File.separatorChar);\n\n className = className + \".class\";\n\n return className;\n }", "private String generateClassPath(String name) {\n\t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Function to create and write the output in a _Decoded.txt file
private void createDecodedFile(String decodedValues, String encodedFileName) throws Exception { String decodedFileName = encodedFileName.substring(0, encodedFileName.lastIndexOf(".")) + "_decoded.txt"; //FileWriter and BufferedWriter to write and it overwrites into the file. FileWriter fileWriter = new FileWriter(decodedFileName, false); BufferedWriter bufferedWriter = new BufferedWriter(fileWriter); bufferedWriter.write(decodedValues); //Flush and Close the bufferedWriter bufferedWriter.flush(); bufferedWriter.close(); }
[ "private void createDecodedFile() {\r\n try {\r\n //Keep iterating until all characters have been written to outfile\r\n int iter = 0; \r\n while(iter < characters) {\r\n //Continue reading file bytes until at a character leaf\r\n while(!tree.atL...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the Bcc header field of this message to the specified address.
public void setBcc(Address bcc) { setAddressList(FieldName.BCC, bcc); }
[ "public void setBcc(Address... bcc) {\n setAddressList(FieldName.BCC, bcc);\n }", "public void setBccAddress(String strAddress) {\n\t\tif(strAddress!=null)\n\t\t{\n\t\t\tString[] alAddress = StringUtil.toArr(strAddress,\";\"); \n\t \tthis.bccAddress = new Address[alAddress.length]; \n\t \tfor (int...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the value of the 'PRPSL_AGCY_ID' field.
public org.LNDCDC_ADS_PRPSL.PRPSL_AGCY_XMAP.apache.nifi.LNDCDC_ADS_PRPSL_PRPSL_AGCY_XMAP.Builder setPRPSLAGCYID(java.lang.Long value) { validate(fields()[4], value); this.PRPSL_AGCY_ID = value; fieldSetFlags()[4] = true; return this; }
[ "public void setPRPSLAGCYID(java.lang.Long value) {\n this.PRPSL_AGCY_ID = value;\n }", "public void setPRPSLAGCYXMAPID(java.lang.Long value) {\n this.PRPSL_AGCY_XMAP_ID = value;\n }", "public java.lang.Long getPRPSLAGCYID() {\n return PRPSL_AGCY_ID;\n }", "public java.lang.Long getPRPSLAGCYID...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Editar VisitaFinalCasoCovid19 existente en la base de datos
public boolean editarVisitaFinalCasoCovid19(VisitaFinalCasoCovid19 visitacaso) throws Exception{ ContentValues cv = VisitaFinalCasoCovid19Helper.crearVisitaFinalCasoCovid19ContentValues(visitacaso); return mDb.update(Covid19DBConstants.COVID_VISITA_FINAL_CASO_TABLE , cv, Covid19DBConstants.codigoVisitaFinal + "='" + visitacaso.getCodigoVisitaFinal() + "'", null) > 0; }
[ "public boolean editarCuestionarioCovid19(CuestionarioCovid19 partcaso) throws Exception{\n\t\tContentValues cv = CuestionarioCovid19Helper.crearCuestionarioCovid19ContentValues(partcaso);\n\t\treturn mDb.update(Covid19DBConstants.COVID_CUESTIONARIO_TABLE, cv, Covid19DBConstants.codigo + \"='\"\n\t\t\t\t+ partcaso....
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Helper method. Forwards a request to the default dispatcher.
private void forward(final HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { RequestDispatcher rd = getServletContext().getNamedDispatcher("default"); rd.forward(request, response); }
[ "public void sendNowWith(RequestDispatcher viaThis);", "public void sendGlobalWith(RequestDispatcher viaThis);", "public void bindDefaultRequestHandler(DmpRequestProcessorIF requestProcessor);", "void dispatchRequest(String urlPath) throws Exception;", "public interface ActionDispatcher {\n\n /**\n * Dis...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
stop if there are some errors
public boolean proceedOnErrors() { return false; }
[ "public boolean abortOnFailedAnalysis()\n {\n return true;\n }", "private void error() {\n this.error = true;\n this.clients[0].error();\n this.clients[1].error();\n }", "public boolean hasContinueOnError();", "private void checkHalt() {\n if (state.getIsStop()) {\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Check if sensor is in hybrid mode
public boolean isHybridMode(long sensorAddress) throws SQLException { boolean isHybrid = false; PreparedStatement l_pstmt = m_db .prepareStatement("select sens_is_in_hybrid_mode from sensor where sens_address = ?"); l_pstmt.setLong(1, sensorAddress); ResultSet l_rs = l_pstmt.executeQuery(); if (l_rs.next()) isHybrid = l_rs.getBoolean(1); l_rs.close(); l_pstmt.close(); return isHybrid; }
[ "public boolean canDetectSensors();", "private boolean onlineMode() {\n SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(this);\n boolean allowed = preferences.getBoolean(Constants.PREF_ALLOW_TRACKING_WITHOUT_WLAN, false);\n\n ConnectivityManager connManager = (Co...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test of getMagnitude method, of class Unit.
@Test public void testGetMagnitude() { System.out.println("getMagnitude"); Unit instance = new Unit(); Magnitude expResult = null; Magnitude result = instance.getMagnitude(); assertEquals(expResult, result); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); }
[ "@Test\n public void testSetMagnitude() {\n System.out.println(\"setMagnitude\");\n Magnitude magnitude = null;\n Unit instance = new Unit();\n instance.setMagnitude(magnitude);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The te...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sorts an array of clocks in place, using insertion sorting. Used public because the method needs to be accessed from outside, void because the method does not return something
public void inPlaceInsertionSort(Clock [] s){ int x; int i; Clock temp= new Clock(0,0,0); for(x=1;x<s.length;x++){ temp = s[x]; for (i=x-1;(i>=0)&&(s[i].isAfter(temp));i--){ s[i+1]= s[i]; } s[i+1]=temp; } }
[ "@Test\n public void testInsertionSort() {\n Integer[] copy = Arrays.copyOf(data, data.length);\n System.out.println(\"\\nUnsorted Data\");\n sorter.timedSort(SortAlgorithm.INSERTION, copy, comp);\n assertTrue(\"Not sorted\", isSorted(copy, comp));\n System.out.println(\"\\nSorted Data\");\n sort...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Represents the status of the changed resource. .google.ads.googleads.v0.enums.ChangeStatusOperationEnum.ChangeStatusOperation resource_status = 8;
public com.google.ads.googleads.v0.enums.ChangeStatusOperationEnum.ChangeStatusOperation getResourceStatus() { @SuppressWarnings("deprecation") com.google.ads.googleads.v0.enums.ChangeStatusOperationEnum.ChangeStatusOperation result = com.google.ads.googleads.v0.enums.ChangeStatusOperationEnum.ChangeStatusOperation.valueOf(resourceStatus_); return result == null ? com.google.ads.googleads.v0.enums.ChangeStatusOperationEnum.ChangeStatusOperation.UNRECOGNIZED : result; }
[ "public com.google.ads.googleads.v0.enums.ChangeStatusOperationEnum.ChangeStatusOperation getResourceStatus() {\n @SuppressWarnings(\"deprecation\")\n com.google.ads.googleads.v0.enums.ChangeStatusOperationEnum.ChangeStatusOperation result = com.google.ads.googleads.v0.enums.ChangeStatusOperationEnum.ChangeSt...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Dokumentacni komentar metody na zaklade hlavnich parametru obrazovky, vypocet parametru: PPI na vysku a na sirku a vypocet horizontalni roztec bodu "pitch"
public static void main(String[] args) { //zakladni parametry obrazovky int hSize = 332; int vSize = 186; int hResolution = 1920; int vResolution = 1080; //vypocet PPI na vysku a na sirku double hPPI = hResolution/(hSize/25.4); double vPPI = vResolution/(vSize/25.4); double rPPI = hPPI/vPPI; //vypocet horizontalni roztec bodu (pitch) a velikost obrazku v milimetrech double pitch = ((double)(1) / hResolution)*hSize; double width = (200 / hPPI)* 25.4; double height = (100/vPPI)*25.4; /*vypis vsech parametru */ System.out.println("hSize [mm] = "+hSize); System.out.println("vSize [mm] = "+vSize); System.out.println("hResolution [pixels] = "+hResolution); System.out.println("vResolution [pixels] = "+vResolution); System.out.println("----------------------------"); System.out.println("hPPI = "+hPPI); System.out.println("vPPI = "+vPPI); System.out.println("rPPI = "+rPPI); System.out.println("pitch [mm] = "+pitch); System.out.println("width [mm] = "+width); System.out.println("height [mm] = "+height); }
[ "public void setPitch(int pitch);", "@Override\r\n public void setParams() {\r\n addParam(PERIOD, 10, 1200, 10, 360);\r\n addParam(ENTRY, 1, 30, 1, 12);\r\n }", "public void setPitch(double x){\n pitch = x;\n }", "float getPitch();", "public float getPitchAngle() { return PitchAngle;...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Define o valor da propriedade dsComplementoCep.
public void setDsComplementoCep(int value) { this.dsComplementoCep = value; }
[ "double setPrecioCompra(double dtopp,double prCompraEdicion,double impPortes,double impComision)\n {\n return prCompraEdicion+impPortes+impComision;\n }", "@gw.internal.gosu.parser.ExtendedProperty\n public java.math.BigDecimal getProdsCompldOpsELPOverride();", "public PaqueteComerciar getPaqueteComerci...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Try to find and set a path to EntityLiving. Returns true if successful. Args : entity, speed
public boolean tryMoveToEntityLiving(WrappedEntity entityIn, double speedIn) { return navigation.a(entityIn.getEntity(), speedIn); }
[ "public boolean tryMoveToEntityLiving(org.bukkit.entity.Entity entityIn, double speedIn) {\n\t\treturn navigation.a(((CraftEntity) entityIn).getHandle(), speedIn);\n\t}", "public void walkTo(Location loc, float speed) {\n try {\n\n Object handle = getHandle();\n\n // Set the onGround ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
stop() is used to stop event simulation
public synchronized void stop() { isStopped = true; generators.forEach(EventGenerator::stop); EventSimulatorDataHolder.getSimulatorMap().remove(uuid); if (log.isDebugEnabled()) { log.debug("Stop event simulation for uuid : " + uuid); } }
[ "private void handleStop(ActionEvent actionEvent)\n {\n simulator.stop();\n }", "public void stop() {\n setClosedLoopControl(false);\n }", "public void stop ()\n {\n stopped = true;\n\t\ttrc.info( \"signal is stopped \" + Coroutine.getTime () );\n // trc.show (\"run\", \"signal...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method increases the number of visited nodes by 1.
public void UpNumberOfVisitedNodes() { NumberOfVisitedNodes++; }
[ "public void setNumberOfVisitedNodes(int numberOfVisitedNodes) {\n NumberOfVisitedNodes = numberOfVisitedNodes;\n }", "public void markAllNodesAsUnvisited() {\r\n visitedToken++;\r\n }", "public void increaseInEdgeCount() {\n\t\tinEdgeCount++;\n\t}", "protected void incEdgeCount() {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test the connection with bad password
@Test public void testConnectionWhenBadPass() { Form form = new Form(); form.param("login", "user"); form.param("psw", "00000"); Response connect = target.path(auth).request().post(Entity.form(form)); assertEquals(530,connect.getStatus()); }
[ "public void testIncorrectPassword() {\n Password p = new Password(\"jesus\".toCharArray());\n assertFalse(p.checkPassword(\"buddha\".toCharArray()));\n }", "@Test\n public void testConnectionWhenBadUser() {\n \tForm form = new Form();\n \tform.param(\"login\", \"test\");\n \tform.par...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Adds the given item to the heap.
public void add(T item) { ensureCapacity(); array_heap[num_items + 1] = item; num_items++; bubbleUp(num_items); }
[ "public void add(int item)\n {\n if (isEmpty())\n {\n heap[1] = item;\n }\n else\n {\n int newIndex = lastIndex + 1;\n int parentIndex = newIndex / 2;\n while (parentIndex > 0 && item > heap[parentIndex])\n {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The UriDelegationPeer is used as a mechanism to pass arguments from the UriArgManager which resides in "launcher space" to our argument delegation service implementation that lives as an osgi bundle. An instance of this peer is created from within the argument delegation service impl and is registered with the UriArgManager.
public interface ArgDelegationPeer { /** * Handles <code>uriArg</code> in whatever way it finds fit. * * @param uriArg the uri argument that this delegate has to handle. */ public void handleUri(String uriArg); /** * Called when the user has tried to launch a second instance of * SIP Communicator while a first one was already running. A typical * implementation of this method would simply bring the application on * focus but it may also show an error/information message to the user * notifying them that a second instance is not to be launched. */ public void handleConcurrentInvocationRequest(); }
[ "void addPeerEndpoint(PeerEndpoint peer);", "java.lang.String getDelegatorAddress();", "protected void setPeer() {\n //--ARM-- setPeer()\n }", "public void setPeer(Peer peer);", "void addPeer(Uuid peer) throws RemoteException;", "public P2PSocketLeaseManager(PeerGroup group,PipeAdvertisement adv,Objec...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Disable the inventory menu if the user has no items. Disable the pick up item menu if there are no items to pick up.
private void setUsabilityOfMenus(World world) { inventoryMenu.setDisable(world.getInventory().size() == 0); pickupItemMenu.setDisable(world.getPickupItems().size() == 0); }
[ "private void setUsabilityOfInventoryMenuItems(World world) {\n\t\tif (!roomToDrop(world)) {\n\t\t\tfor (MenuItem itemToDisable : inventoryMenu.getItems()) {\n\t\t\t\titemToDisable.setDisable(true);\n\t\t\t}\n\t\t}\n\t}", "private void disableBoughtItems() {\n for (int i = 0; i < itemButtons.size(); i++) {...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Adds the given filter to the idAttrs edition editor.
public void addFilterToIdAttrs(ViewerFilter filter);
[ "public void addFilterToIdParams(ViewerFilter filter);", "public void addFilterToAttributes(ViewerFilter filter);", "public void addBusinessFilterToIdAttrs(ViewerFilter filter);", "public void addBusinessFilterToIdParams(ViewerFilter filter);", "public void addFilterToAnotations(ViewerFilter filter);", "p...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Download Stock data every night at 10 PM
@Scheduled(cron="0 51 22 * * *") public void downloadStockData() throws IOException { System.out.println("Downloading Stock Quotes...."); DownloadData.main(null); }
[ "public void getHistoricalData(KiteConnect kiteConnect) throws KiteException, IOException {\n SimpleDateFormat formatter = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n Date from = new Date();\n Date to = new Date();\n try {\n from = formatter.parse(\"2019-12-20 09:15:00\"...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
verify the required parameter 'remoteSignTaskWorkRequest' is set
@SuppressWarnings("rawtypes") private com.squareup.okhttp.Call signRemoteSignTaskWorkValidateBeforeCall(RemoteSignTaskWorkRequestDTO remoteSignTaskWorkRequest, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { if (remoteSignTaskWorkRequest == null) { throw new ApiException("Missing the required parameter 'remoteSignTaskWorkRequest' when calling signRemoteSignTaskWork(Async)"); } com.squareup.okhttp.Call call = signRemoteSignTaskWorkCall(remoteSignTaskWorkRequest, progressListener, progressRequestListener); return call; }
[ "@SuppressWarnings(\"rawtypes\")\n private com.squareup.okhttp.Call signRemoteSignValidateBeforeCall(RemoteSignRequestDTO remoteSignRequest, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {\n if (...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
auto generated Axis2 call back method for loadbal1 method override this method for handling normal response from loadbal1 operation
public void receiveResultloadbal1( loadbalance.LoadBalanceStub.Loadbal1Response result ) { }
[ "public void receiveResultloadBal(\n loadbalance.LoadBalanceStub.LoadBalResponse result\n ) {\n }", "public void receiveResultadd2(\n loadbalance.LoadBalanceStub.Add2Response result\n ) {\n }", "public void r...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the angle representing the hue.
private void setHueAngle(double angle) { double oldAngle = this.angle; this.angle = angle; if (angle != oldAngle) { setFlag(FLAGS_CHANGED_ANGLE, true); repaint(); } }
[ "private void setAngleFromHue(float hue) {\n\t setHueAngle((1.0 - hue) * Math.PI * 2);\n\t}", "public void setAngle(double angle);", "void setAngle(double angle);", "public void setAngle(final float angle);", "public void setIshaAngle(double angle)\n {\n double customParams[] = {-1, -1, -1, 0,...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
To verify whether the page is navigated correctly
public void verify_page() { System.out.println("page navigatedd to corresponding clicked link"); String expected_text="CONTINUOUS TESTING CLOUD"; WebElement w1=d.visibility(verify_text,20); String actual_text=w1.getText(); Assert.assertTrue(expected_text.contains(actual_text)); System.out.println("page navigated correctly"); }
[ "public abstract void verifyCurrentPage();", "public void isRedirectionCorrect() {\n\n\t\tString title = WebUtility.getTitle();\n\t\tAssert.assertEquals(title, data.getValidatingData(\"homepage_Title\"));\n\t\tSystem.out.println(\"Redirection is on the correct page\");\n\t}", "public void verifyNavigateToJoinAC...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Validate identity number and contract code of customer when verify_identity_number fail
@PostMapping(value = "/verify_identity_number_and_contract_code") public ResponseEntity<?> verifyIdentityNumberAndContractCode(@RequestBody RequestDTO<ContractSearchRequest> req) { ContractSearchRequest searchRequest = req.init(); if (HDUtil.isNullOrEmpty(searchRequest.getIdentityNumber())) return badRequest(1222, "empty identityNumber"); if (HDUtil.isNullOrEmpty(searchRequest.getContractCode())) return badRequest(1221, "empty contractCode"); VerifyResponse response = invokeContact_getPhoneNumber(searchRequest, "checkValidateForgotPasswordByIdentifyIdAndContractCode"); if (response == null) return notFound(1400); //validate customer exist Customer customer = customerService.findByUuid(response.getCustomerUuid(), -1); if (customer == null || customer.getStatus() == -1) { Log.error("customer", this.getClass().getName() + " [BAD REQUEST] verify_identity_number " + response.toString()); return badRequest(1107); } if (customer.getStatus() == HDConstant.STATUS.DISABLE) { Log.error("customer", this.getClass().getName() + " [BAD REQUEST] verify_identity_number " + response.toString()); return badRequest(1115); } writeLogAction(req, "customer", "verify identity number and contract code", searchRequest.toString(), "", "", "", ""); return ok(response); }
[ "@PostMapping(value = \"/verify_identity_number\")\n public ResponseEntity<?> verifyIdentityNumber(@RequestBody RequestDTO<ContractSearchRequest> req) {\n\n ContractSearchRequest searchRequest = req.init();\n searchRequest.setContractCode(\"\");\n if (HDUtil.isNullOrEmpty(searchRequest.getId...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the contexts that apply for this lookup
@Nonnull public ContextSet getContexts() { return this.context; }
[ "@NonNull ImmutableContextSet getContexts();", "public List<String> getContexts() {\r\n\t\treturn contexts;\r\n\t}", "public Context[] getContexts() {\r\n\t\treturn m_mapContexts.values().toArray(new Context[m_mapContexts.size()]);\r\n\t}", "public Set<Context> getContexts() {\n NodeList contexts = xbr...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Calls the method that handles the Save menu item action from the fileMenuController.
@FXML private void handleSaveAction() { this.fileMenuController.handleSaveAction(); }
[ "public void onMenuSave() {\n String lastSavedPath = controller.getLastSavePath();\n\n if (lastSavedPath == null) {\n onMenuSaveAs();\n return;\n }\n\n handleFileStorageFactoryResult(controller.saveFile(lastSavedPath));\n }", "private void handleMenuSave() {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method returns the value of the database column lt_ebay_entity_decimal.parent_value_id
public Integer getParentValueId() { return parentValueId; }
[ "public BigDecimal getParentId() {\n return (BigDecimal)getAttributeInternal(PARENTID);\n }", "public Integer getParentValueEntityAttributeId() {\r\n return parentValueEntityAttributeId;\r\n }", "public void setParentValueId(Integer parentValueId) {\r\n this.parentValueId = parentValu...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates new contact in specified group.
public SyncedContact createContact(Account account, SyncedGroup group, Contact loadedContact) throws SyncOperationException { String username = loadedContact.getUsername(); String version = loadedContact.getVersion(); String unsyncedPhotoUrl = loadedContact.getPhotoUrl(); Log.d(TAG, format("Create contact for {0} in group {1}.", username, group.getName())); ArrayList<ContentProviderOperation> batch = new ArrayList<ContentProviderOperation>(); batch.add(ContentProviderOperation.newInsert(RawContacts.CONTENT_URI) .withValue(RawContacts.ACCOUNT_NAME, account.name) .withValue(RawContacts.ACCOUNT_TYPE, account.type) .withValue(RawContacts.SYNC1, username) .withValue(RawContacts.SYNC2, version) .withValue(RawContacts.SYNC3, unsyncedPhotoUrl).build()); ContentValues name = new ContentValues(); name.put(StructuredName.GIVEN_NAME, loadedContact.getFirstName()); name.put(StructuredName.FAMILY_NAME, loadedContact.getLastName()); batch.add(doInsert(StructuredName.CONTENT_ITEM_TYPE, name)); batch.add(doInsert(Email.CONTENT_ITEM_TYPE, Email.ADDRESS, loadedContact.getMail())); /* * See issue #17: for HTC Phone.TYPE is mandatory. */ ContentValues phone = new ContentValues(); phone.put(Phone.NUMBER, loadedContact.getPhone()); phone.put(Phone.TYPE, Phone.TYPE_WORK); batch.add(doInsert(Phone.CONTENT_ITEM_TYPE, phone)); batch.add(doInsert(Organization.CONTENT_ITEM_TYPE, Organization.OFFICE_LOCATION, loadedContact.getLocation())); batch.add(doInsert(GroupMembership.CONTENT_ITEM_TYPE, GroupMembership.GROUP_ROW_ID, group.getId())); batch.add(doInsert(Photo.CONTENT_ITEM_TYPE, Photo.PHOTO, null)); try { ContentProviderResult[] results = contentResolver.applyBatch( ContactsContract.AUTHORITY, batch); long id = ContentUris.parseId(results[0].uri); Log.d(TAG, format("Contact for {0} was created.", username)); return SyncedContact .create(id, username, version, unsyncedPhotoUrl); } catch (Exception exception) { throw new SyncOperationException("Could not create contact.", exception); } }
[ "void create(Group group) throws DAOException;", "private void createContact() {\n System.out.format(\"\\033[31m%s\\033[0m%n\", \"Create Contact\");\n System.out.format(\"\\033[31m%s\\033[0m%n\", \"======\");\n InputHelper inputHelper = new InputHelper();\n String fName = inputHelper.r...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a new compressed color object. Allowed ranges for colors is 0255. Allowed range for compression is 4 or greater
public CompressedColorImpl(int red, int green, int blue, int compression) { String exeptionString = ""; if(red > RGB_MAX || red < RGB_MIN){ exeptionString = "Red: " + red + "."; } if(green > RGB_MAX || green < RGB_MIN){ exeptionString += "Green: " + green + "."; } if(blue > RGB_MAX || blue < RGB_MIN){ exeptionString += "Blue: " + blue + "."; } if(compression < 4) { exeptionString += "Compression rate: " + compression; } if(!exeptionString.equals("")){ castInputException(exeptionString); } this.compression = compression; this.red = red / this.compression; this.green = green / this.compression; this.blue = blue / this.compression; }
[ "public abstract CompressedColor createCompressedColor(int red, int green,\n\t\t\tint blue, int compression);", "private void CreateCompression() {\n double[][] Ydct = new double[8][8];\n double[][] Cbdct = new double[8][8];\n double[][] Crdct = new double[8][8];\n\n /*\n Tenemo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Checks whether the 'relatedIMEventMsg' field has been set
public boolean hasRelatedIMEventMsg() { return fieldSetFlags()[8]; }
[ "public void setRelatedIMEventMsg(gr.grnet.aquarium.message.avro.gen.IMEventMsg value) {\n this.relatedIMEventMsg = value;\n }", "public boolean is_set_msg() {\n return this.msg != null;\n }", "public gr.grnet.aquarium.message.avro.gen.IMEventMsg getRelatedIMEventMsg() {\n return relatedIMEventMsg;...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
SELECT DISTINCT(model),brand_name FROM inverter WHERE brand_id =7 AND del =0;
@Query("SELECT new Inverter(id,model,brandName,brandId) FROM Inverter WHERE brandId =:id AND del =0") List<Inverter> getInverter(@Param("id") Integer id);
[ "public List<String> getAllMobileBrand(){\n return mobileDao.getAllDistinctBrand();\n }", "@Override\n @SuppressWarnings(\"unchecked\")\n public Manufacturer getManufacturer(String brand){\n Query query = sessionFactory.getCurrentSession().createQuery(\"from Manufacturer where brand='\"+bra...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__XAssignment__Group_1_1_0_0__1" $ANTLR start "rule__XAssignment__Group_1_1_0_0__1__Impl" ../org.xtext.lwc.instances.ui/srcgen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:3545:1: rule__XAssignment__Group_1_1_0_0__1__Impl : ( ( rule__XAssignment__FeatureAssignment_1_1_0_0_1 ) ) ;
public final void rule__XAssignment__Group_1_1_0_0__1__Impl() throws RecognitionException { int stackSize = keepStackSize(); try { // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:3549:1: ( ( ( rule__XAssignment__FeatureAssignment_1_1_0_0_1 ) ) ) // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:3550:1: ( ( rule__XAssignment__FeatureAssignment_1_1_0_0_1 ) ) { // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:3550:1: ( ( rule__XAssignment__FeatureAssignment_1_1_0_0_1 ) ) // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:3551:1: ( rule__XAssignment__FeatureAssignment_1_1_0_0_1 ) { if ( state.backtracking==0 ) { before(grammarAccess.getXAssignmentAccess().getFeatureAssignment_1_1_0_0_1()); } // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:3552:1: ( rule__XAssignment__FeatureAssignment_1_1_0_0_1 ) // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:3552:2: rule__XAssignment__FeatureAssignment_1_1_0_0_1 { pushFollow(FOLLOW_rule__XAssignment__FeatureAssignment_1_1_0_0_1_in_rule__XAssignment__Group_1_1_0_0__1__Impl7455); rule__XAssignment__FeatureAssignment_1_1_0_0_1(); state._fsp--; if (state.failed) return ; } if ( state.backtracking==0 ) { after(grammarAccess.getXAssignmentAccess().getFeatureAssignment_1_1_0_0_1()); } } } } catch (RecognitionException re) { reportError(re); recover(input,re); } finally { restoreStackSize(stackSize); } return ; }
[ "public final void rule__XAssignment__Group_1_1_0_0__1() 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:3808:1: ( r...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "entryRuleWrappingDataTypeTest" $ANTLR start "ruleWrappingDataTypeTest" PsiInternalFormatterTestLanguage.g:1269:1: ruleWrappingDataTypeTest returns [Boolean current=false] : (otherlv_0= 'wrappingdt' ( (lv_datatype_1_0= ruleWrappingDataType ) ) otherlv_2= 'kw1' ) ;
public final Boolean ruleWrappingDataTypeTest() throws RecognitionException { Boolean current = false; Token otherlv_0=null; Token otherlv_2=null; Boolean lv_datatype_1_0 = null; try { // PsiInternalFormatterTestLanguage.g:1270:1: ( (otherlv_0= 'wrappingdt' ( (lv_datatype_1_0= ruleWrappingDataType ) ) otherlv_2= 'kw1' ) ) // PsiInternalFormatterTestLanguage.g:1271:2: (otherlv_0= 'wrappingdt' ( (lv_datatype_1_0= ruleWrappingDataType ) ) otherlv_2= 'kw1' ) { // PsiInternalFormatterTestLanguage.g:1271:2: (otherlv_0= 'wrappingdt' ( (lv_datatype_1_0= ruleWrappingDataType ) ) otherlv_2= 'kw1' ) // PsiInternalFormatterTestLanguage.g:1272:3: otherlv_0= 'wrappingdt' ( (lv_datatype_1_0= ruleWrappingDataType ) ) otherlv_2= 'kw1' { markLeaf(elementTypeProvider.getWrappingDataTypeTest_WrappingdtKeyword_0ElementType()); otherlv_0=(Token)match(input,40,FollowSets000.FOLLOW_6); doneLeaf(otherlv_0); // PsiInternalFormatterTestLanguage.g:1279:3: ( (lv_datatype_1_0= ruleWrappingDataType ) ) // PsiInternalFormatterTestLanguage.g:1280:4: (lv_datatype_1_0= ruleWrappingDataType ) { // PsiInternalFormatterTestLanguage.g:1280:4: (lv_datatype_1_0= ruleWrappingDataType ) // PsiInternalFormatterTestLanguage.g:1281:5: lv_datatype_1_0= ruleWrappingDataType { markComposite(elementTypeProvider.getWrappingDataTypeTest_DatatypeWrappingDataTypeParserRuleCall_1_0ElementType()); pushFollow(FollowSets000.FOLLOW_28); lv_datatype_1_0=ruleWrappingDataType(); state._fsp--; doneComposite(); if(!current) { associateWithSemanticElement(); current = true; } } } markLeaf(elementTypeProvider.getWrappingDataTypeTest_Kw1Keyword_2ElementType()); otherlv_2=(Token)match(input,38,FollowSets000.FOLLOW_2); doneLeaf(otherlv_2); } } } catch (RecognitionException re) { reportError(re); recover(input,re); } finally { } return current; }
[ "public final Boolean entryRuleWrappingDataTypeTest() throws RecognitionException {\n Boolean current = false;\n\n Boolean iv_ruleWrappingDataTypeTest = null;\n\n\n try {\n // PsiInternalFormatterTestLanguage.g:1262:62: (iv_ruleWrappingDataTypeTest= ruleWrappingDataTypeTest EOF )\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The test sends a get all networks (GET) request, the JSON response having a key and name for each network in the list.
@Test public void testGetNetworksJSON() throws Exception { // persist two new networks Network network1 = testDataFactory.newPersistedNetwork(); assertNotNull(network1.getKey()); Network network2 = testDataFactory.newPersistedNetwork(); assertNotNull(network2.getKey()); // construct request uri String uri = "/registry/network.json"; // send GET request with no credentials ResultActions actions = requestTestFixture.getRequest(uri).andExpect(status().is2xxSuccessful()); // JSON array expected, with single entry List<Network> response = requestTestFixture.extractJsonResponse(actions, new TypeReference<List<Network>>() {}); assertEquals(2, response.size()); assertNotNull(response.get(0).getKey()); assertNull(response.get(0).getTitle()); assertNotNull(response.get(1).getKey()); assertNull(response.get(1).getTitle()); }
[ "@Override\n @GET\n @Path(\"/networks\")\n @Produces(\"application/json\")\n public Response getNetworks() {\n String json = String.format(\"Provider %d cluster %d networks.\", provider.getProviderId(), cluster.getClusterId());\n return Response.ok(json).build();\n }", "@GET\n @Con...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
&x60;nonResourceURLs&x60; is a set of url prefixes that a user should have access to and may not be empty. For example: \"/healthz\" is legal \"/hea\" is illegal \"/hea\" is legal but matches nothing \"/hea/_\" also matches nothing \"/healthz/_\" matches all percomponent health checks. \"\" matches all nonresource urls. if it is present, it must be the only entry. Required.
@JsonProperty("nonResourceURLs") @NotNull public List<String> getNonResourceURLs() { return nonResourceURLs; }
[ "@Test\n public void testRemainingResourceStringValid() {\n Matcher mtch = filter.getMatcher(FULL_URI);\n\n filter.isResourceAccess(mtch);\n\n assertEquals(\"resource string differs\", REMAINING_RES_STRING, filter.getRootResourceString(mtch));\n }", "public int getNonResourceUrlsCount()...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
if at results update panel, check for selection and go to update panel
@Override public void actionPerformed(ActionEvent event){ if (state == State.RESULTS){ if (resultsTable.getSelectedRow() > -1){ selectedId = (int) tableModel.getValueAt(resultsTable.getSelectedRow(), 0); selectedMediaType = (String) tableModel.getValueAt(resultsTable.getSelectedRow(), 1); String updatedTitle = (String) tableModel.getValueAt(resultsTable.getSelectedRow(), 2); String updatedArtist = (String) tableModel.getValueAt(resultsTable.getSelectedRow(), 3); updateTitleField.setText(updatedTitle); updateArtistField.setText(updatedArtist); hideAllComponents(); updateButton.setVisible(true); cancelButton.setVisible(true); updatePanel.setVisible(true); state = State.UPDATE; } else { resultsMessage.setText(" Please select an item to update."); } } // if at update panel, send UPDATE request to controller else { System.out.println("update button pressed"); currentCommand = getUpdateInfo(); controller.requestModelUpdate(currentCommand); } }
[ "@Override\r\n\tpublic void resultsUpdated() {\r\n\t\tmLayout.hideText();\r\n\t\t\r\n\t\tif(mModel.getResults().size() == 1){\r\n\t\t\tmModel.selectPerson(mModel.getResults().get(0));\r\n\t\t\tmController.getProfilePicture(mModel.getResults().get(0).sciper);\r\n\t\t\tmDialog = new PersonDetailsDialog(this, mModel.g...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Return our SyncAdapter's IBinder
@Nullable @Override public IBinder onBind(Intent intent) { return syncAdapter.getSyncAdapterBinder(); }
[ "Binding getBinding();", "@Override\n public IBinder onBind(Intent intent) {\n return mAuthenticator.getIBinder();\n }", "private IBinder getNvRAMAgentIBinder() {\n Class<?> clazz = null;\n try {\n clazz = Class.forName(\"android.os.ServiceManager\");\n } catch (Clas...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Finds the objectives that the given user needs to assess.
List<Objective> findAssessorsObjectives(Long userId) throws TalentStudioException;
[ "Receptionist findReceptionistByUser(User user);", "List<Election> searchActiveWithUser(long date, User user);", "private int getRewardPoints(Attraction attraction, User user) {\r\n\t\treturn rewardsCentral.getAttractionRewardPoints(attraction.attractionId, user.getUserId());\r\n\t}", "Set<Authority> getAutho...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Cycles through all the PWM inputs between the ranges of start and stops. Start and stop values can be between 000 and 999 but only values up to 255 will work.
public void cyclePWMInputs(String firstThreeBytes, int start, int stop) throws IOException{ System.out.println("PWM Cycle Test Active: "); System.out.println("Starting PWM = " + start + " Ending PWM = " + stop); System.out.println("Cycling through PWM values..."); for(int x=start;x<=stop;x++){ System.out.println("Desired Speed is" + x); this.sendControlWord(firstThreeBytes,x); } }
[ "public static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\n System.out.println(\"ENTER STARTING SPEED AND ENDING SPEED\");\n\n\n int start = scan.nextInt();\n int end = scan.nextInt();\n\n\n for (int i = start; i <= end; ++i) {\n System.out.prin...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Builds the header necessary for the tenant ID.
private Map<String, String> getTenantHeader(String tenantId) { if (tenantId == null) { throw new IllegalArgumentException("tenantId must not be null"); } return Collections.singletonMap("Hawkular-Tenant", tenantId); }
[ "private Map<String, String> buildHeaders() {\n Map<String, String> headers = new HashMap<String, String>();\n headers.put(\"User-Agent\", \"Tinder/6.9.1 (iPhone; iOS 10.2; Scale/2.00)\");\n headers.put(\"X-Auth-Token\", token);\n headers.put(\"Host\", \"api.gotinder.com\");\n hea...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a new index with a name articles[timestamp] and creates an Alias with the name articles. The index is created with a shard and no replicas.
public void createIndex() { String indexName = INDEX_BASE + "-" + LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyyMMddHHmmss")); Settings settings = Settings.builder() .put("number_of_shards", 1) .put("number_of_replicas", 0) .build(); CreateIndexRequest request = new CreateIndexRequest(indexName, settings); String mapping = "{\n" + " \"article\": {\n" + " \"properties\": {\n" + " \"title\": {\n" + " \"type\": \"text\"\n" + " },\n" + " \"author\": {\n" + " \"type\": \"keyword\"\n" + " },\n" + " \"issue\": {\n" + " \"type\": \"keyword\"\n" + " },\n" + " \"link\": {\n" + " \"type\": \"keyword\"\n" + " },\n" + " \"description\": {\n" + " \"type\": \"text\"\n" + " },\n" + " \"postDate\": {\n" + " \"type\": \"date\",\n" + " \"format\": \"yyyy-MM-dd\"\n" + " }\n" + " }\n" + " }\n" + " }"; request.mapping("article", mapping, XContentType.JSON); request.alias(new Alias(INDEX_BASE)); try { CreateIndexResponse createIndexResponse = this.client.admin().indices().create(request).get(); if (!createIndexResponse.isAcknowledged()) { throw new ElasticExecutionException("Create java_magazine index was not acknowledged"); } } catch (InterruptedException | ExecutionException e) { logger.error("Error while creating an index", e); throw new ElasticExecutionException("Error when trying to create an index"); } }
[ "@Test\n public void creatIndex() {\n\n boolean flag = elasticsearchTemplate.createIndex(CoursePub.class);\n System.out.println(\"flag = \" + flag);\n\n flag = elasticsearchTemplate.putMapping(CoursePub.class);\n System.out.println(\"flag = \" + flag);\n }", "private void indexAr...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Here, we return the absolute distance between the two vectors.
public double getAbsoluteDistance( ArrayList< Double > a, ArrayList< Double > b ) { double dist = -1.0; if( a.size() == b.size() ) { dist = 0; for( int k=0; k<a.size(); k++ ) { dist += Math.abs( a.get( k ) - b.get( k ) ); } } return dist; }
[ "public static double calculateDistance(List<Double> vector1, List<Double> vector2) {\n double distance = 0;\n for (int i = 0; i < vector1.size(); i++) {\n distance += Math.abs(vector2.get(i) - vector1.get(i));\n }\n return distance;\n }", "public static doubl...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates scroll panel with templates tree in it.
private JScrollPane createTreeScrollPanel() { for (Map.Entry<VirtualFile, VcsRoot> entry : files.entrySet()) { createDirectoryNodes(entry.getKey(), entry.getValue()); } final FileTreeRenderer renderer = new FileTreeRenderer(); tree = new CheckboxTree(renderer, root); tree.setCellRenderer(renderer); tree.setRootVisible(true); tree.setShowsRootHandles(false); UIUtil.setLineStyleAngled(tree); TreeUtil.installActions(tree); final JScrollPane scrollPane = ScrollPaneFactory.createScrollPane(tree); scrollPane.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED); TreeUtil.expandAll(tree); tree.getModel().addTreeModelListener(treeModelListener); treeExpander = new DefaultTreeExpander(tree); return scrollPane; }
[ "private void createScrollPanel() {\n if(!ScreenHelper.supportsTouch()) {\n scrollPanel = new FlowPanel();\n scrollPanel.setStyleName(\"scroll-data\");\n \n SimplePanel up = new SimplePanel();\n up.setStyleName(\"scroll-data-image\");\n up.set...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns (given a boolean) a html string containing available or not available
protected String booleanToString(boolean b) { if (b) return FONT_TEXT_GOOD + "available" + "</font>"; else return FONT_TEXT_BAD + "not available" + "</font>"; }
[ "boolean getHtml();", "boolean hasDeviceAvailabilityDescriptionHtml();", "boolean hasErrorHtml();", "boolean hasDescriptionHtml();", "private static String htmlInputTruthValue(boolean b) {\n return b ? \"true\" : \"false\"; \n }", "public static boolean elementAvailiable(String s) { // Check if page c...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Constructs SelectOptions when passed with an object list of EachOption.
public SelectOptions(String initialValue, List<EachOption> optionList) { this._initialValue = initialValue; if (CollectionUtils.isNotEmpty(optionList)) { this._eachOptionArray = optionList.toArray(new EachOption[optionList.size()]); } }
[ "public SelectOptions(String initialValue, EachOption[] optionArray)\n {\n this._initialValue = initialValue;\n this._eachOptionArray = optionArray;\n }", "private Options createOptions() {\n Options opts = new Options();\n\n for (ICLICommandProcessorFactory factory : this.factoryMap.v...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__XArtifactType__Group__1__Impl" $ANTLR start "rule__XArtifactType__Group__2" ../org.eclipse.osee.framework.core.dsl.ui/srcgen/org/eclipse/osee/framework/core/dsl/ui/contentassist/antlr/internal/InternalOseeDsl.g:2320:1: rule__XArtifactType__Group__2 : rule__XArtifactType__Group__2__Impl rule__XArtifactType__Group__3 ;
public final void rule__XArtifactType__Group__2() 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:2324:1: ( rule__XArtifactType__Group__2__Impl rule__XArtifactType__Group__3 ) // ../org.eclipse.osee.framework.core.dsl.ui/src-gen/org/eclipse/osee/framework/core/dsl/ui/contentassist/antlr/internal/InternalOseeDsl.g:2325:2: rule__XArtifactType__Group__2__Impl rule__XArtifactType__Group__3 { pushFollow(FOLLOW_rule__XArtifactType__Group__2__Impl_in_rule__XArtifactType__Group__24997); rule__XArtifactType__Group__2__Impl(); state._fsp--; pushFollow(FOLLOW_rule__XArtifactType__Group__3_in_rule__XArtifactType__Group__25000); rule__XArtifactType__Group__3(); state._fsp--; } } catch (RecognitionException re) { reportError(re); recover(input,re); } finally { restoreStackSize(stackSize); } return ; }
[ "public final void rule__XArtifactType__Group__1() 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/InternalOseeDsl.g:2293:1...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__SimpleWait__Group_3__0__Impl" $ANTLR start "rule__SimpleWait__Group_3__1" InternalDroneScript.g:4037:1: rule__SimpleWait__Group_3__1 : rule__SimpleWait__Group_3__1__Impl ;
public final void rule__SimpleWait__Group_3__1() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalDroneScript.g:4041:1: ( rule__SimpleWait__Group_3__1__Impl ) // InternalDroneScript.g:4042:2: rule__SimpleWait__Group_3__1__Impl { pushFollow(FOLLOW_2); rule__SimpleWait__Group_3__1__Impl(); state._fsp--; if (state.failed) return ; } } catch (RecognitionException re) { reportError(re); recover(input,re); } finally { restoreStackSize(stackSize); } return ; }
[ "public final void rule__SimpleWait__Group__3() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalDroneScript.g:3987:1: ( rule__SimpleWait__Group__3__Impl )\r\n // InternalDroneScript.g:3988:2: rule__SimpleWait__Grou...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
searching Mobile by multiple networkType
public List<Mobile> getAllMobilesByMobileNetworkType(String networkType){ return dao.getAllMobilesBymobileNetworkType(networkType); }
[ "@Test\n public void testSearch() throws Exception {\n System.out.println(\"***** search ******\");\n NetworkSearchSignalingPredicate predicate = new NetworkSearchSignalingPredicate();\n predicate.setDeviceType(DeviceType.Sensor);\n\n List result = instance.search(predicate);\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method returns the value of the database column uc_member.show_flag
public Byte getShowFlag() { return showFlag; }
[ "public String getShowFlag() {\r\n return (String) getAttributeInternal(SHOWFLAG);\r\n }", "public String getDisplayFlag() {\n return displayFlag;\n }", "public Boolean getShowColumn() {\n return this.showColumn;\n }", "public String getMemberStatus(){\n return this.member...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Getter method for the COM property "InstancesFailed"
@DISPID(48) // = 0x30. The runtime will prefer the VTID if present @VTID(46) int instancesFailed();
[ "public Integer failedInstanceCount() {\n return this.failedInstanceCount;\n }", "@gw.internal.gosu.parser.ExtendedProperty\n public java.lang.Integer getWorkitemsFailed() {\n return (java.lang.Integer)__getInternalInterface().getFieldValue(WORKITEMSFAILED_PROP.get());\n }", "@gw.internal.gosu.pa...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the sessionProperty of a given key , null if the key is not defined..
public void setSessionProperty(String key, Object value) { _sessionPropertyList.put(key, value); }
[ "public static void setObjectInSession(String key, Object object) {\r\n\t\tgetSession().setAttribute(key, object);\r\n\t}", "public void setSessionPrivateObject(Object key, Object o);", "public void setSessionKey(String sessionKey) {\n this.sessionKey = sessionKey == null ? null : sessionKey.trim();\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Verify that server side renderers are defined as local.
public void testIsLocal() throws Exception { JavaRendererDef.Builder builder = new JavaRendererDef.Builder().setRendererClass(TestSimpleRenderer.class); JavaRendererDef def = builder.build(); assertTrue("Server side renderers should be defined as Local", def.isLocal()); }
[ "public boolean hasRenderers()\r\n {\r\n return !_renderers.isEmpty();\r\n }", "boolean hasStaticRendering();", "public boolean IsLocal() {\r\n\t\treturn BrickFinder.getDefault().isLocal();\r\n\t}", "public static boolean checkForRender() {\n\t\tif (isDisabled || FlawlessFrames.isActive()) return true;\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a planet with a radius, orbitRadius, tilt, texture and a number of moons
public void createPlanet(float radius, float orbitRadius, float axisTilt, Texture texture, List<Moon> moons, float speed){ Planet planet = new Planet(radius,orbitRadius, axisTilt, speed); planet.setTexture(texture); for(Moon moon : moons) moon.setCenter(planet); planet.addMoons(moons); planets.add(planet); }
[ "public void createPlanet(float radius, float orbitRadius, float axisTilt, Texture texture, List<Moon> moons,List<Float []> ringsSpecs, List<Float [] > ringsColors, float speed){\n\t\tPlanet planet = new Planet(radius,orbitRadius, axisTilt, ringsSpecs,ringsColors, speed);\n\t\tplanet.setTexture(texture);\n\n\t\tfor...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
7 number of customers in each country, ordered DESC
public ArrayList<CustomerCountry> getCountryByCustomerCount(){ ArrayList<CustomerCountry> customerCountry = new ArrayList<>(); try{ // try and connect conn = DriverManager.getConnection(URL); // make sql query // (https://stackoverflow.com/questions/39565394/how-to-rename-result-set-of-count-in-sql) PreparedStatement preparedStatement = conn.prepareStatement("SELECT Country, COUNT(*) as numcustomers FROM Customer GROUP BY Country ORDER BY numcustomers DESC"); // execute query ResultSet set = preparedStatement.executeQuery(); while(set.next()){ customerCountry.add(new CustomerCountry(set.getString("Country"), set.getString("numcustomers"))); } } catch(Exception exception){ System.out.println(exception.toString()); } finally{ try{ conn.close(); } catch (Exception exception){ System.out.println(exception.toString()); } } return customerCountry; }
[ "int getCountriesCount();", "public void streamPipeline7() {\n countries.stream().sorted(new Comparator<Country>() {\n @Override\n public int compare(Country o1, Country o2) {\n return Long.compare(o1.getTimezones().size(), o2.getTimezones().size());\n }\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the value of the 'IMPLEMENT_FX' field.
public void setIMPLEMENTFX(java.lang.CharSequence value) { this.IMPLEMENT_FX = value; }
[ "public org.LNDCDC_NCS_NCSAR.NCSAR_BUSINESS_UNITS.apache.nifi.LNDCDC_NCS_NCSAR_NCSAR_BUSINESS_UNITS.Builder setIMPLEMENTFX(java.lang.CharSequence value) {\n validate(fields()[3], value);\n this.IMPLEMENT_FX = value;\n fieldSetFlags()[3] = true;\n return this;\n }", "public java.lang.CharSeq...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ This method builds key map. The keyMap holds key if any for an element for comparison puprose If no key is mapped then that element has no key to comapre Usually if there are multiple elements () then key is needed for comparison. If there are ? (1 or zero) or mandatory element then key is not needed.
private void buildKeyMapping(){ if(keyMap == null){ keyMap = new HashMap(); } // all resources keyMap.put("custom-resource", "jndi-name"); keyMap.put("jdbc-resource","jndi-name"); keyMap.put("external-jndi-resource", "jndi-name"); keyMap.put("jdbc-connection-pool", "name"); keyMap.put("mail-resource", "jndi-name"); keyMap.put("persistence-manager-factory-resource", "jndi-name"); keyMap.put("jms-resource", "jndi-name"); keyMap.put("admin-object-resource", "jndi-name"); keyMap.put("connector-resource", "jndi-name"); keyMap.put("resource-adapter-config", "name"); keyMap.put("connector-connection-pool", "name"); keyMap.put("jms-host", "name"); keyMap.put("server-instance", "name"); keyMap.put("jmx-connector", "name"); keyMap.put("iiop-listener", "id"); keyMap.put("config", "name"); keyMap.put("thread-pool","thread-pool-id"); keyMap.put("cluster","name"); keyMap.put("server-ref","ref"); keyMap.put("resource-ref","ref"); keyMap.put("application-ref","ref"); keyMap.put("jacc-provider","name"); keyMap.put("audit-module","name"); keyMap.put("message-security-config","auth-layer"); keyMap.put("provider-config","provider-id"); // Added for AS9 upgrade. keyMap.put("node-agent","name"); keyMap.put("lb-config","name"); keyMap.put("cluster-ref","ref"); keyMap.put("alert-subscription","name"); keyMap.put("listener-config","listener-class-name"); keyMap.put("filter-config","filter-class-name"); keyMap.put("security-map","name"); keyMap.put("load-balancer","name"); keyMap.put("management-rule","name"); keyMap.put("system-property","name"); }
[ "private void buildKeyMap() {\n\t\tcharMapKey = new HashMap<Character , Integer>();\n\t\tcharMapKey.put('a', 0);\n\t\tcharMapKey.put('b', 0);\n\t\tcharMapKey.put('c', 1);\n\t\tcharMapKey.put('d', 1);\n\t\tcharMapKey.put('e', 2);\n\t\tcharMapKey.put('f', 2);\n\t\tcharMapKey.put('g', 3);\n\t\tcharMapKey.put('h', 3);\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Method to set the item details to be used in the current controller GUI
public void setDetails(String itemDetails) { this.itemDetails = itemDetails; }
[ "public void handleGetItemDetailsButtonAction(ActionEvent event) {\n String itemID = updateItemItemID.getText();\n try{\n //get the details from mgr\n HashMap itemInfo = updateMgr.getItemInfo(itemID);\n //display on the fields\n updateItemTitle.setText((Stri...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the value of the prepayment property.
public void setPrepayment(boolean value) { this.prepayment = value; }
[ "public void setPrepayment_option(int prepayment_option) {\n this.prepayment_option = prepayment_option;\n }", "public void setPrepayment_req(int prepayment_req) {\n this.prepayment_req = prepayment_req;\n }", "public void setPrepayCode(String prepayCode) {\r\n this.prepayCode = prepa...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
get the duration of the song
public long getDuration() { return mediaPlayerComponent.mediaPlayer().media().info().duration(); }
[ "public double getMusicDuration() {\n if (music == null) {\n return -1;\n }\n \n return music.getDuration();\n }", "public String getSongDuration() {\n return mSongDuration;\n }", "public String getmSongDuration() {\n return mSongDuration;\n }", "pub...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Builds a frequency matrix containing a terms vector for each cluster, sum of tweets terms vector contained by the current cluster
private static HashMap<Integer, HashMap<String, Long>> getClustersFrequencyMatrix(HashMap<Integer, List<String>> clustering, HashMap<String, HashMap<String, Long>> tweetsFrequencyMatrix) { System.out.println("Building cluster frequency matrix..."); HashMap<Integer, HashMap<String, Long>> clusterFrequencyMatrix = new HashMap<Integer, HashMap<String, Long>>(); Long occurrences; //Browsing each cluster for(Integer clusterId : clustering.keySet()) { HashMap<String, Long> clusterTermsVector = new HashMap<String, Long>(); //Browsing each tweet in the cluster for(String tweetId : tweetsFrequencyMatrix.keySet()) { //Adding the tweet terms vector to the cluster one HashMap<String, Long> tweetsTermVector = tweetsFrequencyMatrix.get(tweetId); //Browsing the terms of the current tweets for(String term : tweetsTermVector.keySet()) { //Adding the term occurrences to the clusters frequency matrix occurrences = clusterTermsVector.get(term); if(occurrences == null) { clusterTermsVector.put(term, tweetsTermVector.get(term)); } else { clusterTermsVector.put(term, occurrences + tweetsTermVector.get(term)); } } } clusterFrequencyMatrix.put(clusterId, clusterTermsVector); } System.out.println("Done"); return clusterFrequencyMatrix; }
[ "private void createTermFreqVector(JCas jcas, Document doc) {\n\n\t\tString docText = doc.getText();\n\t\tList<String> tokenized = tokenize0(docText); //Given Tokenizer T0\n\t\t//List<String> tokenized = MyTokenizerAux(docText); // T0 A1\n\t//List<String> tokenized = MyTokenizerAux2(docText); // T0 A2\n\t\t//List<S...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the value of the Subline field.
public void setSubline(java.lang.String value);
[ "public void setSUB_LINE_NO(BigDecimal SUB_LINE_NO) {\r\n this.SUB_LINE_NO = SUB_LINE_NO;\r\n }", "public void setSublines(entity.GL7Subline[] value);", "public void setSublineCd(String sublineCd) {\n\t\tthis.sublineCd = sublineCd;\n\t}", "public void setSub(Long sub) {\r\n this.sub = sub;\r\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Setter for property idxSearchSort.
public void setIdxSearchSort(String idxSearchSort) { Preferences prefs = getPreferences(); prefs.put(PROP_SEARCH_SORT, idxSearchSort); }
[ "public String getIdxSearchSort() {\n Preferences prefs = getPreferences();\n return prefs.get(PROP_SEARCH_SORT, \"A\"); // NOI18N\n }", "public void setSortIndex(Integer sortIndex) {\r\n this.sortIndex = sortIndex;\r\n }", "public void setSortindex(Integer sortindex) {\n this....
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
"Add" a copy of the map to the dependencies
synchronized void addDependencies(Map<String, Set<String>> map) { Map<String, Set<String>> newMap = new HashMap<String, Set<String>>(); for (String name : map.keySet()){ newMap.put(name, map.get(name)); } dependencies.putAll(map); checkRep(); }
[ "private DependencyManager(Map<TypedKey<?>, Object> inputs)\n\t{\n\t\tmap.putAll(inputs);\n\t}", "public void add(AssetMap assetMap) {\n for(String key: assetMap.keySet()){\n add(key, assetMap.get(key));\n }\n }", "public void addLanguageMap (LanguageMap langMap) {\r\n \t\tlangMa...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
delete not needed for this assinment so not added Method to find a particular item in the tree. Calls the private find method to recursively find a node containing the data.
public BTNode<T> find ( T data ){ //reset the find count findCount = 0; if (root == null) return null; else return find (data, root); }
[ "TreeItem<Node> findItem(Node node);", "private BinaryTreeNode findNode(T item) {\n\t\tif (item.equals(root.data)) {\n\t\t\treturn root;\n\t\t}\n\n\t\telse return findNodeRecursive(item, root);\n\t}", "public E find(E item){\n\t\tE found = find(item, root);\n\t\treturn found;\n\t}", "Node find(E data){\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__Atomic__Group_3__0__Impl" $ANTLR start "rule__Atomic__Group_3__1" InternalTym.g:3364:1: rule__Atomic__Group_3__1 : rule__Atomic__Group_3__1__Impl ;
public final void rule__Atomic__Group_3__1() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalTym.g:3368:1: ( rule__Atomic__Group_3__1__Impl ) // InternalTym.g:3369:2: rule__Atomic__Group_3__1__Impl { pushFollow(FOLLOW_2); rule__Atomic__Group_3__1__Impl(); state._fsp--; if (state.failed) return ; } } catch (RecognitionException re) { reportError(re); recover(input,re); } finally { restoreStackSize(stackSize); } return ; }
[ "public final void rule__Atomic__Group_3__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalDsl.g:33324:1: ( rule__Atomic__Group_3__1__Impl )\n // InternalDsl.g:33325:2: rule__Atomic__Group_3__1__Impl\n {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
getAverageFitness: This takes in the chromosome and calculates the average fitness of all the chromosomes as an int
private int getAverageFitness(ArrayList<ArrayList<Integer>> chromosomeSet) { int sumOfFitness = 0; int averageFitness; for (int j = 0; j < chromosomeSet.size(); j++) { sumOfFitness += getChromosomeFitness(chromosomeSet.get(j)); } averageFitness = sumOfFitness / chromosomeSet.size(); this.averageFitness = averageFitness; return averageFitness; }
[ "double getAverageFitness() {\n return getTotalFitness()/population.length;\n }", "public double getAvgPopulationFitness() {\n\t\tdouble sum=0;\n\t\tfor (int i = 0; i < individuals.length; i++) {\n\t\t\tsum+=individuals[i].getFitness();\n\t\t}\n\t\treturn sum/(double)individuals.length;\n\t}", "double...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns a new object of class 'Generic Trigger'.
GenericTrigger createGenericTrigger();
[ "Trigger createTrigger();", "SimpleTrigger createSimpleTrigger();", "LOTrigger createLOTrigger();", "TriggerType createTriggerType();", "@Nonnull\n public static JDK8TriggerBuilder <ITrigger> newTrigger ()\n {\n return new JDK8TriggerBuilder <> ();\n }", "protected abstract Trigger createEventPayloa...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the current tail id
protected long getTail() { Object obj = couch.get(tail_key); if (obj != null) { return Long.parseLong(obj.toString()); } return 0; }
[ "public int getTailId() {\n\t\treturn tailId;\n\t}", "public int getTail() {\r\n\t\treturn tail;\r\n\t}", "java.lang.String getHeadId();", "public int getCurrentServerId() {\n return currentServerId;\n }", "protected long findTailLogID(long aHeadLogID)\r\n {\r\n // reverse the list to start...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the list of attributes exposed by the mbean having the supplied URN.
private List<String> getAttributes(ModuleURN inURN) throws Exception { MBeanInfo beanInfo = getMBeanServer().getMBeanInfo(inURN.toObjectName()); List<String> attribs = new ArrayList<String>(); for(MBeanAttributeInfo info: beanInfo.getAttributes()) { attribs.add(info.getName()); } return attribs; }
[ "public List<IRobotAttribute> getAttributes();", "public List<NitobiAttribute> getComponentAttributes();", "java.util.List<bosphorus2.Aomgen.CATTRIBUTE> \n getAttributesList();", "java.util.List<com.google.ads.googleads.v13.resources.FeedAttribute> \n getAttributesList();", "java.util.List<tende...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Read some URL resource in as a UTF8 encoded string.
protected String readResource(URL url) { InputStreamReader reader = null; try { reader = new InputStreamReader(url.openStream(), "UTF-8"); final StringWriter writer = new StringWriter(); char[] buf = new char[1024]; for (int r; (r = reader.read(buf)) != -1; ) writer.write(buf, 0, r); return writer.toString(); } catch (IOException e) { throw new RuntimeException("error reading from " + url, e); } finally { if (reader != null) { try { reader.close(); } catch (IOException e) { // ignore } } } }
[ "public static String readUtf8Url(URL url) {\n try (InputStream is = url.openStream()) {\n return toUtf8String(is);\n } catch (IOException e) {\n throw new UncheckedIOException(e);\n }\n }", "private String readString(String urlString) throws MalformedURLException, IO...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
utility routine used to return screen z coordinate given world coordinates.
public float getScreenZ(float[] v) { double[] screenXYZ = new double[3]; glu.gluProject(v[0], v[1], v[2], modelViewMatrix, 0, projectionMatrix, 0, viewPort, 0, screenXYZ, 0); return (float)screenXYZ[0]; }
[ "Vector3f getScreenCoordinates( Vector3f worldPosition );", "public double getZProjection(double x, double y, double z){ \n double wz=P[2]*x+P[6]*y+P[10]*z+P[14];\n double winz=0.5*(wz+1);\n return winz;\n }", "Vector3f getScreenCoordinates( Vector3f worldPosition, Vector3f store ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
If true, the uploaded package will overwrite any others with the same attributes (e.g. same version); otherwise, it will be flagged as a duplicate.
@ApiModelProperty(value = "If true, the uploaded package will overwrite any others with the same attributes (e.g. same version); otherwise, it will be flagged as a duplicate.") public Boolean getRepublish() { return republish; }
[ "public abstract boolean keepOldAttributes();", "private boolean newFileIsNotAlreadyAFile(String newFile) {\n boolean result = true;\n File fileToCopy = new File(newFile);\n if(fileToCopy.exists()) {\n if (!overwriteConfirm()) {\n System.out.println(\"Denied overwrite.\");\n resu...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the user role assignment for that role If there's no assignment for that role, returns null. If there is more than one assignment for that role, then the first role will be returned. Note: getUserRoleAssignmentsByRole(UserRole) should be called if multiple assignments are expected to return.
public entity.PolicyUserRoleAssignment getUserRoleAssignmentByRole(typekey.UserRole role) { return ((com.guidewire.pc.domain.policy.PolicyPublicMethods)__getDelegateManager().getImplementation("com.guidewire.pc.domain.policy.PolicyPublicMethods")).getUserRoleAssignmentByRole(role); }
[ "public entity.PolicyUserRoleAssignment getUserRoleAssignmentByRole(typekey.UserRole role) {\n return ((com.guidewire.pc.domain.policy.PolicyPublicMethods)__getDelegateManager().getImplementation(\"com.guidewire.pc.domain.policy.PolicyPublicMethods\")).getUserRoleAssignmentByRole(role);\n }", "public enti...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method sets the value of the database column TRS_SYN_SETLMT_ACC.MT200_SWIFT_MESSAGE1
public void setMT200_SWIFT_MESSAGE1(String MT200_SWIFT_MESSAGE1) { this.MT200_SWIFT_MESSAGE1 = MT200_SWIFT_MESSAGE1 == null ? null : MT200_SWIFT_MESSAGE1.trim(); }
[ "public String getMT200_SWIFT_MESSAGE1() {\r\n return MT200_SWIFT_MESSAGE1;\r\n }", "public void setMessage3 (String Message3);", "public void setMessage2 (String Message2);", "public void setMT200_SWIFT_MESSAGE2(String MT200_SWIFT_MESSAGE2) {\r\n this.MT200_SWIFT_MESSAGE2 = MT200_SWIFT_MESSA...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
ExStart ExFor:FieldFormula ExSummary:Shows how to use the formula field to display the result of an equation.
@Test public void fieldFormula() throws Exception { Document doc = new Document(); // Use a field builder to construct a mathematical equation, // then create a formula field to display the equation's result in the document. FieldBuilder fieldBuilder = new FieldBuilder(FieldType.FIELD_FORMULA); fieldBuilder.addArgument(2); fieldBuilder.addArgument("*"); fieldBuilder.addArgument(5); FieldFormula field = (FieldFormula) fieldBuilder.buildAndInsert(doc.getFirstSection().getBody().getFirstParagraph()); field.update(); Assert.assertEquals(field.getFieldCode(), " = 2 * 5 "); Assert.assertEquals(field.getResult(), "10"); doc.updateFields(); doc.save(getArtifactsDir() + "Field.FORMULA.docx"); //ExEnd doc = new Document(getArtifactsDir() + "Field.FORMULA.docx"); TestUtil.verifyField(FieldType.FIELD_FORMULA, " = 2 * 5 ", "10", doc.getRange().getFields().get(0)); }
[ "public String getFormula();", "@DISPID(261)\n @PropGet\n java.lang.String getFormula();", "public String getFormula() {\r\n return formula;\r\n }", "public Expression getFormula() {\n\t\treturn expression;\n\t}", "public java.lang.String getFormula() {\r\n return formula;\r\n }", "@...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the number of pixels that the document's content is scrolled from the top.
@Override public final void setScrollTop(int top) { DOMImpl.impl.setScrollTop(documentFor(), top); }
[ "void setScrollTop(int scrollTop);", "public void scrollToTop () {\n\t\t// Update the scroll panel\n\t\tthis.update ();\n\t\t// Scroll to the top of the panel, based on the content panel height\n\t\tthis.verticalScrollBar.setValue ( 0 );\n\t}", "private void scrollToTopOfPage() {\r\n JavaScriptRunner.run...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the resyncTotalTransferredBytes property: The resync total transferred bytes.
public Long resyncTotalTransferredBytes() { return this.resyncTotalTransferredBytes; }
[ "public String getTransferredBytes() {\n return String.format(\"Transferred Bytes: %d\", transferredBytes);\n }", "public Long resyncProcessedBytes() {\n return this.resyncProcessedBytes;\n }", "public int getTotalBytesRead() {\r\n return this.totalBytesRead;\r\n }", "public long...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "ruleLanguage" $ANTLR start "entryRuleAction" InternalCsv.g:104:1: entryRuleAction : ruleAction EOF ;
public final void entryRuleAction() throws RecognitionException { try { // InternalCsv.g:105:1: ( ruleAction EOF ) // InternalCsv.g:106:1: ruleAction EOF { if ( state.backtracking==0 ) { before(grammarAccess.getActionRule()); } pushFollow(FOLLOW_1); ruleAction(); state._fsp--; if (state.failed) return ; if ( state.backtracking==0 ) { after(grammarAccess.getActionRule()); } match(input,EOF,FOLLOW_2); if (state.failed) return ; } } catch (RecognitionException re) { reportError(re); recover(input,re); } finally { } return ; }
[ "public final void entryRuleAction() throws RecognitionException {\n try {\n // ../esir.lsi.imtql.ui/src-gen/robot/ui/contentassist/antlr/internal/InternalDsl.g:235:1: ( ruleAction EOF )\n // ../esir.lsi.imtql.ui/src-gen/robot/ui/contentassist/antlr/internal/InternalDsl.g:236:1: ruleAct...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set the domain of this voice.
protected void setDomain(String domain) { this.domain = domain; }
[ "public void setDomain(String domain)\n {\n _domain = domain;\n }", "public static synchronized void setDomain(String domain) {\n TargetingParams.domain = domain;\n }", "public void setDomain(String domain) {\r\n if (!domain.startsWith(\".\")) {\r\n int dot = domain.inde...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the value of the GetCompetitivePricingForSKUResult property.
public GetCompetitivePricingForSKUResponse withGetCompetitivePricingForSKUResult(GetCompetitivePricingForSKUResult... values) { for (GetCompetitivePricingForSKUResult value: values) { getGetCompetitivePricingForSKUResult().add(value); } return this; }
[ "public void setPreciousResult(boolean preciousResult) {\n this.preciousResult = preciousResult;\n }", "public boolean updatePricingForId(int productId, Pricing pricing);", "public Integer getComplaintSkuId() {\n return complaintSkuId;\n }", "public void setCompetitive(boolean value) {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gives next guess Tells Player number of black and white pegs resulting from last guess
public abstract void nextGuessResult(ResultPegs resultPegs);
[ "boolean perfectGuess(){\n return blackPegAmount == GameConfiguration.pegNumber;\n }", "abstract int nextTry(String guess);", "int[] countPegs(Token[] code, Token[] guess) {\n\t\tint[] bw = new int[2];\n\t\tbw[1] = countBlack(code, guess);\n\t\tbw[0] = Math.max(countWhite(code, guess) - bw[1], 0); // ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Initializes encoder with block data component and its binary encoding info
public abstract void init(DataComponent blockComponent, BinaryBlock binaryBlock) throws CDMException;
[ "public abstract void encode(DataOutputExt outputStream, DataComponent blockComponent) throws CDMException;", "private void init() {\n bf1 = new BitField_16();\r\n // Initialize bf2\r\n bf2 = new BitField_16();\r\n }", "private void initEncoderDecoder(Node node, String osf) { // osf - ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a Builder by copying an existing AuctionRound instance
private Builder(com.fretron.Model.AuctionRound other) { super(SCHEMA$); if (isValidValue(fields()[0], other.status)) { this.status = data().deepCopy(fields()[0].schema(), other.status); fieldSetFlags()[0] = true; } if (isValidValue(fields()[1], other.startTime)) { this.startTime = data().deepCopy(fields()[1].schema(), other.startTime); fieldSetFlags()[1] = true; } if (isValidValue(fields()[2], other.endTime)) { this.endTime = data().deepCopy(fields()[2].schema(), other.endTime); fieldSetFlags()[2] = true; } if (isValidValue(fields()[3], other.roundNumber)) { this.roundNumber = data().deepCopy(fields()[3].schema(), other.roundNumber); fieldSetFlags()[3] = true; } }
[ "public static com.fretron.Model.AuctionRound.Builder newBuilder(com.fretron.Model.AuctionRound other) {\n return new com.fretron.Model.AuctionRound.Builder(other);\n }", "public static com.fretron.Model.AuctionRound.Builder newBuilder(com.fretron.Model.AuctionRound.Builder other) {\n return new com.fretro...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set GlassFish cloud entity reference.
public void setCloudEntity(GlassFishCloud cloudEntity) { this.cloudEntity = cloudEntity; }
[ "public void entityReference(String name);", "public final void setReferenceEntity(java.lang.String referenceentity)\r\n\t{\r\n\t\tsetReferenceEntity(getContext(), referenceentity);\r\n\t}", "public void setReferenceEntity(ExternalId referenceEntity) {\n JodaBeanUtils.notNull(referenceEntity, \"referenceEnti...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Dynamically call either the Desktop or Android EventManager handleResponse method with requests incoming on the socket. Reflection was used to prevent having to compile both projects into each other.
private static void reflectEvent(Protocol protocol) { try { handleResponseMethod.invoke(null, (Object) protocol); } catch (Exception e) { e.printStackTrace(); } }
[ "public Object handleCommandResponse(Object response) throws RayoProtocolException;", "private void receiveAndDispatchMessage() {\n String response = null;\n try {\n while((response = bufferedReader.readLine()) != null) {\n System.out.println(\"received message from server:...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
If set, the properties file loaded by StdPropFileOnFilesystemLoader is optional and will not throw an error if it is not found. This is set by default, so there is no need to explicitly call it.
public S filesystemPropFileNotRequired() { _missingFilesystemPropFileAProblem = false; return (S) this; }
[ "public static void loadPropertyFile() {\r\n\t\t\r\n\t\tif (loaded) {\r\n\t\t\tthrow new IllegalStateException(\"Properties have already been loaded!\"); \r\n\t\t}\r\n\t\tloaded = true; \r\n\t\t\r\n\t\t// if property file was specified, use it instead of standard property\r\n\t\t// file\r\n\r\n\t\tString file = STA...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the initialization blocks.
public List<InitializationBlock> getInitializationBlocks() { return initializationBlocks; }
[ "public List<Initializer> getInitializers()\r\n {\r\n return initializers;\r\n }", "default List<_staticBlock> listStaticBlocks(){\n NodeWithMembers nwm = (NodeWithMembers)((_node)this).ast();\n List<_staticBlock> sbs = new ArrayList<>();\n NodeList<BodyDeclaration<?>...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a new instance of ClientRequestGetRevisionForCompare.
public ClientRequestGetRevisionForCompare(ClientRequestGetRevisionForCompareData data) { request = data; }
[ "public ClientRequestGetRevisionForCompare(ClientRequestGetRevisionForCompareData data) {\n this.databaseManager = DatabaseManager.getInstance();\n this.schemaName = databaseManager.getSchemaName();\n setRequest(data);\n }", "public static SnapshotRequest createVersionRequest() {\r\n\t\tre...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sends the value of the barcode scan.
void sendScanRequest(String barcodeValue);
[ "void handleScan(String barcodeValue);", "void barcodeCaptured(String barcodeString);", "final void sendData()\n {\n sendData( this.serialInputTextField.getText() );\n }", "@Override\n public void run() {\n barcodeValue.setText(barcodes.valueAt(0).display...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Request to end a meeting.
boolean endMeeting(String id);
[ "ConferenceScheduleBuilderService endEvent();", "public void onCloseMeeting() {\n controller.closeMeeting();\n }", "void end(String roomId);", "ConferenceScheduleBuilderService endLunch();", "void conversationEnding(Conversation conversation);", "boolean leaveMeeting(long meetingId, long userId)...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a widget Label Panel
public WidgetLabelPanel(String labelText, Widget widget){ super(); this.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE); Label myLabel = new Label(labelText); myLabel.addStyleName("widgetLabel"); this.add(myLabel); this.add(widget); }
[ "private void generateLabelPanel() {\n speedLabel = new JLabel(\"\");\n loopbackLabel = new JLabel(\"\");\n playingLabel = new JLabel(\"\");\n\n JPanel labelPanel = new JPanel();\n labelPanel.setLayout(new FlowLayout());\n labelPanel.add(playingLabel);\n labelPanel.add(Box.createHorizontalStrut...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Prints the key,value vector Note: this is a cleaner look at the values, as compared to using entrySet() or values()
public void printAll(){ Set s = _mmap.keySet(); Iterator setItr = s.iterator(); if (s.size() > 0){ while (setItr.hasNext()) { Object key = setItr.next(); WVM.out.print(" " + key + " <"); Vector v = (Vector)_mmap.get(key); Iterator vecItr = v.iterator(); while (vecItr.hasNext()) { Object value = vecItr.next(); WVM.out.print(value + ","); } WVM.out.println(">"); } } }
[ "private void displayValues() {\r\n\t\tCollection<String> values = map.values();\r\n\t\tSystem.out.println(\"All values:\");\r\n\t\tdisplayStringCollection(values);\r\n\t}", "public void debug() {\n String[] kv = new String[keys.length];\n\n for (int i = 0; i < kv.length; i++) {\n kv[i] = keys[i] + \":...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This constructor creates a basic SimpleAnnotatedAlignment. The annotation should be added with the set commands.
public SimpleAnnotatedAlignment(Identifier[] ids, String[] sequences, String gaps, DataType dt) { super(ids, sequences, gaps,dt); initWhenNoAnnotation(); weightedPosition=new float[numSites]; positionType=new char[numSites]; }
[ "public Alignment()\n\t{\n\t}", "public BasicAlignment (Glyph glyph)\r\n {\r\n super(glyph);\r\n }", "public MultipleAlignment() { \r\n\t\tgappedAlignments = new HashMap<String,GappedAlignmentString>();\r\n\t\tordering = new Vector<String>();\r\n\t\tgappedLength = 0;\r\n\t}", "public SimpleAnnota...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Remove i from a binary search tree
public void removeBST(Item i) { remove(i,root); }
[ "public int delete(int i) //O(log(n))\n {\n\t if(this.lst == null)\n\t\t return -1;\n\t if(i < 0 || i >= this.length)\n\t\t return -1;\n\t this.length--; //one element removed\n\t this.lst.correctFrom(this.lst.deletenode(this.lst.Select(i+1))); //see details in class AVLTree\n\t return 0;\n }", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }