query
stringlengths
8
1.54M
document
stringlengths
9
312k
negatives
listlengths
19
20
metadata
dict
Tests for the editor role in the dashboards page and the dashboard view page.
@Test(groups = "wso2.ds.dashboard", description = "test for editor role", dependsOnMethods = "testAddDashboardAndAssignRolesBySetting") public void testForEditorRole() throws MalformedURLException, XPathExpressionException { String dashboardId = dashboardTitle.toLowerCase(); redirectToLo...
[ "@Test(groups = \"wso2.ds.dashboard\", description = \"test for viewer role\", dependsOnMethods = \"testAddDashboardAndAssignRolesBySetting\")\n public void testForViewer()\n throws XPathExpressionException, MalformedURLException {\n String dashboardId = dashboardTitle.toLowerCase();\n a...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
=================================================================================== Relation Info ============= cannot cache because it uses related DB meta instance while booting (instead, cached by super's collection) Foreign Property Referrer Property WHITE_ON_PARADE_REF by NULLABLE_FK_TO_MANY_ID, named 'whiteOnPara...
public ReferrerInfo referrerWhiteOnParadeRefList() { Map<ColumnInfo, ColumnInfo> mp = newLinkedHashMap(columnManyId(), WhiteOnParadeRefDbm.getInstance().columnNullableFkToManyId()); return cri("FK_WHITE_ON_PARADE_REF_MANY_MANY", "whiteOnParadeRefList", this, WhiteOnParadeRefDbm.getInstance(), mp, false,...
[ "public List<WhiteVariantRelationReferrerRef> getWhiteVariantRelationReferrerRefList() {\r\n if (_whiteVariantRelationReferrerRefList == null) { _whiteVariantRelationReferrerRefList = newReferrerList(); }\r\n return _whiteVariantRelationReferrerRefList;\r\n }", "void unnecessaryRelationshipTraver...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Convert a list of objects into a hashmap using the keys from the key fetcher which can be of any type. NOTE, you should use a key from your object that is unique, otherwise you may lose some objects in the conversion.
public HashMap<K,V> toHash(List<V> items, KeyFetch<K,V> keyFetch){ if(items == null || items.size() == 0){ return null; } HashMap<K,V> map = new HashMap<K,V>(); for(V val : items){ map.put(keyFetch.getKey(val), val); } return map; }
[ "static <K extends BaseLookupEntity> Map<Long, K> buildLookupMap(List<K> list) {\r\n Map<Long, K> result = new HashMap<Long, K>();\r\n for (K entity : list) {\r\n result.put(entity.getId(), entity);\r\n }\r\n return result;\r\n }", "public HashMap<K,V> toHash(Collection<V...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Try to send events to api with MTU set to 1000 app events, If there are more than 1000 events, they will be split into several chunks and then be sent separately, Any failed events will be accumulated and finally returned.
public static synchronized List<TTAppEvent> reportAppEvent(JSONObject basePayload, List<TTAppEvent> appEventList) { TTUtil.checkThread(TAG); // access-token might change during runtime headParamMap.put("access-token", TikTokBusinessSdk.getAccessToken()); if (appEventList == null || appE...
[ "@Test\n public void processMixed50MessagesOfAllEventTypes_ok() throws Exception {\n\n for(int i=0;i<50;i++){\n if (i % 2 == 0){\n if(i==10)\n processAdjustmentEventMessageAdd();\n processSingleSellEventMessage();\n }else {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Function to build response message type using given bodytype and request xml
public static String buildResponseMessage(String requestXml, StatusType statusType, BodyType bodyType, boolean splCharFilterFlag) throws JAXBUtilException { JAXBUtil util = CRCLoaderJAXBUtil.getJAXBUtil(); MessageHeaderType messageHeader = new MessageHeaderType(); ApplicationType appType = new Applicatio...
[ "public static String buildResponseMessage(String requestXml,\n\t\t\tStatusType statusType, BodyType bodyType) throws JAXBUtilException {\n\t\treturn buildResponseMessage(requestXml, statusType, bodyType, false);\n\t}", "ResponsesType createResponsesType();", "HTTPType createHTTPType();", "SlackMessageBuilder...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
repeated .NetMsg.iProtIntArray val = 1;
java.util.List<battleapp.netproto.Struct.iProtIntArray> getValList();
[ "battleapp.netproto.Struct.iProtIntArray getVal(int index);", "battleapp.netproto.Struct.iProtIntArrayArray getObject();", "battleapp.netproto.Struct.iProtIntArrayArrayOrBuilder getObjectOrBuilder();", "java.util.List<? extends battleapp.netproto.Struct.iProtIntArrayOrBuilder> \n getValOrBuilderList();...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Shows the current total price of the order.
public void showCurrentPrice(){ System.out.printf("Your current total for the order is: %d", this.calculateTotal()); System.out.println(); System.out.println(); }
[ "public String getTotalOrderPrice() {\n\t\treturn totalOrderPrice;\n\t}", "public void updateTotalPrice(){\n\t\tBigDecimal discount = currentOrder.getDiscount();\n\t\tBigDecimal subtotal = currentOrder.getSubtotal();\n\t\tthis.subtotal.text.setText(CURR+subtotal.add(discount).toString());\n\t\tthis.discount.text....
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
////////////////////////////////////////////////////////////////////////// Methods to set the offset during the calculation of the current playback time after jumping to another slide /////////////////////////////////////////////////////////////////////////
static void setOffsetByPreviousSlide(Actions action) throws IOException { // _root.offset = _root["mclip"+(i-1)].timeStamp - getTimer(); action.lookupTable(new String[] { "_root", "offset", "mclip", "mcNumber", "indexTimeStamp" }); action.lookup(0); action.getVariable(); action.l...
[ "private void updateFrameDurationSeekPosition() {\n mFrameDurationItem.setSeekPosition((int) mFrameDuration);\n }", "public void setTimeOffset(float timeOffset)\n\t{\n\t\tthis.timeOffset = timeOffset;\n\t}", "void setOffset(double offset);", "public float getTimeOffset()\n\t{\n\t\treturn timeOffset;...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Initializes the CarParkHolder with a CarPark instance with the parkingSpaces.
public static void init(int parkingSpaces) { CarParkHolder.carParkInstance = new CarPark(parkingSpaces); }
[ "public CarPark() {\r\n\t\tthis(Constants.DEFAULT_MAX_CAR_SPACES,\r\n\t\t\t\tConstants.DEFAULT_MAX_SMALL_CAR_SPACES,\r\n\t\t\t\tConstants.DEFAULT_MAX_MOTORCYCLE_SPACES,\r\n\t\t\t\tConstants.DEFAULT_MAX_QUEUE_SIZE);\r\n\r\n\t\t// Initialise the parking spots avaliable.\r\n\t\tmaxCarSpaces = Constants.DEFAULT_MAX_CAR...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the renderer descriptor registered by the given ID. Returns null if not found, or the id is null.
public static TreeRendererDescriptor findById(String id) { synchronized (REGISTRY) { return REGISTRY.get(id); } }
[ "public PhantomRenderer getRenderer(String workerId) {\n\t\treturn lookup.get(workerId);\n\t}", "public ImageDescriptor getImageDescriptor(String id) {\n \tif (imageDescriptors == null);\n \t\tthis.initializeImages();\n\t\treturn (ImageDescriptor) imageDescriptors.get(id);\n }", "IDebuggerDescriptor fi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
///////////////////////////////////////////////////////////////////// Basic methods to create, convert into array, clone, or copy VectorN.// ///////////////////////////////////////////////////////////////////// Make a deep copy of a vector
public VectorN copy() { VectorN X = new VectorN(this); return X; }
[ "Vector copy();", "public Vec clone();", "public Vector copy(Vector v) {\n\tif (this.n != v.n)\n\t resize(v.n);\n\tfor (int i = 0; i < this.n; i++)\n\t this.el[i] = v.el[i];\n\treturn (this);\n }", "public Vector clone()\r\n {\r\n Vector<O> v = new Vector<O>();\r\n \r\n Ve...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Locates a redeem data (redeem script and keys) from the keyChainGroup given the hash of the script. Returns RedeemData object or null if no such data was found.
@Nullable @Override public RedeemData findRedeemDataFromScriptHash(byte[] payToScriptHash) { // RSK: Method should be overriden by subclasses throw new UnsupportedOperationException(); }
[ "@Override\n @Nullable\n public UldECKey findKeyFromPubHash(byte[] pubkeyHash) {\n return null;\n }", "public Object getData(String k) {\n\t\tif (find(k)) {\r\n\t\t\treturn find(table[hash(k)], k);\r\n\t\t} else {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}", "public static DataItem decodeRelativeHumi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Return the current optimization level for the layout resolution
public int getOptimizationLevel() { return mLayoutWidget.getOptimizationLevel(); }
[ "public int getOptimizationLevel() {\r\n return optimizationLevel;\r\n }", "public OptimizeLevel getCompilerOptimizeLevel() {\n return compilerOptimizeLevel;\n }", "EOptimizationCases getApp_optimization();", "public static double getOptimalInflation() {\n\t\treturn Constants.OPTIMAL_INFLA...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Initialise tous les champs de EXPRESS_FEN_Search.ZM_profils
public void initialiserSousObjets() { //////////////////////////////////////////////////////////////////////////// // Initialisation des champs de EXPRESS_FEN_Search.ZM_profils //////////////////////////////////////////////////////////////////////////// super.initialiserSousObjets(); mWD_ZM_profils_Ligne1.initialiserOb...
[ "public void initialiserSousObjets()\n{\n////////////////////////////////////////////////////////////////////////////\n// Initialisation des champs de EXPRESS_FEN_Search.ZM_profils\n////////////////////////////////////////////////////////////////////////////\nsuper.initialiserSousObjets();\nmWD_LIB_Libelle2.initial...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the rxDrugSpent value for this Account.
public void setRxDrugSpent(java.lang.String rxDrugSpent) { this.rxDrugSpent = rxDrugSpent; }
[ "public java.lang.String getRxDrugSpent() {\n return rxDrugSpent;\n }", "public void setAmountSpent(double amountSpent) {\n this.amountSpent = amountSpent;\n }", "public void setDrugSpentCurrencyCode(java.lang.String drugSpentCurrencyCode) {\n this.drugSpentCurrencyCode = drugSpentCur...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
get an individual ad
List<Ad> individualAd(String adId);
[ "hipstershop.Demo.Ad getAds(int index);", "@Transactional\n public Ad getAdById(long id) {\n return adDao.findOne(id);\n }", "public static String getAd() {\n\t\tRandom randomGenerator = new Random();\n\t\treturn ads.get( randomGenerator.nextInt(ads.size()) );\n\t}", "Advertisement getAdvertiseme...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/9 how to used : url = domain.com/list_url method = "POST" or "GET" paramsData = d or data Example : List paramsData = new ArrayList(); paramsData.add(new BasicNameValuePair("name", "ari prasetiyo 2")); hashmapHeader = header Example : HashMap headerNya = new HashMap(); List listData = new ArrayList(); listData.add("JS...
private HttpResponse makeServiceCallWtihParam(String url, String method, List<NameValuePair> paramsData, HashMap<String, Object> hashmapHeader) { HttpResponse httpResponse = null; try { // http client DefaultHttpClient httpClient = new DefaultHttpClient(); // Checking...
[ "public static String requestBuilder(String urlPath, String method, String token, ArrayList<String> params){\n\n\n HttpURLConnection urlConnection = null;\n int serverResponseCode = 0;\n\n try {\n\n URL url = new URL(urlPath);\n\n // Create the request to Webservice and op...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
final Map dataMap = new ConcurrentHashMap(); biFunctionMap.entrySet().parallelStream().forEach(entry > dataMap.put(entry.getKey(), entry.getValue().apply(t, u))); return dataMap;
public <T, U, R> Map<String, Optional<R>> mapBiFunction(Map<String, BiFunction<T, U, R>> biFunctionMap, T t, U u) { return biFunctionMap.entrySet().parallelStream() .collect(Collectors.toMap(Map.Entry::getKey, it -> Optional.ofNullable(it.getValue().apply(t, u)))); }
[ "@Test\r\n public void testCompute() {\r\n BiMap<Integer, String> biMap = new BiMap();\r\n biMap.put(1, \"One\");\r\n biMap.put(2, \"Two\");\r\n biMap.put(3, \"Three\");\r\n \r\n assertEquals(\"ONE\", biMap.compute(1, (k,v) -> \"ONE\"));\r\n assertEquals(\"ONE\", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Calculate the intersect between each edge of the square and the line If the line intersects anywhere between the topLeftCorner and bottomRightCorner then the line is within the bounds of the square
@Override public boolean contains(Line l) { int maxLineX = Math.max(l.p1.x, l.p2.x); int minLineX = Math.min(l.p1.x, l.p2.x); int maxLineY = Math.max(l.p1.y, l.p2.y); int minLineY = Math.min(l.p1.y, l.p2.y); double[] lineEq = calculateLineEquation(l.p1, l.p2); double...
[ "public int rectIntersection( double x, double y, double w, double h );", "public CFWRect intersectsLine( CFWPoint poiBegI, CFWPoint poiEndI)\t{\r\n\t\t//1.rejust rect\r\n\t\t//correct: (m_poiLT.m_fX < m_poiRB.m_fX && m_poiLT.m_fY < m_poiRB.m_fY)\r\n\t\tif(m_poiLT.m_fX > m_poiRB.m_fX && m_poiLT.m_fY > m_poiRB.m_f...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Generic interface for learning algorithms.
public interface LearningAlgorithm { /** * Learns a model from the given {@link TraceDataset} */ ProbabilisticAutomata learnModel(TraceDataset dataset) throws LearningAlgorithmException; /** * An exception that indicates a problem during model learning. */ public static class LearningAlgorithmException ext...
[ "public interface LearningListener {\n\n\t/**\n\t * Indicates that training is starting.\n\t * @param algorithm Learning algorithm instance.\n\t */\n\tpublic void trainingStart(LearningAlgorithm algorithm);\n\t\n\t/**\n\t * Callback that is invoked for each training iteration. Note that some\n\t * learning algorith...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
ShoppingCart deleteCartItemByUserId(long itemId, Long userId);
void deleteCartItemByUserId(long itemId, Long userId);
[ "public void removeCartItem(long userId, long menuItemId);", "void removeCartItem(int CartItemId);", "@Override\n public boolean deleteItemFromCart(Long userId, Long itemId, Long itemDetailId) {\n String hql = \"From ShoppingCartItemEntity sci where sci.shoppingCart.user.id=:userId and sci.item.id=:it...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by Apache iBATIS ibator. This method sets the value of the database column EP_MAIL.ML_SREMARK
public void setMlSremark(String mlSremark) { this.mlSremark = mlSremark; }
[ "public void setFmpoMRemarks(String value) {\r\n setAttributeInternal(FMPOMREMARKS, value);\r\n }", "public void setScentMark(int mark);", "@Override\n\tpublic void setRemarks(java.lang.String remarks) {\n\t\t_tempNoTiceShipMessage.setRemarks(remarks);\n\t}", "public void setRemarks(java.lang.String...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
EXTRACTS OPCODE AND OPERAND AND GETS MNEMONIC RETURNS STRING
public static String disassembler(){ int opCode, operand, i; String mnemonic; String s = ""; iPointer = 0; iRegister = 0; System.out.println("===== Execution Trace ====="); for (i = 0; i < memorySize; i++){ opCode = extractOpcode(memoryArray[i]);...
[ "String getOp();", "java.lang.String getOp();", "java.lang.String getOpReturn();", "public static String getMnemonic(int opCode){\n\n Map<String, Integer> opCodeTable = new TreeMap<String, Integer>();\n Map<Integer, String> mnemonicTable = new TreeMap<Integer, String>();\n\n final int\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
testing what happens if the last name is greater than three charcters
@Test public void whenInsertLastnameGreaterThanThreeCharcters_thenReturnTrue(){ Employee newEmployee = new Employee("5678", "AAA", "Test", "s3661671@student.rmit.edu.au", "0424735215", "Something", "s3661671", "password"); newEmployee.setServiceNo("1E"); Set<ConstraintViolation<Employee>> co...
[ "public boolean validateLastName() {\n\t\treturn this.getLastName().length() > 0 && this.getLastName().length() <= 20;\n\t}", "protected void validateLastName(){\n Boolean lastName = Pattern.matches(\"[A-Z][a-z]{2,}\",getLastName());\n System.out.println(nameResult(lastName));\n }", "boolean v...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Caches the secret keies in the entity cache if it is enabled.
public static void cacheResult(List<SecretKey> secretKeies) { getPersistence().cacheResult(secretKeies); }
[ "public static void cacheResult(SecretKey secretKey) {\n\t\tgetPersistence().cacheResult(secretKey);\n\t}", "public void preCacheEntity(Entity entity) {\n Location location = entity.getLocation();\n Collection<Entity> entities = this.entityCache.getIfPresent(new ChunkLocation(entity.getWorld(), loca...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
findSum(root, 19, new ArrayList(), 0);
public static void main(String s[]){ TreeNode roota = new TreeNode(6); TreeNode tempc = new TreeNode(9); TreeNode tempd = new TreeNode(2); TreeNode tempe = new TreeNode(3); TreeNode tempb = new TreeNode(4); TreeNode tempf = new TreeNode(1); roota.setLeftNode(tempb); roota.setRightNode(tempc); ...
[ "public void findSumFromRootToLeaf(){\n\n\t}", "public int treeSum(){\n\treturn treeSum(root);\n}", "int sumRootToLeafNumbers();", "static void findPathSum(Node root) \n{\n\tArrayList<Integer> pathSum = new ArrayList<>();\n\n\t// Calling dfs function\n\tdfs(root, 0, pathSum);\n\n\t// Printing all the path sum...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ HRESULT SHGetSpecialFolderLocation( HWND hwndOwner, int nFolder, LPITEMIDLIST ppidl ); Example: ITEMID p = new ITEMID(); Shell32.SHGetSpecialFolderLocation(new HWND(iconData.hWnd),Shell32.CSIDL_BITBUCKET,p); FILEINFO fileInfo = new FILEINFO(); Shell32.SHGetFileInfo(p.getSpecialPath(),new DWORD(0),fileInfo, fileInfo.g...
public static boolean SHGetSpecialFolderLocation( HWND hwndOwner, int nFolder, ITEMID ppidl) throws NativeException, IllegalAccessException { JNative SHGetSpecialFolderLocation = new JNative(DLL_NAME, "SHGetSpecialFolderLocation"); SHGetSpecialFolderLocation.setRetVal(Type.INT); int pos = 0; SHGetS...
[ "@cli.System.Security.SecurityCriticalAttribute.Annotation\n private static native int getIconIndex(cli.System.Object parentIShellFolder, cli.System.IntPtr relativePIDL);", "static Image getShell32Icon(int iconID, boolean getLargeIcon) {\n Bitmap bitmap = getShell32IconResourceAsBitmap(iconID, getLarg...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
creating the main referral panel
public void patientReferralPanel(Container pane) { JPanel referralPanel = new JPanel(); referralPanel.setLayout(new GridLayout(1,2)); // creating the left hand side of the page JPanel leftPanel = new JPanel(); leftPanel.setLayout(new BoxLayout(leftPanel, BoxLayout.Y_AXIS)); ...
[ "public JXHyperlinkDemoPanel() {\n setName(\"JXHyperlink Demo\");\n initLinkVisitor();\n initComponents();\n configureComponents();\n build();\n }", "void createGebruikersBeheerPanel() {\n frame.add(gebruikersBeheerView.createGebruikersBeheerPanel());\n frame.se...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Removes the insurance by code.
private void removeInsuranceByCode(final String insuranceCode, final BasePackage packageModel) { for (final ExtraFacilityCategory categoryModel : packageModel.getExtraFacilityCategories()) { if (StringUtils.equalsIgnoreCase(INSURANCE, categoryModel.getCode())) { update...
[ "public void removeBycode(String code);", "@Override\n\tpublic void removeByCode(String code) {\n\t\tfor (Arret arret :\n\t\t\t\tfindByCode(code, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) {\n\n\t\t\tremove(arret);\n\t\t}\n\t}", "@Transactional\n public void removeByCode(final String code) {\n// fin...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Find the User who owns the pin with the given ID.
default User getPinOwnerByPinID(int id) { return getPinOwnerFromPin(getPinByID(id)); }
[ "public static BankUser getUser(String id, String pin){\n\t\tfor (BankUser checkThisUser : bankUsers) {\n\t\t\tif (checkThisUser.pin.equals(pin) && checkThisUser.id.equals(id)){\n\t\t\t\treturn checkThisUser;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "private User getUser(int id) {\n\n for (User user : this...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method returns the value of the database column TRSDET_SWITCHED.PORTFOLIO_CIF
public BigDecimal getPORTFOLIO_CIF() { return PORTFOLIO_CIF; }
[ "public void setPORTFOLIO_CIF(BigDecimal PORTFOLIO_CIF) {\r\n this.PORTFOLIO_CIF = PORTFOLIO_CIF;\r\n }", "public BigDecimal getCIF_INCOME()\r\n {\r\n\treturn CIF_INCOME;\r\n }", "public BigDecimal getCIF_NO() {\r\n return CIF_NO;\r\n }", "public BigDecimal getSWITCHED_CIF()\r\n {...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns a new object of class 'Main'.
Main createMain();
[ "@Override\n public Main getMain() {\n return main;\n }", "public static Main getInstance() {\n \tif (instance == null) {\n \t\tinstance = new Main();\n \t}\n return instance;\n }", "public Main(){\n }", "private Main ()\n {\n super ();\n }", "Main ()\n\t{\n\t\t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
All plugins should implement this interface to provide some meta data for the UI.
public interface Plugin { /** * Returns a description of the plugin, to be shown as a tooltip and/or in the * help menu. * * @return */ String getDescription(); /** * A label for buttons and menu entries * * @return */ String getName(); Ikon getIkon(); }
[ "public interface ApplicationPlugin extends Plugin {\n /**\n * How can users of this plugin contact the developers?\n *\n * This may be a personal address, or mailing list. It is\n * displayed in the About dialog and in the Problem Reporter\n * dialog.\n *\n * @return an email address...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the attribute value for TotalRolls, using the alias name TotalRolls.
public Number getTotalRolls() { return (Number)getAttributeInternal(TOTALROLLS); }
[ "public Number getTotalAlocRolls() {\n return (Number)getAttributeInternal(TOTALALOCROLLS);\n }", "public int getRolls() {\n\t\treturn this.rolls; \n\t}", "public void setTotalAlocRolls(Number value) {\n setAttributeInternal(TOTALALOCROLLS, value);\n }", "public Number getBlncRolls() {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
create a Subscription from a ComponentModel by using the component's Configuration
private void subscribe(ComponentModel model) { try { Configuration conf = model.getConfiguration().getChild("subscription", true); String messenger = conf.getAttribute("connection", null); String subject = conf.getAttribute("subject", null); String selector = conf.getAttribute("selector", n...
[ "public void createSubscription(Subscription sub);", "void subscribe(Long subscriptionId, ApplicationProperties.VendorConfiguration configuration);", "public StoredSubscription(Subscription s) {\n setSubscription(s);\n }", "protected abstract SubscriptionStore createSubscriptionStore();", "Subscribe...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the localized links of this agenda from the map of locales and localized links.
public void setLinkMap(Map<Locale, String> linkMap);
[ "public void setLinkMap(Map<Locale, String> linkMap, Locale defaultLocale);", "public void setLink(String link, Locale locale);", "public void setLabelLinkMap(Map<Locale, String> labelLinkMap);", "public void setLink(String link, Locale locale, Locale defaultLocale);", "public void setLabelLink(String label...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Ratio of rows with null value against total scanned rows. double null_ratio = 2;
@java.lang.Override public double getNullRatio() { return nullRatio_; }
[ "double getNullRatio();", "@java.lang.Override\n public double getNullRatio() {\n return nullRatio_;\n }", "public double emptyRowProportion() {\n double count = 0;\n for (int i = 0; i < this.numRows; i++) {\n if (this.rows[i].length == 0) {\n count++;\n }\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the number of Handlers linked with this Event.
public int size() { return this.handlers.size(); }
[ "public int sizeOfHandlerChainArray()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return get_store().count_elements(HANDLERCHAIN$0);\r\n }\r\n }", "public long getSeHandlerCount() {\n\t\treturn seHandlerCount;\n\t}", "public int getNumberOf...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Registra la fecha de vencimiento de una carta fianza
public void registrarFechaVencimientoCartaFianza(int numeroCartaFianza, String fechaVencimiento) { buscaCartaFianza(numeroCartaFianza).setFechaVencimiento(fechaVencimiento); }
[ "private void registraUpdate() {\n /* variabili e costanti locali di lavoro */\n Date oggi;\n\n try { // prova ad eseguire il codice\n oggi = Lib.Data.getCorrente();\n Pref.Update.ultimoAgg.getWrap().setValore(oggi);\n Pref.registra();\n } catch (Exceptio...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Example of line in file // ripencc|RU|asn|13056|1|20000303|allocated
private static ASInfo parseLine(final RIR rir, final String line) { if (line.contains("|asn|")) { String patternString = "\\|([A-Z]{2})\\|asn\\|(\\d+)\\|"; Pattern pattern = Pattern.compile(patternString); Matcher matcher = pattern.matcher(line); if (matcher.find()) { String country = matcher.group(...
[ "void handleLine( String line ) {\n if ( line.startsWith( \"CID: \")) {\n String name = \"unknown\";\n String number = \"###\";\n String[] parts = line.split( \"\\\\*\" );\n for( int i = 1; i < parts.length; i+=2 ) {\n String key = parts[i];\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
END loadPlatformProtocolInfo() Process a notification from platform that IP change has occurred on interface.
private void notifyIPChange(int eventCode, int addr) { byte[] ipAddr = new byte[4]; ipAddr[0] = (byte) (addr >> 24); ipAddr[1] = (byte) (addr >> 16); ipAddr[2] = (byte) (addr >> 8); ipAddr[3] = (byte) addr; InetAddress changedAddr = null; try { ...
[ "public interface ProviderChangeListener\n{\n /**\n * The method is called by a ProtocolProvider implementation whenever a change in the presence\n * status of the corresponding provider had occurred.\n *\n * @param evt ProviderStatusChangeEvent the event describing the status change.\n */\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method extracts all the inode information and stores them in the relevant variables.
public void extractInodeInfo() { fileMode = byteBuffer.getShort(0); userID = byteBuffer.getShort(2); fileSizeLower = byteBuffer.getInt(4); accessTime = byteBuffer.getInt(8); creationTime = byteBuffer.getInt(12); modifiedTime = byteBuffer.getInt(16); deleteTime = ...
[ "public Inode readInode(int inodeNumber) {\r\n inodeNumber--;\r\n Inode id = new Inode();\r\n if(inodeNumber < 0 || inodeNumber >= sb.totalInodes) {\r\n System.out.println(\"Bad inode number\");\r\n }\r\n\r\n try {\r\n int groupNumber = inodeNumber / sb.inode...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Fetch records that have state BETWEEN lowerInclusive AND upperInclusive
public List<com.test.entity.tables.pojos.SysUser> fetchRangeOfState(String lowerInclusive, String upperInclusive) { return fetchRange(SysUser.SYS_USER.STATE, lowerInclusive, upperInclusive); }
[ "public List<com.wuda.foundation.jooq.code.generation.user.tables.pojos.UserEmail> fetchRangeOfState(UByte lowerInclusive, UByte upperInclusive) {\n return fetchRange(UserEmail.USER_EMAIL.STATE, lowerInclusive, upperInclusive);\n }", "public List<com.gatesma.springjooq.jooq.tables.pojos.BookToBookStore>...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Called when a player hits the block. Args: world, x, y, z, player
public void onBlockClicked(World world, int x, int y, int z, EntityPlayer player) {}
[ "public int onBlockPlaced(World world, int x, int y, int z, int side, float hitX, float hitY, float hitZ, int meta)\n {\n return Math.abs(x + z) % 16;\n }", "public void onBlockClicked(World p_149699_1_, int p_149699_2_, int p_149699_3_, int p_149699_4_, EntityPlayer p_149699_5_) {}", "@Override\n\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test an event that supports shift keys by testing each shift key individually.
private void testTriggerEventWithShiftKeys( BubbleAssertingEventListener listener, EventCreator creator) { Event.setEventListener(parent, listener); Event.setEventListener(child, listener); listener.setExpectedShiftKeys(true, true, true, true); child.dispatchEvent(creator.cr...
[ "private static void assertAllShiftKeys(Event event, boolean expectedCtrl,\n boolean expectedAlt, boolean expectedShift, boolean expectedMeta) {\n assertEquals(\"Expecting ctrl = \" + expectedCtrl, expectedCtrl,\n event.getCtrlKey());\n ass...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the resolution of the Product.
public void setResolution(String resolution) throws IllegalProductArgumentException { if (resolution != null && resolution.length() > 0 && resolution.contains("x")) { this.resolution = resolution; } else { throw new IllegalProductArgumentException( "Invalid Resolution " + resolution + " Mu...
[ "public void setResolution(double res) {\n\t\tthis.resolution = resolution;\n\t}", "public void setResolution(double resolution)\n {\n this.resolution = resolution;\n }", "public void setResolution(java.lang.Object resolution) {\n this.resolution = resolution;\n }", "public void assignR...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Shift the solenoid along Z for misplacement. A negative shift moved the solenoid upstream.
public void setSolenoidShift(double shiftZ) { if (_solenoid != null) { _solenoid.setShiftZ(shiftZ); } }
[ "private void shiftLow(){\n\t\tleftShifter.set(DoubleSolenoid.Value.kReverse);\n\t\trightShifter.set(DoubleSolenoid.Value.kReverse);\n\t}", "private void shiftHigh(){\n\t\tleftShifter.set(DoubleSolenoid.Value.kForward);\n\t\trightShifter.set(DoubleSolenoid.Value.kForward);\n\t}", "private void repositionFacingW...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Truncate or delete an entry to make room Only call this method for entries which definitely intersect the given span. This does not verify intersection. If the data's start snap is contained in the span to clear, the entry is deleted. Otherwise, it's end snap is set to one less than the span's start snap.
public static <DR extends AbstractDBTraceAddressSnapRangePropertyMapData<?>> void makeWay( DR data, Range<Long> span, BiConsumer<? super DR, Range<Long>> lifespanSetter, Consumer<? super DR> deleter) { // TODO: Not sure I like this rule.... if (span.contains(data.getY1())) { deleter.accept(data); return...
[ "private void updateSpanAfterRemove(Entry<T> ent) {\n Entry spanner = head;\n updateSpan(maxLevel, spanner);\n spanner = spanner.next[0];\n if (ent.next[0] == tail) {\n while (spanner != tail) {\n updateSpan(spanner.next.length, spanner);\n spanne...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Does only the ancestor and cycle rules of these repeatedly until no changes
private void awayFromAncestorCycle(Graph graph) { while (changeFlag) { changeFlag = false; List<Node> nodes = graph.getNodes(); for (Node B : nodes) { List<Node> adj = graph.getAdjacentNodes(B); if (adj.size() < 2) { conti...
[ "public void adjustForCycles()\n\t{\n\t\tboolean continueLoop = true;\n\t\twhile (continueLoop == true)\n\t\t{\n\t\t\tCycleDetector<String, DefaultEdge> detector = new CycleDetector<String, DefaultEdge>(acyclicJGraph);\n\t\t\tif (detector.detectCycles() == false)\n\t\t\t{\n\t\t\t\tcontinueLoop = false;\n\t\t\t}\n\t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The AdGroup affected by this change. .google.protobuf.StringValue ad_group = 6;
public com.google.protobuf.StringValue getAdGroup() { return adGroup_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : adGroup_; }
[ "com.google.protobuf.StringValue getAdGroup();", "com.google.protobuf.StringValueOrBuilder getAdGroupOrBuilder();", "public com.google.protobuf.StringValue getAdGroupAd() {\n return adGroupAd_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : adGroupAd_;\n }", "public com.google.protobuf.St...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Searches for single clone class in entry string
protected void testSingleCloneClass(String input, String... expectedClones) throws ConQATException { List<Character> word = SuffixTreeTest.stringToList(input); List<List<String>> cloneClasses = findClones(word, 1, 3); assertEquals(1, cloneClasses.size()); assertCloneClass(cloneClasses.get(0), expectedClone...
[ "public static CloneType detectType(String name) {\n if (name.startsWith(\"vb-\"))\n return CloneType.VIRTUALBOX;\n else if (name.startsWith(\"amazon-\"))\n return CloneType.AMAZON;\n else if (name.startsWith(\"kvm-\"))\n return CloneType.KVM;\n else {\n// System.err.println(\"The ty...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the additionalDistance value for this DeliveryCost.
public void setAdditionalDistance(int additionalDistance) { this.additionalDistance = additionalDistance; }
[ "public int getAdditionalDistance() {\n return additionalDistance;\n }", "public void setDistance(double aDistance) {\r\n distance = aDistance;\r\n }", "public void setAdditionalStopCost(int additionalStopCost) {\n this.additionalStopCost = additionalStopCost;\n }", "public void setDis...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
register delegate build url
public static URL buildRegisterUrl(){ Uri builtUri = Uri.parse(BASE_URL + REGISTER_URL).buildUpon() .build(); //Log.d(TAG, "buildRegisterUrl: " + builtUri.toString()); URL url = null; try { url = new URL(builtUri.toString()); } catch (MalformedURLExce...
[ "public abstract void buildUserUrl();", "Builder addUrl(String value);", "URI build();", "public static URL buildLoginUrl(){\n\n Uri builtUri = Uri.parse(BASE_URL + LOGIN_URL).buildUpon()\n .build();\n Log.d(TAG, \"buildRegisterUrl: \" + builtUri.toString());\n URL url = nu...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the ships of this player.
public void setShips(Ship[] ships) { this.ships = ships; }
[ "private void setShips() {\n //This clears the board. To \"Invalidate\"\n for (int x = 0; x < maxN; x++) {\n for (int y = 0; y < maxN; y++) {\n ivCell[x][y].setBackgroundResource(gridID);\n }\n }\n\n for (Ship s : ships) {\n for (int i = 0;...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
check label text in Search Wikipedia input
public void assertSearchInputHasLabelText() { this.assertElementHasText(By.xpath(SEARCH_INIT_TEXT), "Search Wikipedia", "Search wikipedia input has not label text 'Search Wikipedia'"); }
[ "public void assertSearchInputHasLabelText() {\n String expectedLabel = \"\";\n if (Platform.getInstance().isMW()) {\n expectedLabel = \"Искать в Википедии\";\n } else {\n expectedLabel = \"Search Wikipedia\";\n }\n this.assertElementHasText(SEARCH_INIT_TEXT,...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Checks that book is reserved.
public boolean isReserved() { return status == SharedBookStatus.RESERVED; }
[ "private void reserveBook ( String bookName, String authorName ) throws IOException {\r\n\t\t\r\n\t\tboolean result = false ;\t\t// Initially false\r\n\t\tBook demandedBook = new Book ( bookName, authorName ) ;\r\n\t\t// returns null if the book is not available\r\n\t\tBook availableBook = lib.getBookDatabase().get...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Checks whether a valid start date has been entered
public static boolean validStartDate(DateTime checkInDate) { String nowString = DateTime.getCurrentTime(); int day = Integer.parseInt(nowString.split("-")[2]); int month = Integer.parseInt(nowString.split("-")[1]); int year = Integer.parseInt(nowString.split("-")[0]); if (DateTime.diffDays(checkInDat...
[ "private boolean validateEventStartDate(){\n //get event start date\n String eventStartDateInput = eventStartDateTV.getText().toString().trim();\n\n //if event start date == null\n if(eventStartDateInput.isEmpty())\n {\n eventStartDateTV.setError(\"Please set the start ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the last link in the ordered set where companyId = &63;.
public de.fraunhofer.fokus.movepla.model.Link findByc_Last(long companyId, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) throws com.liferay.portal.kernel.exception.SystemException, de.fraunhofer.fokus.movepla.NoSuchLinkException;
[ "public de.fraunhofer.fokus.movepla.model.Link fetchByc_Last(\n long companyId,\n com.liferay.portal.kernel.util.OrderByComparator orderByComparator)\n throws com.liferay.portal.kernel.exception.SystemException;", "public de.fraunhofer.fokus.movepla.model.Link fetchByca_Last(\n long co...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Getter for property recordSize.
public int getRecordSize() { return recordSize; }
[ "public long getRecordSize() {\n return recordSize;\n }", "public int getRecordSize() {\n return buffer.getRecordSize();\n }", "public int getRecordSize()\n {\n return m_buffer.getRecordSize();\n }", "public final int getRecordSize()\n\t{\n\t\treturn tarBuffer.getRecordSize();\n\t}"...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
optional .alluxio.proto.journal.CreateStoreEntry create_store = 23; optional .alluxio.proto.journal.CreateStoreEntry create_store = 23;
boolean hasCreateStore();
[ "alluxio.proto.journal.KeyValue.CreateStoreEntryOrBuilder getCreateStoreOrBuilder();", "alluxio.proto.journal.KeyValue.CreateStoreEntry getCreateStore();", "public alluxio.proto.journal.KeyValue.CreateStoreEntryOrBuilder getCreateStoreOrBuilder() {\n return createStore_;\n }", "public alluxio.proto.jo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Adds items to the ComboBox
public void addComboBoxItems() { comboBox1.addItem("Select Minimum Price"); comboBox1.addItem("500"); comboBox1.addItem("1000"); comboBox1.addItem("1500"); comboBox1.addItem("2000"); comboBox2.addItem("Select Maximum Price"); comboBox2.addItem("1000")...
[ "public void addItems() {\n ObservableList<String> product = FXCollections.observableArrayList();\n ObservableList<String> employee = FXCollections.observableArrayList();\n\n try {\n resultSet = condb.select(\"SELECT productName FROM product_records WHERE status='available'\");\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method sets the value of the database column shuxing.chinesetype
public void setChinesetype(String chinesetype) { this.chinesetype = chinesetype == null ? null : chinesetype.trim(); }
[ "public String getChinesetype() {\n return chinesetype;\n }", "public void setCoverTypeset(String value) {\n setAttributeInternal(COVERTYPESET, value);\n }", "public void setCashType (String CashType);", "public final void setSqlType(final String sqlTypeToSet) {\r\n this.sqlType = s...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
A method to generate random port
private int generatePort() { Random r = new Random(); int low = 100; int high = 900; int result = r.nextInt(high - low) + low; return Integer.parseInt(conf.getPort()) + result; }
[ "public String getRandomPort() {\r\n\t\t \t \r\n\t\treturn (String.valueOf(getNum(9)) +\r\n\t\t\t\t String.valueOf(getNum(9)) +\r\n\t\t\t\t String.valueOf(getNum(9)) +\t\t\t \r\n\t\t\t\t String.valueOf(getNum(9))); \r\n\t}", "public static int generateRandomPortNumber() {\r\n return generateRandomPortN...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
encrypt plainData using the key.
public static byte[] encrypt(byte[] key, byte[] plainData) { //Initialize the statebox and keybox. //The keybox will be filled using the key indicating by the parameter. int[] intKey = fromByteArray(key); int[] stateBox = new int[STATE_LENGTH]; int[] keyBox = new int[STATE_LENGTH...
[ "byte[] encryptData(Key key, IvParameterSpec iV, byte[] data);", "public String encrypt(String plainText);", "public static byte [] encrypt(byte [] plainText, char [] password){\r\n\t\t// create a secret key using a random salt\r\n\t\tbyte [] salt = new byte[SEED_LENGTH];\r\n\t\tSecureRandom random = new Secure...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Constructs a runtoline breakpoint in the given Actor program.
public ActorRunToLineBreakpoint(final IFile resource, final int lineNumber) throws DebugException { IWorkspaceRunnable runnable = new IWorkspaceRunnable() { public void run(IProgressMonitor monitor) throws CoreException { // associate with workspace root to avoid drawing in editor // ruler IMa...
[ "RoverProgram createRoverProgram();", "protected abstract void addBreakpoint(final int line);", "public void testBreakInRoFiMethod1() throws Exception {\n\t\tString typeName = \"rofitests.RoFiTeam\";\n\t\tString roleName = \"rofitests.RoFiTeam.RoFiRole\";\n\t\tString roleBinaryName = \"rofitests.RoFiTeam$__OT__...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the radius of a sphere of the same volume as this tet. This is (3volume/4/pi)^1/3.
public double getEquivalentSphereRadius() { if (sphereRadReady) return sphereRad; else { sphereRad = Math.pow(FACTOR * getVolume(), 1. / 3.); sphereRadReady = true; return sphereRad; } }
[ "public float sphereRadius() {\r\n\t\treturn LeapJNI.Hand_sphereRadius(this.swigCPtr, this);\r\n\t}", "public float getSphereRadius();", "public double getVolume(){\n\t\tdouble volume=(4.0/3)*Math.PI*Math.pow(radius,3.0);\t//calculate the volume of the sphere\n\t\treturn volume;\t//return the volume of the sphe...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Static method used to manually set the server to be used as the root for all requests by all KoLmafia clients running on the current JVM instance.
private static void setLoginServer( String server ) { for ( int i = 0; i < SERVERS.length; ++i ) if ( SERVERS[i][0].equals( server ) ) { KOL_HOST = SERVERS[i][0]; KOL_ROOT = "http://" + SERVERS[i][1] + "/"; } }
[ "public void setServer(Server server);", "public void startServer() {\n try {\n HttpServer server = HttpServer.create(new InetSocketAddress(8080), 0);\n server.createContext(\"/FXStub\", new FXRequestsHandler(adapter));\n server.setExecutor(null); // creates a default execu...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the "structuretype" attribute
public java.lang.String getStructuretype() { synchronized (monitor()) { check_orphaned(); org.apache.xmlbeans.SimpleValue target = null; target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user...
[ "java.lang.String getStructuretype();", "public java.lang.String getStructureType() {\n return structureType;\n }", "public org.apache.xmlbeans.XmlString xgetStructuretype()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get all values of property Taglabel as a ReactorResult of RDF2Go nodes
public static ReactorResult<org.ontoware.rdf2go.model.node.Node> getAllTaglabel_asNode_(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource) { return Base.getAll_as(model, instanceResource, TAGLABEL, org.ontoware.rdf2go.model.node.Node.class); }
[ "public ReactorResult<org.ontoware.rdf2go.model.node.Node> getAllTaglabel_asNode_() {\r\n\t\treturn Base.getAll_as(this.model, this.getResource(), TAGLABEL, org.ontoware.rdf2go.model.node.Node.class);\r\n\t}", "public ReactorResult<Thing> getAllTaglabel_as() {\r\n\t\treturn Base.getAll_as(this.model, this.getReso...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
optional .proto.CommonEventProto params1 = 1;
public com.funcy.g01.base.proto.bo.SynFightBoProtoBuffer.CommonEventProtoOrBuilder getParams1OrBuilder() { return params1_; }
[ "com.funcy.g01.base.proto.bo.SynFightBoProtoBuffer.CommonEventProto getParams1();", "com.funcy.g01.base.proto.bo.SynFightBoProtoBuffer.CommonEventProtoOrBuilder getParams1OrBuilder();", "public com.funcy.g01.base.proto.bo.SynFightBoProtoBuffer.CommonEventProto getParams1() {\n return params1_;\n }", "...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Car audi = new Audi(); Car byd = new Byd(); audi.run(); byd.run();
public static void main(String[] args) { CarFactory.createCar("audi").run(); CarFactory.createCar("byd").run(); }
[ "public static void main(String[] args){\n Car myCar = new Car();\n myCar.car_human();\n myCar.car_color(); \n }", "public static void main(String[] args) {\n\n Car c = new BasicCar();\n Car c1 = new SpyCar();\n Car c2 = new CarWithSunRoof();\n Car c3 = new SpyC...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Randomly make the stroke messy by at most 20 pixels off each Author: Travis
public static Stroke randomMessy(Stroke stroke) { java.util.Random rand = new java.util.Random(); Stroke newStroke = new Stroke(stroke); //change all points by a small random offset for(Point point : newStroke.getPoints()) point.setLocation(point.getX() + rand.nextInt(11) - rand.nextInt(11), point.g...
[ "public void hyperspace() {\n x = (int) (Math.random() * animation.getWidth());\n y = (int) (Math.random() * animation.getHeight());\n \n }", "public void randomStyle(DrawTextItem s) {\n\t\tString[] fontFamilies = {\"Monospace\", \"Helvetica\", \"TimesRoman\", \"Courier\", \"Serif\", \"San...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Find an object based on this identifier, based on the type. An identifier can be a UID, a name, an address. type can be a stripe or node or a cluster If node is requested, we try to find the object in the topology matching this identifier If stripe is requested, we try to find the stripe in the topology matching this i...
public Optional<? extends PropertyHolder> findObject(Cluster cluster, Scope type) { // UID ? UID uid; try { uid = UID.valueOf(identifier); } catch (RuntimeException e) { uid = null; } HostPort hostPort; try { hostPort = HostPort.parse(identifier, 9410); } catch (Runti...
[ "SyncRecord findObject(String name, int type) throws NotFoundException\r\n\t{\r\n\t\tfor (int i=0; i<syncTable.size(); i++)\r\n\t\t{\r\n\t\t\tSyncRecord myrec = (SyncRecord)syncTable.elementAt(i);\r\n\t\t\tif ((myrec.name).equals(name) && (myrec.type)==type)\r\n\t\t\t\treturn myrec;\r\n\t\t}\r\n\t\tthrow new NotFou...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Find by membro id and ativo.
public Optional<Personagem> findByMembroIdAndAtivo(String membroId, boolean ativo);
[ "public List<Personagem> findByMembroId(String id);", "public Tipo findByPrimaryKey(Integer idTipo) throws TipoDaoException;", "public Persona findByPrimaryKey(int idPersona) throws PersonaDaoException;", "Torneo find(String nombre);", "Charla encontrarPorId(Long idCharla) throws Exception;", "Perfil find...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the last review in the ordered set where articleId = &63;.
@Override public Review findByArticleId_Last(long articleId, OrderByComparator orderByComparator) throws NoSuchReviewException, SystemException { Review review = fetchByArticleId_Last(articleId, orderByComparator); if (review != null) { return review; } StringBundler msg = new StringBundler(4); msg...
[ "@Override\n\tpublic Review fetchByArticleId_Last(long articleId,\n\t\tOrderByComparator orderByComparator) throws SystemException {\n\t\tint count = countByArticleId(articleId);\n\n\t\tif (count == 0) {\n\t\t\treturn null;\n\t\t}\n\n\t\tList<Review> list = findByArticleId(articleId, count - 1, count,\n\t\t\t\torde...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Find k (tree.getK) nearest neighbors for specified tuple. Be aware that this method should not be executed twice at the same time because it stores searched tuple statically in KDNode.
public void find(DataTuple tuple) { KDNode.m_Tuple = tuple; find(); }
[ "public Set<? extends Position> findNearest(Position position, int k);", "public Iterable<Point2D> nearest(Point2D p, int k) {\n if (k == 0) {\n throw new NullPointerException();\n }\n \n if (p == null) {\n throw new NullPointerException();\n }\n MinPQ<P...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sends a verification email to the specified email.
@RequestMapping("sendVerificationMail") @ResponseBody public String sendVerificationMail(@RequestParam String email) { User user = userRepo.findByEmail(email); String id; if (user != null) { id = userRepo.findByEmail(email).getId(); eventPublisher .publishEvent(new OnRegistrationSuccessEvent(id, Stud...
[ "private void sendEmail() {\n final FirebaseUser user = auth.getCurrentUser();\n user.sendEmailVerification()\n .addOnCompleteListener(this, new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
set plan of study
public void setMyPlan(PlanOfStudy myPlan) { this.myPlan = myPlan; }
[ "public void setPlan(Plan plan) {\n this.plan = plan;\n }", "public void setPlan(String plan) {\n this.plan = plan;\n }", "public void setPlan(java.lang.String plan) {\n this.plan = plan;\n }", "public void setPlan( Plan plan ) {\n getUser().setPlan( plan );\n }", "public v...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get Chapters This method return chapters by manifest info, not NCX, if use ncx info, will show all list contents.
public Chapter[] getChapters(){ Chapter[] ret = null; if(chapters != null && !chapters.isEmpty()){ int size = chapters.size(); ret = new Chapter[size]; chapters.copyInto(ret); } return ret; }
[ "private void getAllChapter() {\n mChapterViewModel.prepareIntentAction(getIntent()).observe(this, chapterItems -> {\n\n mActivityChapterBinding.chapterShimmerViewContainer.setVisibility(View.GONE);\n mActivityChapterBinding.chapterShimmerViewContainer.stopShimmer();\n\n if (...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Busca una lista de acceso en la base de datos saitae por medio de su url Relativa
public List<Acceso> getAccesoByUrl(String url);
[ "public List<Acceso> listarAccesos() {\r\n\t\tList<Acceso> accesos = new ArrayList<>();\r\n\t\tif (!lista.isEmpty()) {\r\n\t\t\tfor (int i = 0; i < lista.size(); i++) {\r\n\t\t\t\tList<Acceso> accesosRol = dao.ejecutarNamedQuery(ConstantesNamedQueries.BUSCAR_ACCESO_ROL,\r\n\t\t\t\t\t\tlista.get(i));\r\n\t\t\t\tif (...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns a Collection of Sit209Vo instances from a Collection of Sit209 entities.
public static Collection<Sit209Vo> getInstances(Collection<Sit209> entities, boolean cascadable) throws Exception { Collection<Sit209Vo> vos = new ArrayList<Sit209Vo>(); for(Sit209 entity : entities){ vos.add(Sit209Vo.getInstance(entity, cascadable)); } return vos; }
[ "@Override\n\tpublic List<BookBinding> getAllBooks() {\n\t\tList<BookBinding> listOfBooks=new ArrayList<>();\n\t\t\n\t\t//retrieve all existing book records\n\t\tList<BookEntity> entities = repo.findAll();\n\t\t\n\t\t//convert BookEntites to BookBinding objs\n\t\tentities.forEach(entity->{\n\t\t\t//empty BookBindin...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the description that explains the usage of the Widget for users of assistive devices.
public String getDescriptionForAssistiveDevices() { return descriptionForAssisitveDevicesElement.getInnerText(); }
[ "String getDisplay_description();", "public java.lang.String getDescription() {\n return _app.getDescription();\n }", "public String getDescriptionText();", "java.lang.String getDescription();", "public String getDescription() {\n EditText descriptionField = (EditText) rootView.findViewById...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Method plays instrument sound at frequency given by user
public void playInstrumentAtFrequency(int instrument, double frequency) { // Declare score and sine wave instrument Score s = new Score(); s.setTempo(tempo); Part p = new Part(instrument); // Create note at pitch given by user (full note) Note freqNote = new Note(fre...
[ "public void playSoundAtFrequency(double frequency)\n {\n // Play sine wave\n playInstrumentAtFrequency(0, frequency);\n }", "public static void playSound()\n {\n // A sequence of frequencies and durations (eg 1400hz for 15ms, 1350hz for 15ms, etc)\n short[] fire = {1400, 15, ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test case for if the number matches the original number
@Test public void match(){ String result=ob.guess(76); assertEquals("Number guessed is matches the original number",result); }
[ "@Test\n public void testIsSameNumber() {\n int x = 1;\n int y = 1;\n int z = 2;\n\n assertEquals(true, Flik.isSameNumber(x, y));\n assertEquals(false, Flik.isSameNumber(x, z));\n }", "public void testMatches_NumberBasic() {\n checkMatchesNumber(\"5103337596\", \"51...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
A dumper for debugging purposes.
public void dump();
[ "void dump();", "IDumpManager dump();", "public void debugDump() {\n if (logger.isDebugEnabled()) {\n logger.debug(\"Command : {}\", getCommandString());\n logger.debug(\"System Return Code: {}\", getRc());\n logger.debug(\"Start time: {}\", getStartTime());\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This vendor_table_row_id belongs not to the "raw_material_vendor" table but to the "vendor" table to be able to deal with "dateProcessed" field in the "vendor" table
public String getVendor_table_row_id() { return vendor_table_row_id; }
[ "public void setVendorId(long vendorId) {\r\n this.vendorId = vendorId;\r\n }", "public void setVendorId(Long vendorId) {\n this.vendorId = vendorId;\n }", "public VendorDatePkCQ queryVendorDatePk() {\n return getConditionQueryVendorDatePk();\n }", "public void setRowVersion(Date...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates new form MD_STARTUP
public MD_STARTUP() { initComponents(); }
[ "public void createNew() {\n\t\tchooseTemplateScreen = new ChooseTemplate(con,primaryStage);\n\t\tchooseTemplateScreen.setPreviousScreen(mainMenuScreen);\n\t\tpreferencesScreen = new Preferences(con,primaryStage);\n\t\tpreferencesScreen.setPreviousScreen(chooseTemplateScreen);\n\t\tdesignGardenScreen = new DesignGa...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns this rational number as a string.
public String toString() { String result; if (numerator == 0) result = "0"; else if (denominator == 1) result = numerator + ""; else result = numerator + "/" + denominator; return result; }
[ "public String toString() {\n return String.valueOf(this.number);\n }", "public String toString() {\r\n\t\t\r\n\t\tDecimalFormat df = new DecimalFormat();\r\n\t\tdf.setMaximumFractionDigits(5);\r\n\t\tdf.setMinimumFractionDigits(0);\r\n\t\tdf.setGroupingUsed(false);\r\n\r\n\t\tString sign = \"\";\r\n\t\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
`status: Not Mapped` coredatatypereference: BIAN::DataTypesLibrary::CoreDataTypes::ISO20022andUNCEFACT::Identifier generalinfo: Reference to the account which is linked to Employee Commission Agreement
public String getEmployeeCommissionAgreementAccountReference() { return employeeCommissionAgreementAccountReference; }
[ "LegalAgreement getLegalAgreement();", "public Record loadOrganizationAdditionalInfo(Record inputRecord);", "au.gov.asic.types.AddressExtType.CareOf xgetCareOf();", "@SuppressWarnings(\"all\")\npublic interface I_LBR_NotaFiscalDocRef \n{\n\n /** TableName=LBR_NotaFiscalDocRef */\n public static final St...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a RestrictInputDocument with the specified characters allowed.
public RestrictInputDocument(String allowChars, String text) { this.allowChars = allowChars; try { // Exception can't happen getContent().insertString(0, text); } catch (BadLocationException ignore) { } }
[ "public void setAllowedchars(String allowedchars) {\r\n super.setAllowedchars (allowedchars);\r\n }", "public MaskedPlainDocument(String mask)\r\n {\r\n this(mask, NO_MAX_LENGTH);\r\n }", "public MaskedPlainDocument(String mask, int maxLength)\r\n {\r\n this.mask = mask;\r\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Register a stage with the StageManager
public static void registerStage(String stageName, IStage stage) { stageQueues_.put(stageName, stage); }
[ "public void setStage(Stage stage) { this.stage = stage; }", "public void setStage (Stage stage) {\r\n this.stage = stage;\r\n }", "public void setStage() {\n\t\tSystem.out.println(\"\tGuiHandler.setStage() ### new instance for stage.\");\n\t\tstage = new Stage(new ScreenViewport(), guiBatch);\n\t\tst...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Draws the description of the y values.
private void drawDescriptionY(Graphics2D g2, int originY) { AffineTransform defaultAt = g2.getTransform(); AffineTransform at = new AffineTransform(); at.rotate(-Math.PI / 2); g2.setTransform(at); String description = barChart.getDescriptionY(); int heightOfDescription ...
[ "private void drawYValues(Graphics2D chartGraphics) {\n if (!showYAxisValues) {\n return;\n }\n\n chartGraphics.setColor(axisValuesColour);\n\n for (int i = 0; i < yValues.length; i++) {\n if (i % yAxisValuesFrequency != 0) {\n continue;\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__Output__Group_0__2" $ANTLR start "rule__Output__Group_0__2__Impl" InternalWh.g:952:1: rule__Output__Group_0__2__Impl : ( ( rule__Output__OutputAssignment_0_2 ) ) ;
public final void rule__Output__Group_0__2__Impl() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalWh.g:956:1: ( ( ( rule__Output__OutputAssignment_0_2 ) ) ) // InternalWh.g:957:1: ( ( rule__Output__OutputAssignment_0_2 ) ) ...
[ "public final void rule__Output__Group_0__2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalWh.g:945:1: ( rule__Output__Group_0__2__Impl )\n // InternalWh.g:946:2: rule__Output__Group_0__2__Impl\n {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get index table statistics
TableStatistics getStatistics() throws IOException { TableStatistics stats = indexTable.getStatistics(); stats.indexColumn = colIndex; return stats; }
[ "@Override\n public IndexStatistics getStatistics() {\n return internalIndexStats;\n }", "public InnodbIndexStats() {\n this(DSL.name(\"innodb_index_stats\"), null);\n }", "public TableDescriptor[] updateIndexStatisticsFor()\n throws StandardException{\n // Do nothing, overridde...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Method to save shop details. First it saves primary shop details through Shop Management Micro Service. Then it uses the created shop id to save shop location ( longitude and latitude) along with the corresponding shop id through Shop Locator Micro Service.
public ShopResponseTO saveShop(String shopName, String shopAddressNumber, String shopAddressPostcode) throws ParseException { final String shopManagementUri = "http://localhost:8083/add"; RestTemplate restTemplate = new RestTemplate(); ShopTO shopTO = new ShopTO(); shopTO.setName(shopName); ...
[ "public void saveShops(final ShopModel shop) {\n Realm realm = Realm.getDefaultInstance();\n\n realm.executeTransaction(new Realm.Transaction() {\n @Override\n public void execute(Realm realm) {\n realm.copyToRealmOrUpdate(getShopRealmModel(shop));\n }\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
convert String to Map
public static Map<String, String> convertStringToMap(String a) { Map<String, String> mapConvert = new HashMap<String, String>(); String[] pairs = a.split(","); for (int i = 0; i < pairs.length; i++) { String pair = pairs[i]; String[] keyValue = pair.split(":"); mapConvert.put(keyValue[0], keyValue[1]); ...
[ "public static Map<String, String> toMap(String input) {\n return toMap(input, false);\n }", "public static Map<String,String> stringToMap( String s )\n {\n return stringToMap( s, UtilString.sSeparator, \"=\" );\n }", "@SuppressWarnings(\"rawtypes\")\n\tpublic static Map stringToMap(Strin...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test that job status events properly process their notification template variables.
@Test(dataProvider="processJobStatusEventsProvider") public void processJobStatusEvents(JobStatusType status) throws Exception { Software software = createSoftware(); Job job = createJob(status, software); Notification notification = createNotification(job); JobNotificationEvent event = (JobNotificat...
[ "@Test(dataProvider=\"processJobAssociationEventsProvider\")\n\tpublic void processJobSystemEvents(JobStatusType status) \n\tthrows Exception \n\t{\n\t\tSoftware software = createSoftware();\n\t\tJob job = createJob(status, software);\n\t\t\n\t\tNotification notification = createJobSystemNotification(job, software....
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Execute a shell command in sudo mode on a remote vm
public void executeSudoCommand(String vmIpAddress, String userName, String password, String command) { executeCommand(vmIpAddress, userName, password, String.format("echo %s | sudo -S -p '' %s", password, command)); }
[ "public String execSudoCommand(String command, CommandExecProgressMonitor monitor) throws ExecutionException{\r\n command = \"sudo -S -p '' \"+command;\r\n Session sshSession = sm.getSession();\r\n if(sshSession == null) throw new ExecutionException(\"Can't start ssh session with se...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
set the workgroup of the search forms
public void setWorkGroup( String workgroup ) { _strWorkgroup = workgroup; }
[ "public SearchActionGroup(IWorkbenchSite site) {\r\n\t\t\r\n\t\tfSearch = new SearchRepositoryAction(site);\r\n\t\t\r\n\t\tISelectionProvider provider = site.getSelectionProvider();\r\n\t\tISelection selection = provider.getSelection();\r\n\t\t\r\n\t\tfSearch.update(selection);\r\n\t\tprovider.addSelectionChangedLi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
return the double linked list of the mails to be shown
public doubleLinkedList getMailsToBeShown() { return mailsToBeShown; }
[ "public doubleLinkedList getMails(){\r\n return mails;\r\n }", "public List<Mail> getIncomingMailList(final String yopmailUserName, final int page) throws IOException{\n\t\tResponse res = Jsoup.connect(new StringBuffer().append(YOPMAIL_BASE_URL).append(\"inbox.php?login=\").append(yopmailUserName.toLowe...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }