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 |
|---|---|---|---|---|---|---|
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 AssemblingSchemaItemValue)) {
return false;
}
AssemblingSchemaItemValue other = (AssemblingSchemaItemValue) object;
if ((this.itemValueId == null && other.itemValueId != null) || (this.itemValueId != null && !this.itemValueId.equals(other.itemValueId))) {
return false;
}
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void setId(Integer id) { this.id = id; }",
"private Integer getId() { return this.id; }",
"public void setId(int id){ this.id = id; }",
"public void setId(Long id) {this.id = id;}",
"public void setId(Long id) {this.id = id;}",
"public void setID(String idIn) {this.id = idIn;}",
"public void se... | [
"0.6896886",
"0.6838461",
"0.67056817",
"0.66419715",
"0.66419715",
"0.6592331",
"0.6579151",
"0.6579151",
"0.6574321",
"0.6574321",
"0.6574321",
"0.6574321",
"0.6574321",
"0.6574321",
"0.65624106",
"0.65624106",
"0.65441847",
"0.65243006",
"0.65154546",
"0.6487427",
"0.64778... | 0.0 | -1 |
Use this factory method to create a new instance of this fragment using the provided parameters. | public static AddMealsFragment newInstance(String param1, String param2) {
AddMealsFragment fragment = new AddMealsFragment();
Bundle args = new Bundle();
args.putString(ARG_PARAM1, param1);
args.putString(ARG_PARAM2, param2);
fragment.setArguments(args);
return fragment;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static FragmentTousWanted newInstance() {\n FragmentTousWanted fragment = new FragmentTousWanted();\n Bundle args = new Bundle();\n fragment.setArguments(args);\n return fragment;\n }",
"protected abstract Fragment createFragment();",
"public void createFragment() {\n\n ... | [
"0.7259329",
"0.72331375",
"0.71140355",
"0.69909847",
"0.69902235",
"0.6834592",
"0.683074",
"0.68134046",
"0.6801526",
"0.6801054",
"0.67653185",
"0.6739714",
"0.6739714",
"0.6727412",
"0.6717231",
"0.6705855",
"0.6692112",
"0.6691661",
"0.66869426",
"0.66606814",
"0.664618... | 0.0 | -1 |
Inflate the layout for this fragment | @Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
view = inflater.inflate(R.layout.fragment_add_meals, container, false);
return view;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_main_allinfo, container, false);\n }",
"@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup... | [
"0.6739604",
"0.67235583",
"0.6721706",
"0.6698254",
"0.6691869",
"0.6687986",
"0.66869223",
"0.6684548",
"0.66766286",
"0.6674615",
"0.66654444",
"0.66654384",
"0.6664403",
"0.66596216",
"0.6653321",
"0.6647136",
"0.66423255",
"0.66388357",
"0.6637491",
"0.6634193",
"0.66251... | 0.0 | -1 |
TODO: Rename method, update argument and hook method into UI event | public void onButtonPressed(Uri uri) {
if (mListener != null) {
mListener.onFragmentInteraction(uri);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\t\t\t\tpublic void handle(ActionEvent event) {\n\t\t\t\t}",
"@Override\n\t\t\t\tpublic void handle(ActionEvent event) {\n\n\t\t\t\t}",
"@Override\n\t\t\tpublic void handle(ActionEvent event) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void handle(ActionEvent event) {\n\t\t\t\t\n\t\t\t}",
"@... | [
"0.6619185",
"0.65246344",
"0.6473144",
"0.6473144",
"0.64351684",
"0.6325494",
"0.62368196",
"0.6189416",
"0.6158721",
"0.61455715",
"0.6123594",
"0.6107332",
"0.6101038",
"0.6092755",
"0.6049496",
"0.6049496",
"0.60442764",
"0.604003",
"0.604003",
"0.6007846",
"0.59999037",... | 0.0 | -1 |
Note : ondatachange discards the value of arraylist after it finishs | @Override
public void onDataChange(DataSnapshot dataSnapshot) {
for (DataSnapshot dataSnapshot1 : dataSnapshot.getChildren()) {
if (arrayListMealsObject.size() < mealAll) {
arrayListMealsObject.add(dataSnapshot1.getValue(meal.class));
arrayListMeals.add(dataSnapshot1.getValue(meal.class).getName());
Log.d("test", "this is meals : " + dataSnapshot1.getValue(meal.class));
// spinnerArrayAdapter2.notifyDataSetChanged();
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void onDataChanged() {\n\n }",
"public void onDataChanged(){}",
"@Override\n protected void onDataChanged() {\n }",
"void onDataChanged();",
"@Override\n public void onDataChanged() {\n }",
"@Override\n public void onDataChanged() {\... | [
"0.6938806",
"0.693323",
"0.68833476",
"0.6813226",
"0.6790961",
"0.6790961",
"0.67424464",
"0.6695146",
"0.66206163",
"0.64876693",
"0.648393",
"0.64176655",
"0.64084893",
"0.62942415",
"0.6285888",
"0.6254521",
"0.62283236",
"0.62061626",
"0.6182531",
"0.61824846",
"0.61696... | 0.5680474 | 81 |
TODO: Update argument type and name | void onFragmentInteraction(Uri uri); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n public String getFirstArg() {\n return name;\r\n }",
"@Override\n public int getNumberArguments() {\n return 1;\n }",
"java.lang.String getArg();",
"@Override\n public int getArgLength() {\n return 4;\n }",
"Argument createArgument();",
"@Override\r\n\tpublic ... | [
"0.7164074",
"0.6946075",
"0.6714363",
"0.65115863",
"0.63969076",
"0.6375468",
"0.63481104",
"0.63162106",
"0.6260299",
"0.6208487",
"0.6208487",
"0.62070644",
"0.6197276",
"0.61806154",
"0.6177103",
"0.61530507",
"0.61472267",
"0.61243707",
"0.60771817",
"0.6054482",
"0.599... | 0.0 | -1 |
arrayListNamesEx = new ArrayList(); arrayListNamesEx.clear(); | public void mealNumber() {
me.add(0, "اختر وجبة");
me.add("وجبة 1");
// "اختر تمرين",
// "تمرين 1",
// "تمرين 2",
// "تمرين 3",
// "تمرين 4",
// "تمرين 5",
// "تمرين 6",
// "تمرين 7",
// "تمرين 8",
// "تمرين 9";
// Initializing an ArrayAdapter
//2 problems with the font ,, getcontext() instead of ( getActivity().getApplicationContext() )
//replace item_spinner with support_simple_spinner_dropdown_item
spinnerArrayAdapterMealCount = new ArrayAdapter<String>(
getContext(), R.layout.support_simple_spinner_dropdown_item, me) {
@Override
public boolean isEnabled(int position) {
if (position == 0) {
// Disable the first item from Spinner
// First item will be use for hint
return false;
} else {
return true;
}
}
@Override
public View getDropDownView(int position, View convertView,
ViewGroup parent) {
View view = super.getDropDownView(position, convertView, parent);
TextView tv = (TextView) view;
if (position == 0) {
// Set the hint text color gray
tv.setTextColor(Color.GRAY);
} else {
tv.setTextColor(Color.BLACK);
}
return view;
}
};
spinnerArrayAdapterMealCount.setDropDownViewResource(R.layout.support_simple_spinner_dropdown_item);
spMealsCount.setAdapter(spinnerArrayAdapterMealCount);
spMealsCount.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
@Override
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
String selectedItemText = (String) parent.getItemAtPosition(position);
chosenMeNumber = selectedItemText;
// If user change the default selection
// If user change the default selection
if (chosenMeNumber.equals("وجبة 1"))
getChoosenMeNumberIndex = "0";
if (chosenMeNumber.equals("وجبة 2"))
getChoosenMeNumberIndex = "1";
if (chosenMeNumber.equals("وجبة 3"))
getChoosenMeNumberIndex = "2";
if (chosenMeNumber.equals("وجبة 4"))
getChoosenMeNumberIndex = "3";
if (chosenMeNumber.equals("وجبة 5"))
getChoosenMeNumberIndex = "4";
if (chosenMeNumber.equals("وجبة 6"))
getChoosenMeNumberIndex = "5";
if (chosenMeNumber.equals("وجبة 7"))
getChoosenMeNumberIndex = "6";
if (chosenMeNumber.equals("وجبة 8"))
getChoosenMeNumberIndex = "7";
if (chosenMeNumber.equals("وجبة 9"))
getChoosenMeNumberIndex = "8";
if (chosenMeNumber.equals("وجبة 10"))
getChoosenMeNumberIndex = "9";
if (chosenMeNumber.equals("وجبة 11"))
getChoosenMeNumberIndex = "10";
if (chosenMeNumber.equals("وجبة 12"))
getChoosenMeNumberIndex = "11";
if (chosenMeNumber.equals("وجبة 13"))
getChoosenMeNumberIndex = "12";
if (chosenMeNumber.equals("وجبة 14"))
getChoosenMeNumberIndex = "13";
if (chosenMeNumber.equals("وجبة 15"))
getChoosenMeNumberIndex = "14";
// First item is disable and it is used for hint
if (position > 0) {
// Notify the selected item text
selectedMeal();
retriveMealToEdit();
Toast.makeText
(getActivity().getApplicationContext(), "Selected : " + selectedItemText, Toast.LENGTH_SHORT)
.show();
}
}
@Override
public void onNothingSelected(AdapterView<?> parent) {
}
});
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void clear(){\n\n \tlist = new ArrayList();\n\n }",
"public void removeAll() {\n this.arrayList = null;\n this.arrayList = new ArrayList<>();\n }",
"public void clear() {\n\t\tstringList = null;\n\t}",
"public void clear()\r\n {\r\n phoneList = new ArrayList<String>();... | [
"0.73175",
"0.72076935",
"0.7127263",
"0.7112115",
"0.6856446",
"0.67303926",
"0.67066133",
"0.66613305",
"0.6556443",
"0.6456965",
"0.64361763",
"0.6402233",
"0.6380721",
"0.637238",
"0.6369327",
"0.6361221",
"0.6345706",
"0.6340648",
"0.6339989",
"0.6317581",
"0.63163185",
... | 0.0 | -1 |
/Chain the call to route it to fragment | @Override
public boolean onOptionsItemSelected(MenuItem item) {
return super.onOptionsItemSelected(item);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void callFragment(Entry entry) {\n Entry e= new Entry();\n e=entry;\n AppDetailFragment ada= new AppDetailFragment();\n Bundle bundle = new Bundle();\n bundle.putParcelable(\"Detail\", e);\n ada.setArguments(bundle);\n //Initiate transaction\n Fragmen... | [
"0.6208274",
"0.61677516",
"0.60171205",
"0.60171205",
"0.5903837",
"0.5898803",
"0.5898803",
"0.587264",
"0.587264",
"0.58400255",
"0.58400255",
"0.58400255",
"0.58400255",
"0.58400255",
"0.58400255",
"0.58400255",
"0.58400255",
"0.58400255",
"0.58400255",
"0.58400255",
"0.5... | 0.0 | -1 |
It makes sense to encapsulate the race length in the corresponding enum. Constructor, so we can initialize the fields. | Race(String description, double length) {
this.description = description;
this.length = length;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Argonian()\n\t{\n\t\tthis.race = \"Argonian\";\n\t}",
"public char getRace() { return race; }",
"private void setRace(String race){\n this.race = race;\n }",
"public OCBase(OCInteger lenType)\r\n {\r\n this.lenType = lenType;\r\n }",
"@Override\r\n\tpublic String getRace() \r\... | [
"0.59974766",
"0.5980099",
"0.5862328",
"0.56505543",
"0.5516803",
"0.54597545",
"0.53723",
"0.53710335",
"0.5366076",
"0.52904344",
"0.5175122",
"0.513103",
"0.5114756",
"0.51083654",
"0.5079465",
"0.50791967",
"0.5063668",
"0.50539464",
"0.5051682",
"0.504113",
"0.5005417",... | 0.71125805 | 0 |
Accessor for the length. | public double getLength() {
return length;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public double getLength() {\r\n return length;\r\n }",
"public double getLength() {\r\n\t\treturn length;\r\n\t}",
"public double getLength() {\n return length;\n }",
"public int getLength() {\r\n return length;\r\n }",
"public int getLength() {\r\n return length;\r\n ... | [
"0.85254925",
"0.8504804",
"0.84830606",
"0.847565",
"0.847565",
"0.847565",
"0.84719425",
"0.8470794",
"0.844223",
"0.844223",
"0.8438554",
"0.84185976",
"0.84185976",
"0.8383935",
"0.8372056",
"0.8370696",
"0.8344082",
"0.83392084",
"0.83392084",
"0.8334134",
"0.8323123",
... | 0.8482668 | 3 |
Return the nice description rather than the default alternative (enum variable name). | @Override
public String toString() {
return description;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"String description();",
"String description();",
"String description();",
"String description();",
"String description();",
"String description();",
"String description();",
"String description();",
"String description();",
"String description();",
"String description();",
"String description... | [
"0.6948879",
"0.6948879",
"0.6948879",
"0.6948879",
"0.6948879",
"0.6948879",
"0.6948879",
"0.6948879",
"0.6948879",
"0.6948879",
"0.6948879",
"0.6948879",
"0.69425225",
"0.69425225",
"0.69425225",
"0.69425225",
"0.69425225",
"0.69425225",
"0.69425225",
"0.69425225",
"0.69425... | 0.0 | -1 |
/ Reads the contents of a text field and converts them to a String. If the field is empty, it treats it as a 00, and puts that in the text field. If we're editing the text field, it'll still behave the same but without putting 00 in the field if it goes empty. | int getContents(JTextField tf) {
String contents = tf.getText();
if (contents == null || contents.isEmpty()) {
if (!tf.hasFocus()) {
tf.setText("00");
}
return 0;
}
return Integer.parseInt(contents);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void appendText()\n\t{\n\t\tString fieldText = \"\";\n\t\tString newText = \"\";\n\t\tfieldText = entry.getText();\n\t\t\n\t\tif(fieldText.equals (\"0\"))\n\t\t{\n\t\t\tnewText += append;\n\t\t\tfieldText = newText;\n\t\t\tentry.setText (fieldText);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tfieldText += append;\n\t\t... | [
"0.61941713",
"0.6185711",
"0.5696753",
"0.567756",
"0.56419045",
"0.55102134",
"0.54781944",
"0.53647196",
"0.53639644",
"0.5350879",
"0.53264576",
"0.5321097",
"0.5316326",
"0.53032947",
"0.52320194",
"0.5231147",
"0.52223504",
"0.5184727",
"0.51836795",
"0.5181095",
"0.517... | 0.56496507 | 4 |
/ Convert pace to seconds. | int getPaceSeconds() {
int m = getContents(minutes);
int s = getContents(seconds);
return 60*m +s;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public abstract long toSeconds(long duration);",
"public double getSecs( );",
"public int getSeconds(){\n return (int) (totalSeconds%60);\n }",
"public static double convertFromNanoToSec(long time) {\n return ((double) time / 1000000000);\n }",
"public static double getSecondsTime() {\n... | [
"0.70291084",
"0.6626621",
"0.6596894",
"0.65787023",
"0.64969826",
"0.64753115",
"0.6449803",
"0.6446391",
"0.64351934",
"0.6285083",
"0.627513",
"0.62138516",
"0.6160672",
"0.6070157",
"0.60632783",
"0.60583925",
"0.6031064",
"0.59658504",
"0.59110624",
"0.5880251",
"0.5870... | 0.7837907 | 0 |
/ Computes the time to run the selected race with the given pace. | int getRaceTime() {
int pace = getPaceSeconds();
Race selectedRace = (Race)raceBox.getSelectedItem();
double raceLength = selectedRace.getLength();
int totalTime = (int)(raceLength * pace);
return totalTime;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"int getPaceSeconds() {\r\n\t\tint m = getContents(minutes);\r\n\t\tint s = getContents(seconds);\r\n\t\treturn 60*m +s;\r\n\t}",
"private static int[] race(int v1, int v2, int g){\n\n float distance = g;\n float speedDifference = v2-v1;\n float time = g / speedDifference;\n\n int[] r... | [
"0.58231854",
"0.56168157",
"0.55877453",
"0.5562423",
"0.5519251",
"0.53907233",
"0.5355348",
"0.53135604",
"0.52686477",
"0.5265751",
"0.52596664",
"0.52008146",
"0.5180513",
"0.5165213",
"0.5161744",
"0.5108979",
"0.5092845",
"0.50274056",
"0.5027145",
"0.5022866",
"0.5018... | 0.6985014 | 0 |
/ Fomat the time into :: | String formatTime(int time) {
int h = time / 3600;
time %= 3600;
int m = time / 60;
time %= 60;
int s = time;
return String.format("%02d:%02d:%02d", h, m, s);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private TimeUtil() {}",
"private String TimeConversion() {\n\n int hours, minutes, seconds, dayOfWeek, date, month, year;\n\n seconds = ((raw[27] & 0xF0) >> 4) + ((raw[28] & 0x03) << 4);\n minutes = ((raw[28] & 0xFC) >> 2);\n hours = (raw[29] & 0x1F);\n dayOfWeek = ((raw[29] & ... | [
"0.6677526",
"0.65735817",
"0.65605056",
"0.6447798",
"0.6419853",
"0.6413835",
"0.63450676",
"0.6327439",
"0.62728745",
"0.6191036",
"0.61902696",
"0.6179367",
"0.617816",
"0.6169213",
"0.60954297",
"0.609339",
"0.6066219",
"0.60543066",
"0.6049109",
"0.6028006",
"0.6028006"... | 0.60494155 | 18 |
/ Handle the ActionEvent generated by selecting a particular entry from the drop down list. | @Override
public void actionPerformed(ActionEvent e) {
result.setText(formatTime(getRaceTime()));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void handleSelect(MouseEvent event) {\n\t\tWidget widget = tree.getItem(new Point(event.x, event.y));\n\t\tif (!(widget instanceof TreeItem))\n\t\t\treturn;\n\t\tTreeItem item = (TreeItem) widget;\n\t\tObject o = item.getData();\n\t\tif (o == null)\n\t\t\treturn;\n\t\ttry {\n\t\t\tthis.action.handleAction(... | [
"0.6869886",
"0.6792716",
"0.6630921",
"0.6535801",
"0.6535014",
"0.6495383",
"0.6431981",
"0.636927",
"0.62911016",
"0.6279273",
"0.6180221",
"0.6169108",
"0.6146561",
"0.6135755",
"0.6082825",
"0.60496247",
"0.60322315",
"0.6011783",
"0.59737843",
"0.59732324",
"0.59361434"... | 0.0 | -1 |
/ These three methods are needed since we're implementing KeyListener. Since we only care about one of them, we'll leave the other two blank. | @Override
public void keyPressed(KeyEvent arg0) {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\t\t\t\t\t\t\t\t\t\t\tpublic void keyPressed(KeyEvent e) {\n\n\t\t\t\t\t\t\t\t\t\t\t}",
"@Override\n\t\t\t\t\tpublic void keyReleased(KeyEvent e) {\n\t\t\t\t\t\t\n\t\t\t\t\t}",
"@Override\r\n\tpublic void keyReleased(KeyEvent e) {\n\r\n\t}",
"@Override\r\n\tpublic void keyReleased(KeyEvent e) {\n\... | [
"0.738742",
"0.73362637",
"0.7288455",
"0.7288455",
"0.7288455",
"0.7288455",
"0.7288455",
"0.72865653",
"0.7285947",
"0.7285947",
"0.7285947",
"0.7285947",
"0.7285947",
"0.7285947",
"0.7285947",
"0.72689587",
"0.7266387",
"0.7266387",
"0.7266387",
"0.7266387",
"0.7266387",
... | 0.0 | -1 |
Just invoke the ActionListener, since we want to do the exact same thing it does anyway. | @Override
public void keyReleased(KeyEvent arg0) {
actionPerformed(null);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void actionPerformed(ActionEvent e) {\n action.actionPerformed(e);\n }",
"public void actionPerformed(ActionEvent arg0) {\r\n\t\t\t}",
"public void actionPerformed(ActionEvent arg0) {\n\t\t\t}",
"public void actionPerformed(ActionEvent arg0) {\n\t\t\t}",
"@Override\n\t\t\tpublic vo... | [
"0.7744114",
"0.7723318",
"0.76815367",
"0.76815367",
"0.7674001",
"0.7674001",
"0.7634996",
"0.7629691",
"0.7629691",
"0.7629691",
"0.7629691",
"0.7629691",
"0.7629691",
"0.76234573",
"0.75981826",
"0.7595612",
"0.7591793",
"0.75790703",
"0.75780696",
"0.75775725",
"0.757757... | 0.0 | -1 |
Inflate the menu; this adds items to the action bar if it is present. | @Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.add_todo_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.724751",
"0.72030395",
"0.71962166",
"0.71781456",
"0.71080285",
"0.70414597",
"0.7039569",
"0.70127094",
"0.7010955",
"0.69814765",
"0.69462436",
"0.6940127",
"0.69346195",
"0.6918375",
"0.6918375",
"0.6892324",
"0.688513",
"0.687655",
"0.68764484",
"0.68626994",
"0.68626... | 0.0 | -1 |
Handle action bar item clicks here. The action bar will automatically handle clicks on the Home/Up button, so long as you specify a parent activity in AndroidManifest.xml. | @Override
public boolean onOptionsItemSelected(MenuItem item) {
int id = item.getItemId();
Intent intent = new Intent();
intent.putExtra("task", todoEditText.getText().toString());
intent.putExtra("date", dateSelected);
intent.putExtra("priority", priorityLevel);
intent.putExtra("status", statusSelected);
intent.putExtra("position", position);
switch (id) {
case R.id.action_save:
saveTask(intent);
return true;
case R.id.action_dismiss:
dismissActivity(intent);
return true;
default:
return super.onOptionsItemSelected(item);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public boolean onOptionsItemSelected(MenuItem item) { Handle action bar item clicks here. The action bar will\n // automatically handle clicks on the Home/Up button, so long\n // as you specify a parent activity in AndroidManifest.xml.\n\n //\n // HANDLE BACK BUTTON\n ... | [
"0.7904163",
"0.7805678",
"0.7766155",
"0.77271765",
"0.7631901",
"0.76217514",
"0.75843245",
"0.7530648",
"0.74879694",
"0.74575084",
"0.74575084",
"0.7438342",
"0.742121",
"0.7402876",
"0.7391506",
"0.7386729",
"0.7379215",
"0.73702943",
"0.7361895",
"0.7355702",
"0.7345358... | 0.0 | -1 |
on click listener to show calendar | public void addListenerOnAddDateBtn() {
addButton = (Button) findViewById(R.id.addButton);
addButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
new DatePickerDialog(AddTodoActivity.this, date, myCalendar
.get(Calendar.YEAR), myCalendar.get(Calendar.MONTH),
myCalendar.get(Calendar.DAY_OF_MONTH)).show();
}
});
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void OnClickCalendar() {\n binding.timelinetext.setBackground(getResources().getDrawable(R.drawable.dashboardlinebg));\n binding.timelinetext.setTextColor(Color.parseColor(\"#000000\"));\n binding.calendartext.setBackground(getResources().getDrawable(R.drawable.timelinetab_bg));\n ... | [
"0.7425572",
"0.72158283",
"0.7146171",
"0.71379536",
"0.7112389",
"0.70936507",
"0.7038092",
"0.7011964",
"0.69920486",
"0.6990459",
"0.69499046",
"0.6916125",
"0.6884181",
"0.68796885",
"0.6769194",
"0.6762523",
"0.6746666",
"0.67196",
"0.67132396",
"0.67070454",
"0.6702640... | 0.0 | -1 |
Radio Button Group to set priority level | public void addListenerOnRadioGroupButton() {
priorityRadioGroup = (RadioGroup) findViewById(R.id.priorityRadioGroup);
medium = (RadioButton) findViewById(R.id.medium);
high = (RadioButton) findViewById(R.id.high);
low = (RadioButton) findViewById(R.id.low);
//default value if no value change
priorityLevel = "low";
low.setChecked(true);
priorityRadioGroup.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener()
{
public void onCheckedChanged(RadioGroup group, int checkedId) {
switch(checkedId){
case R.id.low:
Log.d("TAG", "low checked");
priorityLevel = "low";
break;
case R.id.medium:
Log.d("TAG", "medium checked");
priorityLevel = "medium";
break;
case R.id.high:
Log.d("TAG", "high checked");
priorityLevel = "high";
break;
}
}
});
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void setupRadioGroup(){\n //region Used to set up the RadioGroup\n\n selectUserTypeRadioGroup.clearCheck();\n selectUserTypeRadioGroup.setOnCheckedChangeListener(\n new RadioGroup.OnCheckedChangeListener() {\n @Override\n public void... | [
"0.66758245",
"0.65881616",
"0.65378624",
"0.6537574",
"0.6505656",
"0.65021056",
"0.649864",
"0.64861757",
"0.6474718",
"0.6455612",
"0.6408845",
"0.6402924",
"0.63824624",
"0.637846",
"0.63685423",
"0.6367282",
"0.63518345",
"0.6349797",
"0.6311215",
"0.63103324",
"0.630557... | 0.7720971 | 0 |
/ This method skips the currently last assigned job because it cannot lead to a feasible solution. | public static void skipCurrentJob() {
do {
currentCombo[jobsChosen - 1]++;
} while (!checkRows() && currentCombo[jobsChosen - 1] < numPeople);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void continueLastWorkout()\n {\n Workout last_workout = lift_db_helper.selectLastWorkout();\n if (last_workout != null)\n {\n AddLift.start(current_context, last_workout);\n }\n else\n {\n Snackbar no_previous_workouts = Snackbar.make(findV... | [
"0.6153132",
"0.5608095",
"0.5451925",
"0.5427779",
"0.53659594",
"0.53584135",
"0.53221565",
"0.53111726",
"0.530986",
"0.5225602",
"0.5222047",
"0.5210929",
"0.51611865",
"0.5159668",
"0.51283956",
"0.51234704",
"0.5121887",
"0.51216877",
"0.5093255",
"0.5093161",
"0.508827... | 0.6979556 | 0 |
/ This method compares the currentCombination of assignments with the best possible future picks to see if it can be greater than the current best Total. If true, then partial gets incremented and we back up because it can't lead to a feasible solution | public static boolean canPrune() {
boolean result = false;
int projectedTotal = 0;
int i = 0;
while(i<jobsChosen){
projectedTotal += board[i][currentCombo[i]];
i++;
}
while(i<numPeople){
projectedTotal += bestPossibleCombination[i];
i++;
}
if(projectedTotal<bestTotal){//Cant be greater than current Best Total
result = true;
}
return result;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void compareCombos() {\n\t\tint currentTotal = 0;\n\t\tint pastTotal = 0;\n\n\t\tcost++;\n\t\tfor (int i = 0; i < numPeople; i++) {\n\t\t\tcurrentTotal += board[i][currentCombo[i]];\n\t\t\tpastTotal += board[i][bestCombo[i]];\n\t\t}\n\t\t\n\t\tif (currentTotal >= pastTotal) {\n\t\t\tbestTotal = 0;\n\... | [
"0.64814544",
"0.58903956",
"0.5664067",
"0.5595202",
"0.5550493",
"0.54304934",
"0.5343132",
"0.53289634",
"0.530166",
"0.524695",
"0.5240603",
"0.52357644",
"0.5207137",
"0.5192399",
"0.51923794",
"0.5188464",
"0.5185907",
"0.5161586",
"0.51605016",
"0.5156622",
"0.5151634"... | 0.61067057 | 1 |
/ This method simply compares the current productivity combo to the previous best | public static void compareCombos() {
int currentTotal = 0;
int pastTotal = 0;
cost++;
for (int i = 0; i < numPeople; i++) {
currentTotal += board[i][currentCombo[i]];
pastTotal += board[i][bestCombo[i]];
}
if (currentTotal >= pastTotal) {
bestTotal = 0;
for (int i = 0; i < numPeople; i++) {
bestCombo[i] = currentCombo[i];
bestTotal += board[i][currentCombo[i]];
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private Player compareTopCards() {\n // COMPARE CARDS\n int bestValue = activePlayer.getTopMostCard().getCardPropertyValue(activeCategory);\n // assume activePlayer will win the round and then test if this is true\n // if no other card beats or equals the ActivePlayer's card\n // the activ... | [
"0.5998786",
"0.59417814",
"0.5855899",
"0.58526635",
"0.57177335",
"0.5705123",
"0.5664627",
"0.56604415",
"0.56592244",
"0.5625341",
"0.5563462",
"0.5552706",
"0.5538297",
"0.5498057",
"0.5488095",
"0.5456756",
"0.5440404",
"0.54330826",
"0.54257643",
"0.54059386",
"0.53939... | 0.65078986 | 0 |
/ This method assigns the next person to the next job | public static boolean getNextJob() {
// If jobsChosen == numPeople, that means we have to back up
if (jobsChosen == numPeople) {
return false;
}
// if we the last chosen job is at the end of the row, we have to back
// up
if (jobsChosen != 0) {
if (currentCombo[jobsChosen - 1] == numPeople) {
return false;
}
}
// We are good to get the next Job, try each job left to right until we
// find a valid one
for (int i = 0; i < numPeople; i++) {
if (isValid(i)) {
currentCombo[jobsChosen] = i;
jobsChosen++;
return true;
}
}
return false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private Employee setNextEmployee(Employee nextEmployee, Employee currentEmployee) {\n\tcurrentEmployee.setFree(true);\n\tswitch (currentEmployee.getEmType().getValue()) {\n\tcase 0:\n\t respondentQueue.enqueue(currentEmployee);\n\t break;\n\tcase 1:\n\t managerQueue.enqueue(currentEmployee);\n\t break;... | [
"0.6280654",
"0.62194926",
"0.57799816",
"0.5651893",
"0.5630621",
"0.54873246",
"0.54622",
"0.5424524",
"0.5403747",
"0.53983134",
"0.5395837",
"0.5386532",
"0.5377832",
"0.5362299",
"0.53534657",
"0.52803123",
"0.52802926",
"0.5264055",
"0.5260552",
"0.5257589",
"0.52421016... | 0.58151275 | 2 |
/ This method checks all the previous values in currentCombo to see if the next one will be valid or not | public static boolean isValid(int pos) {
// Start at index jobsChosen-1 and go down to 0
for (int i = jobsChosen - 1; i >= 0; i--) {
if (pos == currentCombo[i]) {
return false;
}
}
// Test passed, return true,position is not interfering with others
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void dataValuesChanged(){\r\n ComboBoxBean cmbTypeCode =(ComboBoxBean)awardAddDocumentForm.cmbDocumentType.getSelectedItem();\r\n if(!cmbTypeCode.getCode().equals(\"\") && !cmbTypeCode.getDescription().equals(\"\")){\r\n if( !awardAddDocumentForm.txtDescription.getText().equals(EMP... | [
"0.59530324",
"0.5916865",
"0.58878255",
"0.58272415",
"0.58124906",
"0.5799609",
"0.5687183",
"0.56639695",
"0.5650668",
"0.56449336",
"0.56438255",
"0.556453",
"0.5543338",
"0.5497716",
"0.5492576",
"0.54496",
"0.54261714",
"0.5406911",
"0.53734905",
"0.53676105",
"0.536277... | 0.61378217 | 0 |
/ This method backtracks one level on the board | public static void backUpLevel() {
// if we are trying to backup when we are on the first level at the last
// position,
// then we are done
if (jobsChosen == 1 && currentCombo[0] == numPeople) {
done = true;
return;
}
if (jobsChosen > 1) {
currentCombo[jobsChosen - 1] = 0;// reset last row
jobsChosen--;
do {
currentCombo[jobsChosen - 1]++;
} while (!checkRows() && currentCombo[jobsChosen - 1] < numPeople);
} else {
currentCombo[0]++;// increment top row
jobsChosen--;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void back() {\n\n\tGrid<Actor> gr = getGrid();\n\tif (gr == null)\n\t return;\n\n\tif (!crossLocation.isEmpty()) {\n\t\t\n\t crossLocation.pop();\n\n\t //back\n\t ArrayList<Location> lastNode = crossLocation.peek();\n\t next = lastNode.get(0);\n\t}\n\n\tLocation loc = getLocation();\n\t\n\tif... | [
"0.6695156",
"0.64357436",
"0.64243126",
"0.64201736",
"0.6293867",
"0.62760353",
"0.6231338",
"0.6210029",
"0.61876243",
"0.61779076",
"0.6148187",
"0.6143667",
"0.6096851",
"0.6019711",
"0.59846187",
"0.59798145",
"0.59692764",
"0.59652126",
"0.59448385",
"0.594358",
"0.593... | 0.5487452 | 93 |
/ This method sets up and initialized the job board | public static void initialize(String[] args) {
System.out.print("Please enter the number of People (n): ");
System.out.println(args[0]);
numPeople = Integer.parseInt(args[0]);
board = new int[numPeople][numPeople];
bestCombo = new int[numPeople];
bestPossibleCombination = new int[numPeople];
int i = 0;
int j = 0;
// Convert args to ints
int size = args.length;
int[] argsNums = new int[size - 1];
// start at 1 because first int specifies size
for (i = 1; i < size; i++) {
argsNums[i - 1] = Integer.parseInt(args[i]);
// System.out.println(argsNums[i-1]);
}
// Row Counter
for (i = 0; i < numPeople; i++) {
// Column Counter
for (j = 0; j < numPeople; j++) {
int num = argsNums[numPeople * i + j];
//Initializes board
board[i][j] = num;
//initializes bestPossibleCombination
if(bestPossibleCombination[i]<num){
bestPossibleCombination[i]=num;
}
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void initializeBoard() {\n\t\t\n\t}",
"public BoardSetup() {\n\t\tthis.theBoard = Board.getInstance();\n\t}",
"public void boardSetUp(){\n\t}",
"private void initBoard() {\n initCommands();\n setBackground(Color.BLACK);\n setPreferredSize(new Dimension((int) (W * Application.scale), (int) (H... | [
"0.74178934",
"0.7327792",
"0.7020393",
"0.6973779",
"0.6956715",
"0.6878159",
"0.6857579",
"0.6853667",
"0.676623",
"0.667539",
"0.6658386",
"0.6647712",
"0.66445607",
"0.66436136",
"0.66101915",
"0.6570344",
"0.65695333",
"0.6561509",
"0.6559154",
"0.6508015",
"0.64988685",... | 0.0 | -1 |
/ This metho prints the people/job board cleanly | public static void printBoard() {
int i = 0;
int j = 0;
// Row Counter
for (i = 0; i < numPeople; i++) {
// Column Counter
for (j = 0; j < numPeople; j++) {
System.out.print(board[i][j] + "\t");
}
System.out.println("");
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void print() {\n for (int i = 0; i < 8; i--) {\n System.out.print(\" \");\n for (int j = 0; j < 8; j++) {\n System.out.print(_pieces[i][j].textName());\n }\n System.out.print(\"\\n\");\n }\n }",
"private void printBoard() {\n\n f... | [
"0.73174834",
"0.72050196",
"0.71356946",
"0.7099693",
"0.7050799",
"0.69818145",
"0.69520396",
"0.69489163",
"0.6878199",
"0.6872758",
"0.68442965",
"0.67945856",
"0.6793038",
"0.676245",
"0.6752618",
"0.67525095",
"0.67399913",
"0.67023665",
"0.66926616",
"0.66921586",
"0.6... | 0.74538785 | 0 |
Method to separete the RGB channel of a given image. | private List<int[]> separateColorChannels(RGBImage image) {
List<int[]> outList = new ArrayList<int[]>(3);
int[] data = (int[]) image.getValue();
int[] rch = new int[data.length];
int[] gch = new int[data.length];
int[] bch = new int[data.length];
for (int i = 0; i < data.length && start; i++) {
rch[i] = (data[i] >> 16) & MASK;
gch[i] = (data[i] >> 8) & MASK;
bch[i] = data[i] & MASK;
}
outList.add(0, rch);
outList.add(1, gch);
outList.add(2, bch);
return outList;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private Color[] imageToArray(BufferedImage image){\n Color[] pixels = new Color[image.getWidth() * image.getWidth()];\n for (int i = 0; i < image.getHeight(); i++) {\n for (int j = 0; j < image.getWidth(); j++) {\n Color color = new Color(image.getRGB(j,i));\n ... | [
"0.6408666",
"0.6235423",
"0.6223626",
"0.6201797",
"0.61230147",
"0.60647714",
"0.5997703",
"0.59905195",
"0.5916452",
"0.59000725",
"0.5894963",
"0.588411",
"0.58351237",
"0.58093625",
"0.5798836",
"0.57305247",
"0.5726911",
"0.57194376",
"0.56892246",
"0.56749016",
"0.5670... | 0.7449743 | 0 |
Method to calculate an histogram from a channel (RGB) of a given image. | private double[] extractHistogram(int[] imagePixels){
double[] histogram=new double[LEVELS_NUMBER];
for (int j = 0; j < imagePixels.length&&start; j++) {
histogram[imagePixels[j]]++;
}
return histogram;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public double[][] getHistogram(BufferedImage image) {\r\n int[][][] arr = convertToArray(image);\r\n double[][] rgbCount = new double[3][256];\r\n for (int y = 0; y < image.getHeight(); y++) {\r\n for (int x = 0; x < image.getWidth(); x++) {\r\n rgbCount[0][arr[x][y][... | [
"0.7531569",
"0.7109144",
"0.7095301",
"0.69277036",
"0.68785954",
"0.6797508",
"0.67573994",
"0.6664243",
"0.6602515",
"0.63954276",
"0.6301721",
"0.62573355",
"0.62195075",
"0.614516",
"0.61368185",
"0.60786104",
"0.5979955",
"0.5947328",
"0.5851249",
"0.5789816",
"0.568259... | 0.6848308 | 5 |
Method to normalize an histogram | private double[] normalizeHistogram(double[] inputHistogram, int totalPixels) {
double[] normalized=new double[inputHistogram.length];
for(int i=0;i<inputHistogram.length&&start;i++){
normalized[i]=inputHistogram[i]/totalPixels;
}
return normalized;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void histNormalize() {\n\n double max = max();\n double min = min();\n max = max - min;\n for (int i = 0; i < pixelData.length; i++) {\n double value = pixelData[i] & 0xff;\n pixelData[i] = (byte) Math.floor((value - min) * 255 / max);\n }\n }",
... | [
"0.8207227",
"0.70811844",
"0.68420446",
"0.6718692",
"0.65076876",
"0.6246232",
"0.61883503",
"0.6101319",
"0.6058316",
"0.5976309",
"0.5971987",
"0.59408426",
"0.59221506",
"0.59014285",
"0.58769304",
"0.5863649",
"0.5730413",
"0.5712987",
"0.5664662",
"0.5640326",
"0.56397... | 0.7638861 | 1 |
/ In a real implementation this method would look up the trip code in the travel catalog to get details of the car, flight and hotel bookings needed. Instead these details are hardwired here for test purposes. | public String newBooking(String trip, int people) {
Date startDate = new Date(); //TEMP - need to fix
/*
try {
startDate = DateFormat.getInstance().parse("7 Jul, 2012");
} catch (Exception e) {
e.printStackTrace();
}
*/
if (people > 0) {
cars.bookCar(startDate, 7, "B");
flights.bookFlight("AA123", startDate, people, "Y");
hotels.bookHotel("DBH", startDate, 7, "SUP");
return "HW3546";
} else {
return "NONE";
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void loadTripDetail() {\n\t\tloadCars();\n\t\tloadRoutes();\n\t\t// no trip to load\n\t\tif (tripComboBox.getValue() == null || mode == Mode.ADD_MODE) {\n\t\t\tloadStopPoints();\n\t\t\taddTripMode();\n\t\t}\n\t\t// there are trips to load\n\t\telse {\n\t\t\tupdateTripMode();\n\t\t\tloadStopPoints();\n\t\t\... | [
"0.62988424",
"0.6220262",
"0.6214695",
"0.592663",
"0.59111935",
"0.58098453",
"0.58015275",
"0.5697458",
"0.5604312",
"0.5583687",
"0.55755186",
"0.55743617",
"0.5561937",
"0.55555534",
"0.554039",
"0.5538311",
"0.5532698",
"0.55115384",
"0.5491616",
"0.5485744",
"0.5467344... | 0.0 | -1 |
keep calling sort, generating smaller and smaller "windows" until the window is big enough only for 1 entry then | public static void sort(int inputArray[], int start, int end) {
if (end <= start) {
return;
}
// Cut current window in half
int mid = (start + end) / 2;
// sort on new left array
sort(inputArray, start, mid);
// sort on new right array
sort(inputArray, mid + 1, end);
// merge left and right
merge(inputArray, start, mid, end);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void sort() {\r\n int k = start;\r\n for (int i = 0; i < size - 1; i++) {\r\n int p = (k + 1) % cir.length;\r\n for (int j = i + 1; j < size; j++) {\r\n if ((int) cir[p] < (int) cir[k % cir.length]) {\r\n Object temp = cir[k];\r\n ... | [
"0.60414726",
"0.5986035",
"0.59266484",
"0.5890585",
"0.5888766",
"0.5883887",
"0.5883189",
"0.5835189",
"0.58168876",
"0.5789224",
"0.57505167",
"0.5750263",
"0.5734613",
"0.57022166",
"0.568949",
"0.5660552",
"0.55976677",
"0.5595851",
"0.5568431",
"0.55565363",
"0.5546712... | 0.0 | -1 |
inputArray is the original, fulllength array. We pass in more than we alter start is the left boundary of the "window" is an index end is the right boundary of the "window" is an index merge() recursively break down into smaller and smaller "windows" as it is recursively called by sort as each run completes, we go down the stack to biggger and bigger "windows" which are not left aligned Create a temporary array for the current window write that array to the appropriate pos on inputArray | public static void merge(int inputArray[], int start, int mid, int end) {
// must account for first marker being pos 0
int tempArray[] = new int[end - start + 1];
// index counter for l array
int leftMarker = start;
// index counter for r array
int rightMarker = mid + 1;
// index counter for temporary array
int k = 0;
// while L isn't past midpoint and R isn't past end
// fill out tempArray based on which value is higher
while (leftMarker <= mid && rightMarker <= end) {
if (inputArray[leftMarker] < inputArray[rightMarker]) {
tempArray[k] = inputArray[leftMarker];
leftMarker = leftMarker + 1;
} else {
tempArray[k] = inputArray[rightMarker];
rightMarker = rightMarker + 1;
}
k = k + 1;
}
// Only one condition must be true to break out of above loop
// we could theoretically make it to the end of left array
// without making it to the end of right array
if (leftMarker <= mid) {
while (leftMarker <= mid) {
tempArray[k] = inputArray[leftMarker];
leftMarker = leftMarker + 1;
k = k + 1;
}
} else if (rightMarker <= end) {
while (rightMarker <= end) {
tempArray[k] = inputArray[rightMarker];
rightMarker = rightMarker + 1;
k = k + 1;
}
}
// copy over the temp array into inputArray
for (int i = 0; i < tempArray.length; i++) {
// we add "start" to i so that
// we only write to the "window"'s location
// and the window frame will move from left to right and expand
// as the recursion proceeds
inputArray[i + start] = tempArray[i];
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void sort(int inputArray[], int start, int end) {\n if (end <= start) {\n return;\n }\n\n // Cut current window in half\n int mid = (start + end) / 2;\n\n // sort on new left array\n sort(inputArray, start, mid);\n // sort on new right array... | [
"0.6894713",
"0.68884665",
"0.6229149",
"0.5937224",
"0.5884539",
"0.5881466",
"0.5825202",
"0.5807166",
"0.5764158",
"0.5759846",
"0.57434255",
"0.57291013",
"0.5715962",
"0.5693638",
"0.5686635",
"0.5621229",
"0.56167775",
"0.5606635",
"0.5582711",
"0.55407053",
"0.55327934... | 0.73099154 | 0 |
Append message to chat box | public void appendChatBox(String s){
synchronized(msgToAppend){ // synchronized to maintain thread-safety
msgToAppend.append(s);
textArea.append(msgToAppend.toString() + "\n");
msgToAppend.setLength(0);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void internalAddToChatWindow(String message) {\n jChatConvo.append(message + \"\\n\");\n }",
"public void chatMsg(String msg)\n\t{\n\t\tchatArea.append(msg + \"\\n\");\n\t}",
"private void displayMsg(String msg) {\n //add message to chatList array\n chatList.add(msg);\n /... | [
"0.7686265",
"0.7529266",
"0.7348272",
"0.7330283",
"0.72348714",
"0.721251",
"0.7203159",
"0.716841",
"0.71629685",
"0.712829",
"0.68884355",
"0.68493015",
"0.6831723",
"0.6785905",
"0.67778873",
"0.6772634",
"0.67711014",
"0.67511845",
"0.66789615",
"0.66579837",
"0.6654568... | 0.79481345 | 0 |
Append message to msgToSend buffer | public void sendMessage(String s){
synchronized(msgToSend){ // synchronized to maintain thread-safety
msgToSend.append(s + "\n");
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void append(final String msg) {\n Preconditions.checkState(isOpen);\r\n\r\n message.append(msg);\r\n isDirty = true;\r\n }",
"private void addMessageToQueue( byte[] buffer ){\n \tsynchronized (this.messages) {\n byte message[] = new byte[buffer.length\n ... | [
"0.666259",
"0.6313354",
"0.6188825",
"0.60828453",
"0.6072849",
"0.60458505",
"0.59333456",
"0.59310055",
"0.5910126",
"0.5869285",
"0.58133733",
"0.58076787",
"0.58072746",
"0.5800093",
"0.57970387",
"0.5788293",
"0.578081",
"0.57621765",
"0.5758429",
"0.5747667",
"0.574028... | 0.56296515 | 30 |
Links I/O streams and inetAddress of connected client to the Messenger | public void startConnection(ObjectOutputStream out, ObjectInputStream in, InetAddress clientInetAddress){
MessengerHandler chat = new MessengerHandler(out, in, clientInetAddress);
chat.start();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void openStreams() {\n try {\n outputStream = new DataOutputStream(clientSocket.getOutputStream());\n inputStream = new DataInputStream(clientSocket.getInputStream());\n } catch (IOException e) {\n System.err.println(\"Could not open IO streams for the client.... | [
"0.6072224",
"0.60573393",
"0.58514994",
"0.57680863",
"0.5747929",
"0.57379305",
"0.57100314",
"0.57010573",
"0.56885666",
"0.5681364",
"0.56442326",
"0.56422323",
"0.5636018",
"0.5592219",
"0.55854225",
"0.5569986",
"0.55576205",
"0.5555524",
"0.5544065",
"0.55314606",
"0.5... | 0.64002347 | 0 |
Links I/O streams of all connected clients to the Messenger Server | public void startServerConnection(Vector<ObjectOutputStream> connectionsOut, Vector<ObjectInputStream> connectionsIn){
MessengerServerHandler chatServer = new MessengerServerHandler(connectionsOut, connectionsIn);
chatServer.start();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void openStreams() {\n try {\n outputStream = new DataOutputStream(clientSocket.getOutputStream());\n inputStream = new DataInputStream(clientSocket.getInputStream());\n } catch (IOException e) {\n System.err.println(\"Could not open IO streams for the client.... | [
"0.6476677",
"0.64568794",
"0.645267",
"0.6390645",
"0.63681805",
"0.61976564",
"0.6171115",
"0.6058296",
"0.5997794",
"0.5987579",
"0.598223",
"0.5971681",
"0.59608454",
"0.59517044",
"0.5942909",
"0.59100515",
"0.58665264",
"0.5864086",
"0.58574146",
"0.5842481",
"0.5832799... | 0.0 | -1 |
Read messages from server | public void run(){
ObjectReader readerClient = new ObjectReader(in, clientInetAddress);
readerClient.start();
// Constantly checks msgToSend for messages and sends them
while(true){
try{
// Send message
if(msgToSend.length() != 0){
out.writeObject(new DataObject(DataObject.STRING, msgToSend.toString()));
out.flush();
msgToSend.setLength(0);
}
}
catch(IOException ioe){
ioe.printStackTrace();
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void readMessages() {\n if (!this.isConnectedToClientServer){return;}\n String inputMessage = inputQueue.poll();\n if (inputMessage != null){\n try{\n ClientMessageType messageType = ClientMessageParser.parse(inputMessage);\n if (messageType == C... | [
"0.71656233",
"0.6951951",
"0.68860525",
"0.6840118",
"0.683291",
"0.6803446",
"0.676869",
"0.66423625",
"0.6638231",
"0.65733176",
"0.6572926",
"0.6567633",
"0.6560436",
"0.6519735",
"0.6512486",
"0.6486953",
"0.64825755",
"0.6474844",
"0.6470635",
"0.64231545",
"0.6378572",... | 0.60567164 | 77 |
Unpack the params argument into the object. | @Override
public void unpack(List<Targetable> params) throws UnpackingException {
inputCommands = buildCommandDict(params);
chosenWeapon = (Weapon) params.stream()
.filter(t -> getPlayer().getCharacterState().getWeaponBag().contains(t))
.findAny().orElse(null);
if (chosenWeapon != null) {
chosenActionUnit = (ActionUnit) params.stream()
.filter(t -> chosenWeapon.getActionUnitList().contains(t) || chosenWeapon.getOptionalEffectList().contains(t))
.findAny().orElse(null);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public abstract Object getTypedParams(Object params);",
"public void unpack(MAVLinkPayload payload) {\n payload.resetIndex();\n\n this.p1x = payload.getFloat();\n\n this.p1y = payload.getFloat();\n\n this.p1z = payload.getFloat();\n\n this.p2x = payload.getFloat();\n\n t... | [
"0.59429836",
"0.5194775",
"0.5124531",
"0.5124531",
"0.5049309",
"0.49908262",
"0.49701616",
"0.48624364",
"0.48306444",
"0.48248634",
"0.48161855",
"0.48019248",
"0.47710317",
"0.47674856",
"0.46846604",
"0.4681326",
"0.4673578",
"0.4654284",
"0.46419093",
"0.45876336",
"0.... | 0.5779664 | 1 |
since ActionUnit.run() signature changed we need to build a Map> in order to run the action | @Override
public void run() {
chosenActionUnit.run(getGame(), inputCommands);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"ActionMap createActionMap() {\n ActionMap map = new ActionMapUIResource();\n Action[] actions = editor.getActions();\n //System.out.println(\"building map for UI: \" + getPropertyPrefix());\n int n = actions.length;\n for (int i = 0; i < n; i++) {\n Action a = actions[... | [
"0.5861008",
"0.58100826",
"0.56745774",
"0.5604821",
"0.5575222",
"0.5460309",
"0.53841424",
"0.53650683",
"0.5356889",
"0.53555894",
"0.5340295",
"0.5314384",
"0.528472",
"0.5259931",
"0.5259931",
"0.52584547",
"0.5257792",
"0.5257418",
"0.5245282",
"0.5232458",
"0.5227011"... | 0.6024572 | 0 |
User: viktor Date: 12/2/15 | public interface SlackChannelHistory {
public Collection<? extends SlackMessageEvent> getChannelEvents();
public SlackChannel getChannel();
public String getLatest();
public boolean hasMore();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getUserDateString() {\n\t\tString[] tmpArr = this.getUserDate();\n\t\tString year = tmpArr[0];\n\t\tString month = tmpArr[1];\n\t\tString day = tmpArr[2];\n\t\tString out = year + \"/\" + month + \"/\" + day;\n\t\treturn out;\n\t}",
"public String Get_date() \n {\n \n return date;\n }... | [
"0.622373",
"0.61731493",
"0.6124049",
"0.60885763",
"0.6049643",
"0.6049643",
"0.60229075",
"0.60198677",
"0.60198677",
"0.60198677",
"0.60138595",
"0.60121334",
"0.5996033",
"0.59952384",
"0.598006",
"0.5975195",
"0.5966924",
"0.5966924",
"0.59615636",
"0.5955176",
"0.59483... | 0.0 | -1 |
new variable h for height added | public Prism(){//consturctor for Cube class with h initialzed to 10.0.
super();//constructor of superclass called.
h = 10.0;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int getH() { return height; }",
"public void setHeight(int h) {\n this.H = h;\n }",
"public void setHeight(int h)\n {\n height = h;\n }",
"public void setHeight(double height){\n h=height;\r\n }",
"double getNewHeight();",
"@Override\n public float getH() {\n return ... | [
"0.805424",
"0.80448055",
"0.80081004",
"0.779244",
"0.7767344",
"0.7657261",
"0.75629675",
"0.75426203",
"0.7481028",
"0.74586666",
"0.74185103",
"0.74150455",
"0.7367852",
"0.73502636",
"0.7341962",
"0.72975534",
"0.72921723",
"0.7276276",
"0.7275813",
"0.7273293",
"0.72590... | 0.0 | -1 |
method to set h to userdefined value | public void setHeight(double height){
h=height;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setH(Double h);",
"public void setH_(double h_) {\n\t\tthis.h_ = h_;\n\t}",
"public void setH(double h) {\n this.h = h;\n }",
"public void setH(double value) {\n this.h = value;\n }",
"public static void setH(double set_h) {\r\n\t\th = set_h;\t\r\n\t\t}",
"public void setH... | [
"0.73675984",
"0.7268431",
"0.7229017",
"0.7089168",
"0.69394785",
"0.69293904",
"0.68977386",
"0.6640275",
"0.65852875",
"0.6521327",
"0.6255851",
"0.61659825",
"0.6134685",
"0.61129785",
"0.6105591",
"0.60355055",
"0.6026568",
"0.6017955",
"0.60074323",
"0.5971865",
"0.5960... | 0.55189234 | 67 |
method to calculate volume | public double calcVolume(){
double area=calcArea(); // calcArea of superclass used
return area*h;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public abstract double calcVolume();",
"public abstract double calcVolume();",
"public abstract double volume();",
"public abstract float volume();",
"@Override\n\tpublic void calcularVolume() {\n\t\t\n\t}",
"public abstract double getVolume();",
"public void calcVolume() {\n this.vol = (0.666666666... | [
"0.9006038",
"0.9006038",
"0.88710105",
"0.87224644",
"0.8589064",
"0.8435612",
"0.83611816",
"0.8297456",
"0.8193889",
"0.8188381",
"0.8168234",
"0.81198317",
"0.8102615",
"0.8051902",
"0.8036233",
"0.8032744",
"0.80019075",
"0.80019075",
"0.79995984",
"0.7974165",
"0.796992... | 0.8426043 | 6 |
Get the type name. | public String getType() {
return type;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getTypeName() {\n return type.name();\n }",
"public String getTypeName() {\n Class type = getType();\n if (type == null)\n return null;\n return type.getName();\n }",
"public String getName() {\n return type.toString();\n }",
"@gw.internal.gosu.p... | [
"0.87082607",
"0.852753",
"0.8410217",
"0.83550817",
"0.8350734",
"0.8350734",
"0.81994265",
"0.81994265",
"0.81994265",
"0.81994265",
"0.816204",
"0.80974466",
"0.80910206",
"0.80897003",
"0.8084546",
"0.8042847",
"0.8039193",
"0.8036187",
"0.8021881",
"0.80205166",
"0.80203... | 0.0 | -1 |
Compute damage progression for this type. | public double progress() {
if (damage <= 0) {
return damage;
}
double n = noise.nextValue();
damage = damage + (k * damage * damage) + l + n;
return damage;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Double getProgressPercent();",
"public abstract double getPercentDead();",
"public int computeDamageTo(Combatant opponent) { return 0; }",
"public double getProgress()\n {\n return ((double)getCount() / (double)getGoal());\n }",
"public double calculateHpPercent();",
"@FloatRange(from... | [
"0.6265245",
"0.6264186",
"0.61603284",
"0.60934305",
"0.5990202",
"0.5985795",
"0.59099835",
"0.58944803",
"0.5867455",
"0.5859793",
"0.5848898",
"0.5844102",
"0.58341265",
"0.58298236",
"0.5800744",
"0.5761138",
"0.575043",
"0.5738698",
"0.5735674",
"0.5685449",
"0.5677935"... | 0.75543714 | 0 |
Get the current damage. | public double getDamage() {
return damage;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public double getDamage() {\r\n\t\treturn damage;\r\n\t}",
"public int getDamage() {\n return damage_;\n }",
"public int getDamage() {\n return damage_;\n }",
"public int getDamage() {\n return damage_;\n }",
"public int getDamage() {\n return damage_;\n }",
"public int ge... | [
"0.8472256",
"0.8457377",
"0.8457377",
"0.8457377",
"0.8457377",
"0.8457377",
"0.8440867",
"0.8440867",
"0.8440867",
"0.8440867",
"0.8440867",
"0.84336495",
"0.8413765",
"0.83965784",
"0.8341428",
"0.82810867",
"0.8238391",
"0.82323617",
"0.82234746",
"0.822191",
"0.8142569",... | 0.8407517 | 13 |
Set the current damage. | public void setDamage(double d) {
damage = d;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setDamage(double damage) {\r\n\t\tthis.damage = damage;\r\n\t}",
"public void setDamage(int damage) {\r\n\t\tthis.damage = damage;\r\n\t}",
"public void setDamage(int damage) {\n\t\tWeapon.itemDamage = damage;\n\t}",
"public void setDamage(float damage) {\n if (grid != null) {\n ... | [
"0.82399213",
"0.81464434",
"0.7968713",
"0.78781956",
"0.7656119",
"0.76353073",
"0.7597962",
"0.7529961",
"0.7512815",
"0.745531",
"0.74194187",
"0.73563766",
"0.73297143",
"0.7318898",
"0.7303071",
"0.72981536",
"0.7261625",
"0.7261625",
"0.72601086",
"0.7228275",
"0.72266... | 0.7707219 | 4 |
String value = request.getParameter("id"); | protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
int value = Integer.parseInt(request.getParameter("id"));
try {
Class.forName("com.mysql.jdbc.Driver");
Connection conn = DriverManager.getConnection("jdbc:mysql://localhost:3306/evernoteDB");
Statement st = conn.createStatement();
st.executeUpdate("DELETE FROM note WHERE id = '" + value + "'");
//
// String query = "DELETE FROM note WHERE noteName = ?";
// PreparedStatement statement = conn.prepareStatement(query);
// statement.setString(1, value);
// statement.executeUpdate();
// Statement st = conn.createStatement();
//
// st.executeUpdate("DELETE FROM note WHERE noteName='" + value + "'");
response.sendRedirect("/userNotes.jsp");
conn.close();
} catch (Exception e) {
e.printStackTrace();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"java.lang.String getParameterId();",
"String getParameter(HttpServletRequest request, String name) throws ValidationException;",
"protected Object getSingleValueFromRequest(HttpServletRequest request_p, String strID_p)\r\n {\r\n return request_p.getParameter(strID_p);\r\n }",
"public String getP... | [
"0.6959291",
"0.6833831",
"0.64414436",
"0.6357084",
"0.6259935",
"0.62591034",
"0.6248275",
"0.61773866",
"0.61331636",
"0.60238546",
"0.59523433",
"0.5920028",
"0.5915827",
"0.59071004",
"0.5906419",
"0.58997256",
"0.5888332",
"0.58675194",
"0.5857981",
"0.5843837",
"0.5842... | 0.5450508 | 45 |
carica l'immagine in bitmap | private Bitmap LoadImage(String URL, BitmapFactory.Options options) {
Bitmap bitmap = null;
InputStream in = null;
try {
in = OpenHttpConnection(URL);
bitmap = BitmapFactory.decodeStream(in, null, options);
in.close();
} catch (IOException e1) {
}
return bitmap;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Bitmap m7900a(Bitmap bitmap);",
"void mo12205a(Bitmap bitmap);",
"void mo27482a(String str, Bitmap bitmap);",
"Bitmap mo27481a(String str);",
"Imagem getImagem();",
"private static byte[] m17790a(Bitmap bitmap) {\n int i;\n int i2;\n int i3;\n int width = bitmap.getWidth();\n ... | [
"0.6584058",
"0.6471251",
"0.61060596",
"0.6094345",
"0.6022105",
"0.5890201",
"0.5866511",
"0.5849727",
"0.5798649",
"0.5770587",
"0.5739884",
"0.5700277",
"0.5682896",
"0.5677538",
"0.55971795",
"0.5596946",
"0.5585696",
"0.5560853",
"0.5527798",
"0.55248994",
"0.5511867",
... | 0.0 | -1 |
As already mentioned maps do not directly support streams. There's no stream() method available on the Map interface itself, however you can create specialized streams upon the keys, values or entries of a map via map.keySet().stream(), map.values().stream() and map.entrySet().stream(). Furthermore maps support various new and useful methods for doing common tasks. | public static void main(String[] args) {
Map<Integer, String> map = new HashMap<>();
for (int i = 0; i < 10; i++) {
map.putIfAbsent(i, "val" + i);
}
map.forEach((id, val) -> System.out.println(id + ": " + val));
// This example shows how to compute code on the map by utilizing functions:
map.computeIfPresent(3, (num, val) -> val + num);
map.get(3); // val33
map.computeIfPresent(9, (num, val) -> null);
map.containsKey(9); // false
map.computeIfAbsent(23, num -> "val" + num);
map.containsKey(23); // true
map.computeIfAbsent(3, num -> "bam");
map.get(3); // val33
// Next, we learn how to remove entries for a given key, only if it's currently mapped to a given value:
map.remove(3, "val3");
map.get(3); // val33
map.remove(3, "val33");
map.get(3); // null
// Another helpful method:
map.getOrDefault(42, "not found"); // not found
// Merging entries of a map is quite easy:
map.merge(9, "val9", (value, newValue) -> value.concat(newValue));
map.get(9); // val9
map.merge(9, "concat", (value, newValue) -> value.concat(newValue));
map.get(9); // val9concat
// Merge either put the key/value into the map if no entry for the key exists, or the merging function will be called to change the existing value.
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"KStream<K, V> toStream();",
"private void dumpMap(PrintStream stream, Map<String, String> map) {\n for (String key : map.keySet()) {\n stream.println(\" \" + key + \" -> \" + map.get(key));\n }\n }",
"@CompileStatic\npublic interface Stream<T> {\n\n /**\n * Remap the stream.\n... | [
"0.65088975",
"0.6396014",
"0.57858473",
"0.5766714",
"0.5729592",
"0.5670663",
"0.5541056",
"0.5526682",
"0.544788",
"0.54441816",
"0.5403758",
"0.5384435",
"0.5368269",
"0.53541446",
"0.5322942",
"0.5288884",
"0.5287019",
"0.5285416",
"0.52775836",
"0.5277528",
"0.5274094",... | 0.0 | -1 |
Constructor de la clase GestorArchivos | public GestorArchivos(String numeroArchivo)
{
this.rutaArchivoEntrada = new File("archivostexto/in/in" + numeroArchivo + ".txt").getAbsolutePath().replace("\\", "/");
this.rutaArchivoSalida = new File("archivostexto/out/out" + numeroArchivo + ".txt").getAbsolutePath().replace("\\", "/");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Archivo() {\n fos = null;\n oos = null;\n fis = null;\n ois = null;\n }",
"public ArchivoClientes(){\n\t\t\n\t\tif(archivo.exists()){\n\t\t\t//System.out.println(\"El archivo ya existe\");\n\t\t}else{\n\t\t\ttry {\n\t\t\t\t//archivo.mkdir();\n\t\t\t\tarchivo.createNewFile();... | [
"0.6860835",
"0.67362934",
"0.6496419",
"0.63036406",
"0.6239161",
"0.6133222",
"0.6088837",
"0.6023399",
"0.5985719",
"0.5975177",
"0.59468555",
"0.59364355",
"0.5925893",
"0.59220624",
"0.5907218",
"0.5901423",
"0.5862528",
"0.58570117",
"0.5856871",
"0.58100617",
"0.580935... | 0.7278981 | 0 |
/ Set price variable depending on the option selected | @Override
public void act(int g, Data d) {
Data1 d1 = (Data1)d;
if(g == SetPrice.REGULAR)
d1.price = d1.regular_price;
else if(g == SetPrice.DIESEL)
d1.price = d1.diesel_price;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setOptionPrice(double optionPrice)\n {\n this.optionPrice = optionPrice;\n }",
"public void setPrice(Double price);",
"public void setPrice(double price){this.price=price;}",
"public void setPrice(double p){\n\t\t// store into the instance variable price the value of the paramet... | [
"0.69130105",
"0.66715264",
"0.66286457",
"0.6558724",
"0.65485805",
"0.6539926",
"0.6526192",
"0.65043706",
"0.65043706",
"0.65043706",
"0.6501762",
"0.64987344",
"0.64987344",
"0.6456917",
"0.6456917",
"0.6456917",
"0.6456917",
"0.6456917",
"0.6456917",
"0.6456917",
"0.6447... | 0.0 | -1 |
Created by singh on 7/12/17. | public interface SecondActivityComponent {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void perish() {\n \n }",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"private stendhal() {\n\t}",
"public final void mo51373a() {\n }",
"@Overri... | [
"0.60391206",
"0.59024125",
"0.5888532",
"0.5882867",
"0.5810511",
"0.58071214",
"0.57748854",
"0.57748854",
"0.57303315",
"0.57298887",
"0.57257247",
"0.57031053",
"0.56997323",
"0.5699118",
"0.5684108",
"0.5669544",
"0.56605154",
"0.56605154",
"0.56605154",
"0.56605154",
"0... | 0.0 | -1 |
Called after the listener exits normally. | default void success(ConsumerRecord<K, V> record, Consumer<K, V> consumer) {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void afterReceive() {\n\t}",
"public void cleanUp() { listener = null; }",
"@Override\r\n\tpublic void onTerminate() {\n\t\tsuper.onTerminate();\r\n\t}",
"public void afterDownstream() {\n }",
"protected void onEnd() {}",
"private void onOK() {\n OKDisposalProcess();\n }",
"@Overrid... | [
"0.6755972",
"0.6750041",
"0.6727165",
"0.6720445",
"0.6641145",
"0.6611347",
"0.65777963",
"0.65680915",
"0.6557214",
"0.64958405",
"0.64688677",
"0.64131045",
"0.64013827",
"0.6375041",
"0.6370599",
"0.6357922",
"0.63415706",
"0.63389045",
"0.63213724",
"0.63165605",
"0.626... | 0.0 | -1 |
Called after the listener throws an exception. | default void failure(ConsumerRecord<K, V> record, Exception exception, Consumer<K, V> consumer) {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected void handleListenerException(Throwable ex) {\n\t\tlogger.error(\"Listener execution failed\", ex);\n\t}",
"@Override\n\t\t\tpublic void onException(Exception arg0) {\n\n\t\t\t}",
"@Override\n\t\tpublic void onException(Exception arg0) {\n\t\t\t\n\t\t}",
"@Override\n public void o... | [
"0.6896649",
"0.6838819",
"0.6766555",
"0.6549483",
"0.65355873",
"0.6524226",
"0.6518783",
"0.6518783",
"0.6514245",
"0.648613",
"0.6485928",
"0.64717084",
"0.64642584",
"0.6440199",
"0.64165986",
"0.6382933",
"0.63787884",
"0.63498354",
"0.6309828",
"0.6284093",
"0.6251191"... | 0.0 | -1 |
UserFeedback.show( "SearchOnQueryTextChanged: " + s); | @Override
public boolean onQueryTextChange(String s) {
adapter.getFilter().filter(s);
return false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void searchQuery() {\n edit_search.addTextChangedListener(new TextWatcher() {\n @Override\n public void beforeTextChanged(CharSequence s, int start, int count, int after) {\n if (paletteComposition.getVisibility() == View.VISIBLE){\n paletteCom... | [
"0.6695725",
"0.6316243",
"0.62818784",
"0.62126476",
"0.6180074",
"0.61682045",
"0.6150405",
"0.610516",
"0.6101606",
"0.6069241",
"0.60594857",
"0.60317206",
"0.60116553",
"0.5992659",
"0.5980952",
"0.5980022",
"0.59746253",
"0.5935506",
"0.59248626",
"0.5907891",
"0.590185... | 0.0 | -1 |
new ExercicioBalanco(); new InputOutputBasic(); new CalculadoraSimples(); new BalancoGAA(); new AdvinhaNumero(); new Condicionais(); new Ciclos(); new CalculadoraInfinita(); new BlackJack(); new Arrays(); new Exercicios(); new ExerciciosArrays(); | public static void main(String[] args) {
new CalculadoraDeGastos();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void main(String[] args) {\n\n\t\tMulta_Trafico mt1 = new Multa_Trafico(20, \"B\");\n\t\tmt1.setResponsable(\"Paco\");\n\t\tmt1.setDescripcion(\"Exceso de velocidad\");\n\t\tmt1.setMatricula(\"MK\");\n\t\tmt1.setFecha(\"Viernes\");\n\t\tmt1.verdatos();\n\n\t\tMulta_Covid mc2 = new Multa_Covid(10, \"C... | [
"0.6600284",
"0.64082354",
"0.63718647",
"0.634665",
"0.6339808",
"0.63206905",
"0.6264763",
"0.6101156",
"0.6100526",
"0.60961324",
"0.6080991",
"0.6076358",
"0.60690624",
"0.6062415",
"0.6031828",
"0.60144204",
"0.5998926",
"0.5984303",
"0.59783024",
"0.5976023",
"0.5974433... | 0.0 | -1 |
Creates new form Allocation | public Allocation() {
initComponents();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"FORM createFORM();",
"public Form(){\n\t\ttypeOfLicenseApp = new TypeOfLicencsApplication();\n\t\toccupationalTrainingList = new ArrayList<OccupationalTraining>();\n\t\taffiadavit = new Affidavit();\n\t\tapplicationForReciprocity = new ApplicationForReciprocity();\n\t\teducationBackground = new EducationBackgrou... | [
"0.63262385",
"0.5897367",
"0.5581326",
"0.55378425",
"0.5366362",
"0.5306413",
"0.5258968",
"0.5244109",
"0.51601136",
"0.51292735",
"0.51159585",
"0.5099034",
"0.50864863",
"0.5076651",
"0.50299346",
"0.5020563",
"0.5001345",
"0.49701372",
"0.49679887",
"0.49647513",
"0.495... | 0.6626066 | 0 |
This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always regenerated by the Form Editor. | @SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
jPanel5 = new javax.swing.JPanel();
btnSubject = new javax.swing.JButton();
btnTag = new javax.swing.JButton();
btnGroup = new javax.swing.JButton();
jButton4 = new javax.swing.JButton();
jButton5 = new javax.swing.JButton();
btnAddTimeSlot = new javax.swing.JButton();
jButton1 = new javax.swing.JButton();
btnBuilding = new javax.swing.JButton();
jButton3 = new javax.swing.JButton();
jPanel2 = new javax.swing.JPanel();
jLabel7 = new javax.swing.JLabel();
jPanel1 = new javax.swing.JPanel();
jButton2 = new javax.swing.JButton();
jPanel3 = new javax.swing.JPanel();
jButton6 = new javax.swing.JButton();
jPanel4 = new javax.swing.JPanel();
jButton7 = new javax.swing.JButton();
jPanel6 = new javax.swing.JPanel();
jButton8 = new javax.swing.JButton();
jPanel7 = new javax.swing.JPanel();
jButton9 = new javax.swing.JButton();
jButton10 = new javax.swing.JButton();
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
jPanel5.setBackground(new java.awt.Color(0, 102, 204));
btnSubject.setBackground(new java.awt.Color(255, 51, 51));
btnSubject.setFont(new java.awt.Font("Tahoma", 1, 16)); // NOI18N
btnSubject.setIcon(new javax.swing.ImageIcon(getClass().getResource("/spm/students.jpg"))); // NOI18N
btnSubject.setText("Students");
btnSubject.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btnSubjectActionPerformed(evt);
}
});
btnTag.setBackground(new java.awt.Color(255, 255, 0));
btnTag.setFont(new java.awt.Font("Tahoma", 1, 16)); // NOI18N
btnTag.setIcon(new javax.swing.ImageIcon(getClass().getResource("/spm/tag.jpg"))); // NOI18N
btnTag.setText("Tags");
btnTag.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btnTagActionPerformed(evt);
}
});
btnGroup.setBackground(new java.awt.Color(51, 255, 0));
btnGroup.setFont(new java.awt.Font("Tahoma", 1, 16)); // NOI18N
btnGroup.setIcon(new javax.swing.ImageIcon(getClass().getResource("/spm/group.png"))); // NOI18N
btnGroup.setText("Group");
btnGroup.setActionCommand("Groups");
btnGroup.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btnGroupActionPerformed(evt);
}
});
jButton4.setBackground(new java.awt.Color(255, 102, 51));
jButton4.setFont(new java.awt.Font("Tahoma", 1, 16)); // NOI18N
jButton4.setIcon(new javax.swing.ImageIcon(getClass().getResource("/spm/user.png"))); // NOI18N
jButton4.setText("Lecturerers");
jButton4.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton4ActionPerformed(evt);
}
});
jButton5.setBackground(new java.awt.Color(51, 255, 255));
jButton5.setFont(new java.awt.Font("Tahoma", 1, 16)); // NOI18N
jButton5.setIcon(new javax.swing.ImageIcon(getClass().getResource("/spm/book.jpg"))); // NOI18N
jButton5.setText("Subjects");
jButton5.setToolTipText("");
jButton5.setActionCommand("");
jButton5.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton5ActionPerformed(evt);
}
});
btnAddTimeSlot.setBackground(new java.awt.Color(255, 204, 255));
btnAddTimeSlot.setFont(new java.awt.Font("Tahoma", 1, 16)); // NOI18N
btnAddTimeSlot.setIcon(new javax.swing.ImageIcon(getClass().getResource("/spm/time.jpg"))); // NOI18N
btnAddTimeSlot.setText("Time Slots");
btnAddTimeSlot.setPreferredSize(new java.awt.Dimension(131, 25));
btnAddTimeSlot.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btnAddTimeSlotActionPerformed(evt);
}
});
jButton1.setBackground(new java.awt.Color(0, 255, 102));
jButton1.setFont(new java.awt.Font("Tahoma", 1, 16)); // NOI18N
jButton1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/spm/calander.jpg"))); // NOI18N
jButton1.setText("Working Days ");
jButton1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton1ActionPerformed(evt);
}
});
btnBuilding.setBackground(new java.awt.Color(204, 204, 0));
btnBuilding.setFont(new java.awt.Font("Tahoma", 1, 16)); // NOI18N
btnBuilding.setIcon(new javax.swing.ImageIcon(getClass().getResource("/spm/building.jpg"))); // NOI18N
btnBuilding.setText("Building");
btnBuilding.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btnBuildingActionPerformed(evt);
}
});
jButton3.setBackground(new java.awt.Color(255, 204, 204));
jButton3.setFont(new java.awt.Font("Tahoma", 1, 16)); // NOI18N
jButton3.setIcon(new javax.swing.ImageIcon(getClass().getResource("/spm/charts.jpg"))); // NOI18N
jButton3.setText("Statistics");
jButton3.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton3ActionPerformed(evt);
}
});
javax.swing.GroupLayout jPanel5Layout = new javax.swing.GroupLayout(jPanel5);
jPanel5.setLayout(jPanel5Layout);
jPanel5Layout.setHorizontalGroup(
jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(btnSubject, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(btnTag, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(btnGroup, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jButton4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jButton5, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(btnAddTimeSlot, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jButton1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(btnBuilding, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jButton3, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
);
jPanel5Layout.setVerticalGroup(
jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel5Layout.createSequentialGroup()
.addGap(49, 49, 49)
.addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 77, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(18, 18, 18)
.addComponent(btnAddTimeSlot, javax.swing.GroupLayout.PREFERRED_SIZE, 72, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(13, 13, 13)
.addComponent(btnSubject, javax.swing.GroupLayout.PREFERRED_SIZE, 75, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(18, 18, 18)
.addComponent(btnTag, javax.swing.GroupLayout.PREFERRED_SIZE, 72, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(26, 26, 26)
.addComponent(btnGroup, javax.swing.GroupLayout.PREFERRED_SIZE, 69, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(18, 18, 18)
.addComponent(jButton4, javax.swing.GroupLayout.PREFERRED_SIZE, 64, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 25, Short.MAX_VALUE)
.addComponent(jButton5, javax.swing.GroupLayout.PREFERRED_SIZE, 67, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(18, 18, 18)
.addComponent(btnBuilding, javax.swing.GroupLayout.PREFERRED_SIZE, 66, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(27, 27, 27)
.addComponent(jButton3, javax.swing.GroupLayout.PREFERRED_SIZE, 65, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(41, 41, 41))
);
jPanel2.setBackground(new java.awt.Color(0, 102, 255));
jLabel7.setFont(new java.awt.Font("Tahoma", 1, 24)); // NOI18N
jLabel7.setForeground(new java.awt.Color(255, 255, 255));
jLabel7.setText("TIME TABLE MANAGEMENT SYSTEM");
javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
jPanel2.setLayout(jPanel2Layout);
jPanel2Layout.setHorizontalGroup(
jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel2Layout.createSequentialGroup()
.addGap(593, 593, 593)
.addComponent(jLabel7)
.addContainerGap(767, Short.MAX_VALUE))
);
jPanel2Layout.setVerticalGroup(
jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()
.addContainerGap(41, Short.MAX_VALUE)
.addComponent(jLabel7, javax.swing.GroupLayout.PREFERRED_SIZE, 38, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(36, 36, 36))
);
jPanel1.setBackground(new java.awt.Color(0, 0, 255));
jButton2.setText("Allocate tag for room");
jButton2.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton2ActionPerformed(evt);
}
});
javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
jPanel1.setLayout(jPanel1Layout);
jPanel1Layout.setHorizontalGroup(
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addContainerGap()
.addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 231, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap(41, Short.MAX_VALUE))
);
jPanel1Layout.setVerticalGroup(
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
.addContainerGap(41, Short.MAX_VALUE)
.addComponent(jButton2)
.addGap(36, 36, 36))
);
jPanel3.setBackground(new java.awt.Color(0, 0, 255));
jButton6.setText("Allocate subject for Room");
jButton6.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton6ActionPerformed(evt);
}
});
javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
jPanel3.setLayout(jPanel3Layout);
jPanel3Layout.setHorizontalGroup(
jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel3Layout.createSequentialGroup()
.addContainerGap()
.addComponent(jButton6, javax.swing.GroupLayout.PREFERRED_SIZE, 275, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap(45, Short.MAX_VALUE))
);
jPanel3Layout.setVerticalGroup(
jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel3Layout.createSequentialGroup()
.addGap(35, 35, 35)
.addComponent(jButton6)
.addContainerGap(42, Short.MAX_VALUE))
);
jPanel4.setBackground(new java.awt.Color(0, 0, 255));
jButton7.setText("Assign lecture for room");
jButton7.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton7ActionPerformed(evt);
}
});
javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);
jPanel4.setLayout(jPanel4Layout);
jPanel4Layout.setHorizontalGroup(
jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel4Layout.createSequentialGroup()
.addGap(44, 44, 44)
.addComponent(jButton7, javax.swing.GroupLayout.PREFERRED_SIZE, 234, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap(44, Short.MAX_VALUE))
);
jPanel4Layout.setVerticalGroup(
jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel4Layout.createSequentialGroup()
.addGap(37, 37, 37)
.addComponent(jButton7)
.addContainerGap(40, Short.MAX_VALUE))
);
jPanel6.setBackground(new java.awt.Color(0, 0, 255));
jButton8.setText("Assign group for room");
jButton8.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton8ActionPerformed(evt);
}
});
javax.swing.GroupLayout jPanel6Layout = new javax.swing.GroupLayout(jPanel6);
jPanel6.setLayout(jPanel6Layout);
jPanel6Layout.setHorizontalGroup(
jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel6Layout.createSequentialGroup()
.addContainerGap()
.addComponent(jButton8, javax.swing.GroupLayout.PREFERRED_SIZE, 220, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap(27, Short.MAX_VALUE))
);
jPanel6Layout.setVerticalGroup(
jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel6Layout.createSequentialGroup()
.addGap(34, 34, 34)
.addComponent(jButton8)
.addContainerGap(43, Short.MAX_VALUE))
);
jPanel7.setBackground(new java.awt.Color(0, 0, 255));
jButton9.setText("Assign session for room");
jButton9.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton9ActionPerformed(evt);
}
});
javax.swing.GroupLayout jPanel7Layout = new javax.swing.GroupLayout(jPanel7);
jPanel7.setLayout(jPanel7Layout);
jPanel7Layout.setHorizontalGroup(
jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel7Layout.createSequentialGroup()
.addContainerGap()
.addComponent(jButton9, javax.swing.GroupLayout.PREFERRED_SIZE, 234, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap(31, Short.MAX_VALUE))
);
jPanel7Layout.setVerticalGroup(
jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel7Layout.createSequentialGroup()
.addGap(35, 35, 35)
.addComponent(jButton9)
.addContainerGap(42, Short.MAX_VALUE))
);
jButton10.setBackground(new java.awt.Color(0, 255, 255));
jButton10.setFont(new java.awt.Font("Tahoma", 1, 16)); // NOI18N
jButton10.setIcon(new javax.swing.ImageIcon(getClass().getResource("/spm/logo1.png"))); // NOI18N
jButton10.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton10ActionPerformed(evt);
}
});
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addContainerGap()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addComponent(jButton10, javax.swing.GroupLayout.PREFERRED_SIZE, 199, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jPanel5, javax.swing.GroupLayout.PREFERRED_SIZE, 194, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jPanel2, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
.addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(136, 136, 136)
.addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(93, 93, 93)
.addComponent(jPanel4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(312, 312, 312))))
.addGroup(layout.createSequentialGroup()
.addGap(470, 470, 470)
.addComponent(jPanel6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(226, 226, 226)
.addComponent(jPanel7, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap())))
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addComponent(jButton10, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
.addGap(5, 5, 5)
.addComponent(jPanel5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(layout.createSequentialGroup()
.addGap(134, 134, 134)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jPanel4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(261, 261, 261)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addComponent(jPanel6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jPanel7, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))))
.addGap(127, 127, 127))
);
pack();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Form() {\n initComponents();\n }",
"public MainForm() {\n initComponents();\n }",
"public MainForm() {\n initComponents();\n }",
"public MainForm() {\n initComponents();\n }",
"public frmRectangulo() {\n initComponents();\n }",
"public form() {\n ... | [
"0.7321245",
"0.7292375",
"0.7292375",
"0.7292375",
"0.7286756",
"0.7250393",
"0.7215278",
"0.7208825",
"0.7197639",
"0.71918",
"0.7185626",
"0.716065",
"0.71489197",
"0.7094757",
"0.7081307",
"0.7057363",
"0.69892997",
"0.6978972",
"0.6956389",
"0.69543713",
"0.69465107",
... | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public void run() {
gameImpl.render();
gameImpl.update();
} | {
"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 start(Stage primaryStage) throws Exception {
System.out.println("The game begins now...");
BoardConfig boardConfig = new BoardConfig(new XY(25, 25));
Board board = new Board(boardConfig);
State state = new State(board);
FxUI fxUI = FxUI.createInstance(boardConfig.getSize());
final Game game = new GameImpl(state);
game.setUi(fxUI);
fxUI.setGameImpl((GameImpl) game);
primaryStage.setScene(fxUI);
primaryStage.setTitle("Welcome to the virtual world of Squirrels.");
primaryStage.setAlwaysOnTop(true);
fxUI.getWindow().setOnCloseRequest(new EventHandler<WindowEvent>() {
public void handle(WindowEvent evt) {
System.exit(-1);
}
});
primaryStage.show();
startGame(game);
} | {
"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 |
first getting the values | @Override
public void onClick(View view) {
String username = editTextUsername.getText().toString().trim();
String password = editTextPassword.getText().toString().trim();
if (TextUtils.isEmpty(username)) {
editTextUsername.setError("Please enter your username");
editTextUsername.requestFocus();
return;
}
if (TextUtils.isEmpty(password)) {
editTextPassword.setError("Please enter your password");
editTextPassword.requestFocus();
return;
}
Boolean result = databaseManager.checkUser(username, password);
if (result== true) {
SharedPreferences sharedPreferences = getSharedPreferences("userReg", MODE_PRIVATE);
SharedPreferences.Editor editor = sharedPreferences.edit();
editor.putString("userName", username);
editor.putString("password", password);
editor.apply();
sharedPrefManager.userLogIn(true);
startActivity(new Intent(getApplicationContext(), ProfileActivity.class));
}
else
Toast.makeText(getApplicationContext(), "check your user name and password unless " +
",please sign in first!", Toast.LENGTH_SHORT).show();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"List getValues();",
"Values values();",
"public void getValues(){\n\t\tfor (ArrayList<String> arrayNums : values){\n\t\t\tString tempAddress = arrayNums.get(0);\n\t\t\tif (ipAddress.toString().equals(tempAddress.toString())){\n\t\t\t\tString numTime = arrayNums.get(1);\n\t\t\t\tDouble doubleTime = Double.parse... | [
"0.71138626",
"0.69435406",
"0.6815",
"0.6662897",
"0.65835994",
"0.65835994",
"0.64348906",
"0.6419211",
"0.6382956",
"0.636775",
"0.6358395",
"0.6336883",
"0.6283508",
"0.62379676",
"0.62378204",
"0.6229492",
"0.620054",
"0.61587536",
"0.6091667",
"0.6070338",
"0.60105616",... | 0.0 | -1 |
Edit Me For Shipping Change Method to set the field value of integer invoice number | public void setInvoiceNumber(int invoicenum) {
invoiceNumber = invoicenum;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setC_Invoice_ID (int C_Invoice_ID);",
"public int getInvoiceNumber() {\n return invoiceNumber;\n }",
"public int getInvoiceNumber() {\n return invoiceNumber;\n }",
"void setNumberPaymentReceipt(int nRicevuta);",
"public String getInvoiceNumber() {\n return invoiceNumber;\... | [
"0.73925453",
"0.6793772",
"0.6793772",
"0.6711097",
"0.66056436",
"0.6594068",
"0.6543099",
"0.6501804",
"0.64183676",
"0.635323",
"0.6331763",
"0.63288164",
"0.6289996",
"0.6283019",
"0.6279567",
"0.6235216",
"0.6188713",
"0.61438715",
"0.61174375",
"0.60136074",
"0.5993425... | 0.7292788 | 1 |
Method to retrieve the field value of integer invoice number from main | public int getInvoiceNumber() {
return invoiceNumber;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public java.lang.String getInvoiceNo () {\n\t\treturn invoiceNo;\n\t}",
"public int getC_Invoice_ID();",
"public String getInvoiceNumber() {\n return invoiceNumber;\n }",
"public int getM_Inventory_ID() \n{\nInteger ii = (Integer)get_Value(\"M_Inventory_ID\");\nif (ii == null) return 0;\nreturn ii.intVal... | [
"0.7015754",
"0.69332844",
"0.68024176",
"0.6702736",
"0.66768074",
"0.6551117",
"0.6541706",
"0.6518532",
"0.64636344",
"0.6451972",
"0.6450563",
"0.64349425",
"0.6410921",
"0.6397059",
"0.63931537",
"0.63804245",
"0.63757503",
"0.63757056",
"0.6375064",
"0.63686526",
"0.636... | 0.72079664 | 1 |
Method to set the field value of item name | public void setItemName(String product) {
itemName = product;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setName(java.lang.String value);",
"public void setName(java.lang.String value);",
"public ItemBuilder setName(String name) {\r\n\t\tthis.name = name;\r\n\t\treturn this;\r\n\t}",
"public void setName(String value) {\n this.name = value;\n }",
"public void setName(String name) {\n ... | [
"0.692862",
"0.692862",
"0.6836888",
"0.6783579",
"0.67509425",
"0.6726962",
"0.6724269",
"0.670144",
"0.66456777",
"0.66456777",
"0.66456777",
"0.6620209",
"0.6615602",
"0.661141",
"0.6593037",
"0.6593037",
"0.65435",
"0.65397257",
"0.65319026",
"0.65319026",
"0.65315646",
... | 0.63309956 | 44 |
Method to retrieve the field value of item name from main | public String getItemName() {
return itemName;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getName()\r\n\t{\r\n\t\treturn theItem.getName();\r\n\t}",
"public synchronized String getName(){\n \treturn item_name;\n }",
"public String getName() {\n return item.getName();\n }",
"public String getItemName()\n {\n return itemName;\n }",
"public static String getItemV... | [
"0.6949434",
"0.6919958",
"0.6872328",
"0.6783683",
"0.67745787",
"0.6731254",
"0.6715363",
"0.6657636",
"0.6652556",
"0.6643904",
"0.6643904",
"0.6643904",
"0.65822226",
"0.6570406",
"0.6548862",
"0.6480138",
"0.64509344",
"0.64242214",
"0.64109707",
"0.64030397",
"0.634953"... | 0.65344375 | 18 |
Method to set the field value of double sales amount | public void setSaleAmount(double amount) {
saleAmount = amount;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setAmount(Double amount) {\r\n this.amount = amount;\r\n }",
"public void setAmount(double value) {\n this.amount = value;\n }",
"public void setAmount(Double amount) {\n this.amount = amount;\n }",
"public void setAmount(double amount) {\n this.amount = amount;\n ... | [
"0.71287966",
"0.7067223",
"0.70110667",
"0.6959263",
"0.6959263",
"0.69329005",
"0.68987226",
"0.67967373",
"0.6779979",
"0.6763051",
"0.67387044",
"0.6718122",
"0.6676359",
"0.6673052",
"0.6672163",
"0.6663576",
"0.6662196",
"0.662761",
"0.6580099",
"0.65547",
"0.65542763",... | 0.7686918 | 0 |
Method to retrieve the field value of double sales amount from main | public double getSaleAmount() {
return saleAmount;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public double getSale()\n {\n return sale;\n }",
"public double getSalePrice() {\n return salePrice;\n }",
"public double getSalePrice() {\n\t\n\t\treturn regularPrice;\n\t}",
"public Integer getSalesAmount() {\n return salesAmount;\n }",
"public int getSalesPrice() {\n ... | [
"0.7447334",
"0.7071597",
"0.69221413",
"0.69028693",
"0.6785612",
"0.6776091",
"0.6774856",
"0.6774856",
"0.6720132",
"0.67102975",
"0.66954595",
"0.66837406",
"0.6663069",
"0.662662",
"0.6581883",
"0.65752",
"0.6557687",
"0.6524212",
"0.6505928",
"0.6459684",
"0.6452951",
... | 0.72931767 | 1 |
method used to calculate tax. Base rate of 5% of item cost. | public double calculateTax() {
taxSubtotal = (saleAmount * SALESTAXRATE);
return taxSubtotal;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public double calcTaxes() {\n return getCost() * 0.07;\n }",
"public double taxPaying() {\r\n double tax;\r\n if (profit == true) {\r\n tax = revenue / 10.00;\r\n }\r\n\r\n else\r\n tax = revenue / 2.00;\r\n return tax;\r\n... | [
"0.78021747",
"0.7707959",
"0.7669668",
"0.7639595",
"0.7564041",
"0.75367534",
"0.7515658",
"0.7508689",
"0.7406477",
"0.73590666",
"0.73460513",
"0.7329131",
"0.7322851",
"0.72718936",
"0.7231913",
"0.7201014",
"0.7175494",
"0.71713614",
"0.71518755",
"0.7130851",
"0.706943... | 0.7440893 | 8 |
Current shipping calculation is just a constant, but method can be used with more complicated shipping calculation OK. Good addition. | public double calculateShipping() {
shipAmount = (SHIPPINGCOST);
return shipAmount;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"BigDecimal getShipping();",
"float calculatePrice () \n\t{\n\t\tfloat final_price = 0;\n\t\tfinal_price = (float)(price * quantity); // price * number of items\n\t\tfinal_price += final_price*(.10); // add tax\n\t\tif(perishable.equals(\"P\"))\n\t\t{\n\t\t\tfloat ship = (float)(20* weight)*quantity; // add shipp... | [
"0.7563638",
"0.67869806",
"0.6756349",
"0.6742431",
"0.65949553",
"0.6567819",
"0.6475598",
"0.61565346",
"0.6109428",
"0.6097012",
"0.60439867",
"0.59956354",
"0.5988426",
"0.59261674",
"0.5917677",
"0.591079",
"0.59076744",
"0.5889113",
"0.5864997",
"0.58458275",
"0.584273... | 0.7554396 | 1 |
Method to calculate the total Total is calculated as User input sales amount + 5% tax + shipping | public double calculateTotalCost() {
finalTotal = (saleAmount + taxSubtotal + SHIPPINGCOST);
return finalTotal;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void salesTotal(){\n\t\tif (unitsSold<10){\n\t\t\tsetTotalCost(basePrice);\n\t\t\tsetDiscount(basePrice - this.getCost());\n\t\t}\n\t\telse if (unitsSold<20){\n\t\t\tsetTotalCost((RETAIL_PRICE*.8)*unitsSold);\n\t\t\tsetDiscount(basePrice - this.getCost());\n\t\t\t\n\t\t}\n\t\telse if (unitsSold<50){\n\t\t\t... | [
"0.7717227",
"0.7501533",
"0.74367404",
"0.72775966",
"0.72527766",
"0.72183734",
"0.7208867",
"0.7169183",
"0.6997101",
"0.6951185",
"0.69352734",
"0.69299954",
"0.69003516",
"0.688953",
"0.68791145",
"0.687593",
"0.68712395",
"0.6864256",
"0.686047",
"0.68317723",
"0.682899... | 0.69550484 | 9 |
The method invoked when the activity is creating | @Override
protected void onCreate(Bundle savedInstanceState) {
mApplication = (PropEditorApplication) getApplication();
applyApplicationTheme();
super.onCreate(savedInstanceState);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void onActivityCreated(Activity activity, Bundle bundle) {}",
"@Override\n public void onActivityCreated(Activity activity, Bundle bundle) {\n }",
"@Override\n\tpublic void onActivityCreated(Activity activity, Bundle savedInstanceState)\n\t{\n\t}",
"@Override\n\tpublic void onActivityCr... | [
"0.8141565",
"0.8049214",
"0.79073566",
"0.7871914",
"0.77728784",
"0.77728784",
"0.77728784",
"0.77728784",
"0.77728784",
"0.77728784",
"0.77684414",
"0.77642393",
"0.77642393",
"0.77150166",
"0.77150166",
"0.7686771",
"0.7686771",
"0.76575196",
"0.75691384",
"0.7514415",
"0... | 0.0 | -1 |
Define the layout for this activity | @Override
public void setContentView(int layoutResID) {
super.setContentView(layoutResID);
applyCustomTitle();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic int setLayout() {\n\t\treturn R.layout.activity_main;\n\t}",
"@Override\n\tpublic int bindLayout() {\n\t\treturn R.layout.activity_init;\n\t}",
"@Override\n int getLayout() {\n return R.layout.activity_main;\n }",
"@Override\r\n\tprotected void setLayout() {\n\t\tsetContentVi... | [
"0.7389651",
"0.72870445",
"0.7074137",
"0.69994485",
"0.6954348",
"0.6827507",
"0.67300946",
"0.67254335",
"0.6702698",
"0.6667229",
"0.66559154",
"0.6636988",
"0.6635443",
"0.6634656",
"0.66318446",
"0.66110635",
"0.65877265",
"0.65423363",
"0.65059686",
"0.650055",
"0.6492... | 0.0 | -1 |
Set the content view for this activity | @Override
public void setContentView(View view) {
super.setContentView(view);
applyCustomTitle();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void setContent() {\n\t\tsetContentView(R.layout.mjson_layout);\r\n\t}",
"private void setContentView(View view) {\n mContentView = view;\n }",
"public Builder setContentView(View v) {\r\n this.contentView = v;\r\n return this;\r\n }",
"@Override\n... | [
"0.7514399",
"0.74179834",
"0.7199943",
"0.717819",
"0.7158784",
"0.7158784",
"0.70076865",
"0.6867553",
"0.6824934",
"0.6639389",
"0.66255057",
"0.65849304",
"0.64390624",
"0.6301795",
"0.6279409",
"0.62755454",
"0.6250129",
"0.62074834",
"0.6202005",
"0.6187449",
"0.6169562... | 0.6562497 | 12 |
Override default menu, with another menu | protected void setMenuId(int menuId) {
this.menuId = menuId;
showMenu = true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void overrideMenu(JPopupMenu menu) {\n this.menu = menu;\n customMenu = true;\n initMenu(true);\n }",
"@Override\n\tpublic void setUpMenu() {\n\t\t\n\t}",
"protected abstract void addMenuOptions();",
"public void menu(){\n super.goToMenuScreen();\n }",
"private void... | [
"0.7335465",
"0.7252272",
"0.7100873",
"0.70450175",
"0.69777685",
"0.6861764",
"0.6845934",
"0.6841404",
"0.68355936",
"0.6834411",
"0.68329114",
"0.6771317",
"0.6767236",
"0.6765964",
"0.67577887",
"0.67495406",
"0.67381287",
"0.6722064",
"0.6691598",
"0.6690957",
"0.668247... | 0.0 | -1 |
Invoked when an item from option menu is selected Send the menu ID to be processed. | @Override
public boolean onOptionsItemSelected(MenuItem item) {
return onMenuItemSelected(item.getItemId());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\t\t\tpublic void menuSelected(MenuItem selectedItem)\n\t\t\t{\n\n\t\t\t}",
"@Override\n\t\t\tpublic void menuSelected(MenuItem selectedItem)\n\t\t\t{\n\n\t\t\t}",
"private void optionSelected(MenuActionDataItem action){\n \t\tString systemAction = action.getSystemAction();\n \t\tif(!systemAction.eq... | [
"0.6786184",
"0.6786184",
"0.64461887",
"0.6245358",
"0.6242445",
"0.61993134",
"0.6182335",
"0.61802226",
"0.61237985",
"0.6098919",
"0.60929585",
"0.60865885",
"0.60789555",
"0.60725737",
"0.60725737",
"0.60725737",
"0.60725737",
"0.60725737",
"0.60725737",
"0.6070511",
"0.... | 0.57269937 | 64 |
A default menu option consumer. | protected boolean onMenuItemSelected(int menuItemId) {
return false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected abstract void addMenuOptions();",
"private int mainMenu(){\n System.out.println(\" \");\n System.out.println(\"Select an option:\");\n System.out.println(\"1 - See all transactions\");\n System.out.println(\"2 - See all transactions for a particular company\");\n Syst... | [
"0.677751",
"0.6515686",
"0.6464403",
"0.6413778",
"0.6390607",
"0.6390607",
"0.6390607",
"0.6390607",
"0.6390607",
"0.63826126",
"0.638011",
"0.637957",
"0.6362335",
"0.6360876",
"0.631914",
"0.6315286",
"0.6315286",
"0.6315286",
"0.631304",
"0.63028145",
"0.6300148",
"0.6... | 0.0 | -1 |
Invoked when the activity is put on pause | @Override
protected void onPause() {
super.onPause();
prepareForClose();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void onPause();",
"public void onPause() {\n }",
"public void onPause()\n {\n\n }",
"public void onPause () {\n\t\t\n\t}",
"@Override\r\n\tpublic void onPause() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void onPause() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void onPause() {\n\t\t\r\n\t}",... | [
"0.87496614",
"0.8716928",
"0.8661744",
"0.86485714",
"0.8504887",
"0.8504887",
"0.8504887",
"0.8504887",
"0.84714144",
"0.8447624",
"0.83916944",
"0.8391084",
"0.83794737",
"0.8333596",
"0.8328132",
"0.832454",
"0.8307539",
"0.8307539",
"0.8270312",
"0.8259247",
"0.8254637",... | 0.0 | -1 |
Method invoked on exit | protected void onExit() {
new DelayAsyncTask(this, 500).execute();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void exit() {\n\t\t\r\n\t}",
"@Override\n\tpublic void exit() {\n\t\t\n\t}",
"@Override\n\tpublic void exit() {\n\t\t\n\t}",
"@Override\r\n\tpublic void exit() {\n\r\n\t}",
"@Override\n\tpublic void exit() {\n\n\t}",
"@Override\n public void exit() {\n super.exit();\n }... | [
"0.8593406",
"0.84776795",
"0.84776795",
"0.8445535",
"0.84189993",
"0.8412385",
"0.834679",
"0.8330595",
"0.8262932",
"0.8210167",
"0.81638855",
"0.8156715",
"0.81002736",
"0.80417806",
"0.8015274",
"0.7987254",
"0.7964795",
"0.792456",
"0.7914985",
"0.7891153",
"0.7872071",... | 0.0 | -1 |
Prepare the activity to be closed. | protected void prepareForClose() {
mApplication.destroyAlertDialog(mAlertDialog);
mApplication.onClose();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void closeActivity();",
"private void close() {\n startActivity(new Intent(BaseActivity.this, ChooserActivity.class));\n Log.d(TAG, \"Finish BaseActivity\");\n finish();\n }",
"private void closeActivity() {\n final Handler handler = new Handler(Looper.getMainLooper());\n ... | [
"0.61296475",
"0.6087604",
"0.6008621",
"0.5812589",
"0.5609466",
"0.556695",
"0.5538177",
"0.54620665",
"0.54488534",
"0.54354334",
"0.5414903",
"0.54048896",
"0.5394049",
"0.5392265",
"0.53851396",
"0.5346011",
"0.53203344",
"0.5304866",
"0.5299282",
"0.528873",
"0.5287218"... | 0.6198903 | 0 |
Method invoked on back | protected void goBack() {
finish();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void back() {\n callFunction(\"back\");\n }",
"@Override\n public void goBack() {\n\n }",
"Request back();",
"void actionBack();",
"public void back() {\n\t\tstate.back();\n\t}",
"public void back() {\n Views.goBack();\n }",
"@Override\n public final void switchBack(... | [
"0.83682895",
"0.80427",
"0.7989427",
"0.7774013",
"0.7675921",
"0.76500183",
"0.75957686",
"0.75249934",
"0.75141156",
"0.7502997",
"0.7470201",
"0.74659556",
"0.735303",
"0.7298961",
"0.7235588",
"0.72321457",
"0.7220673",
"0.72177243",
"0.7214423",
"0.71958107",
"0.7195810... | 0.71424663 | 30 |
Apply a custom title layout on top of this activity | private void applyCustomTitle() {
getWindow().setFeatureInt(Window.FEATURE_CUSTOM_TITLE,
R.layout.title_layout);
mTitle = (TextView) findViewById(R.id.title);
icon = (ImageView) findViewById(R.id.icon);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void setContentView(int layoutResID) {\r\n\t\tsuper.setContentView(layoutResID);\r\n\t\tapplyCustomTitle();\r\n\t}",
"@Override\r\n\tpublic void setContentView(View view) {\r\n\t\tsuper.setContentView(view);\r\n\t\tapplyCustomTitle();\r\n\t}",
"@Override\n\tprotected void initTitle() {\n\... | [
"0.6713543",
"0.66745996",
"0.66062385",
"0.6530482",
"0.6516438",
"0.6516277",
"0.6457922",
"0.6357659",
"0.6310305",
"0.63003504",
"0.62822354",
"0.6262114",
"0.6242186",
"0.62420946",
"0.62222207",
"0.6201529",
"0.61731476",
"0.6166334",
"0.6142122",
"0.6118857",
"0.611224... | 0.7985954 | 0 |
On this method is a confirmation dialog. | protected void showConfirmationDialog(int titleStringId, String message,
final int confirmationId, final Object anObject) {
mAlertDialog = new AlertDialog.Builder(this)
.setIcon(android.R.drawable.ic_dialog_alert)
.setTitle(titleStringId)
.setMessage(message)
.setPositiveButton(R.string.yes,
new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog,
int which) {
onConfirmation(confirmationId, anObject);
}
}).setNegativeButton(R.string.no, null).show();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\t\t\t\tpublic void confirm() {\n\t\t\t\t\tdialog.dismiss();\n\t\t\t\t}",
"void confirm();",
"public void Confirm(){\n new AlertDialog.Builder(MapsActivity.this)\n .setTitle(\"Confirm Location\")\n .setMessage(\"Are you sure about this location?\")\n ... | [
"0.8353488",
"0.75112313",
"0.7319887",
"0.726938",
"0.7178193",
"0.7138356",
"0.71325004",
"0.6973389",
"0.6934397",
"0.6918986",
"0.6911962",
"0.68642324",
"0.68495166",
"0.6811879",
"0.67863506",
"0.6768814",
"0.67578286",
"0.6757092",
"0.6754343",
"0.67402893",
"0.6729219... | 0.0 | -1 |
This method should overwrite on each activity to handle confirmations cases. | protected void onConfirmation(int confirmationId, Object anObject) {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public abstract boolean confirm();",
"protected abstract boolean isConfirmEnabled();",
"static void confirm_A(Messenger messenger, Response_e response)\n {\n sendToClient(messenger, Request_e.Request_A_en.valueOf(), response, null);\n }",
"public abstract boolean isConfirmed();",
"@Override\n\tpublic ... | [
"0.6293116",
"0.6291023",
"0.62752426",
"0.62354076",
"0.61349785",
"0.61349785",
"0.61349785",
"0.60451263",
"0.5959466",
"0.59275466",
"0.5908861",
"0.59032416",
"0.58904314",
"0.58836746",
"0.5875006",
"0.58664143",
"0.5856563",
"0.5845533",
"0.58265316",
"0.58194655",
"0.... | 0.61311054 | 7 |
top down DP i.e recursive dp | private static int recursiveFibDP(int n) {
Integer[] table = new Integer[n + 1];
if(table[n]==null){
if (n <= 1) {
table[n] = n;
}
else {
table[n] =recursiveFibDP(n-1)+recursiveFibDP(n-2);
}
}
return table[n];
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void main(String[] args) {\n\t\t\r\n\t\tint n = 6;\r\n\t\t\r\n\t\t// Using recursion(top-down DP) with TIme O(n) Space O(n)+StackSpace\r\n\t\t\r\n//\t\tint[] dp = new int[n+1];\r\n//\t\tint res = getNumberOfWays(n,dp);\r\n//\t\tSystem.out.println(res);\r\n\t\t\r\n\t\t\r\n\t\t// Using recursion(bottom... | [
"0.6290696",
"0.6289935",
"0.6238182",
"0.608585",
"0.60608995",
"0.5968399",
"0.5868436",
"0.5838534",
"0.5828562",
"0.5791482",
"0.56791747",
"0.5675289",
"0.5634219",
"0.5629284",
"0.56129116",
"0.56124467",
"0.56124246",
"0.5604037",
"0.55809134",
"0.5580604",
"0.5553324"... | 0.5876491 | 6 |
bottom to top DP i.e iterative dp | public static int iterativeFactDP(int n){
int[] table = new int[n+1];
table[0] = 0;
table[1] = 1;
for (int i = 2; i <=n ; i++) {
table[i] = table[i-2]+table[i-1];
}
return table[n];
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static void dp() {\n\t\tm[0] = 0;\n\t\tk[0] = 0;\n\n\t\t// base case 1:for 1 cent we need give 1 cent\n\t\tm[1] = 1;\n\t\tk[1] = 1;\n\n\t\tfor (int i = 2; i <= n; i++) {\n\t\t\tint min = Integer.MAX_VALUE;\n\t\t\tint sel = -1;\n\t\t\tfor (int j = 0; j < sd; j++) {\n\t\t\t\tint a = d[j];\n\t\t\t\tif (a > i)... | [
"0.6919613",
"0.6578976",
"0.629683",
"0.62762976",
"0.5964842",
"0.5949642",
"0.58999515",
"0.58568186",
"0.58522934",
"0.5816808",
"0.5795871",
"0.57730246",
"0.5773005",
"0.5712075",
"0.5695643",
"0.56679314",
"0.5655259",
"0.5650798",
"0.56410486",
"0.5601778",
"0.5596228... | 0.5627222 | 19 |
recursive dp another way | public static int fibboDP(int n){
int[] mem = new int[n+1];
if(n==0 || n==1){
return mem[n]=n;
}
if(mem[n]!=0){
return mem[n];
}
int fib1 = fibboDP(n-1);
int fib2 = fibboDP(n-2);
return mem[n] = fib1+fib2;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"static long dp(int a, int b, int c, int d, int e, int k) {\n if(f[a][b][c][d][e] > 0) {\n return f[a][b][c][d][e];\n }\n if(!v[k]) {\n return dp(a, b, c, d, e, k + 1);\n }\n if(a < 5 && k > maxr[0] && k > maxc[a]) {\n f[a][b][c][d][e] += dp(a + 1,... | [
"0.6706794",
"0.6417574",
"0.6397825",
"0.6371095",
"0.62943137",
"0.6255149",
"0.6243005",
"0.6213399",
"0.6180256",
"0.6085847",
"0.58255124",
"0.58156323",
"0.57695735",
"0.57210773",
"0.56872135",
"0.5643227",
"0.56249315",
"0.5577969",
"0.55743665",
"0.5572671",
"0.55504... | 0.5043883 | 90 |
Send the option data back to MainActivity. | public void optionsDone(View view) {
int mode = modeCheckBox.isChecked() ? 1 : 0;
Intent intent = new Intent();
intent.putExtra("quizLength", quizLength);
intent.putExtra("mode", mode);
setResult(RESULT_OK, intent);
finish();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void goBack(){\n Intent i = new Intent(SettingsActivity.this, MainActivity.class);\n Bundle b = new Bundle();\n\n b.putString(SENSITIVITY, sendValue);\n i.putExtras(b);\n\n\n setResult(Activity.RESULT_OK, i);\n finish();\n }",
"@Override\r\n\t\t\tpublic void on... | [
"0.6355902",
"0.5915978",
"0.5905894",
"0.5899612",
"0.58904976",
"0.5883638",
"0.58712363",
"0.5842754",
"0.5837048",
"0.5825868",
"0.57880324",
"0.5752236",
"0.5745004",
"0.57444143",
"0.5740034",
"0.57058585",
"0.56985855",
"0.56970507",
"0.5693349",
"0.56864196",
"0.56691... | 0.6359092 | 0 |
Parameterized constructor that takes a 'Profile' object, calls the superclass constructor, and creates an instance of a 'Resident' student. | public Resident(Profile profile) {
super(profile);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Student(Person person) {\r\n\t\tsuper(person);\r\n\t}",
"public Resident(Profile profile, int credits) {\r\n super(profile, credits);\r\n financialAid = 0;\r\n }",
"public Professor(Professor prof)\r\n {\r\n this.name = prof.name;\r\n this.id = prof.id;\r\n }",
"Student(... | [
"0.67343867",
"0.65398157",
"0.6290252",
"0.6261981",
"0.61972106",
"0.61645603",
"0.61526346",
"0.613953",
"0.61217254",
"0.6117541",
"0.6090496",
"0.6083776",
"0.60830414",
"0.59712553",
"0.59545743",
"0.5939963",
"0.5937988",
"0.59360504",
"0.59267485",
"0.5923331",
"0.591... | 0.7827836 | 0 |
Second parameterized constructor that takes a 'Profile' instance and a number of credits and uses them to construct a 'Resident' student instance by calling its superclass constructor. | public Resident(Profile profile, int credits) {
super(profile, credits);
financialAid = 0;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Resident(Profile profile) {\r\n super(profile);\r\n }",
"public Student( String name , String address ){//constructor with arguments \r\n \tID_COUNTER++;\r\n \tstudentNum = ID_COUNTER;\r\n getFirstAndLastName( name );\r\n this.address = address ;\r\n loginID = makeLogi... | [
"0.7178459",
"0.6521943",
"0.6407308",
"0.6341345",
"0.6223797",
"0.6174474",
"0.61558115",
"0.61294866",
"0.60942173",
"0.60940677",
"0.6082815",
"0.6009301",
"0.5978334",
"0.5976367",
"0.59653276",
"0.59439445",
"0.59137064",
"0.58796346",
"0.5869343",
"0.58371747",
"0.5816... | 0.7482597 | 0 |
Method that overrides tuitionDue() method in 'Student' class; calculates and sets the tuition that a resident student owes. | @Override
public void tuitionDue() {
if (getTotalTuitionPaid() > 0)
return;
double _tuitionOwed = 0;
if (getCredits() < MINIMUM_FULL_TIME_CREDITS)
_tuitionOwed = (getCredits() * RESIDENT_TUITION_RATE_PER_CREDIT) + PART_TIME_UNIVERSITY_FEE;
else if (getCredits() >= MINIMUM_FULL_TIME_CREDITS && getCredits() <= ADDITIONAL_TUITION_CREDIT_THRESHOLD)
_tuitionOwed = FULL_TIME_RESIDENT_TUITION + FULL_TIME_UNIVERSITY_FEE - financialAid;
else
_tuitionOwed = FULL_TIME_RESIDENT_TUITION + FULL_TIME_UNIVERSITY_FEE + (RESIDENT_TUITION_RATE_PER_CREDIT *
(getCredits() - ADDITIONAL_TUITION_CREDIT_THRESHOLD)) - financialAid;
setTuitionOwed(_tuitionOwed);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void tuitionDue()\n {\n // Studies Abroad\n if(isStudyAbroad == true) {\n this.setTuitionDue( Student.UNIVERSITY_FEE + Student.ADDITIONAL_FEE);\n }\n // Full-Time and Credits > 16 and Not Study Abroad\n else if(this.getStatus() == FULL_TIME && ... | [
"0.8282708",
"0.5993906",
"0.5805737",
"0.5751205",
"0.5711742",
"0.56440353",
"0.5605126",
"0.559642",
"0.55332804",
"0.55267304",
"0.55147004",
"0.54885596",
"0.5439884",
"0.53841025",
"0.5374621",
"0.5352721",
"0.5346655",
"0.5346504",
"0.5345296",
"0.5299718",
"0.52957225... | 0.80598986 | 1 |
Getter method to return a resident student's financial aid amount. | public double getFinancialAid() {
return financialAid;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"double getPaidAmount();",
"public double getAmountEarned(){\r\n return getSalary() + getBonus() + getCommission() * getNumSales();\r\n }",
"public BigDecimal getsaleamt() {\n return (BigDecimal) getAttributeInternal(SALEAMT);\n }",
"long getAmount();",
"public double getDepositAmount()\n\t{\n... | [
"0.6102158",
"0.59027976",
"0.5850438",
"0.58455205",
"0.58448577",
"0.58036155",
"0.5778427",
"0.5754114",
"0.5754114",
"0.57389146",
"0.5732178",
"0.57311314",
"0.5723789",
"0.56804216",
"0.56782967",
"0.56591594",
"0.5610667",
"0.5607548",
"0.560195",
"0.560008",
"0.559119... | 0.7089281 | 0 |
Setter method to set a resident student's financial aid. | public void setFinancialAid(double financialAid) {
this.financialAid = financialAid;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void setAid(int value) {\n \n aid_ = value;\n }",
"public void setStudentID(long studentID);",
"public void setFacturaProveedorSRI(FacturaProveedorSRI facturaProveedorSRI)\r\n/* 346: */ {\r\n/* 347:337 */ this.facturaProveedorSRI = facturaProveedorSRI;\r\n/* 348: */ }",... | [
"0.6059787",
"0.5646937",
"0.55417556",
"0.5472103",
"0.546296",
"0.5387396",
"0.5375044",
"0.53643125",
"0.53635585",
"0.53475463",
"0.53220254",
"0.5275083",
"0.5220155",
"0.519758",
"0.51817346",
"0.51700485",
"0.5162539",
"0.51589495",
"0.51498675",
"0.5134838",
"0.512789... | 0.62393755 | 0 |
Method that calls upon superclass toString() method and converts a 'Resident' student instance to a textual representation. | @Override
public String toString() {
String financialAidAsString = "";
if (financialAid != 0)
financialAidAsString = ":financial aid $" + String.format("%,.2f", financialAid);
return super.toString() + "resident" + financialAidAsString;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n public String toString() {\r\n return \"Student: \" + super.toString();\r\n }",
"@Override\n\tpublic String toString() {\n\t\treturn \"student ID --> \"+this.studentID+\", Name --> \"+this.studentName;\n\t}",
"@Override\n\tpublic String toString() {\n\t\treturn \" \" + getStudentId() + \... | [
"0.7556124",
"0.7506049",
"0.7428601",
"0.73921955",
"0.739025",
"0.734355",
"0.7316852",
"0.73029536",
"0.7243752",
"0.7203394",
"0.7113605",
"0.7003082",
"0.700291",
"0.70005214",
"0.699629",
"0.6984026",
"0.6929214",
"0.6928784",
"0.69119424",
"0.68715215",
"0.6862461",
... | 0.6174528 | 79 |
Gets the velocity engine. | public VelocityEngine getVelocityEngine(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static VelocityEngine getVelocityEngine(){\n if(velocityEngine == null)\n init();\n return velocityEngine;\n }",
"public VelocityEngine getVelocityEngine() {\n\t\treturn velocityEngine;\n\t}",
"public VelocityEngine getEngine() {\n\t\treturn this.engine;\n\t}",
"@Bean\n\tpu... | [
"0.8570269",
"0.83808374",
"0.8364113",
"0.73749167",
"0.7228786",
"0.6917642",
"0.68762183",
"0.68473834",
"0.6788322",
"0.6725548",
"0.670888",
"0.66119504",
"0.6569641",
"0.6536615",
"0.65278596",
"0.64472055",
"0.6356014",
"0.62760293",
"0.6232677",
"0.62254745",
"0.62073... | 0.8591954 | 0 |
Email IC Coordinators with the discrepancy accounts. | public void sendDiscrepancyEmail() throws Exception; | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected void sendEmail() {\n\t\t//get all the assets from both accounts\n\t\tMap<String, MediaBinDeltaVO> srcAssets = makeTitleMap(srcDivision.getAllAssets().values(), true);\n\t\tMap<String, MediaBinDeltaVO> destAssets = makeTitleMap(destDivision.getAllAssets().values(), true);\n\t\tSet<String> iter = new HashS... | [
"0.57059205",
"0.5305248",
"0.52823514",
"0.5273459",
"0.52320474",
"0.5178195",
"0.5114272",
"0.5068519",
"0.5052428",
"0.50492847",
"0.50137955",
"0.50003815",
"0.49709052",
"0.49339703",
"0.49078786",
"0.49006605",
"0.4890118",
"0.48757178",
"0.4864502",
"0.4863982",
"0.48... | 0.6259264 | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.