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 |
|---|---|---|---|---|---|---|
get the connection to the repository. | static RepositoryConnection getRepositoryConnection(Repository rep)
{
RepositoryConnection connection = null;
try
{
connection = rep.getConnection();
}
catch (RepositoryException e)
{
System.err.println("Could not obtain repository connection!");
System.exit(1);
}
return connection;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Connection getConnection();",
"public Connection getConnection();",
"public Connection getConnection();",
"public static Connection getConnection() {\n return singleInstance.createConnection();\n }",
"protected Connection getConnection () {\n \t\treturn connection;\n \t}",
"public Connec... | [
"0.7181621",
"0.7181621",
"0.7181621",
"0.71435016",
"0.71433604",
"0.7118405",
"0.7118256",
"0.7110904",
"0.71028763",
"0.70975053",
"0.7078745",
"0.707132",
"0.70698684",
"0.7069265",
"0.7062081",
"0.70482665",
"0.7039683",
"0.7034913",
"0.7029802",
"0.70266116",
"0.7026611... | 0.7995688 | 0 |
get the repository from the command line args | static Repository getRepositoryFromArguments(String[] args)
{
File dataDir = new File(args[args.length - 2]);
Repository rep = new SailRepository(new NativeStore(dataDir));
try
{
rep.initialize();
}
catch (RepositoryException e)
{
System.err.println("Repository could not be initialized!");
System.exit(1);
}
return rep;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"String repoUrl();",
"ArtifactRepository getRepository();",
"String getSourceRepoUrl();",
"String getRepositoryPath();",
"String getRepositoryPath(String name);",
"Repository getRepository();",
"Git getGit();",
"public static void main(String[] args) throws IOException {\n Validate.command(args... | [
"0.6485442",
"0.62505233",
"0.6182273",
"0.60818934",
"0.6068822",
"0.59732753",
"0.5926053",
"0.58753246",
"0.58071",
"0.57600963",
"0.57600963",
"0.5728031",
"0.57191014",
"0.57138264",
"0.5703155",
"0.5690852",
"0.5654174",
"0.5621878",
"0.5534715",
"0.5516742",
"0.5474568... | 0.7906204 | 0 |
any vendorspecific rule identifiers, numbers or names that correspond to the associated CWE ID | private static Collection<? extends Rule> getRules(ObjectFactory objFactory, Value cwe, Repository repository, Value segment)
{
HashMap<String, Rule> ruleSet = new HashMap<String, CWECoverageClaimType.Claims.Claim.RuleSet.Rule>();
RepositoryConnection con = null;
try
{
con = getRepositoryConnection(repository);
String adaptorQuery = "SELECT ?descriptionText WHERE {<"+segment+"> <http://toif/contains> ?finding. ?finding <http://toif/toif:FindingHasCWEIdentifier> <" + cwe + "> . "
+ "?finding <http://toif/toif:FindingIsDescribedByWeaknessDescription> ?description . "
+ "?description <http://toif/description> ?descriptionText . }";
TupleQuery adaptorTupleQuery = con.prepareTupleQuery(QueryLanguage.SPARQL, adaptorQuery);
TupleQueryResult queryResult = adaptorTupleQuery.evaluate();
while (queryResult.hasNext())
{
BindingSet adaptorSet = queryResult.next();
Value name = adaptorSet.getValue("descriptionText");
String nameString = name.stringValue();
String[] descArray = nameString.split(":");
String ident = descArray[0];
String description = descArray[1];
if (!ruleSet.containsKey(ident))
{
Rule rule = objFactory.createCWECoverageClaimTypeClaimsClaimRuleSetRule();
ruleSet.put(ident, rule);
}
Rule rule = ruleSet.get(ident);
rule.setRuleID(ident);
rule.setRuleName(ident);
rule.setRuleComments(description);
}
queryResult.close();
}
catch (RepositoryException e)
{
e.printStackTrace();
}
catch (MalformedQueryException e)
{
e.printStackTrace();
}
catch (QueryEvaluationException e)
{
e.printStackTrace();
}
finally
{
try
{
con.close();
}
catch (RepositoryException e)
{
e.printStackTrace();
}
}
return ruleSet.values();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public CWE[] getSubstanceManufacturerName() {\r\n \tCWE[] retVal = this.getTypedField(17, new CWE[0]);\r\n \treturn retVal;\r\n }",
"public CWE[] getSubstanceTreatmentRefusalReason() {\r\n \tCWE[] retVal = this.getTypedField(18, new CWE[0]);\r\n \treturn retVal;\r\n }",
"public CWE[] getRxa18... | [
"0.54922026",
"0.5381581",
"0.5342273",
"0.5234196",
"0.51683104",
"0.5120771",
"0.5093826",
"0.5085121",
"0.48943898",
"0.48926446",
"0.4887977",
"0.4855524",
"0.48491102",
"0.48444375",
"0.48226658",
"0.48084173",
"0.48058316",
"0.48035204",
"0.4798214",
"0.47127926",
"0.46... | 0.50788754 | 8 |
make sure that the arguments are correct. | static Boolean verifyArguments(String[] args)
{
if (args.length < 2)
{
return false;
}
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static void verifyArgs()\r\n\t{\r\n\t\tif(goFile == null)\r\n\t\t{\r\n\t\t\tSystem.err.println(\"Error: you must specify an input GO file.\");\r\n\t\t\texitError();\r\n\t\t}\r\n\t\tif(annotFile == null)\r\n\t\t{\r\n\t\t\tSystem.err.println(\"Error: you must specify an input annotation file.\");\r\n\t\t\tex... | [
"0.7763227",
"0.7384891",
"0.737851",
"0.7120899",
"0.70052433",
"0.6994791",
"0.695271",
"0.6949042",
"0.6904328",
"0.6902078",
"0.6881889",
"0.6705207",
"0.6701177",
"0.66909504",
"0.6690412",
"0.6618763",
"0.66009784",
"0.65957767",
"0.658634",
"0.655554",
"0.6524972",
"... | 0.73815304 | 2 |
create a new generator | public CoverageClaimGenerator(String[] args)
{
Boolean argVerified = verifyArguments(args);
if (!argVerified)
{
System.err.println("Incorrect arguments!");
System.exit(1);
}
Repository repository = getRepositoryFromArguments(args);
File outputFile = getOutputFileFromArguments(args);
JAXBContext jc = getJaxContext();
CWECoverageClaims claims = parseRepository(jc, repository);
// write to TSV or marshall to XML.
if (isWriteToTSV(args))
{
writeToTSV(claims, outputFile);
}
else
{
marshalClaims(jc, claims, outputFile);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Generator(){}",
"public JsonGenerator createGenerator(OutputStream out)\n/* */ throws IOException\n/* */ {\n/* 1110 */ return createGenerator(out, JsonEncoding.UTF8);\n/* */ }",
"<R> Streamlet<R> newSource(Source<R> generator);",
"public JsonGenerator createGenerator(DataOut... | [
"0.8179939",
"0.6956664",
"0.6955936",
"0.689254",
"0.6805566",
"0.676375",
"0.6743937",
"0.6743937",
"0.6743937",
"0.6743937",
"0.6743937",
"0.66645974",
"0.6650516",
"0.65334207",
"0.64537257",
"0.64082146",
"0.6236061",
"0.6207006",
"0.61791724",
"0.61791724",
"0.6148978",... | 0.0 | -1 |
start the Coverege generator without using the main method. | public CoverageClaimGenerator(Repository rep, File out, boolean writeToTsv)
{
Repository repository = rep;
File outputFile = out;
JAXBContext jc = getJaxContext();
CWECoverageClaims claims = parseRepository(jc, repository);
// write to TSV or marshall to XML.
if (writeToTsv)
{
writeToTSV(claims, outputFile);
}
else
{
marshalClaims(jc, claims, outputFile);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static void startWork()\n {{\n String ftnTxt= null;\n FileToFtnParser parser= new FileToFtnParser( arg_ir_filename );\n String hashes39= \"#######################################\";\n\n while( true ) {\n\t ftnTxt= parser.parseFtn();\n\t if ( ftnTxt == null ) { break; }\n\t if ( arg_v... | [
"0.63478374",
"0.6298419",
"0.62768877",
"0.6258185",
"0.62241966",
"0.6217818",
"0.61846334",
"0.6178923",
"0.61637545",
"0.6153327",
"0.6139662",
"0.61139095",
"0.61065733",
"0.60762954",
"0.60707057",
"0.6038172",
"0.6036398",
"0.6036398",
"0.6032881",
"0.6028208",
"0.6020... | 0.0 | -1 |
claims are groups of claim. a claim is essentially a cwe. | private Collection<Claim> createClaims(ObjectFactory objFactory, Value segment, Repository repository)
{
HashMap<String, Claim> claims = new HashMap<String, CWECoverageClaimType.Claims.Claim>();
RepositoryConnection con = null;
try
{
con = getRepositoryConnection(repository);
String adaptorQuery = "SELECT ?cwe ?cweName WHERE { " + "<" + segment + "> <http://toif/contains> ?cwe ."
+ "?cwe <http://toif/type> \"toif:CWEIdentifier\" . " + "?cwe <http://toif/name> ?cweName . }";
TupleQuery adaptorTupleQuery = con.prepareTupleQuery(QueryLanguage.SPARQL, adaptorQuery);
TupleQueryResult queryResult = adaptorTupleQuery.evaluate();
while (queryResult.hasNext())
{
BindingSet adaptorSet = queryResult.next();
Value name = adaptorSet.getValue("cweName");
Value cwe = adaptorSet.getValue("cwe");
String cweIdString = name.stringValue();
if (!claims.containsKey(cweIdString))
{
Claim claim = objFactory.createCWECoverageClaimTypeClaimsClaim();
String cweId = cweIdString.replace("CWE-", "");
claim.setCWEID(cweId);
// use this to set any additional comments.
claim.setCWEClaimComments("");
String cweName = getCweName(cweId);
claim.setCWEName(cweName);
claim.setMatchAccuracy(MatchAccuracyType.UNKNOWN);
claims.put(cweIdString, claim);
}
Claim claim = claims.get(cweIdString);
RuleSet ruleSet = objFactory.createCWECoverageClaimTypeClaimsClaimRuleSet();
ruleSet.getRule().addAll(getRules(objFactory, cwe, repository,segment));
claim.setRuleSet(ruleSet);
}
queryResult.close();
}
catch (RepositoryException e)
{
e.printStackTrace();
}
catch (MalformedQueryException e)
{
e.printStackTrace();
}
catch (QueryEvaluationException e)
{
e.printStackTrace();
}
finally
{
try
{
con.close();
}
catch (RepositoryException e)
{
e.printStackTrace();
}
}
return claims.values();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void claim(@Nonnull Client client, @Nonnull List<Set<TCSResource<?>>> claim);",
"abstract public Claim getClaim();",
"List<Claim> getClaims(User user, List<String> claimURIs) throws ClaimManagerException;",
"List<Claim> getClaims(User user) throws ClaimManagerException;",
"public ClaimProfile(UUID uuid, in... | [
"0.65361905",
"0.63849056",
"0.61842877",
"0.61618274",
"0.60836154",
"0.592658",
"0.59197074",
"0.5914341",
"0.58997416",
"0.58929455",
"0.5891096",
"0.58799773",
"0.5780809",
"0.57653517",
"0.57637626",
"0.5708986",
"0.56496704",
"0.5639462",
"0.55831516",
"0.55831516",
"0.... | 0.6627231 | 0 |
coverage claim are a group of claims from a tool | private List<CWECoverageClaimType> createCoverageClaims(ObjectFactory objFactory, Repository repository)
{
List<CWECoverageClaimType> results = new ArrayList<CWECoverageClaimType>();
RepositoryConnection con = null;
try
{
con = getRepositoryConnection(repository);
String adaptorQuery = "SELECT ?generatorName ?segment ?version WHERE { ?y <http://toif/path> ?x . ?segment <http://toif/contains> ?y . ?segment <http://toif/toif:TOIFSegmentIsGeneratedByGenerator> ?generator . "
+ "?generator <http://toif/name> ?generatorName . " + "?generator <http://toif/version> ?version}";
TupleQuery adaptorTupleQuery = con.prepareTupleQuery(QueryLanguage.SPARQL, adaptorQuery);
TupleQueryResult queryResult = adaptorTupleQuery.evaluate();
while (queryResult.hasNext())
{
BindingSet adaptorSet = queryResult.next();
Value generatorName = adaptorSet.getValue("generatorName");
Value segment = adaptorSet.getValue("segment");
Value version = adaptorSet.getValue("version");
if (generatorNames.contains(generatorName.stringValue()))
{
continue;
}
else
{
generatorNames.add(generatorName.stringValue());
}
CWECoverageClaimType coverageClaim = objFactory.createCWECoverageClaimType();
coverageClaim.setVendorName("KDM Analytics Inc");
coverageClaim.setToolsetName(generatorName.stringValue());
coverageClaim.setToolsetVersion(version.stringValue());
String fileName = getAFileFromSegment(segment, repository);
String langType = getLanguageType(fileName);
coverageClaim.setLanguageType(langType);
String lang = getLanguage(fileName);
coverageClaim.setLanguage(lang);
XMLGregorianCalendar date = getDate(segment, repository);
coverageClaim.setDateOfClaim(date);
Claims claims = objFactory.createCWECoverageClaimTypeClaims();
Collection<Claim> claimList = createClaims(objFactory, segment, repository);
claims.getClaim().addAll(claimList);
coverageClaim.setClaims(claims);
results.add(coverageClaim);
}
queryResult.close();
}
catch (RepositoryException e)
{
e.printStackTrace();
}
catch (MalformedQueryException e)
{
e.printStackTrace();
}
catch (QueryEvaluationException e)
{
e.printStackTrace();
}
finally
{
try
{
con.close();
}
catch (RepositoryException e)
{
e.printStackTrace();
}
}
return results;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private Collection<Claim> createClaims(ObjectFactory objFactory, Value segment, Repository repository)\n {\n HashMap<String, Claim> claims = new HashMap<String, CWECoverageClaimType.Claims.Claim>();\n \n RepositoryConnection con = null;\n \n try\n {\n ... | [
"0.63075453",
"0.6052671",
"0.5983158",
"0.5860245",
"0.5636831",
"0.56073886",
"0.55368125",
"0.54418",
"0.5440337",
"0.53840077",
"0.5380552",
"0.5311945",
"0.5301702",
"0.5244962",
"0.5241913",
"0.522543",
"0.5209594",
"0.5173085",
"0.5128876",
"0.5085064",
"0.5077184",
... | 0.6641973 | 0 |
find a file in the segment. | private String getAFileFromSegment(Value segment, Repository repository)
{
RepositoryConnection con = null;
try
{
con = getRepositoryConnection(repository);
String adaptorQuery = "SELECT ?fileName WHERE { <" + segment + "> <http://toif/contains> ?file . "
+ "?file <http://toif/type> \"toif:File\" ." + "?file <http://toif/name> ?fileName . }";
TupleQuery adaptorTupleQuery = con.prepareTupleQuery(QueryLanguage.SPARQL, adaptorQuery);
TupleQueryResult queryResult = adaptorTupleQuery.evaluate();
while (queryResult.hasNext())
{
BindingSet adaptorSet = queryResult.next();
Value name = adaptorSet.getValue("fileName");
return name.stringValue();
}
queryResult.close();
}
catch (RepositoryException e)
{
e.printStackTrace();
}
catch (MalformedQueryException e)
{
e.printStackTrace();
}
catch (QueryEvaluationException e)
{
e.printStackTrace();
}
finally
{
try
{
con.close();
}
catch (RepositoryException e)
{
e.printStackTrace();
}
}
return null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void searchFile() \n\t{\n\t\t//Variable Declaration\n\t\tString fileName;\n\t\tScanner obj = new Scanner(System.in);\n\n\t\t//Read file name from user\n\t\tSystem.out.println(\"Enter file name to searched:\");\n\t\tfileName= obj.nextLine();\n\t\t\n\t\t//Searching the file\n\t\tboolean isFound = FileM... | [
"0.6466285",
"0.6406584",
"0.6406414",
"0.6287751",
"0.6205397",
"0.6200756",
"0.61549526",
"0.60770077",
"0.60404694",
"0.595283",
"0.5907487",
"0.5852436",
"0.5850242",
"0.58445126",
"0.58304673",
"0.574886",
"0.57480454",
"0.5712921",
"0.5691013",
"0.5639829",
"0.56017977"... | 0.66049 | 0 |
get the cwe name from the id. | private String getCweName(String cweId)
{
CweToName cweToNameUtil = new CweToName();
return cweToNameUtil.getCweName(cweId);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic String getNameById(int id) {\n\t\treturn null;\r\n\t}",
"public static String getCategoryNameById(int id) {\n\n String categoryName = \"\";\n try {\n Category category = Category.find(Category.class, \"category_id=\" + id, null).get(0);\n categoryName = c... | [
"0.67194957",
"0.66366017",
"0.6625485",
"0.6587398",
"0.65795314",
"0.655845",
"0.65311986",
"0.6511815",
"0.65084606",
"0.6504679",
"0.6448211",
"0.64034843",
"0.62811494",
"0.62679887",
"0.6213616",
"0.61823505",
"0.6148592",
"0.61348325",
"0.61286837",
"0.6123563",
"0.611... | 0.84196615 | 0 |
get the date from the segment. | private XMLGregorianCalendar getDate(Value segment, Repository repository)
{
RepositoryConnection con = null;
try
{
con = getRepositoryConnection(repository);
String adaptorQuery = "SELECT ?dateValue WHERE { <" + segment + "> <http://toif/contains> ?date . "
+ "?date <http://toif/date> ?dateValue . }";
TupleQuery adaptorTupleQuery = con.prepareTupleQuery(QueryLanguage.SPARQL, adaptorQuery);
TupleQueryResult queryResult = adaptorTupleQuery.evaluate();
while (queryResult.hasNext())
{
BindingSet adaptorSet = queryResult.next();
Value dateValue = adaptorSet.getValue("dateValue");
try
{
GregorianCalendar gregorianCalendar = new GregorianCalendar();
DateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
Date date = formatter.parse(dateValue.stringValue());
gregorianCalendar.setTime(date);
XMLGregorianCalendar xmlGrogerianCalendar = DatatypeFactory.newInstance().newXMLGregorianCalendar(gregorianCalendar);
xmlGrogerianCalendar.setTimezone(DatatypeConstants.FIELD_UNDEFINED);
xmlGrogerianCalendar.setTime(DatatypeConstants.FIELD_UNDEFINED, DatatypeConstants.FIELD_UNDEFINED,
DatatypeConstants.FIELD_UNDEFINED);
return xmlGrogerianCalendar;
}
catch (DatatypeConfigurationException e)
{
e.printStackTrace();
}
catch (ParseException e)
{
e.printStackTrace();
}
}
queryResult.close();
}
catch (RepositoryException e)
{
e.printStackTrace();
}
catch (MalformedQueryException e)
{
e.printStackTrace();
}
catch (QueryEvaluationException e)
{
e.printStackTrace();
}
finally
{
try
{
con.close();
}
catch (RepositoryException e)
{
e.printStackTrace();
}
}
return null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"java.lang.String getFoundingDate();",
"String getStartDate();",
"Date getForDate();",
"java.lang.String getStartDate();",
"java.lang.String getStartDateYYYYMMDD();",
"java.lang.String getDate();",
"java.lang.String getFromDate();",
"public String getStartDate();",
"public String Get_date() \n {\... | [
"0.65748036",
"0.6297591",
"0.62447244",
"0.6185037",
"0.6167488",
"0.61418796",
"0.611204",
"0.602633",
"0.602136",
"0.5999464",
"0.5999464",
"0.59776646",
"0.5776049",
"0.57537824",
"0.5735496",
"0.5732288",
"0.5723431",
"0.5723431",
"0.5715326",
"0.5706786",
"0.5706786",
... | 0.64166296 | 1 |
get the jaxb context. | private JAXBContext getJaxContext()
{
JAXBContext jc = null;
try
{
jc = JAXBContext.newInstance("generated");
}
catch (JAXBException e)
{
e.printStackTrace();
}
return jc;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static JAXBContext getJAXBContext() throws JAXBException {\n synchronized (ContextUtils.class) {\n if (jaxbContext == null) {\n jaxbContext =\n JAXBContext.newInstance(\n WSA_OBJECT_FACTORY.getClass().getPackage().getName(),\n ... | [
"0.6937305",
"0.6232406",
"0.62176365",
"0.6213759",
"0.61980563",
"0.61816084",
"0.6152848",
"0.614538",
"0.61259156",
"0.61088026",
"0.604524",
"0.6030699",
"0.6021695",
"0.60210645",
"0.60080403",
"0.59891206",
"0.5971805",
"0.59565973",
"0.5927131",
"0.5896035",
"0.589603... | 0.78603876 | 0 |
get the language of the file. | private String getLanguage(String fileName)
{
if (fileName.endsWith(".C"))
{
return "C";
}
else if (fileName.endsWith(".Java"))
{
return "Java";
}
else if (fileName.endsWith(".CPP"))
{
return "C++";
}
else if (fileName.endsWith(".Class"))
{
return "Java";
}
if (fileName.endsWith(".c"))
{
return "C";
}
else if (fileName.endsWith(".java"))
{
return "Java";
}
else if (fileName.endsWith(".cpp"))
{
return "C++";
}
else if (fileName.endsWith(".class"))
{
return "Java";
}
else if (fileName.endsWith(".h"))
{
return "C";
}
else
{
return "??";
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"java.lang.String getLanguage();",
"java.lang.String getLanguage();",
"String getLanguage();",
"String getLanguage();",
"String getLanguage();",
"String getLang();",
"public String getLanguage();",
"CLanguage getClanguage();",
"public static String getLanguage() {\n return language;\n }",
... | [
"0.7935561",
"0.7935561",
"0.788361",
"0.788361",
"0.788361",
"0.77878374",
"0.7608929",
"0.74419993",
"0.7274346",
"0.72341526",
"0.72128403",
"0.72128403",
"0.7051667",
"0.7028772",
"0.7028772",
"0.7003951",
"0.7002658",
"0.6965782",
"0.69585204",
"0.695793",
"0.69407684",
... | 0.7879123 | 5 |
get the language type from the file name. | private String getLanguageType(String fileName)
{
if (fileName.endsWith(".c"))
{
return "Source Code";
}
else if (fileName.endsWith(".java"))
{
return "Source Code";
}
else if (fileName.endsWith(".cpp"))
{
return "Source Code";
}
else if (fileName.endsWith(".class"))
{
return "Byte Code";
}
if (fileName.endsWith(".C"))
{
return "Source Code";
}
else if (fileName.endsWith(".Java"))
{
return "Source Code";
}
else if (fileName.endsWith(".CPP"))
{
return "Source Code";
}
else if (fileName.endsWith(".Class"))
{
return "Byte Code";
}
else if (fileName.endsWith(".h"))
{
return "Source Code";
}
else
{
return "??";
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static String getFileType(String fileName) {\n String[] fileNames = fileName.split(\"\\\\.\");\n\n if (\"cs\".equals(fileNames[fileNames.length - 1])) {\n return LanguageManager.LANGUAGE_CSHARP;\n } else if (\"java\".equals(fileNames[fileNames.length - 1])) {\n ret... | [
"0.7585963",
"0.72435427",
"0.6808925",
"0.6409781",
"0.6319054",
"0.61193585",
"0.61000884",
"0.60604763",
"0.60222536",
"0.60222536",
"0.5978989",
"0.5951595",
"0.58769447",
"0.5873169",
"0.58710426",
"0.58505255",
"0.5787321",
"0.57871175",
"0.57793605",
"0.577781",
"0.577... | 0.8004402 | 0 |
are we writing to tsv? | private boolean isWriteToTSV(String[] args)
{
if (args[0].equals("-tsv"))
{
return true;
}
else
{
return false;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String createTSV() throws IOException {\n\t\tStringBuilder sb = null;\n\t\tif (recordList != null) {\n\t\t\tsb = new StringBuilder();\n\t\t\tCSVPrinter csvPrinter = new CSVPrinter(sb, CSVFormat.TDF);\n\t\t\tfor (CSVRecord record : recordList) {\n\t\t\t\ttry {\n\t\t\t\t\tcsvPrinter.printRecord(record);\n\t\t... | [
"0.6396511",
"0.599165",
"0.59412354",
"0.58358043",
"0.576932",
"0.56298137",
"0.55495715",
"0.5445287",
"0.54242206",
"0.5412757",
"0.539054",
"0.53866315",
"0.5374447",
"0.5371297",
"0.5361428",
"0.53199476",
"0.5294256",
"0.52899855",
"0.5275128",
"0.5228954",
"0.5228108"... | 0.8024061 | 0 |
marshall the claims to the output. | private void marshalClaims(JAXBContext jc, CWECoverageClaims claims, File outputFile)
{
try
{
Marshaller m = jc.createMarshaller();
m.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE);
m.marshal(claims, outputFile);
}
catch (JAXBException e)
{
e.printStackTrace();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void marshall() {\n\t\t\n\t\ttry {\n\t\t\tFile file = new File(IKATS_IMPORT_SESSIONS_FILE);\n\t\t\t\n\t\t\tClass<?>[] classes = new Class[]{IngestionModel.class, ImportStatus.class};\n\t\t\t\n\t\t\tJAXBContext jaxbContext = JAXBContext.newInstance(classes);\n\t\t\tMarshaller jaxbMarshaller = jaxbContext.cr... | [
"0.51403403",
"0.48704323",
"0.4789875",
"0.47350097",
"0.47321802",
"0.47266147",
"0.45433143",
"0.45275733",
"0.44872165",
"0.44812942",
"0.44728684",
"0.443227",
"0.4379865",
"0.42938262",
"0.4277103",
"0.42740184",
"0.42704156",
"0.42588356",
"0.4255594",
"0.42369476",
"0... | 0.6869623 | 0 |
write each individual claim. | private void writeIndividualClaimsToWriter(FileWriter writer, CWECoverageClaimType cweCoverageClaimType) throws IOException
{
List<Claim> individualClaims = cweCoverageClaimType.getClaims().getClaim();
for (Claim claim : individualClaims)
{
writer.append("\tCWE ID: " + claim.getCWEID());
writer.append("\n");
writer.append("\tCWE Name: " + claim.getCWEName());
writer.append("\n");
writer.append("\tMatch Accuracy: " + claim.getMatchAccuracy());
writer.append("\n");
writeRuleSetDetailToTSV(writer, claim);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void claim(@Nonnull Client client, @Nonnull List<Set<TCSResource<?>>> claim);",
"private void writeOverallCoverageClaimsToWriter(FileWriter writer, List<CWECoverageClaimType> overallClaims) throws IOException\n {\n for (CWECoverageClaimType cweCoverageClaimType : overallClaims)\n {\n ... | [
"0.61102754",
"0.5853761",
"0.56236213",
"0.5612279",
"0.53572106",
"0.53082824",
"0.5240449",
"0.5172984",
"0.5128964",
"0.5102217",
"0.506944",
"0.504196",
"0.49998492",
"0.49936736",
"0.4971159",
"0.4955201",
"0.49118197",
"0.49065813",
"0.4903049",
"0.4890594",
"0.4872562... | 0.639012 | 0 |
write the cwecoverageclaim to output | private void writeOverallCoverageClaimsToWriter(FileWriter writer, List<CWECoverageClaimType> overallClaims) throws IOException
{
for (CWECoverageClaimType cweCoverageClaimType : overallClaims)
{
writer.append("CWE Version: " + cweCoverageClaimType.getCWEVersion());
writer.append('\n');
writer.append("Vendor Name: " + cweCoverageClaimType.getVendorName());
writer.append('\n');
writer.append("Toolset Name: " + cweCoverageClaimType.getToolsetName());
writer.append('\n');
writer.append("Toolset Version: " + cweCoverageClaimType.getToolsetVersion());
writer.append('\n');
writer.append("Claim Date: " + cweCoverageClaimType.getDateOfClaim());
writer.append('\n');
writer.append("Language Type: " + cweCoverageClaimType.getLanguageType());
writer.append('\n');
writer.append("Language: " + cweCoverageClaimType.getLanguage());
writer.append('\n');
writeIndividualClaimsToWriter(writer, cweCoverageClaimType);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void marshalClaims(JAXBContext jc, CWECoverageClaims claims, File outputFile)\n {\n \n try\n {\n Marshaller m = jc.createMarshaller();\n m.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE);\n m.marshal(claims, outputFile);\n ... | [
"0.6373031",
"0.6264276",
"0.5876325",
"0.57477695",
"0.57347906",
"0.56647927",
"0.5646742",
"0.56304765",
"0.5472637",
"0.5448126",
"0.5446334",
"0.54230833",
"0.5388423",
"0.53626543",
"0.5357959",
"0.53523135",
"0.53104275",
"0.52911055",
"0.5262405",
"0.5251801",
"0.5247... | 0.5651442 | 6 |
write the rule set to file | private void writeRuleSetDetailToTSV(FileWriter writer, Claim claim) throws IOException
{
List<Rule> rules = claim.getRuleSet().getRule();
for (Rule rule : rules)
{
writer.append("\t\tRule ID: " + rule.getRuleID());
writer.append("\n");
writer.append("\t\tRule Name: " + rule.getRuleName());
writer.append("\n");
writer.append("\t\tRule Comments: " + rule.getRuleComments());
writer.append("\n");
writer.append("\n\n");
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static void exportRules(GraknClient.Session session, Path schemaRoot) throws IOException {\n File outputFile = schemaRoot.resolve(\"rule\").toFile();\n Writer writer = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(outputFile), StandardCharsets.UTF_8));\n GraknClient.Tr... | [
"0.6663421",
"0.656684",
"0.6260836",
"0.6158263",
"0.61265355",
"0.59300554",
"0.5881594",
"0.5865662",
"0.5853713",
"0.581246",
"0.5775997",
"0.57479316",
"0.5662103",
"0.56246805",
"0.56223303",
"0.5557082",
"0.5553884",
"0.5548342",
"0.5547103",
"0.5537027",
"0.55230796",... | 0.6289868 | 2 |
Creates new form MenuPanel | public MenuPanel() {
initComponents();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void createMenu(){\n\n JMenuBar mbar = new JMenuBar();\n setJMenuBar(mbar);\n JMenu Opcje = new JMenu(\"Opcje\");\n mbar.add(Opcje);\n JMenuItem Ustawienia = new JMenuItem(\"Ustawienia\");\n /** Obsluga zdarzen wcisniecia przycisku... | [
"0.7370384",
"0.73429173",
"0.73061526",
"0.7205976",
"0.71882296",
"0.71172357",
"0.7080223",
"0.70798665",
"0.69970006",
"0.69961697",
"0.69487363",
"0.69313973",
"0.69134974",
"0.68692404",
"0.68655807",
"0.68361306",
"0.67865944",
"0.67837834",
"0.6754885",
"0.6741143",
"... | 0.7203778 | 4 |
TODO Autogenerated method stub | @Override
public void run() {
while (true) {
generateVisitors();
try {
Thread.sleep(1000);
} catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
generateOutVisitors();
try {
Thread.sleep(1000);
} catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
} | {
"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 |
This method has been deprecated, please use method buildClientConfig instead. | @java.lang.Deprecated
public io.kubernetes.client.openapi.models.ApiextensionsV1WebhookClientConfig getClientConfig(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public nl.tudelft.ewi.st.atlantis.tudelft.v1.services.GetClientConfigResponse getClientConfig\n (\n nl.tudelft.ewi.st.atlantis.tudelft.v1.services.GetClientConfigRequest getClientConfigRequest\n )\n ;",
"private static TypedProperties getClientConfig() t... | [
"0.62959814",
"0.6212021",
"0.6189157",
"0.61493534",
"0.60919756",
"0.6057217",
"0.58759403",
"0.5802331",
"0.57951844",
"0.57190573",
"0.5681492",
"0.56366885",
"0.55822647",
"0.55583435",
"0.5498932",
"0.54976404",
"0.5439457",
"0.5379664",
"0.53705674",
"0.53444546",
"0.5... | 0.61097115 | 4 |
selects the item //TODO needs more generic method including entities | void selectBlock(byte pos) {
if (pos <= getChildren().size) {
selected = pos;
for (Actor c : getChildren()) {
c.setScale(0.35f);
}
getChildren().get(selected).setScale(0.4f);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void select(T item) {\n getElement().select(SerDes.mirror(item));\n }",
"TCar selectByPrimaryKey(Integer fitemid);",
"Identifiable item();",
"Sequipment selectByPrimaryKey(Integer id);",
"HpItemParamItem selectByPrimaryKey(Long id);",
"public abstract EntitySelect<T> getEntitySelect();",... | [
"0.71193355",
"0.6743797",
"0.67321956",
"0.66610324",
"0.66470784",
"0.66239715",
"0.65669036",
"0.64419115",
"0.63793683",
"0.63395137",
"0.63374484",
"0.6296484",
"0.6289655",
"0.6289655",
"0.6268922",
"0.62477136",
"0.62052476",
"0.61824584",
"0.6180563",
"0.61762714",
"0... | 0.0 | -1 |
Trys returning a new instance of a selected entity class. | public AbstractEntity getEntity() {
if (entityClass == null) {
return null;
}
try {
AbstractEntity ent = entityClass.newInstance();
if (value > -1) {
ent.setSpriteValue(value);
}
return ent;
} catch (InstantiationException | IllegalAccessException ex) {
Logger.getLogger(CursorInfo.class.getName()).log(Level.SEVERE, null, ex);
}
return null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Entity newEntity() { return newMyEntity(); }",
"public Entity newEntity() { return newMyEntity(); }",
"Class<?> getEntityClass();",
"protected abstract Class<T> getEntityClass();",
"protected abstract Class<T> getEntityClass();",
"public static <RN extends GenRn, E extends Entity> RN newInstance(C... | [
"0.6905257",
"0.6905257",
"0.66160315",
"0.6524186",
"0.6524186",
"0.64977396",
"0.63872606",
"0.6374398",
"0.6292116",
"0.62598795",
"0.6242405",
"0.62294334",
"0.61916083",
"0.61828834",
"0.61736596",
"0.6129052",
"0.6093898",
"0.60445184",
"0.60206354",
"0.6000833",
"0.599... | 0.59870976 | 23 |
Sets the current color to this entity class. | public void setEntity(String name, Class<? extends AbstractEntity> entclass) {
entityClass = entclass;
//label.setText(name);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setColor(Color color) {\n this.color = color;\n }",
"public void setColor(Color c) { color.set(c); }",
"public void setColor(Color color);",
"public void setColor(Color newColor) ;",
"void setColor(){\n this.objectColour = new Color(rValue,gValue,bValue,timeToLive).brighter()... | [
"0.73008096",
"0.72784984",
"0.7205558",
"0.71869445",
"0.71542174",
"0.71389204",
"0.71215",
"0.70835215",
"0.7074118",
"0.7044199",
"0.7043783",
"0.7043783",
"0.7028624",
"0.7022685",
"0.7001674",
"0.69564104",
"0.69139457",
"0.6903524",
"0.68944967",
"0.6880862",
"0.688013... | 0.0 | -1 |
sets the value of the selected | void setValue(byte value) {
this.value = value;
blockDrawables.get(selected).setValue(value);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setValue(int value){\n selectedValue = value;\n currentValue.setText(String.valueOf(value));\n }",
"public void setSelectedValue(int value) {\n\t\tthis.labelValueSelected.setText(\"Select a value: \" + value);\n\t}",
"public void setSelectedItem(T value) {\n getElement().se... | [
"0.7558781",
"0.7483172",
"0.7330261",
"0.7134971",
"0.6808009",
"0.67680687",
"0.6499451",
"0.6476707",
"0.6474585",
"0.64535195",
"0.6452665",
"0.64373696",
"0.64370495",
"0.6415074",
"0.641102",
"0.641102",
"0.63957775",
"0.63868946",
"0.63825977",
"0.6353932",
"0.63365203... | 0.6114538 | 58 |
Tooltip tooltip = Tooltip.create(); tooltip.setShowColorCode(true); tooltip.setIsHtml(true); options.setTooltip(tooltip); | @Override
protected void draw(GrainMatrix grainMatrix) {
dataTable = DataTable.create();
dataTable.addColumn(ColumnType.DATETIME, "Time");
for (MetaDefinition metric : grainMatrix.getMetaDefinitions()) {
dataTable.addColumn(ColumnType.NUMBER, "Min");
addTooltipColumn(dataTable);
dataTable.addColumn(ColumnType.NUMBER, "Avg");
addTooltipColumn(dataTable);
dataTable.addColumn(ColumnType.NUMBER, "Max");
addTooltipColumn(dataTable);
dataTable.addColumn(ColumnType.NUMBER, "Count");
addTooltipColumn(dataTable);
dataTable.addColumn(ColumnType.NUMBER, "Sum");
addTooltipColumn(dataTable);
}
TreeMap<Long, HashMap<String, Datapoint>> metricMap = grainMatrix.getMetricMap();
dataTable.addRows(metricMap.size());
int i = 0;
for (long datetime : metricMap.keySet()) {
dataTable.setValue(i, 0, new Date(datetime));
i++;
}
int col = 1; // First column is reserved for Time
int row = 0;
Datapoint point;
String tooltip;
for (long datetime : metricMap.keySet()) {
HashMap<String, Datapoint> innerMap = metricMap.get(datetime);
col = 1;
for (String metricId : innerMap.keySet()) {
point = metricMap.get(datetime).get(metricId);
tooltip = new Date(point.getDatetime()).toString() + "\n" + "Min: " + point.getMin() + "\n"
+ "Avg: " + point.getAvg() + "\n" + "Max: " + point.getMax() + "\n" + "Count: "
+ point.getCount() + "\n" + "Sum: " + point.getSum() + "\n";
dataTable.setValue(row, col, point.getMin());
col++;
dataTable.setValue(row, col, tooltip);
col++;
dataTable.setValue(row, col, point.getAvg());
col++;
dataTable.setValue(row, col, tooltip);
col++;
dataTable.setValue(row, col, point.getMax());
col++;
dataTable.setValue(row, col, tooltip);
col++;
dataTable.setValue(row, col, point.getCount());
col++;
dataTable.setValue(row, col, tooltip);
col++;
dataTable.setValue(row, col, point.getSum());
col++;
dataTable.setValue(row, col, tooltip);
col++;
}
row++;
}
chart.draw(dataTable, options);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void showTooltip();",
"@Override\n public void setTooltip(String arg0)\n {\n \n }",
"public void setToolTipText(String text)\n/* */ {\n/* 227 */ putClientProperty(\"ToolTipText\", text);\n/* */ }",
"@Override\n\tpublic void setToolTip(String tooltip) {\n\t\t\n\t}",
"public v... | [
"0.71252537",
"0.7009369",
"0.6956234",
"0.69262165",
"0.6781868",
"0.66474146",
"0.66263777",
"0.6592812",
"0.6544229",
"0.652429",
"0.63441557",
"0.6304213",
"0.6303029",
"0.6278798",
"0.6175245",
"0.6174283",
"0.6158637",
"0.6140221",
"0.61332536",
"0.6114701",
"0.6108748"... | 0.0 | -1 |
princ_Control control = new princ_Control(); | public static void main(String[] args) {
EventQueue.invokeLater(new Runnable() {
public void run() {
try {
princ frame = new princ();
frame.setVisible(true);
frame.setTitle("Storyteller");
//la ventana no se puede redimensionar
frame.setResizable(false);
//falta hacer que la ventana aparezca en el centrode la pantalla
} catch (Exception e) {
e.printStackTrace();
}
}
});
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public MovimientoControl() {\n }",
"public Controller(ControlPanel p /*InformationInterface i*/)\n{\n\tsuper();\n\tmain = new PokerMain(this);\n\tcontrolP = p;\n\t//infoInterface = i;\n\n}",
"public DriverControl(){\n super(0);\n }",
"public Controls()\n {\n string = \"Controls\";\n ... | [
"0.6879121",
"0.66938466",
"0.6620136",
"0.65653735",
"0.65351915",
"0.6460127",
"0.6450362",
"0.63431364",
"0.62992895",
"0.62730557",
"0.6256516",
"0.6255283",
"0.61621064",
"0.6107448",
"0.6106118",
"0.6094733",
"0.60622156",
"0.60587555",
"0.60494304",
"0.5993284",
"0.595... | 0.0 | -1 |
pone la pantalla de registro visible y la relocaliza | public void actionPerformed(ActionEvent e) {
registro.setLocation(thisobject.getX()+100, thisobject.getY());
registro.setVisible(true);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void InsetarEstudiantes() {\n new Insertar_Estudiantes(arreglo).setVisible(true); // CONECTA LA VENTANA Y LE PASA LA REFERENCIA DEL ARREGLO A INSERTAR ESTUDIANTE\n this.hide(); // Esconde la ventana anterior,\n // this.setVisible(false); // Otra forma de Eliminar - Esconder la ventana ant... | [
"0.6530218",
"0.62711215",
"0.6152058",
"0.6139749",
"0.60524386",
"0.6031243",
"0.5985375",
"0.59049475",
"0.58663046",
"0.5823578",
"0.58120817",
"0.57542807",
"0.575296",
"0.5749843",
"0.5739875",
"0.5737374",
"0.5722926",
"0.57075524",
"0.57044107",
"0.5697306",
"0.568598... | 0.0 | -1 |
Called just after the player places a block. Sets the TileEntity's colour | @Override
public void onBlockPlacedBy(World worldIn, BlockPos pos, IBlockState state, EntityLivingBase placer, ItemStack stack) {
super.onBlockPlacedBy(worldIn, pos, state, placer, stack);
TileEntity tileentity = worldIn.getTileEntity(pos);
if (tileentity instanceof TileEntityGemOfLight) { // prevent a crash if not the right type, or is null
TileEntityGemOfLight tileEntityMBE21 = (TileEntityGemOfLight)tileentity;
// chose a random colour for the gem:
//Color [] colorChoices = {Color.BLUE, Color.CYAN, Color.YELLOW, Color.GREEN, Color.WHITE, Color.ORANGE, Color.RED};
//Random random = new Random();
//Color gemColor = colorChoices[random.nextInt(colorChoices.length)];
tileEntityMBE21.setGemColour(Color.RED);//gemColor);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setBlockColor(Color color) {\n rectangle.setFill(color);\n int a = 0;\n }",
"private void assignTileColor() {\n boolean isLightTile = ((tileCoordinate + tileCoordinate / 8) % 2 == 0);\n setBackground(isLightTile ? LIGHT_TILE_COLOR : DARK_TILE_COLOR);\n }"... | [
"0.6059317",
"0.59501916",
"0.59036297",
"0.5752598",
"0.570845",
"0.5687683",
"0.5674385",
"0.5665185",
"0.5605197",
"0.5604928",
"0.55962884",
"0.55675304",
"0.5537332",
"0.55306816",
"0.55190176",
"0.55179685",
"0.5497137",
"0.54901844",
"0.54800767",
"0.5473092",
"0.54503... | 0.6533946 | 0 |
The following methods aren't particularly relevant to this example. See MBE01, MBE02, MBE03 for more information. | @SideOnly(Side.CLIENT)
public EnumWorldBlockLayer getBlockLayer()
{
return EnumWorldBlockLayer.CUTOUT_MIPPED;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void mo115190b() {\n }",
"public final void mo1285b() {\n }",
"public void mo5251b() {\n }",
"private void m50366E() {\n }",
"public void mo21825b() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"pu... | [
"0.61750185",
"0.6136035",
"0.60773724",
"0.60055864",
"0.5980768",
"0.5959048",
"0.5959048",
"0.5959048",
"0.5959048",
"0.5959048",
"0.5959048",
"0.5959048",
"0.5927681",
"0.59261006",
"0.59118426",
"0.59076923",
"0.59018",
"0.58930516",
"0.5886129",
"0.58668745",
"0.5864431... | 0.0 | -1 |
String fileName = data.getData().getLastPathSegment(); | @Override
public void onReceive(Context context, Intent intent) {
Uri fileUri = intent.getData();
String packageName = intent.getData().getSchemeSpecificPart();
String action = intent.getAction();
if(action.equals(Intent.ACTION_PACKAGE_ADDED)) {
Log.d(TAG, "Package ADDED : " + packageName);
Log.d(TAG, "Package URI(?) : " + fileUri);
// Intent intentOfPackageName = new Intent(context, MainActivity.class);
// intentOfPackageName.putExtra("packageName", packageName);
appHash = getSha256FromApk(context, packageName);
Log.d(TAG, "App Hash Result (SHA-256) : " + appHash);
} else if(action.equals(Intent.ACTION_PACKAGE_REMOVED)) {
Log.d(TAG, "Package REMOVED : " + packageName);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private String getFileName(String url) {\n // get the begin and end index of name which will be between the\n //last \"/\" and \".\"\n int beginIndex = url.lastIndexOf(\"/\")+1;\n int endIndex = url.lastIndexOf(\".\");\n return url.substring(beginIndex, endIndex);\n \n }",
"public String getFi... | [
"0.68263227",
"0.67658556",
"0.67631674",
"0.67631674",
"0.67631674",
"0.67631674",
"0.67631674",
"0.6757339",
"0.6721777",
"0.6711423",
"0.67041403",
"0.6682642",
"0.6664706",
"0.6664706",
"0.6664706",
"0.6664706",
"0.6664706",
"0.6664706",
"0.6664706",
"0.6664706",
"0.66647... | 0.0 | -1 |
HBox order all child panes horizontal | @SuppressWarnings("unchecked")
public static HBox startRecipeSearch(BorderPane mainWindow)
{
HBox hBox = new HBox();
// SearchBar is the first Pane on the left side of the recipeSearch, RecipeDroppingPanes will follow on the right
Pane searchBar = new Pane();
Label lblSearch = new Label("Suche nach: (mit \", \" trennen)");
lblSearch.setMinWidth(300);
lblSearch.setAlignment(Pos.CENTER);
Button btnStartSearch = new Button("Suche starten");
btnStartSearch.setMinWidth(305);
TextField txfSearch= new TextField();
txfSearch.setMinWidth(308);
// Table to show the found recipes with their ingredients
TableView<Recipes> tbvRecipes = new TableView<>();
TableColumn<Recipes, String> tbcRecipes = new TableColumn<Recipes, String>("Cocktails");
tbcRecipes.setMinWidth(150);
tbcRecipes.setResizable(false);
tbcRecipes.getStyleClass().add("tableColumnRecipes");
tbcRecipes.setStyle("-fx-border-width:2px;-fx-border-color:black;-fx-border-style:hidden dotted solid hidden;");
TableColumn<Recipes, String> tbcIngredients = new TableColumn<Recipes, String>("Zutaten");
tbcIngredients.setMinWidth(150);
tbcIngredients.setResizable(false);
tbcIngredients.setSortable(false);
tbcIngredients.getStyleClass().add("tableColumnRecipes");
tbcIngredients.setStyle("-fx-border-width:2px;fx-border-color:black;-fx-border-style:hidden hidden solid hidden;");
tbvRecipes.getColumns().addAll(tbcRecipes, tbcIngredients);
tbvRecipes.setPlaceholder(new Label("Suche nach einem Rezeptname oder Zutaten."));
tbvRecipes.setMinHeight(mainWindow.getHeight()-420);
tbvRecipes.setMaxHeight(mainWindow.getHeight()-420);
tbvRecipes.setId("tableViewRecipes");
tbvRecipes.setStyle("-fx-border-width:2px;-fx-border-color:black;");
tbvRecipes.setMinWidth(300);
searchBar.getChildren().addAll(lblSearch, btnStartSearch, txfSearch, tbvRecipes);
searchBar.setMinWidth(310);
hBox.getChildren().add(searchBar);
hBox.setPadding(new Insets(10));
hBox.setMinHeight(mainWindow.getHeight()-300);
hBox.setMaxHeight(mainWindow.getHeight()-300);
hBox.setSpacing(10);
// EventHandler that reacts if recipes start dragging from the tableview
tbvRecipes.setOnDragDetected(event ->
{
if(!tbvRecipes.getSelectionModel().isEmpty())
{
String tmp = tbvRecipes.getSelectionModel().getSelectedItem().toString();
Dragboard db = tbvRecipes.startDragAndDrop(TransferMode.MOVE);
ClipboardContent content = new ClipboardContent();
content.putString(tmp);
db.setContent(content);
}
event.consume();
});
// EventHandler that reacts if recipes are draggedOver the recipe panes to enable droppable
EventHandler<DragEvent> dragOver = new EventHandler<DragEvent>()
{
@Override
public void handle(DragEvent event)
{
event.acceptTransferModes(TransferMode.COPY_OR_MOVE);
event.consume();
}
};
// EventHandler that reacts if recipes are dropped on the recipe panes
EventHandler<DragEvent> dragDropped = new EventHandler<DragEvent>()
{
@Override
public void handle(DragEvent event)
{
Dragboard db = event.getDragboard();
Recipes recipe = null;
if(recipeArrayList != null && db.getString() != "")
for (int i = 0; i < recipeArrayList.size(); i++)
if(recipeArrayList.get(i).getRecipeName().equals(db.getString()))
{
recipe = recipeArrayList.get(i);
break;
}
if(recipe != null) //TODO doesn't work
{
// Writing content in labels and set them visible
((Label) ((Pane) event.getSource()).getChildren().get(0)).setText(recipe.getRecipeName());
((Label) ((Pane) event.getSource()).getChildren().get(2)).setText(recipe.getIngredient());
((Label) ((Pane) event.getSource()).getChildren().get(3)).setText(recipe.getAmount());
((Label) ((Pane) event.getSource()).getChildren().get(5)).setText(recipe.getDescription());
((Label) ((Pane) event.getSource()).getChildren().get(1)).setVisible(true);
((Label) ((Pane) event.getSource()).getChildren().get(2)).setVisible(true);
((Label) ((Pane) event.getSource()).getChildren().get(3)).setVisible(true);
((Label) ((Pane) event.getSource()).getChildren().get(4)).setVisible(true);
((Label) ((Pane) event.getSource()).getChildren().get(5)).setVisible(true);
}
event.setDropCompleted(true);
event.consume();
}
};
// Number of Panes for Recipes change with the resolution width of the primary Window
int recipePanes = 3;
// if(mainWindow.getWidth() < 1801) //TODO reactive + fix
// recipePanes = 4;
// if(mainWindow.getWidth() < 1501)
// recipePanes = 3;
// if(mainWindow.getWidth() < 1201)
// recipePanes = 2;
// if(mainWindow.getWidth() < 901)
// recipePanes = 1;
// Creating Panes to Show Recipes dragged into them from the tableView
for (int i = 0; i < recipePanes; i++)
{
// Creating a pane with labels to show a formatted recipe with more information
// and disabling not needed labels first
AnchorPane recipePane = new AnchorPane();
Label lblName = new Label("Rezept hierher ziehen");
lblName.setMinWidth(300);
lblName.setAlignment(Pos.CENTER);
lblName.setFont(new Font(25));
lblName.setUnderline(true);
lblName.setStyle("-fx-text-fill:white;");
Label lblHeader1 = new Label("Zutaten:");
lblHeader1.setFont(new Font(20));
lblHeader1.setVisible(false);
lblHeader1.setUnderline(true);
lblHeader1.setStyle("-fx-text-fill:white;");
Label lblIngredients = new Label("Zutaten:");
lblIngredients.setFont(new Font(15));
lblIngredients.setAlignment(Pos.CENTER_RIGHT);
lblIngredients.setVisible(false);
lblIngredients.setStyle("-fx-text-fill:white;");
Label lblAmount = new Label();
lblAmount.setFont(new Font(15));
lblAmount.setVisible(false);
lblAmount.setStyle("-fx-text-fill:white;");
Label lblHeader2 = new Label("Beschreibung:");
lblHeader2.setFont(new Font(20));
lblHeader2.setVisible(false);
lblHeader2.setUnderline(true);
lblHeader2.setStyle("-fx-text-fill:white;");
Label lblDescription= new Label();
lblDescription.setFont(new Font(15));
lblDescription.setMaxWidth(300);
lblDescription.setWrapText(true);
lblDescription.setVisible(false);
lblDescription.setStyle("-fx-text-fill:white;");
recipePane.getChildren().addAll(lblName, lblHeader1, lblIngredients, lblAmount, lblHeader2, lblDescription);
recipePane.setMinHeight(mainWindow.getHeight()-330);
recipePane.setMaxHeight(mainWindow.getHeight()-330);
recipePane.setMinWidth(315);
recipePane.setId("recipePane");
recipePane.setOnDragOver(dragOver);
recipePane.setOnDragDropped(dragDropped);
AnchorPane.setTopAnchor(lblName, 0.0);
AnchorPane.setTopAnchor(lblHeader1, 30.0);
AnchorPane.setLeftAnchor(lblHeader1, 10.0);
AnchorPane.setTopAnchor(lblIngredients, 55.0);
AnchorPane.setRightAnchor(lblIngredients, 115.0);
AnchorPane.setLeftAnchor(lblIngredients, 10.0);
AnchorPane.setTopAnchor(lblAmount, 55.0);
AnchorPane.setLeftAnchor(lblAmount, 200.0);
AnchorPane.setTopAnchor(lblHeader2, 200.0);
AnchorPane.setLeftAnchor(lblHeader2, 10.0);
AnchorPane.setTopAnchor(lblDescription, 230.0);
AnchorPane.setLeftAnchor(lblDescription, 10.0);
hBox.getChildren().add(recipePane);
}
// Start search for recipes in database by clicking on button, keywords are read from txfIngredient
btnStartSearch.setOnAction(new EventHandler<ActionEvent>()
{
@Override
public void handle(ActionEvent event)
{
recipeArrayList = RecipeManipulation.searchRecipeByIngriedientsArray(txfSearch.getText());
// Fill the table with recipes and all information.
final ObservableList<Recipes> recipeObserver = FXCollections.observableArrayList(recipeArrayList);
tbvRecipes.setItems(recipeObserver);
tbcRecipes.setCellValueFactory(new PropertyValueFactory<>("recipeName"));
tbcIngredients.setCellValueFactory(new PropertyValueFactory<>("ingredient"));
// Tells the User if there are no recipes that matches the keywords
if(recipeObserver.size() == 0)
{
Label placeholder = new Label("Es existieren keine Rezepte zu dieser Suche.");
placeholder.setWrapText(true);
tbvRecipes.setPlaceholder(placeholder);
}
event.consume();
}
});
// Start search for recipes in database by pressing enter on textfield, keywords are read from this textfield
txfSearch.setOnKeyPressed(new EventHandler<KeyEvent>()
{
@Override
public void handle(KeyEvent event)
{
if (txfSearch.isFocused())
{
if(event.getCode() == KeyCode.ENTER)
{
recipeArrayList = RecipeManipulation.searchRecipeByIngriedientsArray(txfSearch.getText());
// Fill the table with recipes and all information.
final ObservableList<Recipes> recipeObserver = FXCollections.observableArrayList(recipeArrayList);
tbvRecipes.setItems(recipeObserver);
tbcRecipes.setCellValueFactory(new PropertyValueFactory<>("recipeName"));
tbcIngredients.setCellValueFactory(new PropertyValueFactory<>("ingredient"));
// Tells the User if there are no recipes that matches the keywords
if(recipeObserver.size() == 0)
{
Label placeholder = new Label("Es existieren keine Rezepte zu dieser Suche.");
placeholder.setWrapText(true);
tbvRecipes.setPlaceholder(placeholder);
}
event.consume();
}
}
}
});
// translate elements on the recipe search pane
lblSearch.setTranslateY(30);
btnStartSearch.setTranslateY(0);
txfSearch.setTranslateY(60);
txfSearch.setTranslateX(0);
tbvRecipes.setTranslateY(90);
return hBox;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private HBox createSortingDisplay() {\n HBox sortingDisplay = new HBox();\n sortingDisplay.setPadding(new Insets(0, 0, 50, 0));\n sortingDisplay.setSpacing(2);\n sortingDisplay.setMaxHeight(MAX_HEIGHT);\n sortingDisplay.setAlignment(Pos.BASELINE_CENTER);\n\n for(int i = 0;... | [
"0.6707204",
"0.6169111",
"0.6128926",
"0.60751855",
"0.5991325",
"0.5889333",
"0.56825393",
"0.5679817",
"0.56516623",
"0.56341785",
"0.5626409",
"0.561607",
"0.5613372",
"0.5546557",
"0.5533902",
"0.551431",
"0.5508152",
"0.5475862",
"0.54652965",
"0.54410356",
"0.5436726",... | 0.0 | -1 |
Toast.makeText(NearbyLocations.this, "long click" , Toast.LENGTH_LONG).show(); | @Override
public void onMapLongClick(LatLng latLng) {
alertWebsiteIntent();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void onMapLongClick(LatLng latLng) {\n Toast.makeText(this, getString(R.string.coordenadas)+\":\"+latLng, Toast.LENGTH_SHORT).show();\n }",
"@Override\n public void onMapLongClick(LatLng latLng) {\n Toast.makeText(getApplicationContext(),R.string.maps_onmaplongclick,Toas... | [
"0.74523497",
"0.7240603",
"0.7208527",
"0.7202419",
"0.71500564",
"0.7096598",
"0.70878184",
"0.70878184",
"0.69506353",
"0.69506353",
"0.6907611",
"0.68614835",
"0.67917126",
"0.6769719",
"0.67483366",
"0.674565",
"0.66890794",
"0.6639584",
"0.66153336",
"0.66055346",
"0.65... | 0.65648633 | 21 |
This method is called once with the initial value and again whenever data at this location is updated. | @Override
public void onDataChange(DataSnapshot dataSnapshot) {
Object value = dataSnapshot.getValue();
Log.d(TAG, "Value is: " + value);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tprotected void init() {\n\t\tupdateValues();\r\n\t}",
"public void initialize() {\r\n\t\tsetValue(initialValue);\r\n\t}",
"private void onChange() {\n startTime = -1L;\n endTime = -1L;\n minLat = Double.NaN;\n maxLat = Double.NaN;\n minLon = Double.NaN;\n maxLon = Double.NaN;\n... | [
"0.6856245",
"0.66557956",
"0.6447154",
"0.6406473",
"0.62935317",
"0.62570727",
"0.62515444",
"0.62494016",
"0.6217457",
"0.6217457",
"0.6217457",
"0.61911446",
"0.61869645",
"0.616353",
"0.6160428",
"0.6160428",
"0.61476964",
"0.61455876",
"0.6143219",
"0.6117692",
"0.60874... | 0.0 | -1 |
Failed to read value | @Override
public void onCancelled(DatabaseError error) {
Log.w(TAG, "Failed to read value.", error.toException());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"boolean shouldReadValue();",
"Object readValue();",
"private @NotNull ErrorValue finishReadingError()\n throws IOException, JsonFormatException {\n stepOver(JsonToken.VALUE_NUMBER_INT, \"integer value\");\n int errorCode;\n try { errorCode = currentValueAsInt(); } catch (JsonParseException ignore... | [
"0.6520245",
"0.644224",
"0.62601036",
"0.6077715",
"0.6027265",
"0.59389204",
"0.5928014",
"0.5897478",
"0.5892562",
"0.5891626",
"0.5821752",
"0.5813256",
"0.5813256",
"0.58093756",
"0.58006567",
"0.5798476",
"0.5776234",
"0.5774579",
"0.57361126",
"0.5728217",
"0.57143444"... | 0.5678807 | 38 |
Manipulates the map once available. This callback is triggered when the map is ready to be used. This is where we can add markers or lines, add listeners or move the camera. In this case, we just add a marker near Sydney, Australia. If Google Play services is not installed on the device, the user will be prompted to install it inside the SupportMapFragment. This method will only be triggered once the user has installed Google Play services and returned to the app. | @Override
public void onMapReady(GoogleMap googleMap) {
mMap = googleMap;
mMap.getUiSettings().setZoomControlsEnabled(true);
googleMap.setPadding(0, 0, 0, 300);
//if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION))
if (ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED) {
buildGoogleApiClient();
mMap.setMyLocationEnabled(true);
//mMap.getUiSettings().setZoomControlsEnabled(true);
}
mMap.setOnMapLongClickListener(new GoogleMap.OnMapLongClickListener() {
@Override
public void onMapLongClick(LatLng latLng) {
if (marker != null) {
marker.remove();
}
marker = mMap.addMarker(new MarkerOptions()
.position(latLng)
.icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_AZURE))
.title("My Current Click"));
}
});
mMap.setOnMarkerClickListener(new GoogleMap.OnMarkerClickListener() {
@Override
public boolean onMarkerClick(Marker marker) {
mHeart.setVisibility(View.VISIBLE);
manualEnter.setVisibility(View.VISIBLE);
latitude = marker.getPosition().latitude;
longitude = marker.getPosition().longitude;
name = marker.getTitle();
placeID = marker.getId();
address = marker.getSnippet();
time = DateFormat.getDateTimeInstance().format(new Date());
//long miliTime = time.getTime
//getMarkerInfo();
//Toast.makeText(NearbyLocations.this, name, Toast.LENGTH_SHORT).show();
return false;
}
});
mMap.setInfoWindowAdapter(new GoogleMap.InfoWindowAdapter() {
@Override
public View getInfoWindow(Marker arg0) {
return null;
}
@Override
public View getInfoContents(Marker marker) {
LinearLayout info = new LinearLayout(NearbyLocations.this);
info.setOrientation(LinearLayout.VERTICAL);
TextView title = new TextView(NearbyLocations.this);
title.setTextColor(Color.BLACK);
title.setGravity(Gravity.CENTER);
title.setTypeface(null, Typeface.BOLD);
title.setText(marker.getTitle());
TextView snippet = new TextView(NearbyLocations.this);
snippet.setTextColor(Color.GRAY);
snippet.setText(marker.getSnippet());
info.addView(title);
info.addView(snippet);
return info;
}
});
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void onMapReady(GoogleMap googleMap) {\n Geocoder geoCoder = new Geocoder(getActivity(), Locale.getDefault());\n double lat, lng;\n try {\n List<Address> addresses = geoCoder.getFromLocationName(\"Western Sydney Paramatta, NSW\", 5);\n ... | [
"0.8186867",
"0.8044004",
"0.803747",
"0.80327487",
"0.7999599",
"0.7977994",
"0.79590225",
"0.7958343",
"0.79532397",
"0.7943133",
"0.7937392",
"0.7931212",
"0.79160124",
"0.79055434",
"0.7890655",
"0.78863764",
"0.78863764",
"0.78863764",
"0.78863764",
"0.7878485",
"0.78460... | 0.0 | -1 |
latitude = location.getLatitude(); longitude = location.getLongitude(); | @Override
public void onLocationChanged(Location location) {
lastLocation = location;
if (currentUserLocationMarker != null){
currentUserLocationMarker.remove();
}
LatLng latLng = new LatLng(location.getLatitude(), location.getLongitude());
MarkerOptions markerOptions = new MarkerOptions();
markerOptions.position(latLng);
markerOptions.title("User Current Location");
markerOptions.icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_ROSE));
currentUserLocationMarker = mMap.addMarker(markerOptions);
mMap.moveCamera(CameraUpdateFactory.newLatLng(latLng));
mMap.animateCamera(CameraUpdateFactory.zoomBy(12));
if(googleApiClient != null){
LocationServices.FusedLocationApi.removeLocationUpdates(googleApiClient, this);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"long getLatitude();",
"@Override\n public void onLocationChanged(Location location) {\n currentLatitude = location.getLatitude();\n currentLongitude = location.getLongitude();\n\n }",
"double getLatitude();",
"@Override\n public void onLocationChanged(Location location)... | [
"0.7687515",
"0.7659459",
"0.75969714",
"0.756086",
"0.75016993",
"0.7497272",
"0.7455399",
"0.74366045",
"0.7403927",
"0.7391439",
"0.7298043",
"0.72829413",
"0.72829413",
"0.72792864",
"0.72327834",
"0.7225518",
"0.72159654",
"0.72159654",
"0.72119087",
"0.7190939",
"0.7142... | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public void onCheckedChanged(RadioGroup group, int checkedId) {
if (checkedId == time.getId()) {
typeNumber=1;
} else if (checkedId == priority.getId()) {
typeNumber=2;
}else if (checkedId == SPF.getId()) {
typeNumber=3;
}else if (checkedId == STF.getId()) {
typeNumber=4;
}
} | {
"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 |
Inflate the menu; this adds items to the action bar if it is present. | @Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.menu_main, menu);
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tMenuInflater inflater = getMenuInflater();\n \tinflater.inflate(R.menu.main_activity_actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {... | [
"0.7246102",
"0.7201358",
"0.7194834",
"0.7176498",
"0.71066517",
"0.7039537",
"0.7037961",
"0.70112145",
"0.70094734",
"0.69807225",
"0.6944953",
"0.69389373",
"0.6933199",
"0.6916928",
"0.6916928",
"0.6891486",
"0.68831646",
"0.68754137",
"0.68745375",
"0.68621665",
"0.6862... | 0.0 | -1 |
Handle action bar item clicks here. The action bar will automatically handle clicks on the Home/Up button, so long as you specify a parent activity in AndroidManifest.xml. | @Override
public boolean onOptionsItemSelected(MenuItem item) {
int id = item.getItemId();
//noinspection SimplifiableIfStatement
if (id == R.id.action_settings) {
return true;
}
return super.onOptionsItemSelected(item);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public boolean onOptionsItemSelected(MenuItem item) { Handle action bar item clicks here. The action bar will\n // automatically handle clicks on the Home/Up button, so long\n // as you specify a parent activity in AndroidManifest.xml.\n\n //\n // HANDLE BACK BUTTON\n ... | [
"0.79042155",
"0.7806028",
"0.77664185",
"0.77272826",
"0.7631844",
"0.7621488",
"0.75845605",
"0.753064",
"0.7487905",
"0.74575514",
"0.74575514",
"0.74386317",
"0.7421903",
"0.7403247",
"0.7391723",
"0.7386928",
"0.73795277",
"0.73705643",
"0.73629",
"0.7356027",
"0.7345714... | 0.0 | -1 |
TODO Autogenerated method stub | public static void main(String[] args) {
} | {
"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 |
Busca en mongo los documentos que pertenenzcan a los filtros relacionados de la pregunta TODO debe retornar un dto de filtros y documentos | @Override
public List<Document> findDocumentsByQuestion(String question) {
String [] keyWords = question.split(" ");
List<Document> documents = new ArrayList<>();
List<Filters> filters = filtersRepository.findByCommonsWordsWordIn(keyWords);
for(Filters f : filters){
documents.addAll(f.getDocuments());
}
return documents;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"List<CriterionDocumentMasterDTO> findAll();",
"Collection<GestionPrecioDTO> findCampaniasFiltros (GestionPrecioDTO gestionPrecio,String estadoCobro);",
"public List<Object> queryByWhere(String col_name, String dto, List<List<Triple>> filter, List<String> keys) {\n\t\tList<Object> res = new ArrayList<Object>();... | [
"0.62472826",
"0.6183223",
"0.60102946",
"0.594369",
"0.58016354",
"0.57934",
"0.57687443",
"0.57644784",
"0.57610905",
"0.5723609",
"0.5573369",
"0.5568821",
"0.55623925",
"0.5559602",
"0.5531078",
"0.5529981",
"0.55174506",
"0.5516761",
"0.54839057",
"0.5483339",
"0.5430542... | 0.54859436 | 18 |
Register a stage with the StageManager | public static void registerStage(String stageName, IStage stage)
{
stageQueues_.put(stageName, stage);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setStage(Stage stage) {\r\n this.stage = stage;\r\n }",
"public void setStage(Stage stage) {\n this.stage = stage;\n }",
"public void setStage(Stage stage) {\n this.stage = stage;\n }",
"public void setStage(Stage stage) {\n\t\tthis.stage = stage;\n\t}",
"public vo... | [
"0.647226",
"0.64152545",
"0.64152545",
"0.6334144",
"0.6266747",
"0.6251318",
"0.62461114",
"0.6149049",
"0.61142427",
"0.6018044",
"0.5903573",
"0.5901308",
"0.58164674",
"0.5628172",
"0.56207657",
"0.55920154",
"0.55626154",
"0.5558587",
"0.55513555",
"0.5492671",
"0.54786... | 0.71372026 | 0 |
Retrieve a stage from the StageManager | public static IStage getStage(String stageName)
{
return stageQueues_.get(stageName);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Stage retrieveStage()\n {\n return gameStage;\n }",
"public Stage getStage() {\n com.guidebee.game.engine.scene.Stage stage = internalGroup.getStage();\n if (stage != null) {\n return (Stage) stage.getUserObject();\n }\n\n return null;\n }",
"public Stage g... | [
"0.77486247",
"0.7672046",
"0.7365383",
"0.7357618",
"0.7357618",
"0.7357618",
"0.7093286",
"0.68028647",
"0.6580543",
"0.6558275",
"0.6532211",
"0.6506559",
"0.6365546",
"0.6341798",
"0.6318545",
"0.6318545",
"0.6318545",
"0.6318545",
"0.6318545",
"0.6318545",
"0.6318545",
... | 0.70247835 | 7 |
Deregister a stage from StageManager | public static void deregisterStage(String stageName)
{
stageQueues_.remove(stageName);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void removeStage(PipelineStage stag) {\r\n\t\tSystem.out.println(\"Removing stage \" + stag);\r\n\t\tstages.remove(stag);\r\n\t}",
"public void removeStage(int idx) {\r\n\t\tSystem.out.println(\"Removing stage # \" + idx);\r\n\t\tstages.remove(idx);\r\n\t\tSystem.out.println(\"Pipeline contains \" + stage... | [
"0.6796431",
"0.65375215",
"0.64452356",
"0.6350577",
"0.57603264",
"0.57603264",
"0.5611097",
"0.5550422",
"0.5540291",
"0.54495335",
"0.54367447",
"0.542765",
"0.54173976",
"0.53920466",
"0.53732556",
"0.53521603",
"0.5340185",
"0.53205264",
"0.5318575",
"0.528618",
"0.5278... | 0.7678429 | 0 |
This method gets the number of tasks on the stage's internal queue. | public static long getStageTaskCount(String stage)
{
return stageQueues_.get(stage).getTaskCount();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"long getExcutorTasksInWorkQueueCount();",
"public int getNumTasks() {\n return tasks.size();\n }",
"public int getSize() {\n return tasks.size();\n }",
"public int size()\n {\n return tasks.size();\n }",
"public int getNumberOfTasks() {\n\t\treturn tasks.size();\n\t}",
"publ... | [
"0.7809346",
"0.75136733",
"0.73646414",
"0.73495185",
"0.7329932",
"0.72341263",
"0.71994793",
"0.7194423",
"0.7152863",
"0.7145572",
"0.7109024",
"0.7056372",
"0.7056372",
"0.7056372",
"0.7041032",
"0.70050824",
"0.6993951",
"0.69935733",
"0.6972066",
"0.6955355",
"0.693358... | 0.7514146 | 1 |
This method shuts down all registered stages. | public static void shutdown()
{
for ( IStage registeredStage : stageQueues_.values() )
{
registeredStage.shutdown();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void shutdown() {\n logger.info(\"Shutting down modules.\");\n for (Module module : modules) {\n module.stop();\n }\n logger.info(\"Shutting down reporters.\");\n for (Reporter reporter : reporters.values()) {\n reporter.stop();\n }\n }",
... | [
"0.6949887",
"0.6832933",
"0.6484964",
"0.6357156",
"0.6349306",
"0.6319969",
"0.62726957",
"0.6249282",
"0.62023354",
"0.61853254",
"0.61772937",
"0.61734754",
"0.61539054",
"0.61467737",
"0.61403596",
"0.6115121",
"0.61138415",
"0.61040294",
"0.60779804",
"0.6071739",
"0.60... | 0.77152824 | 0 |
Returns the proxy class name. The proxyClassName field is nonnull for a constructed object and null for a deserialized object. Whenever the proxyClassName field is null (for a deserialized object), the proxyFormat will be nonnull. | private String getProxyClassName() {
if (proxyClassName != null) {
return proxyClassName;
} else {
assert proxyFormat != null;
return proxyFormat.getClassName();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected static String getProxyClassName(Class type, boolean runtime) {\n String id = (runtime) ? \"$\" + nextProxyId() : \"\";\n return ClassUtil.getPackageName(ProxyManagerImpl.class) + \".\"\n + type.getName().replace('.', '$') + id + PROXY_SUFFIX;\n }",
"public java.lang.String g... | [
"0.6267969",
"0.62392133",
"0.5706378",
"0.555198",
"0.53775996",
"0.5301398",
"0.52869374",
"0.5233575",
"0.52329385",
"0.51864856",
"0.5186378",
"0.51758146",
"0.51149106",
"0.5114239",
"0.5033312",
"0.5007418",
"0.4999226",
"0.4997383",
"0.49947438",
"0.49721107",
"0.49595... | 0.8554701 | 0 |
In the future if we implement container proxies, which support nested references to the container, then we will return false if this is a container proxy. [15815] | @Override
boolean areNestedRefsProhibited() {
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean isContainer();",
"boolean isResolveByProxy();",
"boolean isProxyTargetClass();",
"private boolean isProxy(Object bean) {\n return (bean instanceof Advised);\n }",
"public boolean isContainerType()\n/* */ {\n/* 169 */ return true;\n/* */ }",
"public boolean isConta... | [
"0.6753401",
"0.6644882",
"0.63287205",
"0.6232877",
"0.62139785",
"0.62044084",
"0.6164405",
"0.6121677",
"0.59874684",
"0.5936276",
"0.5922288",
"0.58955365",
"0.58334696",
"0.58093745",
"0.57338685",
"0.56920415",
"0.5685143",
"0.5679628",
"0.55936444",
"0.5588182",
"0.558... | 0.524924 | 51 |
/ Collect the proxy format. | @Override
void collectRelatedFormats(Catalog catalog,
Map<String, Format> newFormats) {
assert proxyClassName != null;
catalog.createFormat(proxyClassName, newFormats);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic String toString() {\n\t\treturn \"[\" + this.getClass().getName() + \" proxy=\" + _proxy + \"]\";\n\t}",
"public ProxyConfig[] getProxyConfigList();",
"public Map<String, String> getContentFormat() {\n/* 158 */ Map<String, String> result = new HashMap<String, String>(super.getContentFor... | [
"0.5907808",
"0.5742865",
"0.57060206",
"0.5650537",
"0.5339201",
"0.52859867",
"0.51853883",
"0.50634176",
"0.5061576",
"0.50495636",
"0.49059218",
"0.4894078",
"0.48402965",
"0.4836279",
"0.48299274",
"0.48293194",
"0.47990376",
"0.47854668",
"0.47747976",
"0.47598305",
"0.... | 0.5411406 | 4 |
/ Set the proxy format for a new (never initialized) format. | @Override
void initialize(Catalog catalog, EntityModel model, int initVersion) {
if (proxyFormat == null) {
assert proxyClassName != null;
proxyFormat = catalog.getFormat(proxyClassName);
}
/* Make the linkage from proxy format to proxied format. */
proxyFormat.setProxiedFormat(this);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setFormat(Connector connector, Format format);",
"public final void setFormat(AdFormat format) {\n\t\timpl.setFormat(format);\n }",
"Format internalSetFormat(Format format)\n {\n return doSetFormat(format);\n }",
"protected Format doSetFormat(Format format)\n {\n return nu... | [
"0.6311068",
"0.62571347",
"0.6257128",
"0.6177596",
"0.6147462",
"0.5993447",
"0.59016556",
"0.58704156",
"0.5788175",
"0.57788694",
"0.57730126",
"0.56900907",
"0.56821036",
"0.5612756",
"0.5612756",
"0.5612756",
"0.55655783",
"0.5499691",
"0.5486082",
"0.54462385",
"0.5417... | 0.5674699 | 13 |
Executes a command line string exactly as is. | public static Process exec(String cmd) throws IOException
{
return exec(cmd, null, true);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void exec(String s) {\n }",
"protected abstract String executeCommandAndModifyOutput(List<String> args, String originalInput);",
"protected String interpretCommand(final String line)\n throws IOException\n {\n return executeCommand(line);\n }",
"Optional<String> execute(String c... | [
"0.66226304",
"0.60670465",
"0.60459536",
"0.5998416",
"0.58452266",
"0.5789221",
"0.573933",
"0.5713455",
"0.5693562",
"0.5693562",
"0.5693562",
"0.56805587",
"0.5672033",
"0.56598336",
"0.5620898",
"0.56110126",
"0.55882514",
"0.55822223",
"0.5536465",
"0.5535518",
"0.55269... | 0.0 | -1 |
Executes a command line string exactly as is. | public static Process exec(
String cmd,
@SuppressWarnings("rawtypes") Map envVars) throws IOException
{
return exec(cmd, envVars, true);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void exec(String s) {\n }",
"protected abstract String executeCommandAndModifyOutput(List<String> args, String originalInput);",
"protected String interpretCommand(final String line)\n throws IOException\n {\n return executeCommand(line);\n }",
"Optional<String> execute(String c... | [
"0.66226304",
"0.60670465",
"0.60459536",
"0.5998416",
"0.58452266",
"0.5789221",
"0.573933",
"0.5713455",
"0.5693562",
"0.5693562",
"0.5693562",
"0.56805587",
"0.5672033",
"0.56598336",
"0.5620898",
"0.56110126",
"0.55882514",
"0.55822223",
"0.5536465",
"0.5535518",
"0.55269... | 0.0 | -1 |
Executes a command line string exactly as is. | public static Process exec(
String cmd,
boolean copyStdOutAndStdErrToParentProcess) throws IOException
{
return exec(cmd, null, copyStdOutAndStdErrToParentProcess);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void exec(String s) {\n }",
"protected abstract String executeCommandAndModifyOutput(List<String> args, String originalInput);",
"protected String interpretCommand(final String line)\n throws IOException\n {\n return executeCommand(line);\n }",
"Optional<String> execute(String c... | [
"0.66226304",
"0.60670465",
"0.60459536",
"0.5998416",
"0.58452266",
"0.5789221",
"0.573933",
"0.5713455",
"0.5693562",
"0.5693562",
"0.5693562",
"0.56805587",
"0.5672033",
"0.56598336",
"0.5620898",
"0.56110126",
"0.55882514",
"0.55822223",
"0.5536465",
"0.5535518",
"0.55269... | 0.0 | -1 |
Executes a command line string exactly as is. | public static Process exec(
String cmd,
@SuppressWarnings("rawtypes") Map envVars,
boolean copyStdOutAndStdErrToParentProcess) throws IOException
{
String[] envVarsArr = getEnvVarArray(envVars);
Process p = Runtime.getRuntime().exec(cmd, envVarsArr);
if (copyStdOutAndStdErrToParentProcess)
{
pipe(p);
}
return p;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void exec(String s) {\n }",
"protected abstract String executeCommandAndModifyOutput(List<String> args, String originalInput);",
"protected String interpretCommand(final String line)\n throws IOException\n {\n return executeCommand(line);\n }",
"Optional<String> execute(String c... | [
"0.66226304",
"0.60670465",
"0.60459536",
"0.5998416",
"0.58452266",
"0.5789221",
"0.573933",
"0.5713455",
"0.5693562",
"0.5693562",
"0.5693562",
"0.56805587",
"0.5672033",
"0.56598336",
"0.5620898",
"0.56110126",
"0.55882514",
"0.55822223",
"0.5536465",
"0.5535518",
"0.55269... | 0.0 | -1 |
Gets the stdout stream from a process as a string. | public static String getStdOut(Process p) throws IOException
{
return IOUtils.toString(p.getInputStream());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"InputStream getStdout();",
"public static String getOutputFromProcess(Process process) throws IOException, InterruptedException {\n\n String s;\n final StringBuilder r = new StringBuilder();\n final BufferedReader stdInput = new BufferedReader(\n new InputStreamReader(\n ... | [
"0.705095",
"0.68376994",
"0.66082513",
"0.6498515",
"0.6309128",
"0.58597386",
"0.5823159",
"0.58082217",
"0.575808",
"0.5524254",
"0.5507065",
"0.55044603",
"0.5499341",
"0.5433743",
"0.54115295",
"0.54021966",
"0.53959566",
"0.5395356",
"0.53743356",
"0.53603584",
"0.53467... | 0.7547127 | 0 |
Gets the stderr stream from a process as a string. | public static String getStdErr(Process p) throws IOException
{
return IOUtils.toString(p.getErrorStream());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"InputStream getStderr();",
"static public StdReader stderr(Process process, StdProcessor processor) {\n \n return new StdReader(process.getErrorStream(), processor);\n }",
"public String ReadErrorLine() {\n\treturn childStderr.Readline();\n }",
"public abstract InputStream stderr();",
"public sta... | [
"0.7245308",
"0.6975058",
"0.6658112",
"0.6628153",
"0.6282715",
"0.61446947",
"0.6130191",
"0.594385",
"0.5923671",
"0.5854254",
"0.5845629",
"0.5769433",
"0.5742172",
"0.573752",
"0.5737031",
"0.57195705",
"0.5688232",
"0.56856567",
"0.56582004",
"0.5639829",
"0.5595571",
... | 0.78516364 | 0 |
Pipes the process's stdout and stderr to the stdout stream of the parent process. | final static void pipe(Process p)
{
pipe(p.getInputStream(), System.out);
pipe(p.getErrorStream(), System.err);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected void connectProcess(Process p) {\n // redirect all stdout from all the processes into a combined output stream\n // that pipes all the data into a combined input stream that serves as this\n // process sequence's input stream\n if (_stdOutRedirector==null) {\n _stdOutRedirector = new Str... | [
"0.6275954",
"0.6143229",
"0.5934443",
"0.5911076",
"0.5863501",
"0.58518165",
"0.5601758",
"0.5544212",
"0.5523293",
"0.55100286",
"0.54863185",
"0.5484269",
"0.5404544",
"0.5278952",
"0.52114457",
"0.4915105",
"0.49072108",
"0.49015453",
"0.48859054",
"0.4839474",
"0.466951... | 0.7034232 | 0 |
Pipes the input stream to the given output stream. | public final static void pipe(final InputStream in, final OutputStream out)
{
new Thread(new Runnable()
{
@Override
public void run()
{
try
{
IOUtils.copy(in, out);
}
catch (IOException e)
{
// Do nothing
}
}
}).start();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic void pipeOutput() {\n\n\t}",
"public static void stream(final InputStream in, final OutputStream out) throws IOException {\n\t\tfinal byte buffer[] = new byte[BUFFER_SIZE];\r\n\t\tint len = buffer.length;\r\n\t\twhile (true) {\r\n\t\t\tlen = in.read(buffer);\r\n\t\t\tif (len == -1) {\r\n\t\t\... | [
"0.6282063",
"0.62486565",
"0.59643745",
"0.57195365",
"0.5550221",
"0.5546807",
"0.5511938",
"0.5508263",
"0.5471437",
"0.5440569",
"0.54157245",
"0.5407418",
"0.53801405",
"0.536037",
"0.53572184",
"0.5347429",
"0.53288907",
"0.53195536",
"0.53113276",
"0.5299748",
"0.52950... | 0.6917957 | 0 |
Gets the environment variable map as an array of strings with the format "KEY=VALUE". | final static String[] getEnvVarArray(@SuppressWarnings("rawtypes") Map map)
{
if (map == null)
{
return null;
}
String[] arr = new String[map.size()];
int x = 0;
for (Object k : map.keySet())
{
Object v = map.get(k);
arr[x] = String.format("%s=%s", k, v);
++x;
}
return arr;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String[] getEnvArray()\n {\n return (String[])envMap.values().toArray(new String[envMap.size()]);\n }",
"private static Map<String,String> getEnvVars() {\n return new TreeMap<>(System.getenv());\n }",
"java.util.List<java.lang.String>\n getEnvList();",
"public... | [
"0.81119317",
"0.7146933",
"0.6912314",
"0.67939454",
"0.6619111",
"0.6424772",
"0.6348462",
"0.63113904",
"0.6279118",
"0.6270561",
"0.62305087",
"0.62093765",
"0.616597",
"0.6039384",
"0.6034452",
"0.5823143",
"0.58228135",
"0.5817895",
"0.5730966",
"0.571656",
"0.5701622",... | 0.8310836 | 0 |
TODO Autogenerated method stub It's implement List interface it is dynamic in nature Store only object It is synchronized (thread safe) slower present since jdk 1.0 support generics its a legacy class of java | public static void main(String[] args) {
Vector<Integer> v1=new Vector<Integer>();
v1.add(10);
v1.add(2);
v1.add(13);
v1.add(4);
System.out.println(v1);
System.out.println("**************************");
Vector<Integer> v2=new Vector<Integer>();
v2.add(10);
v2.add(11);
v2.addAll(v1);
System.out.println(v2);
System.out.println("**************************");
//access using loop
for(Integer i:v2)
{
System.out.println(i);
}
System.out.println("**************************");
//using iterator
Iterator<Integer> ite =v1.iterator();
while(ite.hasNext())
{
System.out.println(ite.next());
}
//using for loop
System.out.println("**************************");
for(int i=0;i<=v1.size();i++)
{
System.out.println(i);
}
//Sorting
Collections.sort(v2);
System.out.println(v2);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public abstract List<T> getList();",
"protected List getList() {\n/* 88 */ return (List)getCollection();\n/* */ }",
"public interface IMList<T> {\r\n boolean pushFront(String listName,T item);\r\n\r\n boolean pushBack(String listName,T item);\r\n\r\n boolean deleteFront(String listName);\r\... | [
"0.66440237",
"0.6606669",
"0.6573345",
"0.6487984",
"0.644235",
"0.64230883",
"0.6421048",
"0.6391539",
"0.6335168",
"0.6260944",
"0.62517875",
"0.6189923",
"0.6178572",
"0.6139064",
"0.61047107",
"0.61004984",
"0.60904896",
"0.6066338",
"0.6062462",
"0.6054985",
"0.6044631"... | 0.0 | -1 |
private final static String ipAddress = " private final static String ipAddress = "10.0.2.2/Pharmarays"; | public static JSONArray login(ArrayList<NameValuePair> nameValuePairs) {
String url = "/pharma-public/index.php/mobile/mobile_controller/loginauthorization";
return connectToServer(nameValuePairs, url);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public java.lang.String getIp(){\r\n return localIp;\r\n }",
"public java.lang.String getIp(){\r\n return localIp;\r\n }",
"public String getIp(){\n\treturn ip;\n }",
"String getIp();",
"Str... | [
"0.61271274",
"0.61271274",
"0.60817957",
"0.60416526",
"0.60416526",
"0.59628564",
"0.596211",
"0.59114605",
"0.59114605",
"0.59114605",
"0.59114605",
"0.59114605",
"0.59114605",
"0.59114605",
"0.59114605",
"0.5901499",
"0.58910775",
"0.58124423",
"0.58124423",
"0.58022696",
... | 0.0 | -1 |
Created by Raleigh.Luo on 18/2/24. | public interface TableConfig {//表头
String MODULE_NUMBER="ModuleNumer";//模块编号
String MODULE_NAME="ModuleName";//模块名称
String IS_CREATE="isCreate";//是否创建
String CLASS_NAME="ClassName";//测试类名
String CLASS_PACKAGE_NAME="ClassPackageName";//所在包名
String INTENT_EXTRA="Intent";//Intent值
String SHAREDPREFERENCES_NAME="SharedPreferencesName";//本地存储名称
String SHAREDPREFERENCES="SharedPreferences";//本地存储
String PREMISSIONS="Premissions";//所需权限
String CASE_NUMBER="CaseNumber";//用例编号
String CASE_NAME="CaseName";//用例名称
String IS_EXECUTE ="isExecute";//是否执行
String TESTING_PROCEDURE="TestingProcedure";//测试步骤
String VIEW_TYPE="ViewType";//操作类型
String ACTION ="Action";//操作类型
String PARAM ="param";//参数 参数index为 [action+1,param]
//module头部名称
String[] MODULE_HEADERS={MODULE_NUMBER,MODULE_NAME,IS_CREATE,CLASS_NAME,CLASS_PACKAGE_NAME,INTENT_EXTRA,SHAREDPREFERENCES_NAME,SHAREDPREFERENCES,PREMISSIONS};
//测试用例头部名称
String[] CASE_HEADERS ={CASE_NUMBER
,CASE_NAME, IS_EXECUTE,TESTING_PROCEDURE,VIEW_TYPE, ACTION,
PARAM};
//数据存储/传值格式
String PUT_STRING="putString";
String PUT_INT="putInt";
String PUT_BOOLEAN="putBoolean";
String PUT_FLOAT="putFloat";
String PUT_LONG="putLong";
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public final void mo51373a() {\n }",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n public void perish() {\n \n }",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"private void m50366E() {\n }",
"protected boolean func_70814_o() { return true; }... | [
"0.583577",
"0.5828879",
"0.58020055",
"0.57915574",
"0.57087976",
"0.56489146",
"0.5623313",
"0.55895305",
"0.55718595",
"0.5547772",
"0.5547772",
"0.5536487",
"0.5532259",
"0.5531429",
"0.54946554",
"0.5491563",
"0.5468632",
"0.54603064",
"0.5453702",
"0.5438505",
"0.543735... | 0.0 | -1 |
Builds the gossip engine, depending on which flavor is requested in the configuration. | public SingleNodeSyncGossip(
@NonNull PlatformContext platformContext,
@NonNull ThreadManager threadManager,
@NonNull final Time time,
@NonNull Crypto crypto,
@NonNull AddressBook addressBook,
@NonNull NodeId selfId,
@NonNull SoftwareVersion appVersion,
@NonNull final ShadowGraph shadowGraph,
@NonNull final QueueThread<EventIntakeTask> intakeQueue,
@NonNull final FreezeManager freezeManager,
@NonNull final StartUpEventFrozenManager startUpEventFrozenManager,
@NonNull final SwirldStateManager swirldStateManager,
@NonNull final StateManagementComponent stateManagementComponent,
@NonNull final InterruptableConsumer<EventIntakeTask> eventIntakeLambda,
@NonNull final EventObserverDispatcher eventObserverDispatcher,
@NonNull final EventMapper eventMapper,
@NonNull final EventIntakeMetrics eventIntakeMetrics,
@NonNull final SyncMetrics syncMetrics,
@NonNull final StatusActionSubmitter statusActionSubmitter,
@NonNull final Consumer<SignedState> loadReconnectState,
@NonNull final Runnable clearAllPipelinesForReconnect) {
super(
platformContext,
threadManager,
time,
crypto,
addressBook,
selfId,
appVersion,
intakeQueue,
freezeManager,
startUpEventFrozenManager,
swirldStateManager,
stateManagementComponent,
eventMapper,
eventIntakeMetrics,
syncMetrics,
eventObserverDispatcher,
statusActionSubmitter,
loadReconnectState,
clearAllPipelinesForReconnect);
this.eventIntakeLambda = Objects.requireNonNull(eventIntakeLambda);
clearAllInternalPipelines = new LoggingClearables(
RECONNECT.getMarker(),
List.of(
Pair.of(intakeQueue, "intakeQueue"),
Pair.of(eventMapper, "eventMapper"),
Pair.of(shadowGraph, "shadowGraph")));
final BasicConfig basicConfig = platformContext.getConfiguration().getConfigData(BasicConfig.class);
final Duration hangingThreadDuration = basicConfig.hangingThreadDuration();
syncProtocolThread = new StoppableThreadConfiguration<>(threadManager)
.setPriority(Thread.NORM_PRIORITY)
.setNodeId(selfId)
.setComponent(PLATFORM_THREAD_POOL_NAME)
.setOtherNodeId(selfId)
.setThreadName("SingleNodeNetworkSync")
.setHangingThreadPeriod(hangingThreadDuration)
.setWork(new SingleNodeNetworkSync(eventTaskCreator::createEvent, () -> 0, selfId))
.build();
thingsToStart.add(syncProtocolThread);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void build(FuzzyEngine engine) throws FuzzyEngineException;",
"protected Graph<Sense<V>, DefaultWeightedEdge> buildSenseGraph() {\n final var builder = SimpleWeightedGraph.<Sense<V>, DefaultWeightedEdge>createBuilder(DefaultWeightedEdge.class);\n\n for (final var sourceEntry : invent... | [
"0.5182415",
"0.50529385",
"0.50217754",
"0.49303052",
"0.4861498",
"0.47151294",
"0.4681247",
"0.46757194",
"0.46605736",
"0.46579504",
"0.46442378",
"0.45995438",
"0.45944962",
"0.4585807",
"0.45754534",
"0.45751697",
"0.45708743",
"0.45619383",
"0.449111",
"0.44863093",
"0... | 0.0 | -1 |
TODO Autogenerated method stub | @Override //所有id
public PoInfo querryById(String poinid) throws Exception {
return (PoInfo) dao.findForObject("PoInfoMapper.querryById", poinid);
} | {
"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 //删除id
public void deletePoInfoById(String poinid) throws Exception {
dao.delete("PoInfoMapper.deletePoInfoById", poinid);
} | {
"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 editPoInfo(PageData pd) throws Exception {
dao.update("PoInfoMapper.editPoInfo", pd);
} | {
"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 insertPoInfo(PageData pd) throws Exception {
dao.save("PoInfoMapper.insertPoInfo", pd);
} | {
"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 | @SuppressWarnings("unchecked") //查询所有
public List<PoInfo> querryAll(Page page) throws Exception {
return (List<PoInfo>) dao.findForList("PoInfoMapper.listAllPoInfo", page);
} | {
"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 |
Auto detect FilePath \\ or // | public String getFileSeparator() {
return File.separator;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n public void testInvalidSlashesRuleMatches() throws Exception {\n Assume.assumeFalse(SystemInfo.isWindows);\n\n File file = new File(\"at\\\\least/one\\\\of/these\\\\slashes/are\\\\wrong\");\n assertRuleFails(myFileOp, PathValidator.INVALID_SLASHES, file);\n }",
"public abstract String getFullP... | [
"0.65422773",
"0.63291657",
"0.6275272",
"0.6198844",
"0.619767",
"0.61793274",
"0.6172902",
"0.61388695",
"0.60981244",
"0.60408705",
"0.5997381",
"0.5997024",
"0.59950155",
"0.5969998",
"0.5968485",
"0.5938726",
"0.5927857",
"0.5911283",
"0.5882162",
"0.5864898",
"0.5832450... | 0.0 | -1 |
read file content fully | @RequestMapping(value="/read", method = RequestMethod.GET)
@ResponseBody
public String readFile(@RequestParam String f) throws IOException,InvalidValueException,FilePathAccessDeniedException {
String username = CSQLUserContext.getCurrentUser().getUsername();
if(validator.isValidAndUserHasAccess(username,f)){
return fileSystemService.readFile(f);
}
return null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private String readFully(String filename) throws IOException{\n\t\tBufferedReader reader = new BufferedReader(new FileReader(filename));\n\t\tStringBuilder buf=new StringBuilder();\n\t\tchar[] data=new char[8192];\n\t\tint num=reader.read(data);\n\t\twhile(num>-1){\n\t\t\tbuf.append(data,0,num);\n\t\t\tnum=reader.... | [
"0.69481915",
"0.6659138",
"0.6629248",
"0.6561373",
"0.6554055",
"0.64741373",
"0.6468733",
"0.6434464",
"0.64337647",
"0.6421773",
"0.642174",
"0.6404937",
"0.6403315",
"0.63757724",
"0.6375751",
"0.6369388",
"0.636124",
"0.6354403",
"0.6337138",
"0.6313601",
"0.63083756",
... | 0.0 | -1 |
Delete a file/folder by path | @RequestMapping(value="/my_files", method = RequestMethod.DELETE)
@ResponseBody
public AppResponse delete(@RequestParam String path) throws IOException, InvalidValueException,FilePathAccessDeniedException {
String username = CSQLUserContext.getCurrentUser().getUsername();
if(validator.isValidAndUserHasAccess(username, path)){
return fileSystemService.delete(path, true);
}
return AppResponse.error();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void deleteFile(FsPath path);",
"public static void deleteFolder(String path){\n List<CMSFile> files = CMSFile.find(\"name like '\" + path + \"%'\").fetch();\n for (CMSFile file: files){\n if (file.data != null && file.data.exists()) {\n file.data.getFile().delete();\n ... | [
"0.82730913",
"0.7865291",
"0.7432517",
"0.7199196",
"0.711969",
"0.71059376",
"0.70681286",
"0.70544416",
"0.7022974",
"0.7014288",
"0.70079607",
"0.6999042",
"0.6912864",
"0.68713176",
"0.6785379",
"0.6767876",
"0.671088",
"0.66541785",
"0.6630403",
"0.6604748",
"0.658277",... | 0.68178993 | 14 |
Instantiates a new abstract msg handler. | public AbstractMsgHandler(DebugSession debugSession, String objectName) {
OBJECT_NAME = objectName;
this.debugSession = debugSession;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public abstract void msgHandler(Message msg);",
"public MessageHandler() {\n }",
"CreateHandler()\n {\n }",
"public abstract Message createMessage(String uid) throws MessagingException;",
"public MessageDispatcher ()\n\t{\n\t\tthis (new MessageThreadFactory ());\n\t}",
"private Message(MessageTy... | [
"0.71363825",
"0.7112807",
"0.634625",
"0.6227957",
"0.62200797",
"0.61990154",
"0.6163519",
"0.60769886",
"0.6028694",
"0.60154563",
"0.6013197",
"0.60098743",
"0.60069716",
"0.60069716",
"0.6002647",
"0.5996352",
"0.5990587",
"0.5976738",
"0.5963363",
"0.5926143",
"0.590851... | 0.55711305 | 55 |
Send protocol acknowledge message. | protected void sendAckMessage(WebSocketConnection conn, JSONObject message)
throws JSONException {
conn.send(new JSONStringer().object()
.key("id").value(message.getInt("id"))
.key("result").object().endObject().endObject().toString());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void ack() {\n }",
"private void sendAck(DOPEPacket packet) throws IOException {\n\t\tDOPEPacket ack = new DOPEPacket(Control.ACK_OP_CODE, packet.getSequenceNumber());\n\t\tsend(ack);\n\t\tSystem.out.println(\"Sent ack:\\n\" + ack);\n\t}",
"private void sendAcknowledgePacket(KarelPacket ackKarelPacke... | [
"0.65403473",
"0.64356124",
"0.63817763",
"0.63457257",
"0.620292",
"0.6199331",
"0.6147541",
"0.60752875",
"0.6010566",
"0.5996733",
"0.5975548",
"0.5897955",
"0.5884992",
"0.5879515",
"0.5864465",
"0.5855507",
"0.5814105",
"0.58016837",
"0.5783186",
"0.5775889",
"0.5767403"... | 0.5675166 | 23 |
Dispatch incoming message to browser for processing and return reply to debug client. | protected void dispatchToBrowserAndReply(final WebSocketConnection conn, final String method, final JSONObject message) throws JSONException {
dispatchToBrowserAndReply(conn, method, message, false);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic void handle(T event) {\n\t\tString messageFromClient;\n\t\tmessageFromClient = breakOut.getView().getInputTextfield().getText();\n\t\ttry {\n\t\t\tbreakOut.getClient().getWriter().println(messageFromClient);\n\t\t\tbreakOut.getClient().getWriter().flush();\n\t\t\tbreakOut.getView().getInputText... | [
"0.59996337",
"0.5890979",
"0.5864349",
"0.5745622",
"0.5723094",
"0.56670976",
"0.5648225",
"0.56050026",
"0.5599048",
"0.5552508",
"0.5534364",
"0.5453841",
"0.54484373",
"0.5403564",
"0.5357971",
"0.53483576",
"0.53421175",
"0.53335804",
"0.533248",
"0.5319287",
"0.5302563... | 0.57022214 | 5 |
Dispatch incoming message to browser for processing, return reply to debug client and optional send confirm message. | protected void dispatchToBrowserAndReply(final WebSocketConnection conn, final String method, final JSONObject message, final boolean confirm) throws JSONException {
debugSession.getBrowserInterface().sendMsgToWebView(
method,
message.has("params") ? new JSONObject().put("params", message.getJSONObject("params")) : new JSONObject(),
new ReplyReceiver() {
@Override
public void onReply(JSONObject data) throws JSONException {
conn.send(new JSONStringer().object()
.key("id").value(message.getInt("id"))
.key("result").value(data)
.endObject().toString());
if (confirm) {
sendAckMessage(conn, message);
}
}
});
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected void dispatchToBrowserAndReply(final WebSocketConnection conn, final String method, final JSONObject message) throws JSONException {\n\t\tdispatchToBrowserAndReply(conn, method, message, false);\n\t}",
"boolean handleMessage(Controller handler, RemoteViewHandler view, User user);",
"public void execu... | [
"0.58289593",
"0.56723756",
"0.5552819",
"0.55464727",
"0.5529847",
"0.55122787",
"0.54475576",
"0.5438298",
"0.53716457",
"0.5351905",
"0.5324803",
"0.52930427",
"0.5276985",
"0.52769244",
"0.527081",
"0.5260028",
"0.52585006",
"0.5235677",
"0.52079326",
"0.51734173",
"0.517... | 0.6747279 | 0 |
Singleton. Initialize the HttpClient and build the api. | public TagsRemoteDataSource() {
Log.v(TAG, "Initializing the Remote Tag Datasource");
//
// Singleton.
// Creates a custom OkHttpClient that trusts all certificates
OkHttpClient.Builder clientBuilder = HttpUtils.getTrustAllOkHttpClientBuilder();
clientBuilder.connectTimeout(30, TimeUnit.SECONDS);
clientBuilder.readTimeout(60, TimeUnit.SECONDS);
clientBuilder.addNetworkInterceptor(new Interceptor() {
@Override
public okhttp3.Response intercept(@NonNull Chain chain) throws IOException {
Request originalRequest = chain.request();
Request newRequest;
HttpUrl originalHttpUrl = originalRequest.url();
HttpUrl url = originalHttpUrl.newBuilder()
.build();
newRequest = originalRequest.newBuilder()
.addHeader(
HttpUtils.HeaderContracts.HEADER_CONTENT_TYPE,
"application/json")
.url(url)
.build();
return chain.proceed(newRequest);
}
});
//
// Create our retrofit ContentApi
Retrofit retrofit = new Retrofit.Builder()
.baseUrl(BASE_URL)
.addConverterFactory(LoganSquareConverterFactory.create())
.client(clientBuilder.build())
.build();
mApi = retrofit.create(TagsRemoteApi.class);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private HttpClient() {\n\t}",
"public static void init() {\n client = new OkHttpClient();\n\n //Construct a HTTP builder\n retrofit = new Retrofit.Builder()\n .client(client)\n .baseUrl(apiAddress)\n .addConverterFactory(GsonConverterFactory.creat... | [
"0.7197032",
"0.7171656",
"0.7171155",
"0.6958948",
"0.69534105",
"0.68127775",
"0.6808561",
"0.67776287",
"0.67225486",
"0.661544",
"0.6605117",
"0.652779",
"0.6487662",
"0.64541733",
"0.64521146",
"0.644852",
"0.6411052",
"0.63950515",
"0.6321122",
"0.6255572",
"0.62475115"... | 0.0 | -1 |
Asynchronously load tags from the remote API. | @Override
public void getTags(@NonNull final ILoadTagsCallback callback) {
Log.d(TAG, "Processing request to get tags from the remote API");
final long startTime = System.nanoTime();
Call<List<Tag>> call = mApi.getTags();
call.enqueue(new Callback<List<Tag>>() {
@Override
public void onResponse(@NonNull Call<List<Tag>> call, @NonNull Response<List<Tag>> response) {
if (response.isSuccessful()) {
List<Tag> tags = response.body();
callback.onTagsLoaded(tags);
} else {
Log.e(TAG, "Error getting tags from remote API: " + response.errorBody());
try {
@SuppressWarnings("ConstantConditions")
final String msg = response.errorBody().string();
callback.onDataNotAvailable(msg);
} catch (IOException io) {
callback.onDataNotAvailable(
TaggerApplication.getInstance().getString(R.string.error_remote_api));
}
long elapsedTime = System.nanoTime() - startTime;
Log.d(TAG, "Total time to pull tags from remote API ["
+ TimeUnit.NANOSECONDS.toSeconds(elapsedTime) + "] seconds");
}
}
@Override
public void onFailure(@NonNull Call<List<Tag>> call, @NonNull Throwable t) {
Log.e(TAG, "Error getting tags from remote API: " + t.getMessage());
callback.onDataNotAvailable(t.getLocalizedMessage());
}
});
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public java.util.concurrent.Future<ListTagsForResourceResult> listTagsForResourceAsync() {\n\n return listTagsForResourceAsync(new ListTagsForResourceRequest());\n }",
"java.util.concurrent.Future<TagResourceResult> tagResourceAsync(TagResourceRequest tagResourceRequest);",
"java.util.... | [
"0.68249595",
"0.65674305",
"0.65674305",
"0.65674305",
"0.63922465",
"0.63922465",
"0.63922465",
"0.6285933",
"0.618277",
"0.6144965",
"0.6104644",
"0.5934002",
"0.5934002",
"0.5934002",
"0.59322166",
"0.5877686",
"0.5863426",
"0.586305",
"0.5808458",
"0.5808458",
"0.5808458... | 0.73582053 | 0 |
the iD to set | public void setID(Integer iD) {
ID = iD;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setiD(int iD) {\n this.iD = iD;\n }",
"public void setID(int iD) {\r\n\t\tthis.iD = iD;\r\n\t}",
"public int getiD() {\n return iD;\n }",
"public void setID(int iD) {\n\t\tID = iD;\n\t}",
"public void setID(int iD) {\n\t\tID = iD;\n\t}",
"public Object setID(int iD)\r\n/* ... | [
"0.76768196",
"0.7319449",
"0.6790419",
"0.67235",
"0.67235",
"0.6653028",
"0.64040196",
"0.6402296",
"0.63704175",
"0.6314182",
"0.62778443",
"0.62552625",
"0.6050811",
"0.6048029",
"0.5994161",
"0.59638304",
"0.5938555",
"0.593169",
"0.59058195",
"0.59058195",
"0.59058195",... | 0.66707885 | 5 |
the beneficiaries to set | public void setBeneficiaries(List<Beneficiary> beneficiaries) {
this.beneficiaries = beneficiaries;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n protected void setRetributionsAndBeneficiaries(){\n // Example for picking the \"chosen ones\" to be benefited from my generous policy\n // First we empty the bag in case we don't want to keep old beneficiaries\n beneficiaries.clear();\n // Pick 3 random territories from ... | [
"0.71354413",
"0.57466984",
"0.5719548",
"0.5706888",
"0.56242853",
"0.5594321",
"0.5534126",
"0.5517855",
"0.5506786",
"0.54892015",
"0.5465038",
"0.54584646",
"0.54492366",
"0.54465747",
"0.54421186",
"0.54245555",
"0.54165876",
"0.5404105",
"0.5374792",
"0.53706956",
"0.52... | 0.5946326 | 1 |
Creates new form Insertar | public Producto_Insertar() {
initComponents();
this.setLocationRelativeTo(null);
setResizable(false);
actualizarJTabale();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void azzeraInsertForm() {\n\t\tviewInserimento.getCmbbxTipologia().setSelectedIndex(-1);\n\t\tviewInserimento.getTxtFieldDataI().setText(\"\");\n\t\tviewInserimento.getTxtFieldValore().setText(\"\");\n\t\tviewInserimento.getTxtFieldDataI().setBackground(Color.white);\n\t\tviewInserimento.getTxtFieldValore(... | [
"0.7578314",
"0.75492144",
"0.73387307",
"0.71786535",
"0.6993657",
"0.69821525",
"0.6917281",
"0.69134146",
"0.6679958",
"0.6616187",
"0.6596118",
"0.65873086",
"0.64759463",
"0.64424086",
"0.6412447",
"0.6405689",
"0.6370716",
"0.63687456",
"0.6352922",
"0.6279667",
"0.6272... | 0.64687157 | 13 |
devuelve la variable que va a contener los campos que el usurio elija | public String devolver_campos_concatenados(){
String dato_concatenado="";
campos_concaenados=" ";
for (int j=0;j<numero_campos;j++){
if(j==numero_campos-1){
dato_concatenado=campos[j];
}else{
dato_concatenado=campos[j]+", ";
}
campos_concaenados=campos_concaenados+dato_concatenado;
}
return campos_concaenados;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void limpiarValores(){\n\t\tpcodcia = \"\";\n\t\tcedula = \"\";\n\t\tcoduser = \"\";\n\t\tcluser = \"\";\n\t\tmail = \"\";\n\t\taudit = \"\";\n\t\tnbr = \"\";\n\t\trol = \"\";\n\t}",
"public void limpiarCampos() {\n\t\ttema = new Tema();\n\t\ttemaSeleccionado = new Tema();\n\t\tmultimedia = new Multimedi... | [
"0.63972265",
"0.6098176",
"0.5999985",
"0.59762293",
"0.5910226",
"0.5871257",
"0.58586556",
"0.58447367",
"0.58413917",
"0.5841347",
"0.5806586",
"0.57913184",
"0.5785847",
"0.5780235",
"0.57735604",
"0.5766233",
"0.5760655",
"0.5739074",
"0.5726779",
"0.57169825",
"0.57164... | 0.0 | -1 |
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() {
jPanel5 = new javax.swing.JPanel();
jPanel6 = new javax.swing.JPanel();
jPanel1 = new javax.swing.JPanel();
jLabel2 = new javax.swing.JLabel();
jComboBox1 = new javax.swing.JComboBox<>();
jTabbedPane1 = new javax.swing.JTabbedPane();
jPanel4 = new javax.swing.JPanel();
jPanel3 = new javax.swing.JPanel();
jScrollPane1 = new javax.swing.JScrollPane();
tabla_campos = new javax.swing.JTable();
jPanel2 = new javax.swing.JPanel();
jLabel1 = new javax.swing.JLabel();
jScrollPane2 = new javax.swing.JScrollPane();
tabla_insertar = new javax.swing.JTable();
jButton2 = new javax.swing.JButton();
jScrollPane3 = new javax.swing.JScrollPane();
mostrar_consulta_insertar = new javax.swing.JTextArea();
jButton1 = new javax.swing.JButton();
jLabel7 = new javax.swing.JLabel();
javax.swing.GroupLayout jPanel5Layout = new javax.swing.GroupLayout(jPanel5);
jPanel5.setLayout(jPanel5Layout);
jPanel5Layout.setHorizontalGroup(
jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGap(0, 100, Short.MAX_VALUE)
);
jPanel5Layout.setVerticalGroup(
jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGap(0, 100, Short.MAX_VALUE)
);
javax.swing.GroupLayout jPanel6Layout = new javax.swing.GroupLayout(jPanel6);
jPanel6.setLayout(jPanel6Layout);
jPanel6Layout.setHorizontalGroup(
jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGap(0, 100, Short.MAX_VALUE)
);
jPanel6Layout.setVerticalGroup(
jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGap(0, 100, Short.MAX_VALUE)
);
setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
jLabel2.setText("Elija la tabla en la que decea ingresar datos:");
jComboBox1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jComboBox1ActionPerformed(evt);
}
});
jTabbedPane1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
tabla_campos.setModel(new javax.swing.table.DefaultTableModel(
new Object [][] {
{null, null, null, null},
{null, null, null, null},
{null, null, null, null},
{null, null, null, null}
},
new String [] {
"Title 1", "Title 2", "Title 3", "Title 4"
}
));
tabla_campos.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
tabla_camposMouseClicked(evt);
}
});
jScrollPane1.setViewportView(tabla_campos);
javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
jPanel3.setLayout(jPanel3Layout);
jPanel3Layout.setHorizontalGroup(
jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel3Layout.createSequentialGroup()
.addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 622, Short.MAX_VALUE)
.addContainerGap())
);
jPanel3Layout.setVerticalGroup(
jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel3Layout.createSequentialGroup()
.addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 172, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(0, 16, Short.MAX_VALUE))
);
javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);
jPanel4.setLayout(jPanel4Layout);
jPanel4Layout.setHorizontalGroup(
jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jPanel3, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
);
jPanel4Layout.setVerticalGroup(
jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel4Layout.createSequentialGroup()
.addContainerGap()
.addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
);
jTabbedPane1.addTab("Elija el campo a ingrear", jPanel4);
javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
jPanel1.setLayout(jPanel1Layout);
jPanel1Layout.setHorizontalGroup(
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addContainerGap()
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jTabbedPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 644, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addComponent(jLabel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jComboBox1, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
);
jPanel1Layout.setVerticalGroup(
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addContainerGap()
.addComponent(jLabel2)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(18, 18, 18)
.addComponent(jTabbedPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 228, Short.MAX_VALUE))
);
jLabel1.setText("Tabla");
tabla_insertar.setModel(new javax.swing.table.DefaultTableModel(
new Object [][] {
{null, null, null, null},
{null, null, null, null},
{null, null, null, null},
{null, null, null, null}
},
new String [] {
"Title 1", "Title 2", "Title 3", "Title 4"
}
));
jScrollPane2.setViewportView(tabla_insertar);
jButton2.setText("Salir");
jButton2.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton2ActionPerformed(evt);
}
});
mostrar_consulta_insertar.setColumns(20);
mostrar_consulta_insertar.setRows(5);
jScrollPane3.setViewportView(mostrar_consulta_insertar);
jButton1.setText("Ejecutar ");
jButton1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton1ActionPerformed(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(84, 84, 84)
.addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 216, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(50, 50, 50)
.addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 215, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addGroup(jPanel2Layout.createSequentialGroup()
.addContainerGap()
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel2Layout.createSequentialGroup()
.addComponent(jLabel1)
.addGap(0, 0, Short.MAX_VALUE))
.addComponent(jScrollPane2)
.addComponent(jScrollPane3))
.addContainerGap())
);
jPanel2Layout.setVerticalGroup(
jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel2Layout.createSequentialGroup()
.addContainerGap()
.addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, 57, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel2Layout.createSequentialGroup()
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(jLabel1)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 127, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(0, 67, Short.MAX_VALUE))
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jButton2)
.addComponent(jButton1))
.addContainerGap())))
);
jLabel7.setText("Consulta:");
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addContainerGap()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addGroup(layout.createSequentialGroup()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addGroup(layout.createSequentialGroup()
.addGap(19, 19, 19)
.addComponent(jLabel7)))
.addGap(6, 6, 6)))
.addContainerGap(31, Short.MAX_VALUE))
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addContainerGap()
.addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jLabel7)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addContainerGap())
);
pack();
} | {
"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.73212945",
"0.72917914",
"0.72917914",
"0.72917914",
"0.7287366",
"0.7249836",
"0.721417",
"0.72097963",
"0.7196912",
"0.71916485",
"0.71853215",
"0.71597755",
"0.71489745",
"0.70949036",
"0.708269",
"0.70589983",
"0.698844",
"0.69783324",
"0.69561446",
"0.6955426",
"0.694... | 0.0 | -1 |
/Checks all views are initialised correctly | @Test
public void testComplaintFragmentLaunch() throws Exception {
DrawerLayout rlContainer = mActivity.findViewById(R.id.drawer_layout);
assertNotNull(rlContainer);
ComplaintFragment complaintFragment = new ComplaintFragment();
mActivity.getSupportFragmentManager().beginTransaction().add(complaintFragment, null).commitAllowingStateLoss();
getInstrumentation().waitForIdleSync();
View view = complaintFragment.getView().findViewById(R.id.spinner);
assertNotNull(view);
view = complaintFragment.getView().findViewById(R.id.complaintBody);
assertNotNull(view);
view = complaintFragment.getView().findViewById(R.id.submitButton);
assertNotNull(view);
view = complaintFragment.getView().findViewById(R.id.nameEditText);
assertNotNull(view);
view = complaintFragment.getView().findViewById(R.id.emailEditText);
assertNotNull(view);
view = complaintFragment.getView().findViewById(R.id.reportLinkText);
assertNotNull(view);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void initViews() {\n\n\t}",
"@Override\r\n\tpublic void initViews() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void initViews() {\n\t\t\r\n\t}",
"private void initViews() {\n\n }",
"@Override\r\n\tprotected void initViews() {\n\t\t\r\n\t}",
"private void viewInit() {\n }",
"protected abstrac... | [
"0.76840395",
"0.7516897",
"0.7516897",
"0.7489551",
"0.74478006",
"0.7425183",
"0.7410775",
"0.7279723",
"0.72554517",
"0.70996237",
"0.70667434",
"0.7016301",
"0.6936267",
"0.6921358",
"0.6917032",
"0.69114363",
"0.68975776",
"0.6892906",
"0.6881936",
"0.68536687",
"0.67825... | 0.0 | -1 |
/Checks all the spinner choices and checks that the correct views are displayed for each one | @Test
public void checkSpinnerChoicesViews(){
String [] VALUES = {"Education", "Transport", "Planning", "Fire and Public Safety", "Social Care", "Libraries", "Waste Management",
"Allotments", "Public Clocks", "Bus Shelters", "Community Centres", "Play Areas", "Grants", "Neighbourhood Planning", "Litter, Fouling and Graffiti"};
String [] PARISH_ISSUES =
{"Allotments", "Public Clocks", "Bus Shelters", "Community Centres", "Play Areas", "Grants", "Neighbourhood Planning", "Litter, Fouling and Graffiti"};
DrawerLayout rlContainer = mActivity.findViewById(R.id.drawer_layout);
ComplaintFragment complaintFragment = new ComplaintFragment();
mActivity.getSupportFragmentManager().beginTransaction().replace(R.id.drawer_layout, complaintFragment).commitAllowingStateLoss();
getInstrumentation().waitForIdleSync();
String str = null;
for(int i = 0; i< 15 ; i++ ) {
str = VALUES[i];
onView(withId(R.id.spinner))
.perform(click());
onData(hasToString(startsWith(str)))
.perform(click());
if (Arrays.asList(PARISH_ISSUES).contains(str)) {
assertTrue(complaintFragment.getView().findViewById(R.id.submitButton).isShown());
assertTrue(complaintFragment.getView().findViewById(R.id.complaintBody).isShown());
assertFalse(complaintFragment.getView().findViewById(R.id.reportLinkText).isShown());
} else {
assertFalse(complaintFragment.getView().findViewById(R.id.submitButton).isShown());
assertFalse(complaintFragment.getView().findViewById(R.id.complaintBody).isShown());
assertTrue(complaintFragment.getView().findViewById(R.id.reportLinkText).isShown());
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void checkSpinnerText() {\n\n for (int i = 0; i < 8; i++) {\n\n // Opens the spinner\n onView(withId(R.id.notifyTime)).perform(click());\n String strToCheck = \"\";\n\n // Sets the proper string that will be checked, depending on the loop\n swit... | [
"0.6892875",
"0.6658848",
"0.6464975",
"0.63568443",
"0.6328559",
"0.63121486",
"0.6269708",
"0.62651074",
"0.62351483",
"0.6143791",
"0.6130148",
"0.6065345",
"0.6032258",
"0.6025377",
"0.6021783",
"0.5944539",
"0.5940946",
"0.5917317",
"0.58716387",
"0.5862797",
"0.58514565... | 0.725183 | 0 |
Sets the ContractInfo object containing the content details for this contract. This method is always called after the constructor. | public void initContract(ContractInfo contractInfo)
{
this.contractInfo = contractInfo;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Contract() {\n // initialise instance variables\n generateContractId();\n }",
"public Contracts() {\r\n super();\r\n \r\n }",
"public ContractorInfoPanel() {\n\t\tinitComponents();\n\t}",
"private void rsSetInfo(ResultSet rs,ContractNumberInfo info) throws SQLException... | [
"0.54237705",
"0.5330933",
"0.52496046",
"0.5240318",
"0.5220828",
"0.51803553",
"0.5141828",
"0.5133024",
"0.5104752",
"0.5097632",
"0.5093247",
"0.5093247",
"0.5093247",
"0.5093247",
"0.50880337",
"0.5086451",
"0.5077606",
"0.5072188",
"0.5051171",
"0.50433576",
"0.5030987"... | 0.6722406 | 0 |
Creates a smart contract with the provided binary code, arguments and value on the blockchain. If the creation succeeds, a Java wrapper class instance is created that implements all interaction logic to access smart contract fields and execute transactions. | public static <T extends TradeContract> T deployContract(
final Class<T> clazz,
final Web3j web3j,
final TransactionManager transactionManager,
final BigInteger gasPrice,
final BigInteger gasLimit,
final ContractInfo contractInfo,
final String binary,
final BigInteger value,
final Type... args) throws Exception
{
String encodedConstructor = FunctionEncoder.encodeConstructor(Arrays.asList(args));
T contract = deploy(clazz, web3j, transactionManager, gasPrice, gasLimit, binary, encodedConstructor, value);
contract.initContract(contractInfo);
return contract;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected String createContract(String code, Object[] args, String filename) throws APIException, InterruptedException {\n TransactionResult result = contractService.create(null, code, ContractService.CodeType.solidity, args, null, null, null,\n filename, true, \"byzantium\", null);\n asse... | [
"0.59674364",
"0.5648199",
"0.548985",
"0.5399393",
"0.5374691",
"0.534959",
"0.53261477",
"0.52128315",
"0.49898595",
"0.4961681",
"0.4917093",
"0.4910143",
"0.4801442",
"0.4757794",
"0.47300914",
"0.47109178",
"0.46756515",
"0.46756515",
"0.46756515",
"0.46756515",
"0.46554... | 0.5790945 | 1 |
Creates and initializes a Java wrapper class derived from TradeContract that contains the interaction logic for the smart contract on the specified contract address. | public static <T extends TradeContract> T loadContract(
final Class<T> clazz,
final String contractAddress,
final Web3j web3j,
final TransactionManager transactionManager,
final BigInteger gasPrice,
final BigInteger gasLimit,
final ContractInfo contractInfo) throws Exception
{
Constructor<T> constructor = clazz.getDeclaredConstructor(
String.class, Web3j.class, TransactionManager.class, BigInteger.class, BigInteger.class);
constructor.setAccessible(true);
T contract = constructor.newInstance(contractAddress, web3j, transactionManager, gasPrice, gasLimit);
contract.initContract(contractInfo);
return contract;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Contract create(){\n\t\treturn new Contract();\n\t}",
"private Contract() {\n }",
"public static <T extends TradeContract> T deployContract(\n final Class<T> clazz,\n final Web3j web3j,\n final TransactionManager transactionManager,\n final BigInteger gasP... | [
"0.5541811",
"0.55135757",
"0.5506414",
"0.54707354",
"0.54567343",
"0.5382646",
"0.5371153",
"0.5273161",
"0.52435035",
"0.5217256",
"0.5183721",
"0.51800257",
"0.51215476",
"0.5107429",
"0.5067627",
"0.50482786",
"0.5027215",
"0.4985654",
"0.49802414",
"0.49602798",
"0.4925... | 0.5907663 | 0 |
Registers the aborted event of the contract | protected void registerContractEvents()
{
Event event = new Event("aborted", new ArrayList<TypeReference<?>>(), new ArrayList<TypeReference<?>>());
registerEvent(event);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void aborted() {\n System.out.println(\"Aborted\");\n }",
"@SubscribeEvent\n\tpublic void abilityAborted(AbilityEvent.AbortControl event) {\n\t\tClientUtils.playSound(abortSound, 1.0f);\n\t}",
"@DISPID(10)\r\n\t// = 0xa. The runtime will prefer the VTID if present\r\n\t@VTID(14)\r\n\tboolean a... | [
"0.6976553",
"0.6690736",
"0.66824865",
"0.64255613",
"0.63455075",
"0.63455075",
"0.63455075",
"0.63455075",
"0.63249886",
"0.62785",
"0.6126577",
"0.611277",
"0.5926144",
"0.5868352",
"0.57842135",
"0.5758631",
"0.5741838",
"0.5712634",
"0.5697151",
"0.5695252",
"0.5695198"... | 0.7496337 | 0 |
Unregisters all events that are registered for this contract | protected void unregisterContractEvents()
{
for(final Subscription subscription : subscriptions)
{
Async.run(new Callable<Void>() {
@Override
public Void call() throws Exception {
subscription.unsubscribe();
return null;
}
});
}
subscriptions.clear();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void clearEvents()\n {\n ClientListener.INSTANCE.clear();\n BackingMapListener.INSTANCE.clear();\n }",
"protected void clearEvents() {\n\t\tsCInterface.clearEvents();\n\n\t}",
"public void removeEvents(){\n for(Entry<Class, List<EventTrigger>> eventGroup: HandlerRegist... | [
"0.7127482",
"0.7125726",
"0.6902699",
"0.6849386",
"0.6812281",
"0.6627415",
"0.6627415",
"0.6627102",
"0.6584541",
"0.6565742",
"0.6561383",
"0.6549401",
"0.64841443",
"0.6469625",
"0.6443669",
"0.64392537",
"0.6437863",
"0.6425885",
"0.6355782",
"0.62978",
"0.6260593",
"... | 0.8265117 | 0 |
Registers the specified event on the smart contract. | protected void registerEvent(final Event event)
{
String encodedEventSignature = EventEncoder.encode(event);
final EthFilter filter = new EthFilter(DefaultBlockParameterName.EARLIEST, DefaultBlockParameterName.LATEST, getContractAddress()).addSingleTopic(encodedEventSignature);
Async.toPromise(new Callable<Subscription>() {
@Override
public Subscription call() throws Exception {
return web3j.ethLogObservable(filter).subscribe(
new Action1<Log>() {
@Override
public void call(Log log) {
notifyObservers(event.getName(), null);
}
});
}
}).done(new DoneCallback<Subscription>() {
@Override
public void onDone(Subscription result) {
subscriptions.add(result);
}
});
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void addEvent(Event event) {\n\t\t\n\t}",
"void onBusEvent(Event event);",
"public void enqueueEvent(InputEvent event) {\n events.add(event);\n }",
"public void addEvPEC(Event ev);",
"public void addEvent(Event event) {\n events.add(event);\n }",
"void addEventRegistrationCallb... | [
"0.63697904",
"0.61282265",
"0.5995638",
"0.5962714",
"0.595898",
"0.59424335",
"0.5925185",
"0.58860075",
"0.5877175",
"0.5862411",
"0.5846351",
"0.58097845",
"0.5797892",
"0.5796897",
"0.57711333",
"0.5765043",
"0.57601255",
"0.57209456",
"0.57049704",
"0.57024825",
"0.5696... | 0.7113204 | 0 |
Construct with an image url. | public ImageSearchParams(String imageUrl) {
super(imageUrl);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Builder addImage(URL value);",
"Builder addThumbnailUrl(URL value);",
"void setImageFromURL(String imageURL);",
"Builder addThumbnailUrl(String value);",
"public Picture(String url) {\n\t\t//file naming convention: noOfTypos_image_imageNo\n\t\t//3_image_1\n\t\tnoTypos = Integer.parseInt(Character.toString(... | [
"0.74070376",
"0.65345263",
"0.63728076",
"0.63681906",
"0.6343821",
"0.63141465",
"0.62965876",
"0.6296229",
"0.6273383",
"0.62437195",
"0.61932534",
"0.61885834",
"0.6131782",
"0.59675705",
"0.5961342",
"0.59561104",
"0.59523016",
"0.594023",
"0.59386206",
"0.59343773",
"0.... | 0.600082 | 13 |
Inflate the menu; this adds items to the action bar if it is present. | @Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.menu_main, menu);
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tMenuInflater inflater = getMenuInflater();\n \tinflater.inflate(R.menu.main_activity_actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {... | [
"0.7246102",
"0.7201358",
"0.7194834",
"0.7176498",
"0.71066517",
"0.7039537",
"0.7037961",
"0.70112145",
"0.70094734",
"0.69807225",
"0.6944953",
"0.69389373",
"0.6933199",
"0.6916928",
"0.6916928",
"0.6891486",
"0.68831646",
"0.68754137",
"0.68745375",
"0.68621665",
"0.6862... | 0.0 | -1 |
Handle action bar item clicks here. The action bar will automatically handle clicks on the Home/Up button, so long as you specify a parent activity in AndroidManifest.xml. | @Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case R.id.reset:
reset();
return true;
case R.id.action_settings:
// openSettings();
return true;
default:
return super.onOptionsItemSelected(item);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public boolean onOptionsItemSelected(MenuItem item) { Handle action bar item clicks here. The action bar will\n // automatically handle clicks on the Home/Up button, so long\n // as you specify a parent activity in AndroidManifest.xml.\n\n //\n // HANDLE BACK BUTTON\n ... | [
"0.79052806",
"0.7806316",
"0.7767438",
"0.772778",
"0.76324606",
"0.7622031",
"0.758556",
"0.7531728",
"0.7489057",
"0.74576724",
"0.74576724",
"0.743964",
"0.7422121",
"0.74037784",
"0.73926556",
"0.7387903",
"0.73803806",
"0.73715395",
"0.7362778",
"0.7357048",
"0.7346653"... | 0.0 | -1 |
Get current size of heap in bytes | @FXML
public void checkMemory()
{
long heapSize = Runtime.getRuntime().totalMemory();
System.out.println("Current: " +heapSize);
// Get maximum size of heap in bytes. The heap cannot grow beyond this size.// Any attempt will result in an OutOfMemoryException.
long heapMaxSize = Runtime.getRuntime().maxMemory();
System.out.println("Max: " + heapMaxSize);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public abstract Extent getHeapSize();",
"public int heapSize();",
"int getLocalOffHeapSize();",
"int getLocalOnHeapSize();",
"long getLocalOffHeapSizeInBytes();",
"long getLocalOnHeapSizeInBytes();",
"public int size()\r\n\t{\r\n\t\treturn heap.size();\r\n\t}",
"public int size() {\n\t\treturn heap.s... | [
"0.8371187",
"0.8313614",
"0.80645066",
"0.8047952",
"0.80238235",
"0.7992686",
"0.7811259",
"0.77949077",
"0.76471555",
"0.75945365",
"0.7548146",
"0.7339693",
"0.72737074",
"0.72572285",
"0.725548",
"0.71607",
"0.7154912",
"0.71542466",
"0.71044075",
"0.7071545",
"0.7069198... | 0.0 | -1 |
name of the user Default constructor | public Calendar() throws RemoteException {
this.sentinel = -1;
this.sentinelC = -1;
this.ownerTracker = 0;
this.chatClients = new ArrayList<RemCalendar>();
this.loggedIn = new ArrayList<>();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void DefaultConstructor(){}",
"TypesOfConstructor(){\n System.out.println(\"This is default constructor\");\n }",
"defaultConstructor(){}",
"private Default()\n {}",
"ConstructorPractice () {\n\t\tSystem.out.println(\"Default Constructor\");\n\t}",
"public User() {\n /**\n ... | [
"0.7858151",
"0.77360845",
"0.7729877",
"0.7653392",
"0.75878114",
"0.7026368",
"0.6979754",
"0.6910342",
"0.6877255",
"0.68523216",
"0.6829931",
"0.6821819",
"0.6733698",
"0.6733213",
"0.66815037",
"0.66592216",
"0.66252536",
"0.6601716",
"0.6537583",
"0.65223515",
"0.647010... | 0.0 | -1 |
Method that registers client for notifications | public synchronized void registerChatClient(RemCalendar chatClient) throws RemoteException {
this.chatClients.add(chatClient);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void registerCustomerToEvent(Client client) {\n\n\t}",
"public interface Client extends ClientBase {\n\n\t/**\n\t * Adds a new listener for the client.<br>\n\t * <b>Note</b> that listeners should be added immediately when receiving the incoming notification.\n\t */\n\tpublic Client addListener(ClientListe... | [
"0.6802222",
"0.6752653",
"0.6746669",
"0.6562998",
"0.6307924",
"0.620944",
"0.6109825",
"0.6105455",
"0.6090556",
"0.6088088",
"0.6068953",
"0.60665274",
"0.60617256",
"0.6048385",
"0.6029329",
"0.6024413",
"0.5966964",
"0.5955543",
"0.5927973",
"0.5903841",
"0.58896476",
... | 0.6237991 | 5 |
For each Client that was added into group event send a message | public synchronized void broadcastMessage(String message) throws RemoteException {
System.out.println("Server: Message > " + "broadcastMessage() invoked");
int i = 0;
while (i < chatClients.size()) {
// Retrieve notification
RemCalendar client = chatClients.get(i++);
String name = client.getPosterName();
//System.out.println("POSTER: "+name);
if (!message.contains(name))
client.retrieveMessage(message);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void sendGroupMessage(String message){\n\n\t\tObject[] userIDs = chatInstanceMap.keySet().toArray();\n\n\t\tfor(int i = 0; i < userIDs.length; i++ ){\n\n\t\t\tsendMessage((String) userIDs[i], message);\n\t\t}\n\t}",
"private void sendGMToAll(String msg){\r\n for(ClientHandler ch: clientThreads){\r\n... | [
"0.7004239",
"0.67493844",
"0.66874343",
"0.65127146",
"0.6479878",
"0.6399144",
"0.63397515",
"0.6177589",
"0.61509985",
"0.6145172",
"0.60738677",
"0.6059764",
"0.6058588",
"0.60341245",
"0.6025711",
"0.60100317",
"0.599074",
"0.5957482",
"0.59574586",
"0.5946862",
"0.59193... | 0.0 | -1 |
Returns the list of the current registered users | public ArrayList<String> getActiveUsers() throws RemoteException {
ArrayList<String> currNames = (ArrayList<String>) names.clone();
return currNames;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public List<String> listUsers() \n\t{\n\t\treturn this.userList.keys();\n\t\t\n\t}",
"public List<Users> getUserAlreadyRegistered() {\n\t\treturn this.UserAlreadyRegistered;\n\t}",
"public List<User> getUserList()\r\n\t{\r\n\t//\tGet the user list\r\n\t//\r\n\t\treturn identificationService.loadUserList();\r\n... | [
"0.7983911",
"0.7973848",
"0.78846174",
"0.7688105",
"0.7669603",
"0.76679057",
"0.76530254",
"0.7647879",
"0.764743",
"0.7633722",
"0.76268834",
"0.7615842",
"0.76120913",
"0.76067287",
"0.7585604",
"0.7577017",
"0.7573694",
"0.75693226",
"0.75692743",
"0.7563879",
"0.755319... | 0.0 | -1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.