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
Returns the number of vcms discussions where groupId = &63; and language = &63; and approved = &63;.
public int countByP_L_A(long groupId, java.lang.String language, boolean approved);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int countByA_P_L_A(java.lang.String articleId, long groupId,\n\t\tjava.lang.String language, boolean approved);", "public java.util.List<VcmsDiscussion> findByP_L_A(long groupId,\n\t\tjava.lang.String language, boolean approved);", "public java.util.List<VcmsDiscussion> findByA_P_L_A(\n\t\tjava.lang.Str...
[ "0.64252514", "0.6392357", "0.6116654", "0.59838456", "0.57729894", "0.5699906", "0.5577047", "0.550571", "0.5465556", "0.5462422", "0.54526275", "0.5447459", "0.5356541", "0.53476787", "0.533488", "0.5307123", "0.52978873", "0.5291624", "0.5280013", "0.5227811", "0.5211831",...
0.651985
0
Returns all the vcms discussions where articleId = &63; and groupId = &63; and language = &63; and approved = &63;.
public java.util.List<VcmsDiscussion> findByA_P_L_A( java.lang.String articleId, long groupId, java.lang.String language, boolean approved);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public java.util.List<VcmsDiscussion> findByP_L_A(long groupId,\n\t\tjava.lang.String language, boolean approved);", "public java.util.List<VcmsDiscussion> findAll();", "public java.util.List<VcmsDiscussion> findByA_A(\n\t\tjava.lang.String articleId, boolean approved);", "public VcmsDiscussion fetchByPrimar...
[ "0.7158144", "0.70167005", "0.67579174", "0.6598668", "0.6565597", "0.6266776", "0.61896664", "0.61194146", "0.59926546", "0.58452874", "0.5747614", "0.5744592", "0.56513375", "0.5596944", "0.55626684", "0.5517888", "0.5482844", "0.5405738", "0.54002637", "0.5359612", "0.5359...
0.7682284
0
Returns the first vcms discussion in the ordered set where articleId = &63; and groupId = &63; and language = &63; and approved = &63;.
public VcmsDiscussion findByA_P_L_A_First(java.lang.String articleId, long groupId, java.lang.String language, boolean approved, com.liferay.portal.kernel.util.OrderByComparator<VcmsDiscussion> orderByComparator) throws NoSuchVcmsDiscussionException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public VcmsDiscussion fetchByA_P_L_A_First(java.lang.String articleId,\n\t\tlong groupId, java.lang.String language, boolean approved,\n\t\tcom.liferay.portal.kernel.util.OrderByComparator<VcmsDiscussion> orderByComparator);", "public VcmsDiscussion fetchByP_L_A_First(long groupId,\n\t\tjava.lang.String language...
[ "0.7541357", "0.7113617", "0.68095636", "0.66029465", "0.65333223", "0.6491931", "0.6248631", "0.61167735", "0.58250993", "0.5785519", "0.574704", "0.5708683", "0.55112857", "0.55108064", "0.54210913", "0.533863", "0.5312766", "0.52795386", "0.5175101", "0.51551336", "0.51137...
0.6748206
3
Returns the first vcms discussion in the ordered set where articleId = &63; and groupId = &63; and language = &63; and approved = &63;.
public VcmsDiscussion fetchByA_P_L_A_First(java.lang.String articleId, long groupId, java.lang.String language, boolean approved, com.liferay.portal.kernel.util.OrderByComparator<VcmsDiscussion> orderByComparator);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public VcmsDiscussion fetchByP_L_A_First(long groupId,\n\t\tjava.lang.String language, boolean approved,\n\t\tcom.liferay.portal.kernel.util.OrderByComparator<VcmsDiscussion> orderByComparator);", "public VcmsDiscussion fetchByA_A_First(java.lang.String articleId,\n\t\tboolean approved,\n\t\tcom.liferay.portal.k...
[ "0.7111211", "0.6809537", "0.67470205", "0.66010094", "0.6532505", "0.64940566", "0.624886", "0.61190444", "0.5822156", "0.57852495", "0.57442516", "0.5705639", "0.55092055", "0.5508532", "0.54233825", "0.5336321", "0.5313852", "0.5275804", "0.5174045", "0.5154144", "0.511545...
0.7539733
0
Returns the last vcms discussion in the ordered set where articleId = &63; and groupId = &63; and language = &63; and approved = &63;.
public VcmsDiscussion findByA_P_L_A_Last(java.lang.String articleId, long groupId, java.lang.String language, boolean approved, com.liferay.portal.kernel.util.OrderByComparator<VcmsDiscussion> orderByComparator) throws NoSuchVcmsDiscussionException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public VcmsDiscussion fetchByA_P_L_A_Last(java.lang.String articleId,\n\t\tlong groupId, java.lang.String language, boolean approved,\n\t\tcom.liferay.portal.kernel.util.OrderByComparator<VcmsDiscussion> orderByComparator);", "public VcmsDiscussion fetchByP_L_A_Last(long groupId,\n\t\tjava.lang.String language, ...
[ "0.7340178", "0.6966698", "0.67446953", "0.654882", "0.6481365", "0.6401131", "0.62117594", "0.59811103", "0.58353114", "0.58064836", "0.578772", "0.5648966", "0.5603739", "0.5545456", "0.55119956", "0.54150945", "0.5412642", "0.5392039", "0.5307508", "0.5300031", "0.5274229"...
0.68171674
2
Returns the last vcms discussion in the ordered set where articleId = &63; and groupId = &63; and language = &63; and approved = &63;.
public VcmsDiscussion fetchByA_P_L_A_Last(java.lang.String articleId, long groupId, java.lang.String language, boolean approved, com.liferay.portal.kernel.util.OrderByComparator<VcmsDiscussion> orderByComparator);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public VcmsDiscussion fetchByP_L_A_Last(long groupId,\n\t\tjava.lang.String language, boolean approved,\n\t\tcom.liferay.portal.kernel.util.OrderByComparator<VcmsDiscussion> orderByComparator);", "public VcmsDiscussion findByA_P_L_A_Last(java.lang.String articleId,\n\t\tlong groupId, java.lang.String language, b...
[ "0.6965999", "0.6817548", "0.6743721", "0.6551164", "0.6480435", "0.6402845", "0.62134534", "0.5980018", "0.5837363", "0.58071476", "0.5791484", "0.5650207", "0.56033057", "0.5543391", "0.5514682", "0.5416474", "0.5412975", "0.53949976", "0.5308643", "0.5301633", "0.5276422",...
0.73408854
0
Returns the vcms discussions before and after the current vcms discussion in the ordered set where articleId = &63; and groupId = &63; and language = &63; and approved = &63;.
public VcmsDiscussion[] findByA_P_L_A_PrevAndNext( java.lang.String discussionId, java.lang.String articleId, long groupId, java.lang.String language, boolean approved, com.liferay.portal.kernel.util.OrderByComparator<VcmsDiscussion> orderByComparator) throws NoSuchVcmsDiscussionException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public VcmsDiscussion[] findByP_L_A_PrevAndNext(\n\t\tjava.lang.String discussionId, long groupId, java.lang.String language,\n\t\tboolean approved,\n\t\tcom.liferay.portal.kernel.util.OrderByComparator<VcmsDiscussion> orderByComparator)\n\t\tthrows NoSuchVcmsDiscussionException;", "public VcmsDiscussion[] findB...
[ "0.60658026", "0.59028035", "0.5573224", "0.5418044", "0.48059407", "0.47666252", "0.46175432", "0.45157817", "0.45035368", "0.44996798", "0.4436382", "0.44319442", "0.43447232", "0.43413872", "0.43301007", "0.42880163", "0.4241118", "0.4207878", "0.4182605", "0.41597763", "0...
0.60863084
0
Removes all the vcms discussions where articleId = &63; and groupId = &63; and language = &63; and approved = &63; from the database.
public void removeByA_P_L_A(java.lang.String articleId, long groupId, java.lang.String language, boolean approved);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "List<PreparedStatement> getClearDiscussionStatements(String forumId, String discussionId, Connection conn) throws Exception;", "public java.util.List<VcmsDiscussion> findByA_P_L_A(\n\t\tjava.lang.String articleId, long groupId, java.lang.String language,\n\t\tboolean approved);", "List<PreparedStatement> getDe...
[ "0.5963707", "0.5846572", "0.56587493", "0.55453503", "0.5502684", "0.5455724", "0.5395119", "0.530861", "0.5268727", "0.52463526", "0.5205316", "0.5128212", "0.5105514", "0.504642", "0.49844757", "0.49248624", "0.49199578", "0.49049905", "0.48892072", "0.48672804", "0.482918...
0.5290835
8
Returns the number of vcms discussions where articleId = &63; and groupId = &63; and language = &63; and approved = &63;.
public int countByA_P_L_A(java.lang.String articleId, long groupId, java.lang.String language, boolean approved);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public java.util.List<VcmsDiscussion> findByA_P_L_A(\n\t\tjava.lang.String articleId, long groupId, java.lang.String language,\n\t\tboolean approved);", "long countByExample(DiscussExample example);", "public int countByP_L_A(long groupId, java.lang.String language,\n\t\tboolean approved);", "public java.uti...
[ "0.6228483", "0.5817921", "0.5813482", "0.5792044", "0.5569135", "0.55558854", "0.55281746", "0.5512888", "0.55003726", "0.54914", "0.5491077", "0.54663146", "0.546522", "0.5413584", "0.53788257", "0.5373296", "0.5361696", "0.53451675", "0.53270113", "0.5320649", "0.5284579",...
0.64715976
0
Returns all the vcms discussions where articleId = &63; and approved = &63;.
public java.util.List<VcmsDiscussion> findByA_A( java.lang.String articleId, boolean approved);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public java.util.List<VcmsDiscussion> findByA_P_L_A(\n\t\tjava.lang.String articleId, long groupId, java.lang.String language,\n\t\tboolean approved);", "public java.util.List<VcmsDiscussion> findByArticle(\n\t\tjava.lang.String articleId);", "public java.util.List<VcmsDiscussion> findAll();", "public VcmsDi...
[ "0.71327865", "0.66211736", "0.6546328", "0.63800275", "0.6334097", "0.6289242", "0.61288637", "0.60711", "0.5921481", "0.5856464", "0.5814826", "0.57010144", "0.56674916", "0.5666835", "0.55742836", "0.5460684", "0.54083663", "0.53466153", "0.53240395", "0.52649635", "0.5252...
0.7899255
0
Returns the first vcms discussion in the ordered set where articleId = &63; and approved = &63;.
public VcmsDiscussion findByA_A_First(java.lang.String articleId, boolean approved, com.liferay.portal.kernel.util.OrderByComparator<VcmsDiscussion> orderByComparator) throws NoSuchVcmsDiscussionException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public VcmsDiscussion fetchByA_A_First(java.lang.String articleId,\n\t\tboolean approved,\n\t\tcom.liferay.portal.kernel.util.OrderByComparator<VcmsDiscussion> orderByComparator);", "public VcmsDiscussion fetchByA_P_L_A_First(java.lang.String articleId,\n\t\tlong groupId, java.lang.String language, boolean appro...
[ "0.7656344", "0.72196674", "0.65282387", "0.6506998", "0.6326095", "0.6081297", "0.5936726", "0.5920473", "0.58646065", "0.58107734", "0.5397985", "0.53492826", "0.53345543", "0.5255008", "0.5246731", "0.5226166", "0.5202457", "0.5012135", "0.49484715", "0.49220002", "0.49141...
0.68311495
2
Returns the first vcms discussion in the ordered set where articleId = &63; and approved = &63;.
public VcmsDiscussion fetchByA_A_First(java.lang.String articleId, boolean approved, com.liferay.portal.kernel.util.OrderByComparator<VcmsDiscussion> orderByComparator);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public VcmsDiscussion fetchByA_P_L_A_First(java.lang.String articleId,\n\t\tlong groupId, java.lang.String language, boolean approved,\n\t\tcom.liferay.portal.kernel.util.OrderByComparator<VcmsDiscussion> orderByComparator);", "public VcmsDiscussion findByA_A_First(java.lang.String articleId,\n\t\tboolean approv...
[ "0.721924", "0.68306184", "0.6528401", "0.65066403", "0.63257986", "0.6080923", "0.59368473", "0.5921212", "0.58644533", "0.58120346", "0.5399099", "0.5349269", "0.5335585", "0.52562", "0.5246348", "0.52264154", "0.52032876", "0.5012467", "0.49498487", "0.49236327", "0.491572...
0.76555765
0
Returns the last vcms discussion in the ordered set where articleId = &63; and approved = &63;.
public VcmsDiscussion findByA_A_Last(java.lang.String articleId, boolean approved, com.liferay.portal.kernel.util.OrderByComparator<VcmsDiscussion> orderByComparator) throws NoSuchVcmsDiscussionException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public VcmsDiscussion fetchByA_A_Last(java.lang.String articleId,\n\t\tboolean approved,\n\t\tcom.liferay.portal.kernel.util.OrderByComparator<VcmsDiscussion> orderByComparator);", "public VcmsDiscussion fetchByA_P_L_A_Last(java.lang.String articleId,\n\t\tlong groupId, java.lang.String language, boolean approve...
[ "0.74201196", "0.69234836", "0.63337517", "0.6284774", "0.6283593", "0.59968215", "0.5996717", "0.5740109", "0.5698147", "0.56385654", "0.54545486", "0.5454383", "0.5448004", "0.54419893", "0.54045135", "0.53778076", "0.52651733", "0.5190155", "0.51639384", "0.5035755", "0.50...
0.6846499
2
Returns the last vcms discussion in the ordered set where articleId = &63; and approved = &63;.
public VcmsDiscussion fetchByA_A_Last(java.lang.String articleId, boolean approved, com.liferay.portal.kernel.util.OrderByComparator<VcmsDiscussion> orderByComparator);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public VcmsDiscussion fetchByA_P_L_A_Last(java.lang.String articleId,\n\t\tlong groupId, java.lang.String language, boolean approved,\n\t\tcom.liferay.portal.kernel.util.OrderByComparator<VcmsDiscussion> orderByComparator);", "public VcmsDiscussion findByA_A_Last(java.lang.String articleId,\n\t\tboolean approved...
[ "0.6924062", "0.6846063", "0.6333228", "0.62851834", "0.6282793", "0.599748", "0.5995232", "0.5735249", "0.5696051", "0.5636699", "0.54521674", "0.5451847", "0.54460514", "0.5438825", "0.5403775", "0.537546", "0.5263205", "0.5191705", "0.5163542", "0.5031334", "0.50256", "0...
0.74207103
0
Returns the vcms discussions before and after the current vcms discussion in the ordered set where articleId = &63; and approved = &63;.
public VcmsDiscussion[] findByA_A_PrevAndNext( java.lang.String discussionId, java.lang.String articleId, boolean approved, com.liferay.portal.kernel.util.OrderByComparator<VcmsDiscussion> orderByComparator) throws NoSuchVcmsDiscussionException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public VcmsDiscussion[] findByA_P_L_A_PrevAndNext(\n\t\tjava.lang.String discussionId, java.lang.String articleId,\n\t\tlong groupId, java.lang.String language, boolean approved,\n\t\tcom.liferay.portal.kernel.util.OrderByComparator<VcmsDiscussion> orderByComparator)\n\t\tthrows NoSuchVcmsDiscussionException;", ...
[ "0.59219396", "0.5781546", "0.5454502", "0.49979764", "0.4736527", "0.46896496", "0.46866804", "0.46045205", "0.45829615", "0.45311722", "0.4487369", "0.44746724", "0.44302252", "0.4385978", "0.43523923", "0.42978093", "0.42701226", "0.42667186", "0.4255183", "0.42542893", "0...
0.6376258
0
Removes all the vcms discussions where articleId = &63; and approved = &63; from the database.
public void removeByA_A(java.lang.String articleId, boolean approved);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public java.util.List<VcmsDiscussion> findByA_A(\n\t\tjava.lang.String articleId, boolean approved);", "List<PreparedStatement> getClearDiscussionStatements(String forumId, String discussionId, Connection conn) throws Exception;", "List<PreparedStatement> getDeleteDiscussionStatements(String forumId,String dis...
[ "0.60155565", "0.5871514", "0.55927587", "0.54960763", "0.5465896", "0.5361729", "0.5280219", "0.5243292", "0.52237284", "0.51413405", "0.5127734", "0.5100489", "0.5075182", "0.4986123", "0.49637082", "0.49525437", "0.49490002", "0.49470827", "0.48728028", "0.48668522", "0.48...
0.5708663
2
Returns the number of vcms discussions where articleId = &63; and approved = &63;.
public int countByA_A(java.lang.String articleId, boolean approved);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public java.util.List<VcmsDiscussion> findByA_A(\n\t\tjava.lang.String articleId, boolean approved);", "public int countByA_P_L_A(java.lang.String articleId, long groupId,\n\t\tjava.lang.String language, boolean approved);", "public int countByApproved(boolean approved)\n\t\tthrows com.liferay.portal.kernel.ex...
[ "0.65609276", "0.60825926", "0.59040606", "0.5810872", "0.5758108", "0.573994", "0.5739177", "0.5736199", "0.56703246", "0.565837", "0.56209695", "0.5570511", "0.55631864", "0.55435", "0.5527042", "0.55200404", "0.55099475", "0.55069643", "0.54419935", "0.53433514", "0.533971...
0.64408994
1
Returns all the vcms discussions where articleId = &63;.
public java.util.List<VcmsDiscussion> findByArticle( java.lang.String articleId);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public VcmsDiscussion fetchByPrimaryKey(java.lang.String discussionId);", "public java.util.List<VcmsDiscussion> findAll();", "Iterable<Comment> findByArticleId(int articleId);", "public java.util.List<VcmsDiscussion> findByA_A(\n\t\tjava.lang.String articleId, boolean approved);", "public void cacheResult...
[ "0.75191057", "0.7220827", "0.6626418", "0.6608136", "0.61980367", "0.61976635", "0.6111802", "0.604299", "0.60349566", "0.5988912", "0.5939699", "0.5694016", "0.5653072", "0.5640057", "0.55786514", "0.5502321", "0.54316986", "0.5399874", "0.52794325", "0.52646446", "0.524087...
0.84524393
0
Returns the first vcms discussion in the ordered set where articleId = &63;.
public VcmsDiscussion findByArticle_First(java.lang.String articleId, com.liferay.portal.kernel.util.OrderByComparator<VcmsDiscussion> orderByComparator) throws NoSuchVcmsDiscussionException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public VcmsDiscussion fetchByArticle_First(java.lang.String articleId,\n\t\tcom.liferay.portal.kernel.util.OrderByComparator<VcmsDiscussion> orderByComparator);", "public VcmsDiscussion fetchByPrimaryKey(java.lang.String discussionId);", "public VcmsDiscussion fetchByA_A_First(java.lang.String articleId,\n\t\t...
[ "0.7394197", "0.68455267", "0.6588739", "0.63235986", "0.6116745", "0.59538734", "0.5827132", "0.57934856", "0.5741836", "0.5664746", "0.5569397", "0.5532131", "0.54756093", "0.53790087", "0.5376864", "0.5352321", "0.5303275", "0.5280047", "0.5225602", "0.51708996", "0.513704...
0.6306931
4
Returns the first vcms discussion in the ordered set where articleId = &63;.
public VcmsDiscussion fetchByArticle_First(java.lang.String articleId, com.liferay.portal.kernel.util.OrderByComparator<VcmsDiscussion> orderByComparator);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public VcmsDiscussion fetchByPrimaryKey(java.lang.String discussionId);", "public VcmsDiscussion fetchByA_A_First(java.lang.String articleId,\n\t\tboolean approved,\n\t\tcom.liferay.portal.kernel.util.OrderByComparator<VcmsDiscussion> orderByComparator);", "public VcmsDiscussion fetchByA_P_L_A_First(java.lang....
[ "0.6848387", "0.6587701", "0.6322069", "0.6306263", "0.6115815", "0.5956252", "0.582952", "0.5793368", "0.5740509", "0.56635374", "0.55699867", "0.5533", "0.5476686", "0.5379797", "0.53775775", "0.53509706", "0.5304835", "0.5280731", "0.52241635", "0.5173445", "0.5137381", ...
0.7393335
0
Returns the last vcms discussion in the ordered set where articleId = &63;.
public VcmsDiscussion findByArticle_Last(java.lang.String articleId, com.liferay.portal.kernel.util.OrderByComparator<VcmsDiscussion> orderByComparator) throws NoSuchVcmsDiscussionException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public VcmsDiscussion fetchByArticle_Last(java.lang.String articleId,\n\t\tcom.liferay.portal.kernel.util.OrderByComparator<VcmsDiscussion> orderByComparator);", "public VcmsDiscussion fetchByPrimaryKey(java.lang.String discussionId);", "public VcmsDiscussion fetchByA_A_Last(java.lang.String articleId,\n\t\tbo...
[ "0.74692386", "0.66278183", "0.65003455", "0.62474144", "0.6243756", "0.6199894", "0.59712696", "0.58795667", "0.5837126", "0.5722709", "0.55871326", "0.5572145", "0.54565036", "0.5444125", "0.5427175", "0.5395243", "0.5379498", "0.53486615", "0.53139687", "0.5305266", "0.530...
0.64748806
3
Returns the last vcms discussion in the ordered set where articleId = &63;.
public VcmsDiscussion fetchByArticle_Last(java.lang.String articleId, com.liferay.portal.kernel.util.OrderByComparator<VcmsDiscussion> orderByComparator);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public VcmsDiscussion fetchByPrimaryKey(java.lang.String discussionId);", "public VcmsDiscussion fetchByA_A_Last(java.lang.String articleId,\n\t\tboolean approved,\n\t\tcom.liferay.portal.kernel.util.OrderByComparator<VcmsDiscussion> orderByComparator);", "public VcmsDiscussion findByArticle_Last(java.lang.Str...
[ "0.6624607", "0.6500854", "0.6475238", "0.62479275", "0.6244158", "0.62011474", "0.59674615", "0.58806014", "0.5834827", "0.57240856", "0.55836606", "0.5572123", "0.54540414", "0.544657", "0.5423434", "0.5396718", "0.5376493", "0.53487897", "0.53108203", "0.53069746", "0.5306...
0.74696195
0
Returns the vcms discussions before and after the current vcms discussion in the ordered set where articleId = &63;.
public VcmsDiscussion[] findByArticle_PrevAndNext( java.lang.String discussionId, java.lang.String articleId, com.liferay.portal.kernel.util.OrderByComparator<VcmsDiscussion> orderByComparator) throws NoSuchVcmsDiscussionException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public VcmsDiscussion[] findByA_A_PrevAndNext(\n\t\tjava.lang.String discussionId, java.lang.String articleId,\n\t\tboolean approved,\n\t\tcom.liferay.portal.kernel.util.OrderByComparator<VcmsDiscussion> orderByComparator)\n\t\tthrows NoSuchVcmsDiscussionException;", "public VcmsDiscussion[] findByA_P_L_A_PrevAn...
[ "0.5766616", "0.54163134", "0.51824766", "0.5155865", "0.47755504", "0.45957407", "0.4546193", "0.4519384", "0.4473572", "0.44381285", "0.44069922", "0.43971652", "0.43783993", "0.4325826", "0.42533165", "0.4219032", "0.419816", "0.41454685", "0.4141273", "0.41300902", "0.407...
0.6202103
0
Removes all the vcms discussions where articleId = &63; from the database.
public void removeByArticle(java.lang.String articleId);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public java.util.List<VcmsDiscussion> findByArticle(\n\t\tjava.lang.String articleId);", "List<PreparedStatement> getClearDiscussionStatements(String forumId, String discussionId, Connection conn) throws Exception;", "public VcmsDiscussion fetchByPrimaryKey(java.lang.String discussionId);", "public void dele...
[ "0.62191343", "0.5916842", "0.5872119", "0.57996655", "0.5704974", "0.56719744", "0.5518567", "0.55005866", "0.54251146", "0.53302985", "0.52509975", "0.52430904", "0.51897806", "0.51455766", "0.50616723", "0.505416", "0.5020648", "0.49910593", "0.49010175", "0.48966643", "0....
0.5733692
5
Returns the number of vcms discussions where articleId = &63;.
public int countByArticle(java.lang.String articleId);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public java.util.List<VcmsDiscussion> findByArticle(\n\t\tjava.lang.String articleId);", "public int getSUB2AnonimCommentCount(WebElement article) {\n String countText = baseFunc.getElement(MOB_SUB2_ANON_ARTICLE_COUNT).getText();\n String count = countText.substring(countText.indexOf(\"(\") + 1, co...
[ "0.6731674", "0.6254079", "0.62414217", "0.6037341", "0.56080925", "0.55533457", "0.5517207", "0.54723734", "0.54711205", "0.54412055", "0.5434463", "0.5429295", "0.5425899", "0.54113996", "0.53790164", "0.5377165", "0.5375669", "0.5362794", "0.5346873", "0.5313724", "0.53105...
0.65623724
1
Caches the vcms discussion in the entity cache if it is enabled.
public void cacheResult(VcmsDiscussion vcmsDiscussion);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void cacheResult(java.util.List<VcmsDiscussion> vcmsDiscussions);", "public void cacheResult(VcmsArticleType vcmsArticleType);", "public void setCached() {\n }", "public void flushEntityCache() {\n super.flushEntityCache();\n }", "public interface ArticlesCache {\n}", "@Override\n\tpubl...
[ "0.6864513", "0.6165347", "0.57000446", "0.5602148", "0.55474406", "0.55128616", "0.5505262", "0.5501936", "0.53748184", "0.5370957", "0.53218323", "0.527713", "0.525296", "0.5250856", "0.5246052", "0.519279", "0.5192083", "0.5190907", "0.5190537", "0.51518565", "0.51440245",...
0.7371286
0
Caches the vcms discussions in the entity cache if it is enabled.
public void cacheResult(java.util.List<VcmsDiscussion> vcmsDiscussions);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void cacheResult(VcmsDiscussion vcmsDiscussion);", "public java.util.List<VcmsDiscussion> findAll();", "public void cacheResult(VcmsArticleType vcmsArticleType);", "public void cacheResult(java.util.List<VcmsArticleType> vcmsArticleTypes);", "public interface ArticlesCache {\n}", "public VcmsDiscu...
[ "0.7334129", "0.57453275", "0.57179385", "0.5501879", "0.54812366", "0.54716885", "0.53904146", "0.5380399", "0.5374871", "0.53334", "0.53224176", "0.52704436", "0.52458686", "0.52244705", "0.5119456", "0.51127476", "0.5102257", "0.5095371", "0.5091302", "0.5084868", "0.50550...
0.7631738
0
Creates a new vcms discussion with the primary key. Does not add the vcms discussion to the database.
public VcmsDiscussion create(java.lang.String discussionId);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public com.vportal.portlet.vfaq.model.FAQComment create(long id);", "public VcmsDiscussion fetchByPrimaryKey(java.lang.String discussionId);", "public void storeDiscussion(Discussion d) throws DAOException;", "protected abstract void sendNewPost(Discussion discussion, Post post);", "@OnClick(R.id.fab_add_f...
[ "0.6618739", "0.62636375", "0.6212632", "0.5944841", "0.55990624", "0.5424317", "0.5393553", "0.5295531", "0.5274198", "0.5125887", "0.5080936", "0.50498843", "0.50323963", "0.5030239", "0.50245595", "0.49718228", "0.49247876", "0.49235043", "0.49059674", "0.49002498", "0.489...
0.8527303
0
Removes the vcms discussion with the primary key from the database. Also notifies the appropriate model listeners.
public VcmsDiscussion remove(java.lang.String discussionId) throws NoSuchVcmsDiscussionException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public VcmsDiscussion fetchByPrimaryKey(java.lang.String discussionId);", "int deleteByPrimaryKey(Integer announceid);", "int deleteByPrimaryKey(Integer massageId);", "public void deleteDiscussionTopic(IDiscussionTopic topic)\n throws OculusException;", "@Override\n\tpublic void delete(NewsCollection fi...
[ "0.5894927", "0.5444785", "0.5430688", "0.54288155", "0.54234177", "0.53703535", "0.5332121", "0.5313657", "0.5304471", "0.5293177", "0.5252829", "0.5229382", "0.52091557", "0.5196042", "0.51804745", "0.51794124", "0.5156894", "0.5119977", "0.5101998", "0.5101998", "0.5098168...
0.6071567
0
Returns the vcms discussion with the primary key or returns null if it could not be found.
public VcmsDiscussion fetchByPrimaryKey(java.lang.String discussionId);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Discussion getDiscussion(int discussionID) throws DAOException;", "public String getDiscussion(){\n return discussion;\n }", "public java.util.List<VcmsDiscussion> findAll();", "java.lang.String getLegacyDiscussionId();", "protected Discussion getDiscussionForName(String name){\n\t\tfor(Di...
[ "0.70880747", "0.64430124", "0.6144153", "0.6109856", "0.6013174", "0.60062176", "0.5967567", "0.59648806", "0.5960721", "0.5868256", "0.5695481", "0.5620256", "0.55577606", "0.5553636", "0.55082715", "0.54997003", "0.5492193", "0.5472875", "0.5455859", "0.5452304", "0.540446...
0.8058773
0
Returns all the vcms discussions.
public java.util.List<VcmsDiscussion> findAll();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Discussion[] getDiscussions() throws DAOException;", "public void cacheResult(java.util.List<VcmsDiscussion> vcmsDiscussions);", "public Discussion[] getDiscussions(IDAOProgressMonitor progressMonitor)\n\t\t\tthrows DAOException;", "public Discussion[] getMoreDiscussions(IDAOProgressMonitor progressMo...
[ "0.7221705", "0.6930019", "0.6925239", "0.6614965", "0.6585758", "0.6330785", "0.58567435", "0.57420594", "0.57308924", "0.5726165", "0.57194126", "0.5646315", "0.56415266", "0.563672", "0.5636104", "0.55612403", "0.5541342", "0.5531661", "0.55198956", "0.5509087", "0.5503824...
0.8402623
0
Removes all the vcms discussions from the database.
public void removeAll();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public java.util.List<VcmsDiscussion> findAll();", "@Override\r\n\t@Transactional\r\n\tpublic void deleteAll() {\n\t\ttopicContentDao.deleteAll();\r\n\t}", "public void deleteAll() {\n\t\t mongoTemplate.remove(new Query(), COLLECTION);\n\t}", "@Before\n public void cleanConversations() {\n restCont...
[ "0.61181843", "0.60223544", "0.60021836", "0.5842919", "0.5811047", "0.58051693", "0.5733881", "0.56736994", "0.5627353", "0.5564458", "0.55644464", "0.55008936", "0.54906577", "0.54906577", "0.54906577", "0.54906577", "0.54906577", "0.54906577", "0.54906577", "0.54906577", "...
0.0
-1
Returns the number of vcms discussions.
public int countAll();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getCountForum();", "public int getNumAnnouncements(){\n return message.length;\n }", "@Override\n\tpublic int getVcmsPortionsCount() {\n\t\treturn _vcmsPortionLocalService.getVcmsPortionsCount();\n\t}", "int commentsCount();", "int postsCount();", "public int getCommentsCount() {\n ...
[ "0.64734334", "0.6333035", "0.6176298", "0.6129304", "0.6101636", "0.6099377", "0.6037972", "0.59954035", "0.598834", "0.5964106", "0.5964106", "0.5964106", "0.595414", "0.58765733", "0.58712304", "0.5867028", "0.58604896", "0.58564204", "0.58564204", "0.5849924", "0.5826265"...
0.0
-1
/ A global name is always defined via a string
public Global(String globalName, Subscript ...subscripts) { this.globalName=globalName; this.subscripts=subscripts; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected boolean isGlobalVariable(String string) {\n\t\treturn string.charAt(0) == '@';\n\t}", "public static void addGlobal(String s, Ident i) {\n\t\t\tglobaux.put(s, i);\n\t\t}", "String getVarName();", "String getVarName();", "String getVarName();", "String getVarName(String name);", "String consta...
[ "0.6563476", "0.6496498", "0.6434003", "0.6434003", "0.6434003", "0.62168485", "0.6092727", "0.60270154", "0.6012218", "0.5931627", "0.59106153", "0.5893978", "0.5825605", "0.58208317", "0.5774806", "0.57460546", "0.5669496", "0.56671035", "0.5630326", "0.5616261", "0.5591383...
0.0
-1
/ Unless a entity defines a specific / subscript to use it is assumed that / the entity is one of many that can be stored at / a location / A unique identity node is generated by incrementing / the corresponding index node
protected void NewIdentity() { this.identity=0L; NodeReference nodeRef = getNodeReference(); nodeRef.appendSubscript(0L); nodeRef.appendSubscript("id"); this.identity=nodeRef.increment(1); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface Entity\n\textends Node\n{\n\n\tpublic abstract String getPublicId();\n\n\tpublic abstract String getSystemId();\n\n\tpublic abstract String getNotationName();\n}", "protected synchronized void overrideEntityIndex(String entity, int index) { ent_2_i.put(entity,index); }", "private int getIndex(...
[ "0.62833345", "0.610794", "0.5859581", "0.5679416", "0.5677362", "0.5671519", "0.5645097", "0.5600467", "0.55646604", "0.550128", "0.53572214", "0.53463066", "0.5327061", "0.5327061", "0.5323581", "0.5319692", "0.53025967", "0.52843505", "0.5274202", "0.52611595", "0.526044",...
0.5861969
2
identity must be over 0
protected void setIdentity(long identity) { this.identity=new Long(identity); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testZeroA() {\n assertEquals(0, PiGenerator.powerMod(0, 5, 42));\n }", "@Test\n public void testIdentity() {\n final double junk[] = new double[Matrix33d.LENGTH];\n for (int i = 0; i < Matrix33d.LENGTH; i++) {\n junk[i] = 1089.1451D;\n }\n ...
[ "0.58234495", "0.5651758", "0.5629122", "0.5609554", "0.56049174", "0.560295", "0.5559483", "0.5554447", "0.55539364", "0.5489706", "0.5479119", "0.54720974", "0.54211414", "0.53430617", "0.5320323", "0.53203154", "0.5306554", "0.5299163", "0.5299163", "0.5288897", "0.5267005...
0.0
-1
/ Identity must have been previously set / Depending on how values for an entity are stored / there may be child nodes and / or content / stored at the parent node
protected boolean Exists() { if (identity<1) return false; NodeReference nodeReference = getNodeReference(); return (nodeReference.exists() || nodeReference.hasSubnodes()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void ensureEntityValue(IEntity entity) {\n entity.setPrimaryKey(entity.getPrimaryKey());\n }", "public void testInheritanceEditMetadataForMakeParentNullNoData()\r\n\t{\r\n\r\n\t\tEntityManagerInterface entityManagerInterface = EntityManager.getInstance();\r\n\t\tDomainObjectFactory factory = Do...
[ "0.60018694", "0.5970725", "0.5898332", "0.58624095", "0.58056897", "0.5772193", "0.57584596", "0.5751501", "0.57032734", "0.5703211", "0.5684914", "0.56829035", "0.56610066", "0.56258535", "0.5621901", "0.56164795", "0.5615996", "0.5583212", "0.55696857", "0.55095553", "0.54...
0.0
-1
Create the frame. Cosntructor, a qui se inicializaran los componentes en estandar
public Round_Robin() { iniciaComponentes(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public BreukFrame() {\n super();\n initialize();\n }", "public FrameDesign() {\n initComponents();\n }", "public Frame() {\n initComponents();\n }", "public Frame() {\n initComponents();\n }", "public FrameControl() {\n initComponents();\n }", "public Mercad...
[ "0.76077974", "0.7592106", "0.7492534", "0.7492534", "0.7421173", "0.7413092", "0.7296346", "0.7279519", "0.7276111", "0.7212974", "0.718156", "0.7181115", "0.7169729", "0.7120338", "0.70910007", "0.7065258", "0.70635235", "0.7056774", "0.7053451", "0.7053086", "0.7050226", ...
0.0
-1
Lennando de los primeros componentes que cuentan con la informacion
void iniciaPanel() { for (int i = 0; i < 5; i++) { for (int j = 0; j < 3; j++) { info[i][j] = new JLabel(""); info[i][j].setBorder(new LineBorder(new Color(0, 0, 0), 1, true)); info[i][j].setOpaque(true); if(i==0) { info[i][j].setBackground(UIManager.getColor("List.selectionBackground")); } if(i==1) { info[i][j].setBackground(Color.yellow); } if(i==2) { info[i][j].setBackground(Color.blue); } if(i==3) { info[i][j].setBackground(Color.red); } if(i==4) { info[i][j].setBackground(Color.gray); } panel.add(info[i][j]); } } info[0][0].setText("PROCESOS"); info[1][0].setText("P1"); info[2][0].setText("P2"); info[3][0].setText("P3"); info[4][0].setText("P4"); info[0][1].setText("TIEMPO DE ARRIBO/LLEGADA"); info[0][2].setText("RAFAGAS DE USO DEL CPU"); //llenado donde estara la simulacion for (int i = 0; i < ns; i++) { for (int j = 0; j < ms; j++) { simulacion[i][j] = new JLabel(""); simulacion[i][j].setBorder(new LineBorder(new Color(0, 0, 0), 1, true)); simulacion[i][j].setOpaque(true); simulacion[i][j].setBackground(Color.WHITE); simulacion[i][j].setVisible(false); simulacion[i][j].setFont(fuente2); panel_2.add(simulacion[i][j]); } } llenainfo(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int contaPercorre() {\n\t\tint contaM = 0;\n\t\tCampusModel aux = inicio;\n\t\tString r = \" \";\n\t\twhile (aux != null) {\n\t\t\tr = r + \"\\n\" + aux.getNomeCampus();\n\t\t\taux = aux.getProx();\n\t\t\tcontaM++;\n\t\t}\n\t\treturn contaM;\n\t}", "long getNombreElements();", "public int getNumberOfCom...
[ "0.6031212", "0.58794624", "0.587009", "0.5787504", "0.5786561", "0.571665", "0.5680058", "0.558781", "0.5578501", "0.5569819", "0.5555468", "0.5526519", "0.5514657", "0.5504661", "0.5490384", "0.54882747", "0.5487083", "0.5486918", "0.5451396", "0.5451396", "0.5451396", "0...
0.0
-1
Eventos para los botones (Personalidad)
@Override//captura todas las acciones de los botones y realiza la funcion de cada uno public void actionPerformed(ActionEvent e) { if (e.getSource() == btnNuevaSimulacion ) { nuevaSimulacion(); }else if(e.getSource()==btnComenzarSimulacion) { if(bandera ==false) { JOptionPane.showMessageDialog(null, "Establesca una rafaga de tiempo primero"); } else { try { tiempo = Integer.parseInt(textRafaga.getText()); if(tiempo<1||tiempo>10) { JOptionPane.showMessageDialog(null, "Ingrese un numero del 1 al 10"); } else { iniciaSimulacion(); } }catch(Exception e2) { JOptionPane.showMessageDialog(null, "Ingrese un numero valido del 1 al 10"); } } }else if(e.getSource()==btnEstablecerRafaga) { if(textRafaga.getText().isEmpty()) { JOptionPane.showMessageDialog(null, "Establezca una rafaga de tiempo primero"); } else { bandera = true; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void inicializarBotones() {\n\t\t\n\t\t// aņadimos listeners a los botones del panel 'login'\n\t\tthis.controladorLogin = new ControladorLogin(vista, modelo);\n\t\tthis.controladorLogin.addListeners();\n\t\t\n\t\t// aņadimos listeners a los botones del panel 'registro'\n\t\tthis.controladorRegistro = new Co...
[ "0.6945296", "0.65406734", "0.6449323", "0.6206217", "0.60648054", "0.5989394", "0.5973414", "0.5883908", "0.5883116", "0.58205354", "0.5813533", "0.57932585", "0.5736423", "0.57348627", "0.57296073", "0.56925005", "0.56743157", "0.56687903", "0.56667954", "0.56392586", "0.56...
0.0
-1
dataFileCreate() method to create a customerDetails.csv file and write data into it.
public void dataFileCreate() { String COMMA_DELIMITER = ","; String NEW_LINE_SEPERATOR = "\n"; String FILE_HEADER = "Title,First Name,Last Name,Email,Phone Number"; try { List<Customer> dataList = new ArrayList<Customer>(); dataList.add( new Customer(title, customerFirstName, customerLastName, custromerEmailId, customerPhoneNumber)); FileWriter fileWriter = new FileWriter("CustomerDetails.csv"); BufferedWriter bufferWriter = new BufferedWriter(fileWriter); bufferWriter.append(FILE_HEADER); for (Customer c : dataList) { bufferWriter.write(NEW_LINE_SEPERATOR); bufferWriter.write(c.getTitle()); bufferWriter.write(COMMA_DELIMITER); bufferWriter.write(c.getFirstName()); bufferWriter.write(COMMA_DELIMITER); bufferWriter.write(c.getLastName()); bufferWriter.write(COMMA_DELIMITER); bufferWriter.write(c.getEmailAddress()); bufferWriter.write(COMMA_DELIMITER); bufferWriter.write(String.valueOf(c.getPhone())); bufferWriter.write(COMMA_DELIMITER); } bufferWriter.close(); } catch (Exception e) { System.out.println(e.getMessage()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void createCSV() {\n\t\t// Need to integrate CSV calling logic\n\t}", "public void createCsvFile(String fileName) { \n \n try { ...
[ "0.69074404", "0.60814464", "0.5969072", "0.59571195", "0.58618367", "0.5820587", "0.57278335", "0.57183236", "0.5685648", "0.5679878", "0.5677145", "0.5668689", "0.5660148", "0.56585586", "0.5653767", "0.5623574", "0.5586165", "0.5585421", "0.5576668", "0.5542337", "0.550359...
0.8440097
0
TODO Autogenerated method stub
public static void main(String[] args) { String given="hello im jaiprashanth hw are you"; char ch[]=given.toCharArray(); for(int i=0;i<ch.length;i++) { if(ch[i]==' ') { ch[i+1]=(char)(ch[i+1]-32); } System.out.println(ch); } }
{ "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
show message on list click
private void showText(String msg) { popup.setText(msg); listView.animate().alpha(0.3f).setDuration(1000); popup.setVisibility(View.VISIBLE); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void mouseClicked(MouseEvent e) {\r\n\t\t\tlistMessages = (JList) e.getSource();\r\n\t\t\tif (e.getClickCount() == 2) {\r\n\t\t\t\topenMessage(listMessages.locationToIndex(e.getPoint()));\r\n\t\t\t}\r\n\t\t}", "void onListClick();", "public void onButtonActionEvent(com.codename1.ui.events.ActionEvent ev...
[ "0.73356223", "0.7296993", "0.70726895", "0.69477606", "0.68751764", "0.67690414", "0.6661194", "0.6644755", "0.6639344", "0.66185814", "0.6607549", "0.6598257", "0.65802866", "0.6575755", "0.6559465", "0.65579164", "0.6546398", "0.64637136", "0.6450453", "0.6421915", "0.6384...
0.63312376
23
Extracting location info from location
private void updateLocation(String info) { popup.setText(info); listView.animate().alpha(0.3f).setDuration(1000); popup.setVisibility(View.VISIBLE); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "com.google.ads.googleads.v14.common.LocationInfo getLocation();", "String getLocation();", "String getLocation();", "String getLocation();", "java.lang.String getLocation();", "Location getLocation();", "Location getLocation();", "Location getLocation();", "Location getLocation();", "String locat...
[ "0.78600484", "0.7632479", "0.7632479", "0.7632479", "0.76294696", "0.7392585", "0.7392585", "0.7392585", "0.7392585", "0.72043914", "0.72043914", "0.72043914", "0.72043914", "0.72043914", "0.72043914", "0.72043914", "0.72043914", "0.70356894", "0.69718325", "0.6903147", "0.6...
0.0
-1
decode and returns the cipher text
public String decode(String cipherText){ String decodedMsg = cipherText; for(int i=0;i<n;i++) decodedMsg = reShuffle(decodedMsg); return decodedMsg; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String decrypt(String cipherText);", "public String decode(String cipherText)\n\t{\n\t\tthis.decoding(cipherText);\n\t\treturn this.decodedText;\n\t}", "public String decode(String cipher)\n {\n \treturn null;\n }", "private String decodageCesar(String text) {\n if (text == null || tex...
[ "0.7540695", "0.7379062", "0.7315312", "0.7009949", "0.69991297", "0.69644666", "0.69455653", "0.68774927", "0.67651325", "0.6703227", "0.6637114", "0.6629328", "0.6547045", "0.6539778", "0.65276366", "0.6445302", "0.642872", "0.6403018", "0.63944817", "0.6377514", "0.6363885...
0.72238654
3
Initializes a new IVFMediaDevice instance which will read the IVF file located at filename.
public IVFMediaDevice(String filename) { super(new CaptureDeviceInfo( filename, new MediaLocator("ivffile:"+filename), IVFMediaDevice.SUPPORTED_FORMATS), MediaType.VIDEO); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public FlashCardReader(String filename)\n\t{\t\n\t\ttry\n\t\t{\n\t\t\tFileReader freader = new FileReader(filename);\n\t\t\treader = new BufferedReader(freader);\n\t\t} catch(FileNotFoundException fnfe)\n\t\t{\n\t\t\tSystem.out.println(\"File not found!\");\n\t\t\tnotFound = true;\n\t\t}\n\t}", "public ObjReader...
[ "0.6295753", "0.61930144", "0.617228", "0.6113452", "0.60420746", "0.59135467", "0.5903504", "0.560521", "0.55993533", "0.5585009", "0.54927105", "0.547112", "0.54700214", "0.54536414", "0.54105484", "0.5323132", "0.53104895", "0.529884", "0.529726", "0.52904516", "0.52882886...
0.7534981
0
3. If your task shall contain other tasks as nested elements (like parallel), your class must implement the interface org.apache.tools.ant.TaskContainer. If you do so, your task can not support any other nested elements. See below. 4. If the task should support character data (text nested between the start end end tags), write a public void addText(String) method. Note that Ant does not expand properties on the text it passes to the task. 5. For each nested element, write a create, add or addConfigured method. A create method must be a public method that takes no arguments and returns an Object type. The name of the create method must begin with create, followed by the element name. An add (or addConfigured) method must be a public void method that takes a single argument of an Object type with a noargument constructor. The name of the add (addConfigured) method must begin with add (addConfigured), followed by the element name. For a more complete discussion see below. 6. Write a public void execute method, with no arguments, that throws a BuildException. This method implements the task itself.
@Override public void execute() throws BuildException { AbstractGenerator g; if (kind == null) { throw new BuildException("kind was not specified"); } final String k = kind.getValue(); if (k.equals(INTERFACE)) { g = new InterfaceGen(); } else if (k.equals(CRYSTAL)) { g = new CrystalGen(); } else if (k.equals(OPERATOR)) { g = new OperatorGen(); } else { throw new BuildException("Unknown kind was specified: "+kind); } if (dest != null) { srcs.add(0, "-out"); srcs.add(1, dest); } g.generate(srcs.toArray(new String[srcs.size()])); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void executeTask(org.apache.ant.common.antlib.Task task) throws org.apache.ant.common.util.ExecutionException;", "public Ant(Task owner) {\n bindToOwner(owner);\n }", "private void parseElementForTaskdefs(Element element)\n {\n for (Iterator targetsIterator = element.getDescendants(new ElementF...
[ "0.6424204", "0.62016", "0.6193063", "0.6063075", "0.58771133", "0.5850593", "0.58283174", "0.57011706", "0.5613786", "0.5607395", "0.5607395", "0.5605378", "0.55864114", "0.5562381", "0.55518514", "0.55497026", "0.5522495", "0.5514564", "0.55141014", "0.5479941", "0.5443491"...
0.0
-1
do nothing and blindly accept the certificate
@Override public void checkClientTrusted( final java.security.cert.X509Certificate[] arg0, final String arg1) throws CertificateException { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void handleSSLCertificate() throws Exception {\n\t\tTrustManager[] trustAllCerts = new TrustManager[] { new X509TrustManager() {\n\t\t\tpublic X509Certificate[] getAcceptedIssuers() {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\tpublic void checkClientTrusted(X509Certificate[] certs,\n\t\t\t\t\tString au...
[ "0.6796998", "0.67399377", "0.6629579", "0.6623527", "0.6609397", "0.6300333", "0.6221797", "0.61934024", "0.6188042", "0.613015", "0.6085663", "0.60161024", "0.60161024", "0.5984876", "0.597815", "0.59736997", "0.5937553", "0.5900474", "0.58279943", "0.58155465", "0.58145577...
0.6048018
11
do nothing and blindly accept the server
@Override public void checkServerTrusted( final java.security.cert.X509Certificate[] arg0, final String arg1) throws CertificateException { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void msgNoServerConnection() {\r\n\thandler.sendEmptyMessage(1); // enviar error al cargar\r\n }", "void startListening()\n {\n if (outstanding_accept != null || open_connection != null) {\n return;\n }\n \n outstanding_accept = new AcceptThread(bt_adapter, hand...
[ "0.63196605", "0.6129354", "0.6028786", "0.59989387", "0.59835523", "0.59795415", "0.59478974", "0.594703", "0.59131587", "0.5907517", "0.58932877", "0.5888299", "0.5881217", "0.5814166", "0.58009803", "0.5786644", "0.5769076", "0.5768912", "0.5768139", "0.5749828", "0.574013...
0.0
-1
add a child to the current node
public void addChildNode(TreeNode treeNode) { initChildList(); childList.add(treeNode); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addChild(Node child){\n children.add(child);\n }", "public abstract void addChild(Node node);", "@Override\n public void childAdded(Node child) {\n }", "public void addChild(Node child)\n\t{\n\t\tchild.parent = this;\n\t\t//if (!children.contains(child))\n\t\t//{\t\n\t\tchildren.a...
[ "0.7861205", "0.7550087", "0.7460716", "0.74600947", "0.74214816", "0.74210477", "0.7402519", "0.73965377", "0.7388908", "0.7385921", "0.7361007", "0.73604506", "0.73033917", "0.7283496", "0.7282507", "0.72756356", "0.72756356", "0.72756356", "0.72756356", "0.72756356", "0.72...
0.6096811
96
initialize the children list
private void initChildList() { if (childList == null) { childList = new ArrayList<>(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void init$Children() {\n }", "public void init$Children() {\n }", "public void init$Children() {\n }", "public void init$Children() {\n children = new ASTNode[3];\n setChild(new List(), 1);\n setChild(new List(), 2);\n }", "public void init$Children() {\n children = new ASTNode[2];\n...
[ "0.811518", "0.811518", "0.811518", "0.7964351", "0.7867116", "0.77047276", "0.7513181", "0.6842444", "0.6755835", "0.67530227", "0.6624845", "0.6604585", "0.65250933", "0.6481602", "0.63919973", "0.63822806", "0.6376085", "0.63161415", "0.6309728", "0.6259366", "0.6238618", ...
0.83902895
0
delete the current node
public void deleteNode() { TreeNode pNode = this.getParentNode(); int id = this.getSelfId(); if (pNode != null) { pNode.deleteChildNode(id); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void delete() {\n this.root = null;\n }", "private void delete(Node next) {\n\t\t\n\t}", "public void delete() {\n\t\t// pre: length>0\n\t\t// post: delete one node from the end; reduce length\n\t\tif (this.length > 0) {\n\t\t\tCLL_LinkNode temp_node = this.headNode ;\n\t\t\tfor (int i = 1; i ...
[ "0.7561701", "0.7560645", "0.725196", "0.72227484", "0.7095155", "0.7024002", "0.69576263", "0.6873153", "0.6809321", "0.68062603", "0.6800649", "0.6795114", "0.677177", "0.67692924", "0.6768739", "0.67569995", "0.6737962", "0.6736329", "0.6732828", "0.6708458", "0.66850394",...
0.7568231
0
delete a certain child of current node
public void deleteChildNode(int childId) { List<TreeNode> cList = this.getChildList(); int childNumber = cList.size(); for (int i = 0; i < childNumber; i++) { TreeNode child = cList.get(i); if (child.getSelfId() == childId) { cList.remove(i); return; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract void removeChild(Node node);", "public void removeChild(WSLNode node) {children.removeElement(node);}", "void removeChild(Object child);", "@DISPID(2)\n\t// = 0x2. The runtime will prefer the VTID if present\n\t@VTID(8)\n\tvoid removeChild(@MarshalAs(NativeType.VARIANT) java.lang.Object node)...
[ "0.78555214", "0.7362956", "0.7324121", "0.7312327", "0.73115516", "0.7292489", "0.7101382", "0.70263815", "0.70055974", "0.69632703", "0.6931831", "0.68438333", "0.676354", "0.670464", "0.6673229", "0.6622554", "0.6601253", "0.65729094", "0.6548208", "0.6529548", "0.6503971"...
0.653103
19
insert a node in this tree
public boolean insertJuniorNode(TreeNode treeNode) { int juniorParentId = treeNode.getParentId(); if (this.parentId == juniorParentId) { addChildNode(treeNode); return true; } else { List<TreeNode> cList = this.getChildList(); boolean insertFlag; for (TreeNode childNode : cList) { insertFlag = childNode.insertJuniorNode(treeNode); if (insertFlag) { return true; } } return false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void insert(Node n);", "private void insertNodeIntoTree(Node node) {\n\t\troot = insert(root,node);\t\n\t}", "public void insert(HuffmanTree node);", "@Override\n\tpublic void insert(Node node) {\n\t\tchildren.add(node);\n\t}", "public void insertnode ()\n\t// insert an empty node\n\t{\n\t\tif (Pos....
[ "0.8316435", "0.8053654", "0.7985994", "0.7638823", "0.7544162", "0.7434137", "0.74185026", "0.74005145", "0.73996365", "0.7375583", "0.7324594", "0.732271", "0.7320579", "0.7278632", "0.72422516", "0.72152054", "0.7210151", "0.7193864", "0.7101066", "0.70926666", "0.70835686...
0.0
-1
find a certain node
public TreeNode findTreeNodeById(int id) { if (this.selfId == id) { return this; } if (childList.isEmpty()) {//check return null; } else { for (TreeNode child : childList) { TreeNode resultNode = child.findTreeNodeById(id); if (resultNode != null) { return resultNode; } } return null; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public MyNode findMyNode(Node node){\r\n\t\treturn nodesMap.get(node);\r\n\t}", "private Node searchNode(int id) {\n\t\tNode node = searchRec(root,id);\n\t\treturn node;\n\t}", "private BinaryNode<E> _findNode(BinaryNode<E> node, E e) {\n\t\tif (node == null)\n\t\t\treturn null;\n\t\telse if (comparator.compar...
[ "0.6984573", "0.67827064", "0.67067575", "0.67064416", "0.67038417", "0.6692046", "0.668936", "0.6669407", "0.6666579", "0.66635805", "0.6637084", "0.6633334", "0.65974176", "0.6593358", "0.65520394", "0.6506138", "0.64963114", "0.6492743", "0.6470544", "0.645812", "0.6456348...
0.0
-1
Created by rkrde on 07112016.
public interface MediaColumns { @DataType(INTEGER) @PrimaryKey String _ID = "_id"; @DataType(TEXT) String _PATH = "_path"; @DataType(TEXT) String _URL = "_url"; @DataType(INTEGER) String _UPLOAD_STATUS = "_upload_status"; @DataType(INTEGER) String _FROM_KINVEY = "_from_kinvey"; //1 & 0 @DataType(INTEGER) String _DOWN_STATUS = "_down_status"; //1 & 0 @DataType(TEXT) String _KINVEY_ID = "_kinvey_id"; @DataType(INTEGER) @NotNull //0:image & 1 : video String _MEDIA_TYPE = "_media_type"; // upload_status - fail(0),uploading(1),uploaded(2) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public final void mo51373a() {\n }", "@Override\n public void func_104112_b() {\n \n }", "private stendhal() {\n\t}", "@Override\n public void perish() {\n \n }", "protected boolean func_70814_o() { return true; }", "private void m50366E() {\n }", "public void mo3811...
[ "0.5845927", "0.57823884", "0.5761227", "0.5748301", "0.5704675", "0.5690755", "0.567732", "0.56034875", "0.5559219", "0.5559075", "0.55476904", "0.5507529", "0.549688", "0.549494", "0.549494", "0.54763114", "0.5470951", "0.54684687", "0.54638624", "0.54545385", "0.54545385",...
0.0
-1
Get the font size.
float getFontSize() { if (!appearanceTokens.isEmpty()) { // daString looks like "BMC /Helv 3.4 Tf EMC" // use the fontsize of the default existing apperance stream int fontIndex = appearanceTokens.indexOf(Operator.getOperator("Tf")); if (fontIndex != -1) { return ((COSNumber) appearanceTokens.get(fontIndex - 1)).floatValue(); } } return 0f; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getFontSize();", "public double getFontSize(\n )\n {return fontSize;}", "public float getFontSize();", "public final int getFontSize() {\n return fontSize;\n }", "public String getFontSize () {\n\t\treturn fontSizeTextField.getText();\n\t}", "public String getFontSizeText()\r...
[ "0.81372833", "0.81147605", "0.8086911", "0.80429316", "0.80144227", "0.8005919", "0.77974534", "0.77799606", "0.7741614", "0.7695468", "0.7670454", "0.75978845", "0.74640375", "0.74344003", "0.7425047", "0.7400255", "0.72938514", "0.72631407", "0.723868", "0.7214588", "0.715...
0.71404487
21
Set the font size.
void setFontSize(float fontSize) { int fontIndex = appearanceTokens.indexOf(Operator.getOperator("Tf")); if (fontIndex != -1) { appearanceTokens.set(fontIndex - 1, new COSFloat(fontSize)); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setFontSize(int fontSize) {\n this.fontSize = fontSize;\n updateLineHeight();\n updateCursor();\n update();\n }", "public void setFontSize(int fontSize)\r\n {\r\n myFontSize = fontSize;\r\n }", "public void setFontSize(int fontSize) {\r\n ...
[ "0.77485615", "0.76967186", "0.7680486", "0.76781905", "0.7671704", "0.7659534", "0.75527614", "0.74848217", "0.74770695", "0.742097", "0.7416762", "0.7401965", "0.73631716", "0.73398715", "0.7272836", "0.7260555", "0.7226023", "0.720268", "0.7115543", "0.7072515", "0.7029026...
0.69206786
28
Get the font name.
COSName getFontName() { int setFontOperatorIndex = appearanceTokens.indexOf(Operator.getOperator("Tf")); return (COSName) appearanceTokens.get(setFontOperatorIndex - 2); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getName() {\n return fontName;\n }", "public String getFontName() {\n Object value = library.getObject(entries, FONT_NAME);\n if (value instanceof Name) {\n return ((Name) value).getName();\n }\n return FONT_NAME;\n }", "public String fontName()...
[ "0.8635158", "0.8564473", "0.8428974", "0.83735234", "0.7972498", "0.79336166", "0.79309106", "0.79217005", "0.77863955", "0.77863955", "0.77863955", "0.76542735", "0.7612738", "0.7579355", "0.75047755", "0.7458595", "0.74238884", "0.74084306", "0.7341451", "0.7294613", "0.72...
0.7425634
16
Get the tokens resolved from the default appearance string.
List<Object> getTokens() { return appearanceTokens; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "List<String> getTokens();", "public String[] getDefaults();", "Map<String, String> getTokens();", "public abstract String[] getDefaultValues();", "public interface UATokenizerConstants {\n\n /** End of File. */\n int EOF = 0;\n /** RegularExpression Id. */\n int WHITESPACE = 1;\n /** RegularExpression...
[ "0.5727326", "0.55574864", "0.53724504", "0.52418417", "0.5067315", "0.49975482", "0.49713764", "0.49668238", "0.49238062", "0.49184063", "0.49009448", "0.48868823", "0.48576334", "0.48574167", "0.48336443", "0.48229507", "0.47990587", "0.4797499", "0.4797499", "0.4797499", "...
0.5831263
0
Constructor set the different image from src/Avertissement/
public ImagePanel() { try { this.image.add(ImageIO.read(new File(this.getClass().getResource("/Avertissement/frigorest.png").getPath()))); this.image.add(ImageIO.read(new File(this.getClass().getResource("/Avertissement/frigono.png").getPath()))); this.image.add(ImageIO.read(new File(this.getClass().getResource("/Avertissement/frigolow.png").getPath()))); this.image.add(ImageIO.read(new File(this.getClass().getResource("/Avertissement/frigohigh.png").getPath()))); this.image.add(ImageIO.read(new File(this.getClass().getResource("/Avertissement/frigocondensation.png").getPath()))); } catch (Exception e) { e.printStackTrace(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Mesita()\r\n {\r\n super(\"mesa.png\"); \r\n }", "public void setImageView() {\n \timage = new Image(\"/Model/boss3.png\", true);\n \tboss = new ImageView(image); \n }", "@Override\n\tpublic void init() {\n\t\tthis.image = Helper.getImageFromAssets(AssetConstants.IMG_ROAD_NORMA...
[ "0.71813715", "0.68120384", "0.67878115", "0.6778938", "0.66400576", "0.65847003", "0.6583563", "0.65326697", "0.6504366", "0.6488603", "0.6469712", "0.646589", "0.64308965", "0.6425159", "0.6420094", "0.64004254", "0.6400082", "0.63592213", "0.6357065", "0.6349981", "0.63494...
0.6829909
1
/ tests if the Looper for the current thread has been prepared, If not, it makes one, prepares it and returns it. If this returns nonnull, the caller is reponsible for calling quit() on the returned Looper.
private Looper prepareIfNeededLooper() { // non-null Handler Looper myLooper = null; if (Looper.myLooper() == null) { Looper.prepare(); myLooper = Looper.myLooper(); assertNotNull(myLooper); } return myLooper; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void onLooperPrepared() {\n super.onLooperPrepared();\n FrameConsumer.this.f41223d = new Handler(getLooper(), FrameConsumer.this);\n if (!FrameConsumer.this.f41225f) {\n FrameConsumer.this.m57235e();\n }\n }", "publi...
[ "0.6091212", "0.54046917", "0.5295328", "0.482055", "0.46392667", "0.45986018", "0.45446578", "0.45023957", "0.44916025", "0.44872564", "0.4429277", "0.440044", "0.43281916", "0.43235213", "0.42976722", "0.4296292", "0.4271448", "0.4235583", "0.42052585", "0.41356108", "0.411...
0.7618987
0
TODO Autogenerated method stub
@Override public int compare(String o1, String o2) { if ((Double.parseDouble(o1)-Double.parseDouble(o2))>0) { return 1; } else if ((Double.parseDouble(o1)-Double.parseDouble(o2))<0) { return -1; } else { return 0; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
TODO Autogenerated method stub
@Override public int compare(Entry<Integer, Double> o1, Entry<Integer, Double> o2) { if ((o1.getValue()-o2.getValue())>0) { return 1; } else if ((o1.getValue()-o2.getValue())<0) { return -1; } else { return 0; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
int ss = 0;
public static void classfy(ArrayList<ArrayList<String>> dataset ,ArrayList<ArrayList<String>> testData,int k) { int index = 0; int count = 0; for (ArrayList<String> testItem : testData) { String str=getFeatureLabel(dataset, testItem, k); System.out.println(str); if (testItem.get((testData.get(0).size()-1)).equals(str)) { System.out.println("testItem"+index+"分类正确"); count ++; } else { System.out.println("testItem"+index+"分类错误"); } index ++; } System.out.println("正确率为"+count*1.0/testData.size()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int getSs();", "public int getSs() {\n return ss_;\n }", "public int getSs() {\n return ss_;\n }", "public int getSsNum() {\n return ssNum;\n }", "private void ss(){\n }", "private int getSSN (){\n return ssn;\n }", "int getCurrentXOfSS();", "@Override\r\n\t...
[ "0.7174108", "0.6825246", "0.66440254", "0.6382592", "0.6288003", "0.6268869", "0.6230692", "0.61488944", "0.5859647", "0.582807", "0.5788418", "0.5744879", "0.57444406", "0.57067853", "0.57054806", "0.5686333", "0.556186", "0.554399", "0.54812974", "0.54812974", "0.54812974"...
0.0
-1
TODO Autogenerated method stub
public static void main(String[] args) { try { int [] a=new int[2]; a[0]=10; a[1]=20; //a[2]=30; int i=1/0; } catch(Exception e) { System.out.println("alert: sorry something went wrong"); System.out.println(e.getLocalizedMessage()); } }
{ "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
Call to return the list of payers and their point balance
@RequestMapping("/getbalancepoints") public List<PayerPoints> getBalancePoints() { return getPayersPoints(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<PayerPoints> getPointsBalance(List<Payer> listPayer) {\n\t\tList<PayerPoints> listBalance = new ArrayList<>();\n\t\tfor (Payer i : listPayer) {\n\t\t\tPayerPoints payerpoints = new PayerPoints(i.getPayerName(), i.getPoints());\n\t\t\tlistBalance.add(payerpoints);\n\t\t}\n\t\treturn listBalance;\n\t}", ...
[ "0.76047045", "0.6698137", "0.6697749", "0.6528759", "0.6218181", "0.61049557", "0.6099468", "0.6099468", "0.60725516", "0.60462177", "0.60462177", "0.59973574", "0.59385145", "0.58927006", "0.58923644", "0.585933", "0.58156824", "0.577382", "0.5745256", "0.5733769", "0.57110...
0.718689
1
Call to add a transaction to an existing payer. If the payer doesn't have enough points, or don't exist, return null
@RequestMapping(value = "/addtransaction", method = RequestMethod.POST) public Transaction addTransaction(@ModelAttribute("payerName") String payerName, @ModelAttribute("transactionPoints") int points) { AddTransaction addNewtransaction = new AddTransaction(); Transaction transaction = null; try { transaction = addNewtransaction.addTransaction(payerName, points, LocalDateTime.now().format(formatter), list); if (transaction == null) LOGGER.info("Check if the payer exist and/or if the balance is lower than the points removed"); } catch (Exception e) { LOGGER.info(e.getMessage()); } return transaction; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addWallet(Wallet wallet);", "void addTransaction(Transaction transaction, long timestamp) throws TransactionNotInRangeException;", "Trade addTrade(String tradeId, Trade trade) throws OrderBookTradeException;", "void addTrade(Trade trade);", "private TransferPointRequest addTransferPointRequest(...
[ "0.5984267", "0.59726477", "0.5825348", "0.57414865", "0.57011193", "0.5625915", "0.56088614", "0.5593066", "0.55851936", "0.5584108", "0.55520993", "0.5548", "0.5543214", "0.55431736", "0.54740554", "0.5415643", "0.5412029", "0.5405216", "0.5398083", "0.53935546", "0.5374313...
0.7119132
0
Call to spend points using the payers' balance. If the payers don't have enough points, return empty list.
@RequestMapping(value = "/spendpoints", method = RequestMethod.POST) public List<PayerPoints> spendPointsPerOldest(@ModelAttribute("spendPointsValue") int points) { List<PayerPoints> listPayerPoints = new ArrayList<>(); try { List<Payer> listPayer = list; SpendPoints spend = new SpendPoints(); listPayerPoints = spend.spendPoints(points, listPayer); if (listPayerPoints.isEmpty()) LOGGER.info("Enter a lower value, the payers don't have enough points"); } catch (Exception e) { LOGGER.info(e.getMessage()); } return listPayerPoints; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<PointBalance> spendOverall(int points) {\n\t\tCollections.sort(transactionList);\n\t\tevenOut();\n\t\tpointsToSpend = points;\n\t\tList<PointBalance> listOfChanges = new ArrayList<>();\n\t\tfor (PointTransaction action: evenedOutList) {\n\t\t\tif (pointsToSpend <= 0) break;\n\t\t\tif (action.getPoints(...
[ "0.69825554", "0.6585955", "0.63213104", "0.6133779", "0.59464794", "0.58761734", "0.5655936", "0.56295544", "0.56221485", "0.55854076", "0.55457175", "0.5402412", "0.53872466", "0.53695464", "0.53115267", "0.52940196", "0.5259739", "0.5231233", "0.5226071", "0.5189419", "0.5...
0.68908644
1
Method to initialize a list of payer. We consider that the payers have to be manually added
public List<Payer> getPayers() { List<Payer> listPayer = new ArrayList<Payer>(); AddTransaction transaction = new AddTransaction(); Payer payer1 = new Payer(); payer1.setPayerName("DANNON"); listPayer.add(payer1); Payer payer2 = new Payer(); payer2.setPayerName("UNILEVER"); listPayer.add(payer2); Payer payer3 = new Payer(); payer3.setPayerName("MILLER COORS"); listPayer.add(payer3); transaction.addTransaction("DANNON", 1000, LocalDateTime.parse("2020-11-02T14:00:00").format(formatter), listPayer); transaction.addTransaction("UNILEVER", 200, LocalDateTime.parse("2020-10-31T11:00:00").format(formatter), listPayer); transaction.addTransaction("DANNON", -200, LocalDateTime.parse("2020-10-31T15:00:00").format(formatter), listPayer); transaction.addTransaction("MILLER COORS", 10000, LocalDateTime.parse("2020-11-01T14:00:00").format(formatter), listPayer); transaction.addTransaction("DANNON", 300, LocalDateTime.parse("2020-10-31T10:00:00").format(formatter), listPayer); return listPayer; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void initialize() {\r\n\t\tfor (iPhone iphone : iphoneList) {\r\n\t\t\tadd(iphone);\r\n\t\t}\r\n\t}", "public void creatList()\n\t{\n\t\tbowlers.add(new Bowler(\"A\",44));\n\t\tbowlers.add(new Bowler(\"B\",25));\n\t\tbowlers.add(new Bowler(\"C\",2));\n\t\tbowlers.add(new Bowler(\"D\",10));\n\t\tbowlers.ad...
[ "0.5728719", "0.5674438", "0.562304", "0.5610033", "0.55727476", "0.5535296", "0.5534215", "0.55048096", "0.54964644", "0.5483927", "0.5362655", "0.5349654", "0.5325671", "0.53204757", "0.5318058", "0.5314224", "0.530237", "0.52775735", "0.5269822", "0.5260892", "0.5254276", ...
0.6029998
0
Method to return the list of payers and their point balance
public List<PayerPoints> getPointsBalance(List<Payer> listPayer) { List<PayerPoints> listBalance = new ArrayList<>(); for (Payer i : listPayer) { PayerPoints payerpoints = new PayerPoints(i.getPayerName(), i.getPoints()); listBalance.add(payerpoints); } return listBalance; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@RequestMapping(\"/getbalancepoints\")\n\tpublic List<PayerPoints> getBalancePoints() {\n\t\treturn getPayersPoints();\n\t}", "public List<Payer> getPayers() {\n\t\tList<Payer> listPayer = new ArrayList<Payer>();\n\t\tAddTransaction transaction = new AddTransaction();\n\t\tPayer payer1 = new Payer();\n\t\tpayer1...
[ "0.7373769", "0.6886185", "0.66345763", "0.65035444", "0.6288649", "0.61992073", "0.61402845", "0.61402845", "0.61327344", "0.60870653", "0.60019755", "0.60019755", "0.59744525", "0.58842427", "0.5870141", "0.5866733", "0.58631074", "0.5831018", "0.58298963", "0.5802363", "0....
0.78547776
0
TODO: Warning this method won't work in the case the id fields are not set
@Override public boolean equals(Object object) { if (!(object instanceof Project)) { return false; } Project other = (Project) object; if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) { return false; } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void setId(Integer id) { this.id = id; }", "private Integer getId() { return this.id; }", "public void setId(int id){ this.id = id; }", "public void setId(Long id) {this.id = id;}", "public void setId(Long id) {this.id = id;}", "public void setID(String idIn) {this.id = idIn;}", "public void se...
[ "0.6896886", "0.6838461", "0.67056817", "0.66419715", "0.66419715", "0.6592331", "0.6579151", "0.6579151", "0.6574321", "0.6574321", "0.6574321", "0.6574321", "0.6574321", "0.6574321", "0.65624106", "0.65624106", "0.65441847", "0.65243006", "0.65154546", "0.6487427", "0.64778...
0.0
-1
TODO Autogenerated method stub
public static void main(String[] args) { int a = 100; Integer b = a;//autoboxing int c=b.intValue();//unboxing System.out.println(a); System.out.println(b); System.out.println(c); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
Inflate the menu; this adds items to the action bar if it is present.
@Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.menu_main, menu); return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tMenuInflater inflater = getMenuInflater();\n \tinflater.inflate(R.menu.main_activity_actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {...
[ "0.7246102", "0.7201358", "0.7194834", "0.7176498", "0.71066517", "0.7039537", "0.7037961", "0.70112145", "0.70094734", "0.69807225", "0.6944953", "0.69389373", "0.6933199", "0.6916928", "0.6916928", "0.6891486", "0.68831646", "0.68754137", "0.68745375", "0.68621665", "0.6862...
0.0
-1
Handle action bar item clicks here. The action bar will automatically handle clicks on the Home/Up button, so long as you specify a parent activity in AndroidManifest.xml.
@Override public boolean onOptionsItemSelected(MenuItem item) { int id = item.getItemId(); //noinspection SimplifiableIfStatement if (id == R.id.action_settings) { return true; } return super.onOptionsItemSelected(item); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean onOptionsItemSelected(MenuItem item) { Handle action bar item clicks here. The action bar will\n // automatically handle clicks on the Home/Up button, so long\n // as you specify a parent activity in AndroidManifest.xml.\n\n //\n // HANDLE BACK BUTTON\n ...
[ "0.79042757", "0.7805287", "0.7766401", "0.7727273", "0.7631789", "0.76227075", "0.75850916", "0.75309587", "0.74881005", "0.74574566", "0.74574566", "0.7438689", "0.74217546", "0.7403555", "0.73919356", "0.738709", "0.7379311", "0.73706394", "0.73631936", "0.7356187", "0.734...
0.0
-1
Getting UserCertificateSource singleton instance
@Override protected void afterHookedMethod(MethodHookParam param) throws Throwable { Class cUserCeritificateSource = Class.forName("android.security.net.config.UserCertificateSource"); Object iUserCeritificateSource = cUserCeritificateSource.getDeclaredMethod("getInstance").invoke(null); //Creating new CertificatesEntryRef with UserCertificateSource instance as source Class cCertificatesEntryRef = Class.forName("android.security.net.config.CertificatesEntryRef"); Object iCertificatesEntryRef = cCertificatesEntryRef.getConstructor(Class.forName("android.security.net.config.CertificateSource"), boolean.class).newInstance(iUserCeritificateSource, true); //Injecting that CertificatesEntryRef entry into NetworkSecurityConfig.Builder, so we'll always have UserCertificateSource as root certificates source Class cNetworkSecurityConfigBuilder = Class.forName("android.security.net.config.NetworkSecurityConfig$Builder"); cNetworkSecurityConfigBuilder.getDeclaredMethod("addCertificatesEntryRef", cCertificatesEntryRef).invoke(param.thisObject, iCertificatesEntryRef); Log.d("Eris", "Injected into " + lpparam.packageName); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public X509Certificate getCertificate();", "public SingleCertificateResolver(X509Certificate paramX509Certificate) {\n/* 45 */ this.certificate = paramX509Certificate;\n/* */ }", "String getCertificate();", "public BaseHttpXCapClient()\n {\n ServiceReference guiVerifyReference\n ...
[ "0.6068667", "0.5717458", "0.56712735", "0.5566175", "0.5433532", "0.5398648", "0.53546727", "0.5321515", "0.5314003", "0.5247188", "0.5218598", "0.51836073", "0.51679265", "0.51585644", "0.5152303", "0.5141186", "0.51410997", "0.5113827", "0.506482", "0.5058195", "0.50487", ...
0.0
-1
/ ask if there are new malicious IPs or patterns
private void update_memories() { server.MaliciousPatterns mpat = null; try { mpat = MainClass.get_server().maliciousPatternRequest(Register.get_nodeID()); } catch (RemoteException e) { e.printStackTrace(); } if (mpat == null) { return; } if (mpat.isIsDeleted() == true) { /* node is deleted by admin, exit program */ System.out.println("\nATTENTION: This node was deleted from the administrator of the network!"); System.out.println("Forcing exit...\n"); System.out.println("____________________________________________________________________________________________________"); System.exit(1); /* exit program */ } String[] update_ips = mpat.getMal_ips(); String[] update_patterns = mpat.getMal_patterns(); if (update_ips != null) { /* there are updates in malicious IPs */ System.out.println(); for (String ip : update_ips) { MPSM_IP.add_IP(ip); System.out.println("IP " + ip + " is malicious!"); } } if (update_patterns != null) { /* there are updates in malicious patterns */ System.out.println(); for (String pattern : update_patterns) { MPSM_Pattern.add_Pattern(pattern); System.out.println("Pattern " + pattern + " is malicious!"); } System.out.println(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean hasIp();", "boolean hasIp();", "boolean hasIp();", "boolean hasIp();", "private boolean validate(final String ip){\t\t \n \t Pattern pattern = Pattern.compile(IPADDRESS_PATTERN);\n\t Matcher matcher = pattern.matcher(ip);\n\t return matcher.matches();\t \t \n }", "static boolean val...
[ "0.6046624", "0.6046624", "0.6046624", "0.6046624", "0.5776117", "0.56452185", "0.5628956", "0.56063956", "0.5527737", "0.5452841", "0.5448084", "0.54046714", "0.53756773", "0.53751284", "0.5360695", "0.531774", "0.5288732", "0.5260032", "0.52379024", "0.5219939", "0.5202377"...
0.58367103
4
/ Loop through IPV6 Addresses and IPV4 Address, and connect them.
Socket createSocket(String host, int port, int timeoutMillis) throws IOException { InetAddress addresses[]; InetAddress addr; InetSocketAddress sockAddr; Socket s = null; addresses = InetAddress.getAllByName(host); InetAddress[] picks = new InetAddress[2]; int numPicks = 0; for (int i=0; i<addresses.length; i++) { addr = addresses[i]; if ((addr instanceof Inet6Address)) { picks[numPicks++] = addr; break; } } for (int i=0; i<addresses.length; i++) { addr = addresses[i]; if ((addr instanceof Inet4Address)) { picks[numPicks++] = addr; break; } } for (int i=0; i<numPicks; i++) { addr = picks[i]; s = new Socket(); // before connect() for TCP Window Scaling to be turned on setBuffers(s); sockAddr = new InetSocketAddress(addr, port); try { s.connect(sockAddr,timeoutMillis); break; } catch (IOException e) { s.close(); s = null; if (i == numPicks - 1) throw e; } } if (s == null) throw new IOException("No supported IP address found"); return s; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void ipv6() throws IOException {\n\t\t InetAddress src = InetAddress.getByName(\"127.0.0.1\");\n\t\t byte[] ipv4Src = src.getAddress();\n\t\t InetAddress dest = InetAddress.getByName(\"18.221.102.182\");\n\t\t byte[] ipv4Dest = dest.getAddress();\n\t\t \n\t\tbyte[] srcAddr = {0, 0, 0, 0, 0, 0, 0, 0,...
[ "0.6517124", "0.64529306", "0.60391384", "0.60139203", "0.59929967", "0.5851413", "0.58458644", "0.577659", "0.5748283", "0.56833947", "0.56729513", "0.56455773", "0.5606495", "0.5588391", "0.5578193", "0.55428386", "0.55374944", "0.5506084", "0.54890376", "0.54561836", "0.54...
0.0
-1
Load online database, this takes all bookings that are awaiting dispatch and downloads them locally run on a the main thread.
public static void start(){ bRef.addChildEventListener(new ChildEventListener() { @Override public void onChildAdded(DataSnapshot dataSnapshot, String s) { Platform.runLater(() -> { LoadOnlineDatabase load = new LoadOnlineDatabase(); load.loadBookings(); MainController m = new MainController(); m.refreshBookingNo(); }); // Must run on FX thread - otherwise throws exception but still functions well either way ? weird } /** * Whenever a booking has values changed on the database this method is run, * the booking will be updated locally to match its values on the database. * @param dataSnapshot the booking that has changed * @param s */ @Override public void onChildChanged(DataSnapshot dataSnapshot, String s) { Platform.runLater(() -> { LoadBookingChange load = new LoadBookingChange(); // System.out.println("UPDATING BOOKING: "+Integer.parseInt(dataSnapshot.getKey())); load.loadBookingChange(Integer.parseInt(dataSnapshot.getKey())); }); } /** * When a booking is removed from the online database this method will remove it locally, * * ConcurrentModificationException may be thrown if this is run straight after * application has been launched * @param dataSnapshot */ @Override public void onChildRemoved(DataSnapshot dataSnapshot) { int removedBooking = Integer.parseInt(dataSnapshot.getKey()); try { ObservableLists.bookingsList.forEach(b -> { if(b.getBookingNumber() == removedBooking){ ObservableLists.bookingsList.remove(b); } }); } catch (ConcurrentModificationException ex){ //This occurs because I am removing an from a list while I am iterating through that list //functions properly and works well however if I have time I will look at alternative ways } } @Override public void onChildMoved(DataSnapshot dataSnapshot, String s) { //Do nothing } @Override public void onCancelled(FirebaseError firebaseError) { //If internet connection cut - maybe wait for 1 minute and try again? } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public LogbookEntry loadInBackground() {\n this.database = this.databaseSchemaHelper.getReadableDatabase();\n return SchemaQueries.getLogbook(this.database);\n }", "private void loadDatabase() {\n Runnable load = new Runnable() {\n public void run() {\n ...
[ "0.66245425", "0.6291838", "0.61683476", "0.61662143", "0.61393774", "0.60767883", "0.58572054", "0.5815216", "0.5794337", "0.57517797", "0.56752586", "0.56537783", "0.56076044", "0.5605587", "0.55513173", "0.5524621", "0.5485217", "0.54771143", "0.54609567", "0.5452524", "0....
0.51576155
55
Whenever a booking has values changed on the database this method is run, the booking will be updated locally to match its values on the database.
@Override public void onChildChanged(DataSnapshot dataSnapshot, String s) { Platform.runLater(() -> { LoadBookingChange load = new LoadBookingChange(); // System.out.println("UPDATING BOOKING: "+Integer.parseInt(dataSnapshot.getKey())); load.loadBookingChange(Integer.parseInt(dataSnapshot.getKey())); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void update() {\n\t\trl = DBManager.getReservationList();\n\t}", "public void setMyRoomReservationOK() throws SQLException{\n int guestID = guest[guestIndex].getAccountID();\n int selRoomCount = getSelectedRoomsCounter();\n int[] tempRooms = getGuestSelRooms(); //Selected room by ro...
[ "0.6523958", "0.6441164", "0.6402398", "0.6201164", "0.6015389", "0.6013191", "0.60076445", "0.59724116", "0.59662664", "0.5939351", "0.59233874", "0.59107614", "0.58608806", "0.5828683", "0.58230966", "0.5787681", "0.5785595", "0.5773718", "0.57693845", "0.57571703", "0.5753...
0.5686168
26
When a booking is removed from the online database this method will remove it locally, ConcurrentModificationException may be thrown if this is run straight after application has been launched
@Override public void onChildRemoved(DataSnapshot dataSnapshot) { int removedBooking = Integer.parseInt(dataSnapshot.getKey()); try { ObservableLists.bookingsList.forEach(b -> { if(b.getBookingNumber() == removedBooking){ ObservableLists.bookingsList.remove(b); } }); } catch (ConcurrentModificationException ex){ //This occurs because I am removing an from a list while I am iterating through that list //functions properly and works well however if I have time I will look at alternative ways } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void deleteBooking() \n {\n Scanner memberID=new Scanner(System.in);\n System.out.println(\"Please enter your member number: \");\n int memberId = memberID.nextInt();\n \n Member mem = sportsClub.searchMember(memberId);\n if(mem...
[ "0.6285461", "0.608813", "0.59318775", "0.58469343", "0.5741416", "0.5690928", "0.5666243", "0.564056", "0.56351286", "0.56290454", "0.56189656", "0.55901253", "0.55860025", "0.558037", "0.55134714", "0.550291", "0.54959536", "0.54915494", "0.54808104", "0.54751956", "0.54709...
0.6855747
0
If internet connection cut maybe wait for 1 minute and try again?
@Override public void onCancelled(FirebaseError firebaseError) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void waitToRetry()\n {\n final int sleepTime = 2000000;\n\n if (keepTrying)\n {\n try\n {\n Thread.sleep(sleepTime);\n }\n catch (Exception error)\n {\n log.error(\"Ignored exception from sleep - p...
[ "0.65328443", "0.6393403", "0.63688594", "0.62880915", "0.62823236", "0.62001324", "0.61616397", "0.61360353", "0.60734135", "0.606193", "0.60566145", "0.6051844", "0.60407114", "0.5981702", "0.5974311", "0.59466934", "0.5907925", "0.588338", "0.5882677", "0.5859758", "0.5859...
0.0
-1
Adds a booking to the database
public static void addBooking(BookingImpl b, String status){ Firebase bRefChild; if(!status.equals("new")){ //Dispatched Booking //Removes from Awaiting_Dispatch and puts in Dispatched bRefChild = dRef.child(status); bRef.child(b.getBookingNumber()+"").removeValue(); } else { bRefChild = bRef.child(b.getBookingNumber() + ""); } bRefChild.child("pickup").setValue(b.getPickUpAddress());// bRefChild.child("dropoff").setValue(b.getDropOffAddress());// bRefChild.child("name").setValue(b.getClientName());// bRefChild.child("time").setValue(b.getTime().toString()); bRefChild.child("comment").setValue(b.getComments());// bRefChild.child("tel").setValue(b.getClientTel());// bRefChild.child("email").setValue(b.getClientEmail());// bRefChild.child("booking_number").setValue(b.getBookingNumber());// bRefChild.child("account").setValue(Cash.getInstance().getId()); bRefChild.child("vehicle_type").setValue(b.getVehicleType()); bRefChild.child("no_passengers").setValue(b.getNoPassengers()); bRefChild.child("date").setValue(b.getDate()); try { bRefChild.child("time").setValue(new SimpleDateFormat("HH:mm").format(b.getTime())); } catch (IllegalArgumentException e){ // Always throws this exception - unsure why as it saves correctly. // Do nothing as it still writes to database as expected // Maybe need to look at different formats for time? } bRefChild.child("price").setValue(b.getPrice()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void insertBooking(Booking booking) throws SQLException, Exception;", "public void addBooking(Bookings b) {\n IController<Bookings> ic = new Controller<>();\n\n // Check whether the booking conflicts with another booking.\n for (Bookings booking : ic.readAll(Bookings.class)) {\n ...
[ "0.7662163", "0.76292837", "0.74239707", "0.7279475", "0.71170473", "0.7104075", "0.70613015", "0.6933296", "0.68635", "0.68576586", "0.6786424", "0.6709744", "0.6655364", "0.6632592", "0.6568763", "0.6554241", "0.6525159", "0.65214396", "0.65178424", "0.6420291", "0.64155805...
0.72147924
4
/ Find all files that we should parse and distinguish between consensuses, votes, and server descriptors.
public static void main(String[] args) throws IOException { SortedMap<String, File> consensuses = new TreeMap<String, File>(); SortedMap<String, File> descriptors = new TreeMap<String, File>(); SortedMap<String, File> votes = new TreeMap<String, File>(); Stack<File> files = new Stack<File>(); files.add(new File("descriptors")); while (!files.isEmpty()) { File file = files.pop(); String filename = file.getName(); if (file.isDirectory()) { files.addAll(Arrays.asList(file.listFiles())); } else if (filename.endsWith("-consensus")) { consensuses.put(filename, file); } else if (filename.endsWith("-votes")) { votes.put(filename, file); } else if (filename.endsWith("-serverdesc")) { descriptors.put(filename, file); } } System.out.println("We found " + consensuses.size() + " consensus files, " + votes.size() + " vote files, and " + descriptors.size() + " server descriptor files."); /* Parse consensuses in an outer loop and the referenced votes and * descriptors in inner loops. Write the results to disk as soon as * we can to avoid keeping many things in memory. */ SortedMap<String, String> bandwidthAuthorities = new TreeMap<String, String>(); bandwidthAuthorities.put("27B6B5996C426270A5C95488AA5BCEB6BCC86956", "ides"); bandwidthAuthorities.put("80550987E1D626E3EBA5E5E75A458DE0626D088C", "urras"); bandwidthAuthorities.put("D586D18309DED4CD6D57C18FDB97EFA96D330566", "moria1"); bandwidthAuthorities.put("ED03BB616EB2F60BEC80151114BB25CEF515B226", "gabelmoo"); bandwidthAuthorities.put("49015F787433103580E3B66A1707A00E60F2D15B", "maatuska"); BufferedWriter bw = new BufferedWriter(new FileWriter( "bandwidth-comparison.csv")); bw.write("validafter,fingerprint,nickname,category," + "descriptorbandwidth,consensusbandwidth"); for (String bandwidthAuthority : bandwidthAuthorities.values()) { bw.write("," + bandwidthAuthority + "bandwidth"); } bw.write("\n"); for (File consensusFile : consensuses.values()) { System.out.println("Parsing consensus " + consensusFile.getName()); BufferedReader brC = new BufferedReader(new FileReader( consensusFile)); String lastRLine = null, lastSLine = null; String consensusTimestamp = consensusFile.getName().substring(0, "YYYY-MM-DD-hh-mm-ss".length()); Map<String, Map<String, String>> measuredBandwidthsByDirSource = new HashMap<String, Map<String, String>>(); /* Parse votes first, if we have them, and extract measured * bandwidths. */ String votesFilename = consensusTimestamp + "-votes"; if (votes.containsKey(votesFilename)) { BufferedReader brV = new BufferedReader(new FileReader( votes.get(votesFilename))); String lineV; Map<String, String> measuredBandwidths = null; while ((lineV = brV.readLine()) != null) { if (lineV.startsWith("dir-source ")) { String dirSource = lineV.split(" ")[2]; measuredBandwidths = new HashMap<String, String>(); measuredBandwidthsByDirSource.put(dirSource, measuredBandwidths); } else if (lineV.startsWith("r ")) { lastRLine = lineV; } else if (lineV.startsWith("w ") && lineV.contains(" Measured=")) { String fingerprint = Hex.encodeHexString(Base64. decodeBase64(lastRLine.split(" ")[2] + "=")); String measuredBandwidth = lineV.substring(lineV.indexOf( " Measured=") + " Measured=".length()).split(" ")[0]; measuredBandwidths.put(fingerprint, measuredBandwidth); } } brV.close(); } /* Parse referenced server descriptors to learn about exit policies * and reported bandwidths. */ String descriptorsFilename = consensusTimestamp + "-serverdesc"; Map<String, String> parsedDescriptors = new HashMap<String, String>(); if (descriptors.containsKey(descriptorsFilename)) { BufferedReader brD = new BufferedReader(new FileReader( descriptors.get(descriptorsFilename))); Set<String> defaultRejects = new HashSet<String>(); /* Starting with 0.2.1.6-alpha, ports 465 and 587 were allowed * in the default exit policy again (and therefore removed * from the default reject lines). */ Set<String> optionalRejects = new HashSet<String>(); String lineD, address = null, fingerprint = null, descriptorBandwidth = null; boolean defaultPolicy = false, comparePolicies = true; while ((lineD = brD.readLine()) != null) { if (lineD.startsWith("router ")) { address = lineD.split(" ")[2]; defaultRejects.clear(); defaultRejects.addAll(Arrays.asList(("0.0.0.0/8:*," + "169.254.0.0/16:*,127.0.0.0/8:*,192.168.0.0/16:*," + "10.0.0.0/8:*,172.16.0.0/12:*,$IP:*,*:25,*:119," + "*:135-139,*:445,*:563,*:1214,*:4661-4666,*:6346-6429," + "*:6699,*:6881-6999").split(","))); optionalRejects.clear(); optionalRejects.addAll(Arrays.asList( "*:465,*:587".split(","))); fingerprint = null; descriptorBandwidth = null; defaultPolicy = false; comparePolicies = true; } else if (lineD.startsWith("opt fingerprint ") || lineD.startsWith("fingerprint ")) { fingerprint = lineD.substring(lineD.startsWith("opt ") ? "opt fingerprint".length() : "fingerprint".length()). replaceAll(" ", "").toLowerCase(); } else if (lineD.startsWith("bandwidth ")) { descriptorBandwidth = lineD.split(" ")[3]; } else if (lineD.startsWith("reject ") && comparePolicies) { String rejectPattern = lineD.substring("reject ". length()); if (defaultRejects.contains(rejectPattern)) { defaultRejects.remove(rejectPattern); } else if (optionalRejects.contains(rejectPattern)) { optionalRejects.remove(rejectPattern); } else if (rejectPattern.equals(address + ":*")) { defaultRejects.remove("$IP:*"); } else { comparePolicies = false; } } else if (lineD.startsWith("accept ") && comparePolicies) { if (defaultRejects.isEmpty() && lineD.equals("accept *:*")) { defaultPolicy = true; } comparePolicies = false; } else if (lineD.equals("router-signature")) { if (address != null && fingerprint != null && descriptorBandwidth != null) { parsedDescriptors.put(fingerprint, descriptorBandwidth + "," + (defaultPolicy ? "1" : "0")); } } } brD.close(); } /* Parse r, s, and w lines from the consensus. */ String lineC, validAfter = null; while ((lineC = brC.readLine()) != null) { if (lineC.startsWith("valid-after ")) { validAfter = lineC.substring("valid-after ".length()); } else if (lineC.startsWith("r ")) { lastRLine = lineC; } else if (lineC.startsWith("s ")) { lastSLine = lineC; } else if (lineC.startsWith("w ")) { String[] parts = lastRLine.split(" "); String nickname = parts[1]; String fingerprint = Hex.encodeHexString(Base64.decodeBase64( parts[2] + "=")); String descriptor = Hex.encodeHexString(Base64.decodeBase64( parts[3] + "=")); boolean exitFlag = lastSLine.contains(" Exit"); boolean guardFlag = lastSLine.contains(" Guard"); String consensusBandwidth = lineC.substring(lineC.indexOf( " Bandwidth=") + " Bandwidth=".length()).split(" ")[0]; /* Look up whether we parsed this descriptor before. */ boolean parsedDescriptor = false, defaultPolicy = false; String descriptorBandwidth = null; if (parsedDescriptors.containsKey(fingerprint)) { String parseResults = parsedDescriptors.get(fingerprint); parsedDescriptor = true; defaultPolicy = parseResults.endsWith("1"); descriptorBandwidth = parseResults.split(",")[0]; } /* Write everything we know about this relay to disk. */ String category = null; if (guardFlag && exitFlag && defaultPolicy) { category = "Guard & Exit (default policy)"; } else if (!guardFlag && exitFlag && defaultPolicy) { category = "Exit (default policy)"; } else if (guardFlag && exitFlag && !defaultPolicy) { category = "Guard & Exit (non-default policy)"; } else if (!guardFlag && exitFlag && !defaultPolicy) { category = "Exit (non-default policy)"; } else if (guardFlag && !exitFlag) { category = "Guard"; } else if (!guardFlag && !exitFlag) { category = "Middle"; } bw.write(validAfter + "," + fingerprint + "," + nickname + "," + category + "," + (parsedDescriptor ? descriptorBandwidth : "NA") + "," + consensusBandwidth); for (String bandwidthAuthority : bandwidthAuthorities.keySet()) { if (measuredBandwidthsByDirSource.containsKey( bandwidthAuthority) && measuredBandwidthsByDirSource.get( bandwidthAuthority).containsKey(fingerprint)) { bw.write("," + measuredBandwidthsByDirSource.get( bandwidthAuthority).get(fingerprint)); } else { bw.write(",NA"); } } bw.write("\n"); } } brC.close(); } bw.close(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void getPeerFiles(){\n\t\t\n\t\tFile[] files = new File(path).listFiles();\n\t\tfor (File file : files) {\n\t\t\tfileNames.add(file.getName());\n\t\t}\n\t\tSystem.out.println(\"Number of Files Registerd to the server - \"+fileNames.size());\n\t\tSystem.out.println(\"To search for file give command: get <Fil...
[ "0.63415337", "0.5856234", "0.57189924", "0.5694328", "0.5663663", "0.5636918", "0.5595127", "0.55705947", "0.5570054", "0.55603236", "0.55537456", "0.54935074", "0.546766", "0.545667", "0.54087436", "0.54008895", "0.53843105", "0.5374015", "0.5357078", "0.5355525", "0.534262...
0.6428411
0
Test create king dataset instance and output a couple of latency values
public static void main(String[] args) { KingDataset king = KingDataset.instance(); int interval=50; FrequencyTable table = new FrequencyTable(interval); for (int i=0; i<10000; i++) { int point = king.next() / 2; // IMPORTANT - King is RTT System.out.print(point + " "); table.addDataPoint(point); } System.out.println(); for (int i=0; i<1000; i+=interval) { System.out.println("[" + i + "-" + (i+interval) + "[ : " + table.getFrequency(i)); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testRun() {\n System.out.println(\"run\");\n FluorescenceImporter importer = null;\n try {\n FluorescenceFixture tf = new FluorescenceFixture();\n importer = new FluorescenceImporter(tf.testData());\n ProgressHandle ph = ProgressHa...
[ "0.58092475", "0.5540265", "0.5536447", "0.55303663", "0.5521632", "0.5460742", "0.5387774", "0.537882", "0.5349754", "0.5340959", "0.53406984", "0.5334007", "0.5281896", "0.52602214", "0.52472985", "0.52472246", "0.52452826", "0.52439284", "0.5240471", "0.52344024", "0.52237...
0.51387525
35
Creates (if necessary) and returns the singleton instance of the KingDataset
public static KingDataset instance() { if (instance == null) { instance = new KingDataset(); } return instance; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private KingDataset() {\r\n\t\tString filename = \"bin\" + File.separator + \"KingDataset.bin\";\r\n\t\t\r\n\t\t// Prepare our array based on the dataset filename\r\n\t\tvalues = new byte[(int)new File(filename).length()];\r\n\t\t\r\n\t\t// Read the king dataset\r\n\t\ttry {\r\n\t\t\tFileInputStream input = new Fi...
[ "0.67310905", "0.61902606", "0.5969829", "0.5823006", "0.57755345", "0.57720447", "0.57533324", "0.5745275", "0.57326293", "0.5718026", "0.57082605", "0.56894773", "0.5672859", "0.5670622", "0.56624156", "0.56579703", "0.5638449", "0.55376744", "0.55236727", "0.550681", "0.54...
0.8755048
0
Constructs the instance of the king dataset class and read the binary file
private KingDataset() { String filename = "bin" + File.separator + "KingDataset.bin"; // Prepare our array based on the dataset filename values = new byte[(int)new File(filename).length()]; // Read the king dataset try { FileInputStream input = new FileInputStream(filename); input.read(values); input.close(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public DataSet( int _height , int _width) throws FileNotFoundException {\n height = _height;\n width = _width;\n InitFile( \"src/com/algorithme/DataSet.txt\" );\n InitTargets();\n InitFeatures();\n System.out.println(\"Création de la DataSet\");\n }", "private void Bu...
[ "0.6262688", "0.60227746", "0.5943463", "0.5912206", "0.58736765", "0.58596677", "0.5783324", "0.57085764", "0.5704772", "0.57047284", "0.566693", "0.56525016", "0.56172067", "0.5611383", "0.55927896", "0.5566715", "0.5549246", "0.55489254", "0.55481446", "0.554424", "0.55330...
0.83402115
0
Generates the next random latency value by choosing between all King samples and adjusting to obtain the correct value.
public int next() { // Get a random value int index = random.nextInt(values.length); int byteValue = values[index] + 128; // For an unsigned value int value = byteValue * 3; // If byteValue = 255 (max), then choose between 765000 and 799993 if (byteValue == 255) { value += random.nextInt(800-765+1); } // Otherwise, choose between value and value + 2 (inc) else { value += random.nextInt(3); } return value; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getRandom() {\n int k = 1;\n ListNode node = this.head;\n int i = 0;\n ArrayList<Integer> reservoir = new ArrayList<Integer>();\n //先把前k个放进水塘\n while (i < k && node != null) {\n reservoir.add(node.val);\n node = node.next;\n i++;...
[ "0.59834814", "0.5846741", "0.5824242", "0.575567", "0.57220066", "0.5705445", "0.5693638", "0.5662656", "0.55491984", "0.55361134", "0.55248624", "0.55218166", "0.55217737", "0.55138165", "0.5505598", "0.5504651", "0.54833686", "0.5437849", "0.5434263", "0.5391815", "0.53769...
0.55308294
10
Starts the conversion process.
public void convertAll() { try { updater.init(getUnitsToConvert()); for (Converter converter : converters) { converter.convert(updater); } world.saveLevelDatIfNeeded(); updater.complete(); } catch (IOException e) { updater.failed(e); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String[] args) {\r\n System.out.println(\"Starting\");\r\n try {\r\n File fastq = new File(\"data/HW4.fastq\");\r\n if (!fastq.exists()) {\r\n System.out.println(\"Can't find input file \" + fastq.getAbsolutePath());\r\n Syst...
[ "0.59943944", "0.5818235", "0.58021396", "0.5739499", "0.571392", "0.5682569", "0.56435996", "0.5616713", "0.5573079", "0.5550543", "0.5549871", "0.5549871", "0.5542274", "0.5540805", "0.55340207", "0.5531325", "0.55059016", "0.54665214", "0.54601985", "0.54456973", "0.543567...
0.0
-1
Returns a list with only the elements present in the given iterable that are of the specified class.
private <T> List<T> filterList(Iterable<?> iterable, Class<T> clazz) { List<T> result = new ArrayList<>(); for (Object object : iterable) { if (clazz.isInstance(object)) { @SuppressWarnings("unchecked") // Checked using clazz.isInstance T tObject = (T) object; result.add(tObject); } } return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static <T, S> Iterable<S> filterClass(Iterable<T> baseIterable, Class<S> targetClass) {\n final Class<S> finalTargetClass = targetClass;\n\n Iterable<S> classMatch = map(baseIterable, new MapFunction<T, S>() {\n @Override\n public S map(T obj) {\n if (final...
[ "0.6874775", "0.6217368", "0.58245146", "0.5715887", "0.565294", "0.5602935", "0.55634075", "0.55537236", "0.5552537", "0.55506504", "0.550381", "0.5495261", "0.54925054", "0.5487315", "0.54543483", "0.54515386", "0.54513544", "0.54294765", "0.54047126", "0.5387634", "0.53622...
0.7696657
0
Gets the sum of the units that each converter needs to convert.
private int getUnitsToConvert() throws IOException { int sum = 0; for (Converter converter : converters) { sum += converter.getUnitsToConvert(); } return sum; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public double getTotalUnits() {\n double totalUnits = 0;\n for (int i = 0; i < quarters.size(); i++) {\n totalUnits += quarters.get(i).getTotalUnits();\n }\n return totalUnits;\n }", "public double getTotalUnits() {\n int total = 0;\n for(int i = 0; i < cou...
[ "0.6853892", "0.67568094", "0.6451048", "0.6451048", "0.6451048", "0.6380571", "0.6357983", "0.63276106", "0.63222784", "0.62912714", "0.62509394", "0.61642545", "0.61636496", "0.61591524", "0.61227214", "0.6112245", "0.60989064", "0.60949194", "0.60527766", "0.60435617", "0....
0.82413644
0
Action for 'NO' Button
public void onClick(DialogInterface dialog, int id) { dialog.cancel(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void clickOnNOButton() {\r\n\t\tsafeJavaScriptClick(manageVehiclesSideBar.replace(\"Manage Vehicles\", \"No\"));\r\n\t}", "public void no() {\n\n\t\tno = new JButton(\"No\");\n\n\t\tno.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tprevious = current;...
[ "0.80171525", "0.7585753", "0.7480166", "0.7228392", "0.6872744", "0.6833464", "0.6774446", "0.6667443", "0.6570705", "0.6534198", "0.6530623", "0.6509868", "0.64922786", "0.6374137", "0.6364834", "0.6361135", "0.62876844", "0.62660784", "0.6264709", "0.62499034", "0.62301147...
0.0
-1
Crea la HTTP request para la URL obtenida y crea una String a partir de ella.
private static String makeHttpRequest(URL url) throws IOException { String jsonResponse = ""; //Si la URL es null se devuelve inediatamente. if (url == null) { return jsonResponse; } HttpURLConnection urlConnection = null; InputStream inputStream = null; try { urlConnection = (HttpURLConnection) url.openConnection(); urlConnection.setReadTimeout(100000 /* Milisegundos.*/); urlConnection.setConnectTimeout(100000 /* Milisegundos.*/); urlConnection.setRequestMethod("GET"); urlConnection.connect(); // Si la request se realiza correctamente (código de respuesta 200) se lee el input // stream y se le hace parse a la respuesta. if (urlConnection.getResponseCode() == 200) { inputStream = urlConnection.getInputStream(); jsonResponse = readFromStream(inputStream); } else { Log.e(LOG_TAG, "Error de conexión: " + urlConnection.getResponseCode()); } // Aquí simplemente hacemos catch a la IOException. } catch (IOException e) { Log.e(LOG_TAG, "Problema obteniendo los datos en JSON del servidor", e); // Independientemente de que se lance una exception o no en el bloque finally se realiza // una desconexión (o se "cierra" como en el caso del inputStream) para poder reusarlo. } finally { if (urlConnection != null) { urlConnection.disconnect(); } if (inputStream != null) { inputStream.close(); } } // Se devuelve como resultado el JsonResponse que albergará la String inputStream. return jsonResponse; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private StringRequest createStringRequest(final project.software.uni.positionprediction.datatypes.Request request,\r\n String url,\r\n Response.Listener<String> responseListener,\r\n ...
[ "0.6755491", "0.6749503", "0.65743226", "0.6523783", "0.64812183", "0.64692664", "0.63787526", "0.63658893", "0.6322075", "0.6288244", "0.62503254", "0.62409604", "0.62177604", "0.62155", "0.62112266", "0.6206567", "0.6202129", "0.6199217", "0.61511743", "0.6147415", "0.61474...
0.6436056
6
Convierte la inputStream en una String con toda la respuesta en JSON del servidor.
private static String readFromStream(InputStream inputStream) throws IOException { StringBuilder output = new StringBuilder(); if (inputStream != null) { InputStreamReader inputStreamReader = new InputStreamReader(inputStream, Charset.forName("UTF-8")); BufferedReader reader = new BufferedReader(inputStreamReader); String line = reader.readLine(); while (line != null) { output.append(line); line = reader.readLine(); } } return output.toString(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String responsetoString(InputStream in) throws IOException{\n\t\tBufferedReader br = new BufferedReader( new InputStreamReader(in));\n\t\tStringBuilder sb = new StringBuilder();\n\t\tString line = null;\n\t\twhile((line = br.readLine())!= null){\n\t\t\tsb.append(line);\t\t\t\n\t\t}\n\t\tin.close();\n\t\tret...
[ "0.71386904", "0.7077579", "0.6837211", "0.67642325", "0.658365", "0.6355088", "0.62413144", "0.62344766", "0.62172526", "0.6204838", "0.61993533", "0.61955434", "0.61882627", "0.6183039", "0.6162463", "0.6149738", "0.61491525", "0.6139269", "0.6133063", "0.6106881", "0.61001...
0.59777725
34
Devuelve una lista de objetos CityData creada a partir de hacer parse a una respuesta en JSON.
private static List<CityData> extractFeatureFromJson(String cityDataJSON) { // Si la String cityDataJSON es nula o está vacía, se devuelve el resultado. if (TextUtils.isEmpty(cityDataJSON)) { return null; } // Crea una ArrayList vacía a la que podemos añadir datos de ciudad. ArrayList<CityData> cityDatas = new ArrayList<>(); // Intenta hacer parse a la JSON response. try { // Crea un JSONObject que es el root de la API. JSONObject baseJsonObject = new JSONObject(cityDataJSON); // Extrae la JSONArray asociada la key "list". JSONArray cityDataArray = baseJsonObject.getJSONArray("list"); // Por cada ciudad en la cityData JSONArray crea un objeto CityData. for (int i = 0; i < cityDataArray.length(); i++) { // Escoge únicamente un elemento de la lista. JSONObject currentCityData = cityDataArray.getJSONObject(i); // Extrae el valor de la key llamada "name". String nombre = currentCityData.getString("name"); // Por cada dato de ciudad escoge el JSONObject asociado a la key "coord". JSONObject coordinates = currentCityData.getJSONObject("coord"); // Extrae el valor de la key llamada "lon". double longitud = coordinates.getDouble("lon"); // Extrae el valor de la key llamada "lat": double latitud = coordinates.getDouble("lat"); // Crea un nuevo objeto CityData con los valores requeridos. CityData cityData = new CityData(nombre, longitud, latitud); // Añade este nuevo objeto a la ArrayList. cityDatas.add(cityData); } } catch (JSONException e) { // Si ocurre algún error dentro del bloque try se capta aquí para evitar un cierre de la // App. Log.e("QueryUtils", "Problema parsing los resultados del terremoto en JSON", e); } return cityDatas; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static List<City> pareseJsonToCities(URL url) {\r\n\tObjectMapper objectMapper = new ObjectMapper();\r\n\tList<City> cities = null;\r\n\ttry {\r\n\t JsonNode node = objectMapper.readValue(url, JsonNode.class);\r\n\t if (node.isArray() && node.size() > 0) {\r\n\t\tcities = new ArrayList<>();\r\n\t\tIte...
[ "0.71632093", "0.6908432", "0.68936074", "0.6828628", "0.68172085", "0.6809198", "0.6746493", "0.65765107", "0.651716", "0.6491625", "0.641753", "0.6352614", "0.6332284", "0.63211656", "0.6278244", "0.6270848", "0.6264004", "0.62638694", "0.62333316", "0.620501", "0.61615956"...
0.7592953
0
No actual subscription to make, but we still need to acknowledge it.
@Override public void subscribe(final Set<ValueSpecification> valueSpecifications) { LOGGER.debug("Added subscriptions to {}", valueSpecifications); subscriptionsSucceeded(valueSpecifications); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void brokenSubscription() {\n\t\t\n\t}", "private void subscribeCompleted(MqttSubAckMessage ack) {\n LinkedHashMap<String, RequestedQoS> request = this.pendingSubscribes.remove(ack.messageId());\n if (request == null) {\n closeConnection(String.format(\"Unexpected sub...
[ "0.7068055", "0.68047494", "0.67866135", "0.6706896", "0.6658845", "0.64990646", "0.648497", "0.6453173", "0.64443797", "0.6382455", "0.63115996", "0.6288538", "0.6275278", "0.6263616", "0.6235094", "0.6228639", "0.61571294", "0.6126548", "0.6107501", "0.6107501", "0.6107501"...
0.0
-1
No actual unsubscription to make
@Override public void unsubscribe(final Set<ValueSpecification> valueSpecifications) { LOGGER.debug("Unsubscribed from {}", valueSpecifications); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void brokenSubscription() {\n\t\t\n\t}", "void unpublish() {\n pendingOps.decrementAndGet();\n }", "public void onUnsubscribe() {\n\n }", "public EligibleQueueUnlink()\n {\n super(\"EligibleQueueUnlink\");\n }", "void unsubscribe();", "@Override\n\t\tpublic v...
[ "0.75127363", "0.6698322", "0.6644906", "0.66183716", "0.65430385", "0.65402144", "0.64559877", "0.64215475", "0.63904756", "0.6308438", "0.6305603", "0.62957865", "0.61633354", "0.60891014", "0.6084468", "0.60772306", "0.60603344", "0.60377294", "0.60337144", "0.6032956", "0...
0.0
-1
Gets array of all "debts" elements
ch.crif_online.www.webservices.crifsoapservice.v1_00.DebtEntry[] getDebtsArray();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "ch.crif_online.www.webservices.crifsoapservice.v1_00.DebtEntry getDebtsArray(int i);", "int sizeOfDebtsArray();", "public CMSRedeemableBalanceAppModel[] getRedeemablesArray() {\n PaymentTransaction txn = getPaymentTransaction();\n Vector payments = new Vector();\n Enumeration e = txn.getPayments();\n ...
[ "0.7424578", "0.61986023", "0.6074906", "0.60314393", "0.6025782", "0.60169846", "0.594942", "0.5946034", "0.58814853", "0.5843697", "0.5793037", "0.5696804", "0.56721354", "0.56611913", "0.5650281", "0.5602518", "0.55999094", "0.55815744", "0.55393094", "0.5534621", "0.55190...
0.8074222
0
Gets ith "debts" element
ch.crif_online.www.webservices.crifsoapservice.v1_00.DebtEntry getDebtsArray(int i);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void removeDebts(int i);", "public Debt getDebtAt(int rowIndex) {\n if (rowIndex < 0) {\n return null;\n }\n if (rowIndex >= getRowCount()) {\n return null;\n }\n List<Debt> debts = model.getDebts();\n return debts.get(rowIndex);\n }", "private...
[ "0.58519554", "0.5813309", "0.5734203", "0.5520156", "0.5503801", "0.54962367", "0.5472306", "0.5436275", "0.54243666", "0.5383221", "0.5359305", "0.53516144", "0.5338905", "0.5298354", "0.5275746", "0.5260034", "0.52306634", "0.52293766", "0.52157784", "0.5215188", "0.521374...
0.6506251
0
Returns number of "debts" element
int sizeOfDebtsArray();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int size(){\n return trades.size();\n }", "int getTransactionsCount();", "int getDeliveredCount();", "public int getFundsCount() {\n if (fundsBuilder_ == null) {\n return funds_.size();\n } else {\n return fundsBuilder_.getCount();\n }\n }", "pub...
[ "0.67490363", "0.67266256", "0.66956514", "0.6418296", "0.6418296", "0.6326902", "0.6326902", "0.6306468", "0.6306468", "0.6304462", "0.6302227", "0.6297656", "0.6278208", "0.6256168", "0.6192882", "0.6179728", "0.61784637", "0.6165027", "0.611948", "0.6086998", "0.6083909", ...
0.788059
0