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 |
|---|---|---|---|---|---|---|
creating file object with path | public static Stream<String> createStreamFromPath(String pathOrFileName) throws IOException {
logger.info("creating a file object with path or file name : " + pathOrFileName);
return Files.lines(Paths.get(pathOrFileName), StandardCharsets.ISO_8859_1);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public File createFile(final String path) {\n return new com.good.gd.file.File(path);\n }",
"@SuppressWarnings(\"unused\")\r\n\tprivate static File createFile(String path) {\r\n\t\t\r\n\t\t// open the file\r\n\t\tFile currentFile = new File(path);\r\n\t\t\r\n\t\t\r\n\t\t// check if it is a valid file\r... | [
"0.7412993",
"0.7318913",
"0.6874353",
"0.6700743",
"0.6656781",
"0.6589724",
"0.64977735",
"0.64949703",
"0.64376813",
"0.63927203",
"0.6365877",
"0.62874997",
"0.62637043",
"0.6262092",
"0.6218003",
"0.62101096",
"0.618701",
"0.61775076",
"0.6132265",
"0.6132152",
"0.611875... | 0.0 | -1 |
Split stream with delimiter as key value pairs & add it to the map | public static Map<String, String> convertTomap(Stream<String> stream, String delimiter) {
logger.info("converting stream of strings to Map using delimiter : " + delimiter);
return stream.filter(current_line -> current_line.length() > 0)
.map(cl -> cl.split(delimiter))
.filter(cl -> cl.length > 1)
.collect(Collectors.toMap(cl -> cl[0].trim(), cl -> cl[1].trim(), (val1, val2) -> val2.trim()));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private HashMap<Object, Object> HashMapTransform(List<String> lines) {\n\n HashMap<Object, Object> keypair = new HashMap<>();\n\n for (String line : lines) {\n if (line.contains(pairDelimiter)) {\n String[] intermediate = line.split(pairDelimiter, maxSplitSize);\n ... | [
"0.65334666",
"0.58641595",
"0.5793016",
"0.5753995",
"0.5651578",
"0.5524882",
"0.5501675",
"0.546588",
"0.5343798",
"0.52255803",
"0.5184067",
"0.5153721",
"0.51242995",
"0.5108451",
"0.51029134",
"0.5082584",
"0.5051315",
"0.50143385",
"0.49020064",
"0.48669764",
"0.484455... | 0.72998613 | 0 |
Takes two maps one with key value pairs(for example key=value) and the other with only values (for example english,french localized values) | public static List<String> findAndAppendkeyWithValue(Map<String, String> with_key_and_values, Map<String, String> with_values) {
logger.info("Streaming two different maps to find and append key with value");
return with_values.entrySet().stream().filter(valueSet -> isContainskeyInMap(valueSet.getKey(), with_key_and_values))
.map(valueSet -> compareValueWithKeyValMap(valueSet,with_key_and_values))
.flatMap(list -> list.stream()).collect(Collectors.toList());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static Map<String, String> syncAttributes(Map<String, String> first, Map<String, String> second){\n Map<String, String> synced = new HashMap<>();\n\n for(String firstKey : first.keySet()){\n if(second.containsKey(firstKey)){\n //both contain the same key -> take from... | [
"0.61117524",
"0.6045281",
"0.5851304",
"0.56541574",
"0.5607262",
"0.55382144",
"0.5440348",
"0.54206073",
"0.5403176",
"0.5399994",
"0.5383509",
"0.5363801",
"0.530952",
"0.52831274",
"0.5213257",
"0.5188289",
"0.5111382",
"0.50751567",
"0.5065057",
"0.5053782",
"0.50501454... | 0.54487336 | 6 |
Checks if a key is present in the Map of key value pairs and retuns true if exists otherwise add the key to not found list and retuns false | public static boolean isContainskeyInMap(String key, Map<String, String> keyValuePair) {
if (keyValuePair.values().contains(key)) {
return true;
} else {
notFoundList.add(key);
return false;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private boolean contains(String key) {\n return contains(dict, key);\n }",
"public boolean contains (String key)\n {\n use (key);\n return map.containsKey (key);\n }",
"public boolean existsKey(String inKey);",
"public boolean contains(String key)\r\n { return get(key) != null; }",
... | [
"0.7353752",
"0.73456824",
"0.719581",
"0.7191871",
"0.7186195",
"0.7154394",
"0.7129719",
"0.71243453",
"0.7108748",
"0.7099341",
"0.70229053",
"0.7010352",
"0.70049554",
"0.70041287",
"0.70041287",
"0.7003024",
"0.7000329",
"0.69939595",
"0.696641",
"0.6953556",
"0.6941902"... | 0.7556216 | 0 |
Compare each entry key with map of key value pairs & collect it to list | public static List<String> compareValueWithKeyValMap(Map.Entry<String,String> valueSet, Map<String,String> with_key_values){
return with_key_values.entrySet().stream().filter(keyVal -> keyVal.getValue().equalsIgnoreCase(valueSet.getKey()))
.map(keyVal -> keyVal.getKey().concat("=").concat(valueSet.getValue()))
.collect(Collectors.toList());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static <K, V extends Comparable<? super V>> List<Entry<K, V>> getMapSortedByValue(Map<K, V> map) {\r\n\t\tfinal int size = map.size();\r\n\t\tfinal List<Map.Entry<K, V>> list = new ArrayList<Map.Entry<K, V>>(size);\r\n\t\tlist.addAll(map.entrySet());\r\n\t\tfinal ValueComparator<V> cmp = new ValueComparator... | [
"0.64448655",
"0.64082223",
"0.6242119",
"0.589442",
"0.584255",
"0.5752885",
"0.57316524",
"0.57209724",
"0.56975615",
"0.5686995",
"0.5617425",
"0.557406",
"0.5567228",
"0.55469877",
"0.5537925",
"0.54874396",
"0.5424298",
"0.54118735",
"0.539752",
"0.5397239",
"0.5339693",... | 0.6638424 | 0 |
This get's called if the user input is 1 | public static void generateLocalizedFile() throws IOException {
GenerateFile generateFile = new GenerateFile();
Stream<String> fileStream1 = createStreamFromPath("src"+File.separator+"test.properties");
Stream<String> fileStream2 = createStreamFromPath("src"+File.separator+"test.txt");
Map<String, String> with_key_values = convertTomap(fileStream1, "=");
Map<String, String> with_only_values = convertTomap(fileStream2, "\\|");
if (!with_key_values.isEmpty() && with_key_values != null && !with_only_values.isEmpty() && with_only_values != null) {
generateFile.createFileFromList(findAndAppendkeyWithValue(with_key_values, with_only_values),"file.properties");
} else {
logger.info("Either one of your files are not following the rules");
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void checkUserInput() {\n }",
"public boolean checkInput();",
"private int getUserInput() {\n java.util.Scanner scanner = new java.util.Scanner(System.in);\n int input = scanner.nextInt();\n while(input < 1 || input > 3) {\n System.out.println(\"only enter 1 2 or 3.\"... | [
"0.67683387",
"0.6492957",
"0.62489563",
"0.6220655",
"0.6189826",
"0.61838657",
"0.6157944",
"0.61579293",
"0.61411893",
"0.61103624",
"0.6091801",
"0.60816085",
"0.6074385",
"0.60709345",
"0.6060869",
"0.6052864",
"0.5990939",
"0.5982571",
"0.5980892",
"0.5976409",
"0.59593... | 0.0 | -1 |
This get's called if the user input is 2 | public static void extractValues() throws IOException{
GenerateFile generateFile = new GenerateFile();
Stream<String> fileStream1 = createStreamFromPath("src"+File.separator+"test.properties");
logger.info(fileStream1.toString());
Set<String> extractedKeys = generateFile.extractvalsFromPropertiesFile(fileStream1);
List<String> newString = new ArrayList<>(extractedKeys);
System.out.println(extractedKeys);
generateFile.createFileFromList(newString,"values.txt");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static void pickNumOfPlayers()\n\t{\n\t\tprintBorder();\n\t\tSystem.out.print(\"Enter 1 for one player or 2 for two player: \");\n\t\tnumOfPlayers = input.nextInt(); // Throws error if input is not an int\n\t\tif (numOfPlayers == 2) isMultiplayer = true;\n\t\tSystem.out.println();\n\t}",
"public void set... | [
"0.6595835",
"0.65285105",
"0.6492562",
"0.6436082",
"0.6352584",
"0.6330666",
"0.6302205",
"0.62996626",
"0.62062633",
"0.6152575",
"0.6123402",
"0.60394526",
"0.60041034",
"0.5983887",
"0.59818196",
"0.5981694",
"0.5945053",
"0.5938427",
"0.59321773",
"0.5892317",
"0.588642... | 0.0 | -1 |
TODO implement this method | public Piece move(TetrisDirectionsEnum direction) {
return null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void perish() {\n \n }",
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n protected void getExras() ... | [
"0.6024691",
"0.5867903",
"0.5834122",
"0.5818061",
"0.57963616",
"0.5778915",
"0.5714397",
"0.56058717",
"0.56058717",
"0.5577767",
"0.5546333",
"0.5544818",
"0.5536199",
"0.55281126",
"0.5498219",
"0.54889494",
"0.5444405",
"0.5436335",
"0.54174423",
"0.54028255",
"0.537853... | 0.0 | -1 |
Created by wangzp on 2014/12/16. | public interface IEjsinoDao {
public List<EjsinoCityInfo> getCityInfo();
/**
* 记录e车险订单 根据业务场景因此业务量少,做使用一个表做记录即可
* @param ejsinoFormModel
* @return
*/
public int insertEjsinoInfo(EjsinoFormModel ejsinoFormModel);
/**
* 完善e车险订单信息
* @param ejsinoFormModel
* @return
*/
public int updateEjsinoInfo(EjsinoFormModel ejsinoFormModel);
/**
* 判断交易号是否存在
* @param outerno
* @return
*/
public int getEjsinoCountByOuterno(String outerno);
} | {
"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.62493384",
"0.617367",
"0.61223584",
"0.6040808",
"0.6022189",
"0.6022189",
"0.6003041",
"0.59944993",
"0.595476",
"0.59210616",
"0.5916109",
"0.5894501",
"0.5893849",
"0.5882873",
"0.58769965",
"0.58475596",
"0.5845471",
"0.5842289",
"0.5824657",
"0.58193415",
"0.58193415... | 0.0 | -1 |
BankServerApp/BankServerOperations.java . Generated by the IDLtoJava compiler (portable), version "3.2" from BankServer.idl Friday, October 11, 2019 10:45:23 AM FJT | public interface BankServerOperations
{
boolean checkAcntNum (int acntNum);
boolean checkAcntStatus (int acntNum);
boolean verifyAcntPin (int acntNum, int acntPin);
void lockAcnt (int acntNum);
void makeDeposit (int acntNum, int amount);
void makeWithdrawal (int acntNum, int amount);
double checkBalance (int acntNum);
boolean checkOverdraft (int acntNum, double amount);
void getTransactions (int acntNum, String startDate, String endDate, String emailAddr);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public interface Ops extends OpsOperations, org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity \n{\n}",
"public interface BankProcessingCenterOperations\n{\n\t/* constants */\n\t/* operations */\n\tboolean debit(TransactionRequest transaction) throws ebank.InsufficientBalanceException,ebank.CardNumberExcept... | [
"0.60535616",
"0.59737146",
"0.5947091",
"0.5804261",
"0.575758",
"0.5679761",
"0.56286037",
"0.55768484",
"0.5574466",
"0.55594873",
"0.55096185",
"0.5416193",
"0.5413247",
"0.5393756",
"0.5381263",
"0.5370937",
"0.536966",
"0.5266959",
"0.5260159",
"0.5259548",
"0.52456665"... | 0.7022636 | 0 |
print index that indicates current scheme,host,port,path, query test were using. | public UrlValidatorTest(String testName) {
super(testName);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void printIndexDetails(ResultSet table) throws SQLException {\n/* \n ResultSetMetaData rs_meta = table.getMetaData();\n for (int x = 1; x <= rs_meta.getColumnCount(); x++) {\n writeMessage(\"index attr: \" + rs_meta.getColumnName(x));\n }\n*/\n \n ... | [
"0.5872944",
"0.53191787",
"0.53070015",
"0.5285167",
"0.52724",
"0.52073777",
"0.51745236",
"0.51575726",
"0.50742847",
"0.504079",
"0.50212264",
"0.49987942",
"0.4993618",
"0.49918008",
"0.49537385",
"0.49468797",
"0.49155065",
"0.49144277",
"0.49128038",
"0.49127963",
"0.4... | 0.0 | -1 |
URLs with domain only (i.e. | public void testYourFirstPartition() {
System.out.print("\nTesting First Partition...\n");
executeTestPrintResult("http://a.com", true); // valid scheme all letters
executeTestPrintResult("http://a.a", false); // invalid domain
executeTestPrintResult("http://.com", false); // invalid scheme, empty domain
executeTestPrintResult("http://com", false); // invalid scheme, empty domain
executeTestPrintResult("http://abc", false); // invalid scheme, no TLD
executeTestPrintResult("http://a.123", false); // invalid domain
executeTestPrintResult("h123://a.com", true); // valid scheme letters/digits
executeTestPrintResult("1htp://a.com", false); // invalid scheme starts with digit
executeTestPrintResult("http:///a.com", false); // invalid scheme triple slash
executeTestPrintResult("http:/a.com", false); // invalid scheme one slash
executeTestPrintResult("http/a.com", false); // invalid scheme no colon
executeTestPrintResult("http://a.com", true); // one dot
executeTestPrintResult("http://a.a.a.com", true); // arbitrary number of dots
executeTestPrintResult("http://a.a.a.a.com", true); // arbitrary number of dots
executeTestPrintResult("http://0.0.0.0", true); // four digits all min
executeTestPrintResult("http://255.255.255.255", true); // four digits all valid max
executeTestPrintResult("http://255.255.256.255", false); // four digits, one invalid
executeTestPrintResult("http://0.-1.0.0", false); // invalid digit/character
executeTestPrintResult("http://0.0.0.0.0", false); // five digits
executeTestPrintResult("http://0.0", false); // two digits
executeTestPrintResult("", false); // empty string
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static boolean isSpecialDomain(String domain) {\n/* 84 */ String ucDomain = domain.toUpperCase(Locale.ENGLISH);\n/* 85 */ return (ucDomain.endsWith(\".COM\") || ucDomain.endsWith(\".EDU\") || ucDomain.endsWith(\".NET\") || ucDomain.endsWith(\".GOV\") || ucDomain.endsWith(\".MIL\") || ucDomain.end... | [
"0.6648054",
"0.66019577",
"0.65418434",
"0.6461933",
"0.6417325",
"0.62849605",
"0.6194986",
"0.6185589",
"0.6117587",
"0.6109535",
"0.6095634",
"0.6095612",
"0.6058679",
"0.6040617",
"0.6035887",
"0.6002919",
"0.59911984",
"0.59799963",
"0.59730285",
"0.5967864",
"0.5942967... | 0.0 | -1 |
URLs with domain + port | public void testYourSecondPartition() {
System.out.print("\nTesting Second Partition...\n");
executeTestPrintResult("http://abc.com:65535", true); // max allowed port number
executeTestPrintResult("http://abc.com:0", true); // min allowed port number
executeTestPrintResult("http://abc.com:1", true); // 1 digit port number
executeTestPrintResult("http://abc.com:99", true); // 2 digit port number
executeTestPrintResult("http://abc.com:999", true); // 3 digit port number
executeTestPrintResult("http://abc.com:1000", true); // 4 digit port number
executeTestPrintResult("http://abc.com:65536", false); // port number too high
executeTestPrintResult("http://abc.com:-1", false); // negative port
executeTestPrintResult("http://abc.com:a", false); // letter in port
executeTestPrintResult("http://abc.com:", false); // empty port
executeTestPrintResult(":123", false); // no domain
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static String getHostURL(String url) {\n URI uri = URI.create(url);\n int port = uri.getPort();\n if (port == -1) {\n return uri.getScheme() + \"://\" + uri.getHost() + \"/\";\n } else {\n return uri.getScheme() + \"://\" + uri.getHost() + \":\" + uri.getPo... | [
"0.6624805",
"0.63768816",
"0.6271804",
"0.6271804",
"0.6216362",
"0.6216362",
"0.6150953",
"0.6128582",
"0.6065397",
"0.6033766",
"0.6029056",
"0.6001004",
"0.6001004",
"0.5989112",
"0.59242994",
"0.59242994",
"0.5912419",
"0.5865474",
"0.58316565",
"0.58290356",
"0.58091396... | 0.0 | -1 |
URLs with domain + path | public void testYourThirdPartition() {
System.out.print("\nTesting Third Partition...\n");
executeTestPrintResult("http://abc.com/", true); // empty
executeTestPrintResult("http://abc.com/a/b/c/1/2/3", true); // arbitrary length, letters and digits
executeTestPrintResult("http://abc.com/a/#b", false); // invalid char
executeTestPrintResult("http://abc.com/a/$b", true); // $ is valid char
executeTestPrintResult("http://abc.com/../b", false); // invalid relative path
executeTestPrintResult("/a/b/c", false); // no domain
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"String getServerUrl();",
"private static String handleUrl(String s) {\n if (s.endsWith(\"/..\")) {\n int idx = s.lastIndexOf('/');\n s = s.substring(0, idx - 1);\n idx = s.lastIndexOf('/');\n String gs = s.substring(0, idx);\n if (!gs.equals(\"smb:/\"... | [
"0.6209543",
"0.6187125",
"0.6163127",
"0.6156058",
"0.61353445",
"0.6081733",
"0.6072395",
"0.6047449",
"0.5981204",
"0.5981204",
"0.5981204",
"0.5981204",
"0.5981204",
"0.5981204",
"0.59484416",
"0.59484416",
"0.59484416",
"0.59484416",
"0.59484416",
"0.5933242",
"0.5879209... | 0.0 | -1 |
URLs with domain + query | public void testYourFourthPartition() {
System.out.print("\nTesting Fourth Partition...\n");
executeTestPrintResult("http://abc.com?", false); // empty
executeTestPrintResult("http://abc.com?key=value", true);
executeTestPrintResult("http://abc.com?a=1&b=2&c=3", true); // arbitrary length, letters/digits
executeTestPrintResult("http://abc.com?a=1+b=2", false); // +
executeTestPrintResult("http://abc.com?a", false); // no value
executeTestPrintResult("http://abc.com?=a", false); // no key
executeTestPrintResult("?key=value", false); // no domain
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"String getQueryResultsUrl();",
"String getQueryRequestUrl();",
"public String getSearchUrl();",
"private static boolean isFromDomain(\n\t\t\tfinal UriComponents url,\n\t\t\tfinal List<String> domains) {\n\t\treturn ((url != null)\n\t\t\t\t&& domains.stream().anyMatch(searchEngine -> (searchEngine != null) &&... | [
"0.6245402",
"0.6171513",
"0.5827443",
"0.5821055",
"0.5816952",
"0.5810259",
"0.5810259",
"0.5810259",
"0.5810259",
"0.5810259",
"0.5810259",
"0.57846576",
"0.57361513",
"0.5713698",
"0.5713392",
"0.5713392",
"0.5713392",
"0.5713392",
"0.5713392",
"0.57111126",
"0.5625769",
... | 0.0 | -1 |
Different combinations of each component | public void testYourFifthPartition() {
System.out.print("\nTesting Fifth Partition...\n");
executeTestPrintResult("http://abc.com:1/a?key=value", true); // domain + port + path + query
executeTestPrintResult("http://abc.com/a?key=value", true); // domain + path + query
executeTestPrintResult("http://abc.com:1/a", true); // domain + port + path
executeTestPrintResult("http://abc.com:1?key=value", true); // domain + port + query
executeTestPrintResult("http://abc.com/a/b:80", false); // domain + path + port
executeTestPrintResult("http://abc.com?key=value/a/b/c", false); // domain + query + path
executeTestPrintResult("http://abc.com?key=value:80", false); // domain + query + port
executeTestPrintResult("http://abc.com:1?key=value/a/b/c", false); // domain + port + query + path
executeTestPrintResult("http://abc.com?key=value/a/b/c:80", false); // domain + query + path + port
executeTestPrintResult("http://abc.com?key=value:80/a/b/c", false); // domain + query + port + path
executeTestPrintResult("http://abc.com/a/b/c:80?key=value", false); // domain + path + port + query
executeTestPrintResult("http://abc.com/a/b/c?key=value:80", false); // domain + path + query + port
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void generateCombination() {\r\n\r\n\t\tfor (byte x = 0; x < field.length; x++) {\r\n\t\t\tfor (byte y = 0; y < field[x].length; y++) {\r\n\t\t\t\tfield[x][y].setValue((byte) newFigure(Constants.getRandom()));\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"String getCombination(int numberOfSides);",
"private static voi... | [
"0.6497564",
"0.6368857",
"0.6217172",
"0.5962258",
"0.5895587",
"0.5894245",
"0.5857289",
"0.58353686",
"0.5808165",
"0.57310766",
"0.57182485",
"0.57120526",
"0.5710197",
"0.56609935",
"0.56303865",
"0.56191176",
"0.56118876",
"0.5603202",
"0.5599799",
"0.55954546",
"0.5554... | 0.0 | -1 |
/ Part 4: complete method This method takes in an array and sorts it by inserting every element in the array into a priority queue. The array then has its indices reassigned to the new values by removeMin being called on the queue. Meaning the array is sorted into ascending order. | public static void sort(int[] arr){
PriorityQueue queue = new PriorityQueue(arr.length);
for(int i = 0; i < arr.length; i++) {
queue.insert(arr[i]);
}
for(int i = 0; i < arr.length; i++) {
arr[i] = queue.removeMin();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void main(String[] args) {\n\t\tMyPriorityQueue mpq = new MyPriorityQueue();\n\n//\t\tmpq.insert(10);\n//\n//\t\ttestQueue(mpq);\n//\n//\t\tmpq.insert(5);\n//\n//\t\ttestQueue(mpq);\n//\n//\t\tmpq.insert(15);\n//\n//\t\ttestQueue(mpq);\n//\n//\t\tmpq.insert(2);\n//\n//\t\ttestQueue(mpq);\n//\t\t\n//\... | [
"0.66558945",
"0.6383524",
"0.63096523",
"0.63069355",
"0.6251575",
"0.6247448",
"0.62468296",
"0.6228456",
"0.62277436",
"0.61812973",
"0.6167327",
"0.6163514",
"0.6152218",
"0.61510843",
"0.6133019",
"0.6124148",
"0.6085753",
"0.6070793",
"0.6057528",
"0.6055189",
"0.604851... | 0.7130277 | 0 |
The inspection level to use for the Bot Control rule group. The common level is the least expensive. The targeted level includes all common level rules and adds rules with more advanced inspection criteria. For details, see in the WAF Developer Guide. | public void setInspectionLevel(String inspectionLevel) {
this.inspectionLevel = inspectionLevel;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getInspectionLevel() {\n return this.inspectionLevel;\n }",
"com.google.ads.googleads.v14.enums.GoalConfigLevelEnum.GoalConfigLevel getGoalConfigLevel();",
"float getMainUtteranceTargetLevel();",
"public int getLevel(){\n \t\treturn (strength + intelligence + stamina + Math.abs(charm)... | [
"0.5949561",
"0.5862844",
"0.5782557",
"0.5751856",
"0.5632022",
"0.56309503",
"0.56309503",
"0.56309503",
"0.56309503",
"0.56309503",
"0.552343",
"0.5491362",
"0.5483561",
"0.5483561",
"0.5483561",
"0.5483561",
"0.5476307",
"0.5475837",
"0.5475837",
"0.5464648",
"0.54629034"... | 0.53953534 | 61 |
The inspection level to use for the Bot Control rule group. The common level is the least expensive. The targeted level includes all common level rules and adds rules with more advanced inspection criteria. For details, see in the WAF Developer Guide. | public String getInspectionLevel() {
return this.inspectionLevel;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"com.google.ads.googleads.v14.enums.GoalConfigLevelEnum.GoalConfigLevel getGoalConfigLevel();",
"float getMainUtteranceTargetLevel();",
"public int getLevel(){\n \t\treturn (strength + intelligence + stamina + Math.abs(charm) + Math.abs(cuteness))/5;\n \t}",
"public Integer getLevel() {\n return level;... | [
"0.58638215",
"0.5784471",
"0.5753846",
"0.563262",
"0.563262",
"0.563262",
"0.563262",
"0.563262",
"0.5630051",
"0.55253303",
"0.5492676",
"0.5484903",
"0.5484903",
"0.5484903",
"0.5484903",
"0.5478276",
"0.5477275",
"0.5477275",
"0.54662174",
"0.54646266",
"0.54646266",
"... | 0.5948552 | 0 |
The inspection level to use for the Bot Control rule group. The common level is the least expensive. The targeted level includes all common level rules and adds rules with more advanced inspection criteria. For details, see in the WAF Developer Guide. | public AWSManagedRulesBotControlRuleSet withInspectionLevel(String inspectionLevel) {
setInspectionLevel(inspectionLevel);
return this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getInspectionLevel() {\n return this.inspectionLevel;\n }",
"com.google.ads.googleads.v14.enums.GoalConfigLevelEnum.GoalConfigLevel getGoalConfigLevel();",
"float getMainUtteranceTargetLevel();",
"public int getLevel(){\n \t\treturn (strength + intelligence + stamina + Math.abs(charm)... | [
"0.59471536",
"0.58642584",
"0.5782292",
"0.5751974",
"0.5630601",
"0.5630601",
"0.5630601",
"0.5630601",
"0.5630601",
"0.55242085",
"0.5490739",
"0.54830444",
"0.54830444",
"0.54830444",
"0.54830444",
"0.5477594",
"0.547538",
"0.547538",
"0.5464781",
"0.54627645",
"0.5462764... | 0.5630595 | 9 |
The inspection level to use for the Bot Control rule group. The common level is the least expensive. The targeted level includes all common level rules and adds rules with more advanced inspection criteria. For details, see in the WAF Developer Guide. | public AWSManagedRulesBotControlRuleSet withInspectionLevel(InspectionLevel inspectionLevel) {
this.inspectionLevel = inspectionLevel.toString();
return this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getInspectionLevel() {\n return this.inspectionLevel;\n }",
"com.google.ads.googleads.v14.enums.GoalConfigLevelEnum.GoalConfigLevel getGoalConfigLevel();",
"float getMainUtteranceTargetLevel();",
"public int getLevel(){\n \t\treturn (strength + intelligence + stamina + Math.abs(charm)... | [
"0.5947006",
"0.5862693",
"0.5782335",
"0.57516086",
"0.56313574",
"0.5630614",
"0.5630614",
"0.5630614",
"0.5630614",
"0.5630614",
"0.5523238",
"0.5490688",
"0.54829925",
"0.54829925",
"0.54829925",
"0.54829925",
"0.54762506",
"0.54753107",
"0.54753107",
"0.54638505",
"0.546... | 0.5454683 | 31 |
Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be redacted from this string using a placeholder value. | @Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("{");
if (getInspectionLevel() != null)
sb.append("InspectionLevel: ").append(getInspectionLevel());
sb.append("}");
return sb.toString();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String toString() { return stringify(this, true); }",
"@Override\n public String toString() {\n return new JSONSerializer().serialize(this);\n }",
"public String toString() {\n\t\treturn this.toJSON().toString();\n\t}",
"public String toString() {\n\t\treturn this.toJSON().toString();\n\t... | [
"0.80992216",
"0.8074229",
"0.80482656",
"0.80482656",
"0.80249596",
"0.79740363",
"0.7938303",
"0.7928197",
"0.79104024",
"0.78948885",
"0.77833027",
"0.7783214",
"0.7768119",
"0.77673966",
"0.77673966",
"0.77673966",
"0.77564216",
"0.7728055",
"0.77225244",
"0.7675071",
"0.... | 0.0 | -1 |
Parametrized constructor see at the top of the page for the information on the various field | public ArgFlagData(String realID, String tag, String textDesc,boolean defaultFlag,boolean selected,int position){
this.realID = realID;
this.tag = tag;
this.textDesc = textDesc;
this.defaultFlag = defaultFlag;
this.selected = selected;
this.position = position;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Constructor() {\r\n\t\t \r\n\t }",
"public Field(String watermark,\n String showfieldname,\n String saveRequired,\n String jfunction,\n String onChange,\n String onKeyDown,\n String defaultValue,\n Str... | [
"0.74428695",
"0.7010809",
"0.69826525",
"0.69721663",
"0.69593275",
"0.69329625",
"0.68237644",
"0.6800889",
"0.67834467",
"0.67611",
"0.67409205",
"0.6675662",
"0.6662796",
"0.66578513",
"0.66497356",
"0.66274494",
"0.6588491",
"0.6585594",
"0.6551719",
"0.6474565",
"0.6435... | 0.0 | -1 |
this method is called to reset the input of the user, aka selected field | public void reset(){
defaultFlag = false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected abstract void resetInputFields();",
"public void reset() {\n\t\t\t// clear the field\n\t\t\ttextField.setValue(null);\n\t\t}",
"public void resetForm() {\n selectedTipo = null;\n }",
"private void reset() {\n \t\tif (currentSuggestion != null) {\n \t\t\tsetPromptingOff(currentSuggestion.g... | [
"0.80182546",
"0.76484823",
"0.72666365",
"0.7248045",
"0.7183601",
"0.7173594",
"0.71484184",
"0.7136211",
"0.70874",
"0.7077304",
"0.700778",
"0.69767857",
"0.69369423",
"0.6927907",
"0.6915672",
"0.6915672",
"0.6911169",
"0.68797696",
"0.6857877",
"0.68304336",
"0.68184966... | 0.0 | -1 |
adding options to the options menu | @Override
public boolean onCreateOptionsMenu(Menu menu) {
menu.add(group1Id, Edit, Edit, "Edit");
menu.add(group1Id, Delete, Delete, "Delete");
menu.add(group1Id, Finish, Finish, "Finish");
return super.onCreateOptionsMenu(menu);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected abstract void addMenuOptions();",
"private void initOption() {\r\n\t\tthis.option = new JMenu(\"Options\");\r\n\t\tthis.add(option);\r\n\t\tthis.initNewGame();\r\n\t\tthis.initNewServer();\r\n\t\tthis.initNewConnect();\r\n\t\tthis.initExitConnect();\r\n\t\tthis.initExitGame();\r\n\t}",
"public void o... | [
"0.82696533",
"0.75715643",
"0.70765173",
"0.70316267",
"0.6855413",
"0.67680025",
"0.67359066",
"0.6708078",
"0.6650374",
"0.6643523",
"0.66095924",
"0.6607796",
"0.6605908",
"0.6596995",
"0.65933263",
"0.6592209",
"0.6562538",
"0.655609",
"0.6515526",
"0.64911705",
"0.64582... | 0.62726235 | 42 |
code for the actions to be performed on clicking options menu goes here ... | @Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case 1:
//Toast msg = Toast.makeText(orgDetails.this, "Menu 1", Toast.LENGTH_LONG);
//msg.show();
return true;
}
return super.onOptionsItemSelected(item);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void optionSelected(MenuActionDataItem action){\n \t\tString systemAction = action.getSystemAction();\n \t\tif(!systemAction.equals(\"\")){\n \t\t\t\n \t\t\tif(systemAction.equals(\"back\")){\n \t\t\t\tonBackPressed();\n \t\t\t}else if(systemAction.equals(\"home\")){\n \t\t\t\tIntent launchHome = new Inten... | [
"0.7485724",
"0.73606205",
"0.7360311",
"0.7216774",
"0.7206639",
"0.71952075",
"0.71222794",
"0.7109968",
"0.7036235",
"0.7018795",
"0.69621485",
"0.6921296",
"0.690371",
"0.69023985",
"0.6873075",
"0.6810162",
"0.6797861",
"0.67935276",
"0.67401266",
"0.66860515",
"0.668054... | 0.0 | -1 |
for creating calendar object and linking with its 'getInstance' method, for getting a default instance of this class for general use | private void setCurrentDateOnButton() {
final Calendar c = Calendar.getInstance();
year = c.get(Calendar.YEAR);
month = c.get(Calendar.MONTH);
day = c.get(Calendar.DAY_OF_MONTH);
//set current date to registration button
btnRegDate.setText(new StringBuilder()
// Month is 0 based, just add 1
.append(day).append("-").append(month + 1).append("-")
.append(year));
//set current date to FCRA registration button
btnFcraDate.setText(new StringBuilder()
// Month is 0 based, just add 1
.append(day).append("-").append(month + 1).append("-")
.append(year));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static CalendarHelper getInstance() {\n if (instance == null) {\n instance = new CalendarHelper();\n }\n return instance;\n }",
"public Calendar() {\n }",
"public ObjectFactoryModuleCalendar() {\n }",
"private QaCalendar() {\n }",
"Calendar getCalendar();"... | [
"0.7397993",
"0.6948735",
"0.68685085",
"0.6747382",
"0.66854995",
"0.6608989",
"0.6579306",
"0.6564463",
"0.6467345",
"0.6450193",
"0.6447595",
"0.6414155",
"0.63848335",
"0.6341521",
"0.62956476",
"0.62911034",
"0.6243746",
"0.6243296",
"0.61659247",
"0.6121628",
"0.6090086... | 0.0 | -1 |
Attach a listener to the click event for the button | private void addListenerOnButton() {
final Context context = this;
getFromDate=MainActivity.fromdate;
getToDate=MainActivity.todate;
//Create a class implementing “OnClickListener” and set it as the on click listener for the button
btnSkip.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
if(editDetailsflag==false){
Intent intent = new Intent(getApplicationContext(), menu.class);
startActivity(intent);
}else {
AlertDialog.Builder builder = new AlertDialog.Builder(context);
builder.setMessage("Are you sure, you want to reset all fields? ")
.setCancelable(false)
.setPositiveButton("Yes",
new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int id) {
etGetAddr.setText("");
sGetPostal.setText("");
eGetPhone.setText("");
eGetFax.setText("");
eGetEmailid.setText("");
etGetWebSite.setText("");
etMVATnum.setText("");
etServiceTaxnum.setText("");
etPanNo.setText("");
etMVATnum.setText("");
etServiceTaxnum.setText("");
etRegNum.setText("");
etFcraNum.setText("");
btnRegDate.setText(Startup.getfinancialFromDate());
btnFcraDate.setText(Startup.getfinancialFromDate());
getstate.setSelection(0);
getcity.setSelection(0);
}
})
.setNegativeButton("No", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int id) {
dialog.cancel();
}
});
AlertDialog alert = builder.create();
alert.show();
}
}
});
btnorgDetailSave.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
savedeatils();
}
});
btnDeleteOrg.setOnClickListener(new OnClickListener() {
private TextView tvWarning;
@Override
public void onClick(View arg0) {
LayoutInflater inflater = (LayoutInflater) getSystemService(LAYOUT_INFLATER_SERVICE);
View layout = inflater.inflate(R.layout.import_organisation, (ViewGroup) findViewById(R.id.layout_root));
//Building DatepPcker dialog
AlertDialog.Builder builder = new AlertDialog.Builder(context);
builder.setView(layout);
//builder.setTitle("Delete orginsation for given financial year");
trOrgnisation = (TableRow) layout.findViewById(R.id.trQuestion);
tvWarning = (TextView) layout.findViewById(R.id.tvWarning);
trOrgnisation.setVisibility(View.GONE);
getFinancialyear = (Spinner)layout.findViewById(R.id.sYear);
btnDelete = (Button)layout.findViewById(R.id.btnImport);
Button btnCancel = (Button) layout.findViewById(R.id.btnExit);
btnCancel.setText("Cancel");
TextView tvalertHead1 = (TextView) layout.findViewById(R.id.tvalertHead1);
tvalertHead1.setText("Delete "+getOrgName+" orgnisation for given financial year?");
btnDelete.setText("Delete");
System.out.println("print orgname : "+getOrgName);
addListnerOnFinancialSpinner();
btnDelete.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View arg0) {
if(fromDate.equals(financialFrom)&&toDate.equals(financialTo))
{
message = "Are you sure you want to permanently delete currently logged in "+getOrgName+" for financialyear "+fromDate+" To "+toDate+"?\n" +
"your data will be permanetly lost and session will be closed !";
}
else{
message = "Are you sure you want to permanently delete "+getOrgName+" for financialyear "+fromDate+" To "+toDate+"?\n" +
"It will be permenantly lost !";
}
//tvalertHead1
System.out.println("print orgname : "+getOrgName);
AlertDialog.Builder builder = new AlertDialog.Builder(context);
builder.setMessage(message)
.setCancelable(false)
.setPositiveButton("Ok",
new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int id) {
//parameters pass to core_engine xml_rpc functions
//addListnerOnFinancialSpinner();
System.out.println("dlete params: "+getOrgName+""+fromDate+""+toDate);
deleteprgparams=new Object[]{getOrgName,fromDate,toDate};
deleted = startup.deleteOrgnisationName(deleteprgparams);
if(fromDate.equals(financialFrom)&&toDate.equals(financialTo))
{
//To pass on the activity to the next page
Intent intent = new Intent(context,MainActivity.class);
startActivity(intent);
// finish();
}else{
System.out.println("In org details");
addListnerOnFinancialSpinner();
tvWarning.setVisibility(View.VISIBLE);
tvWarning.setText("Deleted "+getOrgName+" for "+fromDate+" to "+toDate);
}
}
})
.setNegativeButton("No", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int id) {
dialog.cancel();
dialog.dismiss();
}
});
AlertDialog alert = builder.create();
alert.show();
}
});
btnCancel.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View arg0) {
dialog.cancel();
dialog.dismiss();
}
});
dialog=builder.create();
dialog.show();
WindowManager.LayoutParams lp = new WindowManager.LayoutParams();
//customizing the width and location of the dialog on screen
lp.copyFrom(dialog.getWindow().getAttributes());
lp.width = 700;
dialog.getWindow().setAttributes(lp);
}
});
btnRegDate.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
//for showing a date picker dialog that allows the user to select a date (Registration Date)
String regDate = (String) btnRegDate.getText();
String dateParts[] = regDate.split("-");
setfromday = dateParts[0];
setfrommonth = dateParts[1];
setfromyear = dateParts[2];
System.out.println("regdate is:"+regDate);
showDialog(REG_DATE_DIALOG_ID);
}
});
btnFcraDate.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
//for showing a date picker dialog that allows the user to select a date (FCRA Registration Date)
String fcraDate = (String) btnFcraDate.getText();
String dateParts[] = fcraDate.split("-");
setfromday1 = dateParts[0];
setfrommonth1 = dateParts[1];
setfromyear1 = dateParts[2];
//System.out.println("fcradate is:"+setfromday1);
//System.out.println("fcradate is:"+setfrommonth1);
//System.out.println("fcradate is:"+setfromyear1);
//System.out.println("fcradate is:"+fcraDate);
showDialog(FCRA_DATE_DIALOG_ID);
}
});
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void enablButtonListener();",
"public void click() {\n\t\tif(this.buttonListener != null) {\n\t\t\tthis.buttonListener.onClicked();\n\t\t}\n\t}",
"void configureButtonListener();",
"@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tmButtonListener.onButtonListener();\n\t\t\t}",
"public void buttonCli... | [
"0.7639664",
"0.75146407",
"0.7406648",
"0.7127067",
"0.69941115",
"0.69360626",
"0.69217134",
"0.69146657",
"0.6791298",
"0.67676145",
"0.6767587",
"0.6636783",
"0.6613965",
"0.65774447",
"0.65750915",
"0.6571096",
"0.6558726",
"0.6526695",
"0.65182775",
"0.6517148",
"0.6507... | 0.0 | -1 |
parameters pass to core_engine xml_rpc functions addListnerOnFinancialSpinner(); | public void onClick(DialogInterface dialog, int id) {
System.out.println("dlete params: "+getOrgName+""+fromDate+""+toDate);
deleteprgparams=new Object[]{getOrgName,fromDate,toDate};
deleted = startup.deleteOrgnisationName(deleteprgparams);
if(fromDate.equals(financialFrom)&&toDate.equals(financialTo))
{
//To pass on the activity to the next page
Intent intent = new Intent(context,MainActivity.class);
startActivity(intent);
// finish();
}else{
System.out.println("In org details");
addListnerOnFinancialSpinner();
tvWarning.setVisibility(View.VISIBLE);
tvWarning.setText("Deleted "+getOrgName+" for "+fromDate+" to "+toDate);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void setCallback(IResponseCallback<WalletDataDecl.ListResultTmpl<Response>> cb);",
"public interface GetPointsListener extends Listener {\n\n public void onGetPointsSucc(PointsInfo info);\n}",
"public interface ComboBoxClientRpc extends ClientRpc {\n\n /**\n * Signal the client that attempt to add a ... | [
"0.5530651",
"0.54452085",
"0.54091686",
"0.53843325",
"0.53281903",
"0.53220665",
"0.52969867",
"0.52757907",
"0.527413",
"0.52735054",
"0.5241348",
"0.52102757",
"0.52015966",
"0.51868385",
"0.51825064",
"0.5165602",
"0.51602924",
"0.5152826",
"0.514134",
"0.5132584",
"0.51... | 0.0 | -1 |
for showing a date picker dialog that allows the user to select a date (Registration Date) | @Override
public void onClick(View v) {
String regDate = (String) btnRegDate.getText();
String dateParts[] = regDate.split("-");
setfromday = dateParts[0];
setfrommonth = dateParts[1];
setfromyear = dateParts[2];
System.out.println("regdate is:"+regDate);
showDialog(REG_DATE_DIALOG_ID);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void onClick(View v) {\n new DatePickerDialog(RegistrationActivity.this, date, myCalendar\n .get(Calendar.YEAR), myCalendar.get(Calendar.MONTH),\n myCalendar.get(Calendar.DAY_OF_MONTH)).show();\n\n }",
"private ... | [
"0.80908865",
"0.8010413",
"0.7973781",
"0.76908016",
"0.7615585",
"0.75980204",
"0.75519574",
"0.7517412",
"0.7503474",
"0.7498333",
"0.74966866",
"0.7488099",
"0.74314654",
"0.74237686",
"0.73869604",
"0.7386507",
"0.7377753",
"0.73459333",
"0.73415405",
"0.73415405",
"0.73... | 0.7226197 | 39 |
for showing a date picker dialog that allows the user to select a date (FCRA Registration Date) | @Override
public void onClick(View v) {
String fcraDate = (String) btnFcraDate.getText();
String dateParts[] = fcraDate.split("-");
setfromday1 = dateParts[0];
setfrommonth1 = dateParts[1];
setfromyear1 = dateParts[2];
//System.out.println("fcradate is:"+setfromday1);
//System.out.println("fcradate is:"+setfrommonth1);
//System.out.println("fcradate is:"+setfromyear1);
//System.out.println("fcradate is:"+fcraDate);
showDialog(FCRA_DATE_DIALOG_ID);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void chooseDateDialog() {\n Calendar c = Calendar.getInstance();\n int year = c.get(Calendar.YEAR);\n int month = c.get(Calendar.MONTH);\n int day = c.get(Calendar.DATE);\n\n DatePickerDialog datePickerDialog =\n new DatePickerDialog(Objects.requireNonNull(... | [
"0.79313815",
"0.79077375",
"0.77663076",
"0.7763034",
"0.7693985",
"0.7653136",
"0.7634386",
"0.76269966",
"0.76160264",
"0.76007545",
"0.7532086",
"0.75297403",
"0.7455476",
"0.7429056",
"0.7428848",
"0.7415801",
"0.7407669",
"0.74018985",
"0.7395193",
"0.7395024",
"0.73889... | 0.71350455 | 52 |
when dialog box is closed, below method will be called. | public void onDateSet(DatePicker view, int selectedYear,
int selectedMonth, int selectedDay) {
year = selectedYear;
month = selectedMonth;
day = selectedDay;
btnRegDate.setText(new StringBuilder()
// Month is 0 based, just add 1
.append(day).append("-").append(month + 1).append("-")
.append(year));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n \t\t\tpublic void closeDialog() {\n \t\t\t\tunbind();\r\n \t\t\t\tsuper.closeDialog();\r\n \t\t\t}",
"@Override\n public void windowClosing(WindowEvent we) {\n finishDialog();\n }",
"private void quitDialog() {\r\n\t\tdispose();\r\n\t}",
"@Override\n publ... | [
"0.7719313",
"0.76050746",
"0.7431819",
"0.7356072",
"0.73445004",
"0.73117024",
"0.73117024",
"0.72903264",
"0.7286133",
"0.7262036",
"0.72254664",
"0.7216718",
"0.7216718",
"0.7214417",
"0.72090095",
"0.7189797",
"0.71403146",
"0.7139802",
"0.71041477",
"0.7101508",
"0.7098... | 0.0 | -1 |
when dialog box is closed, below method will be called. | public void onDateSet(DatePicker view, int selectedYear,
int selectedMonth, int selectedDay) {
year = selectedYear;
month = selectedMonth;
day = selectedDay;
btnFcraDate.setText(new StringBuilder()
// Month is 0 based, just add 1
.append(day).append("-").append(month + 1).append("-")
.append(year));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n \t\t\tpublic void closeDialog() {\n \t\t\t\tunbind();\r\n \t\t\t\tsuper.closeDialog();\r\n \t\t\t}",
"@Override\n public void windowClosing(WindowEvent we) {\n finishDialog();\n }",
"private void quitDialog() {\r\n\t\tdispose();\r\n\t}",
"@Override\n publ... | [
"0.77168924",
"0.7600745",
"0.74275047",
"0.7355806",
"0.7344198",
"0.73114085",
"0.73114085",
"0.72867876",
"0.7284106",
"0.72566736",
"0.72235376",
"0.72161746",
"0.72161746",
"0.72109944",
"0.7204972",
"0.7189242",
"0.7140102",
"0.71359885",
"0.7104199",
"0.71021765",
"0.7... | 0.0 | -1 |
Retrieving the selected state from the Spinner and assigning it to a variable | @Override
public void onItemSelected(AdapterView<?> parent, View v, int position,long id) {
selectedStateName = parent.getItemAtPosition(position).toString();
Object[] stateparmas;
// checks for the selected value of item is not null
if(selectedStateName!=null){
// array of selected state name of type Object
stateparmas = new Object[]{selectedStateName};
// call the getCities method to get all related cities of given selected state name
Object[] CityList = startup.getCities(stateparmas);
List<String> citylist = new ArrayList<String>();
// for loop to iterate list of city name and add to list
for(Object st : CityList)
citylist.add((String) st);
if(editDetailsflag==false){
// creating array adaptor to take list of city
dataAdapter1 = new ArrayAdapter<String>(context,
android.R.layout.simple_spinner_item, citylist);
// set resource layout of spinner to that adaptor
dataAdapter1.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
// set Adaptor contain cities list to spinner
getcity.setAdapter(dataAdapter1);
}else {
String city = detailsList_foredit.get(4).trim();
dataAdapter1 = new ArrayAdapter<String>(context,
android.R.layout.simple_spinner_item, citylist);
dataAdapter1.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
//System.out.println("city name"+dataAdapter1.getItem(2).trim().);
int pos = dataAdapter1.getPosition(city);
getcity.setAdapter(dataAdapter1);
getcity.setSelection(pos);
}
}// End of if condition
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n SpinnerValue = (String)spinner.getSelectedItem();\n }",
"@Override\r\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n ... | [
"0.73802066",
"0.70739466",
"0.69288903",
"0.6908527",
"0.68850243",
"0.6875273",
"0.68751746",
"0.6871565",
"0.6858102",
"0.6832458",
"0.68006265",
"0.67692435",
"0.6750983",
"0.67481184",
"0.6676215",
"0.66638714",
"0.66638714",
"0.66268283",
"0.6626299",
"0.6594851",
"0.65... | 0.0 | -1 |
Retrieving the selected state from the Spinner and assigning it to a variable | @Override
public void onItemSelected(AdapterView<?> parent, View v, int position,long id) {
selectedCityName = parent.getItemAtPosition(position).toString();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n SpinnerValue = (String)spinner.getSelectedItem();\n }",
"@Override\r\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n ... | [
"0.73802066",
"0.70739466",
"0.69288903",
"0.6908527",
"0.68850243",
"0.6875273",
"0.68751746",
"0.6871565",
"0.6858102",
"0.6832458",
"0.68006265",
"0.67692435",
"0.6750983",
"0.67481184",
"0.6676215",
"0.66638714",
"0.66638714",
"0.66268283",
"0.6626299",
"0.6594851",
"0.65... | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public void onNothingSelected(AdapterView<?> arg0) {
} | {
"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.66708666",
"0.65675074",
"0.65229905",
"0.6481001",
"0.64770633",
"0.64584893",
"0.6413091",
"0.63764185",
"0.6275735",
"0.62541914",
"0.6236919",
"0.6223816",
"0.62017626",
"0.61944294",
"0.61944294",
"0.61920846",
"0.61867654",
"0.6173323",
"0.61328775",
"0.61276996",
"0... | 0.0 | -1 |
Retrieving the selected state from the Spinner and assigning it to a variable | @Override
public void onItemSelected(AdapterView<?> parent, View v, int position,long id) {
selectedCounrty = parent.getItemAtPosition(position).toString();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n SpinnerValue = (String)spinner.getSelectedItem();\n }",
"@Override\r\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n ... | [
"0.73782617",
"0.7073509",
"0.692761",
"0.69090563",
"0.6884117",
"0.68750006",
"0.687471",
"0.6871345",
"0.6857777",
"0.68309385",
"0.6801141",
"0.6768247",
"0.67516094",
"0.6747977",
"0.667479",
"0.66643447",
"0.66643447",
"0.6627293",
"0.6626483",
"0.6594259",
"0.6582256",... | 0.63066477 | 61 |
TODO Autogenerated method stub | @Override
public void onNothingSelected(AdapterView<?> arg0) {
} | {
"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 |
TODO Autogenerated method stub | @Override
public void onNothingSelected(AdapterView<?> arg0) {
} | {
"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 |
/ get all values and pass to the backend through controller | private void savedeatils() {
// TODO Auto-generated method stub
getFromDate = MainActivity.fromdate;
getToDate = MainActivity.todate;
getAddr = etGetAddr.getText().toString();
getPin = sGetPostal.getText().toString();
eGetTelNo = eGetPhone.getText().toString();
eGetFaxNO = eGetFax.getText().toString();
etGetWeb = etGetWebSite.getText().toString();
eGetEmail = eGetEmailid.getText().toString();
etPan = etPanNo.getText().toString();
etMVATno = etMVATnum.getText().toString();
etServiceTaxno = etServiceTaxnum.getText().toString();
etRegNo = etRegNum.getText().toString();
RegDate = btnRegDate.getText().toString();
etFcraNo = etFcraNum.getText().toString();
FcraDate = btnFcraDate.getText().toString();
orgparams = new Object[]{orgcode,getAddr,selectedCounrty,selectedStateName,selectedCityName,getPin,
eGetTelNo,eGetFaxNO,eGetEmail,etGetWeb,etMVATno,etServiceTaxno,etRegNo,RegDate,etFcraNo,FcraDate ,
etPan};
save_edit = (String)org.updateOrg(orgparams, client_id);
AlertDialog.Builder builder = new AlertDialog.Builder(context);
builder.setMessage("Organisation "+getOrgName+" with details saved successfully")
.setCancelable(false)
.setPositiveButton("Ok",
new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int id) {
if(editDetailsflag==false){
//To pass on the activity to the next page
Intent intent = new Intent(context, menu.class);
startActivity(intent);
}else{
}
}
});
AlertDialog alert = builder.create();
alert.show();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"TemplateModel[] getValues();",
"@RequestMapping(value = \"/\")\n public Map<String, Object> showAll() {\n// Get all invoices\n List<Invoice> invoices = invoiceService.findAll();\n// Build response\n Map<String, Object> response = new LinkedHashMap<String, Object>();\n response.p... | [
"0.60048336",
"0.5999897",
"0.5978438",
"0.5956363",
"0.5953837",
"0.5938477",
"0.5936569",
"0.5936569",
"0.5930844",
"0.589522",
"0.5860112",
"0.58589643",
"0.58104753",
"0.58081335",
"0.57983834",
"0.5787562",
"0.57322603",
"0.5720066",
"0.5686062",
"0.56760746",
"0.5640480... | 0.0 | -1 |
Opens a new database connection | private Connection openConnection() throws SQLException {
Connection dbConnection = DriverManager.getConnection(databaseURL, username, password);
return dbConnection;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void openDatabase() {\r\n if ( connect != null )\r\n return;\r\n\r\n try {\r\n // Setup the connection with the DB\r\n String host = System.getenv(\"DTF_TEST_DB_HOST\");\r\n String user = System.getenv(\"DTF_TEST_DB_USER\");\r\n String pa... | [
"0.7422541",
"0.739556",
"0.7381472",
"0.73714703",
"0.73387855",
"0.73365855",
"0.7301887",
"0.7261544",
"0.72566414",
"0.7170243",
"0.71306455",
"0.71217877",
"0.70989555",
"0.7070724",
"0.70698774",
"0.7064552",
"0.70373183",
"0.702724",
"0.7019555",
"0.69859093",
"0.69634... | 0.72830176 | 7 |
Closes an existing database connection | private void closeConnection(Connection dbConnection) throws SQLException {
if (dbConnection != null) {
dbConnection.close();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void closeDBConnection() {\r\n\t\ttry {//如果连接有效(存在),关闭他\r\n\t\t\tif (dbConnection != null /*&& !dbConnection.isClosed()*/){\r\n\t\t\t\tdbConnection.close();// Return to connection pool\r\n\t\t\t\tdbConnection = null; //Make sure we don't close it twice\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\t\t\t... | [
"0.78359425",
"0.7780013",
"0.7633664",
"0.75970143",
"0.75583476",
"0.75347394",
"0.7513194",
"0.7442276",
"0.7433861",
"0.74162424",
"0.7388095",
"0.7359189",
"0.7341295",
"0.7340904",
"0.73254",
"0.7297135",
"0.72945607",
"0.7275264",
"0.7261509",
"0.72607785",
"0.7260101"... | 0.6878407 | 71 |
Retrieves all students from the database. | public ArrayList<Student> getAllStudents() throws SQLException {
ArrayList<Student> studentList = new ArrayList<Student>();
Connection dbConnection = null;
try {
dbConnection = openConnection();
String sqlText = "SELECT id, firstname, lastname, streetaddress, postcode, postoffice "
+ "FROM Student ORDER BY id DESC";
PreparedStatement preparedStatement = dbConnection.prepareStatement(sqlText);
ResultSet resultSet = preparedStatement.executeQuery();
while (resultSet.next()) {
int id = resultSet.getInt("id");
String firstname = resultSet.getString("firstname");
String lastname = resultSet.getString("lastname");
String streetaddress = resultSet.getString("streetaddress");
String postcode = resultSet.getString("postcode");
String postoffice = resultSet.getString("postoffice");
studentList.add(new Student(id, firstname, lastname, streetaddress, postcode, postoffice));
}
} catch (SQLException sqle) {
throw sqle; // Let the caller decide what to do with the exception
} finally {
closeConnection(dbConnection);
}
return studentList;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic List<Student> retrieveAllStudents() {\n\t\tTypedQuery<Student> query = em.createQuery(\"select s from Student s\",\n\t\t\t\tStudent.class);\n\t\treturn query.getResultList();\n\t}",
"@Override\r\n\tpublic List<Student> getAll() {\n\t\treturn dao.getAll();\r\n\t}",
"@Override\n\tpublic List<... | [
"0.82413685",
"0.81647635",
"0.790219",
"0.7880046",
"0.78705454",
"0.78261226",
"0.78157645",
"0.767341",
"0.76623154",
"0.761233",
"0.7597669",
"0.7526215",
"0.7454731",
"0.7430632",
"0.7428594",
"0.7357051",
"0.73200446",
"0.7295212",
"0.7268274",
"0.7259716",
"0.72313446"... | 0.7227375 | 21 |
/ renamed from: a | public Map<K, Collection<V>> mo8153a() {
return super.mo8153a();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public interface C4521a {\n /* renamed from: a */\n void mo12348a();\n }",
"public interface C1423a {\n /* renamed from: a */\n void mo6888a(int i);\n }",
"interface bxc {\n /* renamed from: a */\n void mo2508a(bxb bxb);\n}",
"interface C33292a {\n /* renamed fr... | [
"0.6249595",
"0.6242955",
"0.61393225",
"0.6117684",
"0.61140615",
"0.60893875",
"0.6046927",
"0.60248226",
"0.60201806",
"0.59753186",
"0.5947817",
"0.5912414",
"0.5883872",
"0.5878469",
"0.587005",
"0.58678955",
"0.58651674",
"0.5857262",
"0.58311176",
"0.58279663",
"0.5827... | 0.0 | -1 |
/ access modifiers changed from: 0000 / renamed from: u | public <E> Collection<E> mo8156u(Collection<E> collection) {
return Collections.unmodifiableList((List) collection);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void mo21879u() {\n }",
"private USI_TRLT() {}",
"protected Item func_146068_u() { return Item.func_150899_d(0); }",
"public final void mo37836u_() {\n }",
"public abstract void mo20899UO();",
"public void xuat() {\n\n\t}",
"abstract void uminus();",
"Uom getUom();",
"C20241o mo54456u(... | [
"0.66234285",
"0.64942575",
"0.64838326",
"0.59770334",
"0.59676546",
"0.5943691",
"0.59038246",
"0.5890035",
"0.5858245",
"0.57715076",
"0.57634145",
"0.57247496",
"0.57215446",
"0.5712064",
"0.5709435",
"0.56623834",
"0.56618726",
"0.56581",
"0.56564665",
"0.564194",
"0.561... | 0.0 | -1 |
/ access modifiers changed from: 0000 / renamed from: v | public Collection<V> mo8157v(K k, Collection<V> collection) {
return mo8167w(k, (List) collection, null);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void func_104112_b() {\n \n }",
"public void mo21880v() {\n }",
"public void mo115190b() {\n }",
"public void mo1403c() {\n }",
"public void mo38117a() {\n }",
"public void mo21879u() {\n }",
"@SuppressWarnings(\"unused\")\n\tprivate void version() {\n... | [
"0.6669847",
"0.6438968",
"0.6336624",
"0.6256943",
"0.62485313",
"0.62365144",
"0.6222839",
"0.6221673",
"0.62118936",
"0.61932075",
"0.61845493",
"0.6176248",
"0.61628497",
"0.6147277",
"0.61439395",
"0.61058915",
"0.60960627",
"0.60889107",
"0.6087715",
"0.60807496",
"0.60... | 0.0 | -1 |
always can't query the result | public UrlObject getItem(Context context, String url) {
GlobalContextWrapper.bindContext(context);
if (context == null || url == null) {
throw new RuntimeException("parameter can't be null!");
}
DatabaseConnectivity connectivity =
new DatabaseConnectivity(context,
mAuthority,
mClass);
Query query = new Query(mClass);
ExpressionToken selToken =
UrlObject.COLUMN_URL_PATTERN.eq(url);
String str = selToken.toString();
if (selToken != null) {
query.setSelection(selToken);
}
List<DatabaseObject> objects = connectivity.query(query);
if (objects == null || objects.size() <= 0) {
throw new RuntimeException("query result is null!");
}
GlobalContextWrapper.unbindContext(context);
return (UrlObject) objects.get(0);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean queryAfterZeroResults() {\n/* 264 */ throw new RuntimeException(\"Stub!\");\n/* */ }",
"@Override\n public boolean getMoreResults() throws SQLException {\n\n return (result != null);\n\n }",
"@Override\n public boolean hasErrorResults() {\n return false;\n ... | [
"0.7007278",
"0.63718164",
"0.635874",
"0.6156196",
"0.60409814",
"0.60280925",
"0.5987266",
"0.5975201",
"0.59376764",
"0.59214544",
"0.5911811",
"0.58914644",
"0.58644515",
"0.58598363",
"0.57853824",
"0.57385045",
"0.57379997",
"0.57177675",
"0.5702684",
"0.5701849",
"0.57... | 0.0 | -1 |
/ renamed from: e | public av m18471e() {
return this.status;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic void e() {\n\n\t}",
"public void e() {\n }",
"@Override\n\tpublic void processEvent(Event e) {\n\n\t}",
"@Override\n public void e(String TAG, String msg) {\n }",
"public String toString()\r\n {\r\n return e.toString();\r\n }",
"@Override\n\t\t\t\... | [
"0.72328156",
"0.66032064",
"0.6412127",
"0.6362734",
"0.633999",
"0.62543726",
"0.6232265",
"0.6159535",
"0.61226326",
"0.61226326",
"0.60798717",
"0.6049423",
"0.60396963",
"0.60011584",
"0.5998842",
"0.59709895",
"0.59551716",
"0.5937381",
"0.58854383",
"0.5870234",
"0.586... | 0.0 | -1 |
/ renamed from: f | public String m18472f() {
return this.cardId;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void func_70305_f() {}",
"public static Forca get_f(){\n\t\treturn f;\n\t}",
"void mo84656a(float f);",
"public final void mo8765a(float f) {\n }",
"@Override\n public int f() {\n return 0;\n }",
"public void f() {\n }",
"void mo9704b(float f, float f2, int i);",
"void mo56155... | [
"0.7323683",
"0.65213245",
"0.649907",
"0.64541733",
"0.6415534",
"0.63602704",
"0.6325114",
"0.63194084",
"0.630473",
"0.62578535",
"0.62211406",
"0.6209556",
"0.6173324",
"0.61725706",
"0.61682224",
"0.6135272",
"0.6130462",
"0.6092916",
"0.6089471",
"0.6073019",
"0.6069227... | 0.0 | -1 |
Empty constructor to create the object. | public Car(){
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@SuppressWarnings(\"unused\")\n public NoConstructor() {\n // Empty\n }",
"private SingleObject()\r\n {\r\n }",
"private Instantiation(){}",
"private SingleObject(){}",
"public ObjectFactory() {\r\n\t}",
"public ObjectFactory() {\n\t}",
"public Constructor(){\n\t\t\n\t}",... | [
"0.8287263",
"0.7755258",
"0.7726281",
"0.7578121",
"0.75379735",
"0.7527743",
"0.74643326",
"0.74076253",
"0.73496306",
"0.73197013",
"0.73197013",
"0.73197013",
"0.73197013",
"0.73197013",
"0.73197013",
"0.73197013",
"0.73197013",
"0.73197013",
"0.73197013",
"0.73197013",
"... | 0.0 | -1 |
Method returns String, calculates and returns the answer and steps. | public String stopAtTheGasStation(double m, double g){
odometer = m;
gasUsed = g;
return "<html>You travelled: " + m + " miles.<br>" + "You used: " + g + " gallons.<br>" + "And your mileage is: "+ calcMPG() + " mpg!</html>";
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static String produceAnswer(String input) {\n // TODO: Implement this function to produce the solution to the input\n \n // Parsing one line of input\n int space = input.indexOf(\" \"); // find the index of the first space\n String operandOne = input.substring(0, space)... | [
"0.701066",
"0.6928645",
"0.66876465",
"0.6415149",
"0.6373834",
"0.6293453",
"0.624757",
"0.6228825",
"0.61870426",
"0.6174194",
"0.6150611",
"0.61162555",
"0.60932904",
"0.60879153",
"0.6045528",
"0.60455",
"0.60299903",
"0.6011377",
"0.60008776",
"0.5988312",
"0.59844875",... | 0.0 | -1 |
/ Name: openNewActivity Parameters type: Class Usage: go to another activity. The new one has passed as argument Warnings: yes | private void openNewActivity(Class<RegisterActivity> class_argument) {
Intent intent = new Intent(this, class_argument);
startActivity(intent);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void openNewActivity() {\n Intent intent = new Intent(this, NewNoteActivity.class);\n startActivityForResult(intent, SECOND_ACTIVITY_REQUEST);\n }",
"void startNewActivity(Intent intent);",
"private void openActivity() {\n }",
"public boolean openCreateGoal(){\n Intent inte... | [
"0.7883769",
"0.7685248",
"0.7567466",
"0.7253214",
"0.71696585",
"0.68250155",
"0.67849195",
"0.67490774",
"0.67198896",
"0.66361696",
"0.6592739",
"0.65746105",
"0.65743726",
"0.6485469",
"0.64519614",
"0.6450703",
"0.6444712",
"0.64424324",
"0.6439071",
"0.64218205",
"0.64... | 0.6916123 | 5 |
This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always regenerated by the Form Editor. | @SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
jPanel3 = new javax.swing.JPanel();
jLabel1 = new javax.swing.JLabel();
jPanel1 = new javax.swing.JPanel();
cb_uf = new javax.swing.JComboBox();
jLabel4 = new javax.swing.JLabel();
jLabel3 = new javax.swing.JLabel();
jl_codigo = new javax.swing.JLabel();
tf_nome = new javax.swing.JTextField();
jLabel2 = new javax.swing.JLabel();
tf_endereco = new javax.swing.JTextField();
jLabel5 = new javax.swing.JLabel();
jLabel6 = new javax.swing.JLabel();
tf_natural = new javax.swing.JTextField();
jLabel7 = new javax.swing.JLabel();
tf_complemento = new javax.swing.JTextField();
cb_sexo = new javax.swing.JComboBox();
jLabel8 = new javax.swing.JLabel();
jLabel9 = new javax.swing.JLabel();
tf_bairro = new javax.swing.JTextField();
jLabel10 = new javax.swing.JLabel();
tf_numero = new javax.swing.JTextField();
jLabel11 = new javax.swing.JLabel();
tf_fone = new javax.swing.JTextField();
cb_dndia = new javax.swing.JComboBox();
cb_dnmes = new javax.swing.JComboBox();
cb_dnano = new javax.swing.JComboBox();
jLabel12 = new javax.swing.JLabel();
tf_foto = new javax.swing.JTextField();
jLabel13 = new javax.swing.JLabel();
tf_cep = new javax.swing.JTextField();
jLabel14 = new javax.swing.JLabel();
jb_foto = new javax.swing.JButton();
tf_cidade1 = new javax.swing.JTextField();
jl_foto = new javax.swing.JLabel();
jPanel2 = new javax.swing.JPanel();
jb_anterior = new javax.swing.JButton();
jb_proximo = new javax.swing.JButton();
jb_salvar = new javax.swing.JButton();
jb_novo = new javax.swing.JButton();
jb_excluir = new javax.swing.JButton();
jb_alterar = new javax.swing.JButton();
jb_sair = new javax.swing.JButton();
setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
setTitle("Cadastro de Clientes");
setResizable(false);
jPanel3.setBackground(new java.awt.Color(0, 0, 204));
jPanel3.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
jPanel3.setLayout(null);
jLabel1.setFont(new java.awt.Font("Verdana", 1, 20)); // NOI18N
jLabel1.setForeground(new java.awt.Color(255, 255, 255));
jLabel1.setText("Cadastro de Clientes");
jPanel3.add(jLabel1);
jLabel1.setBounds(350, 20, 229, 26);
jPanel1.setBackground(new java.awt.Color(255, 255, 255));
jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder("Cadastros"));
jPanel1.setForeground(new java.awt.Color(204, 204, 204));
jPanel1.setLayout(null);
cb_uf.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "AC", "AL", "AM", "AP", "BA", "CE", "DF", "ES", "GO", "MA", "MG", "MS", "MT", "PA", "PB", "PE", "PI", "PR", "RJ", "RN", "RO", "RR", "RS", "SC", "SE", "SP", "TO" }));
jPanel1.add(cb_uf);
cb_uf.setBounds(680, 220, 50, 25);
jLabel4.setText("Estado.:");
jPanel1.add(jLabel4);
jLabel4.setBounds(620, 220, 60, 14);
jLabel3.setText("Código:");
jPanel1.add(jLabel3);
jLabel3.setBounds(40, 30, 50, 14);
jl_codigo.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
jPanel1.add(jl_codigo);
jl_codigo.setBounds(130, 20, 30, 20);
tf_nome.setPreferredSize(new java.awt.Dimension(0, 25));
tf_nome.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
tf_nomeActionPerformed(evt);
}
});
jPanel1.add(tf_nome);
tf_nome.setBounds(130, 60, 350, 25);
jLabel2.setText("Nome.:");
jPanel1.add(jLabel2);
jLabel2.setBounds(40, 60, 50, 14);
tf_endereco.setPreferredSize(new java.awt.Dimension(0, 25));
jPanel1.add(tf_endereco);
tf_endereco.setBounds(130, 140, 350, 25);
jLabel5.setText("Endereço.:");
jPanel1.add(jLabel5);
jLabel5.setBounds(40, 140, 70, 14);
jLabel6.setText("Naturalidade.:");
jPanel1.add(jLabel6);
jLabel6.setBounds(40, 100, 80, 14);
tf_natural.setPreferredSize(new java.awt.Dimension(0, 25));
jPanel1.add(tf_natural);
tf_natural.setBounds(130, 100, 150, 25);
jLabel7.setText("Sexo.:");
jPanel1.add(jLabel7);
jLabel7.setBounds(300, 100, 60, 14);
tf_complemento.setPreferredSize(new java.awt.Dimension(0, 25));
jPanel1.add(tf_complemento);
tf_complemento.setBounds(130, 180, 230, 25);
cb_sexo.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "MASCULINO", "FEMININO" }));
cb_sexo.setPreferredSize(new java.awt.Dimension(0, 25));
jPanel1.add(cb_sexo);
cb_sexo.setBounds(350, 100, 125, 25);
jLabel8.setText("Complemento.:");
jPanel1.add(jLabel8);
jLabel8.setBounds(40, 180, 90, 14);
jLabel9.setText("Bairro.:");
jPanel1.add(jLabel9);
jLabel9.setBounds(400, 180, 50, 14);
tf_bairro.setPreferredSize(new java.awt.Dimension(0, 25));
jPanel1.add(tf_bairro);
tf_bairro.setBounds(470, 180, 260, 25);
jLabel10.setText("Número.:");
jPanel1.add(jLabel10);
jLabel10.setBounds(540, 140, 60, 14);
tf_numero.setPreferredSize(new java.awt.Dimension(0, 25));
jPanel1.add(tf_numero);
tf_numero.setBounds(620, 140, 110, 25);
jLabel11.setText("Telefone.:");
jPanel1.add(jLabel11);
jLabel11.setBounds(540, 100, 60, 14);
tf_fone.setPreferredSize(new java.awt.Dimension(0, 25));
jPanel1.add(tf_fone);
tf_fone.setBounds(620, 100, 110, 25);
cb_dndia.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Dia", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "2", "22", "23", "24", "25", "26", "27", "28", "29", "30", "31" }));
cb_dndia.setPreferredSize(new java.awt.Dimension(0, 25));
jPanel1.add(cb_dndia);
cb_dndia.setBounds(530, 60, 50, 25);
cb_dnmes.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Mês", "JAN", "FEV", "MAR", "ABR", "MAI", "JUN", "JUL", "AGO", "SET", "OUT", "NOV", "DEZ" }));
cb_dnmes.setPreferredSize(new java.awt.Dimension(0, 25));
jPanel1.add(cb_dnmes);
cb_dnmes.setBounds(590, 60, 60, 25);
cb_dnano.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Ano", "2012", "2011", "2010", "2009", "2008", "2007", "2006", "2005", "2004", "2003", "2002", "2001", "2000" }));
cb_dnano.setPreferredSize(new java.awt.Dimension(0, 25));
jPanel1.add(cb_dnano);
cb_dnano.setBounds(660, 60, 70, 25);
jLabel12.setText("Data de Nascimento");
jPanel1.add(jLabel12);
jLabel12.setBounds(530, 40, 160, 14);
tf_foto.setPreferredSize(new java.awt.Dimension(0, 25));
tf_foto.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
tf_fotoActionPerformed(evt);
}
});
jPanel1.add(tf_foto);
tf_foto.setBounds(790, 190, 150, 25);
jLabel13.setText("Cidade.:");
jPanel1.add(jLabel13);
jLabel13.setBounds(40, 220, 70, 14);
tf_cep.setPreferredSize(new java.awt.Dimension(0, 25));
jPanel1.add(tf_cep);
tf_cep.setBounds(460, 220, 90, 25);
jLabel14.setText("CEP.:");
jPanel1.add(jLabel14);
jLabel14.setBounds(400, 220, 40, 20);
jb_foto.setText("...");
jb_foto.setToolTipText("Carregar Foto");
jb_foto.setPreferredSize(new java.awt.Dimension(120, 35));
jb_foto.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jb_fotoActionPerformed(evt);
}
});
jPanel1.add(jb_foto);
jb_foto.setBounds(940, 190, 30, 25);
tf_cidade1.setPreferredSize(new java.awt.Dimension(0, 25));
jPanel1.add(tf_cidade1);
tf_cidade1.setBounds(130, 220, 230, 25);
jPanel1.add(jl_foto);
jl_foto.setBounds(790, 20, 150, 150);
jPanel2.setBackground(new java.awt.Color(255, 255, 255));
jPanel2.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
jb_anterior.setIcon(new javax.swing.ImageIcon(getClass().getResource("/cadastro/Previous.png"))); // NOI18N
jb_anterior.setText("Anterior");
jb_anterior.setToolTipText("Anterior");
jb_anterior.setPreferredSize(new java.awt.Dimension(120, 35));
jb_anterior.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jb_anteriorActionPerformed(evt);
}
});
jb_proximo.setIcon(new javax.swing.ImageIcon(getClass().getResource("/cadastro/Next.png"))); // NOI18N
jb_proximo.setText("Próximo");
jb_proximo.setToolTipText("Proximo");
jb_proximo.setPreferredSize(new java.awt.Dimension(120, 35));
jb_proximo.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jb_proximoActionPerformed(evt);
}
});
jb_salvar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/cadastro/Save.png"))); // NOI18N
jb_salvar.setText("Salvar");
jb_salvar.setToolTipText("Salvar");
jb_salvar.setPreferredSize(new java.awt.Dimension(120, 35));
jb_salvar.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jb_salvarActionPerformed(evt);
}
});
jb_novo.setIcon(new javax.swing.ImageIcon(getClass().getResource("/cadastro/New document.png"))); // NOI18N
jb_novo.setText("Novo");
jb_novo.setToolTipText("Novo");
jb_novo.setPreferredSize(new java.awt.Dimension(120, 35));
jb_novo.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jb_novoActionPerformed(evt);
}
});
jb_excluir.setIcon(new javax.swing.ImageIcon(getClass().getResource("/cadastro/deletes.gif"))); // NOI18N
jb_excluir.setText("Excluir");
jb_excluir.setToolTipText("Excluir");
jb_excluir.setPreferredSize(new java.awt.Dimension(120, 35));
jb_excluir.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jb_excluirActionPerformed(evt);
}
});
jb_alterar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/cadastro/Modify.png"))); // NOI18N
jb_alterar.setText("Alterar");
jb_alterar.setToolTipText("Alterar");
jb_alterar.setPreferredSize(new java.awt.Dimension(120, 35));
jb_alterar.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jb_alterarActionPerformed(evt);
}
});
jb_sair.setIcon(new javax.swing.ImageIcon(getClass().getResource("/cadastro/Close.png"))); // NOI18N
jb_sair.setText("Sair");
jb_sair.setToolTipText("Sair");
jb_sair.setPreferredSize(new java.awt.Dimension(120, 35));
jb_sair.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jb_sairActionPerformed(evt);
}
});
javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
jPanel2.setLayout(jPanel2Layout);
jPanel2Layout.setHorizontalGroup(
jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel2Layout.createSequentialGroup()
.addGap(48, 48, 48)
.addComponent(jb_anterior, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(jb_proximo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(jb_novo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(jb_salvar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(jb_excluir, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(jb_alterar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(jb_sair, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap(38, Short.MAX_VALUE))
);
jPanel2Layout.setVerticalGroup(
jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel2Layout.createSequentialGroup()
.addGap(34, 34, 34)
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jb_proximo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jb_salvar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jb_novo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jb_excluir, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jb_alterar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jb_sair, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addComponent(jb_anterior, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addContainerGap(43, Short.MAX_VALUE))
);
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
.addContainerGap()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addComponent(jPanel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()
.addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(0, 0, Short.MAX_VALUE)))
.addContainerGap())
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addContainerGap()
.addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, 65, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, 309, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap(17, Short.MAX_VALUE))
);
pack();
setLocationRelativeTo(null);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Form() {\n initComponents();\n }",
"public MainForm() {\n initComponents();\n }",
"public MainForm() {\n initComponents();\n }",
"public MainForm() {\n initComponents();\n }",
"public frmRectangulo() {\n initComponents();\n }",
"public form() {\n ... | [
"0.7319396",
"0.7290941",
"0.7290941",
"0.7290941",
"0.7285927",
"0.7248002",
"0.72139066",
"0.72086275",
"0.71958303",
"0.718997",
"0.7184516",
"0.7159095",
"0.71481097",
"0.709288",
"0.70806605",
"0.70578784",
"0.6986726",
"0.6977067",
"0.6955257",
"0.6954392",
"0.6945326",... | 0.0 | -1 |
End of variables declaration//GENEND:variables | public void mostrar_dados()
{
try
{
jl_codigo.setText(con_clientes.resultset.getString("codigo"));
tf_nome.setText(con_clientes.resultset.getString("nome"));
cb_dndia.setSelectedItem(con_clientes.resultset.getString("dn_dia"));
cb_dnmes.setSelectedItem(con_clientes.resultset.getString("dn_mes"));
cb_dnano.setSelectedItem(con_clientes.resultset.getString("dn_ano"));
tf_natural.setText(con_clientes.resultset.getString("naturalidade"));
tf_foto.setText(con_clientes.resultset.getString("foto"));
jl_foto.setIcon(new ImageIcon("/Estoque/Imagens/"+tf_foto.getText()));
}
catch(SQLException erro)
{
if (navega == 1)
JOptionPane.showMessageDialog(null,"Olha, você já está no primeiro registro");
else if (navega == 2)
JOptionPane.showMessageDialog(null,"Olha, você já está no último registro");
else
JOptionPane.showMessageDialog(null,"Não localizou dados "+erro);
navega=0;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void lavar() {\n\t\t// TODO Auto-generated method stub\n\t\t\n\t}",
"public void mo38117a() {\n }",
"@Override\r\n\tpublic void initVariables() {\n\t\t\r\n\t}",
"private void assignment() {\n\n\t\t\t}",
"private void kk12() {\n\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\n pu... | [
"0.6359434",
"0.6280371",
"0.61868024",
"0.6094568",
"0.60925734",
"0.6071678",
"0.6052686",
"0.60522056",
"0.6003249",
"0.59887564",
"0.59705925",
"0.59680873",
"0.5967989",
"0.5965816",
"0.5962006",
"0.5942372",
"0.5909877",
"0.5896588",
"0.5891321",
"0.5882983",
"0.5881482... | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public void onClick(View v) {
Intent intent = new Intent(CreateSalonActivity.this,SelectPicPopupWindow.class);
switch (v.getId()) {
case R.id.img_add0:
startActivityForResult(intent, 0);
break;
case R.id.img_add1:
startActivityForResult(intent, 1);
break;
case R.id.img_add2:
startActivityForResult(intent, 2);
break;
case R.id.img_add3:
startActivityForResult(intent, 3);
break;
case R.id.img_add4:
startActivityForResult(intent, 4);
break;
default:
break;
}
} | {
"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 |
Represents a code codegenerator. | public interface CodeGenerator<T, S> {
void setProperties(T properties);
Set<SourceFile<S>> generate(ParserDefinition lexerDefinition) throws CodeGenerationException;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void generateCode() {\n new CodeGenerator(data).generateCode();\n }",
"public void genCode(CodeFile code) {\n\t\t\n\t}",
"public static void generateCode()\n {\n \n }",
"public Codegen() {\n assembler = new LinkedList<LlvmInstruction>();\n symTab = new SymTab();\n }",... | [
"0.6730086",
"0.6713038",
"0.65842956",
"0.6524635",
"0.64719445",
"0.64599776",
"0.63638484",
"0.6363838",
"0.6209211",
"0.62085634",
"0.61216795",
"0.61178577",
"0.59886885",
"0.59828115",
"0.5948738",
"0.59286875",
"0.5917736",
"0.5911059",
"0.5872982",
"0.5856759",
"0.582... | 0.6627753 | 2 |
Inflate the layout for this fragment | @Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
view = inflater.inflate(R.layout.fragment_your__requirement, container, false);
((Home) getActivity()).getSupportActionBar().setTitle("Your Requirement");
SharedPreferences sharedPreferences = getActivity().getSharedPreferences("Cellways", Context.MODE_PRIVATE);
userdId = sharedPreferences.getString("userid", "");
Log.d("oeqww",userdId);
edt_req_brand = view.findViewById(R.id.edt_req_brand);
edt_req_model = view.findViewById(R.id.edt_req_model);
btn_reqSubmit = view.findViewById(R.id.btn_reqSubmit);
progressbarRequire = view.findViewById(R.id.progressbarRequire);
btn_reqSubmit.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
if(edt_req_brand.getText().toString().equals("")){
edt_req_brand.setError("Please enter Brand");
}
else if(edt_req_model.getText().toString().equals("")){
edt_req_model.setError("Please enter Model");
}
else{
hitReqApi();
}
}
});
return view;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_main_allinfo, container, false);\n }",
"@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup... | [
"0.6739604",
"0.67235583",
"0.6721706",
"0.6698254",
"0.6691869",
"0.6687986",
"0.66869223",
"0.6684548",
"0.66766286",
"0.6674615",
"0.66654444",
"0.66654384",
"0.6664403",
"0.66596216",
"0.6653321",
"0.6647136",
"0.66423255",
"0.66388357",
"0.6637491",
"0.6634193",
"0.66251... | 0.0 | -1 |
check if local player is at turn, if so then change text of cheatButton | public void setButtonVisibility() {
if (MankomaniaGame.getMankomaniaGame().getLocalClientPlayer().getPlayerIndex() == MankomaniaGame.getMankomaniaGame().getGameData().getCurrentPlayerTurnIndex()) {
cheatButton.setText("Cheat");
playerAtTurn.setVisible(true);
playerNotAtTurn.setVisible(false);
} else {
cheatButton.setText("Assume Cheating");
playerAtTurn.setVisible(false);
playerNotAtTurn.setVisible(true);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void NextTurn() {\n\t\tTextView tvStatus = (TextView) findViewById(R.id.tvStatus);\n\t\t\n\t\t\tif(player_1){\n\t\t\t\tplayer_1 = false;\n\t\t\t\tif(players == 1){ \n\t\t\t\t\ttvStatus.setText(\"Android Nole's turn\");\n\t\t\t\t\tLog.i(\"TEST\",\"Android turn\");\n\t\t\t\t\tAndroidTurn();\n\t\t\t\t}else{\n... | [
"0.71610427",
"0.7100799",
"0.70992064",
"0.7011995",
"0.7004735",
"0.69624174",
"0.6943234",
"0.69039094",
"0.67309487",
"0.6725914",
"0.67223024",
"0.6669016",
"0.6659727",
"0.66338354",
"0.6604472",
"0.6558077",
"0.6556043",
"0.6546583",
"0.6529987",
"0.65206575",
"0.64805... | 0.70336384 | 3 |
TODO Autogenerated method stub | @Override
public void setFocus() {
} | {
"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 |
Event handlers Handles the save button's action event. | @FXML
protected void handleSaveButtonAction(final ActionEvent event) {
getContact();
if (contactsService != null) {
int id;
try {
if (contact.getPhoto() != null) {
InputStream photoStream = new BufferedInputStream(new FileInputStream(contact.getPhoto()));
id = contactsService.saveContact(contact.toContact(), photoStream);
} else {
id = contactsService.saveContact(contact.toContact(), null);
}
if (contact.getId() == 0) {
contact.setId(id);
contacts.add(contact);
}
} catch (FileNotFoundException e) {
log.error("Couldn't find the file: " + contact.getPhoto());
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void handleSaveClicked(ActionEvent event);",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tSave();\n\t\t\t}",
"void onSaveClicked();",
"public void onSaveButtonClick(ActionEvent e){\n\t\tsaveFile(false);\n\t}",
"private void saveActionPerformed(java.awt.event.ActionEvent evt) {//G... | [
"0.85114306",
"0.8050431",
"0.7780616",
"0.77701354",
"0.77015257",
"0.761582",
"0.75927305",
"0.7551293",
"0.7491805",
"0.7491425",
"0.73586005",
"0.7284388",
"0.7224882",
"0.72166884",
"0.721336",
"0.7145334",
"0.7145126",
"0.71370155",
"0.7119195",
"0.71094835",
"0.7065089... | 0.6851261 | 33 |
Handle the set photo button action event. | @FXML
protected void handleSetPhotoButtonAction(final ActionEvent event) {
FileChooser fileChooser = new FileChooser();
File file = fileChooser.showOpenDialog(layout.getScene().getWindow());
try {
InputStream stream = new BufferedInputStream(new FileInputStream(file));
photo.setImage(new Image(stream));
stream.close();
contact.setPhoto(file);
} catch (FileNotFoundException e) {
log.error("Couldn't find the file: " + file);
} catch (IOException e) {
log.error("Error accessing the file: " + file);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\t\t\tpublic void handleEvent(final Event event) {\r\n\t\t\t\tonSelectPhoto();\r\n\t\t\t}",
"public void changePhoto(ActionEvent actionEvent) {\n FileChooser fileChooser = new FileChooser();\n fileChooser.setTitle(\"Picture Chooser\");\n // Sets up the initial directory as user ... | [
"0.6652298",
"0.6567981",
"0.6383312",
"0.6191134",
"0.6189755",
"0.6130337",
"0.61264825",
"0.61249524",
"0.6094223",
"0.60916024",
"0.6083069",
"0.6071291",
"0.6044802",
"0.6018456",
"0.59426755",
"0.59006226",
"0.5890486",
"0.5846547",
"0.58463",
"0.58463",
"0.5828922",
... | 0.744663 | 0 |
Creates new form JFrameCadastroCategoria | public JFrameCadastroCategoria() {
initComponents();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public FrameNuevaCategoria() {\n initComponents();\n limpiar();\n }",
"public CadastrarCategoria() {\n initComponents();\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initCo... | [
"0.8020117",
"0.73208094",
"0.7127978",
"0.7062711",
"0.69549024",
"0.69509345",
"0.69102854",
"0.6879924",
"0.68707395",
"0.67166686",
"0.67031604",
"0.6697903",
"0.6667206",
"0.6641175",
"0.657492",
"0.65746784",
"0.65359265",
"0.65136415",
"0.6513312",
"0.6440978",
"0.6439... | 0.82446045 | 0 |
This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always regenerated by the Form Editor. | @SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
buttonGroup1 = new javax.swing.ButtonGroup();
jLabelNome = new javax.swing.JLabel();
jLabel4 = new javax.swing.JLabel();
jLabelDescricao = new javax.swing.JLabel();
jTextFieldNome = new javax.swing.JTextField();
jLabelStatus = new javax.swing.JLabel();
jRadioButtonAtivo = new javax.swing.JRadioButton();
jRadioButtonInativo = new javax.swing.JRadioButton();
jScrollPane1 = new javax.swing.JScrollPane();
jTextAreaDescricao = new javax.swing.JTextArea();
jButtonSalvar = new javax.swing.JButton();
jLabelCodigo = new javax.swing.JLabel();
setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
setResizable(false);
jLabelNome.setFont(new java.awt.Font("Times New Roman", 0, 14)); // NOI18N
jLabelNome.setText("Nome");
jLabel4.setFont(new java.awt.Font("Times New Roman", 0, 14)); // NOI18N
jLabel4.setText("ID");
jLabelDescricao.setFont(new java.awt.Font("Times New Roman", 0, 14)); // NOI18N
jLabelDescricao.setText("Descricao");
jTextFieldNome.setFont(new java.awt.Font("Times New Roman", 0, 12)); // NOI18N
jLabelStatus.setFont(new java.awt.Font("Times New Roman", 0, 14)); // NOI18N
jLabelStatus.setText("Status");
buttonGroup1.add(jRadioButtonAtivo);
jRadioButtonAtivo.setFont(new java.awt.Font("Times New Roman", 0, 12)); // NOI18N
jRadioButtonAtivo.setText("Ativo");
buttonGroup1.add(jRadioButtonInativo);
jRadioButtonInativo.setFont(new java.awt.Font("Times New Roman", 0, 12)); // NOI18N
jRadioButtonInativo.setText("Inativo");
jRadioButtonInativo.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jRadioButtonInativoActionPerformed(evt);
}
});
jTextAreaDescricao.setColumns(20);
jTextAreaDescricao.setFont(new java.awt.Font("Times New Roman", 0, 12)); // NOI18N
jTextAreaDescricao.setLineWrap(true);
jTextAreaDescricao.setRows(5);
jTextAreaDescricao.setWrapStyleWord(true);
jTextAreaDescricao.setBorder(new javax.swing.border.SoftBevelBorder(0));
jScrollPane1.setViewportView(jTextAreaDescricao);
jButtonSalvar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/save.png"))); // NOI18N
jButtonSalvar.setText("Salvar");
jButtonSalvar.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButtonSalvarActionPerformed(evt);
}
});
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGap(10, 10, 10)
.addComponent(jLabelNome)
.addGap(7, 7, 7)
.addComponent(jTextFieldNome, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(40, 40, 40)
.addComponent(jRadioButtonAtivo)
.addGap(10, 10, 10)
.addComponent(jRadioButtonInativo))
.addGroup(layout.createSequentialGroup()
.addGap(10, 10, 10)
.addComponent(jLabelDescricao))
.addGroup(layout.createSequentialGroup()
.addGap(10, 10, 10)
.addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 436, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(layout.createSequentialGroup()
.addGap(340, 340, 340)
.addComponent(jButtonSalvar)))
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addGroup(layout.createSequentialGroup()
.addGap(10, 10, 10)
.addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jLabelCodigo, javax.swing.GroupLayout.PREFERRED_SIZE, 135, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jLabelStatus)
.addGap(138, 138, 138))
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGap(10, 10, 10)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel4)
.addComponent(jLabelStatus)
.addComponent(jLabelCodigo, javax.swing.GroupLayout.PREFERRED_SIZE, 17, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(14, 14, 14)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jLabelNome)
.addComponent(jTextFieldNome, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jRadioButtonAtivo)
.addComponent(jRadioButtonInativo))
.addGap(12, 12, 12)
.addComponent(jLabelDescricao)
.addGap(4, 4, 4)
.addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 141, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(39, 39, 39)
.addComponent(jButtonSalvar))
);
pack();
setLocationRelativeTo(null);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Form() {\n initComponents();\n }",
"public MainForm() {\n initComponents();\n }",
"public MainForm() {\n initComponents();\n }",
"public MainForm() {\n initComponents();\n }",
"public frmRectangulo() {\n initComponents();\n }",
"public form() {\n ... | [
"0.73191476",
"0.72906625",
"0.72906625",
"0.72906625",
"0.72860986",
"0.7248112",
"0.7213479",
"0.72078276",
"0.7195841",
"0.71899796",
"0.71840525",
"0.7158498",
"0.71477973",
"0.7092748",
"0.70800966",
"0.70558053",
"0.69871384",
"0.69773406",
"0.69548076",
"0.69533914",
"... | 0.0 | -1 |
/ renamed from: io.reactivex.y.c.l / compiled from: ScalarCallable | public interface C12049l<T> extends Callable<T> {
T call();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public interface Callable<V> {\n\n\tpublic void onCall(int state, V jo);\n\n}",
"public static void fromCallable() {\n Observable<List<String>> myObservable = Observable.fromCallable(() -> {\n System.out.println(\"call, thread = \" + Thread.currentThread().getName());\n return Utils.... | [
"0.6404647",
"0.6353468",
"0.6114733",
"0.6066689",
"0.5997888",
"0.5906474",
"0.58605367",
"0.581452",
"0.5719151",
"0.5700498",
"0.5659506",
"0.5637251",
"0.56358826",
"0.56277347",
"0.55772144",
"0.55582434",
"0.5485949",
"0.54430956",
"0.54393023",
"0.5426302",
"0.5375644... | 0.646377 | 0 |
Construction toString Convert to string. | @Override
public String toString() {
String str = "ForecastCatalog\n"
+ "\teqk_count: " + eqk_count + "\n"
+ "\tlat_lon_depth_list: " + ((lat_lon_depth_list == null) ? ("null") : ("len=" + lat_lon_depth_list.length)) + "\n"
+ "\tmag_time_list: " + ((mag_time_list == null) ? ("null") : ("len=" + mag_time_list.length)) + "\n";
return str;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"String toString();",
"String toString();",
"String toString();",
"String toString();",
"String toString();",
"String toString();",
"String toString();",
"String toString();",
"String toString();",
"String toString();",
"String toString();",
"String toString();",
"String toString();",
"Str... | [
"0.7526533",
"0.7526533",
"0.7526533",
"0.7526533",
"0.7526533",
"0.7526533",
"0.7526533",
"0.7526533",
"0.7526533",
"0.7526533",
"0.7526533",
"0.7526533",
"0.7526533",
"0.7526533",
"0.7526533",
"0.7526533",
"0.7526533",
"0.7526533",
"0.7526533",
"0.7526533",
"0.7526533",
"... | 0.0 | -1 |
get_rupture_list Get the earthquake rupture list. | public CompactEqkRupList get_rupture_list () {
// For null list, return null
if (eqk_count < 0) {
return null;
}
// For empty list, pass in zero-size arrays
if (eqk_count == 0) {
return new CompactEqkRupList (eqk_count, new long[0], new long[0]);
}
// For non-empty list, pass our arrays
return new CompactEqkRupList (eqk_count, lat_lon_depth_list, mag_time_list);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public ArrayList<String> getAlllectureAttendance() {\n\t\tArrayList<String> attendance_lecture = new ArrayList<String>();\n\t\t// Select All Query\n\t\tString selectQuery = \"SELECT DISTINCT \" + KEY_LECTURE_NUM_ATTENDANCE\n\t\t\t\t+ \" FROM \" + TABLE_TEACHER_ATTENDANCE;\n\t\tCursor cursor = db.rawQuery(selectQue... | [
"0.5574944",
"0.55165017",
"0.55165017",
"0.53500956",
"0.53149915",
"0.5306506",
"0.529412",
"0.5239017",
"0.5218784",
"0.52128386",
"0.5210421",
"0.51711977",
"0.5141134",
"0.5140184",
"0.51370597",
"0.5117653",
"0.5059878",
"0.50517505",
"0.50414073",
"0.5015212",
"0.50112... | 0.6983635 | 1 |
set_rupture_list Set the earthquake rupture list. | public ForecastCatalog set_rupture_list (CompactEqkRupList rupture_list) {
// For null list, use count = -1
if (rupture_list == null) {
eqk_count = -1;
lat_lon_depth_list = new long[1];
lat_lon_depth_list[0] = 0L;
mag_time_list = new long[1];
mag_time_list[0] = 0L;
return this;
}
// Get earthquake count
eqk_count = rupture_list.get_eqk_count();
// For empty list, use one-element lists
if (eqk_count == 0) {
lat_lon_depth_list = new long[1];
lat_lon_depth_list[0] = 0L;
mag_time_list = new long[1];
mag_time_list[0] = 0L;
return this;
}
// For non-empty list, pull the existing arrays, and re-size them if needed
lat_lon_depth_list = rupture_list.get_lat_lon_depth_list();
mag_time_list = rupture_list.get_mag_time_list();
if (lat_lon_depth_list.length != eqk_count) {
lat_lon_depth_list = Arrays.copyOf (lat_lon_depth_list, eqk_count);
}
if (mag_time_list.length != eqk_count) {
mag_time_list = Arrays.copyOf (mag_time_list, eqk_count);
}
return this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setListRegisseure( List<Person> listRegisseure ) {\n\t\tthis.listRegisseure.clear();\n\t\tthis.listRegisseure.addAll( listRegisseure );\n\t}",
"public CompactEqkRupList get_rupture_list () {\n\n\t\t// For null list, return null\n\n\t\tif (eqk_count < 0) {\n\t\t\treturn null;\n\t\t}\n\n\t\t// For empt... | [
"0.5828193",
"0.5722381",
"0.5722381",
"0.5249752",
"0.51963484",
"0.5109992",
"0.5105236",
"0.50810057",
"0.50519705",
"0.50330967",
"0.5018384",
"0.49829546",
"0.49454045",
"0.49398607",
"0.49306902",
"0.48981792",
"0.48943773",
"0.48753643",
"0.48371464",
"0.48045757",
"0.... | 0.71681887 | 1 |
Constructor makes a null list. | public ForecastCatalog () {
eqk_count = -1;
lat_lon_depth_list = new long[1];
lat_lon_depth_list[0] = 0L;
mag_time_list = new long[1];
mag_time_list[0] = 0L;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public List()\n\t{\n\t\tthis(null, null);\n\t}",
"private Lists() { }",
"public List()\n {\n list = new Object [10];\n }",
"public list() {\r\n }",
"@SuppressWarnings(\"unchecked\")\r\n \tpublic List() {\r\n \t\titems = (T[]) new Object[INIT_LEN];\r\n \t\tnumItems = 0;\r\n \t\tcurrentObject... | [
"0.8336893",
"0.7785419",
"0.75426096",
"0.7515376",
"0.74588543",
"0.74237597",
"0.74184304",
"0.73678905",
"0.7365034",
"0.7360565",
"0.7314284",
"0.73117244",
"0.7148926",
"0.7093362",
"0.7083037",
"0.70650834",
"0.705471",
"0.70432013",
"0.7041207",
"0.7025349",
"0.701208... | 0.0 | -1 |
Get the type code. | protected int get_marshal_type () {
return MARSHAL_FCAST_RESULT;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getTypeCode() {\n return typeCode;\n }",
"public String getTypeCode() {\n return typeCode;\n }",
"public String getTypeCode() {\n return typeCode;\n }",
"public String getTypeCode() {\n return typeCode;\n }",
"public Integer getTypeCode() {\n ret... | [
"0.8581057",
"0.8581057",
"0.8581057",
"0.8581057",
"0.8541883",
"0.8056349",
"0.7719405",
"0.73514193",
"0.73514193",
"0.73514193",
"0.73514193",
"0.73514193",
"0.73514193",
"0.73514193",
"0.73514193",
"0.73514193",
"0.73514193",
"0.73514193",
"0.73514193",
"0.73514193",
"0.... | 0.0 | -1 |
Retrieves a user by its case insensitive username. | User get(String name); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"User getByUsername(String username);",
"public User getSpecificUser(String username);",
"public User getUserByName(String username);",
"public User getUserByName(String username);",
"public User getUserByUserName(String username);",
"public User get(String username);",
"User getUserByUsername(String us... | [
"0.776854",
"0.7686913",
"0.7675005",
"0.7675005",
"0.7539373",
"0.75342244",
"0.7504096",
"0.7504096",
"0.7504096",
"0.7470611",
"0.7453796",
"0.7421957",
"0.7315137",
"0.729368",
"0.7258518",
"0.7237692",
"0.72328275",
"0.7224208",
"0.7160184",
"0.7156786",
"0.71176136",
... | 0.6661842 | 86 |
Retrieves a user by its current drupal session name (SID). | User getBySession(String session); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public User getSpecificUser(String username);",
"java.lang.String getUser();",
"String getUser();",
"String getUser();",
"public Session getSessionbyUid(int uid);",
"User getCurrentLoggedInUser();",
"LoggedUser getLoggedUser();",
"public MetaUser getMetaUser(String sName);",
"public User getLoggedU... | [
"0.6574397",
"0.64452875",
"0.64353496",
"0.64353496",
"0.64221126",
"0.6408351",
"0.6391176",
"0.63439596",
"0.6343353",
"0.63408816",
"0.6318796",
"0.6311009",
"0.62818575",
"0.6261273",
"0.6259134",
"0.62088925",
"0.62088925",
"0.61982113",
"0.6196547",
"0.6196547",
"0.619... | 0.6700534 | 0 |
============================================================================================= Helpers CONTEXT ============================================================================================= | private Context getContextAsync() {
return getActivity() == null ? IotSensorsApplication.getApplication().getApplicationContext() : getActivity();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Context context();",
"Context context();",
"public abstract void mo36026a(Context context);",
"public abstract T mo36028b(Context context);",
"Context mo1490b();",
"Context getContext();",
"java.lang.String getContext();",
"@Override\r\n\t\t\tprotected void saveContext() {\n\t\t\t\t\r\n\t\t\t}",
"p... | [
"0.64524746",
"0.64524746",
"0.61822766",
"0.6033287",
"0.6028438",
"0.59679675",
"0.59669334",
"0.5856548",
"0.58092695",
"0.58081335",
"0.5801416",
"0.5697246",
"0.5624962",
"0.5538206",
"0.55311984",
"0.55079126",
"0.54691815",
"0.54574025",
"0.5446071",
"0.54139",
"0.5411... | 0.0 | -1 |
============================================================================================= Helpers DEVICE SPINNER ============================================================================================= | private void updateAdapter(List<DeviceInfo> data) {
ArrayList<String> devices = new ArrayList<>();
for (DeviceInfo device : data) {
devices.add(device.getEKID() +
((device.getFriendlyName() != null && !device.getFriendlyName().isEmpty()) ? ", " + device.getFriendlyName() : ""));
}
try {
devicesEntriesForSpinner.clear();
devicesEntriesForSpinner.addAll(devices);
setDeviceSpinnerAdapter();
} catch (Exception ex) {
Log.e(TAG, ex.getMessage());
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"String getDeviceName();",
"private void getDynamicProfie() {\n getDeviceName();\n }",
"public String getRingerDevice();",
"java.lang.String getDeviceId();",
"@SuppressLint(\"HardwareIds\")\n String getDeviceID() {\n return Settings.Secure.getString(getApplicationContext().getContentReso... | [
"0.63663954",
"0.61964077",
"0.6179886",
"0.60878783",
"0.6069289",
"0.60132617",
"0.60132617",
"0.59589803",
"0.59150416",
"0.5890093",
"0.5866822",
"0.5814145",
"0.5795835",
"0.5771829",
"0.57712597",
"0.57417697",
"0.5727995",
"0.57217073",
"0.5715024",
"0.5678063",
"0.566... | 0.0 | -1 |
============================================================================================= Helpers UI UPDATES ============================================================================================= | private void setAsyncButtonText(final Button button, final String text) {
if (getActivity() != null && button != null && text != null)
getActivity().runOnUiThread(new Runnable() {
@Override
public void run() {
button.setText(text);
}
});
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tprotected void UpdateUI() {\n\t\t\n\t}",
"@Override\n\tprotected void UpdateUI() {\n\t\t\n\t}",
"@Override\r\n public void updateUI() {\r\n }",
"@Override\n public void updateUi() {\n\n }",
"@Override\n public void updateUi() {\n\n }",
"@Override\n public void up... | [
"0.643504",
"0.643504",
"0.6428737",
"0.6230885",
"0.6230885",
"0.6230885",
"0.6182121",
"0.61548775",
"0.60666037",
"0.5905912",
"0.5851191",
"0.57823926",
"0.5780597",
"0.57534754",
"0.5746146",
"0.5694923",
"0.56753916",
"0.56579673",
"0.5612858",
"0.5610438",
"0.559127",
... | 0.0 | -1 |
============================================================================================= Helpers CLOUD ============================================================================================= | private void getEKIDs() {
if (!CloudSettingsManager.getUserID(getContextAsync()).isEmpty()) {
DataMessenger.getInstance().getEkIds(CloudSettingsManager.getUserID(getContextAsync()), new RestApi.ResponseListener() {
@Override
public void start() {
Log.i(TAG, "Request started");
}
@Override
public void success(HttpResponse rsp) {
if (rsp != null) {
if (rsp.statusCode == 200) {
if (rsp.body != null) {
MgmtGetEKIDRsp result = new Gson().fromJson(rsp.body, MgmtGetEKIDRsp.class);
if (result.getDevices().size() == 0) {
Utils.showToast(getContextAsync(), R.string.get_cloud_ekids_empty);
} else {
updateAdapter(result.getDevices());
}
} else {
Utils.showToast(getContextAsync(), R.string.get_cloud_ekids_error);
}
} else {
GenericRsp genericRsp = new Gson().fromJson(rsp.body, GenericRsp.class);
if (genericRsp != null && !genericRsp.isResult()) {
Utils.showToast(getContextAsync(), genericRsp.getReasonCode());
} else {
Utils.showToast(getContextAsync(), R.string.get_cloud_ekids_error);
}
}
} else {
Utils.showToast(getContextAsync(), R.string.get_cloud_ekids_error);
}
}
@Override
public void failure(Exception error) {
if (error instanceof UnknownHostException) {
Utils.showToast(getContextAsync(), R.string.connectivity_error);
} else {
Utils.showToast(getContextAsync(), R.string.get_cloud_ekids_error);
}
}
@Override
public void complete() {
Log.i(TAG, "Request completed");
}
});
} else {
Utils.showToast(getContextAsync(), R.string.get_cloud_ekids_empty_userid);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private stendhal() {\n\t}",
"private Util() { }",
"private WAPIHelper() { }",
"private Singletion3() {}",
"public abstract String use();",
"private void getStatus() {\n\t\t\n\t}",
"private OMUtil() { }",
"private RefereesInLeagueDBAccess() {\n\n }",
"OptimizeResponse() {\n\n\t}",
"zzafe mo2984... | [
"0.5480057",
"0.53389937",
"0.5280041",
"0.518131",
"0.51512",
"0.5138162",
"0.51255083",
"0.5123915",
"0.5107575",
"0.5103565",
"0.5086541",
"0.5086541",
"0.5086541",
"0.5086541",
"0.5084343",
"0.5083242",
"0.50809133",
"0.5037541",
"0.5028594",
"0.5021176",
"0.50195414",
... | 0.0 | -1 |
Ends in 1900's+ Cambridge | @Override
public void initialize(URL location, ResourceBundle resources) {
// Sets the background image to a map of the world
backgroundImage.setImage(new Image("src/assets/map-image.jpg"));
// All buttons will be initially invisible until slider is moved except for 1st button
eventButton1.setVisible(true);
eventButton2.setVisible(false);
eventButton3.setVisible(false);
eventButton4.setVisible(false);
eventButton5.setVisible(false);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static double toFullYear(double year) {\n if (-1 < year && year < 100) {\n return 1900 + (int) year;\n }\n return year;\n }",
"public int calc_century() // defining method calc_century\r\n\t{\r\n\t\tif(year %100 == 0) // implement in the condition of year%100 =0\r\n\t\t... | [
"0.5844929",
"0.55745673",
"0.5553396",
"0.5452256",
"0.532113",
"0.5257751",
"0.5193255",
"0.5180435",
"0.5167185",
"0.51623756",
"0.5122669",
"0.5076938",
"0.50525045",
"0.50435066",
"0.50429887",
"0.5025418",
"0.5012756",
"0.49706158",
"0.4935297",
"0.49325904",
"0.4908595... | 0.0 | -1 |
All button methods below | public void backToStartScene(ActionEvent event) throws IOException {
Parent startView = FXMLLoader.load(Main.class.getResource("fxml/StartScene.fxml"));
Scene startViewScene = new Scene(startView);
// This line gets the Stage information (no Stage is passed in)
Stage window = (Stage) ((Node)event.getSource()).getScene().getWindow();
window.setScene(startViewScene);
window.show();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tprotected void on_button_pressed(String button_name) {\n\n\t}",
"public void buttonClicked();",
"public void sButton() {\n\n\n\n }",
"@Override\n\t\tpublic void buttonStatusChange() {\n\t\t\t\n\t\t}",
"Button getBtn();",
"public abstract void buttonPressed();",
"void buttonPressed(Butto... | [
"0.7457386",
"0.73161095",
"0.7311033",
"0.7289923",
"0.71056396",
"0.7044469",
"0.7041391",
"0.7006011",
"0.6942699",
"0.69328636",
"0.693106",
"0.69078326",
"0.68938625",
"0.6838113",
"0.68350196",
"0.68255305",
"0.6779958",
"0.67607915",
"0.6754384",
"0.675366",
"0.675366"... | 0.0 | -1 |
Will make buttons appear | public void onSliderChanged() {
// So we can get the date of where our slider is pointing
int sliderValue = (int) dateSlider.getValue();
System.out.println(sliderValue);
// When the slider is moved, only the correct button will appear
if(sliderValue == 0) {
eventButton1.setVisible(true);
eventButton2.setVisible(false);
eventButton3.setVisible(false);
eventButton4.setVisible(false);
eventButton5.setVisible(false);
} else if(sliderValue == 6) {
eventButton1.setVisible(false);
eventButton2.setVisible(true);
eventButton3.setVisible(false);
eventButton4.setVisible(false);
eventButton5.setVisible(false);
} else if(sliderValue == 12) {
eventButton1.setVisible(false);
eventButton2.setVisible(false);
eventButton3.setVisible(true);
eventButton4.setVisible(false);
eventButton5.setVisible(false);
} else if(sliderValue == 18) {
eventButton1.setVisible(false);
eventButton2.setVisible(false);
eventButton3.setVisible(false);
eventButton4.setVisible(true);
eventButton5.setVisible(false);
} else if(sliderValue == 25) {
eventButton1.setVisible(false);
eventButton2.setVisible(false);
eventButton3.setVisible(false);
eventButton4.setVisible(false);
eventButton5.setVisible(true);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void showPlayerButtons() {\n\n\t\tprevious.setVisibility(View.VISIBLE);\n\t\tplay.setVisibility(View.VISIBLE);\n\t\tnext.setVisibility(View.VISIBLE);\n\t}",
"private void doButtons()\n {\n if (scopes.size()>1) addButtons();\n else hideButtons();\n }",
"public void show() {\r\n\t\tfor (int id = ... | [
"0.75247586",
"0.7509315",
"0.746807",
"0.7095597",
"0.7063972",
"0.702532",
"0.70192486",
"0.70086354",
"0.7003344",
"0.69886875",
"0.69577456",
"0.6906452",
"0.6893555",
"0.68593895",
"0.6785365",
"0.6738432",
"0.6735036",
"0.66740704",
"0.66595906",
"0.6657177",
"0.6653825... | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public Event updateEvent(Event e) {
return eventDao.updateEvent(e);
} | {
"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 |
TODO Autogenerated method stub | @Override
public VenueCity getVenueCityById(int id) {
return eventDao.getVenueCityById(id);
} | {
"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.66708666",
"0.65675074",
"0.65229905",
"0.6481001",
"0.64770633",
"0.64584893",
"0.6413091",
"0.63764185",
"0.6275735",
"0.62541914",
"0.6236919",
"0.6223816",
"0.62017626",
"0.61944294",
"0.61944294",
"0.61920846",
"0.61867654",
"0.6173323",
"0.61328775",
"0.61276996",
"0... | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public List<Location> listLocationsById(int venueCity_id) {
return eventDao.listLocationsById(venueCity_id);
} | {
"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 |
TODO Autogenerated method stub | @Override
public List<VenueCity> listVenueCity() {
return eventDao.listVenueCity();
} | {
"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 |
Checks if the player's prayer book is set to Curses. | public boolean isCursing() {
return methods.settings.getSetting(1584) % 2 != 0;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean isQuickPrayerOn() {\n\t\treturn methods.interfaces.getComponent(Game.INTERFACE_PRAYER_ORB, 2).getBackgroundColor() == 782;\n\t}",
"private boolean didPlayerLose() {\r\n return mouseListeningMode && bird.getNumThrowsRemaining() == 0;\r\n }",
"private boolean gameOver() {\r\n\t\treturn (... | [
"0.61093104",
"0.57132626",
"0.5529998",
"0.5528871",
"0.5516407",
"0.5471663",
"0.5468298",
"0.5468275",
"0.54678386",
"0.5453222",
"0.534997",
"0.5334033",
"0.52606386",
"0.52215946",
"0.52145153",
"0.5213646",
"0.5212867",
"0.51933163",
"0.5171396",
"0.5169503",
"0.5169503... | 0.59439206 | 1 |
Returns an array of all current active prayers. | public Book[] getSelectedPrayers() {
final int bookSetting = isCursing() ? 1582 : 1395;
final List<Book> activePrayers = new LinkedList<Book>();
for (Book prayer : isCursing() ? Curses.values() : Normal.values()) {
if ((methods.settings.getSetting(bookSetting) & (prayer.getSettings())) == prayer.getSettings()) {
activePrayers.add(prayer);
}
}
return activePrayers.toArray(new Book[activePrayers.size()]);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public final Array<DodlesActor> activeActors() {\n return activeActors(true);\n }",
"public List<Key> getActiveKeys() {\n\t\tactiveKeys.clear();\n\t\t\n\t\tfor (Key key : keys) {\n\t\t\tif (key.getIsActive()) activeKeys.add(key);\n\t\t}\n\t\t\n\t\treturn activeKeys;\n\t}",
"@Override\r\n\tpublic List... | [
"0.6380842",
"0.59977204",
"0.5888068",
"0.5766908",
"0.57555085",
"0.57013196",
"0.5644509",
"0.5603183",
"0.56012225",
"0.55793536",
"0.5552491",
"0.5536702",
"0.55203164",
"0.55202806",
"0.5515512",
"0.5494583",
"0.5418555",
"0.5412094",
"0.54105055",
"0.5401246",
"0.53974... | 0.71922314 | 0 |
Returns true if designated prayer is turned on. | public boolean isPrayerOn(final Book prayer) {
for (Book pray : getSelectedPrayers()) {
if (pray == prayer) {
return true;
}
}
return false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean isQuickPrayerOn() {\n\t\treturn methods.interfaces.getComponent(Game.INTERFACE_PRAYER_ORB, 2).getBackgroundColor() == 782;\n\t}",
"public boolean isNotificationOn(){\n return mSharedPreferences.getBoolean(SharedPrefContract.PREF_NOTIFICATION_TURNED_ON, true);\n }",
"public boolean isOn... | [
"0.7305968",
"0.6552778",
"0.6543428",
"0.6541056",
"0.6527144",
"0.6502957",
"0.64125645",
"0.63949376",
"0.6382637",
"0.63469744",
"0.6322131",
"0.6308505",
"0.6298616",
"0.6243293",
"0.6198862",
"0.6165134",
"0.6134886",
"0.609414",
"0.6051787",
"0.6019168",
"0.601285",
... | 0.7128032 | 1 |
Returns true if the quick prayer interface has been used to activate prayers. | public boolean isQuickPrayerOn() {
return methods.interfaces.getComponent(Game.INTERFACE_PRAYER_ORB, 2).getBackgroundColor() == 782;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"boolean hasPokers();",
"boolean hasPokers();",
"public boolean isPrayerOn(final Book prayer) {\n\t\tfor (Book pray : getSelectedPrayers()) {\n\t\t\tif (pray == prayer) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}",
"boolean isStartup();",
"private boolean pptIsAvailable() {\n try ... | [
"0.6387648",
"0.6387648",
"0.624706",
"0.6177746",
"0.6169545",
"0.61471957",
"0.6087381",
"0.6067223",
"0.6066958",
"0.60612994",
"0.6043049",
"0.60258734",
"0.60244983",
"0.6017165",
"0.59956443",
"0.5984839",
"0.59716815",
"0.59611",
"0.595643",
"0.59475124",
"0.594358",
... | 0.7733515 | 0 |
Sets the character's quick prayers to the given prayers. | public boolean setQuickPrayers(Book... prayers) {
if (!isQuickPrayerOn()) {
methods.interfaces.getComponent(INTERFACE_PRAYER_ORB, 1).doAction("Select quick prayers");
}
for (Book effect : prayers) {
if (isQuickPrayerSet(effect)) {
continue;
}
methods.interfaces.getComponent(INTERFACE_PRAYER, 42).getComponent(effect.getComponentIndex()).doAction("Select");
sleep(random(750, 1100));
}
return isQuickPrayerSet(prayers) && methods.interfaces.getComponent(INTERFACE_PRAYER, 42).getComponent(43).doAction("Confirm Selection");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setPainters(Painter... painters)\n/* */ {\n/* 128 */ Painter[] old = getPainters();\n/* */ \n/* 130 */ for (Painter p : old) {\n/* 131 */ if ((p instanceof AbstractPainter)) {\n/* 132 */ ((AbstractPainter)p).removePropertyChangeListener(this.handler);\n/* */ ... | [
"0.55557287",
"0.5356096",
"0.52352995",
"0.52333784",
"0.519565",
"0.5010039",
"0.49966457",
"0.4973876",
"0.49553123",
"0.49231806",
"0.49106464",
"0.49061698",
"0.4894296",
"0.48900795",
"0.48603153",
"0.4829683",
"0.4799648",
"0.47973135",
"0.4796334",
"0.4794263",
"0.474... | 0.763414 | 0 |
Gets the remaining prayer points. | public int getPrayerLeft() {
return Integer.parseInt(methods.interfaces.getComponent(Game.INTERFACE_PRAYER_ORB, 4).getText());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int getRemainPoints() {\n return remainPoints_;\n }",
"public int getRemainPoints() {\n return remainPoints_;\n }",
"int getRemainPoints();",
"public double getPrayerPoints() {\r\n return prayerPoints;\r\n }",
"int getNeedPoints();",
"int getUsedPoints();",
"int get... | [
"0.72974247",
"0.7263122",
"0.72609526",
"0.7194499",
"0.6414928",
"0.62284267",
"0.62284267",
"0.62284267",
"0.6212627",
"0.6198384",
"0.616428",
"0.6137583",
"0.613425",
"0.60470897",
"0.60142034",
"0.59962595",
"0.59582955",
"0.59563124",
"0.5955433",
"0.59401745",
"0.5927... | 0.5495473 | 69 |
Gets the percentage of prayer points left based on the players current prayer level. | public int getPrayerPercentLeft() {
return 100 * getPrayerLeft() / methods.skills.getCurrentLevel(Skills.PRAYER);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int getPrayerLeft() {\n\t\treturn Integer.parseInt(methods.interfaces.getComponent(Game.INTERFACE_PRAYER_ORB, 4).getText());\n\t}",
"public double getPrayerPoints() {\r\n return prayerPoints;\r\n }",
"public static int GetPlayersLeft () {\n int players_left = 0;\r\n\r\n // LOOK A... | [
"0.66675115",
"0.6310639",
"0.6302718",
"0.6225362",
"0.61485076",
"0.60899734",
"0.60873383",
"0.608257",
"0.605925",
"0.6013125",
"0.60035396",
"0.5818251",
"0.5798376",
"0.5788979",
"0.57842577",
"0.5779057",
"0.57533944",
"0.5737465",
"0.5722529",
"0.5720204",
"0.5703614"... | 0.81292015 | 0 |
Activates/deactivates a prayer via interfaces. | public boolean setPrayer(Book pray, boolean active) {
if (isPrayerOn(pray) == active) {
return true;
} else {
if (methods.skills.getRealLevel(Skills.PRAYER) < pray.getRequiredLevel()) {
return false;
}
methods.game.openTab(Game.Tab.PRAYER);
if (methods.game.getTab() == Game.Tab.PRAYER) {
RSComponent component = methods.interfaces.getComponent(PRAYER_INTERFACE, 7)
.getComponent(pray.getComponentIndex());
if (component.isValid()) {
component.doAction(active ? "Activate" : "Deactivate");
}
}
}
return isPrayerOn(pray) == active;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void activate(IActivator activator);",
"public interface IFan {\n void activate(int i);\n}",
"public interface IActivatable {\n\tpublic static final Long ID_UNINITIALIZED = -1L;\n\t\n\t/**\n\t * \n\t * Gets the unique ID of this Activatable that identifies it in the\n\t * ActivationManager.\n\t * Th... | [
"0.65567553",
"0.59803826",
"0.5871356",
"0.56754947",
"0.56690437",
"0.5643928",
"0.5579279",
"0.5573191",
"0.5554251",
"0.5530495",
"0.5530495",
"0.5495456",
"0.5480465",
"0.54631454",
"0.54377323",
"0.5396995",
"0.5396995",
"0.53777945",
"0.5321026",
"0.52655506",
"0.52591... | 0.5112459 | 38 |
Delete the pathToDirectory. Return only if the directory is actually get deleted on the disk. | public static void blockingDeleteDirectory(final String pathToDirectory) {
final File testBaseFolderF = new File(pathToDirectory);
try {
FSUtils.deleteFileFolder(testBaseFolderF);
} catch (final IOException e) {
e.printStackTrace();
}
boolean finishClean = false;
while (!finishClean) {
finishClean = !testBaseFolderF.exists();
if (!finishClean) {
try {
Thread.sleep(SHORT_SLEEP_MILLIS);
} catch (final InterruptedException e) {
e.printStackTrace();
Thread.currentThread().interrupt();
}
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static boolean deleteDirectory(final File path) {\r\n if (path.exists()) {\r\n final File[] files = path.listFiles();\r\n for (int i = 0; i < files.length; i++) {\r\n if (files[i].isDirectory()) {\r\n deleteDirectory(files[i]);\r\n }\r\n e... | [
"0.7087815",
"0.70364606",
"0.67040664",
"0.6619002",
"0.64535904",
"0.6391587",
"0.6345373",
"0.6300322",
"0.6181653",
"0.61404973",
"0.6090227",
"0.6088163",
"0.60672116",
"0.599729",
"0.5939375",
"0.5916528",
"0.59129095",
"0.5907606",
"0.5903146",
"0.5862895",
"0.58500504... | 0.6642777 | 3 |
Write the content to the file. | public static void writeFile(final File f, final String content) throws IOException {
final FileOutputStream o = new FileOutputStream(f);
o.write(content.getBytes());
o.close();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void writeFile(String content){\n\t\tFile file = new File(filePath);\n\t\t\n\t\tBufferedWriter bw = null;\n\t\t\n\t\ttry{\n\t\t\tif (!file.exists())\n\t\t\t\tfile.createNewFile();\n\t\t\t\n\t\t\tbw = new BufferedWriter(new FileWriter(file));\n\t\t\tbw.write(content);\n\t\t}\n\t\tcatch (Exception oops){\n\t\... | [
"0.7225885",
"0.6856288",
"0.6769893",
"0.6737206",
"0.6650292",
"0.66362333",
"0.6605178",
"0.65756994",
"0.6574071",
"0.6520407",
"0.6494484",
"0.6486768",
"0.64415616",
"0.6419977",
"0.6393653",
"0.6380665",
"0.6378381",
"0.6340282",
"0.63142145",
"0.62879413",
"0.6276283"... | 0.6009925 | 40 |
Reset the file length of a file. | public static void resetFileSize(final File f, final long desired) throws IOException {
boolean ok = f.length() == desired;
if (!ok) {
RandomAccessFile raf = null;
try {
raf = new RandomAccessFile(f, "rws");
raf.setLength(desired);
} finally {
if (raf != null) {
raf.close();
}
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setLength(long newLength) throws IOException {\n flush();\n this.randomAccessFile.setLength(newLength);\n if (newLength < this.fileOffset) {\n this.fileOffset = newLength;\n }\n }",
"public static void setLength(final RandomAccessFile file, final long newLeng... | [
"0.7230606",
"0.69378823",
"0.63886654",
"0.6304311",
"0.6300724",
"0.62475216",
"0.61847675",
"0.6118769",
"0.6114088",
"0.599321",
"0.5935353",
"0.59223896",
"0.5873431",
"0.58709335",
"0.5850625",
"0.5818097",
"0.5796093",
"0.5735818",
"0.57293487",
"0.5692544",
"0.5666442... | 0.7210842 | 1 |
Check whether the specified filepath is a file and is readable. | public static void checkFileReadable(final String filepath) throws FileNotFoundException {
File f = new File(filepath);
if (!f.exists()) {
throw new FileNotFoundException(filepath + " could not be found");
}
if (!f.isFile()) {
throw new FileNotFoundException(filepath + " is not a file");
}
if (!f.canRead()) {
throw new AccessControlException(filepath + " could not be read");
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static boolean isReadableFile( File path )\n {\n return path.isFile() && path.canRead();\n }",
"boolean isFile() throws IOException;",
"@Override\n\tpublic boolean isReadable() {\n\t\treturn (Files.isReadable(this.path) && !Files.isDirectory(this.path));\n\t}",
"boolean safeIsFile(FsPath path);",... | [
"0.8144316",
"0.73208386",
"0.726175",
"0.7144461",
"0.71193546",
"0.69095063",
"0.6622753",
"0.6587976",
"0.65356845",
"0.6499949",
"0.6275361",
"0.62718743",
"0.6229833",
"0.62224895",
"0.6121239",
"0.61124355",
"0.60544646",
"0.5947687",
"0.5898875",
"0.58439046",
"0.58246... | 0.757691 | 1 |
util classes are not instantiable. | private FSUtils() {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private ClassUtil() {}",
"private Util() { }",
"private Utils() {}",
"private Utils() {}",
"private Utils() {}",
"private Utils() {}",
"private Util() {\n }",
"private Util() {\n }",
"private Util() {\n }",
"private CheckUtil(){ }",
"private ClassifierUtils() {\n throw new AssertionEr... | [
"0.7767596",
"0.7562562",
"0.73429006",
"0.73429006",
"0.73429006",
"0.73429006",
"0.7232061",
"0.7227401",
"0.7227401",
"0.71900356",
"0.71669614",
"0.71026725",
"0.71026725",
"0.7058576",
"0.70440143",
"0.70408934",
"0.70036155",
"0.6974323",
"0.69449097",
"0.6924895",
"0.6... | 0.0 | -1 |
insert project commit records into db | public void insertProjectCommitRecord(int pgId, int commitNumber, StatusEnum status, Date time,
String commitStudent) {
String sql = "INSERT INTO Project_Commit_Record"
+ "(pgId, commitNumber, status, time, commitStudent) " + "VALUES(?, ?, ?, ?, ?)";
int statusId = csDb.getStatusIdByName(status.getType());
Timestamp date = new Timestamp(time.getTime());
try (Connection conn = database.getConnection();
PreparedStatement preStmt = conn.prepareStatement(sql)) {
preStmt.setInt(1, pgId);
preStmt.setInt(2, commitNumber);
preStmt.setInt(3, statusId);
preStmt.setTimestamp(4, date);
preStmt.setString(5, commitStudent);
preStmt.executeUpdate();
} catch (SQLException e) {
e.printStackTrace();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"int insert(Project record);",
"public void saveNewProject(){\n String pn = tGUI.ProjectTextField2.getText();\n String pd = tGUI.ProjectTextArea1.getText();\n String statusID = tGUI.StatusComboBox.getSelectedItem().toString();\n String customerID = tGUI.CustomerComboBox.getSelectedItem... | [
"0.72146654",
"0.7094168",
"0.70144445",
"0.6926848",
"0.67790204",
"0.6773082",
"0.6773082",
"0.66464657",
"0.66036946",
"0.6590017",
"0.65728694",
"0.6568733",
"0.65194577",
"0.64559275",
"0.6426193",
"0.6361616",
"0.63605076",
"0.63538975",
"0.63172895",
"0.63108826",
"0.6... | 0.67486304 | 7 |
get each project's CommitRecordId | public int getProjectCommitRecordId(int pgId, int commitNumber) {
String query = "SELECT id FROM Project_Commit_Record where pgId = ? and commitNumber = ?";
int id = 0;
try (Connection conn = database.getConnection();
PreparedStatement preStmt = conn.prepareStatement(query)) {
preStmt.setInt(1, pgId);
preStmt.setInt(2, commitNumber);
try (ResultSet rs = preStmt.executeQuery();) {
if (rs.next()) {
id = rs.getInt("id");
}
}
} catch (SQLException e) {
e.printStackTrace();
}
return id;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"java.lang.String getProjectId();",
"public JSONObject getProjectCommitRecord(int pgId) {\n String sql = \"SELECT * FROM Project_Commit_Record WHERE pgId=?\";\n JSONObject ob = new JSONObject();\n JSONArray array = new JSONArray();\n\n try (Connection conn = database.getConnection();\n Prepared... | [
"0.6328745",
"0.6254383",
"0.621773",
"0.61832446",
"0.617908",
"0.61773205",
"0.6140972",
"0.6058136",
"0.60124254",
"0.5963933",
"0.5963933",
"0.596177",
"0.5959005",
"0.59536254",
"0.5951656",
"0.5916576",
"0.5911144",
"0.590192",
"0.5859629",
"0.5858947",
"0.5837979",
"... | 0.6614245 | 0 |
get each project's CommitRecordStateCounts | public String getProjectCommitRecordStatus(int pgId, int commitNumber) {
String status = "";
String query = "SELECT status FROM Project_Commit_Record where pgId = ? and limit ?,1";
try (Connection conn = database.getConnection();
PreparedStatement preStmt = conn.prepareStatement(query)) {
preStmt.setInt(1, pgId);
preStmt.setInt(2, commitNumber - 1);
try (ResultSet rs = preStmt.executeQuery();) {
if (rs.next()) {
status = rs.getString("status");
}
}
} catch (SQLException e) {
e.printStackTrace();
}
return status;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void updateCommitRecordState() {\n\n List<String> lsNames = new ArrayList<>();\n lsNames = projectDb.listAllProjectNames();\n\n for (String name : lsNames) {\n\n Map<String, Integer> map = commitRecordDb.getCommitRecordStateCounts(name);\n\n int bs = 0;\n int ini = 0;\n int utf ... | [
"0.65814996",
"0.6241225",
"0.6097744",
"0.59184366",
"0.5895091",
"0.58336985",
"0.5799229",
"0.5770376",
"0.5767154",
"0.5761411",
"0.57025486",
"0.5699516",
"0.56749016",
"0.55863225",
"0.5580171",
"0.55731356",
"0.5544858",
"0.55257225",
"0.55180985",
"0.54998004",
"0.544... | 0.53387815 | 27 |
get project commit record details from the homework of a student | public JSONObject getProjectCommitRecord(int pgId) {
String sql = "SELECT * FROM Project_Commit_Record WHERE pgId=?";
JSONObject ob = new JSONObject();
JSONArray array = new JSONArray();
try (Connection conn = database.getConnection();
PreparedStatement preStmt = conn.prepareStatement(sql)) {
preStmt.setInt(1, pgId);
try (ResultSet rs = preStmt.executeQuery()) {
while (rs.next()) {
int statusId = rs.getInt("status");
StatusEnum statusEnum = csDb.getStatusNameById(statusId);
int commitNumber = rs.getInt("commitNumber");
Date commitTime = rs.getTimestamp("time");
String commitStudent = rs.getString("commitStudent");
JSONObject eachHw = new JSONObject();
eachHw.put("status", statusEnum.getType());
eachHw.put("commitNumber", commitNumber);
eachHw.put("commitTime", commitTime);
eachHw.put("commitStudent", commitStudent);
array.put(eachHw);
}
}
ob.put("commits", array);
} catch (SQLException e) {
e.printStackTrace();
}
return ob;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getCommitResult(String userName, String proName) {\n int id = userDb.getUser(userName).getId();\n return db.getCommitResultByStudentAndHw(id, proName).getStatus();\n }",
"static void getInformation(Connection conn, String student) throws SQLException {\n PreparedStatement st =\n ... | [
"0.5842958",
"0.5775506",
"0.5673293",
"0.56249005",
"0.55550134",
"0.5538632",
"0.54943043",
"0.54495794",
"0.54120827",
"0.5372536",
"0.5369169",
"0.5360321",
"0.5338959",
"0.53248256",
"0.5319145",
"0.53084385",
"0.5291998",
"0.52855915",
"0.5247838",
"0.5238008",
"0.52217... | 0.6111569 | 0 |
get last project commit record details from assigned homework of one student | public JSONObject getLastProjectCommitRecord(int pgId) {
String sql = "SELECT * from Project_Commit_Record a where (a.commitNumber = "
+ "(SELECT max(commitNumber) FROM Project_Commit_Record WHERE pgId = ?));";
JSONObject ob = new JSONObject();
JSONArray array = new JSONArray();
try (Connection conn = database.getConnection();
PreparedStatement preStmt = conn.prepareStatement(sql)) {
preStmt.setInt(1, pgId);
try (ResultSet rs = preStmt.executeQuery()) {
int statusId = rs.getInt("status");
StatusEnum statusEnum = csDb.getStatusNameById(statusId);
int commitNumber = rs.getInt("commitNumber");
Date commitTime = rs.getTimestamp("time");
String commitStudent = rs.getString("commitStudent");
JSONObject eachHw = new JSONObject();
eachHw.put("status", statusEnum.getType());
eachHw.put("commitNumber", commitNumber);
eachHw.put("commitTime", commitTime);
eachHw.put("commitStudent", commitStudent);
array.put(eachHw);
}
ob.put("commits", array);
} catch (SQLException e) {
e.printStackTrace();
}
return ob;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public JSONObject getProjectCommitRecord(int pgId) {\n String sql = \"SELECT * FROM Project_Commit_Record WHERE pgId=?\";\n JSONObject ob = new JSONObject();\n JSONArray array = new JSONArray();\n\n try (Connection conn = database.getConnection();\n PreparedStatement preStmt = conn.prepareStatem... | [
"0.60058707",
"0.58537894",
"0.57352644",
"0.57060343",
"0.5658793",
"0.56276596",
"0.5622494",
"0.5542977",
"0.5535411",
"0.55302066",
"0.5504198",
"0.54099023",
"0.53555894",
"0.5340071",
"0.5337878",
"0.53148246",
"0.53074574",
"0.5295288",
"0.52903634",
"0.52830833",
"0.5... | 0.68569964 | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.