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 |
|---|---|---|---|---|---|---|
Role Id: 1 cus, 2 owner, 3 admin, 4 res | public ArrayList<HashMap<String, String>> getHistoryOrder(int actId, int roleCode) {
return orderList.getOrderById(actId, roleCode);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"String getRole();",
"String getRole();",
"public Integer getRoleId() {\r\n return roleId;\r\n }",
"public Role getRoleById(int id);",
"String computeRole();",
"public Integer getRoleId() {\n return roleId;\n }",
"public Integer getRoleId() {\n return roleId;\n }",
"publi... | [
"0.70356286",
"0.70356286",
"0.6967258",
"0.6949372",
"0.69293857",
"0.689526",
"0.689526",
"0.689526",
"0.689526",
"0.689526",
"0.689526",
"0.689526",
"0.689526",
"0.6874411",
"0.68431145",
"0.6834697",
"0.67903066",
"0.6782145",
"0.6782145",
"0.6782145",
"0.67815936",
"0.... | 0.0 | -1 |
Only customer could access | public HashMap<String, String> viewCart(int cusId) {
if (orderList.hasCart(cusId))
return orderList.getCart(cusId).toHashMap();
return null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"boolean hasCustomerUserAccess();",
"protected boolean customerWantsMeat() { return true; }",
"boolean hasCustomerUserAccessInvitation();",
"boolean isNonSecureAccess();",
"@Override\n public boolean userCanAccess(int id) {\n return true;\n }",
"public abstract boolean isRestricted();",
"@J... | [
"0.7695443",
"0.67668676",
"0.6571917",
"0.6412576",
"0.6363127",
"0.6316498",
"0.62541705",
"0.62487787",
"0.6228441",
"0.6212326",
"0.62116534",
"0.6106924",
"0.6106924",
"0.61036044",
"0.60684526",
"0.60017",
"0.5928757",
"0.5909057",
"0.5893426",
"0.58789366",
"0.5857516"... | 0.0 | -1 |
'm': modify quantity, 'a': add item. operateList | public boolean editCart(int cusId, int resId, char operator, HashMap<Integer, Integer> operateList) {
if (operator == 'm') {
// Check whether customer has cart
if (!orderList.hasCart(cusId))
return false;
Iterator<Map.Entry<Integer, Integer>> it = operateList.entrySet().iterator();
while (it.hasNext()) {
Map.Entry<Integer, Integer> entry = it.next();
if (orderList.getCart(cusId).hasItem(entry.getKey()))
orderList.getCart(cusId).getItemById(entry.getKey()).setQuantity(entry.getValue());
}
return true;
} else if (operator == 'a') {
// Check whether customer has cart. If not, create one for them.
if (!orderList.hasCart(cusId))
orderList.addCart(cusId, resId);
Iterator<Map.Entry<Integer, Integer>> it = operateList.entrySet().iterator();
while (it.hasNext()) {
Map.Entry<Integer, Integer> entry = it.next();
HashMap<String, String> item = restaurantList.getRestaurant(resId).getItemById(entry.getKey()).toHashMap();
if (orderList.getCart(cusId).hasItem(entry.getKey()))
orderList.getCart(cusId).getItemById(entry.getKey()).increaseQty(entry.getValue());
orderList.getCart(cusId).addItem(item, entry.getValue());
}
return true;
}
return false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic void modify(int quantity) {\n\t}",
"public void increaseStock(int i, int a){\n stock.get(i).increaseQuantity(a);\n }",
"public int addItem(Item i);",
"@Override\r\n public void ItemQuantity(int quantity) {\n this.quantity = quantity;\r\n }",
"public int addItem(Itemset i)... | [
"0.7208361",
"0.6806227",
"0.6768927",
"0.6581453",
"0.65098226",
"0.6431105",
"0.64264584",
"0.64055717",
"0.6405479",
"0.6398295",
"0.63661647",
"0.6362941",
"0.6319141",
"0.6301058",
"0.6246258",
"0.6237839",
"0.62205094",
"0.61984557",
"0.61977965",
"0.6179163",
"0.613526... | 0.56760734 | 99 |
Call before placing order, verifying whether total price without coupon over $100. | public boolean isWithinAmount(int cusId, double lowerBound, double upperBound) {
double price = orderList.getCart(cusId).getTotalPrice();
if (price > upperBound || price < lowerBound)
return false;
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n public void amountGreatherThanItemsPrice() {\n Coupon coupon = couponService.calculateCoupon(Arrays.asList(MLA1),PRICE_MLA1+PRICE_MLA2);\n assertEquals(1, coupon.itemsIds().size());\n assertEquals(MLA1, coupon.itemsIds().get(0));\n assertEquals(PRICE_MLA1, coupon.total());\n ... | [
"0.68950945",
"0.66936296",
"0.65667075",
"0.6303351",
"0.6283176",
"0.6260212",
"0.61496717",
"0.6117591",
"0.60623664",
"0.604814",
"0.6022376",
"0.6016693",
"0.598159",
"0.5940698",
"0.5870275",
"0.58274573",
"0.58078486",
"0.5781284",
"0.5778915",
"0.5751876",
"0.5751059"... | 0.0 | -1 |
private CountDownTimer countDownTimer; private boolean timerIsRunning; | @Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_registration);
//if(ScreenUtils.hasSoftKeys(getWindowManager(), this)) findViewById(R.id.nevSoftBar).setVisibility(View.VISIBLE);
initViews();
countries = JsonUtils.loadCountries(this);
getCountryZipCode();
user = new User();
Intent intent = getIntent();
if(intent.getExtras()!=null){
user.socialId = intent.getStringExtra(Constants.SOCIAL_ID);
user.email = intent.getStringExtra(Constants.EMAIL_ID);
user.businessType = intent.getStringExtra(Constants.registrationType);
}
smsVerifyCatcher = new SmsVerifyCatcher(this, new OnSmsCatchListener<String>() {
@Override
public void onSmsCatch(String message) {
String code = parseCode(message);//Parse verification code
if(CURRENT_VIEW_STATE==2){
if(message.contains("Mualab") || message.contains("mualab")){
inputList.clear();
user.otp = code;
for(int i=0; i<code.length(); i++){
tvOtp[i].setText(String.format("%s", code.charAt(i)));
inputList.add(Character.getNumericValue(code.charAt(i)));
}
if(apiOTP.equals(user.otp)){
user.otp = code;
new Handler().postDelayed(new Runnable() {
@Override
public void run() {
nextScreen();
}
}, 700);
}
}
}
}
});
findViewById(R.id.llBusinessAddr).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(RegistrationActivity.this, AddAddressActivity.class);
if(address!=null)
intent.putExtra("address",address);
startActivityForResult(intent,1001);
}
});
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Boolean timerCheck(){\n return isRunning;\n }",
"public boolean isRunning() { return _timer!=null && _timer.isRunning(); }",
"private void startTimerAfterCountDown() {\n \t\thandler = new Handler();\n \t\tprepareTimeCountingHandler();\n \t\thandler.post(new CounterRunnable(COUNT_DOWN_... | [
"0.7876987",
"0.74721944",
"0.7104088",
"0.6973593",
"0.68318397",
"0.681886",
"0.67435217",
"0.6616644",
"0.6593633",
"0.6536235",
"0.653136",
"0.65194696",
"0.6503132",
"0.65021145",
"0.64830977",
"0.6471773",
"0.6449558",
"0.64421046",
"0.6419247",
"0.6419247",
"0.6419247"... | 0.0 | -1 |
String phone = tvAddress.getText().toString().trim(); | private boolean validateAddress() {
if (address==null) {
tvAddress.setText(String.format("%s*", getString(R.string.address_activity)));
showToast(getString(R.string.error_address_required));
return false;
}
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public String getphoneNumber() {\n return ((EditText)findViewById(R.id.phoneNumberUserPage)).getText().toString().trim();\n }",
"@Override\n public void onClick(View view) {\n String phoneNumber = phoneNumberEditText.getText().toString();\n // atata timp cat ... | [
"0.7096059",
"0.64660305",
"0.6389461",
"0.6316758",
"0.62632823",
"0.61107945",
"0.60767746",
"0.60767746",
"0.60767746",
"0.6034582",
"0.59905267",
"0.5980722",
"0.591855",
"0.58940667",
"0.5871814",
"0.58520323",
"0.57756644",
"0.57729506",
"0.5769309",
"0.5758894",
"0.574... | 0.57142764 | 25 |
TODO Autogenerated method stub | @Override
public List<Object[]> getTotalStocks(int storageLocId) {
try
{
listOfObjcts=boardDao.getTotalStocks(storageLocId);
}
catch(Exception e)
{
e.printStackTrace();
}
return listOfObjcts;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.608016... | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public List<PendingPo> getPendingPoDetails(String count) {
List<PendingPo> pendingPos=null;
try
{
pendingPos=boardDao.getPendingPoDetails(count);
}
catch(Exception e)
{
logger.error(e.getMessage());
}
return pendingPos;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.608016... | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public List<GoodsDeliveryInTheYear> getGoodsinyear(String msg) {
List<GoodsDeliveryInTheYear> deliveryInTheYears=null;
try
{
deliveryInTheYears=boardDao.getGoodsinyear(msg);
}
catch(Exception e)
{
logger.error(e.getMessage());
}
return deliveryInTheYears;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.66708666",
"0.65675074",
"0.65229905",
"0.6481001",
"0.64770633",
"0.64584893",
"0.6413091",
"0.63764185",
"0.6275735",
"0.62541914",
"0.6236919",
"0.6223816",
"0.62017626",
"0.61944294",
"0.61944294",
"0.61920846",
"0.61867654",
"0.6173323",
"0.61328775",
"0.61276996",
"0... | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public List<ToBeReoredeMaterial> getTobeReorederLevels(String msg) {
List<ToBeReoredeMaterial> reorederLevels=null;
try
{
reorederLevels=boardDao.getTobeReorederLevels(msg);
}
catch(Exception e)
{
logger.error(e.getMessage());
}
return reorederLevels;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.608016... | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public List<InvoiceToCollect> invoiceToCollect(String count) {
List<InvoiceToCollect> collects=null;
try
{
collects=boardDao.invoiceToCollect(count);
}
catch(Exception e)
{
logger.error(e.getMessage());
}
return collects;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.608016... | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public List<InvoiceToPay> getInvoiceToPays(String count) {
List<InvoiceToPay> invoiceToPays=null;
try
{
invoiceToPays=boardDao.getInvoiceToPays(count);
}
catch(Exception e)
{
logger.error(e.getMessage());
}
return invoiceToPays;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.608016... | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public List<MatStockBean> getMatStockDetails() {
List<MatStockBean> matStockBeans=null;
try
{
listOfObjcts=boardDao.getMatStockDetails();
matStockBeans=new ArrayList<MatStockBean>();
Iterator<Object[]> iterator=listOfObjcts.iterator();
while(iterator.hasNext())
{
Object[] objects=(Object[])iterator.next();
MatStockBean stockBean=new MatStockBean();
stockBean.setMatStockId((Integer)objects[0]);
stockBean.setBatchNo((String)objects[1]);
stockBean.setQtyAval((Float)objects[2]);
StorageLocation location=(StorageLocation)objects[3];
Material material=(Material)objects[4];
stockBean.setMaterialName(material.getMaterialName());
stockBean.setStorageLocName(location.getStorageLocation());
matStockBeans.add(stockBean);
}
}
catch(Exception e)
{
logger.error(e.getMessage());
}
return matStockBeans;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.66708666",
"0.65675074",
"0.65229905",
"0.6481001",
"0.64770633",
"0.64584893",
"0.6413091",
"0.63764185",
"0.6275735",
"0.62541914",
"0.6236919",
"0.6223816",
"0.62017626",
"0.61944294",
"0.61944294",
"0.61920846",
"0.61867654",
"0.6173323",
"0.61328775",
"0.61276996",
"0... | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public List<Top5OrderItems> getTop5orderItems() {
List<Object[]> list=null;
List<Top5OrderItems> top5OrderItems=null;
try
{
list=boardDao.getTop5orderItems();
top5OrderItems=new ArrayList<Top5OrderItems>();
Iterator<Object[]> iterator=list.iterator();
while(iterator.hasNext())
{
Object[] objects=(Object[])iterator.next();
Top5OrderItems orderItems=new Top5OrderItems();
orderItems.setMaterial((String)objects[0]);
orderItems.setQuantity(Float.valueOf((String)objects[1]));
top5OrderItems.add(orderItems);
}
}
catch(Exception e)
{
logger.error(e.getMessage());
}
return top5OrderItems;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.608016... | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public List<GetSalesOrderByYear> getSalesOrdersByYear(int year) {
List<Object[]> list=null;
List<GetSalesOrderByYear> byYears=null;
try
{
list=boardDao.getSalesOrdersByYear(year);
byYears=new ArrayList<GetSalesOrderByYear>();
Iterator<Object[]> iterator=list.iterator();
while(iterator.hasNext())
{
Object[] objects=(Object[])iterator.next();
GetSalesOrderByYear salesOrderByYear=new GetSalesOrderByYear();
salesOrderByYear.setMaterial((String)objects[0]);
salesOrderByYear.setMatpct(Float.valueOf((String)objects[1]));
byYears.add(salesOrderByYear);
}
}
catch(Exception e)
{
e.printStackTrace();
logger.error(e.getMessage());
}
return byYears;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.608016... | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public List<Top5OrderItems> allorderItems() {
List<Object[]> list=null;
List<Top5OrderItems> top5OrderItems=null;
try
{
list=boardDao.allorderItems();
top5OrderItems=new ArrayList<Top5OrderItems>();
Iterator<Object[]> iterator=list.iterator();
while(iterator.hasNext())
{
Object[] objects=(Object[])iterator.next();
Top5OrderItems orderItems=new Top5OrderItems();
orderItems.setMaterial((String)objects[0]);
orderItems.setQuantity(Float.valueOf((String)objects[1]));
top5OrderItems.add(orderItems);
}
}
catch(Exception e)
{
logger.error(e.getMessage());
}
return top5OrderItems;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.608016... | 0.0 | -1 |
Get token validity period for the Self contained JWT Access Token. | public static long getAccessTokenLifeTimeInSeconds(OAuthTokenReqMessageContext tokenReqMessageContext,
OAuthAppDO oAuthAppDO) throws IdentityOAuth2Exception {
long lifetimeInSeconds;
boolean isUserAccessTokenType =
isUserAccessTokenType(tokenReqMessageContext.getOauth2AccessTokenReqDTO().getGrantType());
if (isUserAccessTokenType) {
lifetimeInSeconds = oAuthAppDO.getUserAccessTokenExpiryTime();
if (log.isDebugEnabled()) {
log.debug("User Access Token Life time set to : " + lifetimeInSeconds + " sec.");
}
} else {
if (tokenReqMessageContext.getValidityPeriod() == -1) { // the token request does not specify the validity period explicitly
lifetimeInSeconds = oAuthAppDO.getApplicationAccessTokenExpiryTime();
} else { // set the expiry time sent in the request
lifetimeInSeconds = getSecondsTillExpiry(tokenReqMessageContext.getValidityPeriod());
}
if (log.isDebugEnabled()) {
log.debug("Application Access Token Life time set to : " + lifetimeInSeconds + " sec.");
}
}
if (lifetimeInSeconds == 0) {
if (isUserAccessTokenType) {
lifetimeInSeconds =
OAuthServerConfiguration.getInstance().getUserAccessTokenValidityPeriodInSeconds();
if (log.isDebugEnabled()) {
log.debug("User access token time was 0ms. Setting default user access token lifetime : "
+ lifetimeInSeconds + " sec.");
}
} else {
lifetimeInSeconds =
OAuthServerConfiguration.getInstance().getApplicationAccessTokenValidityPeriodInSeconds();
if (log.isDebugEnabled()) {
log.debug("Application access token time was 0ms. Setting default Application access token " +
"lifetime : " + lifetimeInSeconds + " sec.");
}
}
}
if (log.isDebugEnabled()) {
log.debug("JWT Self Signed Access Token Life time set to : " + lifetimeInSeconds + " sec.");
}
return lifetimeInSeconds;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public long getTokenValidityInSeconds() {\n return tokenValidityInSeconds;\n }",
"public Integer getAccessTokenValiditySeconds() {\n return accessTokenValiditySeconds;\n }",
"Duration getTokenExpiredIn();",
"public long getTokenExpirationInMillis() {\n retur... | [
"0.7308715",
"0.69192314",
"0.6767306",
"0.65539974",
"0.6503177",
"0.64413893",
"0.63750684",
"0.62710077",
"0.6036952",
"0.60354525",
"0.60006005",
"0.59738404",
"0.5959721",
"0.59164506",
"0.58640313",
"0.57911557",
"0.5780772",
"0.5773617",
"0.57623506",
"0.5741516",
"0.5... | 0.57418007 | 19 |
Utility method to be used to generate JWT access token for all grant types. | public static String generateToken(JWTAccessTokenIssuerDTO jwtAccessTokenIssuerDTO, Application application)
throws OAuthSystemException {
String accessToken;
String clientId = jwtAccessTokenIssuerDTO.getClientId();
try {
OAuthAppDO oAuthAppDO = OAuth2Util.getAppInformationByClientId(clientId);
String[] audience = oAuthAppDO.getAudiences();
List<String> audienceList = Arrays.asList(audience);
StringBuilder scopeString = new StringBuilder();
String[] scopeList = jwtAccessTokenIssuerDTO.getScopeList();
for (String scope : scopeList) {
scopeString.append(scope).append(" ");
}
String quotaType = APIUtil.getQuotaTypeForApplicationPolicy(application.getTier(),
APIUtil.getTenantId(application.getOwner()));
ApplicationDTO applicationDTO = new ApplicationDTO();
applicationDTO.setId(application.getId());
applicationDTO.setName(application.getName());
applicationDTO.setTier(application.getTier());
applicationDTO.setOwner(application.getOwner());
applicationDTO.setTierQuotaType(quotaType);
AuthenticatedUser endUser = jwtAccessTokenIssuerDTO.getUser();
JwtTokenInfoDTO jwtTokenInfoDTO = APIUtil.getJwtTokenInfoDTO(application,
endUser.toFullQualifiedUsername(),
endUser.getTenantDomain());
jwtTokenInfoDTO.setScopes(scopeString.toString().trim());
jwtTokenInfoDTO.setAudience(audienceList);
jwtTokenInfoDTO.setExpirationTime(jwtAccessTokenIssuerDTO.getValidityPeriod());
jwtTokenInfoDTO.setApplication(applicationDTO);
jwtTokenInfoDTO.setKeyType(application.getKeyType());
jwtTokenInfoDTO.setConsumerKey(clientId);
jwtTokenInfoDTO.setTokenReqMessageContext(jwtAccessTokenIssuerDTO.getTokReqMsgCtx());
jwtTokenInfoDTO.setOauthAuthzMsgCtx(jwtAccessTokenIssuerDTO.getOauthAuthzMsgCtx());
APIMJWTGenerator apimjwtGenerator = new APIMJWTGenerator();
accessToken = apimjwtGenerator.generateJWT(jwtTokenInfoDTO);
} catch (InvalidOAuthClientException | IdentityOAuth2Exception | APIManagementException e) {
log.error("Error occurred while getting JWT Token client ID : " + clientId + " when getting oAuth App " +
"information", e);
throw new OAuthSystemException("Error occurred while getting JWT Token client ID : " + clientId, e);
}
return accessToken;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String generateAccessToken() {\n return accessTokenGenerator.generate().toString();\n }",
"public String generateToken() {\n Authentication authentication = getAuthentication();\n if(authentication == null) {\n throw new AuthenticationCredentialsNotFoundException(\"No user is ... | [
"0.6858034",
"0.6798697",
"0.63904655",
"0.62747073",
"0.61453736",
"0.6099691",
"0.6096453",
"0.59906995",
"0.59789366",
"0.59739673",
"0.59739673",
"0.5960852",
"0.595194",
"0.59410083",
"0.5909393",
"0.59012914",
"0.5899055",
"0.58969027",
"0.58260244",
"0.5809681",
"0.580... | 0.58643836 | 18 |
Get token validity period for the Self contained JWT Access Token. (For implicit grant) | public static long getAccessTokenLifeTimeInSeconds(OAuthAppDO oAuthAppDO) {
long lifetimeInSeconds = oAuthAppDO.getUserAccessTokenExpiryTime();
if (lifetimeInSeconds == 0) {
lifetimeInSeconds = OAuthServerConfiguration.getInstance()
.getUserAccessTokenValidityPeriodInSeconds();
if (log.isDebugEnabled()) {
log.debug("User access token time was 0ms. Setting default user access token lifetime : "
+ lifetimeInSeconds + " sec.");
}
}
if (log.isDebugEnabled()) {
log.debug("JWT Self Signed Access Token Life time set to : " + lifetimeInSeconds + " sec.");
}
return lifetimeInSeconds;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public long getTokenValidityInSeconds() {\n return tokenValidityInSeconds;\n }",
"public Integer getAccessTokenValiditySeconds() {\n return accessTokenValiditySeconds;\n }",
"Duration getTokenExpiredIn();",
"public Integer getRefreshTokenValiditySeconds() {\n ... | [
"0.7407562",
"0.7077848",
"0.7022543",
"0.6589334",
"0.6555866",
"0.6491876",
"0.6438388",
"0.64249945",
"0.61493236",
"0.6107043",
"0.6095697",
"0.6045027",
"0.59499633",
"0.59453446",
"0.59351796",
"0.58645004",
"0.5846632",
"0.58173823",
"0.5801231",
"0.5784024",
"0.577926... | 0.59004104 | 15 |
Driver method for the class | public static void main( String[] args ){
AdjListsGraph<String> a = new AdjListsGraph<String>( "Sample-Graph.tgf" );
System.out.println( a );
System.out.println( "Number of vertices (5):" + a.getNumVertices());
System.out.println( "Number of arcs (7):" + a.getNumArcs());
System.out.println( "isEdge A<-->B (TRUE):" + a.isEdge("A", "B"));
System.out.println( "isArc A-->C (TRUE):" + a.isArc( "A","C"));
System.out.println( "isEdge D<-->E (FALSE):" + a.isEdge( "D","E" ));
System.out.println( "isArc D -> E (TRUE):" + a.isArc( "D","E" ));
System.out.println( "isArc E -> D (FALSE):" + a.isArc( "E","D" ));
System.out.println( "Removing vertex A.");
a.removeVertex( "A" );
System.out.println( "Adding edge B<-->D");
a.addEdge( "B","D" );
System.out.println( "Number of vertices (4):" + a.getNumVertices());
System.out.println( "Number of arcs (5):" + a.getNumArcs());
System.out.println( a );
System.out.println( "Adj to B ([C,D]):" + a.getSuccessors( "B" ) );
System.out.println( "Adj to C ([B]):" + a.getSuccessors( "C" ));
System.out.println( "Adding A (at the end of vertices)." );
a.addVertex( "A" );
System.out.println( "Adding B (should be ignored)." );
a.addVertex( "B" );
System.out.println( "Saving the graph into BCDEA.tgf" );
a.saveToTGF( "BCDEA.tgf" );
System.out.println( "Adding F->G->H->I->J->K->A." );
a.addVertex( "F" );
a.addVertex( "G" );
a.addArc( "F", "G" );
a.addVertex( "H" );
a.addArc( "G", "H" );
a.addVertex( "I" );
a.addArc( "H", "I" );
a.addVertex( "J" );
a.addArc( "I", "J" );
a.addVertex( "K" );
a.addArc( "J", "K" );
a.addArc( "K", "A" );
System.out.println( a );
System.out.println( "Saving the graph into A-K.tgf" );
a.saveToTGF( "A-K.tgf" );
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"@Override\r\n\t\t\tpublic void test() {\n\t\t\t}",
"private stendhal() {\n\t}",
"private Driver(){\n }",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n public... | [
"0.590776",
"0.59011716",
"0.5822881",
"0.5806307",
"0.5799738",
"0.5797972",
"0.5793219",
"0.57831055",
"0.5732424",
"0.57261515",
"0.5697529",
"0.5697529",
"0.5682756",
"0.5659831",
"0.5659831",
"0.56543237",
"0.5647995",
"0.55782056",
"0.5533454",
"0.5523331",
"0.5513822",... | 0.0 | -1 |
Complete the climbingLeaderboard function below. | static int[] climbingLeaderboard(int[] scores, int[] alice) {
int[] ranks = new int[scores.length];
int[] aliceRanks = new int[alice.length];
int endIndex = -1;
int currentElement = Integer.MIN_VALUE;
for (int i = 0; i < ranks.length; i++) {
if (currentElement != scores[i]) {
ranks[++endIndex] = scores[i];
currentElement = scores[i];
}
}
int aliceEndIndex = -1;
for (int i = 0; i < aliceRanks.length; i++) {
int currScore = alice[i];
int globalRankApprox = binarySearch(ranks, alice[i], 0, endIndex);
if (currScore >= ranks[globalRankApprox]) {
aliceRanks[++aliceEndIndex] = globalRankApprox+1;
}else{
aliceRanks[++aliceEndIndex] = globalRankApprox+1+1;
}
}
return aliceRanks;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void requestLeaderboard() {\r\n connection.requestLeaderboard();\r\n }",
"private void showWobblyLeaderboard(CommandContext context) {\n if(leaderboard.isEmpty()) {\n context.getMessageChannel().sendMessage(\n \"There are no wobblies on the leaderboard for \"... | [
"0.64592946",
"0.6334316",
"0.6317564",
"0.6227792",
"0.60582656",
"0.58976233",
"0.5885111",
"0.58816767",
"0.5840562",
"0.5813553",
"0.56876427",
"0.5682416",
"0.5659198",
"0.564747",
"0.5640984",
"0.5623524",
"0.56215113",
"0.56183",
"0.5592653",
"0.55828327",
"0.5582717",... | 0.5741611 | 10 |
Constructor of the enumeration. | KeystoneArchitecture(int value) {
this.value = value;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Enumeration createEnumeration();",
"public sym_complex_enum() {\n }",
"public Enum() \n { \n set(\"\");\n }",
"CommandEnum() {}",
"@Unreachable\n private Enums()\n {\n // Empty default ctor, defined to override access scope.\n }",
"public Enum(String val) \n { \n set(... | [
"0.694301",
"0.69411325",
"0.6939379",
"0.67313576",
"0.67092854",
"0.6645123",
"0.6592536",
"0.65386146",
"0.6512596",
"0.64555854",
"0.64336747",
"0.6408985",
"0.64017725",
"0.63847244",
"0.63749295",
"0.6370019",
"0.63480246",
"0.6334745",
"0.6308249",
"0.6303561",
"0.6298... | 0.0 | -1 |
Retrieves the value of the enumeration, that corresponds to the value used in the enumeration in C. | public int value() {
return value;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"gov.nih.nlm.ncbi.www.MedlineSiDocument.MedlineSi.Type.Value.Enum getValue();",
"com.yahoo.xpathproto.TransformTestProtos.MessageEnum getEnumValue();",
"static int getValue(char c) {\n\t\tswitch(c) {\n\t\tcase 'A': return 0;\n\t\tcase 'C': return 1;\n\t\tcase 'G': return 2;\n\t\tcase 'T': return 3;\n\t\tdefault... | [
"0.7184362",
"0.65943843",
"0.6309688",
"0.627643",
"0.62315404",
"0.62185436",
"0.6155465",
"0.61495006",
"0.6144434",
"0.6123799",
"0.60606694",
"0.6014233",
"0.5980536",
"0.5910561",
"0.5902424",
"0.5902424",
"0.5902424",
"0.5902424",
"0.5902424",
"0.5895262",
"0.5871788",... | 0.0 | -1 |
/ Print the fighter's names and their corresponding health. | public void showStatus(Character fighter1, Character fighter2, int health1, int health2) {
System.out.println();
System.out.println("------------------------------");
System.out.println(String.format("%-15s%15s\n%-15d%15d", fighter1.getName(), fighter2.getName(), health1, health2));
System.out.println("------------------------------");
System.out.println();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void printCurrentBattlers() {\n //System.out.println(\"Char hp: \" + character.getCurrHP());\n System.out.printf(\"battle Allies: \");\n for (MovingEntity e: battleAllies) {\n System.out.printf(\"%s \",e.getID());\n }\n System.out.printf(\"\\n\");\n\n Sys... | [
"0.65766716",
"0.6485746",
"0.6462098",
"0.6306953",
"0.6295929",
"0.6279561",
"0.6196886",
"0.61752236",
"0.60899484",
"0.6043141",
"0.60357195",
"0.6012372",
"0.6004185",
"0.59587675",
"0.59346944",
"0.5933135",
"0.59324855",
"0.592293",
"0.59188765",
"0.5894227",
"0.588070... | 0.74123186 | 0 |
Create an entity for this test. This is a static method, as tests for other entities might also need it, if they test an entity which requires the current entity. | public static TranshipTube createEntity(EntityManager em) {
TranshipTube transhipTube = new TranshipTube()
.status(DEFAULT_STATUS)
.memo(DEFAULT_MEMO)
.columnsInTube(DEFAULT_COLUMNS_IN_TUBE)
.rowsInTube(DEFAULT_ROWS_IN_TUBE);
// Add required entity
TranshipBox transhipBox = TranshipBoxResourceIntTest.createEntity(em);
em.persist(transhipBox);
em.flush();
transhipTube.setTranshipBox(transhipBox);
// Add required entity
FrozenTube frozenTube = FrozenTubeResourceIntTest.createEntity(em);
em.persist(frozenTube);
em.flush();
transhipTube.setFrozenTube(frozenTube);
return transhipTube;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Entity createEntity();",
"T createEntity();",
"protected abstract ENTITY createEntity();",
"void create(E entity);",
"void create(T entity);",
"E create(E entity);",
"E create(E entity);",
"TestEntity buildEntity () {\n TestEntity testEntity = new TestEntity();\n testEntity.setName(\"Te... | [
"0.77223766",
"0.75040364",
"0.7487764",
"0.7361146",
"0.7314088",
"0.7155444",
"0.7155444",
"0.71508443",
"0.71501833",
"0.7076941",
"0.7016207",
"0.68038535",
"0.6752083",
"0.6740013",
"0.6740013",
"0.6680824",
"0.6665985",
"0.663898",
"0.6624753",
"0.66239864",
"0.66062766... | 0.67108333 | 15 |
If o is a proctor Payload object, then print just the contents of the payload, otherwise just pretty print the object. | public static String prettyPrintJSONPayloadContents(final Object o) throws IOException, JsonGenerationException, JsonMappingException {
if (o != null && o instanceof Payload) {
final Payload p = (Payload) o;
return OBJECT_MAPPER.writerWithDefaultPrettyPrinter().writeValueAsString(p.fetchAValue());
} else {
return OBJECT_MAPPER.writerWithDefaultPrettyPrinter().writeValueAsString(o);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static String printPayloadType(final Object o) throws IOException, JsonGenerationException, JsonMappingException {\n if (o != null && o instanceof Payload) {\n final Payload p = (Payload) o;\n return p.fetchType();\n } else {\n return \"none\";\n }\n ... | [
"0.73097736",
"0.67785734",
"0.6526215",
"0.6417516",
"0.63544494",
"0.6342907",
"0.62611955",
"0.6235793",
"0.6218369",
"0.61755085",
"0.6168863",
"0.61174893",
"0.6077373",
"0.6031496",
"0.598072",
"0.5967911",
"0.5949141",
"0.59459853",
"0.59150124",
"0.5880307",
"0.587324... | 0.7443002 | 0 |
If o is a proctor Payload object, then return its type as a string, otherwise return "none". | public static String printPayloadType(final Object o) throws IOException, JsonGenerationException, JsonMappingException {
if (o != null && o instanceof Payload) {
final Payload p = (Payload) o;
return p.fetchType();
} else {
return "none";
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"String getTypeAsString();",
"@SuppressWarnings(\"rawtypes\")\n\tprotected static String asString(Object o){\n\t\tif(o == null)\n\t\t\treturn \"null\";\n\t\tif(o instanceof Integer)\n\t\t\treturn ((Integer)o).toString() + \" [Java]\";\n\t\tif(o instanceof String)\n\t\t\treturn ((String)o) + \" [Java]\";\n\t\tif(o... | [
"0.6503234",
"0.62996346",
"0.6207273",
"0.6182566",
"0.6112739",
"0.6112739",
"0.6112739",
"0.6112739",
"0.6112739",
"0.6112739",
"0.6112739",
"0.6112739",
"0.6112739",
"0.6112739",
"0.6112739",
"0.6112739",
"0.6112739",
"0.6112739",
"0.6112739",
"0.6112739",
"0.6112739",
... | 0.84591866 | 0 |
Converts a String representing Date or Date Time to timestamp value. Supported formats are: 20220224 20220224 04:55:00 20220224 04:55:00.001 20220224T04:55:00 20220224T04:55:00.001 20220224T04:55:00.001Z | public static long convertToTimestamp(String timestamp) {
return LocalDateTime.parse(timestamp, FORMATTER).toInstant(ZoneOffset.UTC).toEpochMilli();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\t\tpublic java.sql.Timestamp convert(String s) throws ParseException {\n\t\t\ts = supportHtml5DateTimePattern(s);\n\t\t\t\n\t\t\tif (timeStampWithoutSecPatternLen == s.length()) {\n\t\t\t\ts = s + \":00\";\n\t\t\t}\n\t\t\tif (s.length() > dateLen) {\n\t\t\t\treturn java.sql.Timestamp.valueOf(s);\n\t\t\... | [
"0.6860657",
"0.6516975",
"0.65116686",
"0.61970526",
"0.6158359",
"0.6040429",
"0.5924011",
"0.584925",
"0.57833064",
"0.57768416",
"0.5765832",
"0.5647434",
"0.5635359",
"0.5617535",
"0.5596985",
"0.55848616",
"0.5534403",
"0.5529649",
"0.5513018",
"0.55105627",
"0.55014104... | 0.6011824 | 6 |
taskSnapshot.getMetadata() contains file metadata such as size, contenttype, and download URL. | @Override
public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {
Uri downloadUrl = taskSnapshot.getDownloadUrl();
if (downloadUrl != null) {
mPlayer.image = downloadUrl.toString();
savePlayerInfo();
ToastUtils.show(R.string.toast_profile_saved, Toast.LENGTH_SHORT);
} else {
ToastUtils.show(R.string.toast_error_generic, Toast.LENGTH_SHORT);
}
showProgress(false);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"com.google.cloud.compute.v1.Metadata getMetadata();",
"com.google.cloud.talent.v4beta1.ResponseMetadata getMetadata();",
"public ResourceContent getMetadata() throws IOException;",
"@java.lang.Override\n public io.grafeas.v1.Metadata getMetadata() {\n return metadata_ == null ? io.grafeas.v1.Metadata.get... | [
"0.6492017",
"0.641604",
"0.6392995",
"0.62454176",
"0.60624087",
"0.60475785",
"0.60475785",
"0.60107553",
"0.6008589",
"0.59753215",
"0.59680897",
"0.59558564",
"0.5942429",
"0.59275705",
"0.5882467",
"0.587896",
"0.58559203",
"0.58522826",
"0.57813025",
"0.57656723",
"0.57... | 0.0 | -1 |
maps document results into a list of objects | @Override
public List<T> getLimitedFilteredResult(Bson filter, int limit) {
Gson gson = new GsonBuilder().create();
List<T> innerList = new ArrayList<>();
collection.find(filter).limit(limit).forEach((Block<Document>) document -> {
innerList.add(gson.fromJson(document.toJson(), entityClass));
});
return innerList;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public List getDocuments(List result) throws DocumentNotFoundException {\n List ret = new ArrayList();\n for (Object o : result) {\n ProbDoc doc = (ProbDoc) o;\n String docID = doc.getDocID();\n ret.add(new XMLDoc(docID, getDocument(docID)));\n }\n retur... | [
"0.67258096",
"0.6624649",
"0.63411766",
"0.62699264",
"0.624096",
"0.60585666",
"0.6056651",
"0.60468894",
"0.604044",
"0.60339445",
"0.6030043",
"0.6012002",
"0.6007177",
"0.5971514",
"0.5939731",
"0.5846081",
"0.58154297",
"0.5807737",
"0.580451",
"0.5772518",
"0.57661986"... | 0.0 | -1 |
TODO Read units from settings | @Override
protected WeatherInfo doInBackground(Void... params) {
String weatherID = "";
String areaID = "";
try {
String cityIds = null;
if (mRequest.getRequestInfo().getRequestType()
== RequestInfo.TYPE_WEATHER_BY_WEATHER_LOCATION_REQ) {
cityIds = mRequest.getRequestInfo().getWeatherLocation().getCityId();
weatherID = cityIds.split(",")[0];
areaID = cityIds.split(",")[1];
} else if (mRequest.getRequestInfo().getRequestType() ==
RequestInfo.TYPE_WEATHER_BY_GEO_LOCATION_REQ) {
double lat = mRequest.getRequestInfo().getLocation().getLatitude();
double lng = mRequest.getRequestInfo().getLocation().getLongitude();
String cityNameResponse = HttpRetriever.retrieve(String.format(GEO_URL, lat, lng));
if (TextUtils.isEmpty(cityNameResponse)) {
return null;
}
cityNameResponse = cityNameResponse.replace("renderReverse&&renderReverse(", "").replace(")", "");
Log.d(TAG, "cityNameResponse" + cityNameResponse);
JSONObject jsonObjectCity = JSON.parseObject(cityNameResponse);
String areaName = jsonObjectCity.getJSONObject("result").getJSONObject("addressComponent").getString("district");
String cityName = jsonObjectCity.getJSONObject("result").getJSONObject("addressComponent").getString("city");
areaName = TextUtil.getFormatArea(areaName);
cityName = TextUtil.getFormatArea(cityName);
City city = cityDao.getCityByCityAndArea(cityName, areaName);
if (city == null) {
city = cityDao.getCityByCityAndArea(cityName, cityName);
if (city == null)
return null;
}
weatherID = city.getWeatherId();
areaID = city.getAreaId();
} else {
return null;
}
//miui天气
String miuiURL = String.format(URL_WEATHER_MIUI, weatherID);
if (DEBUG) Log.d(TAG, "miuiURL " + miuiURL);
String miuiResponse = HttpRetriever.retrieve(miuiURL);
if (miuiResponse == null) return null;
if (DEBUG) Log.d(TAG, "Rmiuiesponse " + miuiResponse);
//2345天气
String ttffUrl = String.format(URL_WEATHER_2345, areaID);
if (DEBUG) Log.d(TAG, "ttffUrl " + ttffUrl);
String ttffResponse = DecodeUtil.decodeResponse(HttpRetriever.retrieve(ttffUrl));
if (ttffResponse == null) return null;
if (DEBUG) Log.d(TAG, "ttffResponse " + ttffResponse);
JSONObject ttffAll = JSON.parseObject(ttffResponse);
String cityName = ttffAll.getString("cityName");
//实时
JSONObject sk = ttffAll.getJSONObject("sk");
String humidity = sk.getString("humidity");
String sk_temp = sk.getString("sk_temp");
//日落日升
JSONObject sunrise = ttffAll.getJSONObject("sunrise");
ArrayList<WeatherInfo.DayForecast> forecasts =
parse2345(ttffAll.getJSONArray("days7"), true);
WeatherInfo.Builder weatherInfo = null;
weatherInfo = new WeatherInfo.Builder(
cityName, sanitizeTemperature(Double.parseDouble(sk_temp), true),
WeatherContract.WeatherColumns.TempUnit.CELSIUS);
//湿度
humidity = humidity.replace("%", "");
weatherInfo.setHumidity(Double.parseDouble(humidity));
if (miuiResponse != null) {
//风速,风向
JSONObject weather = JSON.parseObject(miuiResponse);
JSONObject accu_cc = weather.getJSONObject("accu_cc");
weatherInfo.setWind(accu_cc.getDouble("WindSpeed"), accu_cc.getDouble("WindDirectionDegrees"),
WeatherContract.WeatherColumns.WindSpeedUnit.KPH);
}
weatherInfo.setTimestamp(System.currentTimeMillis());
weatherInfo.setForecast(forecasts);
if (forecasts.size() > 0) {
weatherInfo.setTodaysLow(sanitizeTemperature(forecasts.get(0).getLow(), true));
weatherInfo.setTodaysHigh(sanitizeTemperature(forecasts.get(0).getHigh(), true));
weatherInfo.setWeatherCondition(IconUtil.getWeatherCodeByType(
ttffAll.getJSONArray("days7").getJSONObject(0).getString(
DateTimeUtil.isNight(sunrise.getString("todayRise"), sunrise.getString("todaySet"))
? "nightWeaShort" : "dayWeaShort"), sunrise.getString("todayRise"), sunrise.getString("todaySet")));
}
if (lastWeatherInfo != null)
lastWeatherInfo = null;
lastWeatherInfo = weatherInfo.build();
return lastWeatherInfo;
} catch (Exception e) {
if (DEBUG) Log.w(TAG, "JSONException while processing weather update", e);
}
return null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"String getUnits();",
"String getUnits();",
"String getUnits();",
"Units getUnits();",
"protected String getUnits()\n {\n return units;\n }",
"public byte getUnits() { return units; }",
"String getUnitsString();",
"public int getUnits() {\r\n return units;\r\n }",
... | [
"0.7636145",
"0.7636145",
"0.7636145",
"0.7607032",
"0.7490549",
"0.7360137",
"0.7359285",
"0.7352253",
"0.7351148",
"0.73349726",
"0.72937447",
"0.7229439",
"0.7193806",
"0.71525186",
"0.7119199",
"0.70751804",
"0.7069722",
"0.7069722",
"0.706832",
"0.7059194",
"0.70224524",... | 0.0 | -1 |
String profile = environment.getProperty("service.profile"); | @Override
public String getKcbCrawling(PersonVO person) throws FinsetException, IOException {
String cd_result = Constant.SUCCESS;
logger.debug(":::::::::::::::::::::::::::::::::::: KCB START ::::::::::::::::::::::::::::::::::::");
KcbCreditInfoVO info = new KcbCreditInfoVO();
boolean isSuccess = false;
if("LOCAL".equals(profile)) {
logger.error("continue");
// info.setYn_craw_test("Y");
// info.setNoPerson(person.getNo_person());
// info.setNmCust(person.getNm_person());
// info.setNmIf("600420");
// info.setCd_regist("09"); //01 신규, 09 URL
// info.setBgn(person.getBgn());
// info.setDi(person.getKcb_di());
// info.setHp(person.getHp());
// ReturnClass returnClass = urlCrawling(info);
// info.setYn_craw_test("Y");
// returnClass = parseCrawling(info);
// debtManager.debtPdocRun(person.getNo_person());
// cd_result = returnClass.getCd_result();
} else {
try {
//600420 크롤링 시작
logger.debug(":::::::::::::::::::::::::::::::::::: KCB CRAW START ::::::::::::::::::::::::::::::::::::");
info.setNoPerson(person.getNo_person());
info.setNmCust(person.getNm_person());
info.setNmIf("600420");
info.setCd_regist("09"); //01 신규, 09 URL
info.setBgn(person.getBgn());
info.setDi(person.getKcb_di());
info.setHp(person.getHp());
ReturnClass returnClass = urlCrawling(info);
logger.debug(":::::::::::::::::::::::::::::::::::: KCB CRAW END ::::::::::::::::::::::::::::::::::::");
//parsing
returnClass = parseCrawling(info);
if(Constant.SUCCESS.equals(returnClass.getCd_result())) {
//TODO call Package
/*** 부채TABLE DATA생성 proc call ***/
debtManager.debtPdocRun(person.getNo_person());
isSuccess = true;
}
cd_result = returnClass.getCd_result();
} catch (FinsetException e) {
isSuccess = false;
LogUtil.error(logger, e);
throw e;
} catch (IOException e) {
isSuccess = false;
LogUtil.error(logger, e);
throw e;
} finally {
if(isSuccess == false) {
//error 발생시 당일 전문 데이터 DELETE
deleteKcbCb(person.getNo_person());
cd_result = Constant.FAILED;
}
}
}
logger.debug(":::::::::::::::::::::::::::::::::::: KCB END ::::::::::::::::::::::::::::::::::::");
return cd_result;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private String getActiveProfile() {\r\n String[] profiles = env.getActiveProfiles();\r\n String activeProfile = \"add\";\r\n if (profiles != null && profiles.length > 0) {\r\n activeProfile = profiles[0];\r\n }\r\n System.out.println(\"===== The active profile is \" + ... | [
"0.6577477",
"0.6512432",
"0.6474049",
"0.64356947",
"0.63718164",
"0.63718164",
"0.6328039",
"0.62584186",
"0.6190392",
"0.6178333",
"0.5995813",
"0.5985477",
"0.59664303",
"0.59250116",
"0.5923282",
"0.58681846",
"0.58481276",
"0.5843387",
"0.58044624",
"0.57761043",
"0.576... | 0.0 | -1 |
/ KCB PARSING END | @Override
public ReturnClass createKcbReqNonfiInfo(KcbReqNonfiInfoVO kcbReqNonfiInfoVO) {
scrapMapper.createKcbReqNonfiInfo(kcbReqNonfiInfoVO);
return new ReturnClass(Constant.SUCCESS, "KCB 비금융정보 요청내역 저장 완료", "");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void kk12() {\n\n\t}",
"public void func_70295_k_() {}",
"@Override\r\n\tpublic void visit(ParkB parkB) {\n\t\t\r\n\t}",
"public boolean k_()\r\n/* 450: */ {\r\n/* 451:464 */ return false;\r\n/* 452: */ }",
"private void inzsr() {\n\t\tid1Ctdta = 1;\n\t\tstrCtdta = \"Each KGS \";\n\... | [
"0.71593523",
"0.59778094",
"0.5965728",
"0.5829546",
"0.5818116",
"0.5744094",
"0.5681645",
"0.56601423",
"0.5659814",
"0.563515",
"0.56321687",
"0.5623434",
"0.55912167",
"0.5583857",
"0.55738896",
"0.55108386",
"0.5462569",
"0.5459777",
"0.54487467",
"0.54320437",
"0.54312... | 0.0 | -1 |
Method to add a coordinate to history, left shift if max size is exceeded | public void addGPSCoordinateToHistory(GPSCoordinate coordinate){
if(coordinateHistory.size() == MAX_SIZE){
ArrayList<GPSCoordinate> temp = new ArrayList();
for(int i = 1; i < coordinateHistory.size(); i++){
temp.add(coordinateHistory.get(i));
}
temp.add(coordinate);
coordinateHistory = temp;
if(DEBUG_PRINT){
for(GPSCoordinate p: coordinateHistory){
System.out.println("****************");
System.out.println(p);
}
}
}else{
coordinateHistory.add(coordinate);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void addPositionToHistory(long ti, double x, double y) {\n synchronized(positionHistory){\n if (positionHistory.size() >= MAXHISTORY) {\n positionHistory.remove(0);\n }\n positionHistory.add(new ActorPositionTimestamp(ti, x, y));\n }\n }",
"... | [
"0.6018915",
"0.54464555",
"0.541371",
"0.53504205",
"0.5295059",
"0.5285462",
"0.5271713",
"0.5253721",
"0.5233319",
"0.514658",
"0.50133353",
"0.50117016",
"0.4999557",
"0.499383",
"0.49630174",
"0.49568233",
"0.49403134",
"0.49291",
"0.49248838",
"0.4922411",
"0.49188685",... | 0.6796608 | 0 |
Method to add a coordinate to history, left shift if max size is exceeded This adds to path history, which is the array to draw out the path of the aircraft | public void addPathPointToHistory(double[] pathPoint){
//Check for null condition
if(pathPoint == null)
return;
//Makes sure that there are no duplicate points
if(pathPointHistory.size() != 0){
double xLast = pathPointHistory.get(pathPointHistory.size() - 1)[0];
double yLast = pathPointHistory.get(pathPointHistory.size() - 1)[1];
if(xLast == pathPoint[0] && yLast == pathPoint[1])
return;
}
//Adds to the path array
if(pathPointHistory.size() == PATH_SIZE){
ArrayList<double[]> temp = new ArrayList();
for(int i = 1; i < pathPointHistory.size(); i++){
temp.add(pathPointHistory.get(i));
}
temp.add(pathPoint);
pathPointHistory = temp;
}else{
pathPointHistory.add(pathPoint);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void addGPSCoordinateToHistory(GPSCoordinate coordinate){\r\n if(coordinateHistory.size() == MAX_SIZE){\r\n ArrayList<GPSCoordinate> temp = new ArrayList();\r\n for(int i = 1; i < coordinateHistory.size(); i++){\r\n temp.add(coordinateHistory.get(i));\r\n ... | [
"0.6434418",
"0.5616547",
"0.56123376",
"0.53736013",
"0.5271382",
"0.5154404",
"0.5135348",
"0.51031077",
"0.5094183",
"0.5016407",
"0.5013843",
"0.4987681",
"0.49870807",
"0.49821877",
"0.49725014",
"0.49667463",
"0.49590462",
"0.49208713",
"0.49203867",
"0.48874012",
"0.48... | 0.6387642 | 1 |
Get the heading in radians | public double calculateHeadingRadians(){
if(coordinateHistory.size() > 2){
GPSCoordinate firstPoint = coordinateHistory.get(coordinateHistory.size() - 2);
GPSCoordinate secondPoint = coordinateHistory.get(coordinateHistory.size() - 1);
if(!firstPoint.compareTo(secondPoint)){
double latA = firstPoint.getLatitude();
double longA = firstPoint.getLongitude();
double latB = secondPoint.getLatitude();
double longB = secondPoint.getLongitude();
double X = Math.cos(latB) * Math.sin(longB - longA);
double Y = (Math.cos(latA) * Math.sin(latB)) - (Math.sin(latA) * Math.cos(latB) * Math.cos(longB - longA));
headingRadians = - Math.atan2(X, Y);
return headingRadians;
}else{
return headingRadians;
}
}else{
return headingRadians;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public double getHeadingInDegrees(){\r\n double headingRadians = calculateHeadingRadians();\r\n return headingRadians * 180 / Math.PI;\r\n }",
"public double getHeading() {\n return Rotation2d.fromDegrees(m_gyro.getAngle()).getDegrees();\n }",
"private float getHeading() {\n Orienta... | [
"0.87159795",
"0.79848886",
"0.79179394",
"0.7820522",
"0.7694115",
"0.7574506",
"0.735568",
"0.72256887",
"0.72256887",
"0.72256887",
"0.7177492",
"0.71770364",
"0.7108911",
"0.7088638",
"0.7047753",
"0.70277727",
"0.7017602",
"0.70129496",
"0.70033777",
"0.69926476",
"0.699... | 0.7448508 | 6 |
Get the heading in degrees | public double getHeadingInDegrees(){
double headingRadians = calculateHeadingRadians();
return headingRadians * 180 / Math.PI;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private float getHeading() {\n Orientation anglesA = robot.imu.getAngularOrientation(\n AxesReference.INTRINSIC, AxesOrder.ZYX, AngleUnit.DEGREES);\n return AngleUnit.DEGREES.normalize(\n AngleUnit.DEGREES.fromUnit(anglesA.angleUnit, anglesA.firstAngle));\n }",
"pub... | [
"0.8310315",
"0.82080907",
"0.813348",
"0.80518013",
"0.80518013",
"0.80518013",
"0.79933304",
"0.7695253",
"0.7691403",
"0.7677588",
"0.7677588",
"0.76393765",
"0.76393765",
"0.75438195",
"0.74425435",
"0.7382848",
"0.73279047",
"0.7318848",
"0.7270108",
"0.71933085",
"0.718... | 0.8961139 | 0 |
public DistributedCacheChildDispatcher(int threadPoolSize, long threadKeepAliveTime, int schedulerPoolSize, long schedulerKeepAliveTime) public DistributedCacheChildDispatcher(int schedulerPoolSize, long schedulerKeepAliveTime, ChildMapRegistry registry) | public DistributedCacheChildDispatcher(int threadPoolSize, long threadKeepAliveTime, int schedulerPoolSize, long schedulerKeepAliveTime, ChildMapRegistry<Key, Value, Factory, DB> registry)
{
super(threadPoolSize, threadKeepAliveTime, schedulerPoolSize, schedulerKeepAliveTime);
// super(schedulerPoolSize, schedulerKeepAliveTime);
// this.registry = new ChildMapRegistry<Value, Factory, DB>();
this.putValueNotificationDispatcher = new CacheNotificationDispatcher.CacheNotificationDispatcherBuilder<PutNotification<Value>, PutUnicastNotificationThread<Key, Value, Factory, DB>, Key, Value, Factory, DB, PutUnicastNotificationThreadCreator<Key, Value, Factory, DB>>()
.poolSize(ServerConfig.NOTIFICATION_DISPATCHER_POOL_SIZE)
// .keepAliveTime(ServerConfig.NOTIFICATION_DISPATCHER_THREAD_ALIVE_TIME)
// .threadPool(SharedThreadPool.SHARED().getPool())
.threadCreator(new PutUnicastNotificationThreadCreator<Key, Value, Factory, DB>())
.notificationQueueSize(ServerConfig.NOTIFICATION_QUEUE_SIZE)
.dispatcherWaitTime(ServerConfig.NOTIFICATION_DISPATCHER_WAIT_TIME)
.waitRound(ServerConfig.NOTIFICATION_DISPATCHER_WAIT_ROUND)
.idleCheckDelay(ServerConfig.NOTIFICATION_DISPATCHER_IDLE_CHECK_DELAY)
.idleCheckPeriod(ServerConfig.NOTIFICATION_DISPATCHER_IDLE_CHECK_PERIOD)
.scheduler(super.getScheduler())
// .registry(this.registry)
.registry(registry)
// .timeout(ServerConfig.THREAD_POOL_SHUTDOWN_TIMEOUT)
.build();
this.uniGetRequestNotificationDispatcher = new CacheNotificationDispatcher.CacheNotificationDispatcherBuilder<UniGetRequest<Key>, UniGetRequestThread<Key, Value, Factory, DB>, Key, Value, Factory, DB, UniGetRequestThreadCreator<Key, Value, Factory, DB>>()
.poolSize(ServerConfig.NOTIFICATION_DISPATCHER_POOL_SIZE)
// .keepAliveTime(ServerConfig.NOTIFICATION_DISPATCHER_THREAD_ALIVE_TIME)
// .threadPool(SharedThreadPool.SHARED().getPool())
.threadCreator(new UniGetRequestThreadCreator<Key, Value, Factory, DB>())
.notificationQueueSize(ServerConfig.NOTIFICATION_QUEUE_SIZE)
.dispatcherWaitTime(ServerConfig.NOTIFICATION_DISPATCHER_WAIT_TIME)
.waitRound(ServerConfig.NOTIFICATION_DISPATCHER_WAIT_ROUND)
.idleCheckDelay(ServerConfig.NOTIFICATION_DISPATCHER_IDLE_CHECK_DELAY)
.idleCheckPeriod(ServerConfig.NOTIFICATION_DISPATCHER_IDLE_CHECK_PERIOD)
.scheduler(super.getScheduler())
.registry(registry)
// .timeout(ServerConfig.THREAD_POOL_SHUTDOWN_TIMEOUT)
.build();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected Recycler(int maxCapacityPerThread, int maxSharedCapacityFactor)\r\n/* 98: */ {\r\n/* 99:128 */ this(maxCapacityPerThread, maxSharedCapacityFactor, RATIO, MAX_DELAYED_QUEUES_PER_THREAD);\r\n/* 100: */ }",
"public MapReferenceFactory(DbFactoryRegistry registry) {\n super(registry, ... | [
"0.54466844",
"0.54384243",
"0.5278368",
"0.52579147",
"0.5202359",
"0.5084256",
"0.49712035",
"0.49515414",
"0.49410453",
"0.491532",
"0.4901947",
"0.48784083",
"0.48387533",
"0.48090726",
"0.4763856",
"0.47357917",
"0.47019508",
"0.46850586",
"0.46572554",
"0.46422276",
"0.... | 0.88775396 | 0 |
TODO Autogenerated method stub | @Override
public void dispose(long timeout) throws InterruptedException
{
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.608016... | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public void process(MessageStream<ServerMessage> message)
{
} | {
"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 |
Override to tear down your specific external resource. | protected void after() {
System.clearProperty(DandelionConfig.BUNDLE_PRE_LOADERS.getName());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected abstract void deAllocateNativeResource();",
"@Override\n public void cleanup() {\n if (this.inputStream != null) {\n try {\n this.inputStream.close();\n }\n catch (IOException var1_1) {}\n }\n this.defaultFetcher.cleanup();\n }"... | [
"0.7079005",
"0.6552908",
"0.6524217",
"0.6507382",
"0.64794225",
"0.64794225",
"0.64756393",
"0.6472446",
"0.6432555",
"0.64299124",
"0.6425782",
"0.6386949",
"0.6386949",
"0.6384397",
"0.63787615",
"0.63787615",
"0.63787615",
"0.63715833",
"0.63614714",
"0.6337001",
"0.6335... | 0.0 | -1 |
Check if the supplied context can render PDF files via some installed application that reacts to a intent with the pdf mime type and viewing action. | public static boolean canDisplayPdf(Context context) {
PackageManager packageManager = context.getPackageManager();
Intent testIntent = new Intent(Intent.ACTION_VIEW);
testIntent.setType(MIME_TYPE_PDF);
if (packageManager.queryIntentActivities(testIntent,
PackageManager.MATCH_DEFAULT_ONLY).size() > 0) {
return true;
} else {
return false;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private boolean isDeviceIndependentType(String mimeType){\n return mimeType.matches(INDEPENDENT_PATERN) &&\n independentResources.contains(mimeType);\n }",
"private static boolean isIntentAvailable(Context context, String action) {\n final PackageManager packageManager = context.g... | [
"0.54630834",
"0.5434793",
"0.53153",
"0.52554977",
"0.52502775",
"0.5241226",
"0.52096313",
"0.51870567",
"0.51688737",
"0.5168866",
"0.5159248",
"0.5157876",
"0.5142862",
"0.51426756",
"0.5111165",
"0.509941",
"0.50967854",
"0.5091832",
"0.50577587",
"0.50139195",
"0.500830... | 0.8087992 | 0 |
Write your code here to execute after dialog closed | public void onClick(DialogInterface dialog, int which) {
if (dialog != null)
dialog.dismiss();
Toast.makeText(
getApplicationContext(),
XacidaOnlineActivity.this
.getString(R.string.dieredieuf),
Toast.LENGTH_SHORT).show();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void quitDialog() {\r\n\t\tdispose();\r\n\t}",
"@Override\n public void windowClosing(WindowEvent we) {\n finishDialog();\n }",
"@Override\n public void run() {\n pDialog.dismiss();\n finish();\n }",
"void dialogClos... | [
"0.72446495",
"0.70733184",
"0.6998373",
"0.69736785",
"0.68378955",
"0.68348587",
"0.67993647",
"0.67910045",
"0.6777341",
"0.67590916",
"0.6739702",
"0.6721834",
"0.670879",
"0.6692199",
"0.66695124",
"0.6655431",
"0.6653544",
"0.66380847",
"0.66358143",
"0.6620033",
"0.661... | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public void beforeTextChanged(CharSequence arg0, int arg1,
int arg2, int arg3) {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.608016... | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public void afterTextChanged(Editable arg0) {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.66708666",
"0.65675074",
"0.65229905",
"0.6481001",
"0.64770633",
"0.64584893",
"0.6413091",
"0.63764185",
"0.6275735",
"0.62541914",
"0.6236919",
"0.6223816",
"0.62017626",
"0.61944294",
"0.61944294",
"0.61920846",
"0.61867654",
"0.6173323",
"0.61328775",
"0.61276996",
"0... | 0.0 | -1 |
Provides a protocol to follow when a generic message is sent from the server to the client. The message is going to be printed to the user regardless if the chosen interface is GUI or CLI. | void onNewMessage(String message); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public interface I_ShowBlueSend {\n /**蓝牙连接提示*/\n void showMessage(String message);\n}",
"interface MessageDisplay {\n\tpublic void message(String p_msg);\n}",
"public interface MessageInterface {\n\t\n\t/** \n\t * Get Message type.<br>\n\t * \n\t * Operations on Server operate based on the Message type.... | [
"0.65815103",
"0.64739263",
"0.64688253",
"0.6411805",
"0.6269828",
"0.6201708",
"0.6198741",
"0.6185309",
"0.6182222",
"0.61727166",
"0.61532307",
"0.614996",
"0.61390394",
"0.6132685",
"0.61194503",
"0.6113641",
"0.61029226",
"0.61025095",
"0.60956764",
"0.60921586",
"0.608... | 0.0 | -1 |
Method that describes what to do when the server notifies the client about the disconnection of a player. The exact protocol to follow depends on the interface chosen by the user | void disconnectedPlayerMessage(String name); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"abstract protected void onDisconnection();",
"@Override\n\tpublic void playerDisconnected(String playerID, DisconnectReason reason) {\n\t}",
"void clientDisconnected(Client client, DisconnectInfo info);",
"@Override\r\n\t\t\t\tpublic void onClientDisconnect(ServerConnection sc) {\n\t\t\t\t\tSystem.out.printl... | [
"0.8149758",
"0.7538842",
"0.74550396",
"0.7241484",
"0.7239377",
"0.71856827",
"0.7164848",
"0.7146729",
"0.7128645",
"0.7085874",
"0.7081296",
"0.70074004",
"0.70074004",
"0.7005697",
"0.70044523",
"0.6997358",
"0.6987177",
"0.6936314",
"0.69291246",
"0.6884126",
"0.6882061... | 0.74978673 | 2 |
Method that describes what to do when the server notifies the client about an update about the game state. The exact protocol to follow depends on the interface chosen by the user | void onModelChanged(MatchSnapshot matchSnapshot); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void receivedUpdateFromServer();",
"void stateUpdate(String msg);",
"void onUpdate(Message message);",
"@Override\n\tpublic void update(Game game) {\n\t\t\n\t\tObject packet = game.connectionManager.mostRecentPacket;\n\t\tif (packet instanceof StatePacket)\n\t\t{\n\t\t\tgame.manager.receiveUpdate(game... | [
"0.748218",
"0.70856965",
"0.67663926",
"0.670218",
"0.6625402",
"0.6612727",
"0.6581512",
"0.6523294",
"0.6478751",
"0.64455664",
"0.6438639",
"0.64335847",
"0.6426891",
"0.6422835",
"0.6372557",
"0.63702726",
"0.6343835",
"0.6341535",
"0.63248193",
"0.63239",
"0.626785",
... | 0.0 | -1 |
Declaration section for the data members | public MyPractice()
{
//Unless we specify values all data members
//are a zero, false, or null
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void InitData() {\n }",
"private void InitData() {\n\t}",
"@Override\n\tpublic void initData() {\n\t\t\n\t}",
"public Data() {\n\t\tif (flag == 0) {\n\t\t\tflag = 1;\n\t\t\tfloat def = 0;\n\t\t\tfor (int i = 0; i < 4; i++) {\n\n\t\t\t\tlocation.add(def);\n\t\t\t\tstate.add(0);\n\t\t\t\tboardsize.ad... | [
"0.61054444",
"0.60137564",
"0.59741104",
"0.59679145",
"0.5940308",
"0.593982",
"0.593982",
"0.5934732",
"0.5934732",
"0.5934732",
"0.5911604",
"0.5896657",
"0.5894285",
"0.58813345",
"0.5880766",
"0.5880766",
"0.58786887",
"0.5836799",
"0.5814596",
"0.57808065",
"0.57808065... | 0.0 | -1 |
Generates a new population from the given constants | public void generatePopulation() {
if (SCType.getScLayers() <= 2)
Logger.logError("To few supply chain layers, minimum of 3 required:" + SCType.getScLayers());
ArrayList<CountryAgent> countryAgents = SU.getObjectsAll(CountryAgent.class);
for (CountryAgent country : countryAgents) {
if (country.containsSCType(SCType.PRODUCER)) {
for (int i = 0; i < Constants.N_PRODUCERS; i++) {
country.spawnAgent(SCType.PRODUCER);
}
}
if (country.containsSCType(SCType.INTERNATIONAL)) {
for (int i = 0; i < Constants.N_INTERNATIONALS; i++) {
country.spawnAgent(SCType.INTERNATIONAL);
}
}
if (country.containsSCType(SCType.WHOLESALER)) {
for (int i = 0; i < Constants.N_WHOLESALERS; i++) {
country.spawnAgent(SCType.WHOLESALER);
}
}
if (country.containsSCType(SCType.RETAIL)) {
for (int i = 0; i < Constants.N_RETAILERS; i++) {
country.spawnAgent(SCType.RETAIL);
}
}
if (country.containsSCType(SCType.CONSUMER)) {
for (int i = 0; i < Constants.N_CONSUMERS; i++) {
country.spawnAgent(SCType.CONSUMER);
}
}
}
// Set possible new suppliers and clients
for (BaseAgent agent : SU.getObjectsAll(BaseAgent.class)) {
agent.setPossibleNewSuppliersAndClients();
}
SU.getDataCollector().addAllCurrentStock();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void generatePopulation() {\n population = setupArray(POP_SIZE, NUM_RULES, GENE_SIZE, COND_LEN);\n\n for (Individual individual : population) {\n for (int i = 0; i < individual.getGene().length; i++) {\n individual.gene[i] = bits.get(new Random().nextInt(2));\n... | [
"0.6916058",
"0.63713485",
"0.6225375",
"0.6113935",
"0.593495",
"0.5933015",
"0.57528794",
"0.5714489",
"0.55324316",
"0.54733276",
"0.546178",
"0.5443194",
"0.54326487",
"0.54160815",
"0.5406466",
"0.5401491",
"0.5354295",
"0.53338367",
"0.53284043",
"0.5311224",
"0.5245614... | 0.6305644 | 2 |
Generates a population from the given file | public void generatePopulation(String filePathAndName) {
List<String> dataAll = SU.readFile(filePathAndName);
List<String> dataAgents = new ArrayList<String>();
List<String> dataStock = new ArrayList<String>();
List<String> dataRelations = new ArrayList<String>();
int typeOfData = -1;
for (String datum : dataAll) {
if (!datum.startsWith("%")) {
switch(typeOfData) {
case 0: dataAgents.add(datum); break;
case 1: dataStock.add(datum); break;
case 2: dataRelations.add(datum); break;
}
}
else {
typeOfData = Integer.parseInt(datum.substring(1,2));
}
}
generateAgents(dataAgents);
generateStock(dataStock);
generateRelations(dataRelations);
SU.getDataCollector().addAllCurrentStock();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void generatePopulation() {\n population = setupArray(POP_SIZE, NUM_RULES, GENE_SIZE, COND_LEN);\n\n for (Individual individual : population) {\n for (int i = 0; i < individual.getGene().length; i++) {\n individual.gene[i] = bits.get(new Random().nextInt(2));\n... | [
"0.6398022",
"0.6177843",
"0.61508733",
"0.6018245",
"0.590206",
"0.58212477",
"0.57501787",
"0.5666979",
"0.5623465",
"0.56033415",
"0.5522008",
"0.55145186",
"0.5482721",
"0.54542285",
"0.54488045",
"0.5431842",
"0.54279846",
"0.5415278",
"0.54050976",
"0.53862834",
"0.5384... | 0.7113595 | 0 |
/ access modifiers changed from: protected | public abstract String getIntentActionString(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n protected void prot() {\n }",
"private stendhal() {\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override... | [
"0.7375736",
"0.7042321",
"0.6922649",
"0.6909494",
"0.68470824",
"0.6830288",
"0.68062353",
"0.6583185",
"0.6539446",
"0.65011257",
"0.64917654",
"0.64917654",
"0.64733833",
"0.6438831",
"0.64330196",
"0.64330196",
"0.64295477",
"0.6426414",
"0.6420484",
"0.64083177",
"0.640... | 0.0 | -1 |
private EventBus bus = EventBus.getDefault(); | @Override
public ChatViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
View view = LayoutInflater.from(parent.getContext())
.inflate(R.layout.chat_row, parent, false);
ctx=view.getContext();
ChatViewHolder myViewHolder = new ChatViewHolder(view);
return myViewHolder;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"EventBus getEventBus();",
"void onBusEvent(Event event);",
"@Provides\n @Singleton\n EventBus providesEventBus() {\n return EventBus.getDefault();\n }",
"public EventBus getEventBus(boolean force);",
"public interface EventBus {\n\n public String name();\n\n /**\n * Posts an event... | [
"0.8322086",
"0.75359553",
"0.73929435",
"0.70882213",
"0.6975219",
"0.67914045",
"0.6585402",
"0.65054864",
"0.64294374",
"0.6413509",
"0.6356971",
"0.63218606",
"0.6293765",
"0.62912554",
"0.6279844",
"0.6263618",
"0.621093",
"0.6160692",
"0.6136468",
"0.61141795",
"0.61003... | 0.0 | -1 |
Created by Duje on 2.11.2017.. | public interface ActivityConstants {
public static final int SCAN_ACTIVITY = 1001;
public static final int PREVIOUS_ORDERS_ACTIVITY = 1002;
public static final String PREFS_NAME = "LoginData";
public static final String PREFS_LOGGED = "LoggedIn";
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void perish() {\n \n }",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"private static void cajas() {\n\t\t\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"private stendhal() {\n\t}",
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tp... | [
"0.5935951",
"0.5878457",
"0.5852785",
"0.5846931",
"0.58336616",
"0.582113",
"0.5782961",
"0.57523555",
"0.57439077",
"0.57439077",
"0.57435095",
"0.5719622",
"0.57098645",
"0.5662399",
"0.56402063",
"0.56402063",
"0.5630564",
"0.5628354",
"0.5625859",
"0.56104434",
"0.55938... | 0.0 | -1 |
10 true 20 true 40 true 60 false false true 70 false true 100 false false false true 30 false true 50 true 80 true 110 false false false true 90 false false | public static void main(String[] args) {
BinaryTree bt = new BinaryTree();
bt.display();
// bt.preo();
// bt.preoIterative();
//
// bt.ino();
// bt.inoIterative();
//
// bt.posto();
// bt.postoIterative();
//
// bt.levelo();
// bt.levelolw();
//
// System.out.println(bt.diameter());
// System.out.println(bt.diameter2());
bt.pws();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static boolean hasStraight(Card [] cards) {\n\t\tint smallNum = 14;\n\t\tint counter = 0;\n\t\tfor (int i = 0; i<cards.length; i++){\n\t\t\tif (cards[i].getValue() < smallNum){\n\t\t\t\tsmallNum = cards[i].getValue(); \n\t\t\t}\n\t\t}\n\t\tfor (int i = 0; i<cards.length; i++){\n\t\t\tif (cards[i].getValue()... | [
"0.5852489",
"0.5695005",
"0.56258726",
"0.54420877",
"0.5431487",
"0.5393606",
"0.5384159",
"0.5354885",
"0.53110135",
"0.53110135",
"0.5308958",
"0.5301659",
"0.52684885",
"0.5261009",
"0.5239241",
"0.5220493",
"0.52154964",
"0.5209398",
"0.52077544",
"0.5195843",
"0.517896... | 0.0 | -1 |
Start the PlaybackService class, it will take care of updating the widgets | @Override
public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) {
PlaybackService.startServiceToUpdateWidgets(context);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void startPlayback() {\n // start player service using intent\n Intent intent = new Intent(mActivity, PlayerService.class);\n intent.setAction(ACTION_PLAY);\n intent.putExtra(EXTRA_STATION, mThisStation);\n mActivity.startService(intent);\n LogHelper.v(LOG_TAG, \"S... | [
"0.76287746",
"0.7215537",
"0.6873936",
"0.6781636",
"0.6779552",
"0.6655823",
"0.6558051",
"0.6461362",
"0.6425699",
"0.6411808",
"0.6392319",
"0.6390188",
"0.6390015",
"0.63531446",
"0.633713",
"0.6309714",
"0.630405",
"0.6298328",
"0.6289168",
"0.6262226",
"0.6260162",
"... | 0.0 | -1 |
There may be multiple widgets active, so update all of them | public static void updateAllWidgets(Context context, AppWidgetManager appWidgetManager,
int[] appWidgetIds, int playbackState, String episodeTitle, Bitmap poster) {
for (int appWidgetId : appWidgetIds) {
updateAppWidget(context, appWidgetManager, appWidgetId, playbackState, episodeTitle, poster);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void updateAllWidgets(){\n AppWidgetManager widgetManager = AppWidgetManager.getInstance(this);\n int[] appWidgetIds = widgetManager.getAppWidgetIds(new ComponentName(this,EasyBakeWidget.class));\n for (int i: appWidgetIds){\n widgetManager.notifyAppWidgetViewDataChanged(i,R... | [
"0.7656385",
"0.7297112",
"0.7140604",
"0.7135215",
"0.6749194",
"0.67150867",
"0.6672848",
"0.6544008",
"0.65306485",
"0.65153754",
"0.6509865",
"0.6494512",
"0.6486728",
"0.6481882",
"0.64573413",
"0.64471185",
"0.64471185",
"0.64471185",
"0.64434254",
"0.6425265",
"0.64110... | 0.0 | -1 |
Enter relevant functionality for when the first widget is created | @Override
public void onEnabled(Context context) {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void onEnabled(Context context) {\n // Enter relevant functionality for when the first widget is created\n }",
"public abstract Widget onInitialize();",
"public abstract void initUiAndListener();",
"private void initUI() {\n }",
"private void initUI() {\n tvQuote =... | [
"0.715538",
"0.7002158",
"0.6855211",
"0.66847444",
"0.6628957",
"0.6619105",
"0.66157687",
"0.6520471",
"0.6480197",
"0.6431846",
"0.641436",
"0.63807935",
"0.63721234",
"0.6347073",
"0.63405263",
"0.63396084",
"0.6333276",
"0.63222086",
"0.63017315",
"0.6289287",
"0.6283601... | 0.0 | -1 |
Enter relevant functionality for when the last widget is disabled | @Override
public void onDisabled(Context context) {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void onDisabled(Context context) {\n // Enter relevant functionality for when the last widget is disabled\n }",
"@Override\n public void onEnabled(Context context) {\n // Enter relevant functionality for when the first widget is created\n }",
"@Override\n ... | [
"0.8324667",
"0.66936314",
"0.6632969",
"0.6590516",
"0.65348405",
"0.6503779",
"0.6500005",
"0.6481272",
"0.64199775",
"0.64199775",
"0.63905513",
"0.63777363",
"0.6373405",
"0.6338429",
"0.630844",
"0.62827057",
"0.62471",
"0.62242955",
"0.62146366",
"0.62080747",
"0.620110... | 0.57928157 | 91 |
Creates new form Project_Create_1 | public Project_Create_Process() {
initComponents();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@RequestMapping(value={\"/projects/add\"}, method= RequestMethod.GET)\r\n\tpublic String createProjectForm(Model model) {\r\n\t\tUser loggedUser= sessionData.getLoggedUser();\r\n\t\tmodel.addAttribute(\"loggedUser\", loggedUser);\r\n\t\tmodel.addAttribute(\"projectForm\", new Project());\r\n\t\treturn \"addProject... | [
"0.7674357",
"0.7658407",
"0.76272255",
"0.7466209",
"0.74608916",
"0.72589517",
"0.72484267",
"0.7244838",
"0.71651125",
"0.7118057",
"0.71134365",
"0.70907766",
"0.7014623",
"0.69807017",
"0.6910072",
"0.68978965",
"0.6823756",
"0.6823756",
"0.6823756",
"0.68148625",
"0.681... | 0.6688432 | 22 |
Test of getDefault method, of class LayersViewController. | @Test
public void testGetDefault() {
System.out.println("getDefault");
final LayersViewController instance1 = LayersViewController.getDefault();
final LayersViewController instance2 = LayersViewController.getDefault();
assertEquals(instance1, instance2);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n\tpublic void defaultNetworkIsTestNetworkByDefault() {\n\t\t// Assert:\n\t\tAssert.assertThat(\n\t\t\t\tNetworkInfos.getDefault(),\n\t\t\t\tIsSame.sameInstance(NetworkInfos.getTestNetworkInfo()));\n\t}",
"boolean isDefault();",
"boolean isDefault();",
"public boolean isDefault();",
"@Override\n\tpub... | [
"0.6521928",
"0.6367873",
"0.6367873",
"0.6306391",
"0.6063626",
"0.60366744",
"0.5813419",
"0.58046323",
"0.58046323",
"0.57871664",
"0.5697589",
"0.5678384",
"0.56731826",
"0.56636053",
"0.56552655",
"0.565461",
"0.5621173",
"0.5621173",
"0.56173426",
"0.5610809",
"0.556739... | 0.780339 | 0 |
Verify that no elements are added to the graph when an empty graph is used | @Test
public void testRemoveBitmaskFromElementsEmptyGraph() {
System.out.println("removeBitmaskFromElements_EmptyGraph");
setupEmptyGraph();
final GraphManager gm = Mockito.mock(GraphManager.class);
when(gm.getActiveGraph()).thenReturn(graph);
// Create mock of DataAccessPane to return the query phase pane mock
try (MockedStatic<GraphManager> mockedStatic = Mockito.mockStatic(GraphManager.class)) {
mockedStatic.when(() -> GraphManager.getDefault()).thenReturn(gm);
ReadableGraph rg = graph.getReadableGraph();
assertEquals(rg.getVertexCount(), 0);
rg.close();
// remove bitmask from elements - nothing should be on layer 5
int currentIndex = 5;
LayersViewController instance = LayersViewController.getDefault().init(null);
instance.removeBitmaskFromElements(currentIndex);
ReadableGraph rg2 = graph.getReadableGraph();
assertEquals(rg2.getVertexCount(), 0);
rg2.close();
currentIndex = 1;
instance.removeBitmaskFromElements(currentIndex);
ReadableGraph rg3 = graph.getReadableGraph();
assertEquals(rg3.getVertexCount(), 0);
rg3.close();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean isEmpty()\n {\n return graph.isEmpty();\n }",
"@Test\r\n void test_insert_null_vertex() {\r\n graph.addVertex(null);\r\n vertices = graph.getAllVertices();\r\n \r\n if(vertices.contains(null))\r\n fail();\r\n if(vertices.size() != 0 ||gra... | [
"0.7649194",
"0.72884643",
"0.7175884",
"0.7173411",
"0.71201354",
"0.71166354",
"0.69519246",
"0.694341",
"0.69420135",
"0.68317366",
"0.680984",
"0.6785424",
"0.6783134",
"0.6706756",
"0.6601379",
"0.6571602",
"0.6564214",
"0.6519715",
"0.6439588",
"0.6429422",
"0.6424993",... | 0.0 | -1 |
Test of removeBitmaskFromElements method, of class LayersViewController. | @Test
public void testRemoveBitmaskFromElements() {
System.out.println("removeBitmaskFromElements");
// Setup a graph with elements
setupGraph();
final GraphManager gm = Mockito.mock(GraphManager.class);
when(gm.getActiveGraph()).thenReturn(graph);
// Create mock of DataAccessPane to return the query phase pane mock
try (MockedStatic<GraphManager> mockedStatic = Mockito.mockStatic(GraphManager.class)) {
mockedStatic.when(() -> GraphManager.getDefault()).thenReturn(gm);
WritableGraph wg;
try {
wg = graph.getWritableGraph("", true);
// Check Vertex set correctly
assertEquals(wg.getIntValue(layerMaskV, vxId1), 1);
assertEquals(wg.getFloatValue(layerVisibilityV, vxId1), 1.0f);
assertFalse(wg.getBooleanValue(selectedV, vxId1));
assertEquals(wg.getIntValue(layerMaskV, vxId2), 1);
assertEquals(wg.getFloatValue(layerVisibilityV, vxId2), 1.0f);
assertFalse(wg.getBooleanValue(selectedV, vxId2));
// Check Transaction set correctly
assertEquals(wg.getIntValue(layerMaskT, vxId1), 1);
assertEquals(wg.getFloatValue(layerVisibilityT, vxId1), 1.0f);
assertFalse(wg.getBooleanValue(selectedT, vxId1));
assertEquals(wg.getIntValue(layerMaskT, vxId2), 1);
assertEquals(wg.getFloatValue(layerVisibilityT, vxId2), 1.0f);
assertFalse(wg.getBooleanValue(selectedT, vxId2));
wg.commit();
} catch (final InterruptedException ex) {
Exceptions.printStackTrace(ex);
Thread.currentThread().interrupt();
}
// remove bitmask from elements - nothing should be on layer 5
int currentIndex = 5;
LayersViewController instance = LayersViewController.getDefault().init(null);
instance.removeBitmaskFromElements(currentIndex);
try {
wg = graph.getWritableGraph("", true);
// Check Vertex unchanged
assertEquals(wg.getIntValue(layerMaskV, vxId1), 1);
assertEquals(wg.getFloatValue(layerVisibilityV, vxId1), 1.0f);
assertFalse(wg.getBooleanValue(selectedV, vxId1));
assertEquals(wg.getIntValue(layerMaskV, vxId2), 1);
assertEquals(wg.getFloatValue(layerVisibilityV, vxId2), 1.0f);
assertFalse(wg.getBooleanValue(selectedV, vxId2));
// Check Transaction set correctly
assertEquals(wg.getIntValue(layerMaskT, vxId1), 1);
assertEquals(wg.getFloatValue(layerVisibilityT, vxId1), 1.0f);
assertFalse(wg.getBooleanValue(selectedT, vxId1));
assertEquals(wg.getIntValue(layerMaskT, vxId2), 1);
assertEquals(wg.getFloatValue(layerVisibilityT, vxId2), 1.0f);
assertFalse(wg.getBooleanValue(selectedT, vxId2));
// Set vx2 and tx2 into layer 2. Both are visibility 0 because current layer is 1.
wg.setIntValue(layerMaskV, vxId2, 0b11);
wg.setFloatValue(layerVisibilityV, vxId2, 0.0f);
wg.setIntValue(layerMaskT, txId2, 0b11);
wg.setFloatValue(layerVisibilityT, txId2, 0.0f);
wg.commit();
} catch (final InterruptedException ex) {
Exceptions.printStackTrace(ex);
Thread.currentThread().interrupt();
}
// remove bitmask from elements - should only remove the elements vx2 and tx2
currentIndex = 1;
instance.removeBitmaskFromElements(currentIndex);
try {
wg = graph.getWritableGraph("", true);
// Check Vertex 1 unchanged
assertEquals(wg.getIntValue(layerMaskV, vxId1), 1);
assertEquals(wg.getFloatValue(layerVisibilityV, vxId1), 1.0f);
assertFalse(wg.getBooleanValue(selectedV, vxId1));
// Check Vertex 2 changed - visibility 0.0 because no visibility update
assertEquals(wg.getIntValue(layerMaskV, vxId2), 1);
assertEquals(wg.getFloatValue(layerVisibilityV, vxId2), 0.0f);
assertFalse(wg.getBooleanValue(selectedV, vxId2));
// Check Transaction 1 unchanged
assertEquals(wg.getIntValue(layerMaskT, vxId1), 1);
assertEquals(wg.getFloatValue(layerVisibilityT, vxId1), 1.0f);
assertFalse(wg.getBooleanValue(selectedT, vxId1));
assertEquals(wg.getIntValue(layerMaskT, vxId2), 1);
assertEquals(wg.getFloatValue(layerVisibilityT, vxId2), 0.0f);
assertFalse(wg.getBooleanValue(selectedT, vxId2));
wg.commit();
} catch (final InterruptedException ex) {
Exceptions.printStackTrace(ex);
Thread.currentThread().interrupt();
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n public void testRemoveBitmaskFromElementsEmptyGraph() {\n System.out.println(\"removeBitmaskFromElements_EmptyGraph\");\n setupEmptyGraph();\n\n final GraphManager gm = Mockito.mock(GraphManager.class);\n when(gm.getActiveGraph()).thenReturn(graph);\n\n // Create mock ... | [
"0.73096293",
"0.55831945",
"0.55326957",
"0.5252909",
"0.5178419",
"0.5164393",
"0.5144593",
"0.51260036",
"0.50794804",
"0.50671875",
"0.50338423",
"0.49995467",
"0.49973473",
"0.4976424",
"0.49717358",
"0.4970811",
"0.49672726",
"0.49627584",
"0.4962534",
"0.49602014",
"0.... | 0.72964936 | 1 |
Set up a graph with two vertices and two transactions on layer 1. | private void setupGraph() {
graph = new DualGraph(SchemaFactoryUtilities.getSchemaFactory(VisualSchemaFactory.VISUAL_SCHEMA_ID).createSchema());
try {
WritableGraph wg = graph.getWritableGraph("", true);
// Create LayerMask attributes
layerMaskV = LayersConcept.VertexAttribute.LAYER_MASK.ensure(wg);
layerMaskT = LayersConcept.TransactionAttribute.LAYER_MASK.ensure(wg);
// Create LayerVisilibity Attributes
layerVisibilityV = LayersConcept.VertexAttribute.LAYER_VISIBILITY.ensure(wg);
layerVisibilityT = LayersConcept.TransactionAttribute.LAYER_VISIBILITY.ensure(wg);
// Create Selected Attributes
selectedV = VisualConcept.VertexAttribute.SELECTED.ensure(wg);
selectedT = VisualConcept.TransactionAttribute.SELECTED.ensure(wg);
// Adding 2 Vertices - not selected, layer 1, visible
vxId1 = wg.addVertex();
wg.setIntValue(layerMaskV, vxId1, 1);
wg.setFloatValue(layerVisibilityV, vxId1, 1.0f);
wg.setBooleanValue(selectedV, vxId1, false);
vxId2 = wg.addVertex();
wg.setIntValue(layerMaskV, vxId2, 1);
wg.setFloatValue(layerVisibilityV, vxId2, 1.0f);
wg.setBooleanValue(selectedV, vxId2, false);
// Adding 2 Transactions - not selected, layer 1, visible
txId1 = wg.addTransaction(vxId1, vxId2, true);
wg.setIntValue(layerMaskT, txId1, 1);
wg.setFloatValue(layerVisibilityT, txId1, 1.0f);
wg.setBooleanValue(selectedT, txId1, false);
txId2 = wg.addTransaction(vxId1, vxId2, false);
wg.setIntValue(layerMaskT, txId2, 1);
wg.setFloatValue(layerVisibilityT, vxId2, 1.0f);
wg.setBooleanValue(selectedT, vxId2, false);
wg.commit();
} catch (final InterruptedException ex) {
Exceptions.printStackTrace(ex);
Thread.currentThread().interrupt();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void graph3() {\n\t\tconnect(\"0\", \"0\");\n\t\tconnect(\"2\", \"2\");\n\t\tconnect(\"2\", \"3\");\n\t\tconnect(\"3\", \"0\");\n\t}",
"void graph2() {\n\t\tconnect(\"1\", \"7\");\n\t\tconnect(\"1\", \"8\");\n\t\tconnect(\"1\", \"9\");\n\t\tconnect(\"9\", \"1\");\n\t\tconnect(\"9\", \"0\");\n\t\tconnect(\"9\", \... | [
"0.62461424",
"0.6147367",
"0.6140887",
"0.60311127",
"0.5895444",
"0.5855554",
"0.5838265",
"0.5827245",
"0.5768829",
"0.57537454",
"0.5733777",
"0.56682175",
"0.5643597",
"0.5639455",
"0.5634991",
"0.56309956",
"0.5620427",
"0.5605662",
"0.56055427",
"0.55986875",
"0.559675... | 0.73075044 | 0 |
Test of deleteLayer, in LayersViewController | @Test
public void testDeleteLayer() {
LayersViewController instance = LayersViewController.getDefault().init(null);
instance.createLayer();
instance.deleteLayer(2);
assertEquals(instance.getVxQueryCollection().getHighestQueryIndex(), 3);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void removeLayer(int whichLayer);",
"@Override\n public void onRemoveLayer(GPLayerBean layerBean) {\n this.removeLayer(layerBean);\n }",
"@Test\r\n\tpublic void checkDeleteTest() {\n\t\tassertFalse(boardService.getGameRules().checkDelete(board.field[13][13])); \r\n\t}",
"@Test\n public voi... | [
"0.67165035",
"0.6115411",
"0.6112374",
"0.6093454",
"0.6011206",
"0.5976596",
"0.5943831",
"0.5937471",
"0.5931047",
"0.59129137",
"0.59110093",
"0.5875123",
"0.5830918",
"0.58204323",
"0.5802167",
"0.5794877",
"0.57886064",
"0.57833344",
"0.57648563",
"0.5759462",
"0.574403... | 0.85791725 | 0 |
Test of deselectAll, in LayersViewController | @Test
public void testDeselectAll() {
LayersViewController instance = LayersViewController.getDefault().init(null);
instance.createLayer();
instance.createLayer();
instance.getVxQueryCollection().setVisibilityOnAll(true);
instance.getTxQueryCollection().setVisibilityOnAll(true);
instance.deselectAll();
assertEquals(instance.getVxQueryCollection().isVisibilityOnAll(), false);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void deselectAll()\n {\n }",
"public void deselectAll()\n {\n map.deselectAll();\n mapComponent.repaint();\n mapper.resetMenus();\n }",
"public void deselectAll() {\n\t\tselected.clear();\n\t}",
"public native void deselectAll() /*-{\r\n var self = this.@co... | [
"0.78453934",
"0.7003293",
"0.66450346",
"0.6372743",
"0.60918206",
"0.5842726",
"0.580842",
"0.57712865",
"0.56635356",
"0.5634775",
"0.563332",
"0.5598322",
"0.5529569",
"0.5389522",
"0.53552073",
"0.53420657",
"0.5341682",
"0.5340773",
"0.5321239",
"0.53125316",
"0.5310336... | 0.8704577 | 0 |
Test of changeLayerVisibility, in LayersViewController | @Test
public void testChangeLayerVisibility() {
LayersViewController instance = LayersViewController.getDefault().init(null);
instance.createLayer();
int index1 = 2;
Query query1 = new Query(GraphElementType.VERTEX, "Type == 'Event'");
instance.getVxQueryCollection().getQuery(index1).setQuery(query1);
instance.getTxQueryCollection().getQuery(index1).setQuery(null);
instance.changeLayerVisibility(index1, true);
assertTrue(instance.getVxQueryCollection().getQuery(index1).isVisible());
instance.createLayer();
int index2 = 3;
Query query2 = new Query(GraphElementType.TRANSACTION, "Type == 'Network'");
instance.getTxQueryCollection().getQuery(index2).setQuery(query2);
instance.getVxQueryCollection().getQuery(index2).setQuery(null);
instance.changeLayerVisibility(index2, true);
assertTrue(instance.getTxQueryCollection().getQuery(index2).isVisible());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void setVisibility(Layer layer, boolean visibility);",
"public List<Boolean> getLayerVisibility ()\n {\n return Collections.unmodifiableList(_vis);\n }",
"public boolean isActiveLayerVisible() {\n\t\treturn false;\n\t}",
"protected void updateVisibility (int layer, boolean visible)\n {\n ... | [
"0.734775",
"0.66186976",
"0.6369006",
"0.63549954",
"0.61814195",
"0.61270773",
"0.606063",
"0.6058811",
"0.6047735",
"0.5968384",
"0.5879055",
"0.5833104",
"0.57976645",
"0.5792877",
"0.5792877",
"0.576929",
"0.57263315",
"0.56906253",
"0.56788164",
"0.56683886",
"0.5636691... | 0.8218135 | 0 |
Test of updateDescription, in LayersViewController | @Test
public void testUpdateDescription() {
LayersViewController instance = LayersViewController.getDefault().init(null);
String description1 = "Vertex Description";
int index1 = 2;
Query query1 = new Query(GraphElementType.VERTEX, "Type == 'Event'");
instance.getVxQueryCollection().getQuery(index1).setQuery(query1);
instance.getTxQueryCollection().getQuery(index1).setQuery(null);
instance.updateDescription(description1, index1);
assertEquals(instance.getVxQueryCollection().getQuery(index1).getDescription(), description1);
String description2 = "Transaction Description";
int index2 = 3;
Query query2 = new Query(GraphElementType.TRANSACTION, "Type == 'Network'");
instance.getTxQueryCollection().getQuery(index2).setQuery(query2);
instance.getVxQueryCollection().getQuery(index2).setQuery(null);
instance.updateDescription(description2, index2);
assertEquals(instance.getTxQueryCollection().getQuery(index2).getDescription(), description2);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void update(String desc) {\n }",
"@Test\n public void testDescriptionChange() throws Exception {\n EventData deltaEvent = prepareDeltaEvent(createdEvent);\n deltaEvent.setDescription(\"New description\");\n\n updateEventAsOrganizer(deltaEvent);\n\n /*\n ... | [
"0.6785162",
"0.6438622",
"0.63912445",
"0.6315598",
"0.6263054",
"0.62614036",
"0.62302047",
"0.6157362",
"0.6142314",
"0.6087986",
"0.60824794",
"0.6070755",
"0.6069412",
"0.60658324",
"0.6058253",
"0.6041869",
"0.6039373",
"0.6036283",
"0.6036283",
"0.6025178",
"0.59896356... | 0.8111528 | 0 |
Test of updateQuery, in LayersViewController | @Test
public void testUpdateQuery() {
LayersViewController instance = LayersViewController.getDefault().init(null);
String queryString1 = "Type == 'Word'";
int index1 = 2;
Query query1 = new Query(GraphElementType.VERTEX, "Type == 'Event'");
instance.getVxQueryCollection().getQuery(index1).setQuery(query1);
instance.getTxQueryCollection().getQuery(index1).setQuery(null);
assertEquals(instance.getVxQueryCollection().getQuery(index1).getQueryString(), "Type == 'Event'");
instance.updateQuery(queryString1, index1, "Vertex Query: ");
assertEquals(instance.getVxQueryCollection().getQuery(index1).getQueryString(), queryString1);
String queryString2 = "Type == 'Unknown'";
int index2 = 3;
Query query2 = new Query(GraphElementType.TRANSACTION, "Type == 'Network'");
instance.getTxQueryCollection().getQuery(index2).setQuery(query2);
instance.getVxQueryCollection().getQuery(index2).setQuery(null);
assertEquals(instance.getTxQueryCollection().getQuery(index2).getQueryString(), "Type == 'Network'");
instance.updateQuery(queryString2, index2, "Transaction Query: ");
assertEquals(instance.getTxQueryCollection().getQuery(index2).getQueryString(), queryString2);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic void queryUpdate() {\n\t\tneedToUpdate = true;\n\t}",
"public void setQuery(com.microsoft.schemas.sharepoint.soap.UpdateViewQuery query) {\r\n this.query = query;\r\n }",
"public abstract int execUpdate(String query) ;",
"abstract Integer processUpdateQuery(String collectionName... | [
"0.6516989",
"0.64454114",
"0.63629663",
"0.6198456",
"0.6186316",
"0.61697793",
"0.6089712",
"0.6013007",
"0.5965697",
"0.5954557",
"0.5939669",
"0.5905781",
"0.5902722",
"0.58928794",
"0.5886584",
"0.58778423",
"0.5868213",
"0.58635986",
"0.58627295",
"0.585683",
"0.5849070... | 0.8035189 | 0 |
Created by dzhafar on 16.04.18. | public interface Repository {
Observable<Bitmap> getImage();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private stendhal() {\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"private static void cajas() {\n\t\t\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\r\n\tpubl... | [
"0.5784477",
"0.5766902",
"0.5709277",
"0.57025826",
"0.5604706",
"0.55503005",
"0.5534936",
"0.5534936",
"0.5528281",
"0.5519911",
"0.55152786",
"0.547301",
"0.54586506",
"0.5454245",
"0.5454245",
"0.5452834",
"0.5444731",
"0.5441377",
"0.54399276",
"0.54361916",
"0.5434686"... | 0.0 | -1 |
Finds the closest crossroad ahead of the pacman | IntPair findPacmansCrossRoad(IntPair pacPosition, Direction.directionType pacDirection)
{
IntPair delta = Direction.directionToIntPair(pacDirection);
if (isCorner(pacPosition.item1, pacPosition.item2)) {
Direction.directionType newDirection = turnDirection(pacPosition.item1, pacPosition.item2, delta.item1, delta.item2);
IntPair nd = Direction.directionToIntPair(newDirection);
return findPacmansCrossRoad(
new IntPair(pacPosition.item1 + nd.item1, pacPosition.item2 + nd.item2), newDirection);
}
if (delta.item1 == 0) {
for (int y = pacPosition.item2; y >= 0 && y < LoadMap.MAPHEIGHTINTILES; y += delta.item2) {
if (isCrossroad(pacPosition.item1, y)) {
return new IntPair(pacPosition.item1, y);
} else if (isCorner(pacPosition.item1, y)) {
Direction.directionType newDirection = turnDirection(pacPosition.item1, y, delta.item1, delta.item2);
IntPair nd = Direction.directionToIntPair(newDirection);
return findPacmansCrossRoad(new IntPair(pacPosition.item1 + nd.item1, y + nd.item2), newDirection);
}
}
} else {
for (int x = pacPosition.item1; x >= 0 && x < LoadMap.MAPWIDTHINTILES; x += delta.item1) {
if (isCrossroad(x, pacPosition.item2)) {
return new IntPair(x, pacPosition.item2);
} else if (isCorner(x, pacPosition.item2)) {
Direction.directionType newDirection = turnDirection(x, pacPosition.item2, delta.item1, delta.item2);
IntPair nd = Direction.directionToIntPair(newDirection);
return findPacmansCrossRoad(new IntPair(x + nd.item1, pacPosition.item2 + nd.item2), newDirection);
}
}
}
return pacPosition;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Execution getClosestDistance();",
"public static Direction shouldBackOff () {\n RobotInfo[] nearby = rc.senseNearbyRobots();\n boolean nearbyEc = false;\n for (RobotInfo ri: nearby) {\n if (ri.team != mTeam && ri.type == RobotType.ENLIGHTENMENT_CENTER) {\n nearbyEc ... | [
"0.65257865",
"0.60537785",
"0.6037976",
"0.59760904",
"0.5874098",
"0.5828383",
"0.5819208",
"0.5783938",
"0.57418597",
"0.5730601",
"0.5728554",
"0.57119757",
"0.56386155",
"0.5612197",
"0.55968875",
"0.55955684",
"0.5576043",
"0.55662674",
"0.55502725",
"0.554506",
"0.5536... | 0.72062784 | 0 |
Locates target tile for CANBEEATEN mode | IntPair findSafety(IntPair position, IntPair pacman)
{
// TODO: Implement function
return null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void getTile_B8();",
"TrgPlace getTarget();",
"private static Image getTarget()\n\t{\n\t\ttry {\n\t\t\treturn ImageIO.read(new File(tileDirectory + target));\n\t\t} catch (IOException ioe) {\n\t\t}\n\t\treturn null;\n\t}",
"public Tile getTileAt(Position p);",
"public void spawnEnemy(){\n\t\tint ini... | [
"0.6266805",
"0.6107562",
"0.60909",
"0.60204095",
"0.59964275",
"0.5940218",
"0.5927368",
"0.5926041",
"0.5922961",
"0.5907922",
"0.5896205",
"0.5846246",
"0.58330685",
"0.58167034",
"0.5814039",
"0.5789544",
"0.5720865",
"0.57173896",
"0.5686154",
"0.5653526",
"0.56527925",... | 0.0 | -1 |
Changes direction at corner | private Direction.directionType turnDirection (int x, int y, int dx, int dy)
{
if (connectedTiles[y + dx][x + dy] != null)
return Direction.intPairToDirection(new IntPair(dy, dx));
return Direction.intPairToDirection(new IntPair(-dy, -dx));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void changeDirection();",
"public void setDirection() {\n\t\tdouble randomDirection = randGen.nextDouble();\n\t\tif (randomDirection < .25) {\n\t\t\tthis.xDirection = 1;\n\t\t\tthis.yDirection = -1;\n\t\t} else if (randomDirection < .5) {\n\t\t\tthis.xDirection = -1;\n\t\t\tthis.yDirection = -1;\n\t\t} else if (... | [
"0.68253416",
"0.65634865",
"0.65502906",
"0.6525225",
"0.64869404",
"0.6482973",
"0.64695334",
"0.6433521",
"0.6373633",
"0.6319892",
"0.63103575",
"0.6284047",
"0.6278869",
"0.62461555",
"0.6243234",
"0.61968714",
"0.6189548",
"0.61883575",
"0.61663526",
"0.6164959",
"0.612... | 0.0 | -1 |
Denotes whether the given tile is a corner | private boolean isCorner(int x, int y)
{
return x-1 >= 0 && x+1 < LoadMap.MAPWIDTHINTILES && y-1 >= 0 && y+1 < LoadMap.MAPHEIGHTINTILES && (
(connectedTiles[y][x+1] != null && (connectedTiles[y+1][x] != null || connectedTiles[y-1][x] != null))
|| (connectedTiles[y][x-1] != null && (connectedTiles[y+1][x] != null || connectedTiles[y-1][x] != null)));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static boolean isCornerTile(Tile tile, Map<Border, List<Tile>> borderMap) {\n int n = 0;\n for (Border border : tile.getBorders()) {\n if (borderMap.get(border).size() == 1) {\n n++;\n }\n }\n return n == 2;\n }",
"private boolean corner(int e) {\r\n if (endx[e] + 200... | [
"0.7878966",
"0.7122706",
"0.6829241",
"0.6642566",
"0.6569847",
"0.6507383",
"0.6503912",
"0.6457556",
"0.64197075",
"0.6419248",
"0.64043176",
"0.6288286",
"0.62610656",
"0.6211847",
"0.6192435",
"0.61865735",
"0.6153546",
"0.6133566",
"0.60522085",
"0.6048163",
"0.60480744... | 0.711216 | 2 |
Denotes whether tile x,y is a crossroad | private boolean isCrossroad(int x, int y)
{
byte count = 0;
count += x + 1 < LoadMap.MAPWIDTHINTILES ? (connectedTiles[y][x + 1] != null ? 1 : 0) : 0;
count += x - 1 >= 0 ? (connectedTiles[y][x - 1] != null ? 1 : 0) : 0;
count += y + 1 < LoadMap.MAPHEIGHTINTILES ? (connectedTiles[y + 1][x] != null ? 1 : 0) : 0;
count += y - 1 >= 0 ? (connectedTiles[y - 1][x] != null ? 1 : 0) : 0;
return count > 2;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean isCrossable(int x, int y) {\n\t\treturn g[x][y].isCrossable();\n\t}",
"private boolean isCorner(int x, int y)\n {\n return x-1 >= 0 && x+1 < LoadMap.MAPWIDTHINTILES && y-1 >= 0 && y+1 < LoadMap.MAPHEIGHTINTILES && (\n (connectedTiles[y][x+1] != null && (connectedTiles[y+1]... | [
"0.7019831",
"0.67898905",
"0.65733963",
"0.63329667",
"0.63104177",
"0.6256373",
"0.62093407",
"0.61967796",
"0.6190331",
"0.6129929",
"0.6105543",
"0.61005837",
"0.6100162",
"0.60921407",
"0.6088396",
"0.6066545",
"0.60338414",
"0.6020498",
"0.5986195",
"0.5979733",
"0.5974... | 0.81414783 | 0 |
/ renamed from: com.zhihu.android.api.service2.aq / compiled from: MobileSearchService | public interface MobileSearchService {
@GET(mo135023a = "/search/tabs")
/* renamed from: a */
Observable<Response<SearchTabList>> mo63035a(@AbstractC33320t(mo135039a = "enable_recent") int i);
@AbstractC33318k(mo135029a = {"x-api-version:3.0.65"})
@GET(mo135023a = "/search_v3")
/* renamed from: a */
Observable<Response<SearchResultNewAPIWithWarning>> mo63036a(@AbstractC33320t(mo135039a = "correction") int i, @AbstractC33320t(mo135039a = "t") String str, @AbstractC33320t(mo135039a = "q") String str2);
@AbstractC33318k(mo135029a = {"x-api-version:3.0.65"})
@GET(mo135023a = "/search_v3")
/* renamed from: a */
Observable<Response<SearchResultNewAPIWithWarning>> mo63037a(@AbstractC33320t(mo135039a = "correction") int i, @AbstractC33320t(mo135039a = "t") String str, @AbstractC33320t(mo135039a = "q") String str2, @AbstractC33320t(mo135039a = "restricted_scene") String str3, @AbstractC33320t(mo135039a = "restricted_field") String str4, @AbstractC33320t(mo135039a = "restricted_value") String str5);
@AbstractC33318k(mo135029a = {"x-api-version:3.0.65"})
@GET
/* renamed from: a */
Observable<Response<SearchResultNewAPIWithWarning>> mo63038a(@AbstractC33321x String str);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public interface Service {\n\n\n @GET(\"/3/search/movie\")\n Call<Lista> getSearch(@Query(\"api_key\") String apiKey, @Query(\"query\") String queryString);\n\n}",
"public interface RecipeService {\n\n @GET(\"/search\")\n Observable<SearchResult> search(@Query(\"q\") String q,\n ... | [
"0.68034345",
"0.6667435",
"0.66341084",
"0.6540956",
"0.6412806",
"0.62658215",
"0.6256614",
"0.62531656",
"0.6215449",
"0.61706764",
"0.6138387",
"0.60941",
"0.60928816",
"0.60906243",
"0.60893816",
"0.6088761",
"0.6064552",
"0.60526437",
"0.60416925",
"0.6038304",
"0.60275... | 0.6774656 | 1 |
Time Complexity O(M+N) where M and N are row length and column length Space Complexity O(1) | public int leftMostColumnWithOne(BinaryMatrix binaryMatrix) {
int rows = binaryMatrix.dimensions().get(0);
int cols = binaryMatrix.dimensions().get(1);
// Set pointers to the top-right corner.
int currentRow = 0;
int currentCol = cols - 1;
// Repeat the search until it goes off the grid.
while (currentRow < rows && currentCol >= 0) {
if (binaryMatrix.get(currentRow, currentCol) == 0) {
currentRow++;
} else {
currentCol--;
}
}
// If we never left the last column, this is because it was all 0's.
return (currentCol == cols - 1) ? -1 : currentCol + 1;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"int columnPairsSize();",
"public int[][] generateMatrix(int n) {\n\t \n\t int matrix[][] = new int[n][n];\n\t int count = n * n +1;\n int topRow = 0;\n int bottomRow = n-1;\n int leftmostColumn = 0;\n int rightmostColumn = n -1;\n int added = 0;\n\t \n\t \n\t while(leftmostColumn <... | [
"0.6016914",
"0.5882296",
"0.5637422",
"0.5614282",
"0.55671066",
"0.5561772",
"0.55294365",
"0.5454459",
"0.5453142",
"0.53159535",
"0.5314279",
"0.5314279",
"0.5307759",
"0.530579",
"0.5282826",
"0.5275429",
"0.5275308",
"0.5254064",
"0.5241828",
"0.5241828",
"0.5228364",
... | 0.0 | -1 |
TODO temp for setting up Game | public void handleCollision(Collision c); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void loadGame() {\n\n }",
"public void preGame() {\n\n\t}",
"public void checkGame() {\n\n\t}",
"@Override\n public void beginGame() {\n }",
"@Override\n public void newGame() {\n //TODO Implement this method\n }",
"public void createGame();",
"private Game()... | [
"0.7013253",
"0.6990264",
"0.67906994",
"0.67369795",
"0.6662803",
"0.6640217",
"0.64941686",
"0.6475184",
"0.6471658",
"0.6459604",
"0.64520985",
"0.64507294",
"0.64439577",
"0.64424723",
"0.64424723",
"0.64424723",
"0.6428613",
"0.6418317",
"0.64143705",
"0.63932425",
"0.63... | 0.0 | -1 |
Constructor for Parcel. Its private so that only the CREATOR field can access. | private Movie(Parcel in) {
id = in.readString();
title = in.readString();
overview = in.readString();
posterUrl = in.readString();
userRating = in.readString();
releaseDate = in.readString();
runtime = in.readInt();
isFavorite = in.readByte() != 0;
castList = in.createTypedArrayList(Cast.CREATOR);
reviews = in.createTypedArrayList(Review.CREATOR);
trailers = in.createTypedArrayList(Trailer.CREATOR);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private Person(final Parcel in) {\n super();\n readFromParcel(in);\n }",
"Parcelle createParcelle();",
"private Driver(Parcel in) {\n super(in);\n }",
"public C0902id createFromParcel(Parcel parcel) {\n String str = null;\n int n = C0173a.m313n(parcel);\n HashS... | [
"0.7166764",
"0.67395186",
"0.65962833",
"0.63625336",
"0.63286424",
"0.6326321",
"0.62879246",
"0.6268316",
"0.6174771",
"0.6139264",
"0.6135016",
"0.61182135",
"0.6106655",
"0.6096365",
"0.6093339",
"0.60904956",
"0.60801643",
"0.6078839",
"0.6058142",
"0.5995397",
"0.59855... | 0.0 | -1 |
Gets the ID of the movie. | public String getId() {
return id;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public long getMovieId() {\n Long res = getLongOrNull(VideoColumns.MOVIE_ID);\n if (res == null)\n throw new NullPointerException(\"The value of 'movie_id' in the database was null, which is not allowed according to the model definition\");\n return res;\n }",
"public int getMo... | [
"0.79442185",
"0.7900971",
"0.78221905",
"0.7784207",
"0.7689706",
"0.7611737",
"0.7595263",
"0.7414453",
"0.72705406",
"0.7029269",
"0.6935318",
"0.6822972",
"0.6806294",
"0.67163646",
"0.63527757",
"0.61856544",
"0.6185484",
"0.6184781",
"0.61718315",
"0.6156419",
"0.615641... | 0.0 | -1 |
Sets the ID of the movie. | public void setId(String id) {
this.id = id;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void setMovieId(int movieID) {\n this.movieID = movieID;\n }",
"public void setId(ID id){\r\n\t\tthis.id = id;\r\n\t}",
"public void setId(Object id) {\n this.id = id;\n }",
"public void setId(Object id) {\n this.id = id;\n }",
"public void setId(ID id)\n {\n this.id... | [
"0.76226526",
"0.71122587",
"0.7072455",
"0.7072455",
"0.7021731",
"0.7019421",
"0.696197",
"0.69569993",
"0.6954523",
"0.69521433",
"0.6945173",
"0.69434583",
"0.69434583",
"0.6936827",
"0.6932667",
"0.691525",
"0.6914033",
"0.6914033",
"0.6914033",
"0.6914033",
"0.6914033",... | 0.0 | -1 |
Gets the title of the movie. | public String getTitle() {
return title;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getMovieTitle() {\n return movieTitle;\n }",
"java.lang.String getTitle();",
"java.lang.String getTitle();",
"java.lang.String getTitle();",
"java.lang.String getTitle();",
"java.lang.String getTitle();",
"public java.lang.String getTitle();",
"public java.lang.String getTitle... | [
"0.80843055",
"0.7681298",
"0.7681298",
"0.7681298",
"0.7681298",
"0.7681298",
"0.7595023",
"0.75930345",
"0.75861126",
"0.75735617",
"0.75735617",
"0.75735617",
"0.75253826",
"0.75253826",
"0.7516487",
"0.7484205",
"0.7468598",
"0.74615765",
"0.7456739",
"0.74496245",
"0.744... | 0.0 | -1 |
Sets the title of the movie. | public void setTitle(String title) {
this.title = title;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setTitle(String title)\n {\n mTitle = title;\n }",
"public void setTitle( String title ) {\n\t\t_title = title;\n\t}",
"public void setTitle_(String title_) {\n this.title_ = title_;\n }",
"public void setTitle(String title){\n\t\tthis.title = title;\n\t}",
"public void s... | [
"0.82177633",
"0.82127005",
"0.8202573",
"0.81957704",
"0.81936675",
"0.81904554",
"0.81718004",
"0.8170355",
"0.81606054",
"0.81606054",
"0.81606054",
"0.81606054",
"0.81606054",
"0.81573343",
"0.81429726",
"0.81429726",
"0.81429726",
"0.81355983",
"0.8134268",
"0.8134268",
... | 0.8108901 | 49 |
Gets the plot synopsis of the movie. | public String getOverview() {
return overview;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getPlot_acronym() {\n return plot_acronym;\n }",
"public String getPlot() {\n return plot;\n }",
"@Override\r\n\tpublic String getShowTitle() {\n\t\treturn getQymc();\r\n\t}",
"public String getSubtitle();",
"public String getPlot_info() {\n return plot_info;\n }",
"... | [
"0.6197724",
"0.6095959",
"0.59058803",
"0.5888348",
"0.585233",
"0.5569924",
"0.5497259",
"0.54287153",
"0.54139405",
"0.54109764",
"0.5410607",
"0.5398703",
"0.5398703",
"0.53964496",
"0.53959864",
"0.5389164",
"0.5389164",
"0.5389164",
"0.5389164",
"0.5389164",
"0.5389164"... | 0.0 | -1 |
Sets the plot synopsis of the movie. | public void setOverview(String overview) {
this.overview = overview;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean setMovieSynopsis(Movie movie, String synopsis){\n if(movie == null) return false;\n movie.movie_synopsis = synopsis;\n return true;\n }",
"public void setTitle(String title){\n\t\tplot.setTitle(title);\n\t}",
"public void setPlot_acronym(String plot_acronym) {\n th... | [
"0.652868",
"0.61899215",
"0.58241415",
"0.565765",
"0.5549989",
"0.5526228",
"0.54754615",
"0.54754615",
"0.54754615",
"0.5453949",
"0.5423663",
"0.5393524",
"0.5392529",
"0.5392529",
"0.5392529",
"0.5392529",
"0.5392529",
"0.53358",
"0.53228503",
"0.5303767",
"0.53028655",
... | 0.0 | -1 |
Gets the poster URL address of the movie. | public String getPosterUrl() {
return posterUrl;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getPosterPath() {\n return String.format(\"https://image.tmdb.org/t/p/w342/%s\",posterPath);\n }",
"public static URL buildMoviePosterUrl(String poster_image_name) {\n //remove \"/\" from image name\n poster_image_name = poster_image_name.startsWith(\"/\") ? poster_image_nam... | [
"0.7230606",
"0.6773513",
"0.62053573",
"0.61099243",
"0.60585594",
"0.58532405",
"0.5836853",
"0.5836403",
"0.5809374",
"0.569311",
"0.5636533",
"0.5632433",
"0.5615826",
"0.55985826",
"0.558617",
"0.55651474",
"0.55574155",
"0.55445945",
"0.55302596",
"0.5510951",
"0.548908... | 0.75451404 | 0 |
Sets URL address of the poster for the movie. | public void setPosterUrl(String posterUrl) {
this.posterUrl = posterUrl;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setPoster (String s) {\n poster = s;\n }",
"public String getPosterUrl() {\n return posterUrl;\n }",
"public void SetUrl(String url)\n\t{\n\t if (video_view.isPlaying())\n\t {\n\t video_view.stopPlayback();\n\t }\n\t \n Uri uri = Uri.parse(url);\n ... | [
"0.6369654",
"0.6324107",
"0.628994",
"0.6202593",
"0.60504997",
"0.60483944",
"0.602875",
"0.5997986",
"0.58896357",
"0.5859275",
"0.5859275",
"0.5783474",
"0.5698513",
"0.55634475",
"0.5559995",
"0.5557169",
"0.55567634",
"0.5553124",
"0.55457306",
"0.554344",
"0.55363786",... | 0.70793897 | 0 |
Gets the backdrop URL address of the movie. | public String getBackdropUrl() {
return backdropUrl;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static String buildBackdropUrl(String imageExtension) {\n return MOVIE_IMAGE_BASE_BACKDROP_URL + \"/\" + imageExtension;\n }",
"public void setBackdropUrl(String backdropUrl) {\n this.backdropUrl = backdropUrl;\n }",
"private static Uri buildMovieImageURI(String imagePath, boolean ba... | [
"0.6800313",
"0.6663785",
"0.5434977",
"0.51348525",
"0.5131242",
"0.51222503",
"0.51031655",
"0.50504005",
"0.5042861",
"0.5039715",
"0.50007784",
"0.49656975",
"0.49249777",
"0.49071655",
"0.49046904",
"0.48956943",
"0.48876458",
"0.48622844",
"0.48571247",
"0.4848188",
"0.... | 0.8014233 | 0 |
Sets URL address of the backdrop image for the movie. | public void setBackdropUrl(String backdropUrl) {
this.backdropUrl = backdropUrl;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getBackdropUrl() {\n return backdropUrl;\n }",
"public static String buildBackdropUrl(String imageExtension) {\n return MOVIE_IMAGE_BASE_BACKDROP_URL + \"/\" + imageExtension;\n }",
"@Override\n public void addBackdropToActivity(String uri) {\n uri = MovieImagePathHe... | [
"0.6997317",
"0.6305979",
"0.62903047",
"0.587746",
"0.55584824",
"0.5312496",
"0.53049445",
"0.5168705",
"0.5061",
"0.5047594",
"0.5002224",
"0.4972782",
"0.49317607",
"0.49171895",
"0.48680058",
"0.4840593",
"0.4819902",
"0.4814559",
"0.4784303",
"0.477817",
"0.47707707",
... | 0.75204766 | 0 |
Gets the user rating for the movie. | public String getUserRating() {
return userRating;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public double getRating(){\n\t\treturn this.user_rating;\n\t}",
"public double getRating(int userID, int movieID) {\n\t\tUser x = null;\n\t\tint ind = Collections.binarySearch(users, new User(userID));\n\t\tif(ind >= 0)\n\t\t\tx = users.get(ind);\n\t\telse\n\t\t\treturn -1;\n\n\t\tint ind2 = Collections.binarySe... | [
"0.7937632",
"0.7365888",
"0.7325378",
"0.7309311",
"0.73039377",
"0.7286781",
"0.7169755",
"0.7097894",
"0.7072095",
"0.7067982",
"0.70148057",
"0.6942328",
"0.69219285",
"0.68703616",
"0.6843164",
"0.68380535",
"0.6795051",
"0.67614657",
"0.67614657",
"0.6757096",
"0.669986... | 0.75383466 | 1 |
Gets the user rating for the movie as a numeric value. This value is needed for the StarRating widget. | public float getUserRatingScore() {
float scorePercent = Float.valueOf(userRating) * 10;
return ((5 * scorePercent) / 100);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public double getRating(){\n\t\treturn this.user_rating;\n\t}",
"public double getParseRating() {\n return getDouble(KEY_RATING);\n }",
"public String getUserRating() {\n return userRating;\n }",
"public Integer getRating() {\r\n if (recipe != null && ui.isIsUserAuthenticated()) {\... | [
"0.7821526",
"0.7540486",
"0.7475292",
"0.7426057",
"0.73476344",
"0.73087144",
"0.72912526",
"0.7277551",
"0.7268476",
"0.7191333",
"0.71654207",
"0.71448904",
"0.71174717",
"0.7039182",
"0.7033978",
"0.70335114",
"0.7032646",
"0.6991744",
"0.6976718",
"0.6959355",
"0.695935... | 0.749759 | 2 |
Sets the user rating for the movie. | public void setUserRating(String userRating) {
this.userRating = userRating;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setRating(int rating);",
"public void setRating(double rating) throws RatingWasAlreadySetExecption {\n if (!isRated) {\n this.rating = rating;\n this.isRated = true;\n } else {\n throw new RatingWasAlreadySetExecption(\"Rating was set on an already rated... | [
"0.73199016",
"0.71533734",
"0.7088436",
"0.70782995",
"0.70661825",
"0.70478797",
"0.7030294",
"0.702809",
"0.69555193",
"0.6932",
"0.6927804",
"0.6888523",
"0.6866018",
"0.67061543",
"0.66766626",
"0.663776",
"0.6635525",
"0.65964234",
"0.6517833",
"0.64855367",
"0.6358827"... | 0.77715623 | 0 |
Sets the release date for the movie. | public void setReleaseDate(String releaseDate) {
this.releaseDate = releaseDate;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setReleaseDate(Date date) {\r\n this.releaseDate = date;\r\n // set the fact we have called this method to set the date value\r\n this.hasSetReleaseDate=true;\r\n }",
"public void setReleaseDate(Date releaseDate){\n this.releaseDate = releaseDate;\n }",
"public voi... | [
"0.8235653",
"0.8184504",
"0.7976996",
"0.7774277",
"0.76542705",
"0.72818804",
"0.71064246",
"0.6985716",
"0.65052205",
"0.64815736",
"0.64783686",
"0.63738316",
"0.62952393",
"0.6276061",
"0.6227635",
"0.6207236",
"0.61829615",
"0.61829615",
"0.61829615",
"0.61396825",
"0.6... | 0.7597566 | 5 |
Gets the runtime of the movie. | public int getRuntime() {
return runtime;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getRuntime() {\n return runtime;\n }",
"public String runtime() {\n return this.runtime;\n }",
"public static IRuntime getRuntime() {\n return SchedulableProcess.runtime.get();\n }",
"public int getRunTime() { \n\t\t\treturn RunTime;\n\t\t}",
"public float getRunTime()... | [
"0.74630344",
"0.72056115",
"0.6886085",
"0.64034754",
"0.6401835",
"0.621208",
"0.6201914",
"0.60742134",
"0.5996462",
"0.5971521",
"0.5864593",
"0.58295316",
"0.5828002",
"0.5808793",
"0.5750587",
"0.5746736",
"0.5732144",
"0.5723661",
"0.57121426",
"0.5677857",
"0.56652457... | 0.7608338 | 0 |
Sets the runtime of the movie. | public void setRuntime(int runtime) {
this.runtime = runtime;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setRunTime(int newRuntime) {\n\t\t\tthis.RunTime = newRuntime;\n\t\t}",
"public void runtime(Program runtime) {\n\t\tthis.runtime = runtime;\n\t}",
"public void setRuntime(double runtime, int accessLevel) {\n\t\tif (accessLevel == 2) {\n\t\t\tthis.runtime = runtime;\n\t\t\tSystem.out.println(\"INFO... | [
"0.70482033",
"0.68738365",
"0.6410905",
"0.6381294",
"0.6212908",
"0.6109981",
"0.6003823",
"0.58986765",
"0.57430214",
"0.5693708",
"0.5593138",
"0.5571525",
"0.555701",
"0.5540848",
"0.5506041",
"0.54822755",
"0.54493976",
"0.5446313",
"0.5442487",
"0.54289854",
"0.5418966... | 0.79462194 | 0 |
Checks if movie is in favorites. | public boolean isFavorite() {
return isFavorite;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private boolean isAddedToFavorites() {\n boolean isFavorite = false;\n\n String[] projection = {FavMovieEntry.COLUMN_MOVIE_ID};\n String selection = FavMovieEntry.COLUMN_MOVIE_ID + \"=?\";\n String[] selectionArgs = new String[]{\n String.valueOf(sMovie.getMovieId())};\n\... | [
"0.78063977",
"0.7637389",
"0.73081756",
"0.69354314",
"0.67605996",
"0.6688527",
"0.66628116",
"0.66034704",
"0.6478547",
"0.63929236",
"0.63742465",
"0.62491614",
"0.62206995",
"0.6220413",
"0.61960745",
"0.61262345",
"0.6060372",
"0.5935117",
"0.5814977",
"0.5775265",
"0.5... | 0.58883446 | 18 |
Sets the favorites flag status. | public void setFavorite(boolean favorite) {
isFavorite = favorite;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic void setFavorite(boolean value) {\n\t\tthis.isFavorite = value;\n\t}",
"public void setFavorite(boolean favorite) {\n if (mFavorite != favorite) {\n mFavorite = favorite;\n // Avoid infinite recursions if setChecked() is called from a listener\n if (mBroadcasting) {\n ... | [
"0.72974086",
"0.72373086",
"0.7211558",
"0.71971625",
"0.7165323",
"0.7109988",
"0.7062111",
"0.7020522",
"0.6955856",
"0.6820921",
"0.67762333",
"0.6694127",
"0.66865104",
"0.6615385",
"0.66126037",
"0.6567272",
"0.6536042",
"0.64091444",
"0.63198096",
"0.63198096",
"0.6309... | 0.7289947 | 1 |
Gets a cast list for the movie. | public ArrayList<Cast> getCastList() {
return castList;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public List<Cast> getAllCast(long movieId) {\n SQLiteDatabase database = this.getWritableDatabase();\n List<Cast> castList = new ArrayList<>();\n String query = \"SELECT * FROM \" +\n CastEntry.TABLE_NAME + \" WHERE \" + CastEntry.COLUMN_MOVIE_ID + \" = \" + movieId;\n Cu... | [
"0.7507226",
"0.71840405",
"0.672424",
"0.66521317",
"0.66074824",
"0.6430511",
"0.6344747",
"0.62984896",
"0.6222498",
"0.621217",
"0.61754924",
"0.61713195",
"0.6103377",
"0.60492265",
"0.60261273",
"0.6024141",
"0.5989067",
"0.5851084",
"0.58508515",
"0.5845684",
"0.580951... | 0.71638 | 2 |
Sets a cast list for the movie. | public void setCastList(ArrayList<Cast> castList) {
this.castList = castList;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setCast(ArrayList<String> cast) {\n\t\tthis.cast = cast;\n\t}",
"public void setcast(List<Cast> v) {\n\t\tthis.cast = new ArrayList<Cast>(v);\n\t}",
"public void setCast(Cast cast) {\n\t\tthis.cast = cast;\n\t}",
"void addCastToFilm() throws RemoteException;",
"protected static void setAllMonst... | [
"0.76019174",
"0.73811865",
"0.61521",
"0.58309215",
"0.5785213",
"0.56133056",
"0.55633557",
"0.5560448",
"0.55529773",
"0.55338037",
"0.54937744",
"0.5454373",
"0.5439696",
"0.54371834",
"0.53628474",
"0.53590065",
"0.53168267",
"0.5305428",
"0.5302967",
"0.5292335",
"0.528... | 0.7959141 | 0 |
Gets the reviews list for the movie. | public ArrayList<Review> getReviewsList() {
return reviews;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public ArrayList<String> getReviews() {\n return reviews;\n }",
"@Transactional\n\tpublic List<UserReview> getReviewByMovie(Movie movie) {\n\t\treturn userReviewRepopsitory.findByMovie(movie);\n\t}",
"public ArrayList<Review> getReviews() {\n\t\treturn reviews;\n\t}",
"public GetMovieReviewsRespons... | [
"0.73364687",
"0.7307165",
"0.71874696",
"0.7037595",
"0.69953305",
"0.6862422",
"0.6836174",
"0.6659503",
"0.66386586",
"0.65150553",
"0.6474144",
"0.64618737",
"0.6461528",
"0.64538",
"0.63900495",
"0.63781655",
"0.6362498",
"0.6324434",
"0.62662023",
"0.62644565",
"0.62632... | 0.7469231 | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.