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 |
|---|---|---|---|---|---|---|
endregion loadCDAccounts region ATM this function loads in ATM accounts from a flat file and stores the information in the accounts array. | private void loadATMAccounts(String atmAccountFileName)
{
try
{
/* Open the file to read */
File inputFile = new File(atmAccountFileName);
/* Create a scanner to begin reading from file */
Scanner input = new Scanner(inputFile);
while (input.hasNextLine())
{
//reading...
String currentLine = input.nextLine();
//parse on commas...
String[] splitLine = currentLine.split(",");
//DateFormat class to parse Date from file
DateFormat dateFormat = DateFormat.getDateInstance(DateFormat.SHORT);
//parse out data...
int accountId = Integer.parseInt(splitLine[0]);
String ssn = splitLine[1];
Date dateOpened = dateFormat.parse(splitLine[2]);
int pin = Integer.parseInt(splitLine[3]);
Date lastDateUsed = dateFormat.parse(splitLine[4]);
int dailyUsageCount = Integer.parseInt(splitLine[5]);
String cardNumber = splitLine[6];
ATM atmAccount = new ATM(accountId,
ssn,
dateOpened,
pin,
lastDateUsed,
dailyUsageCount,
cardNumber);
ArrayList<Transaction> accountTransactions = transactionHashMap.get(accountId);
atmAccount.setTransactions(accountTransactions);
//add ATM accounts...
accounts.add(atmAccount);
}
input.close();
} catch (Exception e)
{
e.printStackTrace();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void loadCDAccounts(String cdAccountFileName)\n {\n try\n {\n /* Open the file to read */\n File inputFile = new File(cdAccountFileName);\n\n /* Create a scanner to begin reading from file */\n Scanner input = new Scanner(inputFile);\n\n ... | [
"0.73518693",
"0.6525595",
"0.62218785",
"0.5989088",
"0.5949603",
"0.59395206",
"0.5873022",
"0.5864646",
"0.5799828",
"0.57642037",
"0.5731781",
"0.57089686",
"0.5551101",
"0.55068564",
"0.5405822",
"0.5370888",
"0.5296513",
"0.52961",
"0.52231514",
"0.5215728",
"0.5176544"... | 0.68093747 | 1 |
endregion loadATMAccounts region loadCreditCardAccounts this function loads in Credit Card accounts from a flat file and stores the information in the accounts array. | private void loadCreditCardAccounts(String creditCardAccountFileName)
{
try
{
/* Open the file to read */
File inputFile = new File(creditCardAccountFileName);
/* Create a scanner to begin reading from file */
Scanner input = new Scanner(inputFile);
while (input.hasNextLine())
{
//read...
String currentLine = input.nextLine();
//parsing out on commas...
String[] splitLine = currentLine.split(",");
//DateFormat class to parse Date from file
DateFormat dateFormat = DateFormat.getDateInstance(DateFormat.SHORT);
//parsing out data.
int accountId = Integer.parseInt(splitLine[0]);
double balance = Double.parseDouble(splitLine[1]);
String ssn = splitLine[2];
double interestRate = Double.parseDouble(splitLine[3]);
Date dateOpened = dateFormat.parse(splitLine[4]);
Date dueDate = dateFormat.parse(splitLine[5]);
Date dateNotified = dateFormat.parse(splitLine[6]);
double currentPaymentDue = Double.parseDouble(splitLine[7]);
Date lastPaymentDate = dateFormat.parse(splitLine[8]);
boolean missedPayment = Boolean.parseBoolean(splitLine[9]);
double limit = Double.parseDouble(splitLine[10]);
String creditCardNumber = splitLine[11];
int cvv = Integer.parseInt(splitLine[12]);
CreditCard creditCardAccount = new CreditCard(accountId,
balance,
ssn,
interestRate,
dateOpened,
dueDate,
dateNotified,
currentPaymentDue,
lastPaymentDate,
missedPayment,
limit,
creditCardNumber,
cvv);
ArrayList<Transaction> accountTransactions = transactionHashMap.get(accountId);
creditCardAccount.setTransactions(accountTransactions);
//add credit cards
accounts.add(creditCardAccount);
}
input.close();
} catch (Exception e)
{
e.printStackTrace();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void loadATMAccounts(String atmAccountFileName)\n {\n try\n {\n /* Open the file to read */\n File inputFile = new File(atmAccountFileName);\n\n /* Create a scanner to begin reading from file */\n Scanner input = new Scanner(inputFile);\n\n ... | [
"0.68836755",
"0.66612107",
"0.60691875",
"0.599398",
"0.5963393",
"0.5854659",
"0.58445704",
"0.5695181",
"0.5672308",
"0.5513834",
"0.54414356",
"0.5365444",
"0.5352762",
"0.5335999",
"0.52888954",
"0.5243351",
"0.52357936",
"0.52310264",
"0.5223092",
"0.50902563",
"0.50137... | 0.719495 | 0 |
endregion loadCreditCardAccounts region loadTermLoanAccounts | private void loadTermLoanAccounts(String termLoanAccountFileName)
{
try
{
/* Open the file to read */
File inputFile = new File(termLoanAccountFileName);
/* Create a scanner to begin reading from file */
Scanner input = new Scanner(inputFile);
while (input.hasNextLine())
{
//reading...
String currentLine = input.nextLine();
//parsing out on commas...
String[] splitLine = currentLine.split(",");
//DateFormat class to parse Date from file
DateFormat dateFormat = DateFormat.getDateInstance(DateFormat.SHORT);
//parsing out data...
int accountId = Integer.parseInt(splitLine[0]);
double balance = Double.parseDouble(splitLine[1]);
String ssn = splitLine[2];
double interestRate = Double.parseDouble(splitLine[3]);
Date dateOpened = dateFormat.parse(splitLine[4]);
Date dueDate = dateFormat.parse(splitLine[5]);
Date dateNotified = dateFormat.parse(splitLine[6]);
double currentPaymentDue = Double.parseDouble(splitLine[7]);
Date lastPaymentDate = dateFormat.parse(splitLine[8]);
boolean missedPayment = Boolean.parseBoolean(splitLine[9]);
char loanType = splitLine[10].charAt(0);
TermLoanType termLoanType;
//this determines whether the loan is long or short.
if (loanType == 'S')
{
termLoanType = TermLoanType.SHORT;
}
else
{
termLoanType = TermLoanType.LONG;
}
int years = Integer.parseInt(splitLine[11]);
TermLoan termLoanAccount = new TermLoan(accountId,
balance,
ssn,
interestRate,
dateOpened,
dueDate,
dateNotified,
currentPaymentDue,
lastPaymentDate,
missedPayment,
termLoanType,
years);
ArrayList<Transaction> accountTransactions = transactionHashMap.get(accountId);
termLoanAccount.setTransactions(accountTransactions);
//adds term loan accounts
accounts.add(termLoanAccount);
}
input.close();
} catch (Exception e)
{
e.printStackTrace();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void loadAccounts() {\n JsonReader jsonReader = null;\n try {\n jsonReader = new JsonReader(parkinglots, \"account\");\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n try {\n accounts = jsonReader.findall();\n } c... | [
"0.5649928",
"0.56111956",
"0.54479164",
"0.53980935",
"0.5179619",
"0.5168199",
"0.5140674",
"0.51271516",
"0.51196533",
"0.5043029",
"0.49726382",
"0.49442443",
"0.49310264",
"0.49270138",
"0.48633078",
"0.48611084",
"0.4839809",
"0.48233896",
"0.4803957",
"0.48016557",
"0.... | 0.68836474 | 0 |
endregion loadTermLoanAccounts region loadTransactions this function loads the transaction information from a flat file and stores the information in the accounts array. | private void loadTransactions(String transactionFileName)
{
try
{
/* Open the file to read */
File inputFile = new File(transactionFileName);
/* Create a scanner to begin reading from file */
Scanner input = new Scanner(inputFile);
while (input.hasNextLine())
{
//read...
String currentLine = input.nextLine();
//parse on commas...
String[] splitLine = currentLine.split(",");
//DateFormat class to parse Date from file
DateFormat dateFormat = DateFormat.getDateInstance(DateFormat.SHORT);
int transactionId = Integer.parseInt(splitLine[0]);
String accountTypeChar = splitLine[1];
TransactionType transactionType = null;
switch (accountTypeChar)
{
case "D":
transactionType = TransactionType.DEBIT;
break;
case "C":
transactionType = TransactionType.CREDIT;
break;
case "T":
transactionType = TransactionType.TRANSFER;
}
String description = splitLine[2];
Date date = dateFormat.parse(splitLine[3]);
double amount = Double.parseDouble(splitLine[4]);
int accountId = Integer.parseInt(splitLine[5]);
Transaction transaction = new Transaction(transactionId,
transactionType,
description,
date,
amount,
accountId);
transactionHashMap.putIfAbsent(accountId, new ArrayList<>());
transactionHashMap.get(accountId).add(transaction);
}
input.close();
} catch (Exception e)
{
e.printStackTrace();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void loadTermLoanAccounts(String termLoanAccountFileName)\n {\n try\n {\n /* Open the file to read */\n File inputFile = new File(termLoanAccountFileName);\n\n /* Create a scanner to begin reading from file */\n Scanner input = new Scanner(inputF... | [
"0.6934357",
"0.5732514",
"0.5263707",
"0.52186877",
"0.52076316",
"0.5183294",
"0.50124454",
"0.50121313",
"0.49514705",
"0.49156567",
"0.4912407",
"0.48436573",
"0.47834778",
"0.47430384",
"0.47360456",
"0.4698839",
"0.46833056",
"0.46304286",
"0.45958683",
"0.44460794",
"0... | 0.560523 | 2 |
/ compiled from: PackageFragmentDescriptor.kt | public interface PackageFragmentDescriptor extends ClassOrPackageFragmentDescriptor {
@NotNull
ModuleDescriptor getContainingDeclaration();
@NotNull
FqName getFqName();
@NotNull
MemberScope getMemberScope();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n protected FragmentPackage[] getFragmentPackages() {\n FragmentPackage[] packages = new FragmentPackage[2];\n String fragmentKey;\n\n fragmentKey = \"CONEXUS_\" + conexusID + \"_ABOUT\";\n packages[ABOUT_FRAGMENT] = new FragmentPackage(\"ABOUT\", fragmentKey, new FragmentC... | [
"0.65615684",
"0.61269087",
"0.59309334",
"0.58306915",
"0.58217955",
"0.5793583",
"0.57865983",
"0.5681312",
"0.5677673",
"0.5677647",
"0.56025827",
"0.5601723",
"0.56006914",
"0.55926394",
"0.5584566",
"0.55463386",
"0.55433303",
"0.55411637",
"0.5518877",
"0.5502538",
"0.5... | 0.7519572 | 0 |
Creates a new instance of SlanjePoruke | public SlanjePoruke() {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Klassenstufe createKlassenstufe();",
"Schueler createSchueler();",
"public NhanVien()\n {\n }",
"public Pasien() {\r\n }",
"public TebakNusantara()\n {\n }",
"public OVChipkaart() {\n\n }",
"Reproducible newInstance();",
"public Postoj() {}",
"public Manusia() {}",
"Vaisseau_Vai... | [
"0.6374723",
"0.63519883",
"0.6315911",
"0.62927693",
"0.6259766",
"0.624104",
"0.62103045",
"0.6142554",
"0.6130003",
"0.6120141",
"0.6120141",
"0.6120141",
"0.6120141",
"0.61150706",
"0.609925",
"0.6086423",
"0.6059511",
"0.6043372",
"0.59870344",
"0.5984103",
"0.59569633",... | 0.7959921 | 0 |
update return if there is no primary key value | public void update(T instance) throws Exception {
String primaryKeyValue=ReflectionUtils.getFieldValue(instance,instance.getPrimaryKeyName());
if(null==primaryKeyValue){
throw new Exception("This is no primary key value");
}
initDBTableMeta(instance);
String setClause=buildSQLKeyValueMap(instance,",");
String whereClause =instance.getPrimaryKeyName()+"="+primaryKeyValue;
String sql = UPDATE+tableName+SET+setClause+WHERE+whereClause;
logger.info("usedSql={}", sql);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"int updateByPrimaryKeySelective(Prueba record);",
"int updateByPrimaryKey(PrhFree record);",
"int updateByPrimaryKeySelective(PrhFree record);",
"int updateByPrimaryKeySelective(Assist_table record);",
"int updateByPrimaryKey(Trueorfalse record);",
"@Override\n\tpublic int updateByPrimaryKey(Checkingin r... | [
"0.7096611",
"0.69920826",
"0.69857854",
"0.696966",
"0.6948869",
"0.69353324",
"0.6908561",
"0.68726605",
"0.68669134",
"0.68442255",
"0.68355405",
"0.6835449",
"0.682873",
"0.6820396",
"0.6793507",
"0.67920583",
"0.6785696",
"0.6781301",
"0.6774741",
"0.6762354",
"0.6761867... | 0.0 | -1 |
Indicate the listener can be notified or not. If you sometimes do not want to get notification from the drag runtime, you can return false to reject the notification. | @Deprecated
@Override
public boolean disableNotify(IDragSource source, IDropTarget target, IDataObject data) {
return false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean canStartDrag()\n\t{\n\t\treturn !isDragging();\n\t}",
"boolean hasChangeEvent();",
"public abstract boolean canHandle(Object event);",
"private\n boolean\n allowEvents()\n {\n return itsAllowEvents;\n }",
"@SuppressWarnings(\"unused\")\n public void setNotifyWhileDragging(boolean f... | [
"0.63021713",
"0.62334484",
"0.6221335",
"0.6192852",
"0.6166463",
"0.6092532",
"0.60476846",
"0.60476846",
"0.60180175",
"0.59964097",
"0.5984197",
"0.5983972",
"0.5965975",
"0.5964128",
"0.58866036",
"0.5876898",
"0.5874481",
"0.5856681",
"0.57802284",
"0.57260954",
"0.5726... | 0.5754494 | 19 |
Called when being dragging. | @Override
public void onDragging(DragParams params) {
// Do nothing.
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void onDragStarted(int position) {\n }",
"void onDragged();",
"protected abstract boolean dragged();",
"public boolean onDragStarted();",
"@Override\n public void drag(int x, int y)\n {\n }",
"@Override\n\t\t\tpublic void mouseDragged(MouseEvent e) {\n\t\... | [
"0.8052832",
"0.80496275",
"0.7808168",
"0.77839285",
"0.7728234",
"0.7557964",
"0.7552459",
"0.7523784",
"0.7523784",
"0.7505783",
"0.7505783",
"0.7505783",
"0.74886245",
"0.74502325",
"0.7447916",
"0.7438606",
"0.7437854",
"0.7434184",
"0.7434184",
"0.7434184",
"0.7434184",... | 0.699422 | 65 |
The drag has ended. | @Override
public void onDragEnd() {
// Do nothing.
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void onDragEnded();",
"@Override\n\tpublic void onDragEnd(boolean success) {\n\t\t\n\t}",
"public void dragEnd() {\n\t \n\t super.dragEnd();\n\t view.dragEnd();\n\t }",
"public void dragDropEnd(boolean success);",
"private synchronized void endDrag() {\n this.setCursor(Cursor.getPredefin... | [
"0.8147768",
"0.79081416",
"0.7878827",
"0.77348536",
"0.7372295",
"0.69938624",
"0.69011664",
"0.6814797",
"0.67319787",
"0.6626733",
"0.66203356",
"0.6619145",
"0.6612122",
"0.65959346",
"0.6583257",
"0.6580259",
"0.6552208",
"0.6428908",
"0.6405349",
"0.6393617",
"0.637996... | 0.7039435 | 5 |
Constructor for Initializing fields | public AttributeField(Field field){
this.field = field;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Field() {\r\n\t}",
"public Field(){\n\n // this(\"\",\"\",\"\",\"\",\"\");\n }",
"@Override\n\tprotected void initializeFields() {\n\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"private void init() {\n FieldWrapper id = new FieldWrapper();\n id.fieldDescription = new HashMap<St... | [
"0.750252",
"0.745184",
"0.7340145",
"0.73054254",
"0.72578007",
"0.7188838",
"0.71866727",
"0.7156399",
"0.70855963",
"0.70530933",
"0.7048569",
"0.70177007",
"0.6960288",
"0.6940037",
"0.6927436",
"0.6927436",
"0.6927436",
"0.6917838",
"0.6917778",
"0.69038004",
"0.68808234... | 0.0 | -1 |
Gets the name of the field | public String getName(){
return field.getName();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"String getFieldName();",
"public String getFieldName();",
"public String getFieldName() {\n return TF_Field_Name;\n }",
"public java.lang.String getFieldName() {\n return fieldName;\n }",
"@Override\n public String name() {\n return fieldName;\n }",
"public String getFiel... | [
"0.84166765",
"0.81717926",
"0.8073378",
"0.8041018",
"0.8014589",
"0.7953863",
"0.79458535",
"0.78768885",
"0.78624946",
"0.78624946",
"0.78624946",
"0.78598595",
"0.78431994",
"0.7842364",
"0.78367186",
"0.78339374",
"0.7830375",
"0.7775166",
"0.7746",
"0.774072",
"0.773608... | 0.8845412 | 0 |
Gets the type of the field | public Class<?> getType(){
return field.getType();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public FieldType getType();",
"public String getFieldType()\n\t{\n\t\treturn fieldType;\n\t}",
"public String getFieldType()\n {\n return m_strFieldType;\n }",
"public java.lang.String getFieldType() {\n return fieldType;\n }",
"public Class getFieldType() {\n String type = getFie... | [
"0.8049316",
"0.77687943",
"0.77434087",
"0.7705409",
"0.76746017",
"0.74150133",
"0.7412213",
"0.7407988",
"0.7373712",
"0.7306017",
"0.721783",
"0.7170036",
"0.708309",
"0.70808864",
"0.70808864",
"0.70808864",
"0.70808864",
"0.70808864",
"0.70808864",
"0.70808864",
"0.7080... | 0.87603027 | 0 |
Gets names of the Annotated fields | public String getAttributeName(){
if(field.getAnnotation(Column.class) != null){
return field.getAnnotation(Column.class).column();
}
if( field.getAnnotation(PrimaryKey.class) !=null){
return field.getAnnotation(PrimaryKey.class).name();
}
return null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String[] getAllFilledAnnotationFields();",
"java.lang.String getFields();",
"public String[] getFieldNames();",
"public String[] getFieldNames()\n {\n return this.fieldMap.keyArray(String.class);\n }",
"public Vector getSampleAnnotationFieldNames();",
"abstract public FieldNames getFi... | [
"0.7415642",
"0.7290516",
"0.6999511",
"0.6749653",
"0.6723129",
"0.6595743",
"0.6519522",
"0.6423667",
"0.6356358",
"0.6316061",
"0.63006264",
"0.626647",
"0.62341505",
"0.62099504",
"0.62048894",
"0.6192083",
"0.615439",
"0.61529243",
"0.61446154",
"0.6141285",
"0.61238134"... | 0.62223226 | 13 |
TODO: Warning this method won't work in the case the id fields are not set | @Override
public boolean equals(Object object) {
if (!(object instanceof Usuario)) {
return false;
}
Usuario other = (Usuario) object;
if ((this.usu_codigo == null && other.usu_codigo != null) || (this.usu_codigo != null && !this.usu_codigo.equals(other.usu_codigo))) {
return false;
}
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void setId(Integer id) { this.id = id; }",
"private Integer getId() { return this.id; }",
"public void setId(int id){ this.id = id; }",
"public void setId(Long id) {this.id = id;}",
"public void setId(Long id) {this.id = id;}",
"public void setID(String idIn) {this.id = idIn;}",
"public void se... | [
"0.6895054",
"0.68374",
"0.6704317",
"0.6640388",
"0.6640388",
"0.6591309",
"0.65775865",
"0.65775865",
"0.6573139",
"0.6573139",
"0.6573139",
"0.6573139",
"0.6573139",
"0.6573139",
"0.65607315",
"0.65607315",
"0.6543184",
"0.65233654",
"0.6514126",
"0.6486639",
"0.6476104",
... | 0.0 | -1 |
Service that provides peer information internally. Usually provides a cache of already retrieved peer information from the peer manager. | public interface PeerInfoService extends PeerInfoCallback {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public interface IPeerManager\r\n{\r\n /**\r\n * Add a new PeerEndpoint to the list of peers\r\n * \r\n * @param peer\r\n */\r\n void addPeerEndpoint(PeerEndpoint peer);\r\n\r\n /**\r\n * Returns a current snapshot of all known peers\r\n * \r\n * @return An iterable list of all... | [
"0.73273754",
"0.67700213",
"0.6727092",
"0.6378835",
"0.6288501",
"0.6251302",
"0.6225444",
"0.61011285",
"0.60933864",
"0.6079025",
"0.60548717",
"0.59932965",
"0.59038275",
"0.5858335",
"0.58468235",
"0.58022255",
"0.58008665",
"0.58008665",
"0.57141405",
"0.56914896",
"0.... | 0.6082269 | 9 |
Created by JarryLeo on 2017/4/14. | public interface PresenterAPI {
@GET(NetConfig.NEWS_LIST)
Observable<TestBean> getNewsList(@Query("access_token") String access_token,
@Query("catalog") int catalog,
@Query("dataType") String dataType,
@Query("page") int page,
@Query("pageSize") int pageSize);
@POST(NetConfig.NEWS_LIST)
Observable<TestBean> getPosts();
/* @GET(NetConfig.BASE_URL)
Observable<TestBean> requestNewsPicData(@Query("param") int param);
@FormUrlEncoded
@POST(NetConfig.BASE_URL)
Observable<ResponseBody> Test1(@Field("param") String param);
@FormUrlEncoded
@POST(NetConfig.BASE_URL)
Observable<ResponseBody> Test2(@FieldMap HashMap<String, String> params);*/
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void perish() {\n \n }",
"private stendhal() {\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n... | [
"0.5951203",
"0.5773243",
"0.5709568",
"0.56618774",
"0.5659796",
"0.5659796",
"0.55844736",
"0.5516783",
"0.5504042",
"0.54812396",
"0.5478956",
"0.5477139",
"0.5473878",
"0.5471511",
"0.546679",
"0.54613835",
"0.5453223",
"0.5418436",
"0.54168576",
"0.5413432",
"0.540823",
... | 0.0 | -1 |
Constructor used by UIBinder to create widgets with content. | public IronFlexLayout(String html) {
super(IronFlexLayoutElement.TAG, IronFlexLayoutElement.SRC, html);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void init()\n {\n buildUI(getContentPane());\n }",
"private UI()\n {\n this(null, null);\n }",
"public void setupUI() {\r\n\t\t\r\n\t\tvPanel = new VerticalPanel();\r\n\t\thPanel = new HorizontalPanel();\r\n\t\t\r\n\t\titemName = new Label();\r\n\t\titemName.addStyleName(Styles.pag... | [
"0.6833463",
"0.64252293",
"0.6385592",
"0.63160866",
"0.6310404",
"0.6279561",
"0.62508816",
"0.6249361",
"0.6245879",
"0.6184259",
"0.6161801",
"0.61551535",
"0.61451125",
"0.6138221",
"0.6125455",
"0.61223596",
"0.6115946",
"0.6102598",
"0.60831493",
"0.6069266",
"0.602644... | 0.0 | -1 |
Gets a handle to the Polymer object's underlying DOM element. | public IronFlexLayoutElement getPolymerElement() {
return (IronFlexLayoutElement) getElement();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public native Element getEl() /*-{\r\n\t\tvar proxy = this.@com.ait.toolkit.core.client.JsObject::getJsObj()();\r\n\t\tvar el = proxy.getEl();\r\n\t\treturn @com.ait.toolkit.sencha.shared.client.dom.ExtElement::instance(Lcom/google/gwt/core/client/JavaScriptObject;)(el);\r\n\t}-*/;",
"public DomElement getDomEle... | [
"0.706357",
"0.67579204",
"0.67422116",
"0.65623987",
"0.65209085",
"0.6290928",
"0.6263811",
"0.62590784",
"0.62307453",
"0.6195329",
"0.61947477",
"0.61862516",
"0.6174165",
"0.6173108",
"0.6173108",
"0.61471957",
"0.60902166",
"0.60778683",
"0.6070275",
"0.6064968",
"0.604... | 0.66277695 | 3 |
TODO Autogenerated method stub | @Override
public byte[] reqByteFormat() {
return null;
} | {
"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 ZsPkgSearchReply respFormat(String result) throws Exception {
ZsPkgSearchReply resp = null;
try {
if (StringUtils.isNotEmpty(result)) {
result="{"+"\""+"list"+"\""+":"+result+"}";
resp = JsonUtils.toBean(result, ZsPkgSearchReply.class);
}
} catch (Throwable e) {
LOGGER.error("{} {} parse response data error(Exception),msg:{}",
this.getClass().getName(), this.getHashCode(),
e.getMessage(), e);
} finally {
this.setResponse(resp);
}
return this.getResponse();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.66708666",
"0.65675074",
"0.65229905",
"0.6481001",
"0.64770633",
"0.64584893",
"0.6413091",
"0.63764185",
"0.6275735",
"0.62541914",
"0.6236919",
"0.6223816",
"0.62017626",
"0.61944294",
"0.61944294",
"0.61920846",
"0.61867654",
"0.6173323",
"0.61328775",
"0.61276996",
"0... | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public ZsPkgSearchReply respFormat(byte[] result) {
return null;
} | {
"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 need to think carefully. | public static void setResult(String resultInfo) {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"private stendhal() {\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"public void metho... | [
"0.57703096",
"0.5762554",
"0.57180905",
"0.56387115",
"0.5631901",
"0.56239694",
"0.5608468",
"0.5591494",
"0.55568373",
"0.5516744",
"0.55115014",
"0.5476239",
"0.5474872",
"0.5443704",
"0.54134774",
"0.5411382",
"0.5376788",
"0.5366143",
"0.5357775",
"0.53562546",
"0.53558... | 0.0 | -1 |
inflate item_hisotry xml and return the new holder. | @NonNull
@Override
public ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
Context context = parent.getContext();
LayoutInflater inflater = LayoutInflater.from(context);
//Inflate the custom layout
View historyView = inflater.inflate(R.layout.item_history, parent, false);
ViewHolder viewHolder = new ViewHolder(historyView);
return viewHolder;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void inflateViewForItem(Item item) {\n\n //Inflate Layout\n ItemCardBinding binding = ItemCardBinding.inflate(getLayoutInflater());\n\n //Bind Data\n binding.imageView.setImageBitmap(item.bitmap);\n binding.title.setText(item.label);\n binding.title.setBackgroundCo... | [
"0.5331364",
"0.52491814",
"0.5102193",
"0.5083103",
"0.50059515",
"0.49998832",
"0.49471372",
"0.49323314",
"0.4907272",
"0.48643348",
"0.4863014",
"0.48338178",
"0.48144308",
"0.47880128",
"0.47739205",
"0.47678745",
"0.47613734",
"0.47349998",
"0.4722105",
"0.47072777",
"0... | 0.0 | -1 |
populate data into item through holder. | @Override
public void onBindViewHolder(@NonNull ViewHolder holder, int position) {
History history = listHistories.get(position);
holder.txtDateTime.setText(history.getDateTime());
holder.txtTypeTran.setText(history.getTypeTran());
holder.txtNumTran.setText(String.valueOf(history.getNumTran()));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void populate() {\n populate(this.mCurItem);\n }",
"private void setData() {\n\n if (id == NO_VALUE) return;\n MarketplaceItem item = ControllerItems.getInstance().getModel().getItemById(id);\n if (item == null) return;\n\n ControllerAnalytics.getInstance().logItemVie... | [
"0.68893945",
"0.685642",
"0.66505337",
"0.6377157",
"0.6113387",
"0.606064",
"0.60326064",
"0.5974779",
"0.59461665",
"0.59257114",
"0.58733875",
"0.5871662",
"0.58308154",
"0.58251756",
"0.58201474",
"0.58116007",
"0.58115417",
"0.5799371",
"0.5787889",
"0.5777924",
"0.5759... | 0.0 | -1 |
TODO Autogenerated method stub | public static void main(String[] args) {
String s1 = "第一個字串";
String s2 = "第二個\t字串"; //字串中可以用跳脫序列
System.out.println(s1);
System.out.println(s2);
System.out.println(s1 + '\n' + s2);//字串也可以和字元相加
} | {
"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 |
Created by SilenceDut on 2018/1/15 . | @Dao
public interface WeatherDao {
@Insert(onConflict = REPLACE)
void saveWeather(Weather weather);
@Query("DELETE FROM weather WHERE cityId LIKE :cityId")
void deleteWeather(String cityId);
@Query("SELECT * FROM weather WHERE cityId LIKE :cityId")
Weather fetchWeather(String cityId);
@Query("SELECT * FROM weather")
List<Weather> fetchFollowedWeather();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void perish() {\n \n }",
"private stendhal() {\n\t}",
"public final void mo51373a() {\n }",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"... | [
"0.59400916",
"0.5762429",
"0.56549865",
"0.5638274",
"0.56303585",
"0.56303585",
"0.55963916",
"0.55558264",
"0.55319226",
"0.5518576",
"0.5494803",
"0.5475744",
"0.5459753",
"0.5446247",
"0.54115766",
"0.5403902",
"0.5375271",
"0.5355323",
"0.5354126",
"0.53541034",
"0.5338... | 0.0 | -1 |
Awful trick to get the app internal folder (here we are in a lib without context, I did not find another ay to get the path... my bad). | private static void loadSoFromInternalStorage(String fileName) throws UnsatisfiedLinkError {
String path = System.getProperties().get("java.io.tmpdir").toString().replace("/cache", "/files/" + fileName);
File file = new File(path);
SecurityManager security = System.getSecurityManager();
if (security != null) {
security.checkLink(file.getAbsolutePath());
}
System.load(file.getAbsolutePath());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"static File getAppDir(String app) {\n return Minecraft.a(app);\n }",
"java.io.File getBaseDir();",
"public String getAppPathname();",
"public String getPath(Context ctx)\n {\n return Environment.getExternalStorageDirectory() + \"/\" + ctx.getApplicationInfo().packageName.replaceAll(\"\\\\... | [
"0.73977417",
"0.69279915",
"0.6920204",
"0.69008476",
"0.687148",
"0.6781479",
"0.6773274",
"0.6703514",
"0.6680388",
"0.6675505",
"0.66542274",
"0.6604419",
"0.66038924",
"0.65760714",
"0.65672016",
"0.65672016",
"0.65672016",
"0.65426755",
"0.6537744",
"0.65171576",
"0.648... | 0.0 | -1 |
Returns a heuristic function based on straight line distance computation. | public static ToDoubleFunction<Node<String, MoveToAction>> createSLDHeuristicFunction(String goal, Map map) {
return node -> getSLD(node.getState(), goal, map);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n\tpublic void lineGetDistanceTest() {\n\t\tDouble distanceOfFirstLine = Math.sqrt((10 - 0) * (10 - 0) + (10 - 0) * (10 - 0));\n\n\t\tassertEquals(distanceOfFirstLine, firstLine.getDistance(), .0001d);\n\t\tassertNotEquals(Math.sqrt(2 * distanceOfFirstLine),\n\t\t\t\tfirstLine.getDistance(), .0001d);\n\t}",
... | [
"0.6061284",
"0.6053382",
"0.59910333",
"0.59245664",
"0.5920226",
"0.59109336",
"0.5789489",
"0.5720966",
"0.57040614",
"0.5695263",
"0.56893605",
"0.5687379",
"0.5673877",
"0.5653983",
"0.55935454",
"0.5520764",
"0.55143106",
"0.5508139",
"0.55004436",
"0.5469323",
"0.54688... | 0.5505255 | 18 |
TODO Autogenerated method stub | @Override
public Book createBook(Book book) throws SQLException {
try {
return dao.insertBook(book);
} catch (ClassNotFoundException | SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}return book;
} | {
"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 |
Ne fait rien et envoie un message de type effetClassique. | public Message action(Joueur joueurCourant) {
return new Message(Message.Types.effetClassique);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public IMessage toMessage(Class clas){\n\n\t\tIMessage msg = null;\n\t\tif (clas != null)\n\t\t\t msg = super.toMessage(clas);\n\t\telse\n\t\t\tmsg = super.toMessage(ExtensionResource.class);\n\t\t\n//\t IMessage msg = super.toMessage(ExtensionResource.class);\n\n//\t msg.setElement(new Element(AEvent.TYPE, E... | [
"0.61056197",
"0.55599415",
"0.55489236",
"0.5434367",
"0.5371292",
"0.5351984",
"0.5335988",
"0.52989227",
"0.52930504",
"0.5290663",
"0.5285987",
"0.52856624",
"0.527376",
"0.5182354",
"0.51646864",
"0.5127249",
"0.5090558",
"0.5090558",
"0.50900376",
"0.50886387",
"0.50816... | 0.68618774 | 0 |
Disable element form login | @Override
public void enableProgressBar() {
et_log_email.setEnabled(false);
et_log_password.setEnabled(false);
acb_login.setVisibility(View.GONE);
acb_register.setVisibility(View.GONE);
//Enable progressbar
pb_login.setVisibility(View.VISIBLE);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void denyRegistration(String login);",
"private void LoginOwner() {\n Transaksi.setEnabled(false);\n Transaksi.setVisible(false);\n }",
"public void loginWithoutPersonalDevice() {\n\t\t//new WebDriverWait(driver, 45).pollingEvery(1, TimeUnit.SECONDS).until(ExpectedConditions.visibilityOf(perso... | [
"0.66988444",
"0.6576296",
"0.6428543",
"0.63909036",
"0.6335588",
"0.6317947",
"0.62920547",
"0.62692815",
"0.62692815",
"0.62176216",
"0.61853814",
"0.6182225",
"0.6165912",
"0.61615497",
"0.6154294",
"0.61094165",
"0.6106399",
"0.60836744",
"0.60305834",
"0.6022508",
"0.60... | 0.5628629 | 68 |
Enable element form login | @Override
public void disableProgressBar() {
et_log_email.setEnabled(true);
et_log_password.setEnabled(true);
acb_login.setVisibility(View.VISIBLE);
acb_register.setVisibility(View.VISIBLE);
//Disable progressbar
pb_login.setVisibility(View.GONE);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void adminLogin() {\n\t\tdriver.get(loginUrl);\r\n\t\t// fill the form\r\n\t\tdriver.findElement(By.name(\"username\")).sendKeys(USERNAME);\r\n\t\tdriver.findElement(By.name(\"password\")).sendKeys(PASSWORD);\r\n\t\t// submit login\r\n\t\tdriver.findElement(By.name(\"btn_submit\")).click();\r\n\t}",
"pub... | [
"0.68653697",
"0.68461376",
"0.6845224",
"0.68181646",
"0.678006",
"0.666655",
"0.66620106",
"0.6609731",
"0.65912765",
"0.65471965",
"0.65469563",
"0.65391004",
"0.6503073",
"0.6489115",
"0.64863855",
"0.64847726",
"0.64843404",
"0.64807147",
"0.646549",
"0.6463262",
"0.6461... | 0.0 | -1 |
String oldDescription = this.description; | public void setDescription(String description) {
this.description = description;
// changeSupport.firePropertyChange("description", oldDescription, description);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setDescription(String description){this.description=description;}",
"public String getDescription(){ return description; }",
"public String getDescription(){return description;}",
"public String getDescription(){return description;}",
"public void setOldProperty_description(java.lang.String par... | [
"0.79962224",
"0.78468347",
"0.78467697",
"0.78467697",
"0.7808997",
"0.77682376",
"0.7742808",
"0.76836544",
"0.7667966",
"0.76628345",
"0.75777155",
"0.75527173",
"0.7526922",
"0.75202715",
"0.74822426",
"0.7458068",
"0.7458068",
"0.74367666",
"0.74300253",
"0.74061555",
"0... | 0.7508714 | 14 |
return evidence.substring(0,1).toUpperCase() + evidence.substring(1); | public String getEvidence() {
return evidence;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void firstToUpperCase() {\n \n }",
"private static String capName(String name) { return name.substring(0, 1).toUpperCase() + name.substring(1); }",
"private String capitalize(String title) {\n return title.substring(0, 1).toUpperCase() + title.substring(1);\n }",
"private static Stri... | [
"0.7638197",
"0.75799364",
"0.72760516",
"0.7264023",
"0.71872205",
"0.7139298",
"0.7124534",
"0.70791805",
"0.7075876",
"0.7030039",
"0.7023732",
"0.701338",
"0.70102215",
"0.7005769",
"0.7003969",
"0.70005435",
"0.6997746",
"0.69969624",
"0.6955985",
"0.6951133",
"0.6936574... | 0.0 | -1 |
create a new numerical data domain of the given size | public static MockDataDomain createNumerical(int numCols, int numRows, AValueFactory r) {
DataSetDescription dataSetDescription = createDataSetDecription(r);
dataSetDescription.setDataDescription(createNumericalDataDecription());
DataDescription dataDescription = dataSetDescription.getDataDescription();
MockDataDomain dataDomain = createDataDomain(dataSetDescription);
NumericalTable table = new NumericalTable(dataDomain);
table.setDataCenter(r.getCenter());
for (int i = 0; i < numCols; ++i) {
FloatContainer container = new FloatContainer(numRows);
NumericalColumn<FloatContainer, Float> column = new NumericalColumn<>(dataDescription);
column.setRawData(container);
for (int j = 0; j < numRows; ++j) {
container.add(r.nextFloat());
}
table.addColumn(column);
}
dataDomain.setTable(table);
TableAccessor.postProcess(table, r.getMin(), r.getMax());
return dataDomain;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void createNew(int size);",
"public void makeArray(int size) {\n\t\t\n\t}",
"Dimension createDimension();",
"DS (int size) {sz = size; p = new int [sz]; for (int i = 0; i < sz; i++) p[i] = i; R = new int[sz];}",
"private void initWithSize(int size) {\r\n this.size = size;\r\n if (size ... | [
"0.59743196",
"0.59080464",
"0.5802286",
"0.5705715",
"0.558442",
"0.5551087",
"0.55431724",
"0.55094385",
"0.5505952",
"0.5478376",
"0.54725397",
"0.5424011",
"0.5389433",
"0.53879356",
"0.5380667",
"0.5379325",
"0.53760237",
"0.53734505",
"0.5359102",
"0.53545237",
"0.53440... | 0.49921095 | 58 |
create a new numerical integer data domain of the given size | public static MockDataDomain createNumericalInteger(int numCols, int numRows, AValueFactory r, int max) {
DataSetDescription dataSetDescription = createDataSetDecription(r);
dataSetDescription.setDataDescription(createNumericalIntegerDataDecription(max));
DataDescription dataDescription = dataSetDescription.getDataDescription();
MockDataDomain dataDomain = createDataDomain(dataSetDescription);
NumericalTable table = new NumericalTable(dataDomain);
table.setDataCenter(0.0);
for (int i = 0; i < numCols; ++i) {
IntContainer container = new IntContainer(numRows);
NumericalColumn<IntContainer, Integer> column = new NumericalColumn<>(dataDescription);
column.setRawData(container);
for (int j = 0; j < numRows; ++j) {
container.add(r.nextInt(max));
}
table.addColumn(column);
}
dataDomain.setTable(table);
TableAccessor.postProcess(table, 0, max);
return dataDomain;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void createNew(int size);",
"public static IntegerVarArray make(int size, PrimArray from, int sourceOffset, int count, int destOffset) {\n\t\treturn new IntegerVarArray(size, from, sourceOffset, count, destOffset);\n\t}",
"DS (int size) {sz = size; p = new int [sz]; for (int i = 0; i < sz; i++) p[i] = i... | [
"0.61808217",
"0.6073584",
"0.6055009",
"0.5991334",
"0.59378374",
"0.58682734",
"0.58503574",
"0.5802037",
"0.57074726",
"0.5665054",
"0.5623775",
"0.56034136",
"0.5568499",
"0.55588365",
"0.5546977",
"0.5513035",
"0.55061245",
"0.54956615",
"0.5478956",
"0.5471719",
"0.5465... | 0.0 | -1 |
create a new categorical homogeneous data domain with the given size and categories | @SuppressWarnings("unchecked")
public static MockDataDomain createCategorical(int numCols, int numRows, AValueFactory r, String... categories) {
DataSetDescription dataSetDescription = createDataSetDecription(r);
dataSetDescription.setDataDescription(createCategoricalDataDecription(categories));
DataDescription dataDescription = dataSetDescription.getDataDescription();
MockDataDomain dataDomain = createDataDomain(dataSetDescription);
CategoricalTable<String> table = new CategoricalTable<>(dataDomain);
table.setCategoryDescritions((CategoricalClassDescription<String>) dataDescription.getCategoricalClassDescription());
for (int i = 0; i < numCols; ++i) {
CategoricalContainer<String> container = new CategoricalContainer<>(numRows, EDataType.STRING,
CategoricalContainer.UNKNOWN_CATEOGRY_STRING);
CategoricalColumn<String> column = new CategoricalColumn<>(dataDescription);
column.setRawData(container);
for (int j = 0; j < numRows; ++j) {
container.add(categories[r.nextInt(categories.length)]);
}
table.addColumn(column);
}
dataDomain.setTable(table);
TableAccessor.postProcess(table);
return dataDomain;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\t\tpublic Categoria[] newArray(int size) {\n\t\t\treturn new Categoria[size];\n\t\t}",
"@Override\n public ProductCategories[] newArray(int size) {\n return new ProductCategories[size];\n }",
"public static CategoryDataset createDataset() {\r\n DefaultCategoryDataset... | [
"0.6266864",
"0.6150042",
"0.5553725",
"0.542438",
"0.542438",
"0.5363381",
"0.5322607",
"0.52896965",
"0.52868724",
"0.52183676",
"0.51043934",
"0.50820124",
"0.5078368",
"0.50301754",
"0.50165075",
"0.5006415",
"0.49811488",
"0.49696133",
"0.49359277",
"0.4930308",
"0.49132... | 0.6240085 | 1 |
create and register a new record grouping using the given group sizes | public static TablePerspective addRecGrouping(MockDataDomain dataDomain, int... groups) {
return addGrouping(dataDomain, EDimension.RECORD, true, groups);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setGroupingSize(int newValue) {\n groupingSize = (byte) newValue;\n }",
"public void allocateGroupId(){\n\t\trecords.add(new pair(this.groupname,currentId));\n\t\tthis.groupid = currentId;\n\t\tcurrentId++;\n\t\tConnection c = null;\n\t\tStatement stmt = null;\n\t\ttry{\n\t\t\tSystem.out.println(... | [
"0.6300643",
"0.58040655",
"0.57761145",
"0.5665423",
"0.5637898",
"0.54920304",
"0.5488615",
"0.5431199",
"0.53992426",
"0.5368274",
"0.5347605",
"0.5347605",
"0.5340359",
"0.5320464",
"0.52987486",
"0.52817065",
"0.5258069",
"0.5252902",
"0.5242741",
"0.5235668",
"0.5204248... | 0.5220397 | 20 |
Creates a new EventLikeTimingSpecifier object. | public EventLikeTimingSpecifier(TimedElement owner, boolean isBegin,
float offset) {
super(owner, isBegin, offset);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"TimerType createTimerType();",
"public TimedEvent() {\n this(DEFAULT_LABEL + nextTaskID, DEFAULT_DATE, DEFAULT_TIME); // assigning default values\n }",
"BasicEvent createBasicEvent();",
"Event createEvent();",
"Event createEvent();",
"public T caseTimeEventSpec(TimeEventSpec object) {\r\n\t\tretu... | [
"0.5191712",
"0.5140379",
"0.50828993",
"0.5035257",
"0.5035257",
"0.49159712",
"0.48985508",
"0.47342888",
"0.47286794",
"0.46727148",
"0.46371615",
"0.46272126",
"0.4604753",
"0.4603431",
"0.45677665",
"0.4566478",
"0.45611262",
"0.45259213",
"0.44909316",
"0.44851342",
"0.... | 0.66005474 | 0 |
Returns whether this timing specifier is eventlike (i.e., if it is an eventbase, accesskey or a repeat timing specifier). | public boolean isEventCondition() {
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@objid (\"0480e45a-6886-42c0-b13c-78b8ab8f713d\")\n boolean isIsEvent();",
"public boolean isTimeSpecificEvent() {\n return timeSpecificEvent;\n }",
"boolean hasEvent();",
"public boolean hasEventTimestamp() {\n return fieldSetFlags()[14];\n }",
"boolean getIsEventLegendary();",
"pub... | [
"0.6913395",
"0.66512144",
"0.6174055",
"0.6047103",
"0.5984566",
"0.58558893",
"0.57958424",
"0.57616436",
"0.57478577",
"0.5733912",
"0.56320405",
"0.5592417",
"0.5534323",
"0.5508593",
"0.5501032",
"0.54693455",
"0.545296",
"0.5446846",
"0.543594",
"0.5406284",
"0.5400761"... | 0.61523724 | 3 |
Invoked to resolve an eventlike timing specifier into an instance time. | public abstract void resolve(Event e); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"T getEventTime();",
"public T caseTimeEventSpec(TimeEventSpec object) {\r\n\t\treturn null;\r\n\t}",
"public abstract double sensingTime();",
"public EventLikeTimingSpecifier(TimedElement owner, boolean isBegin,\n float offset) {\n super(owner, isBegin, offset);\n ... | [
"0.5975329",
"0.5815201",
"0.5732477",
"0.5524577",
"0.5472743",
"0.54337436",
"0.5341201",
"0.5313228",
"0.52984154",
"0.5193016",
"0.5182229",
"0.5177661",
"0.51744056",
"0.51617116",
"0.51106435",
"0.50945807",
"0.5090557",
"0.50811815",
"0.5070383",
"0.5055263",
"0.505363... | 0.0 | -1 |
/ Enabled aggressive block sorting Enabled unnecessary exception pruning Enabled aggressive exception aggregation | private static int getChangingConfigs(Resources resources, int n) {
TypedValue typedValue = sTmpTypedValue;
synchronized (typedValue) {
resources.getValue(n, sTmpTypedValue, true);
return AnimatorInflater.sTmpTypedValue.changingConfigurations;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n protected void updateEliminations() {\n\n }",
"private PerfectMergeSort() {}",
"@Test\r\n @Override\r\n @ConditionalIgnore(condition = IgnoreTreeDeferredIssue.class)\r\n public void testSortedAddDiscontinous() {\r\n super.testSortedAddDiscontinous();\r\n }",
"private void opt... | [
"0.55355585",
"0.5485665",
"0.5452997",
"0.5429638",
"0.5362422",
"0.53089017",
"0.528692",
"0.52693963",
"0.52290606",
"0.5193277",
"0.5192284",
"0.51888967",
"0.51690257",
"0.5143558",
"0.5143558",
"0.5113301",
"0.506931",
"0.50692594",
"0.5067579",
"0.50606716",
"0.5049869... | 0.0 | -1 |
/ Enabled aggressive block sorting | private static PropertyValuesHolder getPVH(TypedArray object, int n, int n2, int n3, String object2) {
Object object3 = ((TypedArray)object).peekValue(n2);
boolean bl = object3 != null;
int n4 = bl ? ((TypedValue)object3).type : 0;
object3 = ((TypedArray)object).peekValue(n3);
boolean bl2 = object3 != null;
int n5 = bl2 ? ((TypedValue)object3).type : 0;
if (n == 4) {
n = bl && AnimatorInflater.isColorType(n4) || bl2 && AnimatorInflater.isColorType(n5) ? 3 : 0;
}
boolean bl3 = n == 0;
if (n == 2) {
String string2 = ((TypedArray)object).getString(n2);
String string3 = ((TypedArray)object).getString(n3);
object = string2 == null ? null : new PathParser.PathData(string2);
object3 = string3 == null ? null : new PathParser.PathData(string3);
if (object == null) {
if (object3 == null) return null;
}
if (object != null) {
PathDataEvaluator pathDataEvaluator = new PathDataEvaluator();
if (object3 != null) {
if (!PathParser.canMorph((PathParser.PathData)object, (PathParser.PathData)object3)) {
object = new StringBuilder();
((StringBuilder)object).append(" Can't morph from ");
((StringBuilder)object).append(string2);
((StringBuilder)object).append(" to ");
((StringBuilder)object).append(string3);
throw new InflateException(((StringBuilder)object).toString());
}
object = PropertyValuesHolder.ofObject((String)object2, (TypeEvaluator)pathDataEvaluator, object, object3);
return object;
} else {
object = PropertyValuesHolder.ofObject((String)object2, (TypeEvaluator)pathDataEvaluator, object);
}
return object;
} else {
if (object3 == null) return null;
object = PropertyValuesHolder.ofObject((String)object2, (TypeEvaluator)new PathDataEvaluator(), object3);
}
return object;
}
object3 = null;
if (n == 3) {
object3 = ArgbEvaluator.getInstance();
}
if (bl3) {
if (bl) {
float f = n4 == 5 ? ((TypedArray)object).getDimension(n2, 0.0f) : ((TypedArray)object).getFloat(n2, 0.0f);
if (bl2) {
float f2 = n5 == 5 ? ((TypedArray)object).getDimension(n3, 0.0f) : ((TypedArray)object).getFloat(n3, 0.0f);
object = PropertyValuesHolder.ofFloat((String)object2, f, f2);
} else {
object = PropertyValuesHolder.ofFloat((String)object2, f);
}
} else {
float f = n5 == 5 ? ((TypedArray)object).getDimension(n3, 0.0f) : ((TypedArray)object).getFloat(n3, 0.0f);
object = PropertyValuesHolder.ofFloat((String)object2, f);
}
} else if (bl) {
n = n4 == 5 ? (int)((TypedArray)object).getDimension(n2, 0.0f) : (AnimatorInflater.isColorType(n4) ? ((TypedArray)object).getColor(n2, 0) : ((TypedArray)object).getInt(n2, 0));
if (bl2) {
n2 = n5 == 5 ? (int)((TypedArray)object).getDimension(n3, 0.0f) : (AnimatorInflater.isColorType(n5) ? ((TypedArray)object).getColor(n3, 0) : ((TypedArray)object).getInt(n3, 0));
object = PropertyValuesHolder.ofInt((String)object2, n, n2);
} else {
object = PropertyValuesHolder.ofInt((String)object2, n);
}
} else if (bl2) {
n = n5 == 5 ? (int)((TypedArray)object).getDimension(n3, 0.0f) : (AnimatorInflater.isColorType(n5) ? ((TypedArray)object).getColor(n3, 0) : ((TypedArray)object).getInt(n3, 0));
object = PropertyValuesHolder.ofInt((String)object2, n);
} else {
object = null;
}
object2 = object;
if (object == null) return object2;
object2 = object;
if (object3 == null) return object2;
((PropertyValuesHolder)object).setEvaluator((TypeEvaluator)object3);
return object;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void sortBlocks(){\n\t\tCurrentSets = getCurrentSets();\n\t\tif(CurrentSets == 1){\n\t\t\treturn;\n\t\t}else{\n\t\t\tfor(i = 0; i < CurrentSets - 1; i++){\n\t\t\t\tfor(j = i + 1; j < CurrentSets; j++){\n\t\t\t\t\tif((Integer.parseInt(blocks[i].getHexTag(), 16)) > (Integer.parseInt(blocks[j].getHexTag(), 16)... | [
"0.719662",
"0.6253113",
"0.6209965",
"0.60641325",
"0.6062344",
"0.60514784",
"0.6039714",
"0.6020895",
"0.6018125",
"0.6015914",
"0.59652436",
"0.5950544",
"0.5932971",
"0.5900926",
"0.58313674",
"0.5802383",
"0.5788351",
"0.57315594",
"0.56716985",
"0.56670487",
"0.5629508... | 0.0 | -1 |
init 2 cells with diff status. checking the constr. | public static void main(String [] args){
Cell testCell1 = new Cell();
Cell testCell2 = new Cell(false,0,0);
testCell1.display();
testCell2.display();
System.out.println("");
System.out.println(testCell1.getStatus());
System.out.println(testCell2.getStatus());
testCell1.changeStatus(6);
testCell2.changeStatus(2);
System.out.println(testCell1.getStatus());
System.out.println(testCell2.getStatus());
Cell[][] input = new Cell[3][3];
input[0][0] = new Cell(false,0,0);
input[0][1] = new Cell(true,0,1);
input[0][2] = new Cell(false,0,2);
input[1][0] = new Cell(true,1,0);
input[1][1] = new Cell(true,1,1);
input[1][2] = new Cell(true,1,2);
input[2][0] = new Cell(true,2,0);
input[2][1] = new Cell(true,2,1);
input[2][2] = new Cell(true,2,2);
CellGrid testGrid = new CellGrid(input);
System.out.println(testGrid.getNeighbors(0,1));
testGrid.displayGrid();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void testSetCell()\n {\n // Test setting a cell under ideal conditions\n assertTrue(b1.getCell(0, 0) == Cell.EMPTY);\n assertTrue(b1.setCell(0, 0, Cell.RED1));\n assertTrue(b1.getCell(0, 0) == Cell.RED1 );\n\n // If a cell is out of bounds, should fail\n assertFa... | [
"0.5862332",
"0.58467644",
"0.5724952",
"0.5709777",
"0.5684197",
"0.56554335",
"0.55327374",
"0.55039644",
"0.53858244",
"0.5383746",
"0.5383129",
"0.53730935",
"0.5364523",
"0.53510463",
"0.5310882",
"0.5300234",
"0.5287126",
"0.52802664",
"0.52695805",
"0.52308995",
"0.523... | 0.52694154 | 19 |
/ Difference between HashMap and TreeMap HashMap Adds the values in any Order TreeMap Adds values in Sorted Order (Sorting happens based on Key) | public static void main(String args[]) {
// Create a hash map
TreeMap<String, Integer> tm = new TreeMap<String, Integer>();
// Put elements to the map
tm.put("Thierry", 700);
tm.put("Madhavi", 500);
tm.put("Felix", 100);
tm.put("Ruifeng", 900);
tm.put("Raj", 200);
// Get an iterator
Set keySet = tm.keySet();
Iterator<String> i = keySet.iterator();
// Display elements
while (i.hasNext()) {
String key = i.next();
System.out.print("Key : " + key);
System.out.println(" Value = " + tm.get(key));
}
System.out.println();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void sortbykey()\n {\n /* List<Integer> sortedKeys = new ArrayList<Integer>(map.keySet());\n Collections.sort(sortedKeys);\n\n for(int key : sortedKeys)\n {\n System.out.println(key +\" \"+map.get(key));\n }*/\n //OR\n\n /* Map<Integer... | [
"0.7416468",
"0.71838564",
"0.70798427",
"0.7077805",
"0.7006592",
"0.67990196",
"0.6739608",
"0.6722577",
"0.67112666",
"0.6674386",
"0.666256",
"0.6660915",
"0.66464776",
"0.6566346",
"0.65351796",
"0.65201217",
"0.6514534",
"0.6512218",
"0.65049773",
"0.6496851",
"0.649082... | 0.0 | -1 |
This method returns the Java Object corresponding to Json Entities | public static void create(Map.Entry<String, JsonElement> keyValue, PayloadField payField) {
if (keyValue == null)
return;
if (ApplicationConstants.DIGITALINPUT.equals(keyValue.getKey())) {
payField.setDigitalInput(
new DigitalInput(keyValue.getValue().getAsJsonObject().get(ApplicationConstants.VAL).getAsFloat()));
} else if (ApplicationConstants.BAROMETER.equals(keyValue.getKey())) {
payField.setBarometricPressure(new BarometricPressure(
keyValue.getValue().getAsJsonObject().get(ApplicationConstants.VAL).getAsFloat()));
} else if (ApplicationConstants.DIGITALOUTPUT.equals(keyValue.getKey())) {
payField.setDigitalOutput(new DigitalOutput(
keyValue.getValue().getAsJsonObject().get(ApplicationConstants.VAL).getAsFloat()));
} else if (ApplicationConstants.ACC.equals(keyValue.getKey())) {
payField.setAccelerometer(
new Accelerometer(keyValue.getValue().getAsJsonObject().get(ApplicationConstants.X).getAsFloat(),
keyValue.getValue().getAsJsonObject().get(ApplicationConstants.Y).getAsFloat(),
keyValue.getValue().getAsJsonObject().get(ApplicationConstants.Z).getAsFloat()));
} else if (ApplicationConstants.ANALOGINPUT.equals(keyValue.getKey())) {
payField.setAnalogInput(
new AnalogInput(keyValue.getValue().getAsJsonObject().get(ApplicationConstants.VAL).getAsFloat()));
} else if (ApplicationConstants.ANALOGOUTPUT.equals(keyValue.getKey())) {
payField.setAnalogOutput(
new AnalogOutput(keyValue.getValue().getAsJsonObject().get(ApplicationConstants.VAL).getAsFloat()));
} else if (ApplicationConstants.GYRO.equals(keyValue.getKey())) {
payField.setGyrometer(
new Gyrometer(keyValue.getValue().getAsJsonObject().get(ApplicationConstants.X).getAsFloat(),
keyValue.getValue().getAsJsonObject().get(ApplicationConstants.Y).getAsFloat(),
keyValue.getValue().getAsJsonObject().get(ApplicationConstants.Z).getAsFloat()));
} else if (ApplicationConstants.GPS.equals(keyValue.getKey())) {
payField.setGps(
new GPS(keyValue.getValue().getAsJsonObject().get(ApplicationConstants.LATITUDE).getAsFloat(),
keyValue.getValue().getAsJsonObject().get(ApplicationConstants.LONGITUDE).getAsFloat()));
} else if (ApplicationConstants.LUM.equals(keyValue.getKey())) {
payField.setLuminosity(
new Luminosity(keyValue.getValue().getAsJsonObject().get(ApplicationConstants.VAL).getAsInt()));
} else if (ApplicationConstants.PRESENCE.equals(keyValue.getKey())) {
payField.setPresence(
new Presence(keyValue.getValue().getAsJsonObject().get(ApplicationConstants.VAL).getAsFloat()));
} else if (ApplicationConstants.RELHUMIDITY.equals(keyValue.getKey())) {
payField.setRelativeHumidity(new RelativeHumidity(
keyValue.getValue().getAsJsonObject().get(ApplicationConstants.VAL).getAsFloat()));
} else if (ApplicationConstants.TEMP.equals(keyValue.getKey())) {
payField.setTemperature(
new Temperature(keyValue.getValue().getAsJsonObject().get(ApplicationConstants.VAL).getAsFloat()));
}
return;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public abstract Object toJson();",
"public String getJson();",
"public Object toPojo(Entity entity) {\n return ofy().load().fromEntity(entity);\n }",
"String getJson();",
"String getJson();",
"String getJson();",
"JSONObject toJson();",
"JSONObject toJson();",
"public abstract String toJson();"... | [
"0.67396325",
"0.6480137",
"0.64410377",
"0.6188146",
"0.6188146",
"0.6188146",
"0.61849326",
"0.61849326",
"0.61816317",
"0.61389124",
"0.60902244",
"0.6079262",
"0.6000751",
"0.59721637",
"0.5965397",
"0.5942373",
"0.5908444",
"0.59062123",
"0.59026396",
"0.5869351",
"0.586... | 0.0 | -1 |
Employee emp=new Employee("Tom","Elva","Edison"); Store store=new Store("summit ave", "123456"); Transaction test=new Transaction(store.getID(), store.getStoreInfo(), 0, emp.toString(), null, null, null, null); | @Test
public void testGetEmployee() {
Transaction test=new Transaction(null, null, 0, null, null, null, null, null);
assertEquals(test.getID(),null);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public StoreOwner_Imp() {\n }",
"public Transaction() {\n }",
"public void createTransaction(Transaction trans);",
"public Sale(Store store, Employee employee) {\n super(store);\n this.price = 0;\n\n if(store.getEmployees().contains(employee))\n this.employee = employee;... | [
"0.65053904",
"0.64165646",
"0.6262078",
"0.6150274",
"0.613193",
"0.61302066",
"0.609681",
"0.6055645",
"0.6046364",
"0.6038797",
"0.60088986",
"0.59856904",
"0.59808254",
"0.5978472",
"0.5976927",
"0.5966272",
"0.5964926",
"0.5956187",
"0.59451365",
"0.593509",
"0.5924766",... | 0.6387225 | 2 |
Produce internal log format and save to SD card. | private synchronized static void internalLog(StringBuilder msg) {
//add time header
String timeStamp = simpleDateFormat.format(new Date());
msg.insert(0, timeStamp);
byte[] contentArray = msg.toString().getBytes();
int length = contentArray.length;
int srcPos = 0;
if (mPos == LOG_BUFFER_SIZE_MAX) {
//Flush internal buffer
flushInternalBuffer();
}
if (length > buffer.length) {
//Strongly flush the current buffer no matter whether it is full
flushInternalBuffer();
//Flush all msg string to sd card
while (length > buffer.length) {
System.arraycopy(contentArray, srcPos, buffer, mPos, buffer.length);
flushInternalBuffer();
length -= buffer.length;
srcPos += buffer.length;
}
} else if (length == buffer.length) {
flushInternalBuffer();
//Copy contents to buffer
System.arraycopy(contentArray, 0, buffer, mPos, length);
flushInternalBuffer();
length = 0;
}
if (length < buffer.length && length > 0) {
if ((mPos + length) > buffer.length) {
flushInternalBuffer();
//Copy contents to buffer
System.arraycopy(contentArray, srcPos, buffer, mPos, length);
mPos += length;
} else if ((mPos + length) == buffer.length) {
//Add content to buffer
System.arraycopy(contentArray, srcPos, buffer, mPos, length);
mPos += length;
flushInternalBuffer();
} else {
//Add content to buffer
System.arraycopy(contentArray, srcPos, buffer, mPos, length);
mPos += length;
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void createLogFile() {\n\t\tBufferedWriter out = null;\n\t\ttry {\n\t\t\tFile root = Environment.getExternalStorageDirectory();\n\t\t\tLog.e(\"SD CARD WRITE ERROR : \", \"SD CARD mounted and writable? \"\n\t\t\t\t\t+ root.canWrite());\n\t\t\tif (root.canWrite()) {\n\t\t\t\tFile gpxfile = new File(root, \"Re... | [
"0.731265",
"0.7134482",
"0.6912129",
"0.6720439",
"0.6538103",
"0.65193546",
"0.6413904",
"0.62889034",
"0.6257529",
"0.62249494",
"0.61505574",
"0.6133776",
"0.6133776",
"0.6133776",
"0.6096363",
"0.60319203",
"0.59942055",
"0.59905624",
"0.5978539",
"0.5955691",
"0.5952305... | 0.5297985 | 86 |
Flush internal buffer to SD card and then clear buffer to 0. | private static void flushInternalBuffer() {
//Strongly set the last byte to "0A"(new line)
if (mPos < LOG_BUFFER_SIZE_MAX) {
buffer[LOG_BUFFER_SIZE_MAX - 1] = 10;
}
long t1, t2;
//Save buffer to SD card.
t1 = System.currentTimeMillis();
writeToSDCard();
//calculate write file cost
t2 = System.currentTimeMillis();
Log.i(LOG_TAG, "internalLog():Cost of write file to SD card is " + (t2 - t1) + " ms!");
//flush buffer.
Arrays.fill(buffer, (byte) 0);
mPos = 0;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void flush(){\r\n mBufferData.clear();\r\n }",
"public void clearBuffer(){\n System.out.println(\"Clearning beffer\");\n //Deletes the buffer file\n File bufferFile = new File(\"data/buffer.ser\");\n bufferFile.delete();\n }",
"public void flushData()\n {\n ... | [
"0.7472472",
"0.71230155",
"0.67160916",
"0.66658384",
"0.6514822",
"0.6462711",
"0.63859713",
"0.63825977",
"0.6345226",
"0.62158597",
"0.61743706",
"0.61723876",
"0.6164816",
"0.61536753",
"0.6140673",
"0.60836357",
"0.60763496",
"0.6037335",
"0.6025915",
"0.6014434",
"0.59... | 0.71366644 | 1 |
Get last modified file in Log folder logDir. | private static File getLastModifiedFile(File logDir) {
File[] files = logDir.listFiles();
if (files == null) {
Log.e(LOG_TAG, "getLastModifiedFile(): This file dir is invalid. logDir= " + logDir.getAbsolutePath());
return null;
}
//Create a new file if no file exists in this folder
if (files.length == 0) {
File file = new File(logDir, fileNameFormat.format(new Date()) + ".txt");
return file;
}
//Find the last modified file
long lastModifiedTime = 0;
File lastModifiedFile = null;
for (File f : files) {
if (lastModifiedTime <= f.lastModified()) {
lastModifiedTime = f.lastModified();
lastModifiedFile = f;
}
}
return lastModifiedFile;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"long getLastModifiedTime() throws FileSystemException;",
"public File getLatestFilefromDir(String dirPath) {\r\n\t\t\r\n\t\tFile dir = new File(dirPath);\r\n\t\tFile[] files = dir.listFiles();\r\n\t\tif (files == null || files.length == 0) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\r\n\t\tFile lastModifiedFile = files... | [
"0.6527065",
"0.6520046",
"0.6496688",
"0.6433014",
"0.6417441",
"0.6383742",
"0.62763524",
"0.6179676",
"0.6149765",
"0.61230874",
"0.60982054",
"0.6067748",
"0.6065957",
"0.6029974",
"0.60186535",
"0.59933627",
"0.5961004",
"0.5956799",
"0.5945547",
"0.59327114",
"0.5926808... | 0.8236461 | 0 |
Write to a file fileName with content writeStr. | public static void writeFileSdCardFile(String fileName, String writeStr) {
FileOutputStream fout = null;
try {
fout = new FileOutputStream(fileName);
byte[] bytes = writeStr.getBytes();
fout.write(bytes);
} catch (FileNotFoundException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
} finally {
if (fout != null) {
try {
fout.close();
} catch (IOException e) {
e.printStackTrace();
}
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void writeStringToFile(String contents,\n \t\t\tFileOutputStream filePath) throws IOException {\n \t\tif (contents != null) {\n \t\t\tBufferedOutputStream bw = new BufferedOutputStream(filePath);\n \t\t\tbw.write(contents.getBytes(\"UTF-8\"));\n \t\t\tbw.flush();\n \t\t\tbw.close();\n \t\t}\n \t}",
... | [
"0.7004114",
"0.69366723",
"0.6915539",
"0.6895717",
"0.6859281",
"0.68415284",
"0.68277985",
"0.6748915",
"0.66366786",
"0.66147137",
"0.6604371",
"0.65606964",
"0.6552799",
"0.6546801",
"0.65297914",
"0.6478972",
"0.6456303",
"0.6422606",
"0.6389097",
"0.6350586",
"0.633081... | 0.68335277 | 6 |
Append content to a SD card file. | public static void appendFileSdCardFile(String fileName, String content) {
FileWriter writer = null;
try {
//Open a file writer and write a file with appending format with "true".
writer = new FileWriter(fileName, true);
writer.write(content);
} catch (IOException e) {
e.printStackTrace();
} finally {
try {
if (writer != null) {
writer.close();
}
} catch (IOException e) {
e.printStackTrace();
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void writeToSDFile() {\n File root = android.os.Environment.getExternalStorageDirectory();\n //Environment.getExternalStoragePublicDirectory()\n File dir = root.getAbsoluteFile();\n // See http://stackoverflow.com/questions/3551821/android-write-to-sd-card-folder\n //dir ... | [
"0.70281774",
"0.68234617",
"0.6484133",
"0.625714",
"0.6126218",
"0.59672344",
"0.59146917",
"0.5904907",
"0.5860056",
"0.58561206",
"0.58370304",
"0.5759352",
"0.57062376",
"0.57000935",
"0.56860745",
"0.5669651",
"0.55865115",
"0.55801827",
"0.55472827",
"0.55010194",
"0.5... | 0.7629279 | 0 |
Devuelve un objeto Calendar con la fecha de hoy. | public static Calendar getFechaHoy(){
Calendar cal = new GregorianCalendar();
cal.set(Calendar.HOUR_OF_DAY,0);
cal.set(Calendar.MINUTE, 0);
cal.set(Calendar.SECOND, 0);
cal.set(Calendar.MILLISECOND, 0);
return cal;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void get_fecha(){\n //Obtenemos la fecha\n Calendar c1 = Calendar.getInstance();\n fecha.setCalendar(c1);\n }",
"Calendar getCalendar();",
"public Calendario getCalendar(){\r\n\t\treturn calendar;\r\n\t}",
"Calendar toCalendar();",
"Calendar toCalendar();",
"public ... | [
"0.7312098",
"0.7121174",
"0.67624426",
"0.65891796",
"0.65891796",
"0.6568161",
"0.6549895",
"0.64818615",
"0.64818615",
"0.62880856",
"0.6250389",
"0.6237886",
"0.6232245",
"0.62207556",
"0.6208441",
"0.6166585",
"0.61167306",
"0.6090202",
"0.60796565",
"0.60231805",
"0.601... | 0.6787967 | 2 |
Realiza la consulta que obtiene todas las notas con fecha de hoy | public static ParseQuery consultarNotasDeHoy(){
ParseQuery queryNotasHoy = new ParseQuery("Todo");
Calendar cal = getFechaHoy();
cal.set(Calendar.HOUR, 0);
cal.set(Calendar.MINUTE,0);
cal.set(Calendar.SECOND,0);
Date min = cal.getTime();
cal.set(Calendar.HOUR, 23);
cal.set(Calendar.MINUTE,59);
cal.set(Calendar.SECOND,59);
Date max= cal.getTime();
queryNotasHoy.whereGreaterThanOrEqualTo("Fecha", min);
queryNotasHoy.whereLessThan("Fecha", max);
return queryNotasHoy;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"List<Venta1> consultarVentaPorFecha(Date desde, Date hasta, Persona cliente) throws Exception;",
"public void introducirPagosALojamientoClienteFechas(Date fechaInicial, Date fechaFinal,TablaModelo modelo,String dpiCliente){\n long tiempo = fechaInicial.getTime();\n java.sql.Date fechaInicialSql = n... | [
"0.6748105",
"0.6725465",
"0.653074",
"0.6509586",
"0.6404495",
"0.6403866",
"0.6403487",
"0.63817245",
"0.63631856",
"0.634208",
"0.6313197",
"0.63126576",
"0.6295087",
"0.6277701",
"0.6236901",
"0.6236471",
"0.6222159",
"0.6172989",
"0.61608046",
"0.61407226",
"0.6139845",
... | 0.6781043 | 0 |
Realiza la consulta que obtiene todas las notas con fecha de ayer. | public static ParseQuery consultarNotasAyer(){
ParseQuery queryNotasAyer = new ParseQuery("Todo");
Calendar cal = getFechaHoy();
Date hoy= cal.getTime();
cal.add(Calendar.DAY_OF_MONTH, -1);
Date ayer = cal.getTime();
queryNotasAyer.whereLessThanOrEqualTo("Fecha", hoy);
queryNotasAyer.whereGreaterThan("Fecha", ayer);
return queryNotasAyer;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"List<Venta1> consultarVentaPorFecha(Date desde, Date hasta, Persona cliente) throws Exception;",
"public void introducirPagosALojamientoClienteFechas(Date fechaInicial, Date fechaFinal,TablaModelo modelo,String dpiCliente){\n long tiempo = fechaInicial.getTime();\n java.sql.Date fechaInicialSql = n... | [
"0.6480782",
"0.63004047",
"0.62688345",
"0.6262824",
"0.62101984",
"0.6155029",
"0.6129437",
"0.6122028",
"0.6067798",
"0.6046521",
"0.60445595",
"0.60356694",
"0.60295296",
"0.6028018",
"0.6009575",
"0.5992537",
"0.59636873",
"0.5948962",
"0.59486395",
"0.5938137",
"0.58964... | 0.66334367 | 0 |
Following code is for the toolbar title assertions | public static ViewInteraction matchToolbarTitle(CharSequence title) {
return onView(isAssignableFrom(Toolbar.class))
.check(matches(withToolbarTitle(is(title))));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void validateTitle()\r\n\t{\r\n\t\tString titleDisplayed = this.heading.getText();\r\n\t\tassertEquals(titleDisplayed, \"Dashboard\");\r\n\t\tSystem.out.println(\"Value is asserted\");\r\n\t\t\t}",
"public void setToolbarTitle() {\n Log.i(tag, \"set toolbar title\");\n this.toolbarGroupIcon.... | [
"0.7026573",
"0.70001376",
"0.6997632",
"0.69157434",
"0.68261516",
"0.6821912",
"0.68071854",
"0.680143",
"0.6767409",
"0.6702199",
"0.6650587",
"0.6643244",
"0.66154164",
"0.6537273",
"0.652453",
"0.6523365",
"0.64710456",
"0.6463979",
"0.639137",
"0.6371932",
"0.6365096",
... | 0.63860196 | 20 |
Following code is to wait for an element | public static ViewAction waitId(final int viewId, final long millis) {
return new ViewAction() {
@Override
public Matcher<View> getConstraints() {
return isRoot();
}
@Override
public String getDescription() {
return "wait for a specific view with id <" + viewId + "> during " + millis + " millis.";
}
@Override
public void perform(final UiController uiController, final View view) {
uiController.loopMainThreadUntilIdle();
final long startTime = System.currentTimeMillis();
final long endTime = startTime + millis;
final Matcher<View> viewMatcher = withId(viewId);
do {
for (View child : TreeIterables.breadthFirstViewTraversal(view)) {
// found view with required ID
if (viewMatcher.matches(child)) {
return;
}
}
uiController.loopMainThreadForAtLeast(50);
}
while (System.currentTimeMillis() < endTime);
// timeout happens
throw new PerformException.Builder()
.withActionDescription(this.getDescription())
.withViewDescription(HumanReadables.describe(view))
.withCause(new TimeoutException())
.build();
}
};
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void waitForElement(WebElement element) {\n WebDriverWait wait = new WebDriverWait(driver, 30);\n wait.until(ExpectedConditions.visibilityOf(element));\n }",
"public static void waitForElementVisiblity(WebElement element) {\n\t\t\t\n\t\t}",
"private void waitForElementToBeLoad(String st... | [
"0.7670062",
"0.7515577",
"0.73475224",
"0.7346099",
"0.7200078",
"0.71582156",
"0.71480304",
"0.71443254",
"0.7100568",
"0.7072867",
"0.70688635",
"0.70675325",
"0.7047821",
"0.7022546",
"0.699408",
"0.6973738",
"0.6958343",
"0.69448704",
"0.69224167",
"0.69137263",
"0.69046... | 0.0 | -1 |
This method is to reset preferences and make sure user is logged out before performing a new test case | public static void ResetPreferences() throws Exception{
File root = InstrumentationRegistry.getTargetContext().getFilesDir().getParentFile();
String[] sharedPreferencesFileNames = new File(root, "shared_prefs").list();
try{
for (String fileName : sharedPreferencesFileNames) {
InstrumentationRegistry.getTargetContext().getSharedPreferences(fileName.replace(".xml", ""), Context.MODE_PRIVATE).edit().clear().commit();
}
}
catch (NullPointerException exp){}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void clearForTesting() {\n mPreferences.edit().clear().apply();\n }",
"public void Logout(){\n preferences.edit().remove(userRef).apply();\n }",
"public void logout() {\r\n SharedPreferences sharedPreferences = ctx.getSharedPreferences(SHARED_PREF_NAME, Context.MODE_PRIVATE);\... | [
"0.68465203",
"0.67837244",
"0.6762739",
"0.66474175",
"0.6613463",
"0.65770614",
"0.65318584",
"0.65179193",
"0.65056294",
"0.6427045",
"0.64230245",
"0.6422247",
"0.641068",
"0.6397808",
"0.6393163",
"0.6389639",
"0.6388607",
"0.6386226",
"0.63849545",
"0.6367167",
"0.63318... | 0.0 | -1 |
Use the current date as the default date in the picker | public Dialog onCreateDialog(Bundle savedInstanceState) {
final Calendar c = Calendar.getInstance();
int year = c.get(Calendar.YEAR);
int month = c.get(Calendar.MONTH);
int day = c.get(Calendar.DAY_OF_MONTH);
// Create a new instance of DatePickerDialog and return it
DatePickerDialog dialog = new DatePickerDialog(getActivity(), this, year, month, day);
if(this.getMinDate() != null){
dialog.getDatePicker().setMinDate(this.getMinDate().getTime());
}
if(this.getMaxDate() != null){
dialog.getDatePicker().setMaxDate(this.getMaxDate().getTime());
}
if(getPositiveClickListner() != null){
dialog.setButton(DialogInterface.BUTTON_POSITIVE, "OK", getPositiveClickListner());
}
return dialog;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setTodayDate() {\n\t\tfinal Calendar c = Calendar.getInstance();\r\n\t\tmYear = c.get(Calendar.YEAR);\r\n\t\tmMonth = c.get(Calendar.MONTH);\r\n\t\tmDay = c.get(Calendar.DAY_OF_MONTH);\r\n\r\n\t\tmaxYear = mYear - 10;\r\n\t\tmaxMonth = mMonth;\r\n\t\tmaxDay = mDay;\r\n\r\n\t\tminYear = mYear - 110;\r\n... | [
"0.7571456",
"0.70521796",
"0.69745404",
"0.68636376",
"0.6799111",
"0.67897666",
"0.6782179",
"0.67797935",
"0.6702195",
"0.6687638",
"0.6674044",
"0.6662639",
"0.6640538",
"0.66288954",
"0.662257",
"0.6613743",
"0.6612383",
"0.6563278",
"0.6557139",
"0.6538863",
"0.65302044... | 0.0 | -1 |
Service class for users of system hallocasa | public interface UserService {
/**
* Finds a user by email
*
* @param email
* @return
*/
User find(String email);
/**
* Finds a user by email
*
* @param email
* @return
*/
List<User> addUsersToShowableList(UserListRequest userListRequest);
/**
* Finds a user by its id
*
* @param id
* @return
*/
User find(long id);
/**
*
* @param user
*/
void save(User user, String token);
/**
*
* @param user
*/
void register(User user, String urlBase);
/**
* Load the number of user offering services
* @return
*/
Integer loadUserCount();
/**
* Validate if email already exists
* @param email
* The email to validate
*/
void validate(String email);
/**
* Send a activation email to user who register
* @param email
* @param activationLink
* @param activationKey
* @throws MailServicesErrorException
*/
void sendActivationLinkEmail(User user, String activationLink, String activationKey)
throws MailServicesErrorException;
/**
* Activate an user that comes from email activation link
* @param email
* @param activationToken
*/
void activateUser(String email, String activationToken);
/**
* Ends the user session by deleting its security access token
* @param userTokenTokenContent
* Content of user token to delete
*/
void logout(String userTokenTokenContent);
/**
* filter users by specific request filter
* @param request
* @return
*/
UserFilterResult find(UserFilterRequest request);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public interface UserService {\n\n //创建一个用户\n public void createUser(Sysuser sysuser);\n //修改用户信息\n public void saveUser(Sysuser sysuser);\n\n //根据传入的用户信息查询用户主要用户名和密码,返回list<map>\n public List<Map<String,Object>> signIn(Sysuser sysuser);\n\n //根据传入的用户信息查询用户主要用户名和密码,返回list<Sysuser>\n public ... | [
"0.70570344",
"0.674942",
"0.66916734",
"0.6643636",
"0.65644455",
"0.653522",
"0.6471436",
"0.6459438",
"0.6438223",
"0.64083636",
"0.64076835",
"0.6388506",
"0.63848644",
"0.6328219",
"0.63041437",
"0.6275473",
"0.6261791",
"0.6261471",
"0.6235911",
"0.6229722",
"0.6223866"... | 0.6502771 | 6 |
Finds a user by email | User find(String email); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public User findUserByEmail(final String email);",
"User findUserByEmail(String email) throws Exception;",
"User getUserByEmail(final String email);",
"User getUserByEmail(String email);",
"public User getUserByEmail(String email);",
"public User getUserByEmail(String email);",
"User findByEmail(String... | [
"0.8477124",
"0.83937997",
"0.83234334",
"0.8264818",
"0.81234455",
"0.81234455",
"0.8112775",
"0.8112775",
"0.8112775",
"0.8112775",
"0.8112775",
"0.8112775",
"0.8085361",
"0.80656564",
"0.80656564",
"0.80656564",
"0.8034479",
"0.80055445",
"0.7969872",
"0.7922836",
"0.78971... | 0.85162073 | 0 |
Finds a user by email | List<User> addUsersToShowableList(UserListRequest userListRequest); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"User find(String email);",
"public User findUserByEmail(final String email);",
"User findUserByEmail(String email) throws Exception;",
"User getUserByEmail(final String email);",
"User getUserByEmail(String email);",
"public User getUserByEmail(String email);",
"public User getUserByEmail(String email)... | [
"0.85155135",
"0.84757453",
"0.8392882",
"0.83224416",
"0.8264173",
"0.8122889",
"0.8122889",
"0.81119055",
"0.81119055",
"0.81119055",
"0.81119055",
"0.81119055",
"0.81119055",
"0.808409",
"0.80650705",
"0.80650705",
"0.80650705",
"0.8032158",
"0.8005241",
"0.79676634",
"0.7... | 0.0 | -1 |
Finds a user by its id | User find(long id); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic Userinfo findbyid(int id) {\n\t\treturn userDAO.searchUserById(id);\r\n\t}",
"public User findUser(int id) {\n for (int i = 0; i < allUsers.size(); i++) {\n if (allUsers.get(i).getId() == id) {\n return allUsers.get(i);\n }\n }\n ret... | [
"0.8179434",
"0.8095565",
"0.8040939",
"0.80328614",
"0.80216634",
"0.80183166",
"0.7989188",
"0.79778117",
"0.7974008",
"0.7965335",
"0.7914189",
"0.78907156",
"0.7864647",
"0.7864245",
"0.7857464",
"0.78566486",
"0.7856141",
"0.7854151",
"0.7846027",
"0.78380495",
"0.783524... | 0.81854504 | 0 |
Load the number of user offering services | Integer loadUserCount(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"int getServicesCount();",
"int getServicesCount();",
"int getUsersCount();",
"int getUsersCount();",
"int getUsersCount();",
"public long getUserCount() throws UserManagementException;",
"int getServiceAccountsCount();",
"@Override\r\n\tprotected int count() {\n\t\treturn service.count();\r\n\t}",
... | [
"0.72243303",
"0.72243303",
"0.6473703",
"0.6473703",
"0.6473703",
"0.64185417",
"0.6355258",
"0.62761426",
"0.6270311",
"0.6270311",
"0.6265569",
"0.6265569",
"0.62596494",
"0.6232148",
"0.62240493",
"0.6162554",
"0.61606",
"0.6120527",
"0.60353196",
"0.60353196",
"0.5968264... | 0.73455596 | 0 |
Validate if email already exists | void validate(String email); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Boolean checkEmailAlready(String email);",
"boolean isEmailExist(String email);",
"private void emailExistCheck() {\n usernameFromEmail(email.getText().toString());\n }",
"private boolean checkEmail() throws IOException {\n String email = getEmail.getText();\n \n if(email.conta... | [
"0.8230258",
"0.786987",
"0.77786076",
"0.7756605",
"0.75286037",
"0.7517753",
"0.7439025",
"0.74064237",
"0.7355788",
"0.73499066",
"0.7234906",
"0.71731144",
"0.71731144",
"0.7171998",
"0.7147193",
"0.7129155",
"0.71109337",
"0.71010405",
"0.7054076",
"0.7054076",
"0.705407... | 0.7065444 | 18 |
Activate an user that comes from email activation link | void activateUser(String email, String activationToken); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public RegisterConfirmedPage activateAccount(String email) {\r\n\t\tactiveRailwayAccount(email);\r\n\r\n\t\t/*\r\n\t\t * this.clickLinkEmail(_activateSubject, email); \r\n\t\t * // Switch tab chrome ---------\r\n\t\t * ArrayList<String> arr = new\r\n\t\t * ArrayList<String>(Constant.WEBDRIVER.getWindowHandles());\... | [
"0.75631124",
"0.68348473",
"0.6747749",
"0.661662",
"0.6536292",
"0.6486243",
"0.64399445",
"0.64288163",
"0.63342667",
"0.6288605",
"0.62694377",
"0.62440217",
"0.61587113",
"0.6131658",
"0.6059153",
"0.60587",
"0.6054185",
"0.6050395",
"0.6020645",
"0.59441996",
"0.5937025... | 0.8842617 | 0 |
Ends the user session by deleting its security access token | void logout(String userTokenTokenContent); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void logout() {\n if (mAccessToken != null) {\n mSession.resetAccessToken();\n mAccessToken = null;\n }\n }",
"@Override\n\tpublic void exitSessionUser() {\n\t\tgetThreadLocalRequest().getSession().invalidate();\n\t\t\n\t}",
"public void logout(){\r\n\t\tallUs... | [
"0.72627574",
"0.7169639",
"0.6988807",
"0.6955977",
"0.695289",
"0.6944603",
"0.6916035",
"0.6903298",
"0.68952906",
"0.6828075",
"0.6739267",
"0.6724862",
"0.66878784",
"0.6664985",
"0.6540671",
"0.6488924",
"0.6465484",
"0.64378977",
"0.64308876",
"0.63990664",
"0.6389232"... | 0.69481087 | 5 |
filter users by specific request filter | UserFilterResult find(UserFilterRequest request); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void filterUsers(FilterParameters f) {\n // query users to find appropriate matches and send them a chat request\n Database.getInstance()\n .sendRequestsToMatches(f.getKind(), f.getGender(), f.getReligion(), f.getLanguages()\n , f.getLower_bound(), f.getU... | [
"0.70995104",
"0.6509243",
"0.65081203",
"0.6360755",
"0.6312118",
"0.62912446",
"0.602933",
"0.602109",
"0.5915548",
"0.5888624",
"0.58827853",
"0.5815049",
"0.5810847",
"0.5771596",
"0.5769083",
"0.575672",
"0.5738858",
"0.5728055",
"0.5704555",
"0.5684644",
"0.5677529",
... | 0.731736 | 0 |
TODO Autogenerated method stub | @Override
@Transactional(isolation=Isolation.READ_COMMITTED, propagation=Propagation.REQUIRED)
public User findUser(User user) {
return userDao.findUser(user);
} | {
"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 |
Initializing the page objects: | public HomePage() {
PageFactory.initElements(driver, this);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void init() {\n\t\tfor(int i = 0; i < 5; i++) {\n\t\t\tpageLists.add(new Page(i));\n\t\t}\n\t}",
"private void initPages() {\n\t\tloginPage = new LoginPage(driver);\n\t\tflipkart = new FlipkartPage(driver);\n\t\t\n\t}",
"protected void init() {\n PageFactory.initElements(webDriver, this);\n }"... | [
"0.8161171",
"0.80116856",
"0.7670543",
"0.7554761",
"0.729832",
"0.7294494",
"0.72841704",
"0.7257854",
"0.7247964",
"0.7222719",
"0.72063243",
"0.71710473",
"0.71371835",
"0.70730585",
"0.7069253",
"0.70356846",
"0.7009683",
"0.70065165",
"0.6974097",
"0.6972911",
"0.697208... | 0.6914601 | 26 |
This method was generated by MyBatis Generator. This method returns the value of the database column buycar.itemid | public Integer getItemid() {
return itemid;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"OrderItemDto getOrderItem(long id) throws SQLException;",
"private int ricavaID(String itemSelected){\n String ogg = ricavaNome(itemSelected);\n String schema = ricavaSchema(itemSelected);\n int id = -1;\n \n Statement stmt; \n ResultSet rst;\n \n try{\n ... | [
"0.56955487",
"0.565943",
"0.56377304",
"0.5627906",
"0.5627704",
"0.5625918",
"0.5591222",
"0.55876887",
"0.55557376",
"0.55216515",
"0.5513061",
"0.55092394",
"0.5507491",
"0.5496706",
"0.54831403",
"0.54662675",
"0.54534346",
"0.54534346",
"0.54203045",
"0.5398171",
"0.535... | 0.58284163 | 1 |
This method was generated by MyBatis Generator. This method sets the value of the database column buycar.itemid | public void setItemid(Integer itemid) {
this.itemid = itemid;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void setItemId(String itemId);",
"public void setItem_id(int item_id) {\r\n\t\tthis.item_id = item_id;\r\n\t}",
"@Override\r\n public void setItemId(int itemId) {\n this.itemId = itemId;\r\n }",
"public void setItemId(Long itemId) {\r\n this.itemId = itemId;\r\n }",
"public void setCar(final... | [
"0.5891923",
"0.5875752",
"0.5741289",
"0.57221425",
"0.5656474",
"0.55689627",
"0.55498993",
"0.5490245",
"0.54892975",
"0.5485818",
"0.5447222",
"0.54304045",
"0.5404637",
"0.53849196",
"0.5331623",
"0.5195279",
"0.518984",
"0.5181468",
"0.5176356",
"0.5164039",
"0.5153912"... | 0.5958889 | 1 |
This method was generated by MyBatis Generator. This method returns the value of the database column buycar.userid | public Integer getUserid() {
return userid;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"java.lang.String getUserId();",
"java.lang.String getUserId();",
"java.lang.String getUserId();",
"public Long getUserid() {\r\n return userid;\r\n }",
"public Integer getCarUserId() {\n return carUserId;\n }",
"Integer getUserId();",
"public Integer getUserid() {\r\n\t\treturn use... | [
"0.69425184",
"0.69425184",
"0.69425184",
"0.6939789",
"0.68206334",
"0.67502826",
"0.67244375",
"0.67163205",
"0.67163205",
"0.67163205",
"0.67163205",
"0.6710002",
"0.6709762",
"0.66800255",
"0.66800255",
"0.6644314",
"0.6644314",
"0.6548846",
"0.6548846",
"0.6472918",
"0.6... | 0.681996 | 13 |
This method was generated by MyBatis Generator. This method sets the value of the database column buycar.userid | public void setUserid(Integer userid) {
this.userid = userid;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setCarUserId(Integer carUserId) {\n this.carUserId = carUserId;\n }",
"public void setUserid(Long userid) {\r\n this.userid = userid;\r\n }",
"public void setUserId(long userId);",
"public void setUserId(long userId);",
"public void setUserId(long userId);",
"public void s... | [
"0.7027567",
"0.6800919",
"0.666672",
"0.666672",
"0.666672",
"0.666672",
"0.6604922",
"0.65840083",
"0.6578495",
"0.65756685",
"0.6558686",
"0.6558686",
"0.65422714",
"0.65391",
"0.6534276",
"0.6524816",
"0.6514791",
"0.64647233",
"0.64516836",
"0.6449257",
"0.6439916",
"0... | 0.66122156 | 16 |
This method was generated by MyBatis Generator. This method returns the value of the database column buycar.price | public Integer getPrice() {
return price;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Long getPrice() {\n return price;\n }",
"public String getBuyprice() {\n return buyprice;\n }",
"public double getBuyPrice() {\n return buyPrice;\n }",
"public BigDecimal getPrice() {\r\n return price;\r\n }",
"public BigDecimal getPrice() {\r\n return ... | [
"0.6725149",
"0.6646438",
"0.6538665",
"0.6507671",
"0.6507671",
"0.65009546",
"0.65009546",
"0.6472228",
"0.6472228",
"0.6472228",
"0.6472228",
"0.6472228",
"0.64647406",
"0.6460426",
"0.64157933",
"0.6412232",
"0.64117455",
"0.6395212",
"0.63944983",
"0.63902444",
"0.638910... | 0.6491661 | 10 |
This method was generated by MyBatis Generator. This method sets the value of the database column buycar.price | public void setPrice(Integer price) {
this.price = price;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setPrice(double price)\n {\n this.price = price;\n }",
"public void setPrice(Money price) {\n this.price = price;\n }",
"public void setPrice(double price) {\n this.price = price;\n }",
"public void setPrice(double price) {\n this.price = price;\n }",
"pub... | [
"0.69853926",
"0.6973571",
"0.69537693",
"0.69537693",
"0.69537693",
"0.69537693",
"0.69537693",
"0.69537693",
"0.69537693",
"0.6952301",
"0.6952301",
"0.6952301",
"0.6946411",
"0.69010097",
"0.6889439",
"0.6888009",
"0.6888009",
"0.68789124",
"0.68789124",
"0.6857577",
"0.68... | 0.67253417 | 34 |
This method was generated by MyBatis Generator. This method returns the value of the database column buycar.itemcount | public Integer getItemcount() {
return itemcount;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic Integer getItemCount() {\n\t\t\n\t\tInteger countRows = 0;\n\t\t\n\t\t/*\n\t\t * Count of items will be retrieved from MainQuery.xml\n\t\t */\n\t\ttry {\n\t\t\tconnection = DBConnectionUtil.getDBConnection();\n\t\t\tpreparedStatement = connection.prepareStatement(QueryUtil.queryByID(CommonConst... | [
"0.70168895",
"0.70168895",
"0.6725987",
"0.6603586",
"0.6534091",
"0.6476045",
"0.6423098",
"0.6423098",
"0.63741654",
"0.63067853",
"0.6292361",
"0.6282365",
"0.61853206",
"0.617572",
"0.6153531",
"0.6147734",
"0.61440384",
"0.6117944",
"0.61166215",
"0.61114454",
"0.610289... | 0.5769097 | 70 |
This method was generated by MyBatis Generator. This method sets the value of the database column buycar.itemcount | public void setItemcount(Integer itemcount) {
this.itemcount = itemcount;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setBuyCount(Integer buyCount) {\n this.buyCount = buyCount;\n }",
"public void setCount(Integer count) {\r\n this.count = count;\r\n }",
"public void setCount(Integer count) {\n this.count = count;\n }",
"public void setCount(Integer count) {\n this.count = count;\n... | [
"0.6554298",
"0.5898408",
"0.58610773",
"0.58610773",
"0.58610773",
"0.58610773",
"0.58610773",
"0.58610773",
"0.5801242",
"0.57602215",
"0.57534814",
"0.57533306",
"0.57478213",
"0.5739651",
"0.5700949",
"0.5700949",
"0.5700949",
"0.5700949",
"0.5700949",
"0.56442547",
"0.56... | 0.6976212 | 0 |
This method was generated by MyBatis Generator. This method returns the value of the database column buycar.totalprice | public Integer getTotalprice() {
return totalprice;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Long getTotalprice() {\n return totalprice;\n }",
"public int getTotalPrice()\n {\n return totalPrice;\n }",
"public float getProductTotalMoney(){\n connect();\n float total = 0;\n String sql = \"SELECT SUM(subtotal) + (SUM(subtotal) * (SELECT iva FROM configu... | [
"0.72120047",
"0.6526267",
"0.65226597",
"0.64962393",
"0.64922816",
"0.6403158",
"0.6343171",
"0.6318942",
"0.630534",
"0.63046235",
"0.6285776",
"0.6264561",
"0.6233797",
"0.62267226",
"0.6222926",
"0.6176696",
"0.6173655",
"0.61690295",
"0.6121457",
"0.610294",
"0.60717195... | 0.69559044 | 1 |
This method was generated by MyBatis Generator. This method sets the value of the database column buycar.totalprice | public void setTotalprice(Integer totalprice) {
this.totalprice = totalprice;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setTotalprice(Long totalprice) {\n this.totalprice = totalprice;\n }",
"public abstract void setTotalPrice();",
"public void setPrice(BigDecimal price) {\r\n this.price = price;\r\n }",
"public void setPrice(BigDecimal price) {\r\n this.price = price;\r\n }",
"publ... | [
"0.70231545",
"0.65234274",
"0.64077604",
"0.64077604",
"0.6390424",
"0.63837206",
"0.63837206",
"0.6330548",
"0.629756",
"0.6252102",
"0.6223505",
"0.6223505",
"0.6223505",
"0.6221994",
"0.6219754",
"0.62127787",
"0.62127787",
"0.62127787",
"0.62127787",
"0.62127787",
"0.621... | 0.6946094 | 1 |
Interface for all required DB calls. Short explanation given in the Interface implementation class WorkloadManagementServiceImpl | public interface WorkloadManagementService
{
/**
* @return for a given project a WorkloadManager object. Also applicable for older INCEpTION
* version where the workload feature was not present. Also, if no entity can be found,
* a new entry will be created and returned.
* @param aProject
* a project
*/
WorkloadManager loadOrCreateWorkloadManagerConfiguration(Project aProject);
WorkloadManagerExtension<?> getWorkloadManagerExtension(Project aProject);
void saveConfiguration(WorkloadManager aManager);
List<AnnotationDocument> listAnnotationDocumentsForSourceDocumentInState(
SourceDocument aSourceDocument, AnnotationDocumentState aState);
Long getNumberOfUsersWorkingOnADocument(SourceDocument aDocument);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public interface CoffeeProcessorDbService {\n void loadData();\n}",
"public interface DBManager {\n\n\t// Populate Data can have different Implementations\n\tvoid populateData();\n}",
"public interface WorkerDAO {\r\n \r\n\tpublic List<Worker> findById(Integer id);\r\n\tpublic List<Worker> findAll();\r\... | [
"0.6867287",
"0.677244",
"0.66719735",
"0.6532975",
"0.6521919",
"0.64489055",
"0.64196646",
"0.64194626",
"0.64131314",
"0.6405175",
"0.6382426",
"0.6379278",
"0.6341792",
"0.6336364",
"0.63321865",
"0.6327888",
"0.63214004",
"0.6310391",
"0.62903017",
"0.6277125",
"0.625780... | 0.65300536 | 4 |
Manages the reading of the file and stores items in the inventory as a list. | private void loadInventory(String fileName){
List<String> list = new ArrayList<String>();
try (Stream<String> stream = Files.lines(Paths.get(fileName))) {
//Convert it into a List
list = stream.collect(Collectors.toList());
} catch (IOException e) {
e.printStackTrace();
}
for(String itemList : list){
String[] elements = itemList.split("--");
try{
switch(elements[0].toUpperCase()){
case "BURGER":
inventory.add(createBurger(elements));;
break;
case "SALAD":
inventory.add(createSalad(elements));;
break;
case "BEVERAGE":
inventory.add(createBeverage(elements));;
break;
case "SIDE":
inventory.add(createSide(elements));;
break;
case "DESSERT":
inventory.add(createDessert(elements));;
break;
}
}catch(Exception e){
System.err.println(e.getMessage());
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void readFile() {\n try (BufferedReader br = new BufferedReader(new FileReader(\"../CS2820/src/production/StartingInventory.txt\"))) {\n String line = br.readLine();\n while (line != null) {\n line = br.readLine();\n this.items.add(line);\n ... | [
"0.7797603",
"0.73537",
"0.7249934",
"0.70016515",
"0.69229233",
"0.67475104",
"0.67384964",
"0.668471",
"0.6613174",
"0.6506103",
"0.64904034",
"0.64513886",
"0.643429",
"0.63619363",
"0.63547575",
"0.6354526",
"0.6337729",
"0.62730896",
"0.62196004",
"0.6199656",
"0.6174279... | 0.74543494 | 1 |
Returns the whole inventory. | public ArrayList<Item> getList() {
return inventory;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Collection<Item> getInventory();",
"List<InventoryItem> getInventory();",
"public Inventory getInventory(){ //needed for InventoryView - Sam\n return inventory;\n }",
"public List<InventoryEntity> getAllInventory() {\n\t\treturn inventoryDao.getAllInventory();\n\t}",
"public List<Inventory> getI... | [
"0.8343377",
"0.8277669",
"0.8066973",
"0.7958457",
"0.7945222",
"0.78811646",
"0.78137475",
"0.77881306",
"0.76913214",
"0.76377493",
"0.75900316",
"0.75162345",
"0.74985194",
"0.74252146",
"0.7335266",
"0.7303584",
"0.72793996",
"0.7266718",
"0.72555685",
"0.71846217",
"0.7... | 0.73702884 | 14 |
Sets a list of items as a new inventory. | public void setList(ArrayList<Item> inventory) {
this.inventory = inventory;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void updateInventory(List<Item> items) {\r\n for(Item item : items) {\r\n inventory.put(item, STARTING_INVENTORY);\r\n inventorySold.put(item, 0);\r\n itemLocations.put(item.getSlot(), item);\r\n }\r\n }",
"@Override\r\n\tpublic void setInventoryItems() {... | [
"0.7367597",
"0.734269",
"0.7308342",
"0.7128512",
"0.6966301",
"0.69563735",
"0.691504",
"0.69084734",
"0.6717374",
"0.67142254",
"0.6698736",
"0.66954637",
"0.66425896",
"0.6549447",
"0.6495657",
"0.6383241",
"0.63814086",
"0.63744587",
"0.636946",
"0.6363276",
"0.6355142",... | 0.77415067 | 0 |
Gets the totalNumberOfTransactionLines attribute. | public Integer getTotalNumberOfTransactionLines() {
return totalNumberOfTransactionLines;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int getLinesCount() {\n return lines.length;\n }",
"public int getNumLines() {\n\t\treturn numLines;\n\t}",
"public int getLineCount() {\n\t\treturn lineCount;\n\t}",
"int getNumberOfLines();",
"public void setTotalNumberOfTransactionLines(int totalNumberOfTransactionLines) {\n this... | [
"0.74885714",
"0.73758066",
"0.7092213",
"0.7057768",
"0.7049495",
"0.70224774",
"0.69787",
"0.68128055",
"0.67856",
"0.67644346",
"0.6759457",
"0.6633117",
"0.6622654",
"0.6618087",
"0.660071",
"0.65895766",
"0.6582119",
"0.6535561",
"0.6499445",
"0.64785475",
"0.64777225",
... | 0.9061512 | 0 |
Sets the totalNumberOfTransactionLines attribute value. | public void setTotalNumberOfTransactionLines(int totalNumberOfTransactionLines) {
this.totalNumberOfTransactionLines = totalNumberOfTransactionLines;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Integer getTotalNumberOfTransactionLines() {\n return totalNumberOfTransactionLines;\n }",
"@ReactProp(name = ViewProps.NUMBER_OF_LINES, defaultInt = ViewDefaults.NUMBER_OF_LINES)\n public void setNumberOfLines(ReactTextView view, int numberOfLines) {\n view.setNumberOfLines(numberOfLines);\... | [
"0.65822005",
"0.6506734",
"0.6301895",
"0.6080365",
"0.60318816",
"0.6023891",
"0.5992177",
"0.59024113",
"0.5816158",
"0.579318",
"0.5768578",
"0.57642835",
"0.571003",
"0.5684784",
"0.5664441",
"0.56478614",
"0.56336844",
"0.56320804",
"0.5626969",
"0.5563534",
"0.553512",... | 0.819639 | 0 |
Adds a income amount to the current income total | public void addIncomeAmount(KualiDecimal incomeAmount) {
this.incomeAmount = this.incomeAmount.add(incomeAmount);
this.totalNumberOfTransactionLines++;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void addMoney(int income) {\r\n\t\tmoney += income;\r\n\t}",
"public void addCash(double amount) {\r\n cash += amount;\r\n }",
"void addIncomeToBudget();",
"public void addMoney(double profit){\n money+=profit;\n }",
"public int updateIncome(Income income) {\n\t\treturn 0;\n\t}",... | [
"0.8475525",
"0.7442626",
"0.73571014",
"0.7347844",
"0.7214668",
"0.711182",
"0.7105215",
"0.7069523",
"0.7051102",
"0.70337224",
"0.6963163",
"0.6907152",
"0.68694276",
"0.68125206",
"0.6810566",
"0.6773706",
"0.6771629",
"0.6750542",
"0.6726385",
"0.67188543",
"0.67013156"... | 0.85055125 | 0 |
Adds a principal amount to the current principal total | public void addPrincipalAmount(KualiDecimal principalAmount) {
this.principalAmount = this.principalAmount.add(principalAmount);
this.totalNumberOfTransactionLines++;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public BigDecimal getPrincipalAmount() {\n return principalAmount;\n }",
"public void setPrincipalAmount(BigDecimal principalAmount) {\n this.principalAmount = principalAmount;\n }",
"public double getPrincipalAmount(){return this.principal_amount;}",
"public void addCash(double amount) {... | [
"0.7185583",
"0.7048327",
"0.68916404",
"0.6517957",
"0.6206402",
"0.6182502",
"0.60854596",
"0.60798347",
"0.60723406",
"0.6036096",
"0.596293",
"0.5905553",
"0.5891917",
"0.5885229",
"0.5877802",
"0.5871496",
"0.58699834",
"0.58529407",
"0.58473575",
"0.5797404",
"0.5795647... | 0.8349121 | 0 |
TODO Autogenerated method stub | @Override
public void onPlayComplete() {
mPlayAudioThread = null;
destroyPcm();
if (mPlayState != PlayState.MPS_PAUSE) {
setPlayState(PlayState.MPS_PREPARE);
}
} | {
"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 |
Use the current date as the default date in the date picker | @Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
final Calendar c = Calendar.getInstance();
int hour = c.get(Calendar.HOUR_OF_DAY);
int minute = c.get(Calendar.MINUTE);
return new TimePickerDialog(getActivity(), AlertDialog.THEME_DEVICE_DEFAULT_LIGHT,this,hour,minute,true);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setTodayDate() {\n\t\tfinal Calendar c = Calendar.getInstance();\r\n\t\tmYear = c.get(Calendar.YEAR);\r\n\t\tmMonth = c.get(Calendar.MONTH);\r\n\t\tmDay = c.get(Calendar.DAY_OF_MONTH);\r\n\r\n\t\tmaxYear = mYear - 10;\r\n\t\tmaxMonth = mMonth;\r\n\t\tmaxDay = mDay;\r\n\r\n\t\tminYear = mYear - 110;\r\n... | [
"0.76214397",
"0.699961",
"0.6914157",
"0.6854459",
"0.6835101",
"0.6804441",
"0.67753196",
"0.675361",
"0.67415375",
"0.67328715",
"0.6705042",
"0.66957843",
"0.6685532",
"0.66459405",
"0.6615341",
"0.66143596",
"0.66044503",
"0.6568539",
"0.6533934",
"0.6526334",
"0.6517874... | 0.0 | -1 |
Created by hynra on 15/05/2018. | public interface NetworkService {
@GET("top250")
Observable<Response<List<Movie>>> getMovies(@Query("start") int start, @Query("count") int count);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void perish() {\n \n }",
"private stendhal() {\n\t}",
"public final void mo51373a() {\n }",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Over... | [
"0.59510726",
"0.5742572",
"0.5647937",
"0.5645744",
"0.55799043",
"0.555431",
"0.5544653",
"0.5536342",
"0.55359447",
"0.55358297",
"0.55358297",
"0.5437441",
"0.5435716",
"0.54314584",
"0.5430986",
"0.5410629",
"0.53987294",
"0.53947353",
"0.53923994",
"0.53861934",
"0.5384... | 0.0 | -1 |
Created by yyy on 2017/3/26. | public interface DiscountStrategy {
/**
* 会员折扣策略
* @param level
* @param money
* @return
*/
double getDiscountPrice(int level,double money);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private stendhal() {\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
... | [
"0.60888207",
"0.6001171",
"0.57682097",
"0.5759671",
"0.5735404",
"0.5732659",
"0.5732659",
"0.5712114",
"0.57017297",
"0.5649649",
"0.56135",
"0.55976206",
"0.55934614",
"0.5556787",
"0.55393696",
"0.5531559",
"0.55210227",
"0.5520156",
"0.5515084",
"0.5513436",
"0.5511363"... | 0.0 | -1 |
Creates and returns a new heap containing no elements. | public FibonacciHeap() {} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Heap() {\r\n\t\tthis(DEFAULT_INITIAL_CAPACITY, null);\r\n\t}",
"public ArrayHeapMinPQ() {\n aHeap.add(null);\n }",
"public Heap() {\n this.arr = new ArrayList<>();\n this.isMax = false;\n }",
"public ArrayHeap() {\r\n capacity = 10;\r\n length = 0;\r\n h... | [
"0.726861",
"0.6972327",
"0.6849132",
"0.68270487",
"0.67436624",
"0.6741294",
"0.6711273",
"0.6683963",
"0.66614205",
"0.6608237",
"0.65930784",
"0.65197134",
"0.6442035",
"0.6438385",
"0.6404934",
"0.63338274",
"0.63338274",
"0.63166744",
"0.62813324",
"0.6259972",
"0.62587... | 0.56063944 | 72 |
Inserts element x, whose key has already been filled in. Time complexity: O(1) Space complexity: O(1) | public Node<T> insert(T x) {
Node<T> node = new Node<>(x);
if (min == null) {
min = node;
} else {
if (min.leftSibling != null) {
node.leftSibling = min;
node.rightSibling = min.rightSibling;
min.rightSibling = node;
node.rightSibling.leftSibling = node;
} else {
min.leftSibling = node;
}
if (node.key.compareTo(min.key) < 0) {
min = node;
}
}
size++;
return node;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"static void insert(Item x) {\n int i = hash(x.sum);\n while (st[i] != null) {\n i++;\n if (i >= st.length) i -= st.length;\n }\n st[i] = x;\n }",
"public boolean insert( AnyType x )\n { \n int currentPos = findPos( x );\n \n if( a... | [
"0.7696856",
"0.73318255",
"0.72938895",
"0.7262815",
"0.71329695",
"0.6982996",
"0.6911615",
"0.6738825",
"0.6725579",
"0.669492",
"0.6675455",
"0.65811294",
"0.6580578",
"0.6454282",
"0.64341205",
"0.6421728",
"0.64173377",
"0.6412201",
"0.6412201",
"0.6398625",
"0.6378774"... | 0.6582998 | 11 |
Returns the element in heap whose key is minimum. Time complexity: O(1) Space complexity: O(1) | public T minimum() {
return min.key;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Node binomialHeapMinimum() {\n\t\tNode y = null;\n\t\tNode x = this.head;\n\t\tint min = Integer.MAX_VALUE;\n\t\twhile(x!=null) {\n\t\t\tif (x.key < min) {\n\t\t\t\tmin = x.key;\n\t\t\t\ty = x;\n\t\t\t}\n\t\t\tx = x.rightSibling;\n\t\t}\n\t\treturn y;\n\t}",
"private double findMin(){\r\n Set<Map.E... | [
"0.8018557",
"0.7939211",
"0.73440593",
"0.7201252",
"0.71840245",
"0.7094222",
"0.7044647",
"0.7020037",
"0.6977612",
"0.69314885",
"0.69314885",
"0.6930695",
"0.6921747",
"0.68805647",
"0.687142",
"0.6853454",
"0.68273854",
"0.68185735",
"0.6788793",
"0.6763905",
"0.6756211... | 0.66284955 | 27 |
Deletes the element from heap whose key is minimum. Time complexity: O(logn) Space complexity: O(1) | public Node<T> extractMin() {
Node<T> z = min;
if (z != null) {
if (z.child != null) {
Node<T> leftChild = z.child.leftSibling;
Node<T> rightChild = z.child;
z.child.parent = null;
while (leftChild != rightChild) {
leftChild.parent = null;
leftChild = leftChild.leftSibling;
}
leftChild = leftChild.rightSibling;
// add child to the root list
Node<T> tmp = z.rightSibling;
z.rightSibling = leftChild;
leftChild.leftSibling = z;
tmp.leftSibling = rightChild;
rightChild.rightSibling = tmp;
}
// remove z from the root list
z.rightSibling.leftSibling = z.leftSibling;
z.leftSibling.rightSibling = z.rightSibling;
if (z == z.rightSibling) {
min = null;
} else {
min = z.rightSibling;
consolidate();
}
size--;
}
return z;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int deleteMin() {\n int keyItem = heap[0];\n delete(0);\n return keyItem;\n }",
"public void deleteMin()\t\t\t\t//delete smallest key\n\t{\n\t\troot=deleteMin(root);\n\t}",
"void deleteMin() {\n delete(keys[0]);\n }",
"private static Node delMin(ArrayList<Node> minHea... | [
"0.79818904",
"0.75186735",
"0.75125664",
"0.73099387",
"0.73029304",
"0.7288151",
"0.72187555",
"0.7198345",
"0.7140635",
"0.71195275",
"0.7078159",
"0.7057601",
"0.70505744",
"0.6938909",
"0.6853702",
"0.6850439",
"0.6771413",
"0.6763678",
"0.6752426",
"0.67393637",
"0.6715... | 0.0 | -1 |
The upper bound on the maximum degree. Time complexity: O(1) Space complexity: O(1) | protected int getDegreeBound(double n) {
// The base should be the golden ratio: 1.61803...
return (int) Math.floor(Math.log(n) / Math.log(1.6));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int findMaxDegree() {\n\t\tint gradoMax = 0;\n\t\t\n\t\tfor(String s : grafo.vertexSet()) {\n\t\t\tint grado = grafo.degreeOf(s);\n\t\t\t\n\t\t\tif(grado > gradoMax) {\n\t\t\t\tgradoMax = grado;\n\t\t\t\tverticeGradoMax = s;\n\t\t\t}\n\t\t\t\t\n\t\t}\n\t\treturn gradoMax;\n\t}",
"double getRight(double ma... | [
"0.687639",
"0.6656774",
"0.651788",
"0.6359924",
"0.6359924",
"0.6302441",
"0.629765",
"0.62798244",
"0.62461203",
"0.6162452",
"0.61376905",
"0.6127335",
"0.6109546",
"0.6100932",
"0.60952723",
"0.6068808",
"0.6056528",
"0.60024554",
"0.59987074",
"0.59573966",
"0.59513265"... | 0.692137 | 0 |
Assigns to element x within heap the new key value, which we assume to be no greater than its current key value. Time complexity: O(1) Space complexity: O(1) | public boolean decreaseKey(Node<T> x, T k) {
if (x.key.compareTo(k) < 0) {
return false;
}
x.key = k;
Node<T> y = x.parent;
if (y != null && x.key.compareTo(y.key) <= 0) {
cut(x, y);
cascadingCut(y);
}
if (x.key.compareTo(min.key) <= 0) {
min = x;
}
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void put(int key, int value) {\n int hash = key % 1024;\n TreeNode treeNode = array[hash];\n if (treeNode == null) {\n array[hash] = new TreeNode(value);\n }\n if (value > treeNode.value) {\n\n }\n\n }",
"void MaxInsert(int x)\n {\n if (size == capacity) {\n re... | [
"0.6642492",
"0.6622422",
"0.65209776",
"0.6501423",
"0.6460673",
"0.64601004",
"0.64061743",
"0.6384436",
"0.6384124",
"0.6339848",
"0.63353",
"0.63278675",
"0.6322286",
"0.62827486",
"0.6262223",
"0.625294",
"0.62485105",
"0.6214881",
"0.6213619",
"0.6155771",
"0.61540353",... | 0.0 | -1 |
Method recurse its way up the tree until it finds either a root or an unmarked node. Time complexity: O(logn) Space complexity: O(1) | protected void cascadingCut(Node<T> y) {
Node<T> z = y.parent;
if (z != null) {
if (!y.mark) {
y.mark = true;
} else {
cut(y, z);
cascadingCut(z);
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void DepthFirstSearch(Node current){\n helperDFS( current );\n }",
"public void inOrderTraverseRecursive();",
"public void depthFirstSearch(){\n\t\tStack<TreeNode<T>> nodeStack = new Stack<TreeNode<T>>();\n\n\t\tif(root!=null){\n\t\t\tnodeStack.push(root);\n\t\t\tSystem.out.println(root.data)... | [
"0.6252905",
"0.6201107",
"0.61758286",
"0.61628836",
"0.6129682",
"0.609401",
"0.60522777",
"0.6051208",
"0.60495865",
"0.6032457",
"0.6013291",
"0.6003501",
"0.5991191",
"0.5952402",
"0.59477264",
"0.5943892",
"0.59210205",
"0.588973",
"0.5888058",
"0.5867621",
"0.5837777",... | 0.0 | -1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.