query
stringlengths
7
33.1k
document
stringlengths
7
335k
metadata
dict
negatives
listlengths
3
101
negative_scores
listlengths
3
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
// Getter(s) & Setter(s) // // // Public Methods // (alphabetical order) // // Many of these public methods are intended for use by the // BankProtocol class, which specifies how incoming requests // are handled // Adds given amount to given account, providing a general method for testing and future development.
public BankAccount addFunds(int theAcctNum, double amtToAdd) { BankAccount currentBankAccount; // find BankAccount from Bank's account -> BankAccount HashMap currentBankAccount = hashMapOfAllAccts.get(theAcctNum); if ( currentBankAccount == null) { // if no account was found, generate a generic empty account currentBankAccount = new BankAccount(); } else { // increase funds by amtToAdd currentBankAccount.increaseTotalBalance(amtToAdd); } updateBankDisplay(); return currentBankAccount; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface AccountService\n{\n /**\n * Retrieves current balance or zero if addAmount() method was not called before for specified id\n *\n * @param id balance identifier\n */\n Long getAmount(Integer id) throws Exception;\n /**\n * Increases balance or set if addAmount() method ...
[ "0.71383613", "0.7032877", "0.6949454", "0.6830787", "0.6804142", "0.6728785", "0.6717977", "0.67048836", "0.6679286", "0.6640574", "0.6601456", "0.6574257", "0.6545663", "0.65134436", "0.6473763", "0.64242876", "0.64186287", "0.6397964", "0.6393188", "0.6390304", "0.6390304"...
0.0
-1
Provides a way to (1) check an account to see if it has at least a certain amount of unfrozen funds, and if so, to (2) freeze that amount in funds
public boolean checkAndFreezeFunds (int secretKey, double proposedFreeze) { int theBankAccountNumber; // use AccountLink and secret key to get actual Bank Account number AccountLink theAccountLink = hashMapOfSecretKeys.get(secretKey); if ( theAccountLink != null ) { theBankAccountNumber = theAccountLink.getAGENT_ACCOUNT_NUMBER(); } else { return false; } // use account number to get full BankAccount BankAccount theBankAccount = hashMapOfAllAccts.get(theBankAccountNumber); // ask BankAccount to check and (if possible) freeze the amount boolean fundsFrozen = theBankAccount.checkAndFreeze(proposedFreeze); if (fundsFrozen) { updateBankDisplay(); } return fundsFrozen; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean unfreezeFunds (int secretKey, double amtToUnfreeze) {\n\n int theBankAccountNumber;\n // use AccountLink and secret key to get actual Bank Account number\n AccountLink theAccountLink = hashMapOfSecretKeys.get(secretKey);\n if ( theAccountLink != null ) {\n theB...
[ "0.6995754", "0.65030634", "0.647705", "0.6397417", "0.63906044", "0.63249743", "0.6267356", "0.6241632", "0.6222127", "0.62090904", "0.6165932", "0.6159289", "0.61373436", "0.61357844", "0.60802466", "0.6079298", "0.6033948", "0.60029376", "0.5970575", "0.5963727", "0.593269...
0.759028
0
Basically, if request is legitimate, then remove associated item(s) from the: (1) hashMapOfAllAccts (2) listOfAuctionHouseIDRecords; (3) listOfAgentIDRecords (4) hashMapOfSecretKeys For closure requests from an Auction House, simply comply with request any unrealized gains from frozenbutnottransferred funds from agent accounts is ignored For closure requests from an Agent, comply with request only if agent account has no frozen funds. Frozen funds indicate a transfer that is pending. (0) extract the Bank Account Number
public BankAccount closeAccount ( IDRecord theIDRecord ) { int theBankAccountNumber = theIDRecord.getNumericalID(); // (1) Get the actual BankAccount BankAccount theBankAccount = hashMapOfAllAccts.get(theBankAccountNumber); // (2) If such a BankAccount actually exists ... if (theBankAccount != null) { // (3) Check if we're dealing with an Auction House if ( theBankAccount.getAccountType() == BankAccount.AccountType.AUCTION_HOUSE) { // 3(a) Remove account from hashMapOfAllAccts hashMapOfAllAccts.remove(theBankAccountNumber); // 3(b) Remove account from listOfAuctionHouseIDRecords // Complicated because process doesn't know how to compare // IDRecords (IDRecord class not over-riding .equals() method), // so using list.remove(Obj) does not work! // so we try something different … int indexToRemove = -1; for(int i = 0; i < listOfAuctionHouseIDRecords.size(); i++){ int tempAcctNum = (listOfAuctionHouseIDRecords.get(i)).getNumericalID(); if (tempAcctNum == theBankAccountNumber ) { indexToRemove = i; break; } } if ( indexToRemove >= 0 ) { listOfAuctionHouseIDRecords.remove(indexToRemove); } // 3(c) More difficult: remove from the HashMap of secretKeys Set<Integer> setOfSecretKeys = hashMapOfSecretKeys.keySet(); List<Integer> secretKeysToRemove = new ArrayList<>(); for (int i : setOfSecretKeys) { int tempAcctNum = (hashMapOfSecretKeys.get(i)).getAH_ACCOUNT_NUMBER(); if ( tempAcctNum == theBankAccountNumber ) { secretKeysToRemove.add(i); } } // and only THEN remove the HashMap items // associated with those saved secretKeyToRemove items: if (secretKeysToRemove.size() > 0) { for (int i = 0; i < secretKeysToRemove.size(); i++) { hashMapOfSecretKeys.remove(secretKeysToRemove.get(i)); } } // 3(d) then update display and return BankAccount updateBankDisplay(); return theBankAccount; } // (4) if account type is AGENT and Agent has no frozen funds else if ( theBankAccount.getAccountType() == BankAccount.AccountType.AGENT && theBankAccount.getTotalFrozen() == 0.0) { // 4(a) Remove account from hashMapOfAllAccts hashMapOfAllAccts.remove(theBankAccountNumber); // 4(b) Remove account from listOfAgentIDRecords // Complicated because process doesn't know how to compare // IDRecords (IDRecord class not over-riding .equals() method), // so using list.remove(Obj) does not work! // so we try something different … int indexToRemove = -1; for ( int i = 0; i < listOfAgentIDRecords.size(); i++ ) { int tempAcctNum = (listOfAgentIDRecords.get(i)).getNumericalID(); if (tempAcctNum == theBankAccountNumber ) { indexToRemove = i; break; } } if ( indexToRemove >= 0 ) { listOfAgentIDRecords.remove(indexToRemove); } // 4(c) More difficult: remove from the HashMap of secretKeys Set<Integer> setOfSecretKeys = hashMapOfSecretKeys.keySet(); List<Integer> secretKeysToRemove = new ArrayList<>(); for (int i : setOfSecretKeys) { int tempAcctNum = (hashMapOfSecretKeys.get(i)).getAGENT_ACCOUNT_NUMBER(); if ( tempAcctNum == theBankAccountNumber ) { secretKeysToRemove.add(i); } } // and only THEN remove the HashMap items // associated with those saved secretKeyToRemove items: if (secretKeysToRemove.size() > 0) { for (int i = 0; i < secretKeysToRemove.size(); i++) { hashMapOfSecretKeys.remove(secretKeysToRemove.get(i)); } } // 4(d) then update display and return BankAccount updateBankDisplay(); return theBankAccount; } else { // valid BankAccount but: // not an auction house // not an agent with 0 frozen funds return new BankAccount(); } } else { // null BankAccount -- cannot close return new BankAccount(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public List<PooledTransaction> removeTxsWithNonceLessThan(Map<AionAddress, BigInteger> accNonce) {\n\n List<ByteArrayWrapper> bwList = new ArrayList<>();\n for (Map.Entry<AionAddress, BigInteger> en1 : accNonce.entrySet()) {\n AccountState as = this.getAccView(en1.getKey());...
[ "0.604285", "0.56544316", "0.5614964", "0.5525384", "0.5510153", "0.5322523", "0.53167", "0.53139347", "0.5232418", "0.5166614", "0.51638836", "0.5159621", "0.5158647", "0.5121455", "0.5091757", "0.50639796", "0.5040556", "0.50275105", "0.502187", "0.5009209", "0.5004569", ...
0.6614612
0
Creates an account with the Bank, using information in the given IDRecord to create a BankAccount object of type AGENT or AUCTION_HOUSE.
public IDRecord createAccount(IDRecord theIDRecord) { IDRecord updatedIDRecord = theIDRecord; // pull out or generate info for BankAccount String userName = updatedIDRecord.getName(); // generate an account number int acctNum = getUniqueAccountNumber(); double initBalance = updatedIDRecord.getInitialBalance(); updatedIDRecord.setNumericalID(acctNum); // Formalize info into an actual BankAccount object. // Some as-yet unused options here for future development. BankAccount.AccountType baType; switch (updatedIDRecord.getRecordType()) { case AGENT: baType = BankAccount.AccountType.AGENT; break; case AUCTION_HOUSE: baType = BankAccount.AccountType.AUCTION_HOUSE; break; case BANK: baType = BankAccount.AccountType.BANK; break; default: baType = BankAccount.AccountType.OTHER; break; } BankAccount newBankAccount = new BankAccount(baType, userName, acctNum, initBalance); // Update Bank's list(s) of accounts. // Note: at account initiation, secretKeys HashMap not relevant. hashMapOfAllAccts.put(acctNum, newBankAccount); if (baType == BankAccount.AccountType.AUCTION_HOUSE) { listOfAuctionHouseIDRecords.add(updatedIDRecord); } else if (baType == BankAccount.AccountType.AGENT) { listOfAgentIDRecords.add(updatedIDRecord); } // Send requests to the BankDisplay thread to update display // to reflect new account information updateBankDisplay(); return updatedIDRecord; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Account create();", "@Override\n\tpublic void createAccount(String username, Bank bank) {\n\t\ttry {\n\t\tAccount newAccount = new Account(username, bank.getBankID(), bank.getNumOfAccounts()+1);\n\t\tbank.setNumOfAccounts(bank.getNumOfAccounts()+1);\n\t\taddAccount(bank, newAccount);\n\t\t}catch(NullPointerExcep...
[ "0.6347872", "0.6293336", "0.6246937", "0.6200399", "0.6102208", "0.60880244", "0.60770845", "0.607569", "0.598044", "0.5974487", "0.59423447", "0.5887922", "0.58776546", "0.5873148", "0.58022696", "0.5791693", "0.57887864", "0.57791275", "0.5777508", "0.5708969", "0.5676835"...
0.7492748
0
Generates and returns an integer "secret key" used to link an Agent account with an Auction House account, enabling the Agent and Auction House to do business with each other.
public int createSecretKey (AccountLink theAccountLink) { // should verify that the accountlink contains valid account #s // generate a unique secret key int aSecretKey = getUniqueSecretKey(); // store away that secret key in HashMap with theAccountLink hashMapOfSecretKeys.put(aSecretKey, theAccountLink); return aSecretKey; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private int generateSecret() {\n int secret = secretGenerator.nextInt();\n while (secretToNumber.containsKey(secret)) {\n secret = secretGenerator.nextInt();\n }\n return secret;\n }", "private String generateSecretKey(){\n SecureRandom random = new SecureRandom()...
[ "0.71376276", "0.6868146", "0.6675181", "0.6640646", "0.6624613", "0.6474579", "0.640111", "0.640111", "0.6319254", "0.62398577", "0.622042", "0.61811656", "0.6162589", "0.6145378", "0.61447984", "0.61176556", "0.6111983", "0.60149455", "0.6005208", "0.5991149", "0.5983259", ...
0.6984137
1
Gets account balance information for the account whose account number appears in the given IDRecord.
public BankAccount getBalance (IDRecord idRecord) { BankAccount currentBankAccount; // extract the bank account number int theAcctNum = idRecord.getNumericalID(); // find BankAccount from account -> BankAccount HashMap currentBankAccount = hashMapOfAllAccts.get(theAcctNum); if ( currentBankAccount == null) { // if no account was found, generate a generic empty account currentBankAccount = new BankAccount(); } return currentBankAccount; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void getBalance( Integer account_id ){\r\n\r\n Map<String, String> params = new HashMap<>();\r\n params.put(\"account_id\", String.valueOf(account_id));\r\n String url = API_DOMAIN + ACCOUNT_EXT + GET_BALANCE;\r\n this.makeVolleyRequest( url, params );\r\n }", "public Intege...
[ "0.6941769", "0.67512137", "0.64640075", "0.62407863", "0.61844534", "0.6048157", "0.5966289", "0.5966088", "0.59541625", "0.59287167", "0.5883991", "0.58536047", "0.5852192", "0.5839167", "0.58292794", "0.5820739", "0.5815158", "0.5802237", "0.57926095", "0.5769144", "0.5768...
0.81280625
0
Gets a BankAccount object associated with a secret key. Not all BankAccount objects have an associated secret key, just those for Agents who have joined up to do business with a specific chosen Auction House.
public BankAccount getBankAccount (int secretKey) { // using a secretKey to obtain a BankAccount means/assumes that // the BankAccount belongs to an Agent that has been involved in // an AuctionHouse-linked transaction int theBankAccountNumber; // use the secretKey to get associated AccountLink AccountLink theAccountLink = hashMapOfSecretKeys.get(secretKey); if (theAccountLink != null) { // i.e. secret key was valid theBankAccountNumber = theAccountLink.getAGENT_ACCOUNT_NUMBER(); } else { // secretKey appears to be invalid, return generic BankAccount return new BankAccount(); } // return the associated BankAccount return hashMapOfAllAccts.get(theBankAccountNumber); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public BankAccount getBalance (IDRecord idRecord) {\n\n BankAccount currentBankAccount;\n // extract the bank account number\n int theAcctNum = idRecord.getNumericalID();\n\n // find BankAccount from account -> BankAccount HashMap\n currentBankAccount = hashMapOfAllAccts.get(theA...
[ "0.5994032", "0.5816724", "0.5743985", "0.56986123", "0.5634716", "0.54490685", "0.5419221", "0.5413661", "0.5400861", "0.53964305", "0.5363028", "0.53553385", "0.53428143", "0.5340093", "0.53367597", "0.5336016", "0.53277653", "0.52973163", "0.52439666", "0.52258724", "0.521...
0.8660592
0
Returns an ArrayList of Auction House IDRecords corresponding to Auction Houses currently having accounts with the Bank. The ArrayList might be empty, but should never be null.
public ArrayList<IDRecord> getListOfAuctionHouses () { return listOfAuctionHouseIDRecords; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ArrayList<BankAccount> getAccounts() {\n\t\tString sql = \"SELECT id, name, balance, balance_saving FROM accounts WHERE id > ?\";\n\n\t\tArrayList<BankAccount> bankAccounts = new ArrayList<>();\n\n\t\ttry (PreparedStatement pstmt = dbConnection.prepareStatement(sql)) {\n\t\t\t// set the value\n\t\t\tpstmt.s...
[ "0.6938644", "0.59412223", "0.5869849", "0.586686", "0.58604044", "0.5812392", "0.5811076", "0.5715424", "0.56844217", "0.56753445", "0.5662046", "0.56431043", "0.5587435", "0.5561188", "0.5535648", "0.55338985", "0.5524213", "0.5485177", "0.5474698", "0.54484504", "0.5426678...
0.692578
1
Checks if it is safe for the Bank to close basically returning false if the Bank has any active client accounts.
public boolean safeToClose(){ if(hashMapOfAllAccts.isEmpty()){ return true; } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean checkAccountClosed() {\n return this.accountStatus == \"Closed\";\n }", "@Override\r\n\tpublic boolean close() {\n\t\taccountStatus = AccountStatus.CLOSED;\r\n\t\treturn true;\r\n\t}", "@Override\r\n\tpublic boolean closeAccount() {\n\t\treturn false;\r\n\t}", "private boolean verify...
[ "0.68332636", "0.682443", "0.66895556", "0.6613559", "0.6173545", "0.6122301", "0.5916414", "0.5909536", "0.58636737", "0.58496475", "0.58465767", "0.5815036", "0.58040243", "0.5792064", "0.57606286", "0.57423574", "0.5729639", "0.57282484", "0.56714886", "0.56327814", "0.562...
0.6812606
2
Transfers the specified amount from one account to another, with the secret key specifying a LinkedAccount object giving the source and target/destination accounts for the transfer. Transfer executed only if there are frozen funds in the source account equal to or greater than the desired transfer amount. If frozen funds less than desired transferred amount, no money is transferred at all.
public boolean transferFunds (int secretKey, double amtToTransfer) { int sourceBankAccountNumber; // account FROM which to transfer int targetBankAccountNumber; // account TO which to transfer // use secretKey to obtain AccountLink, which will contains the // source and target BankAccount numbers AccountLink theAccountLink = hashMapOfSecretKeys.get(secretKey); if ( theAccountLink != null ) { // i.e. secretKey was valid sourceBankAccountNumber = theAccountLink.getAGENT_ACCOUNT_NUMBER(); targetBankAccountNumber = theAccountLink.getAH_ACCOUNT_NUMBER(); } else { // secretKey appears invalid; no transfer possible return false; } // use account numbers to get full BankAccounts BankAccount sourceBankAccount = hashMapOfAllAccts.get(sourceBankAccountNumber); BankAccount targetBankAccount = hashMapOfAllAccts.get(targetBankAccountNumber); // ask source BankAccount to delete amtToTransfer (if possible) // This effects a transfer only if frozen funds >= amtToTransfer boolean fundsTakenFromSource = sourceBankAccount.decreaseFrozenAndBalance(amtToTransfer); // if funds were able to be taken from source, then add amt to target if ( fundsTakenFromSource ) { targetBankAccount.increaseTotalBalance(amtToTransfer); updateBankDisplay(); } else { return false; // b/c funds could not be taken from source } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void transfer(int fromId, int toId, long amount) {\n synchronized (accounts.get(fromId)){\n synchronized (accounts.get(toId)){\n try {\n accounts.get(fromId).withdraw(amount);\n accounts.get(toId).deposit(amount);\n ...
[ "0.67248696", "0.63708854", "0.62458354", "0.6203385", "0.62003225", "0.6174711", "0.61744326", "0.6172515", "0.6168337", "0.6161564", "0.61532587", "0.61136067", "0.609971", "0.606204", "0.6050565", "0.6007154", "0.595342", "0.5952071", "0.5866902", "0.58448964", "0.57871324...
0.68155426
0
Unfreezes funds in an account if the account's frozen funds exceed the amount specified. If frozen funds are less than specified amount, entire request is rejected.
public boolean unfreezeFunds (int secretKey, double amtToUnfreeze) { int theBankAccountNumber; // use AccountLink and secret key to get actual Bank Account number AccountLink theAccountLink = hashMapOfSecretKeys.get(secretKey); if ( theAccountLink != null ) { theBankAccountNumber = theAccountLink.getAGENT_ACCOUNT_NUMBER(); } else { return false; } // use account number to get full BankAccount BankAccount theBankAccount = hashMapOfAllAccts.get(theBankAccountNumber); // ask BankAccount to check and (if possible) un-freeze the amount boolean fundsUnfrozen = theBankAccount.decreaseFreeze(amtToUnfreeze); if ( fundsUnfrozen ) { updateBankDisplay(); } return fundsUnfrozen; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void withdraw(int amount) throws RejectedException {\n if (amount < 0) {\n throw new RejectedException(\n \"Tried to withdraw negative value, illegal value: \" + amount + \".\" + accountInfo());\n }\n if (balance - amount < 0) {\n throw new Rejec...
[ "0.62830687", "0.61854064", "0.6098351", "0.60064036", "0.5922863", "0.5882269", "0.58416003", "0.5771817", "0.576976", "0.5755885", "0.5726423", "0.57263136", "0.5711962", "0.56990373", "0.5694109", "0.56828547", "0.565784", "0.5655413", "0.5641163", "0.5618948", "0.5596072"...
0.72655123
0
// Private Utility Fxns // // Establishes the Bank's BankProtocol (handing it a reference to the Bank) and the Bank's NotificationServer (using a port number defined elsewhere and the BankProtocol object). The corresponding NotificationServer created is then started on its own thread.
private void bankSetup() throws IOException { bankProtocol = new BankProtocol(this); notificationServer = new NotificationServer(portNumber, bankProtocol); Thread serverThread = new Thread(notificationServer); serverThread.start(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface BankServerOperations \n{\n boolean checkAcntNum (int acntNum);\n boolean checkAcntStatus (int acntNum);\n boolean verifyAcntPin (int acntNum, int acntPin);\n void lockAcnt (int acntNum);\n void makeDeposit (int acntNum, int amount);\n void makeWithdrawal (int acntNum, int amount);\n double ...
[ "0.5938728", "0.5786679", "0.52690274", "0.52512485", "0.5220769", "0.5218953", "0.52113336", "0.51456445", "0.51414424", "0.5127556", "0.5107444", "0.50393987", "0.5008828", "0.49879587", "0.49700746", "0.4946824", "0.49028605", "0.48843786", "0.48789713", "0.4874133", "0.48...
0.7582862
0
Private Bank utility function used internally to generate unique random integer values for account numbers. Should probably be synchronized at some point.
private int getUniqueAccountNumber () { int minInt = 100000; int maxInt = 999999; int candidateNumber = -1; Set<Integer> listOfCurrentAccountNumbers = hashMapOfAllAccts.keySet(); boolean numberIsUnique = false; while ( !numberIsUnique ) { candidateNumber = rng.nextInt(maxInt+1); // assume unique for a moment numberIsUnique = true; // verify uniqueness assumption for ( int acctNum : listOfCurrentAccountNumbers) { if (candidateNumber == acctNum) { numberIsUnique = false; break; } } // end for() loop } // end while() loop return candidateNumber; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static long getRandAccount() {\n int bid = rand.nextInt(noOfBranches);\n return getRandAccountFromBranch(bid);\n }", "@Override\r\n\tpublic int generateAccountId() {\n\t\tint AccountId = (int) (Math.random()*10000);\r\n\t\treturn 0;\r\n\t}", "private static String accountNumberGenerato...
[ "0.73262525", "0.72265667", "0.7200366", "0.7014024", "0.6765232", "0.6723574", "0.6718331", "0.67164826", "0.66797245", "0.6621647", "0.6605637", "0.66029453", "0.65922767", "0.65839", "0.64813083", "0.6479352", "0.64786196", "0.646382", "0.64535403", "0.64051116", "0.640126...
0.72770923
1
Private Bank utility function used internally to generate unique random integer values for socalled secret keys. Should probably be synchronized at some point. Note: at the time of this writing, this method uses the same process as the one for generating unique bank account numbers, but I wanted to keep it separate so we have the option for the two processes to produce different types of values.
private int getUniqueSecretKey () { int minInt = 100000; int maxInt = 999999; int candidateNumber = -1; Set<Integer> listOfCurrentSecretKeys = hashMapOfSecretKeys.keySet(); boolean numberIsUnique = false; while ( !numberIsUnique ) { candidateNumber = rng.nextInt(maxInt+1); // assume unique for a moment numberIsUnique = true; // verify uniqueness assumption for ( int theNum : listOfCurrentSecretKeys) { if (candidateNumber == theNum) { numberIsUnique = false; break; } } // end for() loop } // end while() loop return candidateNumber; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private int generateSecret() {\n int secret = secretGenerator.nextInt();\n while (secretToNumber.containsKey(secret)) {\n secret = secretGenerator.nextInt();\n }\n return secret;\n }", "public void generateNewSecret() {\r\n \r\n //Get Random Numb...
[ "0.73508584", "0.69375", "0.6662605", "0.6654195", "0.65327305", "0.63463545", "0.6337608", "0.63046896", "0.6195871", "0.6195605", "0.6077438", "0.60590285", "0.6055082", "0.60433567", "0.5983581", "0.5976676", "0.5971502", "0.5958796", "0.59465444", "0.5936774", "0.59188", ...
0.7065732
1
read from a reader
public static String readerToText(Reader reader) { StringBuilder sbf = new StringBuilder(); try (BufferedReader br = new BufferedReader(reader)) { String str = null; while ((str = br.readLine()) != null) { sbf.append(str).append('\n'); } return sbf.toString(); } catch (Exception e) { logger.error("Error while reading from reader. {}", e.getMessage()); return ""; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void doReads(Reader reader) throws IOException;", "protected abstract Reader read() throws IOException;", "public void read(DataInputStream reader) throws Exception\r\n\t{\n\r\n\t}", "protected abstract Reader getReader() throws IOException;", "StreamReader underlyingReader();", "Read createRead()...
[ "0.77527666", "0.740972", "0.71159947", "0.70808464", "0.7038251", "0.6944839", "0.68925375", "0.65161794", "0.65006804", "0.63660014", "0.6359796", "0.6336665", "0.63311356", "0.6311364", "0.63022745", "0.6293297", "0.6278558", "0.6263555", "0.6253849", "0.6253849", "0.62514...
0.0
-1
read input stream into a string
public static String streamToText(InputStream stream) { try { return readerToText(new InputStreamReader(stream, AppConventions.CHAR_ENCODING)); } catch (UnsupportedEncodingException e) { logger.error("Error while reading from reader. {}", e.getMessage()); return ""; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static String loadStream(InputStream in) throws IOException {\n int ptr = 0;\n in = new BufferedInputStream(in);\n StringBuffer buffer = new StringBuffer();\n while( (ptr = in.read()) != -1 ) {\n buffer.append((char)ptr);\n }\n return buffer.toString();\n }",...
[ "0.7962911", "0.783678", "0.7833194", "0.75876534", "0.7585936", "0.7584581", "0.75127864", "0.74981433", "0.74932134", "0.748034", "0.7453357", "0.7373577", "0.7359161", "0.72948086", "0.7293387", "0.7287817", "0.7264337", "0.7264337", "0.7251058", "0.7245696", "0.7245696", ...
0.0
-1
read a resource into text
public static String readResource(String fileOrResourceName) { try (InputStream stream = getStream(fileOrResourceName)) { if (stream != null) { return readerToText(new InputStreamReader(stream, AppConventions.CHAR_ENCODING)); } } catch (Exception e) { logger.error("Exception while reading resource {} using. Error: {}", fileOrResourceName, e.getMessage()); } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private String readResource(String name) throws IOException {\n ClassLoader cl = Thread.currentThread().getContextClassLoader();\n try (InputStream in = cl.getResourceAsStream(name)) {\n return new String(EncodingUtils.readAll(in), StandardCharsets.US_ASCII);\n }\n }", "public static String readSt...
[ "0.6900428", "0.66612077", "0.6551499", "0.653987", "0.64540875", "0.64365095", "0.6431172", "0.63921386", "0.63728344", "0.63339394", "0.63211304", "0.6305369", "0.629332", "0.6265062", "0.626062", "0.626062", "0.6258269", "0.62191445", "0.6197016", "0.6196588", "0.6166811",...
0.60389453
24
creates a stream for the resource from file system or using class loader
public static InputStream getStream(String fileOrResourceName) { /* * in production, it is a resource, and hence we try that first */ InputStream stream = IoUtil.class.getClassLoader().getResourceAsStream(fileOrResourceName); if (stream != null) { return stream; } File file = new File(fileOrResourceName); if (file.exists()) { try { return new FileInputStream(file); } catch (Exception e) { logger.error( "Resource {} is intepreted as a file that was located on the file system, but error while creating stream from that file. Error: {}", fileOrResourceName, e.getMessage()); } } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected abstract InputStream getStream(String resource);", "private static InputStream getStream(String inResName) {\n\n ClassLoader loader = Thread.currentThread().getContextClassLoader();\n InputStream is = loader.getResourceAsStream(inResName);\n if (is == null) {\n log.error(\"Resource '\" + ...
[ "0.7431515", "0.66465276", "0.65493244", "0.6461497", "0.63776964", "0.6373441", "0.6351597", "0.63488966", "0.6313311", "0.630935", "0.6220959", "0.62104326", "0.6131166", "0.6112338", "0.6103823", "0.6077233", "0.60528237", "0.6026589", "0.6017411", "0.5997438", "0.5957848"...
0.6190987
12
create some sample data
@RequestMapping(method = RequestMethod.GET, params = { "pdf" }) public ModelAndView pdfMethod() { List<Book> listBooks = new ArrayList<Book>(); listBooks.add(new Book("Spring in Action", "Craig Walls", "1935182358", "June 29th 2011", 31.98F)); listBooks.add( new Book("Spring in Practice", "Willie Wheeler, Joshua White", "1935182056", "May 16th 2013", 31.95F)); listBooks.add(new Book("Pro Spring 3", "Clarence Ho, Rob Harrop", "1430241071", "April 18th 2012", 31.85F)); listBooks.add( new Book("Spring Integration in Action", "Mark Fisher", "1935182439", "September 26th 2012", 28.73F)); // return a view which will be resolved by an excel view resolver return new ModelAndView("pdfView", "listBooks", listBooks); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void addSampleData() {\r\n }", "private void populateData() {\n\t\tList<TrafficRecord> l = TestHelper.getSampleData();\r\n\t\tfor(TrafficRecord tr: l){\r\n\t\t\tput(tr);\r\n\t\t}\r\n\t\t \r\n\t}", "private void createTestData() {\n for (int i = startKey; i < startKey + numKeys; i++) {\n...
[ "0.7250057", "0.71759725", "0.7077774", "0.6884301", "0.6660794", "0.6650549", "0.66308707", "0.6512396", "0.6339113", "0.6334081", "0.6281547", "0.6261912", "0.62409896", "0.6229431", "0.6211253", "0.6197964", "0.6197913", "0.6168602", "0.6086698", "0.60756516", "0.6066401",...
0.0
-1
Created by yanggavin on 14/12/24.
public interface RelationshipService { int add(Relationship relationship); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "private stendhal() {\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r...
[ "0.5932682", "0.584134", "0.58078784", "0.57833886", "0.5725276", "0.5725276", "0.5700225", "0.5664881", "0.56339335", "0.56337494", "0.5614521", "0.56119394", "0.5599627", "0.5599627", "0.5599627", "0.5599627", "0.5599627", "0.5590716", "0.55818355", "0.5577384", "0.55764997...
0.0
-1
/ / / / / / /
@Deprecated /* */ public Wool(Material type, byte data) { /* 33 */ super(type, data); /* */ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private int parent(int i){return (i-1)/2;}", "private int leftChild(int i){return 2*i+1;}", "public void divide() {\n\t\t\n\t}", "public void zeichneQuadrate(){\n for (int i=0; i<10;i++)\n rect (50+i*25,50,25,25);\n }", "private int rightChild(int i){return 2*i+2;}", "public abstract void b...
[ "0.5455807", "0.53675425", "0.53646463", "0.5259213", "0.52139604", "0.51732713", "0.51408297", "0.5087993", "0.50741947", "0.50499314", "0.50279874", "0.49999514", "0.49748233", "0.4944576", "0.49398407", "0.4939045", "0.49119183", "0.48956218", "0.48735467", "0.48624808", "...
0.0
-1
/ / / / / / / /
public DyeColor getColor() { /* 43 */ return DyeColor.getByWoolData(getData()); /* */ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private int parent(int i){return (i-1)/2;}", "private int leftChild(int i){return 2*i+1;}", "public void divide() {\n\t\t\n\t}", "private int rightChild(int i){return 2*i+2;}", "public void zeichneQuadrate(){\n for (int i=0; i<10;i++)\n rect (50+i*25,50,25,25);\n }", "public abstract void b...
[ "0.5505104", "0.5413729", "0.52969015", "0.52391857", "0.52056867", "0.5147029", "0.510248", "0.50758827", "0.50382483", "0.5030172", "0.5009637", "0.49822485", "0.49818277", "0.4978501", "0.49747092", "0.49631736", "0.49385124", "0.49294057", "0.49037725", "0.4894048", "0.48...
0.0
-1
/ / / / / / / /
public void setColor(DyeColor color) { /* 53 */ setData(color.getWoolData()); /* */ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private int parent(int i){return (i-1)/2;}", "private int leftChild(int i){return 2*i+1;}", "public void divide() {\n\t\t\n\t}", "private int rightChild(int i){return 2*i+2;}", "public void zeichneQuadrate(){\n for (int i=0; i<10;i++)\n rect (50+i*25,50,25,25);\n }", "public abstract void b...
[ "0.5505104", "0.5413729", "0.52969015", "0.52391857", "0.52056867", "0.5147029", "0.510248", "0.50758827", "0.50382483", "0.5030172", "0.5009637", "0.49822485", "0.49818277", "0.4978501", "0.49747092", "0.49631736", "0.49385124", "0.49294057", "0.49037725", "0.4894048", "0.48...
0.0
-1
Create a file Uri for saving an image or video
private static Uri getOutputMediaFileUri(int type){ return Uri.fromFile(getOutputMediaFile(type)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static Uri createImageUri() {\n \t\tUri imageFileUri;\n \t\tString folder = Environment.getExternalStorageDirectory()\n \t\t\t\t.getAbsolutePath() + \"/tmp\";\n \t\tFile folderF = new File(folder);\n \t\tif (!folderF.exists()) {\n \t\t\tfolderF.mkdir();\n \t\t}\n \n \t\tString imageFilePath = folder + \"/\"...
[ "0.6863434", "0.6610163", "0.6576866", "0.65007365", "0.64809257", "0.6456981", "0.6450858", "0.64354545", "0.642604", "0.642495", "0.642495", "0.63895655", "0.63811964", "0.6378601", "0.63679206", "0.63678765", "0.629617", "0.6234564", "0.61508834", "0.6141853", "0.61321735"...
0.641093
12
To be safe, you should check that the SDCard is mounted using Environment.getExternalStorageState() before doing this.
private static File getOutputMediaFile(int type){ File mediaStorageDir = new File(Environment.getExternalStoragePublicDirectory( Environment.DIRECTORY_PICTURES), "MyCameraApp"); // This location works best if you want the created images to be shared // between applications and persist after your app has been uninstalled. // Create the storage directory if it does not exist if (! mediaStorageDir.exists()){ if (! mediaStorageDir.mkdirs()){ Log.d("MyCameraApp", "failed to create directory"); return null; } } // Create a media file name String timeStamp = new SimpleDateFormat("yyyyMMdd_HHmmss").format(new Date()); File mediaFile; if (type == MEDIA_TYPE_IMAGE){ mediaFile = new File(mediaStorageDir.getPath() + File.separator + "IMG_"+ timeStamp + ".jpg"); } else if(type == MEDIA_TYPE_VIDEO) { mediaFile = new File(mediaStorageDir.getPath() + File.separator + "VID_"+ timeStamp + ".mp4"); } else { return null; } return mediaFile; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static boolean hasWritableSd(Context context){\n File[] paths = context.getExternalFilesDirs(null);\n if(paths.length > 1){\n String state = Environment.getExternalStorageState(paths[1]);\n return state.equals(Environment.MEDIA_MOUNTED);\n }\n return false;...
[ "0.75056946", "0.747401", "0.7208841", "0.7179138", "0.7170261", "0.71404856", "0.71324986", "0.7099447", "0.6957272", "0.67885524", "0.6788406", "0.67299986", "0.6722587", "0.67149085", "0.6708022", "0.6667349", "0.66560274", "0.66560274", "0.66560274", "0.66390985", "0.6635...
0.0
-1
Cancel the post on failure.
@Override public void onFailure(Call call, IOException e) { call.cancel(); System.out.println("FAILED"+ e.getMessage()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic boolean cancelPost(Post post) {\n\t\tpostDao=new PostDaoImpl(TransactionManager.connection);\r\n\t\tif(postDao.delete(post)>0)\r\n\t\t\treturn true;\r\n\t\telse\r\n\t\t\treturn false;\t\r\n\t}", "@objid (\"26d79ec6-186f-11e2-bc4e-002564c97630\")\n @Override\n public void performCancel...
[ "0.6474391", "0.6434497", "0.63247514", "0.6260446", "0.62596667", "0.6228484", "0.62215054", "0.62182635", "0.6216263", "0.61932564", "0.6188827", "0.6188827", "0.6188827", "0.61713195", "0.61556405", "0.61413753", "0.6140468", "0.6108965", "0.6103515", "0.60948634", "0.6090...
0.0
-1
In order to access the TextView inside the UI thread, the code is executed inside runOnUiThread()
@Override public void onResponse(Call call, final Response response) throws IOException { runOnUiThread(new Runnable() { @Override public void run() { try { responseString = response.body().string(); textView.setText("Request: " + requestString + "\nResponse: "+responseString); tts.speak(responseString); } catch (IOException e) { e.printStackTrace(); tts.speak("Failed to contact the server"); } } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\ttextView.setText(text);\n\t\t\t\t\t\t\t}", "@Override\n public void run() {\n receivedTextView1.setText(str);\n }", "private void setText(final String text) {\n runOnUiThread(new Runnable() {\n...
[ "0.7408931", "0.71110296", "0.69718766", "0.67851746", "0.67799693", "0.67282355", "0.6704073", "0.6703086", "0.6700727", "0.6657189", "0.6639182", "0.6639182", "0.6589413", "0.6575342", "0.6570395", "0.6525181", "0.6457177", "0.6447624", "0.6436697", "0.64345914", "0.6398712...
0.0
-1
E11.6 Cannot read files on my comp due to some technical issue which I can not figure out regardless of how much I try I will simulate this problem with arrays instead
public void E11_6() { double[] row1 = {7.5, 3.6}; double[] row2 = {4.2, 9.7}; double[] row3 = {6.1, 8.0}; double column1Sum = row1[0] + row2[0] + row3[0]; double column2Sum = row1[1] + row2[1] + row3[1]; System.out.println("Column 1 average: " + (column1Sum/3)); System.out.println("Column 2 average: " + (column2Sum/3)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void readFiles(Boolean smart) \n\t//throws IOException// more here for safety\n\t{\n\t\tint i;\n\t\tfor (i = 0; i<165; ++i)\n\t\tfor (int j = 0; j<11; ++j)\n\t\t{\t//if(smart)memoryFile.readInt(board(i,j));\n\t\t\t//else \n\t\t\t\tboard[i][j] = 0;\n\t\t}\n\t\t//try memoryFileStream.close(); catch (IOException e);\...
[ "0.64370394", "0.61791766", "0.6130725", "0.5985025", "0.59672976", "0.5811364", "0.5805575", "0.5803846", "0.5700143", "0.56903654", "0.5681623", "0.56713545", "0.5661464", "0.5638676", "0.56114304", "0.5596005", "0.55900735", "0.5572667", "0.55671567", "0.5557443", "0.55417...
0.0
-1
/ To convert the InputStream to String we use the BufferedReader.readLine() method. We iterate until the BufferedReader return null which means there's no more data to read. Each line will appended to a StringBuilder and returned as String.
private static String convertStreamToString(InputStream is) { InputStreamReader isr = new InputStreamReader(is); BufferedReader reader = new BufferedReader(isr); StringBuilder sb = new StringBuilder(); String line = null; try { while ((line = reader.readLine()) != null) { sb.append(line + "\n"); } } catch (IOException e) { Log.e(TAG, e.getMessage(), e); } finally { try { reader.close(); } catch (IOException e) { Log.w(TAG, e.getMessage(), e); } try { isr.close(); } catch (IOException e) { Log.w(TAG, e.getMessage(), e); } } return sb.toString(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private StringBuilder inputStreamToString(InputStream is) {\n \t String line = \"\";\n \t StringBuilder total = new StringBuilder();\n \t \n \t // Wrap a BufferedReader around the InputStream\n \t BufferedReader rd = new BufferedReader(new InputStreamReader(is));\n \n \t // Read response until th...
[ "0.80718434", "0.8007354", "0.78850275", "0.7817398", "0.7814369", "0.7809983", "0.77270705", "0.76836944", "0.7650521", "0.7629824", "0.76019275", "0.7586726", "0.7557694", "0.7440257", "0.7418864", "0.740184", "0.73975986", "0.7387699", "0.73246837", "0.73027086", "0.729897...
0.735457
18
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
public static boolean addUser(UserDetailspojo user) throws SQLException { Connection conn=DBConnection.getConnection(); String qry="insert into users1 values(?,?,?,?,?)"; System.out.println(user); PreparedStatement ps=conn.prepareStatement(qry); ps.setString(1,user.getUserid()); ps.setString(4,user.getPassword()); ps.setString(5,user.getUserType()); ps.setString(3,user.getEmpid()); ps.setString(2,user.getUserName()); //ResultSet rs=ps.executeQuery(); int rs=ps.executeUpdate(); return rs==1; //String username=null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void habilitar() {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }", "@Override\r\n\t\tpublic void action()\r\n\t\t{\r\n// throw new UnsupportedOperationException(\"Not supported yet.\");\r\n\t\t}...
[ "0.77443457", "0.7373967", "0.6966467", "0.69094384", "0.67967474", "0.6772981", "0.6770611", "0.66534495", "0.6639043", "0.66233534", "0.6609316", "0.6609316", "0.6591667", "0.65871775", "0.65558785", "0.6499027", "0.64613366", "0.64500856", "0.6429774", "0.6419923", "0.6382...
0.0
-1
/ renamed from: OooO00o reason: collision with other method in class
public C6777llL1 m16297OooO00o() { return this.OooO00o; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void method_4270() {}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "public abstract void mo70713b();", "@Override\n public void perish() {\n \n }", "public abstract Object mo1771a();", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\t\tpublic vo...
[ "0.6363965", "0.632822", "0.6304954", "0.62867093", "0.6281007", "0.62537473", "0.6218344", "0.62128186", "0.6190183", "0.6182411", "0.61757296", "0.61748046", "0.6163686", "0.6155949", "0.6141848", "0.60880125", "0.6073878", "0.605578", "0.60325474", "0.6011859", "0.6005259"...
0.0
-1
/ renamed from: OooO00o reason: collision with other method in class
public C97411 m16298OooO00o() { return this.OooO00o.m17898OooO00o(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void method_4270() {}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "public abstract void mo70713b();", "@Override\n public void perish() {\n \n }", "public abstract Object mo1771a();", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\t\tpublic vo...
[ "0.63641334", "0.63286257", "0.6304679", "0.62867224", "0.62807745", "0.62540233", "0.6218609", "0.6212809", "0.61900246", "0.6181775", "0.6175643", "0.61745036", "0.6163922", "0.6155593", "0.6142321", "0.6088296", "0.6074178", "0.6055275", "0.60324985", "0.60114914", "0.6005...
0.0
-1
/ renamed from: OooO00o reason: collision with other method in class
public boolean m16299OooO00o() { return this.OooO00o.OooO00o().m16143OooO00o() != null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void method_4270() {}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "public abstract void mo70713b();", "@Override\n public void perish() {\n \n }", "public abstract Object mo1771a();", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\t\tpublic vo...
[ "0.6362375", "0.63285166", "0.6305003", "0.6286241", "0.62810403", "0.6253446", "0.6215956", "0.6212772", "0.6189105", "0.61816686", "0.6175335", "0.617423", "0.61632466", "0.615604", "0.6142312", "0.6086865", "0.60743415", "0.60552585", "0.60319257", "0.60118306", "0.6007049...
0.0
-1
/ Support/Healer, decent in melee.
public static Unit will(){ Unit unit = new Unit("Will", "P_U_KnightsErrant", 12, 5, 10, 17, 7); // P_U_KnightsErrant // C_U_PrecursorKnightOfficer unit.addWep(new Weapon("Longsword",9,5)); unit.addActive(ActiveType.HEAL); unit.addPassive(PassiveType.AURA); return unit; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void buyHealth() {\n this.healthMod++;\n heathMax += 70 * healthMod;\n }", "public void heal(){\n\t\thp += potion.getHpBoost();\n\t\tif(hp > max_hp)hp = max_hp;\n\t}", "private void selfHeal() {\n\t\t\n\t\t//IF the Droid is carrying an item...\n\t\tif (this.getItemCarried() != null){\n\...
[ "0.69523734", "0.6945832", "0.6702514", "0.656211", "0.64553535", "0.6405447", "0.63677466", "0.6342291", "0.63323176", "0.63217086", "0.6313258", "0.6292253", "0.62899804", "0.6261138", "0.62526584", "0.62382656", "0.6224851", "0.62086076", "0.6205719", "0.6199739", "0.61970...
0.0
-1
/ Slow but steady. Send after high armor.
public static Unit siege(){ Unit unit = new Unit("Siege", "C_W_Siege", 15, 5, 12, 14, 4); unit.addWep(new Weapon("Warhammer",10,5)); unit.addActive(ActiveType.SLAM); unit.addActive(ActiveType.POWER); unit.addPassive(PassiveType.ALERT); return unit; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void sendToWard(){\r\n\t\t//here is some code that we do not have access to\r\n\t}", "public void h() {\n long currentTimeMillis = System.currentTimeMillis();\n this.m.sendEmptyMessageDelayed(48, q.c(currentTimeMillis));\n this.m.sendEmptyMessageDelayed(49, q.d(currentTimeMillis));\n ...
[ "0.641758", "0.6257522", "0.61405164", "0.61405164", "0.60537595", "0.5954501", "0.59326506", "0.58996624", "0.5899588", "0.5892227", "0.5880658", "0.587093", "0.5841924", "0.5836044", "0.5817279", "0.5803316", "0.5799492", "0.5786763", "0.5784742", "0.57800263", "0.57693946"...
0.0
-1
/ Tough and deadly. Good at clearing minions.
public static Unit fang(){ Unit unit = new Unit("Fang", "O_S_WhiteMane", 15, 5, 12, 14, 4); unit.base=2; unit.addWep(new Weapon("Greataxe",11,4)); unit.addActive(ActiveType.CLEAVE); unit.addPassive(PassiveType.TOUGH); return unit; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean isClearingMines();", "private void purgeAllOverflowEM_EM() {\n float mass = 0;\n for (GT_MetaTileEntity_Hatch_InputElemental tHatch : eInputHatches) {\n if (GT_MetaTileEntity_MultiBlockBase.isValidMetaTileEntity(tHatch)) {\n tHatch.updateSlots();\n ...
[ "0.6861246", "0.64614356", "0.645033", "0.6397067", "0.63776267", "0.6306155", "0.6300484", "0.6277731", "0.62521845", "0.62437963", "0.622455", "0.6222652", "0.61879253", "0.6179418", "0.61701584", "0.6132324", "0.6098175", "0.6088606", "0.60881174", "0.6079154", "0.6073641"...
0.0
-1
Return percentage value from fracture.
public static int percent(int nom, int den) { return (int) Math.round(100 * ((double) nom / den)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "java.lang.String getPercentage();", "public float getPercentage() {\r\n\t\tif(!isValid)\r\n\t\t\treturn -1;\r\n\t\treturn percentage;\r\n\t}", "Float getFedAnimalsPercentage();", "public float getPercent() {\n return percent;\n }", "public Double getProgressPercent();", "int getRemainderPercent...
[ "0.75318676", "0.73157734", "0.713459", "0.6963245", "0.690162", "0.6853511", "0.68064296", "0.67603767", "0.6743531", "0.6734233", "0.6696663", "0.6645652", "0.6637014", "0.66251343", "0.6623631", "0.6620224", "0.6605159", "0.65802664", "0.6574535", "0.65630907", "0.65592986...
0.0
-1
Return sum of the ith row.
public static int rowSum(int[][] a, int rowIndex) { int rowNum = a.length; int colNum = a[0].length; int sum = 0; for (int i = 0; i < rowNum; i++) { for (int j = 0; j < colNum; j++) { if (i == rowIndex) { sum += a[i][j]; } } } return sum; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected int sumRow(Label l){\n\t\tint sum = 0;\n\n\t\tint rowIx = resolveIndex(l);\n\n\t\t//iterate all cells in the column\n\t\tfor(int i = 0;i<size();i++){\n\t\t\tInteger cell = matrix.get(rowIx).get(i);\n\t\t\tsum+=cell;\n\t\t}\n\t\treturn sum;\n\t}", "public static int sumRow1( int r, int[][] a )\n {\n\t ...
[ "0.70685637", "0.68082654", "0.6801045", "0.6700831", "0.65994745", "0.6560627", "0.6510306", "0.6465065", "0.6454168", "0.64113283", "0.6253443", "0.62373114", "0.6138883", "0.6126706", "0.60737175", "0.60185444", "0.6013205", "0.5973034", "0.5972282", "0.5968899", "0.596551...
0.6549009
6
Return sum of values in a sub matrix.
public static int subMatrixSum(int[][] a, int startCol, int endCol, int startRow, int endRow) { int rowNum = a.length; int colNum = a[0].length; int sum = 0; for (int i = 0; i < rowNum; i++) { for (int j = 0; j < colNum; j++) { if (i >= startRow && i <= endRow && j >= startCol && j <= endCol) { sum += a[i][j]; } } } return sum; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected int sumAll() {\n\t\tint total = 0;\n\t\t//iterate all rows\n\t\tfor(int i = 0;i<size();i++){\n\t\t\t//itreate all columns\n\t\t\tfor(int j = 0;j<size();j++){\n\t\t\t\tInteger cell = matrix.get(i).get(j);\n\t\t\t\ttotal+=cell;\n\t\t\t}\n\t\t}\n\t\treturn total;\n\t}", "static long subArraySum(int[] data...
[ "0.707744", "0.7053402", "0.66973454", "0.6625265", "0.66142523", "0.65071905", "0.6500795", "0.6482202", "0.641215", "0.6404195", "0.63557917", "0.631285", "0.6286296", "0.6250646", "0.6199348", "0.6194433", "0.6186599", "0.6186486", "0.6173292", "0.6141512", "0.613914", "...
0.6669493
3
Return a submatrix for a given matrix.
public static int[][] subMatrix(int[][] a, int startCol, int endCol, int startRow, int endRow) { int rowNum = a.length; int colNum = a[0].length; int[][] newAarry = new int[endRow - startRow + 1][endCol - startCol + 1]; int newRow = 0, newCol = 0; for (int i = 0; i < rowNum; i++) { newCol = 0; for (int j = 0; j < colNum; j++) { if (i >= startRow && i <= endRow && j >= startCol && j <= endCol) { newAarry[newRow][newCol] = a[i][j]; newCol++; } } if (i >= startRow && i <= endRow) { newRow++; } } return newAarry; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Matrix getSubMatrix(int[] row, int[] col){\r\n \tint n = row.length;\r\n \tint m = col.length;\r\n \tMatrix subMatrix = new Matrix(n, m);\r\n \tdouble[][] sarray = subMatrix.getArrayReference();\r\n \tfor(int i=0; i<n; i++){\r\n \t\tfor(int j=0; j<m; j++){\r\n ...
[ "0.76336527", "0.71039015", "0.69470596", "0.69081587", "0.67972", "0.66538864", "0.6596696", "0.65366066", "0.63563925", "0.60814726", "0.60149586", "0.5973375", "0.5906027", "0.5851322", "0.5765299", "0.5623648", "0.5571631", "0.55357546", "0.5418787", "0.5284013", "0.51770...
0.6612485
6
Return the sum of a part of the ith row.
public static int partOfRowSum(int[][] a, int rowIndex, int startCol, int endCol) { int rowNum = a.length; int colNum = a[0].length; int sum = 0; for (int i = 0; i < rowNum; i++) { for (int j = 0; j < colNum; j++) { if (i == rowIndex && j >= startCol && j <= endCol) { sum += a[i][j]; } } } return sum; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected int sumRow(Label l){\n\t\tint sum = 0;\n\n\t\tint rowIx = resolveIndex(l);\n\n\t\t//iterate all cells in the column\n\t\tfor(int i = 0;i<size();i++){\n\t\t\tInteger cell = matrix.get(rowIx).get(i);\n\t\t\tsum+=cell;\n\t\t}\n\t\treturn sum;\n\t}", "public static int sumRow( int r, int[][] a )\n {\n ...
[ "0.6810499", "0.66548866", "0.6557228", "0.6469255", "0.62878215", "0.62394184", "0.6230721", "0.6170279", "0.61288893", "0.61057526", "0.6059428", "0.60410446", "0.60366327", "0.59762526", "0.5929108", "0.5911136", "0.5903547", "0.5878749", "0.58677536", "0.5838924", "0.5797...
0.67776203
1
Return sum of the ith column.
public static int colSum(int[][] a, int colIndex) { int rowNum = a.length; int colNum = a[0].length; int sum = 0; for (int i = 0; i < rowNum; i++) { for (int j = 0; j < colNum; j++) { if (j == colIndex) { sum += a[i][j]; } } } return sum; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected int sumColumn(Label l){\n\t\tint sum = 0;\n\n\t\tint colIx = resolveIndex(l);\n\n\t\t//iterate all cells in the column\n\t\tfor(int i = 0;i<size();i++){\n\t\t\tInteger cell = matrix.get(i).get(colIx);\n\t\t\tsum+=cell;\n\t\t}\n\t\treturn sum;\n\t}", "protected int sumAll() {\n\t\tint total = 0;\n\t\t//...
[ "0.73205835", "0.6970171", "0.6845413", "0.6757714", "0.66673356", "0.66250056", "0.65157926", "0.6407247", "0.6402388", "0.6322012", "0.62382996", "0.6231529", "0.616363", "0.61414945", "0.61379886", "0.6113058", "0.60999316", "0.60950744", "0.6080422", "0.60762", "0.6054186...
0.63426274
9
Return sum of part of the ith column.
public static int partOfColSum(int[][] a, int colIndex, int startRow, int endRow) { int rowNum = a.length; int colNum = a[0].length; int sum = 0; for (int i = 0; i < rowNum; i++) { for (int j = 0; j < colNum; j++) { if (j == colIndex && i >= startRow && i <= endRow) { sum += a[i][j]; } } } return sum; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private double getColmunSum(TableColumn<Component, String> column) {\r\n double sum = 0;\r\n for (Component component : components) {\r\n sum += Double.parseDouble(column.getCellData(component).replace(',', '.'));\r\n }\r\n return sum;\r\n }", "protected int sumColumn(La...
[ "0.712147", "0.7101426", "0.67000866", "0.66332763", "0.64256454", "0.637123", "0.631288", "0.6297478", "0.61616665", "0.6122016", "0.6106306", "0.60990417", "0.60726404", "0.6069141", "0.6066762", "0.6058424", "0.6017557", "0.60010105", "0.5997239", "0.59881234", "0.59621394...
0.64396435
4
Return the sum of a one dimensional array.
public static int sum(int[] a) { int rowNum = a.length; int sum = 0; for (int i = 0; i < rowNum; i++) { sum += a[i]; } return sum; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static int sum1( int[][] a )\n {\n\t int sum = 0;\t\t\t\t\t\t\t\t\t//initiate variable to hold value of sum \n\n\t for (int i = 0; i < a.length; i++) {\t\t\t//iterate over each array\n\n\t\t for (int n = 0; n < a[i].length; n++) {\t//iterate over the contents of each array\n\t\t\t sum += a[i][n];\t\t\t...
[ "0.75892663", "0.7515937", "0.7420418", "0.74132776", "0.73801994", "0.72537637", "0.71693784", "0.7163226", "0.7154032", "0.7143154", "0.7137418", "0.70534056", "0.7029414", "0.7014698", "0.69650507", "0.69563144", "0.69531226", "0.6942008", "0.6939053", "0.69363", "0.693263...
0.7021084
13
Return the sum of all values in an array.
public static int sum(int[][] a) { int rowNum = a.length; int colNum = a[0].length; int sum = 0; for (int i = 0; i < rowNum; i++) { for (int j = 0; j < colNum; j++) { sum += a[i][j]; } } return sum; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int sum(int[] array) {\n if (array == null || array.length == 0){\n return 0;\n }\n int sum = 0;\n for (int i = 0; i < array.length; i++){\n sum += array[i];\n }\n return sum;\n }", "static double calculateArraySum(double... value) {\n ...
[ "0.7831344", "0.78241074", "0.78205097", "0.7746252", "0.77426356", "0.77231205", "0.7699047", "0.76672786", "0.7664455", "0.75517184", "0.7514675", "0.75018895", "0.74624157", "0.74364555", "0.7421816", "0.73734736", "0.73341966", "0.7310643", "0.73003304", "0.7294664", "0.7...
0.62924886
56
Return the sum of all diagonal (i==j) elements.
public static int diagSum(int[][] a) { int rowNum = a.length; int colNum = a[0].length; int sum = 0; for (int i = 0; i < rowNum; i++) { for (int j = 0; j < colNum; j++) { if (i == j) { sum += a[i][j]; } } } return sum; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static int performSum(int[][] ar){\n\n int pDia = 0;\n int sDia = 0;\n int counter = ar.length;\n for (int i = 0; i < ar.length; i++) {\n\n pDia = pDia + ar[i][i];\n\n // keeping track of counter for second diagonal\n counter = counter-1;\n\n ...
[ "0.6934426", "0.6579347", "0.65176785", "0.6514015", "0.624927", "0.6105789", "0.6058385", "0.59780496", "0.59087247", "0.58574235", "0.5850037", "0.58033586", "0.5755453", "0.57480025", "0.56797516", "0.5675672", "0.5642911", "0.563413", "0.55823433", "0.5580693", "0.5540058...
0.69867116
0
Return the sum of all elements except diagonal (i==j) ones.
public static int noDiagSum(int[][] a) { int rowNum = a.length; int colNum = a[0].length; int sum = 0; for (int i = 0; i < rowNum; i++) { for (int j = 0; j < colNum; j++) { if (i != j) { sum += a[i][j]; } } } return sum; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static int diagSum(int[][] a) {\r\n\t\tint rowNum = a.length;\r\n\t\tint colNum = a[0].length;\r\n\t\tint sum = 0;\r\n\t\tfor (int i = 0; i < rowNum; i++) {\r\n\t\t\tfor (int j = 0; j < colNum; j++) {\r\n\t\t\t\tif (i == j) {\r\n\t\t\t\t\tsum += a[i][j];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn sum;\r...
[ "0.6427378", "0.60423553", "0.6022495", "0.5972616", "0.5805042", "0.5721458", "0.5572763", "0.5564511", "0.5496461", "0.5490422", "0.5439756", "0.5398512", "0.539631", "0.539402", "0.5333219", "0.5332443", "0.53195184", "0.5302504", "0.5299421", "0.52867717", "0.52809227", ...
0.70487994
0
Get zero filled array with row number == column number.
public static int[][] getZeroQuadraticArray(int rowNum) { return getZeroArray(rowNum, rowNum); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static int[][] getZeroArray(int rowNum, int colNum) {\r\n\t\tint[][] retA = new int[rowNum][colNum];\r\n\t\tfor (int i = 0; i < rowNum; i++) {\r\n\t\t\tfor (int j = 0; j < colNum; j++) {\r\n\t\t\t\tretA[i][j] = 0;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn retA;\r\n\t}", "private int[] blankFinder(){\n for(...
[ "0.7205178", "0.68355054", "0.65917", "0.638382", "0.63806856", "0.6366186", "0.61945635", "0.61734456", "0.61479294", "0.6126021", "0.6051057", "0.60510236", "0.6024991", "0.60082436", "0.60080314", "0.59915215", "0.5969095", "0.5944257", "0.59259737", "0.5810129", "0.578644...
0.62897146
6
Get zero filled array.
public static int[][] getZeroArray(int rowNum, int colNum) { int[][] retA = new int[rowNum][colNum]; for (int i = 0; i < rowNum; i++) { for (int j = 0; j < colNum; j++) { retA[i][j] = 0; } } return retA; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Array() {\n\t\tarray = new int[0];\n\t}", "public void zero() {\n fill(0);\n }", "private static void zero(int[] x)\n {\n for (int i = 0; i != x.length; i++)\n {\n x[i] = 0;\n }\n }", "public int[] reduceInit() {\n return null;\n }", "@SuppressWar...
[ "0.69025475", "0.6831779", "0.66906327", "0.65413034", "0.6516538", "0.6504873", "0.6492748", "0.6365713", "0.63213164", "0.630953", "0.62788767", "0.6255684", "0.6250883", "0.62210345", "0.61786616", "0.6038632", "0.6021932", "0.60020775", "0.6000395", "0.59941155", "0.59657...
0.61732996
15
Get formatted string representation.
public static String toString(int[][] a) { int rowNum = a.length; int colNum = a[0].length; String ret = ""; for (int i = 0; i < rowNum; i++) { for (int j = 0; j < colNum; j++) { if (colNum == 0) { ret += "\n"; } ret += "\t" + a[i][j]; } } return ret; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected abstract String format();", "@VTID(8)\r\n java.lang.String format();", "public String getStringRepresentation() {\n StringJoiner joiner = new StringJoiner(STRING_FORMAT_DELIMITER);\n\n joiner.add(this.getCaller())\n .add(this.getCallee())\n .add(SIMPLE_DATE_...
[ "0.7677523", "0.75765014", "0.74294025", "0.73932767", "0.73691136", "0.7174299", "0.70544356", "0.7036579", "0.6946301", "0.6946301", "0.6946301", "0.67706794", "0.6764243", "0.674203", "0.67330474", "0.67172766", "0.66713405", "0.6666533", "0.66570324", "0.66483164", "0.661...
0.0
-1
Get a formatted String version for a confusion matrix.
public static String toStringConfMatrix(int[][] a, String[] cats) { int rowNum = a.length; int colNum = a[0].length; String ret = "r\\p\t"; for (int i = 0; i < cats.length; i++) { ret += cats[i] + "\t"; } for (int i = 0; i < rowNum; i++) { for (int j = 0; j < colNum; j++) { if (j == 0) { ret += "\n" + cats[i]; } ret += "\t" + a[i][j]; } } return ret; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public String toString() {\n final String lineSeparator = System.getProperty(\"line.separator\");\n return new StringBuilder(\"TableOfConfusion\").append(lineSeparator)\n .append(\"precision: \").append(calculatePrecision()).append(lineSeparator)\n .appe...
[ "0.726748", "0.7216195", "0.7076237", "0.7038398", "0.7026267", "0.6985793", "0.6973739", "0.69714403", "0.6921901", "0.69111353", "0.68736154", "0.68213725", "0.680631", "0.6798618", "0.67620873", "0.6760347", "0.6733738", "0.6690422", "0.6567312", "0.6516264", "0.6492098", ...
0.65357643
19
Get a formatted String version for a confusion matrix for relative values.
public static String toStringRelativeConfMatrix(int[][] a, String[] cats) { int rowNum = a.length; int colNum = a[0].length; String ret = "r\\p\t"; for (int i = 0; i < cats.length; i++) { ret += cats[i] + "\t"; } for (int i = 0; i < rowNum; i++) { for (int j = 0; j < colNum; j++) { if (j == 0) { ret += "\n" + cats[i]; } ret += "\t" + percent(a[i][j], rowSum(a, i)); } } return ret; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public String toString() {\n final String lineSeparator = System.getProperty(\"line.separator\");\n return new StringBuilder(\"TableOfConfusion\").append(lineSeparator)\n .append(\"precision: \").append(calculatePrecision()).append(lineSeparator)\n .appe...
[ "0.67901164", "0.6589365", "0.64140576", "0.63461417", "0.62704736", "0.6267152", "0.62253517", "0.622425", "0.62216765", "0.62045914", "0.6200665", "0.61752486", "0.6155632", "0.6130803", "0.6124163", "0.61188626", "0.6101693", "0.60954213", "0.60583395", "0.6037588", "0.602...
0.6906035
0
Get all the ficheroBytes.
@Override @Transactional(readOnly = true) public List<FicheroByteDTO> findAll() { log.debug("Request to get all FicheroBytes"); return ficheroByteRepository.findAll().stream() .map(ficheroByteMapper::toDto) .collect(Collectors.toCollection(LinkedList::new)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public byte[] getBytes() throws IOException {\r\n return mFile.getBytes();\r\n }", "public byte[] getFileBytes(){\n\t\treturn fileBytes;\n\t}", "byte[] getBytes();", "byte[] getBytes();", "public byte[] bytes() throws IOException {\n try(FileInputStream fis = new FileInputStream(file)) {\...
[ "0.73408073", "0.720702", "0.70119077", "0.70119077", "0.6931279", "0.6744772", "0.6680454", "0.6669241", "0.6636174", "0.6555359", "0.65371716", "0.65254354", "0.65056026", "0.6493155", "0.64875627", "0.6475867", "0.645474", "0.6436135", "0.64346945", "0.6423194", "0.6400096...
0.6839644
5
Get one ficheroByte by id.
@Override @Transactional(readOnly = true) public Optional<FicheroByteDTO> findOne(Long id) { log.debug("Request to get FicheroByte : {}", id); return ficheroByteRepository.findById(id) .map(ficheroByteMapper::toDto); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public File findOne(String id) {\n\t\treturn fileDAO.selectOneById(id);\n\t}", "@Override\n\tpublic File getById(long id) {\n\t\treturn getSession().find(File.class, id);\n\t}", "public ExtFileObjectCom getExtFileObj(Long id)\r\n \t{ \r\n \t\tlogger.debug(\"Retrieving binary file with ID = \" + id);\r\n \t\t\r...
[ "0.71813893", "0.7163096", "0.68746823", "0.683023", "0.6818729", "0.67898715", "0.6774273", "0.6708272", "0.6704339", "0.65397125", "0.6459356", "0.6389181", "0.6365682", "0.633965", "0.6300388", "0.6192649", "0.6150225", "0.61081964", "0.6104101", "0.60972637", "0.6054857",...
0.77353364
0
Delete the ficheroByte by id.
@Override public void delete(Long id) { log.debug("Request to delete FicheroByte : {}", id); ficheroByteRepository.deleteById(id); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void deleteFileData(Long id) {\n\t\t\r\n\t}", "@Override\n public void delete(String id) {\n log.debug(\"Request to delete File : {}\", id);\n fileRepository.delete(id);\n }", "public void deleteFile(int id) {\n\t\tString sql = \"delete from file where file_id=\"+id;\n...
[ "0.72251666", "0.7220385", "0.69621366", "0.6664907", "0.6580825", "0.65757066", "0.6575488", "0.6572429", "0.6561723", "0.65563446", "0.65537924", "0.6553306", "0.6544552", "0.653327", "0.65186197", "0.6507675", "0.6505496", "0.64941335", "0.6493764", "0.6492308", "0.6489906...
0.8508717
0
wsdl:definition is the root hence no parent so return null.
@Override public TWSDLExtensible getParent() { return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic WebElement getRootElement() {\r\n\t\treturn null;\r\n\t}", "public String getParentElement() {\n return ROOT_NO_ELEMENT_DEFAULT;\n }", "public String getDefinition() {\n\t\treturn null;\n\t}", "private SchemaComponent findOutermostParentElement(){\n SchemaComponent elem...
[ "0.62488776", "0.6195697", "0.61540765", "0.6129125", "0.6057933", "0.5999156", "0.5875636", "0.5779316", "0.57492507", "0.5732465", "0.5727264", "0.56886095", "0.568172", "0.56538177", "0.56220305", "0.5615066", "0.5603867", "0.5555247", "0.55529106", "0.55430543", "0.553982...
0.5269461
58
keep a reference to the application instance
public void onStart(MainMVPApplication app) { this.application = app; // set the applications main windows (the view) //this.application.setMainWindow((Window) this.view); // load the nav presenter IPresenterFactory pf = application.getPresenterFactory(); this.navPresenter = (WorkspaceNavigationPresenter) pf.createPresenter(WorkspaceNavigationPresenter.class); IWorkspaceNavigationView navView = this.navPresenter.getView(); this.view.setNavigation(navView); IPresenter<?, ? extends EventBus> dbpresenter = pf.createPresenter(DashboardPresenter.class); ((DashboardEventBus)dbpresenter.getEventBus()).launch(application); Component dbView = (Component)dbpresenter.getView(); this.view.setContent(dbView); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public App() {\n\t\tLog.d(\"App\", \"App created\");\n\t\tinstance = this;\n\t}", "public static App getInstance() {\n return applicationInstance;\n }", "public static Application getInstance(){\n\t\treturn getInstance (null);\n\t}", "public static void setApplication(ApplicationBase instance)\r\n ...
[ "0.7683981", "0.7482961", "0.7391914", "0.732582", "0.7117837", "0.70962894", "0.70690274", "0.70456797", "0.6976601", "0.6936326", "0.6906335", "0.68198323", "0.67218393", "0.671733", "0.6682238", "0.66324776", "0.66219336", "0.6583671", "0.65752655", "0.6557837", "0.6550969...
0.0
-1
load the menu presenter
public void onOpenModule(Class<? extends BasePresenter<?, ? extends EventBus>> presenter) { IPresenterFactory pf = application.getPresenterFactory(); this.contentPresenter = pf.createPresenter(presenter); this.view.setContent((Component) this.contentPresenter.getView()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void loadMenu() {\n theView.getGamePanel().removeAll();\n Menu menu = new Menu(theView);\n menu.revalidate();\n menu.repaint();\n theView.getGamePanel().add(menu);\n menu.requestFocusInWindow();\n theView.setVisible(true);\n }", "public void initMenu(){...
[ "0.72711813", "0.69084185", "0.6761936", "0.6632261", "0.6631972", "0.6624694", "0.6602674", "0.6502955", "0.6497598", "0.6471469", "0.64600575", "0.6449108", "0.6440202", "0.6425727", "0.63929117", "0.6367856", "0.63516027", "0.632892", "0.63207686", "0.63187987", "0.6308689...
0.0
-1
Populate the model task with user input.
public void onClick(View v) { Task task = new Task(); task.setTask_id(key); // Use the generated key from the database as id. task.setMessage(editText.getText().toString()); String rating = spinner.getSelectedItem().toString(); task.setPriority(rating); // we need to convert our model into a Hashmap since Firebase cannot save custom classes. // String/ArrayList/Integer and Hashmap are the only supported types. Map<String, Object> childUpdates = new HashMap<>(); childUpdates.put( key, task.toFirebaseObject()); database.child("users").child(currentUserID).child("taskList").updateChildren(childUpdates, new DatabaseReference.CompletionListener() { @Override public void onComplete(DatabaseError databaseError, DatabaseReference databaseReference) { if (databaseError == null) { // Return to previous activity finish(); } } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void populateFromTask(String actionTitle, Task task) {\r\n if (task == null || actionTitle.equals(\"Create\")) {\r\n myTask = null;\r\n return;\r\n }\r\n myTask = task;\r\n }", "public void createTask() {\n \tSystem.out.println(\"Inside createTask()\");\n ...
[ "0.67153937", "0.61780435", "0.60206085", "0.5982059", "0.5981447", "0.58522063", "0.582444", "0.5792707", "0.5760699", "0.57502997", "0.57497716", "0.569967", "0.5697653", "0.5680587", "0.5678153", "0.56750304", "0.56465685", "0.56144494", "0.5612041", "0.5586027", "0.557592...
0.52186465
60
Sets up a bank account the specified account number and initial balance.
public saccoAccount (int account_num, double initial_balance) { account = account_num; balance = initial_balance; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public BankAccount(double initialBalance) {\r\n\t\tbalance=initialBalance;\r\n\t}", "public BankAccount() {\t\n\t\tthis.accountNumber = UUID.randomUUID().toString().substring(0, 6);\n\t\tthis.balance = 0;\n\t\tthis.accountType = \"Bank account\";\n\t}", "public void createAccount(double balance) {\r\n\t\tAccou...
[ "0.7540318", "0.7303126", "0.70826364", "0.70732087", "0.699879", "0.6985183", "0.69843006", "0.69102675", "0.6910109", "0.686329", "0.678574", "0.6781067", "0.67801034", "0.67753434", "0.6740125", "0.6735483", "0.6715536", "0.6689961", "0.6673843", "0.66619664", "0.6639786",...
0.75219953
1
method deposit Adds the deposited amount to the account balance.
public void deposit (double amount) { balance += amount; System.out.println ("Deposit into account shs: " + account); System.out.println ("Standing Amount: " + amount); System.out.println ("Current balance: " + balance); System.out.println (); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void deposit(int depositAmount)\r\n {\n this.balance += depositAmount;\r\n System.out.println(\"Deposit of \" + depositAmount + \" made. New Balance is \" + this.balance);\r\n }", "public void deposit(double deposit){\n accTransactions.add(new Transaction('D', deposit, balance, ...
[ "0.84499013", "0.8366093", "0.8291567", "0.8224366", "0.8211198", "0.8173097", "0.8148479", "0.81390476", "0.8096961", "0.8092166", "0.8087009", "0.8080742", "0.80692285", "0.8065247", "0.801766", "0.80054057", "0.80054057", "0.7975974", "0.7972426", "0.7948598", "0.79422224"...
0.8018642
14
for checking the amout on the account
public Checking_Account (int account_num, double initial_balance, Savings_Account protection) { super (account_num, initial_balance); overdraft = protection; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean isAccountNonExpired();", "boolean isAccountNonExpired();", "@Override\npublic boolean isAccountNonExpired() {\n\treturn false;\n}", "private void checkAccountLoggedIn()\r\n\t{\n\t\tSharedPreferences pref = this.getSharedPreferences(\"accountdata\", 0);\r\n\t\tSystem.out.println(\"Checking if an accou...
[ "0.6320395", "0.6320395", "0.6116713", "0.6108607", "0.60722226", "0.60722226", "0.60722226", "0.6055933", "0.60297465", "0.6005713", "0.59881705", "0.5977836", "0.5977836", "0.5977836", "0.5932819", "0.5931608", "0.59243286", "0.59243286", "0.59149575", "0.59149575", "0.5900...
0.0
-1
Withdraws the specified amount from the checking Overrides the withdrawal method in saccoAccount. override method withdrawal
public boolean withdrawal (double amount) { boolean result = false; if ( ! super.withdrawal (amount) ) { System.out.println ("Using overdraft..."); if ( ! overdraft.withdrawal (amount-balance) ) System.out.println ("Overdraft source insufficient."); else { balance = 0; System.out.println ("Current Balance on account " + account + ": " + balance); result = true; } } System.out.println (); return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void withdraw(double withdrawalAmount) {\n if (withdrawalAmount < 0) throw new IllegalArgumentException(\"Withdrawal amount cannot be negative\");\n if (balance - withdrawalAmount < 0) throw new IllegalArgumentException(\"Cannot withdraw more than account balance\");\n balance -= withdr...
[ "0.8043121", "0.8008468", "0.7997436", "0.78203064", "0.78125525", "0.7782193", "0.7768858", "0.7734695", "0.7715014", "0.76952684", "0.7690517", "0.7687304", "0.7684472", "0.767174", "0.76619095", "0.76415414", "0.76157314", "0.7604993", "0.75991595", "0.75558937", "0.755039...
0.7676348
13
Sets up a savings account using the specified values.
public Savings_Account (int account_num, double initial_balance, double interest_rate) { super (account_num, initial_balance); rate = interest_rate; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public SavingsAccount(double balance)\n {\n startingBalance = balance;\n }", "public void setSavingsAccount(BankAccount newSavings) {\n this.savings = newSavings;\n }", "public savingsAccount(){\n balance = 0;\n String[] sTransactions = new String[1000];\n savingTransactio...
[ "0.6625433", "0.6610646", "0.65127504", "0.6262919", "0.6230255", "0.6185147", "0.5997869", "0.59937733", "0.5956465", "0.5938776", "0.5915104", "0.5884442", "0.5870853", "0.5773463", "0.575447", "0.57515246", "0.57462347", "0.5707366", "0.5701571", "0.5690678", "0.5689352", ...
0.6058296
6
Adds interest to the account balance.
public void add_interest () { balance += balance * rate; System.out.println ("Interest added to account: " + account); System.out.println ("Current Balance: " + balance); System.out.println(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addInterest() {\n\t\tdouble interest = getBalance() * interestRate / 100;\n\t\tdeposit(interest);\n\t}", "public void add_interest ()\r\n {\r\n\r\n balance += balance * (rate + BONUS_RATE);\r\n System.out.println (\"Interest added to account: \" + account);\r\n System.out.println (\"...
[ "0.89844817", "0.87193215", "0.7960966", "0.77384", "0.7710118", "0.75193757", "0.75116247", "0.7351901", "0.73434377", "0.7131638", "0.7109761", "0.6975674", "0.6673731", "0.65895265", "0.6565047", "0.65222234", "0.65119636", "0.64647907", "0.644672", "0.6424216", "0.6410926...
0.8538006
2
Sets up a bonus account using the specified values.
public Bonus_Saver_Account (int account_num,double initial_balance, double interest_rate) { super (account_num, initial_balance, interest_rate); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setBonus(double bonus){\r\n this.bonus = bonus;\r\n }", "public void setBonusAmount(long value) {\r\n this.bonusAmount = value;\r\n }", "public Account(String requisites, double value) {\n this.value = value;\n this.requisites = requisites;\n }", "vo...
[ "0.6145005", "0.5923534", "0.57429665", "0.57426167", "0.5710756", "0.57067525", "0.5693443", "0.5659081", "0.5646152", "0.562305", "0.5620786", "0.5553134", "0.5545554", "0.55116415", "0.55106616", "0.54740584", "0.54664093", "0.54583305", "0.5456303", "0.5445437", "0.543919...
0.58900195
2
constructor Super_Saver_Account Withdraws the specified amount, plus the penalty for withdrawing from a bonus account. Overrides the withdrawal method of the saccoAccount class, but uses it to perform the actual withdrawal operation.
public boolean withdrawal (double amount) { System.out.println ("Penalty incurred: " + PENALTY); return super.withdrawal (amount+PENALTY); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Bonus_Saver_Account (int account_num,double initial_balance, double interest_rate)\r\n {\r\n\r\n super (account_num, initial_balance, interest_rate);\r\n\r\n }", "@Override\n public void withdraw(double amount) //Overridden method\n {\n elapsedPeriods++;\n \n if(el...
[ "0.71833587", "0.71756876", "0.6985317", "0.6771202", "0.67106324", "0.6594407", "0.659032", "0.6589962", "0.65787727", "0.65473205", "0.65400034", "0.65351266", "0.6534137", "0.65278786", "0.64904845", "0.647925", "0.646235", "0.6458366", "0.6448341", "0.6432872", "0.6429832...
0.62901604
31
method withdrawal Adds interest to the balance of the account, including the bonus rate. Overrides the add_interest method of the Savings_Account class.
public void add_interest () { balance += balance * (rate + BONUS_RATE); System.out.println ("Interest added to account: " + account); System.out.println ("Current Balance: " + balance); System.out.println(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addInterest() {\n\t\tdouble interest = getBalance() * interestRate / 100;\n\t\tdeposit(interest);\n\t}", "public void add_interest () \r\n {\r\n balance += balance * rate;\r\n System.out.println (\"Interest added to account: \" + account);\r\n System.out.println (\"Current Balance: \...
[ "0.75887096", "0.7281422", "0.693701", "0.67945963", "0.66616756", "0.6556402", "0.6546834", "0.6526511", "0.65106845", "0.64623386", "0.63444", "0.6299593", "0.6211908", "0.617098", "0.6112678", "0.6056967", "0.60184294", "0.6014061", "0.6005178", "0.60019094", "0.59138036",...
0.74227214
1
Simple wrapper class around a UnaryVoidFunction. This exists to avoid problems with using nested generics.
public interface Emitter extends UnaryVoidFunction<MethodVisitor> { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "interface MyFirstVoidFunctionalInterface {\n\n public void methodOne();\n\n}", "public interface TriFunction<Arg1, Arg2, Arg3, Result> {\n Result apply(Arg1 arg1, Arg2 arg2, Arg3 arg3);\n}", "@SuppressWarnings(\"WeakerAccess\")\n@FunctionalInterface\npublic interface TriFunction<T, U, V, R> {\n /**\n ...
[ "0.6596399", "0.62048024", "0.60555166", "0.5990964", "0.58685833", "0.56762826", "0.5387004", "0.5386656", "0.531552", "0.5277548", "0.52757406", "0.5262167", "0.5247738", "0.5243856", "0.52321637", "0.5223401", "0.5219263", "0.5182125", "0.51674664", "0.51428", "0.5138503",...
0.47582456
50
Construct a BitSet for the given arguments.
private static BitSet makeBitSet( int... args ) { BitSet result = new BitSet( MAX_OPCODE + 1 ) ; for (int value : args ) result.set( value ) ; return result ; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public BitSet makeMod(){\n\t\tBitSet bs = new BitSet(this.length());\n\t\tbs.or(this);\n\t\treturn bs;\n\t}", "public static BitSet BitStringToBitSet(String s) {\n BitSet result = new BitSet();\n for (int i = 0; i < s.length(); i++) {\n if (s.charAt(i) == '1') {\n result.s...
[ "0.608457", "0.57603", "0.5757322", "0.5580763", "0.5513933", "0.55083704", "0.5508065", "0.5427002", "0.5407785", "0.5304616", "0.5289869", "0.5284647", "0.527086", "0.527086", "0.52464885", "0.5224657", "0.5201101", "0.5179585", "0.5135778", "0.5118613", "0.50393194", "0....
0.8404121
0
The opcode must be one of the PUT/GET FIELD/STATIC instructions.
public FieldInsnEmitter( int opcode, String owner, String name, String desc ) { check( visitFieldInsnSet, opcode ) ; this.opcode = opcode ; this.owner = owner ; this.name = name ; this.desc = desc ; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void interceptPutField(int opcode, String owner, String name, String desc) {\n FieldDefinition fieldDefn = classDefn.managedFields.get(name);\n if (fieldDefn != null && !isCurrentMethodAccessorOfField(name)) {\n if (fieldDefn.isCollection() && (fieldDefn.isEntity() || fieldDefn.isEm...
[ "0.59025276", "0.5893527", "0.58394563", "0.5784227", "0.5563663", "0.55122405", "0.54505926", "0.5391738", "0.537547", "0.5340491", "0.5335106", "0.53261614", "0.5299241", "0.52498364", "0.52274483", "0.5195884", "0.517651", "0.5171425", "0.5162475", "0.51260227", "0.5093771...
0.0
-1
There are several cases here: 1. Local variables. This is the case for MethodGenerator arguments, BlockStatement definitions, catch clause exception variables, nonvoid return holders, and the uncaught exception holder for finally clauses. Here the Variable passed in must already have an attribute named "stackFrameSlot" that holds an Integer that gives the start of the local variables. 2. Nonstatic class data members. Here the parent of the Variable must be a ClassGenerator, and the type information from the ClassGenerator is required in the FieldInsnEmitter. The emitters here use GETFIELD/PUTFIELD. 3. Static class data members. This is just like case 2, but the emitters must use the GETSTATIC/PUTSTATIC opcodes. 4. FieldAccessExpression. 5. ArrayIndexExpression.
private static int getVarInsnOpcode( Type type, boolean isStore ) { if (isStore) { if (!type.isPrimitive()) { return ASTORE ; } else if (type == Type._float()) { return FSTORE ; } else if (type == Type._double()) { return DSTORE ; } else if (type == Type._long()) { return LSTORE ; } else { // must be boolean, byte, char, short, or int. // All of these are handled the same way. return ISTORE ; } } else { if (!type.isPrimitive()) { return ALOAD ; } else if (type == Type._float()) { return FLOAD ; } else if (type == Type._double()) { return DLOAD ; } else if (type == Type._long()) { return LLOAD ; } else { // must be boolean, byte, char, short, or int. // All of these are handled the same way. return ILOAD ; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void enterVariableAssignmentStatement(MiniJavaParser.VariableAssignmentStatementContext ctx) {\n Symbol variable = currentScope.lookup(ctx.Identifier().getText());\n if (variable.isField()) {\n mg.loadThis();\n }\n }", "@Override\n public void visitFiel...
[ "0.5916051", "0.57766676", "0.5769804", "0.5699376", "0.56027734", "0.55349624", "0.5524847", "0.5522892", "0.5520112", "0.55054826", "0.5504954", "0.5487051", "0.54757214", "0.5443029", "0.54233265", "0.54196733", "0.54186046", "0.54165524", "0.538256", "0.53801036", "0.5376...
0.0
-1
Create an emitter that generates the instruction needed to either store the TOS value into the variable (isStore==true) or push the variable's value onto the stack (isStore==false). The stack index must be set on var in the stackFrameSlot attribute.
public static Emitter makeEmitter( Variable var, boolean isStore ) { VariableInternal ivar = (VariableInternal)var ; Integer slot = ASMUtil.stackFrameSlot.get( ivar ) ; assert slot != null ; return new IntOperandEmitter( getVarInsnOpcode( ivar.type(), isStore ), slot ) ; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public CodeFragment visitBlockAsgn(AlangParser.BlockAsgnContext ctx) {\n String name = ctx.ID().getText();\n if (!variableExists(name)) {\n this.addError(ctx, name, \"Assignment to undeclared variable\");\n return new CodeFragment(\"\");\n }\n\n Code...
[ "0.5687055", "0.5685033", "0.5629114", "0.55759704", "0.55371386", "0.5467009", "0.53274035", "0.50779897", "0.5068366", "0.502208", "0.502208", "0.49920627", "0.4981525", "0.49796143", "0.4957389", "0.4904216", "0.4896358", "0.48962277", "0.48750377", "0.48646843", "0.484449...
0.7086374
0
XXX refactor makeEmitter methods for FieldAccessExpression: most of the code is shareable. Create an emitter that generates the instruction needed to either store the TOS value into the nonstatic field (isStore==true) or push the nonstatic fields's value onto the stack (isStore==false).
public static Emitter makeEmitter( ExpressionFactory.NonStaticFieldAccessExpression expr, boolean isStore ) { Type targetType = ((ExpressionInternal)expr.target()).type() ; ClassInfo cinfo = targetType.classInfo() ; FieldInfo fld = cinfo.fieldInfo().get( expr.fieldName() ) ; if (fld == null) { throw new IllegalArgumentException( expr.fieldName() + " is not a valid field in class " + targetType.name() ) ; } // XXX we need access control checking here!!! return makeFieldInsnEmitter( isStore, false, targetType, expr.fieldName(), fld.type() ) ; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static Emitter makeEmitter( \n\tExpressionFactory.StaticFieldAccessExpression expr,\n\tboolean isStore ) {\n\tType targetType = expr.target() ;\n\n\tClassInfo cinfo = targetType.classInfo() ;\n\tFieldInfo fld = cinfo.fieldInfo().get( expr.fieldName() ) ;\n\tif (fld == null)\n\t throw new IllegalArgumentE...
[ "0.7072164", "0.60071", "0.5680197", "0.55722284", "0.5403987", "0.5335263", "0.520401", "0.5158351", "0.5121712", "0.5018868", "0.49703172", "0.49645185", "0.49318105", "0.49278456", "0.4879873", "0.47959659", "0.47761908", "0.4758418", "0.47492358", "0.47277084", "0.4690895...
0.68549144
1
Create an emitter that generates the instruction needed to either store the TOS value into the static field (isStore==true) or push the static fields's value onto the stack (isStore==false).
public static Emitter makeEmitter( ExpressionFactory.StaticFieldAccessExpression expr, boolean isStore ) { Type targetType = expr.target() ; ClassInfo cinfo = targetType.classInfo() ; FieldInfo fld = cinfo.fieldInfo().get( expr.fieldName() ) ; if (fld == null) throw new IllegalArgumentException( expr.fieldName() + " is not a valid field in class " + targetType.name() ) ; // XXX we need access control checking here!!! return makeFieldInsnEmitter( isStore, true, targetType, expr.fieldName(), fld.type() ) ; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static Emitter makeEmitter( Variable var, boolean isStore ) {\n VariableInternal ivar = (VariableInternal)var ;\n\tInteger slot = ASMUtil.stackFrameSlot.get( ivar ) ;\n\tassert slot != null ;\n\treturn new IntOperandEmitter( getVarInsnOpcode( ivar.type(), isStore ),\n\t slot ) ;\n }", "@Overr...
[ "0.59588045", "0.5472373", "0.53247786", "0.5257215", "0.5197064", "0.5132733", "0.50731224", "0.49661735", "0.49653736", "0.49511075", "0.49171117", "0.49019012", "0.48569334", "0.4838014", "0.46634296", "0.4657476", "0.46512228", "0.4620435", "0.46059117", "0.4587408", "0.4...
0.5824117
1
Create an emitter that generates the instruction needed to either store the TOS value into an array (aastore) (isStore==true) or push the array element's value onto the stack (aaload) (isStore==false). This emitter assumes that arrayref and index are already on the stack, and value is on the stack either before (aastore) or after (aaload) the instruction executes.
public static Emitter makeEmitter( ExpressionFactory.ArrayIndexExpression expr, boolean isStore ) { if (isStore) { return arrayStore ; } else { return arrayLoad ; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void visitSASTORE(SASTORE o){\n\t\tif (stack().peek() != Type.INT){\n\t\t\tconstraintViolated(o, \"The value at the stack top is not of type 'int', but of type '\"+stack().peek()+\"'.\");\n\t\t}\n\t\tindexOfInt(o, stack().peek(1));\n\t\tif (stack().peek(2) == Type.NULL){\n\t\t\treturn;\n\t\t} \n\t\tif (! (s...
[ "0.5860105", "0.5690854", "0.5439598", "0.5379029", "0.5356894", "0.5325345", "0.5265868", "0.52116424", "0.51972103", "0.5183537", "0.5102228", "0.5039362", "0.49650636", "0.4882642", "0.4879098", "0.48365474", "0.48039585", "0.47838727", "0.4743571", "0.46863595", "0.466294...
0.6321213
0
returning a children count of one (1) because we only want our child view to be loaded once
@Override public int getChildrenCount(int groupPosition) { return 1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getChildCount() {return children.size();}", "int getChildCount();", "public abstract int getNumChildren();", "public int getChildCount();", "public int getChildCount()\n/* */ {\n/* 500 */ return this.children.size();\n/* */ }", "@Override\n public int getNumChildren() {\n\t...
[ "0.8121232", "0.7966312", "0.7964724", "0.78922683", "0.78916967", "0.7852276", "0.781532", "0.7758482", "0.7703504", "0.7674644", "0.76614493", "0.76474494", "0.7640194", "0.76309854", "0.76148474", "0.75862765", "0.7585735", "0.7561974", "0.75274485", "0.7388771", "0.737007...
0.67322594
37
TODO Autogenerated method stub
@Override public double calcMinCostFlow(Graph graph) { return 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
Finds a Hudson master that supports swarming, and join it. This method never returns.
public void run() throws InterruptedException { System.out.println("Discovering Hudson master"); // wait until we get the ACK back while (true) { try { List<Candidate> candidates = new ArrayList<Candidate>(); for (DatagramPacket recv : discover()) { String responseXml = new String(recv.getData(), 0, recv.getLength()); Document xml; System.out.println(); try { xml = DocumentBuilderFactory .newInstance() .newDocumentBuilder() .parse(new ByteArrayInputStream(recv.getData(), 0, recv.getLength())); } catch (SAXException e) { System.out.println("Invalid response XML from " + recv.getAddress() + ": " + responseXml); continue; } String swarm = getChildElementString( xml.getDocumentElement(), "swarm"); if (swarm == null) { System.out.println(recv.getAddress() + " doesn't support swarm"); continue; } String url = master == null ? getChildElementString( xml.getDocumentElement(), "url") : master; if (url == null) { System.out .println(recv.getAddress() + " doesn't have the configuration set yet. Please go to the sytem configuration page of this Hudson and submit it: " + responseXml); continue; } candidates.add(new Candidate(url, swarm)); } if (candidates.size() == 0) throw new RetryException( "No nearby Hudson supports swarming"); System.out.println("Found " + candidates.size() + " eligible Hudson."); // randomly pick up the Hudson to connect to target = candidates .get(new Random().nextInt(candidates.size())); if (password == null && username == null) { verifyThatUrlIsHudson(); } // create a new swarm slave createSwarmSlave(); connect(); } catch (IOException e) { e.printStackTrace(); } catch (ParserConfigurationException e) { e.printStackTrace(); } catch (RetryException e) { System.out.println(e.getMessage()); if (e.getCause() != null) e.getCause().printStackTrace(); } // retry System.out.println("Retrying in 10 seconds"); Thread.sleep(10 * 1000); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void launchAsMaster();", "private void connectToMaster(int masterPort) throws Exception {\n // Getting the registry \n Registry registry = LocateRegistry.getRegistry(null, masterPort); \n \n // Looking up the registry for the remote object \n this.master = (Master) registry.look...
[ "0.62951636", "0.56516486", "0.56293255", "0.5392698", "0.5374912", "0.5326658", "0.5306477", "0.5137044", "0.50727737", "0.5026405", "0.49920276", "0.49854758", "0.49854404", "0.4980916", "0.49646473", "0.49528047", "0.4948262", "0.4946761", "0.49397966", "0.49361628", "0.49...
0.67033684
0
Discovers Hudson running nearby. To give every nearby Hudson a fair chance, wait for some time until we hear all the responses.
protected List<DatagramPacket> discover() throws IOException, InterruptedException, RetryException { sendBroadcast(); List<DatagramPacket> responses = new ArrayList<DatagramPacket>(); // wait for 5 secs to gather up all the replies long limit = System.currentTimeMillis() + 5 * 1000; while (true) { try { socket.setSoTimeout(Math.max(1, (int) (limit - System.currentTimeMillis()))); DatagramPacket recv = new DatagramPacket(new byte[2048], 2048); socket.receive(recv); responses.add(recv); } catch (SocketTimeoutException e) { // timed out if (responses.isEmpty()) { if (master != null) throw new RetryException( "Failed to receive a reply from " + master); else throw new RetryException( "Failed to receive a reply to broadcast."); } return responses; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void run() throws InterruptedException {\n\tSystem.out.println(\"Discovering Hudson master\");\n\n\t// wait until we get the ACK back\n\twhile (true) {\n\t try {\n\t\tList<Candidate> candidates = new ArrayList<Candidate>();\n\t\tfor (DatagramPacket recv : discover()) {\n\n\t\t String responseXml = new...
[ "0.6119908", "0.5491898", "0.5443948", "0.5430855", "0.54052186", "0.54051197", "0.53789014", "0.53501135", "0.53438425", "0.5338974", "0.532022", "0.5274425", "0.5265319", "0.5217376", "0.52161294", "0.51935023", "0.51238084", "0.5114967", "0.5114011", "0.51108664", "0.51039...
0.4891992
34
Build call for addPaymentLinkConfiguration
public Call addPaymentLinkConfigurationCall(String generalContractId, PaymentLinkOptions body) throws ApiException { Object localVarPostBody = body; // create path and map variables String localVarPath = "/General/Contracts/{generalContractId}/savePaymentLinkConfiguration" .replaceAll("\\{" + "generalContractId" + "\\}", apiClient.escapeString(generalContractId.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); String[] localVarAuthNames = new String[] { "oauth_token" }; return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@SuppressWarnings(\"rawtypes\")\n private Call addPaymentLinkConfigurationValidateBeforeCall(String generalContractId, PaymentLinkOptions body) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling ad...
[ "0.526508", "0.5167495", "0.511985", "0.47837135", "0.47506052", "0.47376493", "0.47008944", "0.46698007", "0.4618829", "0.45837608", "0.45833078", "0.4575697", "0.45287693", "0.45206705", "0.45120922", "0.450901", "0.44926324", "0.44734597", "0.4445218", "0.44401538", "0.443...
0.4521988
13
verify the required parameter 'generalContractId' is set
@SuppressWarnings("rawtypes") private Call addPaymentLinkConfigurationValidateBeforeCall(String generalContractId, PaymentLinkOptions body) throws ApiException { if (generalContractId == null) { throw new ApiException("Missing the required parameter 'generalContractId' when calling addPaymentLinkConfiguration(Async)"); } return addPaymentLinkConfigurationCall(generalContractId, body); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@SuppressWarnings(\"rawtypes\")\n private Call updateContractValidateBeforeCall(String generalContractId, GeneralContractsDTO body) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling updateContract...
[ "0.65667087", "0.6498893", "0.64641535", "0.62215364", "0.6210321", "0.61307234", "0.6029447", "0.5991647", "0.58935875", "0.5867352", "0.57154477", "0.5708672", "0.565344", "0.55975854", "0.5568958", "0.5535204", "0.54849637", "0.5440859", "0.5439886", "0.5439886", "0.540831...
0.51919657
35
Build call for addThirdPartyConfiguration
public Call addThirdPartyConfigurationCall(String generalContractId, ThirdPartyConfigurationDTO body) throws ApiException { Object localVarPostBody = body; // create path and map variables String localVarPath = "/General/Contracts/{generalContractId}/ThirdPartyConfiguration" .replaceAll("\\{" + "generalContractId" + "\\}", apiClient.escapeString(generalContractId.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); String[] localVarAuthNames = new String[] { "oauth_token" }; return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract CONFIG build();", "Builder useBuildDistribution();", "BuildClient createBuildClient();", "GradleBuild create();", "@SuppressWarnings(\"rawtypes\")\n private Call addThirdPartyConfigurationValidateBeforeCall(String generalContractId, ThirdPartyConfigurationDTO body) throws ApiException {\...
[ "0.59377867", "0.5484345", "0.5419153", "0.53531915", "0.52833694", "0.52802175", "0.52463686", "0.52260876", "0.5213648", "0.51923025", "0.51396257", "0.51071626", "0.50024915", "0.4982065", "0.48976067", "0.48731485", "0.48582405", "0.48507488", "0.48456672", "0.4834759", "...
0.47937328
22
verify the required parameter 'generalContractId' is set
@SuppressWarnings("rawtypes") private Call addThirdPartyConfigurationValidateBeforeCall(String generalContractId, ThirdPartyConfigurationDTO body) throws ApiException { if (generalContractId == null) { throw new ApiException("Missing the required parameter 'generalContractId' when calling addThirdPartyConfiguration(Async)"); } return addThirdPartyConfigurationCall(generalContractId, body); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@SuppressWarnings(\"rawtypes\")\n private Call updateContractValidateBeforeCall(String generalContractId, GeneralContractsDTO body) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling updateContract...
[ "0.6566565", "0.6497611", "0.64637333", "0.622235", "0.6210186", "0.6131018", "0.60290796", "0.59923744", "0.58934605", "0.58661616", "0.57160485", "0.57071656", "0.5653759", "0.55980074", "0.5569409", "0.553539", "0.5487554", "0.5440618", "0.5440618", "0.5439598", "0.5408142...
0.53854465
22
Build call for getAvailableCurrencies
public Call getAvailableCurrenciesCall(String generalContractId) throws ApiException { Object localVarPostBody = null; // create path and map variables String localVarPath = "/General/Contracts/{generalContractId}/AvailableCurrencies" .replaceAll("\\{" + "generalContractId" + "\\}", apiClient.escapeString(generalContractId.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); String[] localVarAuthNames = new String[] { "oauth_token" }; return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Collection<String> getAllSupportedCurrenciesByShops();", "List<CurrencyDTO> getCurrencies();", "public String getCurrencies() {\n\n\t\treturn getJson(API_VERSION, PUBLIC, \"getcurrencies\");\n\t}", "public Pokemon.Currency.Builder getCurrencyBuilder() {\n bitField0_ |= 0x00000400;\n onChanged()...
[ "0.63488084", "0.6064911", "0.5839817", "0.58074844", "0.57875156", "0.578743", "0.56128997", "0.5554097", "0.5520691", "0.55164284", "0.53422934", "0.5296954", "0.5173943", "0.51348877", "0.508525", "0.50076616", "0.49873373", "0.49574494", "0.4953622", "0.49202484", "0.4904...
0.54126567
10
verify the required parameter 'generalContractId' is set
@SuppressWarnings("rawtypes") private Call getAvailableCurrenciesValidateBeforeCall(String generalContractId) throws ApiException { if (generalContractId == null) { throw new ApiException("Missing the required parameter 'generalContractId' when calling getAvailableCurrencies(Async)"); } return getAvailableCurrenciesCall(generalContractId); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@SuppressWarnings(\"rawtypes\")\n private Call updateContractValidateBeforeCall(String generalContractId, GeneralContractsDTO body) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling updateContract...
[ "0.65667087", "0.6498893", "0.64641535", "0.62215364", "0.6210321", "0.61307234", "0.6029447", "0.5991647", "0.58935875", "0.5867352", "0.5708672", "0.565344", "0.55975854", "0.5568958", "0.5535204", "0.54849637", "0.5440859", "0.5439886", "0.5439886", "0.54083145", "0.539837...
0.57154477
10
Build call for getAvailablePaymentMethods
public Call getAvailablePaymentMethodsCall(String generalContractId, GetAvailablePaymentMethodsDTO body) throws ApiException { Object localVarPostBody = body; // create path and map variables String localVarPath = "/General/Contracts/{generalContractId}/getAvailablePaymentMethods" .replaceAll("\\{" + "generalContractId" + "\\}", apiClient.escapeString(generalContractId.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); String[] localVarAuthNames = new String[] { "oauth_token" }; return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "List<PaymentMethode> getSupportedPaymentMethods(AbstractOrder order);", "@org.jetbrains.annotations.NotNull()\n public abstract java.util.List<java.lang.String> getPaymentMethodTypes();", "io.opencannabis.schema.commerce.Payments.PaymentMethod getMethod();", "public List<CoinbasePaymentMethod> getCoinbase...
[ "0.66609144", "0.62735116", "0.6066762", "0.57958275", "0.5793649", "0.5772508", "0.5701242", "0.568999", "0.56321794", "0.5605958", "0.55648535", "0.55580986", "0.5406778", "0.54063183", "0.53977275", "0.53534037", "0.525873", "0.51883477", "0.51697993", "0.51530164", "0.510...
0.47193158
55
verify the required parameter 'generalContractId' is set
@SuppressWarnings("rawtypes") private Call getAvailablePaymentMethodsValidateBeforeCall(String generalContractId, GetAvailablePaymentMethodsDTO body) throws ApiException { if (generalContractId == null) { throw new ApiException("Missing the required parameter 'generalContractId' when calling getAvailablePaymentMethods(Async)"); } return getAvailablePaymentMethodsCall(generalContractId, body); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@SuppressWarnings(\"rawtypes\")\n private Call updateContractValidateBeforeCall(String generalContractId, GeneralContractsDTO body) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling updateContract...
[ "0.6566565", "0.6497611", "0.64637333", "0.622235", "0.6210186", "0.6131018", "0.60290796", "0.59923744", "0.58934605", "0.58661616", "0.57160485", "0.57071656", "0.5653759", "0.55980074", "0.5569409", "0.553539", "0.5487554", "0.5440618", "0.5440618", "0.5439598", "0.5408142...
0.5028553
39
Build call for getAvailablePaymentMethodsForTransaction
public Call getAvailablePaymentMethodsForTransactionCall(String generalContractId, String smartTransactionId, GetAvailablePaymentMethodsDTO body) throws ApiException { Object localVarPostBody = body; // create path and map variables String localVarPath = "/General/Contracts/{generalContractId}/getAvailablePaymentMethods/{smartTransactionId}" .replaceAll("\\{" + "generalContractId" + "\\}", apiClient.escapeString(generalContractId.toString())) .replaceAll("\\{" + "smartTransactionId" + "\\}", apiClient.escapeString(smartTransactionId.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); String[] localVarAuthNames = new String[] { "oauth_token" }; return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "List<PaymentMethode> getSupportedPaymentMethods(AbstractOrder order);", "@org.jetbrains.annotations.NotNull()\n public abstract java.util.List<java.lang.String> getPaymentMethodTypes();", "public List<BrainTreePaymentInfo> getPaymentMethods(final SessionContext ctx)\n\t{\n\t\tList<BrainTreePaymentInfo> coll...
[ "0.6445597", "0.5914451", "0.5744711", "0.5700834", "0.56591254", "0.55832285", "0.5574028", "0.5488026", "0.5434384", "0.53069854", "0.52960163", "0.52734286", "0.52732986", "0.52723575", "0.5138234", "0.5114124", "0.5100171", "0.5088592", "0.501909", "0.49828646", "0.497954...
0.48235816
26
verify the required parameter 'generalContractId' is set
@SuppressWarnings("rawtypes") private Call getAvailablePaymentMethodsForTransactionValidateBeforeCall(String generalContractId, String smartTransactionId, GetAvailablePaymentMethodsDTO body) throws ApiException { if (generalContractId == null) { throw new ApiException("Missing the required parameter 'generalContractId' when calling getAvailablePaymentMethodsForTransaction(Async)"); } // verify the required parameter 'smartTransactionId' is set if (smartTransactionId == null) { throw new ApiException("Missing the required parameter 'smartTransactionId' when calling getAvailablePaymentMethodsForTransaction(Async)"); } return getAvailablePaymentMethodsForTransactionCall(generalContractId, smartTransactionId, body); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@SuppressWarnings(\"rawtypes\")\n private Call updateContractValidateBeforeCall(String generalContractId, GeneralContractsDTO body) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling updateContract...
[ "0.65667087", "0.6498893", "0.64641535", "0.62215364", "0.6210321", "0.61307234", "0.6029447", "0.5991647", "0.58935875", "0.5867352", "0.57154477", "0.5708672", "0.565344", "0.55975854", "0.5568958", "0.5535204", "0.54849637", "0.5440859", "0.5439886", "0.5439886", "0.540831...
0.0
-1
Build call for getIframeOptions
public Call getIframeOptionsCall(String generalContractId) throws ApiException { Object localVarPostBody = null; // create path and map variables String localVarPath = "/General/Contracts/{generalContractId}/IframeOptions" .replaceAll("\\{" + "generalContractId" + "\\}", apiClient.escapeString(generalContractId.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); String[] localVarAuthNames = new String[] { "oauth_token" }; return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@SuppressWarnings(\"rawtypes\")\n private Call getIframeOptionsValidateBeforeCall(String generalContractId) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling getIframeOptions(Async)\");\n }...
[ "0.5361675", "0.5323526", "0.5287617", "0.52759314", "0.52544653", "0.5202122", "0.5199247", "0.51340675", "0.50724036", "0.50382996", "0.49468756", "0.4924772", "0.49163136", "0.49051833", "0.48914874", "0.48848453", "0.48651993", "0.48396343", "0.48244593", "0.48004112", "0...
0.5207378
5
verify the required parameter 'generalContractId' is set
@SuppressWarnings("rawtypes") private Call getIframeOptionsValidateBeforeCall(String generalContractId) throws ApiException { if (generalContractId == null) { throw new ApiException("Missing the required parameter 'generalContractId' when calling getIframeOptions(Async)"); } return getIframeOptionsCall(generalContractId); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@SuppressWarnings(\"rawtypes\")\n private Call updateContractValidateBeforeCall(String generalContractId, GeneralContractsDTO body) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling updateContract...
[ "0.6566565", "0.6497611", "0.64637333", "0.622235", "0.6210186", "0.6131018", "0.59923744", "0.58934605", "0.58661616", "0.57160485", "0.57071656", "0.5653759", "0.55980074", "0.5569409", "0.553539", "0.5487554", "0.5440618", "0.5440618", "0.5439598", "0.5408142", "0.53970677...
0.60290796
6
Build call for getOne
public Call getOneCall(String generalContractId) throws ApiException { Object localVarPostBody = null; // create path and map variables String localVarPath = "/General/Contracts/{generalContractId}" .replaceAll("\\{" + "generalContractId" + "\\}", apiClient.escapeString(generalContractId.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); String[] localVarAuthNames = new String[] { "oauth_token" }; return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@GET(\"posts/1\")\n Call<Post> getPostOne();", "public void findOne( Map<String, ? extends Object> filter, final ObjectCallback<Qualification> callback){\n\n /**\n Call the onBefore event\n */\n callback.onBefore();\n\n\n //Definging...
[ "0.5732716", "0.5385678", "0.5295763", "0.5262861", "0.5205434", "0.51412994", "0.51323473", "0.5101934", "0.50917923", "0.5088846", "0.5088407", "0.5077867", "0.50525445", "0.5044491", "0.5028488", "0.50109506", "0.4983623", "0.4980046", "0.4974865", "0.49643946", "0.4946662...
0.0
-1
verify the required parameter 'generalContractId' is set
@SuppressWarnings("rawtypes") private Call getOneValidateBeforeCall(String generalContractId) throws ApiException { if (generalContractId == null) { throw new ApiException("Missing the required parameter 'generalContractId' when calling getOne(Async)"); } return getOneCall(generalContractId); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@SuppressWarnings(\"rawtypes\")\n private Call updateContractValidateBeforeCall(String generalContractId, GeneralContractsDTO body) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling updateContract...
[ "0.65667087", "0.64641535", "0.62215364", "0.6210321", "0.61307234", "0.6029447", "0.5991647", "0.58935875", "0.5867352", "0.57154477", "0.5708672", "0.565344", "0.55975854", "0.5568958", "0.5535204", "0.54849637", "0.5440859", "0.5439886", "0.5439886", "0.54083145", "0.53983...
0.6498893
1
Build call for getThirdPartyConfiguration
public Call getThirdPartyConfigurationCall(String generalContractId) throws ApiException { Object localVarPostBody = null; // create path and map variables String localVarPath = "/General/Contracts/{generalContractId}/ThirdPartyConfiguration" .replaceAll("\\{" + "generalContractId" + "\\}", apiClient.escapeString(generalContractId.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); String[] localVarAuthNames = new String[] { "oauth_token" }; return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract CONFIG build();", "@NonNull\n\t\tConfig build();", "BuildClient createBuildClient();", "Builder useBuildDistribution();", "@Test\n public void testBuildDefer() throws Exception {\n mockHttpClient = mock(OptimizelyHttpClient.class);\n\n projectConfigManager = builder()\n ...
[ "0.62715715", "0.5725215", "0.5662215", "0.55921054", "0.55784315", "0.5423352", "0.5406038", "0.5330892", "0.53265715", "0.5232222", "0.5218665", "0.5212837", "0.51906675", "0.51731855", "0.51336443", "0.5072051", "0.5043713", "0.5023472", "0.50229883", "0.50165564", "0.5011...
0.46527225
61
verify the required parameter 'generalContractId' is set
@SuppressWarnings("rawtypes") private Call getThirdPartyConfigurationValidateBeforeCall(String generalContractId) throws ApiException { if (generalContractId == null) { throw new ApiException("Missing the required parameter 'generalContractId' when calling getThirdPartyConfiguration(Async)"); } return getThirdPartyConfigurationCall(generalContractId); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@SuppressWarnings(\"rawtypes\")\n private Call updateContractValidateBeforeCall(String generalContractId, GeneralContractsDTO body) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling updateContract...
[ "0.6566565", "0.6497611", "0.64637333", "0.622235", "0.6210186", "0.6131018", "0.60290796", "0.59923744", "0.58934605", "0.57160485", "0.57071656", "0.5653759", "0.55980074", "0.5569409", "0.553539", "0.5487554", "0.5440618", "0.5440618", "0.5439598", "0.5408142", "0.53970677...
0.58661616
9
Build call for getTransferBalance
public Call getTransferBalanceCall(ProductInstanceID generalContractId) throws ApiException { Object localVarPostBody = null; // create path and map variables String localVarPath = "/General/Contracts/{generalContractId}/transferBalance" .replaceAll("\\{" + "generalContractId" + "\\}", apiClient.escapeString(generalContractId.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); String[] localVarAuthNames = new String[] { "oauth_token" }; return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract Response makeTransfer(Transaction transaction) throws AccountNotFoundException, InsufficientFundsException;", "public BaseJson<BigDecimal> wallet_balance() throws Exception {\n String s = main(\"wallet_balance\",\"[]\");\n return JsonHelper.jsonStr2Obj(s, BaseJson.class);\n }", ...
[ "0.56784827", "0.54783183", "0.5470149", "0.5389158", "0.53702205", "0.53702205", "0.5368622", "0.5361355", "0.5297711", "0.5292658", "0.5227306", "0.51964223", "0.518826", "0.5186044", "0.5178242", "0.5164229", "0.5154988", "0.515344", "0.5110543", "0.5100825", "0.5098307", ...
0.5066933
25
verify the required parameter 'generalContractId' is set
@SuppressWarnings("rawtypes") private Call getTransferBalanceValidateBeforeCall(ProductInstanceID generalContractId) throws ApiException { if (generalContractId == null) { throw new ApiException("Missing the required parameter 'generalContractId' when calling getTransferBalance(Async)"); } return getTransferBalanceCall(generalContractId); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@SuppressWarnings(\"rawtypes\")\n private Call updateContractValidateBeforeCall(String generalContractId, GeneralContractsDTO body) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling updateContract...
[ "0.65667087", "0.6498893", "0.64641535", "0.62215364", "0.6210321", "0.61307234", "0.6029447", "0.58935875", "0.5867352", "0.57154477", "0.5708672", "0.565344", "0.55975854", "0.5568958", "0.5535204", "0.54849637", "0.5440859", "0.5439886", "0.5439886", "0.54083145", "0.53983...
0.5991647
7
Build call for patchContract
public Call patchContractCall(String generalContractId, GeneralContractsDTO body) throws ApiException { Object localVarPostBody = body; // create path and map variables String localVarPath = "/General/Contracts/{generalContractId}" .replaceAll("\\{" + "generalContractId" + "\\}", apiClient.escapeString(generalContractId.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); String[] localVarAuthNames = new String[] { "oauth_token" }; return apiClient.buildCall(localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "UpdateOperationConfiguration build();", "public void createContract() {\n\r\n\t}", "interface Patch {\n\n }", "public static native PatchResult patch(String oldApkPath, String patchPath, String newApkPath);", "@Override\n public BankPatch createNewPatch() {\n return super.createNewPatch();\n ...
[ "0.57335544", "0.55495965", "0.55305725", "0.54426557", "0.54053354", "0.5387123", "0.53510565", "0.5349601", "0.53389275", "0.5314232", "0.5294991", "0.5251549", "0.5240746", "0.5188949", "0.5141636", "0.5132685", "0.5114606", "0.51004606", "0.50535744", "0.50219256", "0.499...
0.47980613
33
verify the required parameter 'generalContractId' is set
@SuppressWarnings("rawtypes") private Call patchContractValidateBeforeCall(String generalContractId, GeneralContractsDTO body) throws ApiException { if (generalContractId == null) { throw new ApiException("Missing the required parameter 'generalContractId' when calling patchContract(Async)"); } return patchContractCall(generalContractId, body); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@SuppressWarnings(\"rawtypes\")\n private Call updateContractValidateBeforeCall(String generalContractId, GeneralContractsDTO body) throws ApiException {\n if (generalContractId == null) {\n throw new ApiException(\"Missing the required parameter 'generalContractId' when calling updateContract...
[ "0.6566565", "0.6497611", "0.622235", "0.6210186", "0.6131018", "0.60290796", "0.59923744", "0.58934605", "0.58661616", "0.57160485", "0.57071656", "0.5653759", "0.55980074", "0.5569409", "0.553539", "0.5487554", "0.5440618", "0.5440618", "0.5439598", "0.5408142", "0.53970677...
0.64637333
2