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 |
|---|---|---|---|---|---|---|
/ Print the label of the edge from v to current vertex, if such edge exists, and otherwise print "none" | public void findEdgeFrom(char v) {
for (int i = 0; i < currentVertex.inList.size(); i++) {
Neighbor neighbor = currentVertex.inList.get(i);
if (neighbor.vertex.label == v) {
System.out.println(neighbor.edge);
return;
}
}
System.out.println("none");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void findEdgeTo(char v) {\r\n\t\tfor (int i = 0; i < currentVertex.outList.size(); i++) {\r\n\t\t\tNeighbor neighbor = currentVertex.outList.get(i);\r\n\t\t\tif (neighbor.vertex.label == v) {\r\n\t\t\t\tSystem.out.println(neighbor.edge);\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\t\tSystem.out.println(\"non... | [
"0.7552106",
"0.64225286",
"0.62152064",
"0.6185935",
"0.6166862",
"0.61641824",
"0.60865134",
"0.6021484",
"0.59946483",
"0.5988974",
"0.59816635",
"0.5958499",
"0.5926321",
"0.58406687",
"0.58368456",
"0.58162683",
"0.57979804",
"0.57664037",
"0.5761939",
"0.57552123",
"0.5... | 0.74834555 | 1 |
/ Print the label of the edge from current vertex to v, if such edge exists, and otherwise print "none" | public void findEdgeTo(char v) {
for (int i = 0; i < currentVertex.outList.size(); i++) {
Neighbor neighbor = currentVertex.outList.get(i);
if (neighbor.vertex.label == v) {
System.out.println(neighbor.edge);
return;
}
}
System.out.println("none");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void findEdgeFrom(char v) {\r\n\t\tfor (int i = 0; i < currentVertex.inList.size(); i++) {\r\n\t\t\tNeighbor neighbor = currentVertex.inList.get(i);\r\n\t\t\tif (neighbor.vertex.label == v) {\r\n\t\t\t\tSystem.out.println(neighbor.edge);\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\t\tSystem.out.println(\"non... | [
"0.74778634",
"0.6452622",
"0.6173284",
"0.61411303",
"0.6113108",
"0.6111138",
"0.6075236",
"0.60566765",
"0.5941831",
"0.5937459",
"0.5916061",
"0.58888197",
"0.58840984",
"0.58610266",
"0.57734597",
"0.5767087",
"0.5754059",
"0.57532835",
"0.57442147",
"0.5742746",
"0.5735... | 0.7576503 | 0 |
/ Remove the edge from v to current vertex, if such edge exists. | public void removeEdgeTo(char v) {
for (int i = 0; i < currentVertex.outList.size(); i++) {
Neighbor neighbor = currentVertex.outList.get(i);
if (neighbor.vertex.label == v) {
// remove from neighbor's inList
neighbor.vertex.inList.remove(findNeighbor(neighbor.vertex.inList, currentVertex.label));
currentVertex.outList.remove(neighbor); // remove from current's outList
return;
}
}
System.out.println("Edge to " + v + " does not exist.");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public V removeVertex(V v);",
"public void removeEdgeFrom(char v) {\r\n\t\tfor (int i = 0; i < currentVertex.inList.size(); i++) {\r\n\t\t\tNeighbor neighbor = currentVertex.inList.get(i);\r\n\t\t\tif (neighbor.vertex.label == v) {\r\n\t\t\t\t// remove from neighbor's outList\r\n\t\t\t\tneighbor.vertex.outList.r... | [
"0.7930135",
"0.7806706",
"0.75670767",
"0.74673903",
"0.7336576",
"0.7336576",
"0.7187639",
"0.7144618",
"0.7048036",
"0.7027341",
"0.7018195",
"0.6985385",
"0.6931877",
"0.6924503",
"0.6911748",
"0.6834851",
"0.6834727",
"0.6789924",
"0.6786488",
"0.6772871",
"0.6703659",
... | 0.78192484 | 1 |
/ remove the edge from v to current vertex, if such edge exists. | public void removeEdgeFrom(char v) {
for (int i = 0; i < currentVertex.inList.size(); i++) {
Neighbor neighbor = currentVertex.inList.get(i);
if (neighbor.vertex.label == v) {
// remove from neighbor's outList
neighbor.vertex.outList.remove(findNeighbor(neighbor.vertex.outList, currentVertex.label));
currentVertex.inList.remove(neighbor); // remove from current's inList
return;
}
}
System.out.println("Edge from " + v + " does not exist.");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public V removeVertex(V v);",
"public void removeEdgeTo(char v) {\r\n\t\tfor (int i = 0; i < currentVertex.outList.size(); i++) {\r\n\t\t\tNeighbor neighbor = currentVertex.outList.get(i);\r\n\t\t\tif (neighbor.vertex.label == v) {\r\n\t\t\t\t// remove from neighbor's inList\r\n\t\t\t\tneighbor.vertex.inList.rem... | [
"0.7957036",
"0.78916115",
"0.7573218",
"0.7489526",
"0.7409696",
"0.7409696",
"0.72898686",
"0.7168632",
"0.70816165",
"0.7052654",
"0.7025484",
"0.70187825",
"0.6970762",
"0.6954472",
"0.69049925",
"0.6857406",
"0.68379045",
"0.6820578",
"0.6816021",
"0.67834705",
"0.675490... | 0.7901112 | 1 |
/ Print the labels of vertices in the order encountered during a breadthfirst search starting at current node. | public void BFS() {
Queue queue = new Queue();
queue.enqueue(this.currentVertex);
currentVertex.printVertex();
currentVertex.visited = true;
while (!queue.isEmpty()) {
Vertex vertex = (Vertex) queue.dequeue();
Vertex child = null;
while ((child = getUnvisitedChildVertex(vertex)) != null) {
child.visited = true;
child.printVertex();
queue.enqueue(child);
}
}
clearVertexNodes();
printLine();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void printVertices() {\r\n\t\tfor (int i = 0; i < vertices.size(); i++)\r\n\t\t\tSystem.out.print(vertices.get(i).label);\r\n\t}",
"public void display() {\r\n\t\tArrayList<String> vnames = new ArrayList<>(vces.keySet());\r\n\t\tfor (String vname : vnames) {\r\n\t\t\tString str = vname + \" => \";\r\n\t\t... | [
"0.6854401",
"0.6469416",
"0.6406026",
"0.6344724",
"0.63196594",
"0.6277933",
"0.625574",
"0.6249553",
"0.623148",
"0.6226546",
"0.6197621",
"0.6149119",
"0.61010236",
"0.60930175",
"0.60602736",
"0.6047826",
"0.5995006",
"0.5980683",
"0.5972462",
"0.5961993",
"0.5940126",
... | 0.6145964 | 12 |
/ Pass start vertex and an array that tells us if we've seen a vertex. | private void DFS(Vertex x) {
seen[vertices.indexOf(x)] = true;
System.out.print(x.label + " ");
for (int i = 0; i < x.outList.size(); i++) {
if (!seen[vertices.indexOf(x.outList.get(i).vertex)]) {
DFS(x);
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"boolean hasIsVertexOf();",
"boolean contains(int vertex);",
"public boolean pathExists(int startVertex, int stopVertex) {\n// your code here\n ArrayList<Integer> fetch_result = visitAll(startVertex);\n if(fetch_result.contains(stopVertex)){\n return true;\n }\n return fal... | [
"0.7381834",
"0.6840287",
"0.6754384",
"0.65610445",
"0.6509061",
"0.644279",
"0.62971264",
"0.6294056",
"0.6244583",
"0.62431043",
"0.62122846",
"0.6185793",
"0.5978293",
"0.5978293",
"0.59199685",
"0.5914645",
"0.5897775",
"0.5876532",
"0.5875912",
"0.5869836",
"0.5851418",... | 0.0 | -1 |
TODO Autogenerated method stub | public void onClick(View v) {
final String toEmail=email.getText().toString();
final String toDescr=description.getText().toString();
final String[] args={toDescr,toEmail};
new EndpointsTask().execute(args);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.608016... | 0.0 | -1 |
Spring Data dao for the Visiteur entity. | @SuppressWarnings("unused")
@Repository
public interface VisiteurRepository extends JpaRepository<Visiteur, Long> {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public interface VisitRepository extends CrudRepository<Visit, Long> {\n}",
"public interface VedioDao {\n void addVedio(Vedio vedio);\n\n void deleteVedio(Vedio news);\n\n int findCountVedioByCondition(int typeId, String vedioKey);\n\n List<Vedio> findVedioByCondition(int begin, int pageCount, int t... | [
"0.64149433",
"0.6348477",
"0.62317723",
"0.6208416",
"0.6205174",
"0.61990166",
"0.6187787",
"0.6148388",
"0.60963017",
"0.60958034",
"0.6089602",
"0.608381",
"0.6059266",
"0.6057379",
"0.6012776",
"0.60087657",
"0.60036045",
"0.5996662",
"0.59536123",
"0.590783",
"0.5902054... | 0.6609944 | 0 |
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, 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 |
TODO Autogenerated method stub | public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case R.id.itemAdd:
Intent intent = new Intent (this, Balances.class);
intent.putExtra("brain", this.brain);
startActivity(intent);
default:
return true;}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.66708666",
"0.65675074",
"0.65229905",
"0.6481001",
"0.64770633",
"0.64584893",
"0.6413091",
"0.63764185",
"0.6275735",
"0.62541914",
"0.6236919",
"0.6223816",
"0.62017626",
"0.61944294",
"0.61944294",
"0.61920846",
"0.61867654",
"0.6173323",
"0.61328775",
"0.61276996",
"0... | 0.0 | -1 |
Type your code here. | int main()
{
int a,t,sum1=0,sum2=0;
cin>>a;
while(a>0)
{
t=a%10;
if(t%2!=0)
{
sum1=sum1+t;
}
else
{
sum2=sum2+t;
}
a=a/10;
}
(sum1==sum2)?cout<<"Yes":cout<<"No";
return 0;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void generateCode()\n {\n \n }",
"@Override\r\n\tpublic void code() {\n\t\tus.code();\r\n\t\tSystem.out.println(\"我会java...\");\r\n\t}",
"CD withCode();",
"@Override\r\n\tpublic void code() {\n\t\tSystem.out.println(\"我会C语言....\");\r\n\t}",
"public void genCode(CodeFile code) {\n... | [
"0.6981029",
"0.66548663",
"0.6500108",
"0.6461564",
"0.63854045",
"0.62753505",
"0.6135049",
"0.6008531",
"0.598046",
"0.59758013",
"0.5974257",
"0.59685767",
"0.5952863",
"0.59404635",
"0.59404635",
"0.59404635",
"0.59404635",
"0.59404635",
"0.58050275",
"0.579843",
"0.5775... | 0.0 | -1 |
Called when the activity is first created. | @Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FULLSCREEN);
setContentView(R.layout.homepage);
// else {
// ShowConnectionDialog showConnectionDialog = new
// ShowConnectionDialog(this);
// showConnectionDialog.showConnectionDialog(this);
// }
// 初始化imageview
imageview = (ImageView) this.findViewById(R.id.cp1);
iAnimateView = new MyAnimateView(this);
// 设置imageview的alpha通道
imageview.setAlpha(alpha);
// imageview淡出线程
new Thread(new Runnable() {
public void run() {
// initApp();
while (iShowStatus < 2) {
try {
if (iShowStatus == 0) {
Thread.sleep(2700);
iShowStatus = 1;
} else {
Thread.sleep(20);
}
if (updateApp()) {
return;
}
} catch (InterruptedException e) {
e.printStackTrace();
}
}
}
}).start();
checkWireless = new CheckWireless(this);
// 初始化handler
mHandler = new Handler() {
@Override
public void handleMessage(Message msg) {
// TODO Auto-generated method stub
super.handleMessage(msg);
switch (msg.what) {
case 0: {
// 实现渐变
imageview.setAlpha(alpha);
imageview.invalidate();
break;
}
case 1: {
PublicMethod.myOutput("-----new image");
/*
* imageview.setImageResource(R.drawable.cp1); alpha = 255;
* imageview.setAlpha(alpha); imageview.invalidate();
*/
// setContentView(new MyAnimateView(HomePage.this));
setContentView(iAnimateView);
iAnimateView.invalidate();
iShowStatus = 3;
checkWirelessNetwork();
break;
}
case 2: {
try{
showalert();
}catch(Exception e){
e.printStackTrace();// 显示提示框(没有网络,用户是否继续 ) 2010/7/2 陈晨
}
// Intent in = new Intent(HomePage.this,
// RuyicaiAndroid.class);
// startActivity(in);
// HomePage.this.finish();
break;
}
case 3: {
PublicMethod.myOutput("----comeback");
// setContentView(iAnimateView);
iAnimateView.invalidate();
Message mg = Message.obtain();
mg.what = 5;
mHandler.sendMessage(mg);
// saveInformation();
break;
}
case 4: {
Intent in = new Intent(HomePage.this, RuyicaiAndroid.class);
startActivity(in);
HomePage.this.finish();
break;
}
case 5: {
saveInformation();
break;
}
}
}
};
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t\tinit();\n\t}",
"@Override\r\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\r\n\t}",
"@Override\n\tpublic void onActivit... | [
"0.791686",
"0.77270156",
"0.7693263",
"0.7693263",
"0.7693263",
"0.7693263",
"0.7693263",
"0.7693263",
"0.7637394",
"0.7637394",
"0.7629958",
"0.76189965",
"0.76189965",
"0.7543775",
"0.7540053",
"0.7540053",
"0.7539505",
"0.75269467",
"0.75147736",
"0.7509639",
"0.7500879",... | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public void handleMessage(Message msg) {
super.handleMessage(msg);
switch (msg.what) {
case 0: {
// 实现渐变
imageview.setAlpha(alpha);
imageview.invalidate();
break;
}
case 1: {
PublicMethod.myOutput("-----new image");
/*
* imageview.setImageResource(R.drawable.cp1); alpha = 255;
* imageview.setAlpha(alpha); imageview.invalidate();
*/
// setContentView(new MyAnimateView(HomePage.this));
setContentView(iAnimateView);
iAnimateView.invalidate();
iShowStatus = 3;
checkWirelessNetwork();
break;
}
case 2: {
try{
showalert();
}catch(Exception e){
e.printStackTrace();// 显示提示框(没有网络,用户是否继续 ) 2010/7/2 陈晨
}
// Intent in = new Intent(HomePage.this,
// RuyicaiAndroid.class);
// startActivity(in);
// HomePage.this.finish();
break;
}
case 3: {
PublicMethod.myOutput("----comeback");
// setContentView(iAnimateView);
iAnimateView.invalidate();
Message mg = Message.obtain();
mg.what = 5;
mHandler.sendMessage(mg);
// saveInformation();
break;
}
case 4: {
Intent in = new Intent(HomePage.this, RuyicaiAndroid.class);
startActivity(in);
HomePage.this.finish();
break;
}
case 5: {
saveInformation();
break;
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.608016... | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public void onConfigurationChanged(Configuration newConfig) {
super.onConfigurationChanged(newConfig);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.66708666",
"0.65675074",
"0.65229905",
"0.6481001",
"0.64770633",
"0.64584893",
"0.6413091",
"0.63764185",
"0.6275735",
"0.62541914",
"0.6236919",
"0.6223816",
"0.62017626",
"0.61944294",
"0.61944294",
"0.61920846",
"0.61867654",
"0.6173323",
"0.61328775",
"0.61276996",
"0... | 0.0 | -1 |
C++ TO JAVA CONVERTER TODO TASK: Pointer arithmetic is detected on this variable, so pointers on this variable are left unchanged: | public static void pipei(String c, String a)
{
char * p;
//C++ TO JAVA CONVERTER TODO TASK: Pointer arithmetic is detected on this variable, so pointers on this variable are left unchanged:
char * q;
for (p = c,q = a; * p != '\0';p++,q++)
{
if (*p != '(' && *p != ')')
{
*q = ' ';
}
if (*p == ')')
{
*q = '?';
}
if (*p == '(')
{
*q = '$';
}
}
*q = p;
System.out.printf("%s\n",a);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void Main()\n\t{\n\t\tvoid shuru(int * p,int len);\n\t\tvoid paixu(int * p,int len);\n\t\tvoid hebing(int * p1,int * p2);\n\t\tvoid shuchu(int * p,int,int);\n\t\tint m;\n\t\tint n;\n\t\tString tempVar = ConsoleInput.scanfRead();\n\t\tif (tempVar != null)\n\t\t{\n\t\t\tm = Integer.parseInt(tempVar);\n... | [
"0.59953505",
"0.57136226",
"0.55553854",
"0.549963",
"0.5476983",
"0.5271668",
"0.5259408",
"0.5203646",
"0.5137008",
"0.5104665",
"0.5099774",
"0.5073989",
"0.5070835",
"0.50629264",
"0.50420916",
"0.5003583",
"0.499558",
"0.49896634",
"0.4955053",
"0.49341625",
"0.4933343"... | 0.0 | -1 |
C++ TO JAVA CONVERTER TODO TASK: Pointer arithmetic is detected on this variable, so pointers on this variable are left unchanged: | public static void kuo(String c)
{
char * p;
//C++ TO JAVA CONVERTER TODO TASK: Pointer arithmetic is detected on this variable, so pointers on this variable are left unchanged:
char * q;
//C++ TO JAVA CONVERTER TODO TASK: Pointer arithmetic is detected on this variable, so pointers on this variable are left unchanged:
char * i;
//C++ TO JAVA CONVERTER TODO TASK: Pointer arithmetic is detected on this variable, so pointers on this variable are left unchanged:
char * t;
int s;
for (;;)
{
s = 0;
for (i = c; * i != '\0';i++)
{
for (p = i; * p != '\0';p++)
{
if (*p == '(')
{
for (q = p + 1; * q != '\0';q++)
{
if (*q == '(')
{
break;
}
else
{
if (*q == ')')
{
*p = 'a';
*q = 'a';
break;
}
}
}
}
}
}
for (q = c; * q != '\0';q++)
{
for (t = q; * t != '\0';t++)
{
if (*q == '(' && *t == ')')
{
s = 1;
}
}
}
if (s == 0)
{
break;
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void Main()\n\t{\n\t\tvoid shuru(int * p,int len);\n\t\tvoid paixu(int * p,int len);\n\t\tvoid hebing(int * p1,int * p2);\n\t\tvoid shuchu(int * p,int,int);\n\t\tint m;\n\t\tint n;\n\t\tString tempVar = ConsoleInput.scanfRead();\n\t\tif (tempVar != null)\n\t\t{\n\t\t\tm = Integer.parseInt(tempVar);\n... | [
"0.59945726",
"0.57117295",
"0.55559045",
"0.5498441",
"0.54765284",
"0.5270398",
"0.52597755",
"0.5201995",
"0.5137928",
"0.5104745",
"0.5099223",
"0.50743604",
"0.5070889",
"0.5063853",
"0.5041836",
"0.50024223",
"0.49965525",
"0.49884766",
"0.49541357",
"0.49345082",
"0.49... | 0.0 | -1 |
seleciona o contato na listview | @Override
public void onItemClick(AdapterView<?> adapter, View view, int i, long l) {
Contato contatoEscolhido = (Contato) adapter.getItemAtPosition(i);
Intent intent = new Intent(ListaContato.this, CadastrarContato.class);
intent.putExtra("contato-escolhido", contatoEscolhido);
startActivity(intent);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tlist = mdb.getselect_all_data(ed.getText().toString());\n\t\t\t\tMy_list_adapter adapter = new My_list_adapter(getApplicationContext(),\n\t\t\t\t\t\tlist);\n\t\t\t\tlv.setAdapter(adapter);\n\t\t\t}",
"private void initListView()\n {\n\n listVie... | [
"0.70713603",
"0.6873465",
"0.68161106",
"0.6804372",
"0.673968",
"0.6647663",
"0.6630293",
"0.6624035",
"0.6575979",
"0.6572441",
"0.6527307",
"0.6521087",
"0.6509719",
"0.650589",
"0.6492116",
"0.6479213",
"0.6468533",
"0.64510393",
"0.6446903",
"0.64372337",
"0.6428867",
... | 0.0 | -1 |
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 DisciplinaCurso)) {
return false;
}
DisciplinaCurso other = (DisciplinaCurso) object;
if ((this.disciplinaCursoPK == null && other.disciplinaCursoPK != null) || (this.disciplinaCursoPK != null && !this.disciplinaCursoPK.equals(other.disciplinaCursoPK))) {
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.6896072",
"0.6839122",
"0.6705258",
"0.66412854",
"0.66412854",
"0.65923095",
"0.65785074",
"0.65785074",
"0.65752834",
"0.65752834",
"0.65752834",
"0.65752834",
"0.65752834",
"0.65752834",
"0.6561566",
"0.6561566",
"0.6545169",
"0.6525343",
"0.65168375",
"0.64885366",
"0.... | 0.0 | -1 |
TODO Autogenerated method stub | public static void main(String[] args) {
Bank b=new Bank();
b.creditCard();
b.fixedDeposit();
b.currentAccount();
b.savingsAccount();
} | {
"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 |
Constructs with the default. | public JRibbonAction()
{
super();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private Default()\n {}",
"defaultConstructor(){}",
"protected abstract S createDefault();",
"void DefaultConstructor(){}",
"public Builder() {\n\t\t\tsuper(Defaults.NAME);\n\t\t}",
"public void initializeDefault() {\n\t\tthis.numAuthorsAtStart = 5;\n\t\tthis.numPublicationsAtStart = 20;\n\t\tthis.... | [
"0.7909775",
"0.7604444",
"0.74092",
"0.7275427",
"0.7023466",
"0.6749666",
"0.6672586",
"0.6617078",
"0.646869",
"0.6456402",
"0.64175045",
"0.641373",
"0.64046794",
"0.6393678",
"0.6372852",
"0.6362246",
"0.635524",
"0.6342265",
"0.63320065",
"0.63320065",
"0.63320065",
"... | 0.0 | -1 |
Constructs with the specified initial text. | public JRibbonAction(String text)
{
super(text);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public TextConstruct(String prefix, String name)\n\t{\n\t super(prefix, name); \n\t}",
"public Text(String text)\n {\n super(text);\n initialize();\n }",
"Text createText();",
"public TextConstruct(String name)\n\t{\n super(name);\n this.type = ContentType.TEXT;\n\t}",
"... | [
"0.6721345",
"0.6612362",
"0.64330226",
"0.6419339",
"0.62134165",
"0.611558",
"0.6022248",
"0.59681475",
"0.59444803",
"0.594226",
"0.5894503",
"0.57996327",
"0.57199585",
"0.5714905",
"0.5713278",
"0.5704385",
"0.5694303",
"0.568523",
"0.56630445",
"0.56613326",
"0.5625126"... | 0.0 | -1 |
Constructs with the specified initial icon. | public JRibbonAction(Icon icon)
{
super(icon);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Icon createIcon();",
"private static IconResource initIconResource() {\n\t\tIconResource iconResource = new IconResource(Configuration.SUPERVISOR_LOGGER);\n\t\t\n\t\ticonResource.addResource(IconTypeAWMS.HOME.name(), iconPath + \"home.png\");\n\t\ticonResource.addResource(IconTypeAWMS.INPUT_ORDER.name(), iconPat... | [
"0.75417",
"0.7113205",
"0.69124985",
"0.6764871",
"0.6751672",
"0.6609367",
"0.65829164",
"0.6577572",
"0.6524601",
"0.6425176",
"0.639536",
"0.63458884",
"0.63384986",
"0.6336041",
"0.63200164",
"0.6289905",
"0.62593466",
"0.6246341",
"0.6246135",
"0.62357265",
"0.6180361",... | 0.6270003 | 16 |
Constructs with the specified initial text and icon. | public JRibbonAction(String text, Icon icon)
{
super(text, icon);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Icon createIcon();",
"public LinkButton( String text, Icon icon) {\n\t\tsuper( text, icon);\n\t\tinit();\n\t}",
"protected JLabel createComponent(String text, Icon image)\n {\n return new JLabel(text, image, SwingConstants.RIGHT);\n }",
"public TitleIconItem(){}",
"public TransferButton(String text, I... | [
"0.68725675",
"0.6487079",
"0.6383716",
"0.6350991",
"0.63367116",
"0.6270867",
"0.61948335",
"0.60837305",
"0.607742",
"0.6070629",
"0.6050314",
"0.59932464",
"0.59516346",
"0.593125",
"0.59270126",
"0.59177387",
"0.58020407",
"0.5799777",
"0.57917005",
"0.5787893",
"0.57613... | 0.6908393 | 0 |
Constructs with the specified initial text and tooltip text. | public JRibbonAction(String text, String toolTipText)
{
super(text, toolTipText);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public X tooltipText(String text) {\n component.setToolTipText(text);\n return (X) this;\n }",
"public void setTooltipText() { tooltip.setText(name); }",
"public DefaultTip() {}",
"public JRibbonAction(String name, String text, String toolTipText)\n\t{\n\t\tsuper(name, text, toolTipText);\n\... | [
"0.6435879",
"0.63777673",
"0.626824",
"0.6077611",
"0.603524",
"0.60229427",
"0.6008072",
"0.5995573",
"0.597825",
"0.5964447",
"0.59601265",
"0.5883468",
"0.5873915",
"0.5866945",
"0.5859885",
"0.58434486",
"0.58318543",
"0.5828585",
"0.5769603",
"0.5753223",
"0.57360655",
... | 0.62867373 | 2 |
Constructs with the specified initial icon and tooltip text. | public JRibbonAction(Icon icon, String toolTipText)
{
super(icon, toolTipText);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public JRibbonAction(String text, Icon icon, String toolTipText)\n\t{\n\t\tsuper(text, icon, toolTipText);\n\t}",
"public JRibbonAction(String name, String text, Icon icon, String toolTipText)\n\t{\n\t\tsuper(name, text, icon, toolTipText);\n\t}",
"Icon createIcon();",
"public static JButton createIconButton... | [
"0.67543215",
"0.65138286",
"0.6446655",
"0.63830024",
"0.6377471",
"0.61970085",
"0.6061782",
"0.60589945",
"0.60181105",
"0.59435457",
"0.5919272",
"0.5884489",
"0.5865335",
"0.5763168",
"0.57325065",
"0.56868374",
"0.56748986",
"0.566823",
"0.5646077",
"0.56339025",
"0.560... | 0.6764116 | 0 |
Constructs with the specified initial text, icon and tooltip text. | public JRibbonAction(String text, Icon icon, String toolTipText)
{
super(text, icon, toolTipText);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public JRibbonAction(String name, String text, Icon icon, String toolTipText)\n\t{\n\t\tsuper(name, text, icon, toolTipText);\n\t}",
"public JRibbonAction(Icon icon, String toolTipText)\n\t{\n\t\tsuper(icon, toolTipText);\n\t}",
"private static ToolItem createItemHelper(ToolBar toolbar, Image image,\r\n\t\t\tS... | [
"0.67707676",
"0.6740748",
"0.63833433",
"0.63023835",
"0.6282935",
"0.6164501",
"0.6161377",
"0.609314",
"0.5955358",
"0.58962226",
"0.58771646",
"0.58736324",
"0.5871278",
"0.5819998",
"0.5808323",
"0.57882535",
"0.5786484",
"0.5773232",
"0.576475",
"0.57593834",
"0.5746509... | 0.6996316 | 0 |
Constructs with the specified initial name, text and tooltip text. | public JRibbonAction(String name, String text, String toolTipText)
{
super(name, text, toolTipText);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public DefaultTip(String name, Object tip)\n/* */ {\n/* 39 */ this.name = name;\n/* 40 */ this.tip = tip;\n/* */ }",
"public void setTooltipText() { tooltip.setText(name); }",
"public ToolTips (String imageName)\r\n\t{\r\n\t\tthis.imageName = imageName;\r\n\t}",
"public JRibbonAction(String... | [
"0.65555227",
"0.64076614",
"0.63699013",
"0.6133737",
"0.60982126",
"0.60333544",
"0.59975827",
"0.5990156",
"0.58488214",
"0.58468074",
"0.5808786",
"0.5778452",
"0.57730466",
"0.576494",
"0.57599413",
"0.5716136",
"0.5701688",
"0.56998",
"0.5675832",
"0.5656356",
"0.565164... | 0.6336957 | 3 |
Constructs with the specified initial name, text, icon and tooltip text. | public JRibbonAction(String name, String text, Icon icon, String toolTipText)
{
super(name, text, icon, toolTipText);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public JRibbonAction(String text, Icon icon, String toolTipText)\n\t{\n\t\tsuper(text, icon, toolTipText);\n\t}",
"public ToolTips (String imageName)\r\n\t{\r\n\t\tthis.imageName = imageName;\r\n\t}",
"public JRibbonAction(Icon icon, String toolTipText)\n\t{\n\t\tsuper(icon, toolTipText);\n\t}",
"public JRib... | [
"0.6664996",
"0.65366036",
"0.6423032",
"0.6303028",
"0.61925364",
"0.6189105",
"0.6165614",
"0.61442816",
"0.61256397",
"0.6085363",
"0.6005738",
"0.59391123",
"0.5874842",
"0.58340365",
"0.5819635",
"0.5812358",
"0.58011717",
"0.57824945",
"0.57683825",
"0.56869036",
"0.566... | 0.6837939 | 0 |
Gets the ribbon container. | public JRibbonContainer getRibbonContainer()
{
return ribbonContainer;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public IRibbonComponent getRibbonComponent()\n\t{\n\t\treturn ribbonComponent;\n\t}",
"public Icon getRibbonIcon()\n\t{\n\t\treturn ribbonIcon;\n\t}",
"public String getRibbonName()\n\t{\n\t\treturn ribbonName;\n\t}",
"public String getRibbonComponentClass()\n\t{\n\t\treturn ribbonComponentClass;\n\t}",
"p... | [
"0.7677107",
"0.7022817",
"0.68221825",
"0.6523262",
"0.6410004",
"0.62918067",
"0.592579",
"0.5615199",
"0.55277246",
"0.53890383",
"0.53803796",
"0.53310347",
"0.5310189",
"0.52958536",
"0.5268411",
"0.5268411",
"0.526258",
"0.52081245",
"0.51787746",
"0.51451457",
"0.51251... | 0.8273624 | 0 |
Sets the ribbon container. | public void setRibbonContainer(JRibbonContainer ribbonContainer)
{
this.ribbonContainer = ribbonContainer;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setRibbonComponent(IRibbonComponent ribbonComponent)\n\t{\n\t\tthis.ribbonComponent = ribbonComponent;\n\t}",
"public JRibbonContainer getRibbonContainer()\n\t{\n\t\treturn ribbonContainer;\n\t}",
"public void setCrayon(RibbonCrayon c)\n { this.crayon = c; }",
"public void setRibbonIcon(Icon r... | [
"0.68942183",
"0.6796572",
"0.6416135",
"0.62649083",
"0.6181732",
"0.6012554",
"0.591266",
"0.58946115",
"0.58861005",
"0.58027893",
"0.57007766",
"0.5546241",
"0.5477268",
"0.5312726",
"0.5198074",
"0.5191664",
"0.51898074",
"0.5038984",
"0.50290763",
"0.49766612",
"0.49766... | 0.74840605 | 0 |
Gets the ribbon name. | public String getRibbonName()
{
return ribbonName;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getRibbonTitle()\n\t{\n\t\treturn ribbonTitle;\n\t}",
"public void setRibbonName(String ribbonName)\n\t{\n\t\tthis.ribbonName = ribbonName;\n\t}",
"public Icon getRibbonIcon()\n\t{\n\t\treturn ribbonIcon;\n\t}",
"public String getRibbonToolTipText()\n\t{\n\t\treturn ribbonToolTipText;\n\t}",
... | [
"0.767957",
"0.67168635",
"0.6690011",
"0.6660001",
"0.6623118",
"0.6101202",
"0.6087706",
"0.59129506",
"0.59013844",
"0.5864001",
"0.58389556",
"0.57179254",
"0.56822073",
"0.5662749",
"0.56306225",
"0.55950946",
"0.55875826",
"0.55820173",
"0.55492806",
"0.5532059",
"0.551... | 0.8415812 | 0 |
Sets the ribbon name. | public void setRibbonName(String ribbonName)
{
this.ribbonName = ribbonName;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getRibbonName()\n\t{\n\t\treturn ribbonName;\n\t}",
"public void setRibbonTitle(String ribbonTitle)\n\t{\n\t\tthis.ribbonTitle = ribbonTitle;\n\t}",
"public String getRibbonTitle()\n\t{\n\t\treturn ribbonTitle;\n\t}",
"public void setRibbonIcon(Icon ribbonIcon)\n\t{\n\t\tthis.ribbonIcon = ribbo... | [
"0.73120725",
"0.6936388",
"0.6436456",
"0.60622185",
"0.59558105",
"0.585851",
"0.57158226",
"0.5499412",
"0.54928225",
"0.5474529",
"0.5473378",
"0.54551655",
"0.54551655",
"0.5452589",
"0.5436676",
"0.54328275",
"0.5429072",
"0.5426803",
"0.5410936",
"0.540891",
"0.5385451... | 0.79223055 | 0 |
Gets the ribbon title. | public String getRibbonTitle()
{
return ribbonTitle;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getRibbonName()\n\t{\n\t\treturn ribbonName;\n\t}",
"public String getRibbonToolTipText()\n\t{\n\t\treturn ribbonToolTipText;\n\t}",
"public void setRibbonTitle(String ribbonTitle)\n\t{\n\t\tthis.ribbonTitle = ribbonTitle;\n\t}",
"public String getTitle()\r\n {\r\n return getSemanticO... | [
"0.75383854",
"0.7050761",
"0.69377667",
"0.6900699",
"0.684859",
"0.67989",
"0.67989",
"0.67989",
"0.67989",
"0.67989",
"0.6768755",
"0.6768755",
"0.6768755",
"0.6768755",
"0.6768755",
"0.6768755",
"0.6768755",
"0.6768755",
"0.6768755",
"0.6768755",
"0.6768755",
"0.6768755... | 0.86838007 | 0 |
Sets the ribbon title. | public void setRibbonTitle(String ribbonTitle)
{
this.ribbonTitle = ribbonTitle;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getRibbonTitle()\n\t{\n\t\treturn ribbonTitle;\n\t}",
"public void setTitle(String title) {\n\t\tborder.setTitle(title);\n\t}",
"public void setTitle(String title);",
"public void setTitle(String title);",
"public void setTitle(String title);",
"public void setTitle(java.lang.String title);... | [
"0.7338014",
"0.7088135",
"0.704331",
"0.704331",
"0.704331",
"0.7017322",
"0.69701093",
"0.69701093",
"0.69701093",
"0.69701093",
"0.69701093",
"0.6958827",
"0.6954002",
"0.69435894",
"0.69300014",
"0.688356",
"0.6849328",
"0.6843631",
"0.6837797",
"0.68050426",
"0.6799595",... | 0.8215313 | 0 |
Gets the ribbon icon. | public Icon getRibbonIcon()
{
return ribbonIcon;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"String getIcon();",
"String getIcon();",
"java.lang.String getIcon();",
"java.lang.String getIcon();",
"public void setRibbonIcon(Icon ribbonIcon)\n\t{\n\t\tthis.ribbonIcon = ribbonIcon;\n\t}",
"public String getIcon() {\n\t\treturn \"icon\";\n\t}",
"public String getRibbonName()\n\t{\n\t\treturn ribbo... | [
"0.6841435",
"0.6841435",
"0.6810165",
"0.6810165",
"0.67943686",
"0.67735314",
"0.6747718",
"0.67411673",
"0.66704196",
"0.66464365",
"0.6589997",
"0.6589997",
"0.6589997",
"0.6589997",
"0.654092",
"0.65377676",
"0.64817894",
"0.64491165",
"0.6442445",
"0.6440624",
"0.643533... | 0.8756072 | 0 |
Sets the ribbon icon. | public void setRibbonIcon(Icon ribbonIcon)
{
this.ribbonIcon = ribbonIcon;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Icon getRibbonIcon()\n\t{\n\t\treturn ribbonIcon;\n\t}",
"private void setIcon() {\n this.setIconImage(Toolkit.getDefaultToolkit().getImage(getClass().getResource(\"logo.ico\")));\n }",
"private void setIcon() {\n setIconImage(Toolkit.getDefaultToolkit().getImage(getClass().getResource(... | [
"0.72901684",
"0.7084995",
"0.7079657",
"0.69865745",
"0.69865745",
"0.6933513",
"0.6854078",
"0.68366313",
"0.68328804",
"0.68251777",
"0.6795741",
"0.67763585",
"0.67393553",
"0.6713211",
"0.66730756",
"0.6666543",
"0.66557324",
"0.66154504",
"0.6544069",
"0.6539335",
"0.65... | 0.83599275 | 0 |
Gets the ribbon tooltip text. | public String getRibbonToolTipText()
{
return ribbonToolTipText;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static String getToolTipText() {\n\t\treturn (toolTipText);\n\t}",
"public String getToolTipText() {\n return this.toString();\n }",
"public String getTabToolTipText();",
"public String getToolTipText() {\n\t\treturn \"\";\r\n\t}",
"public String getToolTipText () {\r\n\tcheckWidget();\r\n... | [
"0.7725173",
"0.7400878",
"0.715542",
"0.70083207",
"0.69683594",
"0.69370383",
"0.69324195",
"0.69024086",
"0.6889303",
"0.68820983",
"0.6874884",
"0.6798826",
"0.6776451",
"0.6724905",
"0.67138135",
"0.6710067",
"0.6690862",
"0.66013014",
"0.6534605",
"0.6474246",
"0.645085... | 0.86949456 | 0 |
Sets the ribbon tooltip text. | public void setRibbonToolTipText(String ribbonToolTipText)
{
this.ribbonToolTipText = ribbonToolTipText;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setTooltipText() { tooltip.setText(name); }",
"public void setToolTipText(String text)\n/* */ {\n/* 227 */ putClientProperty(\"ToolTipText\", text);\n/* */ }",
"public void setToolTipText (String string) {\r\n\tcheckWidget();\r\n\ttoolTipText = string;\r\n}",
"public String getRib... | [
"0.76772887",
"0.7099727",
"0.7027581",
"0.68993026",
"0.6767136",
"0.67309636",
"0.66703314",
"0.6634538",
"0.654951",
"0.641829",
"0.6294997",
"0.6133955",
"0.6128006",
"0.6127059",
"0.60731924",
"0.6045531",
"0.6026323",
"0.59993935",
"0.59951967",
"0.5965493",
"0.59356326... | 0.81568056 | 0 |
Gets the ribbon component class. | public String getRibbonComponentClass()
{
return ribbonComponentClass;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public IRibbonComponent getRibbonComponent()\n\t{\n\t\treturn ribbonComponent;\n\t}",
"public JRibbonContainer getRibbonContainer()\n\t{\n\t\treturn ribbonContainer;\n\t}",
"public Icon getRibbonIcon()\n\t{\n\t\treturn ribbonIcon;\n\t}",
"public String getRibbonName()\n\t{\n\t\treturn ribbonName;\n\t}",
"p... | [
"0.7731805",
"0.6890577",
"0.67491007",
"0.6553584",
"0.6372804",
"0.6023738",
"0.5684421",
"0.5630037",
"0.5630037",
"0.5630037",
"0.5589049",
"0.55734897",
"0.55128706",
"0.54912484",
"0.5444706",
"0.54392284",
"0.543517",
"0.54348487",
"0.5417867",
"0.5408598",
"0.53819734... | 0.87568504 | 0 |
Sets the ribbon component class. | public void setRibbonComponentClass(String ribbonComponentClass)
{
this.ribbonComponentClass = ribbonComponentClass;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getRibbonComponentClass()\n\t{\n\t\treturn ribbonComponentClass;\n\t}",
"public void setRibbonComponent(IRibbonComponent ribbonComponent)\n\t{\n\t\tthis.ribbonComponent = ribbonComponent;\n\t}",
"public void setCrayon(RibbonCrayon c)\n { this.crayon = c; }",
"public IRibbonComponent getRibbo... | [
"0.74560094",
"0.64416766",
"0.61192",
"0.5929107",
"0.5842754",
"0.56988955",
"0.55840755",
"0.54302657",
"0.54262614",
"0.5329537",
"0.5290105",
"0.52755284",
"0.5273259",
"0.5243161",
"0.5216962",
"0.5136884",
"0.51092225",
"0.50989145",
"0.50701916",
"0.50453436",
"0.5007... | 0.7749515 | 0 |
Gets the ribbon component. | public IRibbonComponent getRibbonComponent()
{
return ribbonComponent;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public JRibbonContainer getRibbonContainer()\n\t{\n\t\treturn ribbonContainer;\n\t}",
"public Icon getRibbonIcon()\n\t{\n\t\treturn ribbonIcon;\n\t}",
"public String getRibbonComponentClass()\n\t{\n\t\treturn ribbonComponentClass;\n\t}",
"public String getRibbonName()\n\t{\n\t\treturn ribbonName;\n\t}",
"p... | [
"0.7596714",
"0.7517591",
"0.748402",
"0.7418372",
"0.71403706",
"0.63306665",
"0.6281131",
"0.59432644",
"0.5580092",
"0.5372867",
"0.5344418",
"0.5319069",
"0.5267763",
"0.5195333",
"0.51646405",
"0.516233",
"0.5137857",
"0.51357925",
"0.5114721",
"0.5112755",
"0.51076376",... | 0.8447449 | 0 |
Sets the ribbon component. | public void setRibbonComponent(IRibbonComponent ribbonComponent)
{
this.ribbonComponent = ribbonComponent;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public IRibbonComponent getRibbonComponent()\n\t{\n\t\treturn ribbonComponent;\n\t}",
"public void setRibbonIcon(Icon ribbonIcon)\n\t{\n\t\tthis.ribbonIcon = ribbonIcon;\n\t}",
"public void setRibbonComponentClass(String ribbonComponentClass)\n\t{\n\t\tthis.ribbonComponentClass = ribbonComponentClass;\n\t}",
... | [
"0.6660339",
"0.6617368",
"0.6460687",
"0.641219",
"0.63600487",
"0.63362104",
"0.62353176",
"0.62180436",
"0.61082035",
"0.6051342",
"0.60019344",
"0.59699863",
"0.5929318",
"0.5765544",
"0.5699266",
"0.551448",
"0.5447474",
"0.52981067",
"0.5208045",
"0.51840603",
"0.516647... | 0.74838483 | 0 |
Invoked when an action occurs. | public void execute(ActionEvent e)
{
if (ribbonComponent == null)
{
try
{
ribbonComponent = (IRibbonComponent) Class.forName(ribbonComponentClass).newInstance();
}
catch (NullPointerException ex)
{
ExceptionTracer.traceException(HandleManager.getFrame(ribbonContainer), SwingLocale.getString("component_initialization_failed") + " [" + ribbonComponentClass + "]", ex);
ex.printStackTrace();
return;
}
catch (ClassCastException ex)
{
ExceptionTracer.traceException(HandleManager.getFrame(ribbonContainer), SwingLocale.getString("component_implementation_failed") + " " + IRibbonComponent.class.getSimpleName() + " [" + ribbonComponentClass + "]", ex);
ex.printStackTrace();
return;
}
catch (Exception ex)
{
ExceptionTracer.traceException(HandleManager.getFrame(ribbonContainer), SwingLocale.getString("component_instantiation_failed") + " [" + ribbonComponentClass + "]", ex);
ex.printStackTrace();
return;
}
}
ribbonContainer.addRibbonComponent(ribbonName, ribbonTitle, ribbonIcon, ribbonToolTipText, ribbonComponent);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic void action() {\n\t\tSystem.out.println(\"action now!\");\n\t}",
"public abstract void onAction();",
"public void action() {\n action.action();\n }",
"@Override\n public void action() {\n }",
"@Override\n public void action() {\n }",... | [
"0.7906935",
"0.77752256",
"0.7643283",
"0.7612123",
"0.7612123",
"0.7612123",
"0.7516773",
"0.7489443",
"0.741914",
"0.74124837",
"0.74034166",
"0.7384085",
"0.7358812",
"0.7358812",
"0.73434424",
"0.73405117",
"0.73405117",
"0.73405117",
"0.73405117",
"0.73405117",
"0.73405... | 0.0 | -1 |
When Update Button is clicked | public void actionPerformed(ActionEvent e) {
if(e.getActionCommand().equals("Update")){
httpmethods httpmethods = new httpmethods();
//Store textfield text in string
String itemID = txtItemID.getText();
String itemName = txtItemName.getText();
String itemType = txtItemType.getText();
String itemPrice = txtItemPrice.getText();
String itemStock = txtItemStock.getText();
//Read method
Item it = httpmethods.findItem(itemID);
//booleans for checking valid input
boolean nameCheck, priceCheck, stockCheck, typecheck;
if(itemType==null || !itemType.matches("[a-zA-Z]+")){
typecheck = false;
txtItemType.setText("Invalid Type Input");
}
else{
typecheck = true;
}
if(!itemName.matches("[a-zA-Z0-9]+")){
nameCheck = false;
txtItemName.setText("Invalid Name Input");
}
else{
nameCheck = true;
}
if(GenericHelper.validNumber(itemPrice)){
priceCheck = true;
}
else{
priceCheck = false;
txtItemPrice.setText("Invalid Price Input");
}
if(GenericHelper.validNumber(itemStock)){
stockCheck = true;
}
else{
stockCheck = false;
txtItemStock.setText("Invalid Stock Input");
}
//If all are valid then call update httpmethod
if(nameCheck && typecheck && priceCheck && stockCheck){
double ditemPrice = Double.parseDouble(itemPrice);
double ditemStock = Double.parseDouble(itemStock);
item = new Item.Builder().copy(it).itemName(itemName).itemType(itemType).itemPrice(ditemPrice).itemStock(ditemStock).builder();
httpmethods.updateItem(item);
txtItemName.setText("");
txtItemType.setText("");
txtItemPrice.setText("");
txtItemStock.setText("");
JOptionPane.showMessageDialog(null, "Item Updated");
}
}
//When Get Info Button is clicked
if(e.getActionCommand().equals("Get Info")){
boolean idCheck;
//Use read method of readitemgui
String id = txtItemID.getText();
httpmethods httpmethods = new httpmethods();
Item it = httpmethods.findItem(id);
txtItemName.setText(it.getItemName());
txtItemType.setText(it.getItemType());
//Doubles are stored in string without decimals
String price = String.valueOf(it.getItemPrice()).split("\\.")[0];;
String stock = String.valueOf(it.getItemStock()).split("\\.")[0];
txtItemPrice.setText(price);
txtItemStock.setText(stock);
}
//When Clear Button is clicked
if(e.getActionCommand().equals("Clear")){
txtItemID.setText("");
txtItemName.setText("");
txtItemType.setText("");
txtItemPrice.setText("");
txtItemStock.setText("");
}
//When Exit Button is clicked
if(e.getActionCommand().equals("Exit")){
UpdateItemFrame.dispose();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void handleUpdate(){\n increaseDecrease(\"i\");\n action=\"update\";\n buttonSave.setVisible(true);\n admission.setEditable(false);\n\n }",
"public void clickOnUpdateButton() {\r\n\t\tsafeJavaScriptClick(updateButton);\r\n\t}",
"public void actionPerformed(ActionEvent e){\... | [
"0.78714746",
"0.786109",
"0.74806535",
"0.72376245",
"0.7235658",
"0.7235658",
"0.7164867",
"0.7075411",
"0.70614874",
"0.70491767",
"0.7035764",
"0.6946094",
"0.69384146",
"0.6924016",
"0.6915273",
"0.69113934",
"0.6877708",
"0.6877708",
"0.6874969",
"0.6874969",
"0.6874969... | 0.0 | -1 |
testet, ob alle States, die in der Menge members enthalten sind, Elemente des \nuAutomaten nua sind | static boolean allMembersArePartOf(Set<NuState> members, NuAutomaton nua) {
for (final NuState member : members)
if (member.nua != nua)
return false;
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"AdministrativeState adminsatratveState();",
"AdministrativeState adminsatratveState();",
"public void steuern() {\n\t\teinlesenUndInitialisieren();\n\t\tausgabe();\n\t}",
"@Test\n\tpublic void testInitStatesListGameContainer() {\n\t}",
"public interface StatePac {\n\n /**\n * Identify the leaf of St... | [
"0.5591665",
"0.5591665",
"0.5525147",
"0.5516947",
"0.55009604",
"0.5417106",
"0.53713024",
"0.5365728",
"0.53628045",
"0.5355309",
"0.53456116",
"0.53431666",
"0.5291718",
"0.52529204",
"0.52503693",
"0.5243299",
"0.5237632",
"0.5219384",
"0.5216382",
"0.52040327",
"0.52038... | 0.0 | -1 |
TODO Test correct values taken from other pages | @Override
public void initialize(URL url, ResourceBundle rb) {
System.out.println(user.getAccountID2());
System.out.println(MainUiController.Username);
System.out.println(user.bugReportID);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n public void value() {\n assertEquals(\"4\", onPage.get(\"select\").withName(\"plain_select\").value());\n // Get the first selected value for a multiple select\n assertEquals(\"2\", onPage.get(\"select\").withName(\"multiple_select\").value());\n // Get the value of the optio... | [
"0.6090046",
"0.5692494",
"0.56212324",
"0.5564961",
"0.55252093",
"0.55236936",
"0.55025023",
"0.5466335",
"0.5460668",
"0.5438105",
"0.5419295",
"0.54152215",
"0.5375993",
"0.53619325",
"0.5344006",
"0.53425515",
"0.534",
"0.5280448",
"0.5278647",
"0.5274639",
"0.52645",
... | 0.0 | -1 |
Compares this RowId to the specified object. | public byte[] getBytes() {
return toString().getBytes();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean equals(Object obj) {\n\n if (obj == this) {\n return true;\n }\n\n if (obj instanceof Row) {\n return ((Row) obj).table == table\n && ((Row) obj).position == position;\n }\n\n return false;\n }",
"@Override\n public b... | [
"0.63289016",
"0.62530625",
"0.6173042",
"0.6101709",
"0.6093965",
"0.5860636",
"0.58584064",
"0.58515644",
"0.5810781",
"0.5785797",
"0.57797086",
"0.5722378",
"0.56963927",
"0.5689686",
"0.56896263",
"0.56835926",
"0.5678961",
"0.5676839",
"0.5665741",
"0.56580245",
"0.5657... | 0.0 | -1 |
Returns an array of bytes representing the value of the SQL ROWID designated by this java.sql.RowId object. | public int hashCode() {
return super.hashCode();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Integer getRowId() {\n return rowId;\n }",
"public byte[] getBytes(int columnIndex) throws SQLException\n {\n return m_rs.getBytes(columnIndex);\n }",
"public byte getValueInRowKey() {\n return valueInRowKey;\n }",
"public String[] getRowID() {\n \treturn rowID;\n }"... | [
"0.65608513",
"0.653235",
"0.65133613",
"0.645863",
"0.643314",
"0.643314",
"0.643314",
"0.643314",
"0.643314",
"0.6394478",
"0.6394478",
"0.6394478",
"0.6394478",
"0.6394478",
"0.620466",
"0.6040859",
"0.6040859",
"0.6040859",
"0.6040859",
"0.6040859",
"0.60074127",
"0.597... | 0.0 | -1 |
Returns a hash code value of this RowId object. | public String toString(){
return rid;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int hashCode() {\n\t\tlong code = 0;\n\t\tint elements = _rowCount * _columnCount;\n\n\t\tfor (int i = 0; i < elements; i++) {\n\t\t\tcode += _value[i];\n\t\t}\n\n\t\treturn (int) code;\n\t}",
"@Override\n public int hashCode() {\n \n final int code = 24;\n int result = 1;\n ... | [
"0.7488086",
"0.69964284",
"0.69453067",
"0.6807432",
"0.68069005",
"0.6764924",
"0.6754098",
"0.673484",
"0.6730005",
"0.6707803",
"0.6707803",
"0.6707803",
"0.6707803",
"0.6707803",
"0.6693507",
"0.6646204",
"0.6622962",
"0.6601422",
"0.65904874",
"0.65881014",
"0.6579959",... | 0.0 | -1 |
Obtain annotation of supplied source on a model element. | public void testAnnotationOf() {
// any model element should do
EModelElement modelElement = new Emf().getEcorePackage();
EAnnotation eAnnotation = _emfAnnotations.annotationOf(modelElement, "http://rcpviewer.berlios.de/test/source");
assertNotNull(eAnnotation);
assertEquals("http://rcpviewer.berlios.de/test/source", eAnnotation.getSource());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"com.google.cloud.datalabeling.v1beta1.AnnotationSource getAnnotationSource();",
"int getAnnotationSourceValue();",
"Annotation getAnnotation();",
"public String getAnnotation();",
"public static <A extends IAnnotation> A getSourceAnnotation (ITextUnit textUnit,\r\n \t\tClass<A> type)\r\n \t{\r\n \t\tif (te... | [
"0.73569614",
"0.7066015",
"0.68869084",
"0.6865419",
"0.66585696",
"0.6551891",
"0.65380055",
"0.6431471",
"0.62802404",
"0.6094508",
"0.60108614",
"0.6000219",
"0.5962679",
"0.5958252",
"0.5934989",
"0.5905543",
"0.5862935",
"0.5809122",
"0.56885165",
"0.56885165",
"0.56616... | 0.6108588 | 9 |
The EAnnotationsdetails is a maplike construct that can be put to and got from. TODO: marked incomplete because under JUnit plugin test the first assert fails. | public void incompletetestSetEAnnotationsDetails() {
// any model element should do
EModelElement modelElement = new Emf().getEcorePackage();
EAnnotation eAnnotation = _emfAnnotations.annotationOf(modelElement, "http://rcpviewer.berlios.de/test/source");
Map<String,String> details = new HashMap<String,String>();
details.put("foo", "bar");
details.put("baz", "boz");
assertEquals(0, eAnnotation.getDetails().size());
_emfAnnotations.putAnnotationDetails(eAnnotation, details);
assertEquals(2, eAnnotation.getDetails().size());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void testGetEAnnotationsDetails() {\r\n\t\t// any model element should do\r\n\t\tEModelElement modelElement = new Emf().getEcorePackage();\r\n\t\tEAnnotation eAnnotation = _emfAnnotations.annotationOf(modelElement, \"http://rcpviewer.berlios.de/test/source\");\r\n\t\tMap<String,String> details = new HashMap... | [
"0.78691155",
"0.64298564",
"0.63747203",
"0.6242733",
"0.61644727",
"0.609811",
"0.58131737",
"0.5780057",
"0.5736702",
"0.5699265",
"0.5695871",
"0.5630149",
"0.55863833",
"0.55648714",
"0.554506",
"0.5544603",
"0.55166215",
"0.55099213",
"0.5502638",
"0.5488056",
"0.546654... | 0.7649122 | 1 |
The EAnnotationsdetails is a maplike construct that can be put to and got from. | public void testGetEAnnotationsDetails() {
// any model element should do
EModelElement modelElement = new Emf().getEcorePackage();
EAnnotation eAnnotation = _emfAnnotations.annotationOf(modelElement, "http://rcpviewer.berlios.de/test/source");
Map<String,String> details = new HashMap<String,String>();
details.put("foo", "bar");
details.put("baz", "boz");
_emfAnnotations.putAnnotationDetails(eAnnotation, details);
Map<String,String> retrievedDetails = _emfAnnotations.getAnnotationDetails(eAnnotation);
assertEquals(2, retrievedDetails.size());
assertEquals("bar", retrievedDetails.get("foo"));
assertEquals("boz", retrievedDetails.get("baz"));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void incompletetestSetEAnnotationsDetails() {\r\n\t\t// any model element should do\r\n\t\tEModelElement modelElement = new Emf().getEcorePackage();\r\n\t\tEAnnotation eAnnotation = _emfAnnotations.annotationOf(modelElement, \"http://rcpviewer.berlios.de/test/source\");\r\n\t\tMap<String,String> details = n... | [
"0.6878387",
"0.6475439",
"0.6169605",
"0.60403895",
"0.6010531",
"0.59241563",
"0.5793409",
"0.57099676",
"0.5679133",
"0.56574976",
"0.56139773",
"0.55382067",
"0.55350345",
"0.5529698",
"0.5529683",
"0.54913914",
"0.54912204",
"0.5457097",
"0.5427913",
"0.5416235",
"0.5383... | 0.70089734 | 0 |
returning JSON objects, not HTML | protected void processRequest(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
response.setContentType("application/json");
try (PrintWriter out = response.getWriter()) {
Gson gson = new Gson();
ProblemsManager problemsManager = ServletUtils.getProblemsManager(getServletContext());
List<TimeTableProblem> problemList = problemsManager.getProblems();
List<DTOShortProblem> shortProblemsList= new LinkedList<>();
for(TimeTableProblem problem:problemList)
{
shortProblemsList.add(new DTOShortProblem(problem));
}
String json = gson.toJson(shortProblemsList);
out.println(json);
out.flush();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"String getJSON();",
"public String getJson();",
"String getJson();",
"String getJson();",
"String getJson();",
"public String toJSONResult() {\n StringBuilder pageJSON = new StringBuilder();\n pageJSON.append(\"{\\\"id\\\": \");\n pageJSON.append(\"\\\"\");\n pageJSON.append(g... | [
"0.72045124",
"0.7198799",
"0.7096176",
"0.7096176",
"0.7096176",
"0.68508893",
"0.66696286",
"0.66453475",
"0.660813",
"0.66037256",
"0.656432",
"0.6518935",
"0.6518935",
"0.6518935",
"0.6517347",
"0.65032774",
"0.64997154",
"0.64645773",
"0.6456972",
"0.6412172",
"0.6409974... | 0.0 | -1 |
Handles the HTTP GET method. | @Override
protected void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
processRequest(request, response);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void doGet( )\n {\n \n }",
"@Override\n\tprotected void executeGet(GetRequest request, OperationResponse response) {\n\t}",
"@Override\n\tprotected Method getMethod() {\n\t\treturn Method.GET;\n\t}",
"@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) thro... | [
"0.7589819",
"0.71670026",
"0.71134603",
"0.7056349",
"0.7030202",
"0.70289457",
"0.6996126",
"0.6975816",
"0.6888662",
"0.6873633",
"0.6853793",
"0.6843488",
"0.6843488",
"0.68354696",
"0.68354696",
"0.68354696",
"0.6819225",
"0.6818393",
"0.6797782",
"0.6780766",
"0.6761152... | 0.0 | -1 |
Handles the HTTP POST method. | @Override
protected void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
processRequest(request, response);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic void doPost(Request request, Response response) {\n\n\t}",
"@Override\n protected void doPost(HttpServletRequest req, HttpServletResponse resp) {\n }",
"public void doPost( )\n {\n \n }",
"@Override\n public String getMethod() {\n return \"POST\";\n ... | [
"0.7327792",
"0.71364146",
"0.71150917",
"0.7103484",
"0.7098967",
"0.7022197",
"0.7014374",
"0.6963617",
"0.6887727",
"0.67830557",
"0.6772561",
"0.67459744",
"0.6666483",
"0.65569043",
"0.655617",
"0.65236866",
"0.6523533",
"0.6523533",
"0.6523533",
"0.652217",
"0.65187013"... | 0.0 | -1 |
Returns a short description of the servlet. | @Override
public String getServletInfo() {
return "Short description";
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getServletInfo()\n {\n return \"Short description\";\n }",
"public String getServletInfo() {\n return \"Short description\";\n }",
"public String getServletInfo() {\n return \"Short description\";\n }",
"public String getServletInfo() {\n return \"Short d... | [
"0.87634975",
"0.8732279",
"0.8732279",
"0.8732279",
"0.8732279",
"0.8732279",
"0.8732279",
"0.8732279",
"0.8732279",
"0.8732279",
"0.8732279",
"0.8699131",
"0.8699131",
"0.8699131",
"0.8699131",
"0.8699131",
"0.8699131",
"0.8531295",
"0.8531295",
"0.85282224",
"0.85282224",
... | 0.0 | -1 |
TODO Autogenerated method stub | public static void main(String[] args) {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.608016... | 0.0 | -1 |
Complete the alternate function below. | static int alternate(String s) {
HashMap<Character,Integer>mapCharacter = new HashMap<>();
LinkedList<String>twoChar=new LinkedList<>();
LinkedList<Character>arr=new LinkedList<>();
Stack<String>stack=new Stack<>();
int largest=0;
int counter=0;
if (s.length()==1){
return 0;
}
for (int i =0; i<s.length();i++){
if (mapCharacter.get(s.charAt(i))==null)
{
mapCharacter.put(s.charAt(i),1);
}
}
Iterator iterator=mapCharacter.entrySet().iterator();
while (iterator.hasNext()){
counter++;
Map.Entry entry=(Map.Entry)iterator.next();
arr.addFirst((Character) entry.getKey());
}
for (int i=0;i<arr.size();i++){
for (int j=i;j<arr.size();j++){
StringBuilder sb =new StringBuilder();
for (int k=0;k<s.length();k++){
if (s.charAt(k)==arr.get(i)||s.charAt(k)==arr.get(j)){
sb.append(s.charAt(k));
}
}
twoChar.addFirst(sb.toString());
}
}
for (int b=0;b<twoChar.size();b++){
String elementIn=twoChar.get(b);
stack.push(elementIn);
for (int i=0;i<elementIn.length()-1;i++){
if (elementIn.charAt(i)==elementIn.charAt(i+1)){
stack.pop();
break;
}
}
}
int stackSize=stack.size();
for (int j=0;j<stackSize;j++){
String s1=stack.pop();
int length=s1.length();
if (length>largest){
largest=length;
}
}
return largest;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void alternateFunction()\n\t{\n\t\tstart();\n\t\trunAlgorithm();\n\t}",
"protected abstract void recombineNext();",
"private static void askForContinue() {\n\t\t\t\n\t\t}",
"@Override\r\n\tprotected void doNext() {\n\t\t\r\n\t}",
"public void Exterior() {\n\t\t\r\n\t}",
"private static void FinalI... | [
"0.6724797",
"0.59093314",
"0.56747663",
"0.56430507",
"0.5636688",
"0.5598483",
"0.55719554",
"0.5535149",
"0.5510747",
"0.54792476",
"0.54694206",
"0.5443901",
"0.54332",
"0.54225355",
"0.53974223",
"0.53857386",
"0.538218",
"0.537931",
"0.5375415",
"0.5373937",
"0.53438586... | 0.0 | -1 |
/ BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(System.in)); BufferedWriter bufferedWriter = new BufferedWriter(new FileWriter(System.getenv("OUTPUT_PATH"))); int l = Integer.parseInt(bufferedReader.readLine().trim()); String s = bufferedReader.readLine(); int result = alternate(s); bufferedWriter.write(String.valueOf(result)); bufferedWriter.newLine(); bufferedReader.close(); bufferedWriter.close(); | public static void main(String[] args) throws IOException {
System.out.println(alternate("a"));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void main(String[] args) throws IOException {\n BufferedReader bufferedReader = new BufferedReader(new\n InputStreamReader(System.in));\n BufferedWriter bufferedWriter = new BufferedWriter(new\n FileWriter(System.getenv(\"OUTPUT_PATH\")));\n\n String[] nr = buffered... | [
"0.644127",
"0.6437877",
"0.62973493",
"0.60717887",
"0.59765375",
"0.5963494",
"0.59364784",
"0.5929248",
"0.58900064",
"0.58420664",
"0.58124703",
"0.57847804",
"0.57502466",
"0.5748725",
"0.57397145",
"0.5684764",
"0.56734866",
"0.56648433",
"0.5656102",
"0.5651956",
"0.56... | 0.0 | -1 |
Private constructor save pool to database if database is empty save total score to database if database is empty save max score to database if database is empty | private DatabaseCustomAccess(Context context) {
helper = new SpokaneValleyDatabaseHelper(context);
saveInitialPoolLocation(); // save initial pools into database
saveInitialTotalScore(); // create total score in database
saveInitialGameLocation(); // create game location for GPS checking
LoadingDatabaseTotalScore();
LoadingDatabaseScores();
LoadingDatabaseGameLocation();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void save() {\n settingService.saveMaxScore(score);\r\n// powerUpCount = 0;\r\n// powerDownCount = 0;\r\n// purplePowerCount = 0;\r\n// yellowMadnessCount = 0;\r\n// shapeCount = 0;\r\n }",
"private void LoadingDatabaseScores() {\n\n\t\tCursor cursor = helper.g... | [
"0.61567926",
"0.58053714",
"0.57113117",
"0.57040673",
"0.5674966",
"0.5632094",
"0.5604236",
"0.5586849",
"0.55519813",
"0.5543797",
"0.54785925",
"0.5445065",
"0.5434559",
"0.54328763",
"0.5414064",
"0.5340924",
"0.5335145",
"0.5331311",
"0.5272377",
"0.52483743",
"0.52304... | 0.5265032 | 19 |
register total score to database as 0 if total score table is empty | private void saveInitialTotalScore() {
helper.insertTotalScoreData(TotalScoretableName, totalScoreID, "0");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void LoadingDatabaseTotalScore() {\n\n\t\tCursor cursor = helper.getDataAll(TotalScoretableName);\n\n\t\twhile (cursor.moveToNext()) {\n\t\t\t// loading each element from database\n\t\t\tString ID = cursor.getString(ID_TOTAL_SCORE_COLUMN);\n\t\t\tString totalPoint = cursor.getString(POINT_TOTAL_SCORE_COLUM... | [
"0.6602953",
"0.65473795",
"0.6523328",
"0.6494208",
"0.6478222",
"0.6362069",
"0.6283852",
"0.6265544",
"0.62387437",
"0.6177953",
"0.6165046",
"0.6128991",
"0.612429",
"0.609682",
"0.607243",
"0.6062335",
"0.6049272",
"0.6042652",
"0.6039644",
"0.6032442",
"0.5982557",
"0... | 0.778667 | 0 |
Return original database access | public SpokaneValleyDatabaseHelper getDatabase() {
return helper;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n public Db_db currentDb(){return curDb_;}",
"<DB extends ODatabase> DB getUnderlying();",
"public ODatabaseInternal<?> db() {\n return ODatabaseRecordThreadLocal.INSTANCE.get().getDatabaseOwner();\n }",
"public String getDatabase();",
"Object getDB();",
"String getDatabase();",
... | [
"0.69789624",
"0.69691145",
"0.68893254",
"0.6871199",
"0.6751734",
"0.6702033",
"0.6565402",
"0.6542995",
"0.641531",
"0.6375816",
"0.6356485",
"0.63465714",
"0.6341118",
"0.62810385",
"0.62810385",
"0.62638617",
"0.62543297",
"0.62525773",
"0.62266153",
"0.6216104",
"0.6180... | 0.0 | -1 |
filter and return all pool locations in pool locations table note : pool locations table contains coupons and pool locations | public ArrayList<poolLocation> getPoolList() {
LoadingDatabasePoolLocation();
ArrayList<poolLocation> tempLocationList = new ArrayList<poolLocation>();
// remove coupons
for (poolLocation location : POOL_LIST) {
if ((location.getTitle().equals(pool1ID)
|| location.getTitle().equals(pool2ID) || location
.getTitle().equals(pool3ID))
&& location.getIsCouponUsed() == false) // only return any pool without buying a coupon
tempLocationList.add(location);
}
return tempLocationList;
// return POOL_LIST;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public List<String> getLocationAndCity(){\n\t\treturn jtemp.queryForList(\"SELECT location_id||city FROM locations\", String.class);\n\t}",
"@Query(\"select l from Location l where idLocation not in (select location.idLocation from LocationStore lo)\")\n List<Location> findAvailableLocation();",
"@Transact... | [
"0.56981605",
"0.5606174",
"0.5530822",
"0.54451233",
"0.54265475",
"0.53893685",
"0.5338083",
"0.53283334",
"0.53216183",
"0.5299121",
"0.5285976",
"0.52378476",
"0.5237326",
"0.51976687",
"0.51758796",
"0.5166731",
"0.51582295",
"0.50933224",
"0.5071048",
"0.5060776",
"0.50... | 0.6034294 | 0 |
filter and return coupon list note :pool locations table contains coupons and pool locations | public ArrayList<poolLocation> getCouponList() {
LoadingDatabasePoolLocation();
ArrayList<poolLocation> temp_CouponList = new ArrayList<poolLocation>();
// remove coupons
for (poolLocation location : POOL_LIST) {
if ((location.getTitle().equals(coupon1ID)
|| location.getTitle().equals(coupon2ID) || location
.getTitle().equals(coupon3ID))
&& location.getIsCouponUsed() == true) // only show coupons which are bought from the mall
temp_CouponList.add(location);
}
return temp_CouponList;
// return POOL_LIST;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public ArrayList<poolLocation> getPoolList() {\n\n\t\tLoadingDatabasePoolLocation();\n\n\t\tArrayList<poolLocation> tempLocationList = new ArrayList<poolLocation>();\n\t\t// remove coupons\n\t\tfor (poolLocation location : POOL_LIST) {\n\t\t\tif ((location.getTitle().equals(pool1ID)\n\t\t\t\t\t|| location.getTitle... | [
"0.6521482",
"0.5913454",
"0.569883",
"0.56545067",
"0.5622105",
"0.5597491",
"0.5543475",
"0.55069065",
"0.55063957",
"0.5484053",
"0.539288",
"0.5314025",
"0.53005266",
"0.52457184",
"0.5234415",
"0.5230944",
"0.5207787",
"0.5152656",
"0.5147692",
"0.5143841",
"0.51056755",... | 0.7296686 | 0 |
return arrayList of max scores for games | public ArrayList<gameModel> getScoreList() {
LoadingDatabaseScores();
return SCORE_LIST;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int getMax(){ //find the max Score\n\t\tint max = Integer.MIN_VALUE;\n\t for(int i=0; i<scoreList.size(); i++){\n\t if(scoreList.get(i) > max){\n\t max = scoreList.get(i);\n\t }\n\t }\n\t return max;\n\t}",
"public ArrayList<Double> getFiveHighestScore() {\n int si... | [
"0.6965215",
"0.6586461",
"0.65675145",
"0.6397097",
"0.63951784",
"0.6342545",
"0.6265612",
"0.6214683",
"0.60359883",
"0.60210127",
"0.6020737",
"0.5951405",
"0.59449774",
"0.59379077",
"0.5920799",
"0.59183",
"0.58798814",
"0.5860105",
"0.58469224",
"0.58468103",
"0.584598... | 0.5524476 | 61 |
return arrayList of game locations | public ArrayList<gameLocation> getGameList() {
LoadingDatabaseGameLocation();
return GAME_LIST;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public ArrayList<Location> getLocations()\n {\n ArrayList<Location> locs = new ArrayList<>();\n for (int row = 0; row < squares.length; row++)\n {\n for (int col = 0; col < squares[0].length; col++)\n {\n locs.add(new Location(row,col));\n }\n... | [
"0.7662291",
"0.7297666",
"0.7212381",
"0.7192795",
"0.71272177",
"0.6934707",
"0.68370533",
"0.67951584",
"0.6790293",
"0.6770006",
"0.6768162",
"0.6717556",
"0.6678903",
"0.6670269",
"0.66355914",
"0.6553941",
"0.6486367",
"0.64580524",
"0.64456654",
"0.6445335",
"0.6423031... | 0.7398431 | 1 |
load total score from database,store to backup value and return it | public int getTotalScore() {
LoadingDatabaseTotalScore();
return totalScore;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void LoadingDatabaseTotalScore() {\n\n\t\tCursor cursor = helper.getDataAll(TotalScoretableName);\n\n\t\twhile (cursor.moveToNext()) {\n\t\t\t// loading each element from database\n\t\t\tString ID = cursor.getString(ID_TOTAL_SCORE_COLUMN);\n\t\t\tString totalPoint = cursor.getString(POINT_TOTAL_SCORE_COLUM... | [
"0.79513603",
"0.69218546",
"0.6701659",
"0.66986746",
"0.6654535",
"0.6617098",
"0.64648795",
"0.64648795",
"0.64648795",
"0.64648795",
"0.6441692",
"0.63711",
"0.6370792",
"0.63492846",
"0.63323724",
"0.63283515",
"0.63042253",
"0.6295351",
"0.62632793",
"0.6259657",
"0.618... | 0.6746242 | 2 |
load inital game locations if database pool location table is empty | private void saveInitialGameLocation() {
GAME_LIST = new ArrayList<gameLocation>();
for (int i = 0; i < NumGameLocation; i++) {
addNewGame(getGameLocation(i));
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void LoadingDatabaseGameLocation() {\n\n\t\tCursor cursor = helper.getDataAll(GamelocationTableName);\n\n\t\t// id_counter = cursor.getCount();\n\n\t\tGAME_LIST.clear();\n\n\t\twhile (cursor.moveToNext()) {\n\t\t\t// loading each element from database\n\t\t\tString ID = cursor.getString(ID_GAME_LCOATION_CO... | [
"0.6900891",
"0.6582891",
"0.59991425",
"0.5994154",
"0.59824526",
"0.595195",
"0.59414876",
"0.58384144",
"0.58362067",
"0.5832965",
"0.5820695",
"0.5792407",
"0.57532895",
"0.5729984",
"0.5713808",
"0.5695983",
"0.56947297",
"0.56770307",
"0.5664909",
"0.5655705",
"0.565103... | 0.6403243 | 2 |
load inital pool locations and coupons if database pool location table is empty | private void saveInitialPoolLocation() {
POOL_LIST = new ArrayList<poolLocation>();
for (int i = 0; i < NumPool; i++) {
addNewPool(getPoolLocation(i));
}
for (int i = 0; i < NumCoupon; i++) {
addNewPool(getCouponLocation(i));
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void LoadingDatabasePoolLocation() {\n\n\t\tCursor cursor = helper.getDataAll(PooltableName);\n\n\t\t// id_counter = cursor.getCount();\n\n\t\tPOOL_LIST.clear();\n\n\t\twhile (cursor.moveToNext()) {\n\t\t\t// loading each element from database\n\t\t\tString ID = cursor.getString(ID_POOL_LCOATION_COLUMN);\n... | [
"0.72056216",
"0.6275722",
"0.6095738",
"0.59069353",
"0.5860973",
"0.5739522",
"0.5731178",
"0.5718716",
"0.56959736",
"0.56682587",
"0.56382805",
"0.5604956",
"0.55966634",
"0.55872786",
"0.557109",
"0.5569788",
"0.55469745",
"0.5543496",
"0.55270994",
"0.54949784",
"0.5490... | 0.66360384 | 1 |
create poolLocation based on ID,generate thumbnail for each pool locations using ThumbNailFactory | private poolLocation getPoolLocation(int ID) {
poolLocation pool = null;
if (ID == 0) {
pool = new poolLocation(pool1ID, pool1Description, false,
ThumbNailFactory.create().getThumbNail(pool1ID));
} else if (ID == 1) {
pool = new poolLocation(pool2ID, pool2Description, false,
ThumbNailFactory.create().getThumbNail(pool2ID));
} else if (ID == 2) {
pool = new poolLocation(pool3ID, pool3Descrption, false,
ThumbNailFactory.create().getThumbNail(pool3ID));
}
return pool;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void GenerateImageArea(int id)\n\t{\n\t\tareaHeight += 190;\n\t\tHome.createArticle.setPreferredSize(new Dimension(800, areaHeight));\n\t\t\n\t\ti++;\n\t\tgbc.gridx = 0;\n\t\tgbc.gridy = i;\n\t\tgbc.gridwidth = 1;\n\t\tgbc.anchor = GridBagConstraints.LINE_START;\n\t\tgbc.insets = new Insets(10, 0, 0,... | [
"0.58369076",
"0.57349706",
"0.547172",
"0.5465385",
"0.53774965",
"0.5292429",
"0.5287357",
"0.5280541",
"0.52314556",
"0.5155057",
"0.5147453",
"0.5133492",
"0.50822103",
"0.5055234",
"0.5011644",
"0.49872026",
"0.49617362",
"0.49341312",
"0.49315363",
"0.49121472",
"0.4903... | 0.6187498 | 0 |
create coupons based on ID,generate thumbnail for each coupons using ThumbNailFactory for convenience, coupons use poolLocation class aslo | private poolLocation getCouponLocation(int ID) {
poolLocation coupon = null;
if (ID == 0) {
coupon = new poolLocation(coupon1ID, Coupon1Description, false,
ThumbNailFactory.create().getThumbNail(coupon1ID));
} else if (ID == 1) {
coupon = new poolLocation(coupon2ID, Coupon2Description, false,
ThumbNailFactory.create().getThumbNail(coupon2ID));
} else if (ID == 2) {
coupon = new poolLocation(coupon3ID, Coupon3Description, false,
ThumbNailFactory.create().getThumbNail(coupon3ID));
}
return coupon;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void GenerateImageArea(int id)\n\t{\n\t\tareaHeight += 190;\n\t\tHome.createArticle.setPreferredSize(new Dimension(800, areaHeight));\n\t\t\n\t\ti++;\n\t\tgbc.gridx = 0;\n\t\tgbc.gridy = i;\n\t\tgbc.gridwidth = 1;\n\t\tgbc.anchor = GridBagConstraints.LINE_START;\n\t\tgbc.insets = new Insets(10, 0, 0,... | [
"0.5839425",
"0.5666421",
"0.5570192",
"0.54687613",
"0.5448112",
"0.5304718",
"0.52139014",
"0.5131949",
"0.5084653",
"0.5069662",
"0.5060349",
"0.5022487",
"0.50087",
"0.4994674",
"0.49616867",
"0.49484384",
"0.49362206",
"0.491595",
"0.4915051",
"0.489998",
"0.48959014",
... | 0.5382186 | 5 |
create game locations based on ID,generate thumbnail for each coupons using ThumbNailFactory for convenience, coupons use poolLocation class aslo | private gameLocation getGameLocation(int ID) {
gameLocation game = null;
if (ID == 0) {
game = new gameLocation(AppleID, AppleDescription, false);
} else if (ID == 1) {
game = new gameLocation(DiscoveryID, DiscoveryDescription, false);
} else if (ID == 2) {
game = new gameLocation(PlantesFerryID, PlantesFerryDescription, false);
}else if (ID == 3) {
game = new gameLocation(GreenacresID, GreenacresDescription, false);
}
return game;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected static LinkedList<Location> generateLocations() {\n int i = 0;\n LinkedList<Location> list = new LinkedList<Location>();\n ClassLoader classLoader = Thread.currentThread().getContextClassLoader();\n ImagePacker gearImgs = new ImagePacker();\n\n try {\n gearIm... | [
"0.6468217",
"0.5989509",
"0.5987685",
"0.59249336",
"0.5720493",
"0.5687623",
"0.5683606",
"0.56170326",
"0.5524302",
"0.54560834",
"0.53920805",
"0.5360635",
"0.5305748",
"0.5293404",
"0.52710974",
"0.5251545",
"0.51943696",
"0.5183492",
"0.51685417",
"0.51590157",
"0.51313... | 0.50572145 | 28 |
Custom access to pool location database table : add new pool locations or coupons to pool location table | public void addNewPool(poolLocation pool) {
// add to database here
Cursor checking_avalability = helper.getPoolLocationData(PooltableName,
pool.getTitle());
if (checking_avalability == null) {
POOL_LIST.add(pool);
long RowIds = helper.insertPoolLocation(PooltableName,
pool.getTitle(), pool.getDescription(),
convertToString(pool.getIsCouponUsed()));
//if (RowIds == -1)
//Log.d(TAG, "Error on inserting columns");
} else if (checking_avalability.getCount() == 0) { // checking twice to make sure it will not miss
POOL_LIST.add(pool);
long RowIds = helper.insertPoolLocation(PooltableName,
pool.getTitle(), pool.getDescription(),
convertToString(pool.getIsCouponUsed()));
//if (RowIds == -1)
//Log.d(TAG, "Error on inserting columns");
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void LoadingDatabasePoolLocation() {\n\n\t\tCursor cursor = helper.getDataAll(PooltableName);\n\n\t\t// id_counter = cursor.getCount();\n\n\t\tPOOL_LIST.clear();\n\n\t\twhile (cursor.moveToNext()) {\n\t\t\t// loading each element from database\n\t\t\tString ID = cursor.getString(ID_POOL_LCOATION_COLUMN);\n... | [
"0.65160996",
"0.6200774",
"0.6002989",
"0.5883878",
"0.58476394",
"0.5834624",
"0.57751167",
"0.5745849",
"0.5742014",
"0.56307656",
"0.56278616",
"0.560656",
"0.546503",
"0.5464927",
"0.54231393",
"0.5394",
"0.53786063",
"0.5272472",
"0.52685773",
"0.5255019",
"0.5241982",
... | 0.70339966 | 0 |
Custom access to game location database table : add new game locations to game location table | public void addNewGame(gameLocation game) {
// add to database here
Cursor checking_avalability = helper.getGameLocationData(GamelocationTableName,
game.getTitle());
if (checking_avalability == null) {
GAME_LIST.add(game);
long RowIds = helper.insertGameLocation(GamelocationTableName,
game.getTitle(), game.getDescription(),
convertToString(game.getIsCouponUsed()));
//if (RowIds == -1)
//Log.d(TAG, "Error on inserting columns");
} else if (checking_avalability.getCount() == 0) { // checking twice to make sure it will not miss
GAME_LIST.add(game);
long RowIds = helper.insertGameLocation(GamelocationTableName,
game.getTitle(), game.getDescription(),
convertToString(game.getIsCouponUsed())); // reuse method
//if (RowIds == -1)
//Log.d(TAG, "Error on inserting columns");
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void addLocationToDatabase(Location location){\n if(recordLocations){\n JourneyLocation journeyLocation = new JourneyLocation(currentJourneyId, new LatLng(location.getLatitude(), location.getLongitude()), System.currentTimeMillis());\n interactor.addLocation(journeyLocation);\n... | [
"0.6753755",
"0.65530276",
"0.64657164",
"0.63597965",
"0.62261605",
"0.61528015",
"0.61268765",
"0.6104394",
"0.6098643",
"0.6072621",
"0.6030124",
"0.6004719",
"0.59915704",
"0.59763837",
"0.5965077",
"0.59465665",
"0.5880224",
"0.58726496",
"0.58703077",
"0.5844585",
"0.58... | 0.67986834 | 0 |
convert boolean to string 0 or 1 0 :not used 1: used | private String convertToString(boolean isUsed) {
if (isUsed)
return "1";
return "0";
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String toBooleanValueString(boolean bool) {\n \t\treturn bool ? \"1\" : \"0\";\n \t}",
"public static String booleanToString(boolean val){\n return val ? \"1\" : \"0\";\n }",
"private String boolToIntString(boolean bool) {\n return bool ? \"1\" : \"0\";\n }",
"private String boolea... | [
"0.79704577",
"0.78736806",
"0.78626543",
"0.7444193",
"0.687232",
"0.67840254",
"0.6780229",
"0.66835266",
"0.64518774",
"0.64000446",
"0.63624704",
"0.6360203",
"0.6339673",
"0.6327172",
"0.6327172",
"0.6314372",
"0.62201667",
"0.62053955",
"0.61636126",
"0.61635053",
"0.61... | 0.77244127 | 3 |
load total score from database | private void LoadingDatabaseTotalScore() {
Cursor cursor = helper.getDataAll(TotalScoretableName);
while (cursor.moveToNext()) {
// loading each element from database
String ID = cursor.getString(ID_TOTAL_SCORE_COLUMN);
String totalPoint = cursor.getString(POINT_TOTAL_SCORE_COLUMN);
totalScore = Integer.parseInt(totalPoint); // store total score from database to backup value
} // travel to database result
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void loadScore() {\n for (int i = 0; i < 4; i++) {\n int[] enemyTankNum = CollisionUtility.getEnemyTankNum();\n tankNumList[i] = enemyTankNum[i];\n }\n for (int i = 0; i < 4; i++) {\n tankScoreList[i] = tankNumList[i] * 100 * (i + 1);\n }\n ... | [
"0.6909831",
"0.68779504",
"0.68537074",
"0.6843691",
"0.6705346",
"0.66957664",
"0.6645696",
"0.66108906",
"0.64479715",
"0.6418834",
"0.63403463",
"0.6337954",
"0.6317671",
"0.62993956",
"0.62993956",
"0.62993956",
"0.62993956",
"0.625706",
"0.61554897",
"0.61431944",
"0.61... | 0.835875 | 0 |
load max score table to SCORE_LIST array list. create new arrayList every time it is called to make sure list is uptodate limit call due to memory cost | private void LoadingDatabaseScores() {
Cursor cursor = helper.getDataAll(ScoretableName);
// id_counter = cursor.getCount();
SCORE_LIST = new ArrayList<gameModel>();
while (cursor.moveToNext()) {
// loading each element from database
String ID = cursor.getString(ID_MAXSCORE_COLUMN);
String Score = cursor.getString(SCORE_MAXSCORE_COLUMN);
SCORE_LIST.add(new gameModel(ID, Integer.parseInt(Score),
ThumbNailFactory.create().getThumbNail(ID)));
} // travel to database result
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void loadScore() {\n for (int i = 0; i < 4; i++) {\n int[] enemyTankNum = CollisionUtility.getEnemyTankNum();\n tankNumList[i] = enemyTankNum[i];\n }\n for (int i = 0; i < 4; i++) {\n tankScoreList[i] = tankNumList[i] * 100 * (i + 1);\n }\n ... | [
"0.6235224",
"0.6058891",
"0.590366",
"0.58682036",
"0.5825921",
"0.57619536",
"0.57223374",
"0.571854",
"0.5696727",
"0.56897783",
"0.5682994",
"0.5648582",
"0.56165963",
"0.55666536",
"0.55612624",
"0.55372715",
"0.5526743",
"0.5524891",
"0.55095166",
"0.5507436",
"0.549983... | 0.7349569 | 0 |
load pool locations and coupons to LOOK_LIST array list. create new arrayList every time it is called to make sure list is uptodate limit call due to memory cost | private void LoadingDatabasePoolLocation() {
Cursor cursor = helper.getDataAll(PooltableName);
// id_counter = cursor.getCount();
POOL_LIST.clear();
while (cursor.moveToNext()) {
// loading each element from database
String ID = cursor.getString(ID_POOL_LCOATION_COLUMN);
String Description = cursor
.getString(DESCRIPTION_POOL_LCOATION_COLUMN);
String isCouponUsed = cursor.getString(COUPON_IS_USED_COLUMN);
POOL_LIST.add(new poolLocation(ID, Description,
isUsed(isCouponUsed), ThumbNailFactory.create()
.getThumbNail(ID)));
} // travel to database result
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void initList() {\n\n\t\tfor (int i = 0; i < lstPool.size(); i++) {\n\t\t\tpoolList.add(createPool(\"nomPool\", lstPool.get(i).getNomPool()));\n\t\t}\n\t}",
"private void saveInitialPoolLocation() {\n\n\t\tPOOL_LIST = new ArrayList<poolLocation>();\n\n\t\tfor (int i = 0; i < NumPool; i++) {\n\t\t\taddNew... | [
"0.67758185",
"0.6421077",
"0.62841666",
"0.6103787",
"0.5980011",
"0.5958889",
"0.5902488",
"0.5767983",
"0.57356584",
"0.57113194",
"0.56755716",
"0.5653752",
"0.55823416",
"0.5557195",
"0.55547684",
"0.5553654",
"0.550503",
"0.54611945",
"0.5457868",
"0.54515016",
"0.54492... | 0.7254692 | 0 |
load game locations to GAME_LIST array list. create new arrayList every time it is called to make sure list is uptodate limit call due to memory cost | private void LoadingDatabaseGameLocation() {
Cursor cursor = helper.getDataAll(GamelocationTableName);
// id_counter = cursor.getCount();
GAME_LIST.clear();
while (cursor.moveToNext()) {
// loading each element from database
String ID = cursor.getString(ID_GAME_LCOATION_COLUMN);
String Description = cursor
.getString(DESCRIPTION_GAME_LCOATION_COLUMN);
String isGameVisited = cursor.getString(GAME_IS_VISITED_COLUMN);
GAME_LIST.add(new gameLocation(ID, Description,
isUsed(isGameVisited)));
Log.d(TAG, "game ID : "+ ID);
} // travel to database result
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void saveInitialGameLocation() {\n\n\t\tGAME_LIST = new ArrayList<gameLocation>();\n\n\t\tfor (int i = 0; i < NumGameLocation; i++) {\n\t\t\taddNewGame(getGameLocation(i));\n\t\t}\n\t}",
"public ArrayList<gameLocation> getGameList() {\n\t\tLoadingDatabaseGameLocation();\n\t\treturn GAME_LIST;\n\t}",
"p... | [
"0.6967564",
"0.68028903",
"0.63304234",
"0.62131846",
"0.6131602",
"0.6072838",
"0.6053569",
"0.59799355",
"0.582541",
"0.5824623",
"0.5778741",
"0.5758192",
"0.5744629",
"0.5736517",
"0.5732557",
"0.57302356",
"0.5721095",
"0.57025874",
"0.5699855",
"0.5679972",
"0.5675161"... | 0.72954535 | 0 |
convert boolean isUsed in database from String back to boolean | private boolean isUsed(String couponType) { // 0 = not used , 1 = used
if (1 == Integer.parseInt(couponType)) // used
return true;
return false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\t\tpublic Boolean convert(String s) {\n\t\t\tString value = s.toLowerCase();\n\t\t\tif (\"true\".equals(value) || \"1\".equals(value) /* || \"yes\".equals(value) || \"on\".equals(value) */) {\n\t\t\t\treturn Boolean.TRUE;\n\t\t\t}\n\t\t\telse if (\"false\".equals(value) || \"0\".equals(value) /* || \"n... | [
"0.7192412",
"0.6971635",
"0.67653835",
"0.6716065",
"0.6686018",
"0.66205734",
"0.6545711",
"0.6533183",
"0.6530333",
"0.649725",
"0.64414155",
"0.6441198",
"0.6416056",
"0.63804746",
"0.63677275",
"0.63510656",
"0.63510656",
"0.6333155",
"0.6315326",
"0.62669057",
"0.624739... | 0.0 | -1 |
register max score for apple game in database | public void saveInitialScoretoDatabase_AppleGame(int score) {
saveInitialScoretoDatabase(score, AppleID);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int saveMaxScore_AppleGame(int score) {\n\t\treturn saveMaxScore(score, AppleID);\n\t}",
"public int saveMaxScore_PlantesFerryGame(int score) {\n\t\treturn saveMaxScore(score, PlantesFerryID);\n\t}",
"public int saveMaxScore_DiscoveryGame(int score) {\n\t\treturn saveMaxScore(score, DiscoveryID);\n\t}",... | [
"0.74575216",
"0.6946765",
"0.68378663",
"0.67573303",
"0.6627857",
"0.66184205",
"0.6582443",
"0.63935184",
"0.6243073",
"0.6233753",
"0.62168086",
"0.6201834",
"0.61574084",
"0.61503035",
"0.61429554",
"0.61429554",
"0.61429554",
"0.61429554",
"0.61346155",
"0.61343175",
"0... | 0.6460648 | 7 |
register max score for discovery game in database | public void saveInitialScoretoDatabase_DiscoveryGame(int score) {
saveInitialScoretoDatabase(score, DiscoveryID);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int saveMaxScore_DiscoveryGame(int score) {\n\t\treturn saveMaxScore(score, DiscoveryID);\n\t}",
"public int saveMaxScore_PlantesFerryGame(int score) {\n\t\treturn saveMaxScore(score, PlantesFerryID);\n\t}",
"public int saveMaxScore_GreenacresGame(int score) {\n\t\treturn saveMaxScore(score, GreenacresI... | [
"0.74880856",
"0.6947713",
"0.67987376",
"0.66360694",
"0.64762884",
"0.6459304",
"0.64426035",
"0.6326422",
"0.6313797",
"0.62316626",
"0.6190931",
"0.6168117",
"0.6151642",
"0.6135954",
"0.61123645",
"0.6111814",
"0.6107158",
"0.6095188",
"0.6095188",
"0.6095188",
"0.609518... | 0.65176255 | 4 |
register max score for plantes ferry game in database | public void saveInitialScoretoDatabase_PlantesFerryGame(int score) {
saveInitialScoretoDatabase(score, PlantesFerryID);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int saveMaxScore_PlantesFerryGame(int score) {\n\t\treturn saveMaxScore(score, PlantesFerryID);\n\t}",
"public int saveMaxScore_GreenacresGame(int score) {\n\t\treturn saveMaxScore(score, GreenacresID);\n\t}",
"public int saveMaxScore_DiscoveryGame(int score) {\n\t\treturn saveMaxScore(score, DiscoveryI... | [
"0.781403",
"0.7153254",
"0.71260905",
"0.70492196",
"0.69503725",
"0.6890029",
"0.6858235",
"0.679387",
"0.6688562",
"0.66811794",
"0.6658326",
"0.64635444",
"0.6454452",
"0.64257264",
"0.6422886",
"0.6403683",
"0.6374985",
"0.6374985",
"0.6374985",
"0.6374985",
"0.6364686",... | 0.654856 | 11 |
register max score for greenacres game in database | public void saveInitialScoretoDatabase_GreenacresGame(int score) {
saveInitialScoretoDatabase(score, GreenacresID);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int saveMaxScore_GreenacresGame(int score) {\n\t\treturn saveMaxScore(score, GreenacresID);\n\t}",
"public int saveMaxScore_PlantesFerryGame(int score) {\n\t\treturn saveMaxScore(score, PlantesFerryID);\n\t}",
"public int saveMaxScore_DiscoveryGame(int score) {\n\t\treturn saveMaxScore(score, DiscoveryI... | [
"0.7856705",
"0.72834367",
"0.70670235",
"0.6868573",
"0.6854455",
"0.6811199",
"0.67563635",
"0.6523675",
"0.6471506",
"0.6443597",
"0.643904",
"0.63898593",
"0.63351953",
"0.6284619",
"0.6277795",
"0.6269395",
"0.6235937",
"0.6224347",
"0.6218255",
"0.6218255",
"0.6218255",... | 0.6632822 | 7 |
register max score for ski game in database | public void saveInitialScoretoDatabase_SkiGame(int score) {
saveInitialScoretoDatabase(score, SkiID);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int saveMaxScore_SkiGame(int score) {\n\t\treturn saveMaxScore(score, SkiID);\n\t}",
"public int saveMaxScore_PlantesFerryGame(int score) {\n\t\treturn saveMaxScore(score, PlantesFerryID);\n\t}",
"public int saveMaxScore_DiscoveryGame(int score) {\n\t\treturn saveMaxScore(score, DiscoveryID);\n\t}",
"... | [
"0.74896544",
"0.7341136",
"0.7226325",
"0.7088179",
"0.69099647",
"0.6794494",
"0.6762474",
"0.66671854",
"0.66386765",
"0.6564971",
"0.6472136",
"0.6454187",
"0.64194083",
"0.6397945",
"0.63954943",
"0.639485",
"0.6393252",
"0.63873804",
"0.63856435",
"0.6357924",
"0.633013... | 0.642885 | 12 |
update max score for apple game in database | public int saveMaxScore_AppleGame(int score) {
return saveMaxScore(score, AppleID);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int saveMaxScore_PlantesFerryGame(int score) {\n\t\treturn saveMaxScore(score, PlantesFerryID);\n\t}",
"private void updateHighscore() {\n if(getScore() > highscore)\n highscore = getScore();\n }",
"public void countHighest (int score){\r\n\t\tif (score > highest){\r\n\t\t\thighest... | [
"0.6812596",
"0.6665922",
"0.6664718",
"0.6628026",
"0.6612718",
"0.6594515",
"0.6591684",
"0.65435076",
"0.6539344",
"0.65012884",
"0.64633805",
"0.64356416",
"0.6364782",
"0.63317025",
"0.63054943",
"0.6302387",
"0.6293379",
"0.6192078",
"0.61912507",
"0.61585045",
"0.61568... | 0.7330693 | 0 |
update max score for discovery game in database | public int saveMaxScore_DiscoveryGame(int score) {
return saveMaxScore(score, DiscoveryID);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int saveMaxScore_PlantesFerryGame(int score) {\n\t\treturn saveMaxScore(score, PlantesFerryID);\n\t}",
"private void updateHighscore() {\n if(getScore() > highscore)\n highscore = getScore();\n }",
"void setBestScore(double bestScore);",
"public void countHighest (int score){\r\n... | [
"0.6857337",
"0.6812073",
"0.6775054",
"0.6737989",
"0.6732902",
"0.6689383",
"0.66402626",
"0.6586388",
"0.6570718",
"0.6527727",
"0.6525078",
"0.65112925",
"0.64404655",
"0.6413797",
"0.6381524",
"0.6371807",
"0.63586485",
"0.63047075",
"0.62699956",
"0.62683445",
"0.626169... | 0.7238351 | 0 |
update max score for plantes ferry game in database | public int saveMaxScore_PlantesFerryGame(int score) {
return saveMaxScore(score, PlantesFerryID);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int saveMaxScore_GreenacresGame(int score) {\n\t\treturn saveMaxScore(score, GreenacresID);\n\t}",
"private void updateHighscore() {\n if(getScore() > highscore)\n highscore = getScore();\n }",
"public void updateHighestScoreDisplay(int score){\n this.score.setText(\"Highest ... | [
"0.6930378",
"0.68875533",
"0.6879101",
"0.6876994",
"0.6808165",
"0.67890006",
"0.67835736",
"0.6777461",
"0.6766736",
"0.6749222",
"0.67410946",
"0.6650823",
"0.66398305",
"0.65204704",
"0.6498359",
"0.64770025",
"0.64736575",
"0.6445564",
"0.6438224",
"0.6436122",
"0.64290... | 0.75167406 | 0 |
update max score for greenacres game in database | public int saveMaxScore_GreenacresGame(int score) {
return saveMaxScore(score, GreenacresID);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int saveMaxScore_PlantesFerryGame(int score) {\n\t\treturn saveMaxScore(score, PlantesFerryID);\n\t}",
"private void updateHighscore() {\n if(getScore() > highscore)\n highscore = getScore();\n }",
"public void countHighest (int score){\r\n\t\tif (score > highest){\r\n\t\t\thighest... | [
"0.7014767",
"0.6779858",
"0.67432857",
"0.6701521",
"0.6679369",
"0.6642227",
"0.6622955",
"0.6580926",
"0.65400934",
"0.6510005",
"0.6459657",
"0.6448232",
"0.6423609",
"0.6392783",
"0.63346475",
"0.63128614",
"0.6308673",
"0.6291227",
"0.62630606",
"0.6245805",
"0.6224664"... | 0.75380313 | 0 |
update max score for ski game in database | public int saveMaxScore_SkiGame(int score) {
return saveMaxScore(score, SkiID);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int saveMaxScore_PlantesFerryGame(int score) {\n\t\treturn saveMaxScore(score, PlantesFerryID);\n\t}",
"void setBestScore(double bestScore);",
"private int saveMaxScore(int CurrentScore, String id) {\n\t\tCursor cursor = getDatabase().getScoreData(ScoretableName, id);\n\n\t\tint MaxScore = 0;\n\t\twhile... | [
"0.7079057",
"0.69228095",
"0.6902735",
"0.6835589",
"0.683364",
"0.6827731",
"0.68225074",
"0.67852575",
"0.6708217",
"0.67061603",
"0.6690936",
"0.66175807",
"0.65465534",
"0.6535775",
"0.6514658",
"0.6504768",
"0.64159817",
"0.63814175",
"0.6369749",
"0.6369547",
"0.634990... | 0.7331371 | 0 |
Custom access to database : register score of games into database | private void saveInitialScoretoDatabase(int score, String id) {
// save max score to database
Cursor checking_avalability = getDatabase().getScoreData(
ScoretableName, id);
if (checking_avalability == null) {
long RowIds = getDatabase().insertScoreData(ScoretableName, id,
String.valueOf(score));
//if (RowIds == -1)
//Log.d(TAG, "Error on inserting columns");
} else if (checking_avalability.getCount() == 0) {
long RowIds = getDatabase().insertScoreData(ScoretableName, id,
String.valueOf(score));
//if (RowIds == -1)
//Log.d(TAG, "Error on inserting columns");
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void saveScore(int score) {\n try {\n Connection c = DBConncetion.getConnection();\n String sql = \"INSERT INTO Score\\n\" +\n \"Values (date('now'),?)\";\n PreparedStatement pstmt = c.prepareStatement(sql);\n pstmt.setStri... | [
"0.6757669",
"0.64948213",
"0.64223826",
"0.64063525",
"0.6404085",
"0.63816166",
"0.63429135",
"0.62457085",
"0.6245607",
"0.62035686",
"0.61645514",
"0.61332184",
"0.610466",
"0.6089294",
"0.6060894",
"0.6053304",
"0.60520965",
"0.6047175",
"0.6014212",
"0.5975183",
"0.5971... | 0.59697545 | 21 |
compare max score in database and current score , save max score between those two scores | private int saveMaxScore(int CurrentScore, String id) {
Cursor cursor = getDatabase().getScoreData(ScoretableName, id);
int MaxScore = 0;
while (cursor.moveToNext()) {
// loading each element from database
String ID = cursor.getString(ID_MAXSCORE_COLUMN);
int MaxScore_temp = Integer.parseInt(cursor
.getString(SCORE_MAXSCORE_COLUMN));
if (MaxScore_temp > MaxScore)
MaxScore = MaxScore_temp;
//Log.d(TAG, "MaxScore is" + MaxScore_temp + " with ID : " + ID);
} // travel to database result
addUpTotalScore(CurrentScore);
if (MaxScore < CurrentScore) {
long RowIds = getDatabase().updateScoreTable(ScoretableName, id,
String.valueOf(CurrentScore));
//if (RowIds == -1)
//Log.d(TAG, "Error on inserting columns");
return CurrentScore;
}
return MaxScore;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void calculateHighscores(){\n if((newPlayer.getScore() > (getRecord())) && (newPlayer.getScore() > getRecord2()) && (newPlayer.getScore() > getRecord3())){\n setRecord3(getRecord2());\n setRecord2(getRecord());\n setRecord(newPlayer.getScore());\n newPlayer... | [
"0.7045788",
"0.6877945",
"0.68406916",
"0.6829211",
"0.67019325",
"0.66727376",
"0.6643172",
"0.6603481",
"0.6547653",
"0.65327334",
"0.648449",
"0.6482205",
"0.64399225",
"0.6417316",
"0.64144135",
"0.638071",
"0.63740265",
"0.6352077",
"0.63234264",
"0.6267961",
"0.6233603... | 0.73912835 | 0 |
add current score of each play in game to total score for redeeming coupons | public void addUpTotalScore(int CurrentScore) {
Cursor cursor = getDatabase().getTotalScoreData(TotalScoretableName,
totalScoreID);
int currentTotalScore = 0;
while (cursor.moveToNext()) {
// loading each element from database
String ID = cursor.getString(ID_TOTAL_SCORE_COLUMN);
int MaxScore_temp = Integer.parseInt(cursor
.getString(POINT_TOTAL_SCORE_COLUMN));
if (MaxScore_temp > currentTotalScore)
currentTotalScore = MaxScore_temp;
//Log.d(TAG, "total score is" + MaxScore_temp + " with ID : "
//+ totalScoreID);
} // travel to database result
// if(MaxScore < CurrentScore){
long RowIds = getDatabase().updateTotalScoreTable(TotalScoretableName,
totalScoreID, String.valueOf(CurrentScore + currentTotalScore));
//if (RowIds == -1)
//Log.d(TAG, "Error on inserting columns");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void addGameScoreToMainScore(){\n sharedPreferences= PreferenceManager.getDefaultSharedPreferences(this);\n editor=sharedPreferences.edit();\n int score=sharedPreferences.getInt(\"gameScore\",0);\n score=score+userCoins;\n editor.putInt(\"gameScore\",score);\n editor.commi... | [
"0.71571434",
"0.71177727",
"0.7052004",
"0.6996488",
"0.69944453",
"0.6981546",
"0.69660276",
"0.6953917",
"0.69402254",
"0.68245727",
"0.68230337",
"0.68161416",
"0.6773203",
"0.66854036",
"0.668308",
"0.668156",
"0.6679179",
"0.6671759",
"0.6658418",
"0.663534",
"0.6633471... | 0.6300315 | 54 |
update pool location after users buy coupon from this pool location | public void updatePoolwithBoughtCoupon(String ID, boolean isgteCoupon) {
helper.updatePoolLocationTable(PooltableName, ID,
convertToString(isgteCoupon));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void updateCouponwithBoughtCoupon(String ID, boolean isgetCoupon) {\n\t\thelper.updatePoolLocationTable(PooltableName, ID,\n\t\t\t\tconvertToString(isgetCoupon));\n\t}",
"private void saveInitialPoolLocation() {\n\n\t\tPOOL_LIST = new ArrayList<poolLocation>();\n\n\t\tfor (int i = 0; i < NumPool; i++) {\n... | [
"0.59523374",
"0.58697927",
"0.5776243",
"0.56936395",
"0.55949",
"0.544643",
"0.538252",
"0.53469306",
"0.53402454",
"0.5279919",
"0.5253051",
"0.5238921",
"0.5223405",
"0.51717544",
"0.5169471",
"0.51626384",
"0.51554847",
"0.513606",
"0.5134735",
"0.5129273",
"0.5127899",
... | 0.6695534 | 0 |
update coupon after users users use the coupon | public void updateCouponwithBoughtCoupon(String ID, boolean isgetCoupon) {
helper.updatePoolLocationTable(PooltableName, ID,
convertToString(isgetCoupon));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void updateCoupon(Coupon coupon) throws DbException;",
"public static void updateCoupon(Context context, String id, final Coupon c)\n {\n Query reff;\n reff= FirebaseDatabase.getInstance().getReference().child(\"coupon\").orderByChild(\"seri\").equalTo(id);\n reff.addListenerForSin... | [
"0.7754195",
"0.7055126",
"0.6973846",
"0.6796258",
"0.6745131",
"0.6527758",
"0.63859856",
"0.6286271",
"0.6270001",
"0.62530583",
"0.6193861",
"0.6174991",
"0.61549085",
"0.6111608",
"0.60978854",
"0.60812944",
"0.6026237",
"0.60053784",
"0.5996849",
"0.5965301",
"0.5948002... | 0.64682376 | 6 |
update pool location after users buy coupon from this pool location | public void updateGameLocationWithVisitOrNot(String ID, boolean isVisited) {
helper.updateGameLocationTable(GamelocationTableName, ID,
convertToString(isVisited));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void updatePoolwithBoughtCoupon(String ID, boolean isgteCoupon) {\n\t\thelper.updatePoolLocationTable(PooltableName, ID,\n\t\t\t\tconvertToString(isgteCoupon));\n\t}",
"public void updateCouponwithBoughtCoupon(String ID, boolean isgetCoupon) {\n\t\thelper.updatePoolLocationTable(PooltableName, ID,\n\t\t\t... | [
"0.66961163",
"0.59528244",
"0.58676344",
"0.5776153",
"0.56923306",
"0.55938077",
"0.54473406",
"0.53818077",
"0.5347444",
"0.5341633",
"0.52814615",
"0.5253241",
"0.5238237",
"0.52250594",
"0.517059",
"0.51686764",
"0.5162172",
"0.5158023",
"0.5137013",
"0.5135811",
"0.5129... | 0.0 | -1 |
check isVisited for specific game location | public boolean getGameLocationVisitedOrNot(String id){
Cursor cursor = getDatabase().getGameLocationData(GamelocationTableName, id);
while (cursor.moveToNext()) {
// loading each element from database
String ID = cursor.getString(ID_GAME_LCOATION_COLUMN);
String isVisitedString = cursor.getString(GAME_IS_VISITED_COLUMN);
return isUsed(isVisitedString); // return checking isVisited
} // travel to database result
return false; // default false for isVisited
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"boolean hasLocation();",
"boolean hasLocation();",
"boolean isVisited();",
"boolean isVisited();",
"boolean isGoodLocation(World world, int x, int y, int z);",
"public static boolean isVisited(UserLocation c) {\n if (VisitList.contains(c)) {\n return true;\n } else {\n ... | [
"0.69236237",
"0.69236237",
"0.6822207",
"0.6822207",
"0.6606319",
"0.65519136",
"0.6415101",
"0.6291388",
"0.62286264",
"0.62261724",
"0.6198681",
"0.61591846",
"0.6152563",
"0.6121664",
"0.6102869",
"0.60254204",
"0.6021865",
"0.6010028",
"0.6001762",
"0.5994892",
"0.598368... | 0.71878797 | 0 |
String to be used for persistence | public String save() {
return code;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public abstract String toSaveString();",
"public abstract String generateStorageString();",
"public abstract String toDBString();",
"public String getSaveString() {\n return \"\" + Value;\n }",
"public String getDBString();",
"public abstract String createDBString();",
"@Override\n public String... | [
"0.6968329",
"0.68974286",
"0.68660885",
"0.6703236",
"0.66374326",
"0.6599486",
"0.64897436",
"0.64056396",
"0.62350315",
"0.6075683",
"0.59413624",
"0.5891777",
"0.588939",
"0.587593",
"0.586291",
"0.5759466",
"0.57390994",
"0.56887376",
"0.56700027",
"0.5654222",
"0.564079... | 0.5164515 | 92 |
Localized title for UI | public CharSequence title(Context context) {
if (titleResId == 0 || context == null) {
return this.code;
} else {
return context.getText(titleResId);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"IDisplayString getTitle();",
"public String getTitle() {\n if (getMessages().contains(\"title\")) {\n return message(\"title\");\n }\n return message(MessageUtils.title(getResources().getPageName()));\n }",
"public abstract String getTitle(Locale locale);",
"@Override\n ... | [
"0.7507187",
"0.7504936",
"0.74043816",
"0.7352579",
"0.7329541",
"0.7287222",
"0.72501683",
"0.7244667",
"0.7179242",
"0.71717006",
"0.7145487",
"0.71248525",
"0.71019006",
"0.7098656",
"0.7087799",
"0.7078184",
"0.7076439",
"0.7076439",
"0.7076439",
"0.7076439",
"0.7076439"... | 0.0 | -1 |
Returns the enum or UNKNOWN | public static ActorsScreenType load(String strCode) {
for (ActorsScreenType tt : ActorsScreenType.values()) {
if (tt.code.equals(strCode)) {
return tt;
}
}
return UNKNOWN;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"com.yahoo.xpathproto.TransformTestProtos.MessageEnum getEnumValue();",
"Enum getType();",
"public abstract Enum<?> getType();",
"gov.nih.nlm.ncbi.www.MedlineSiDocument.MedlineSi.Type.Value.Enum getValue();",
"public String getEnum() {\n if (model == null)\n return strEnum;\n return model.getEnum... | [
"0.6963672",
"0.6932631",
"0.66874135",
"0.66330373",
"0.64123505",
"0.6404934",
"0.6336596",
"0.6336596",
"0.6336596",
"0.627398",
"0.625015",
"0.61679",
"0.61326486",
"0.6121916",
"0.60477906",
"0.60441655",
"0.6040512",
"0.603899",
"0.6033901",
"0.60189915",
"0.5996245",
... | 0.0 | -1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.