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 |
|---|---|---|---|---|---|---|
Sets the action command for this target | final public void setActionCommand(String command) {
this.command = command;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setActionCommand(String command) {\n this.command = command;\n }",
"public Builder setActionCommand(int value) {\n bitField0_ |= 0x00000010;\n actionCommand_ = value;\n onChanged();\n return this;\n }",
"public void setAction(String action);",
"public vo... | [
"0.81476945",
"0.76457214",
"0.74146974",
"0.7285632",
"0.72297835",
"0.7198548",
"0.71240646",
"0.7115998",
"0.7115998",
"0.7002313",
"0.6980836",
"0.6920686",
"0.69130546",
"0.6866748",
"0.6845269",
"0.68295145",
"0.6762667",
"0.6663449",
"0.6618504",
"0.660885",
"0.6595991... | 0.82626945 | 0 |
Whether the interaction with the target affects the toplevel group of the element that contains it (instead of only affecting the element). Default is false. | final public void setAffectsGroup(boolean value) {
affectsGroup = value;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"final public boolean getAffectsGroup() {\n return affectsGroup;\n }",
"@Override\n public boolean isChildSelectable(int groupPosition, int childPosition) {\n return false;\n }",
"boolean isChildSelectable(int groupPosition, int childPosition);",
"@Override\r\n public boolean isChildSe... | [
"0.62751365",
"0.6085376",
"0.5995002",
"0.5983585",
"0.59678495",
"0.59678495",
"0.59678495",
"0.59678495",
"0.5952647",
"0.5872265",
"0.58559227",
"0.57978535",
"0.57274514",
"0.57274514",
"0.5678988",
"0.56674874",
"0.5624625",
"0.5594616",
"0.5592865",
"0.5578159",
"0.557... | 0.65040815 | 0 |
Whether the target affects the toplevel group | final public boolean getAffectsGroup() {
return affectsGroup;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"boolean isTopLevel();",
"boolean isChildSelectable(int groupPosition, int childPosition);",
"public abstract boolean isTarget();",
"boolean hasGroupPlacementView();",
"boolean hasMainUtteranceTargetLevel();",
"boolean isSetTarget();",
"public boolean isTopLevel() {\n return this.topLevel;\n }... | [
"0.66541064",
"0.63936234",
"0.62259835",
"0.61937904",
"0.61193955",
"0.60991925",
"0.6021284",
"0.6021284",
"0.5978155",
"0.59466136",
"0.59396887",
"0.5923716",
"0.5922976",
"0.59166807",
"0.5895382",
"0.5895382",
"0.5895382",
"0.5895382",
"0.5892066",
"0.5854717",
"0.5819... | 0.5793344 | 22 |
A place holder for data objects | final public void setDataObject(Object _object) {
this.dataObject = _object;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Data() {}",
"Object getData();",
"Object getData();",
"@Override\r\n\tprotected Object getData() {\n\t\treturn null;\r\n\t}",
"public abstract Object getData();",
"protected abstract D createData();",
"public Data() {\n this.customers = new HashMap<>();\n this.orders = new HashMap<... | [
"0.69223017",
"0.6782099",
"0.6782099",
"0.6771676",
"0.67384326",
"0.66431606",
"0.66364455",
"0.6535918",
"0.6535918",
"0.6504916",
"0.6504916",
"0.64896834",
"0.64896834",
"0.64896834",
"0.64896834",
"0.64896834",
"0.64896834",
"0.6486317",
"0.64582384",
"0.64388525",
"0.6... | 0.0 | -1 |
Returns the data object | final public Object getDataObject() {
return this.dataObject;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Object getData() { /* package access */\n\t\treturn data;\n\t}",
"Object getData();",
"Object getData();",
"public Object getData() \n {\n return data;\n }",
"public Object getDataObject() {\n return dataObject;\n }",
"public Object getData()\r\n\t\t{\r\n\t\t\treturn data;\r\n\t... | [
"0.82981426",
"0.80925435",
"0.80925435",
"0.8059419",
"0.79974276",
"0.79907876",
"0.7931871",
"0.7922888",
"0.79104793",
"0.78477436",
"0.7825252",
"0.78097343",
"0.7697951",
"0.7697951",
"0.76928955",
"0.7661681",
"0.76461476",
"0.76000273",
"0.7562558",
"0.7529465",
"0.75... | 0.76839316 | 15 |
Can't instantiate this class. D O N O T C H A N G E T H I S C O N S T R U C T O R | private Selector() { } | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private Instantiation(){}",
"Reproducible newInstance();",
"protected abstract void construct();",
"private ATCres() {\r\n // prevent to instantiate this class\r\n }",
"private Rekenhulp()\n\t{\n\t}",
"public OOP_207(){\n\n }",
"public _355() {\n\n }",
"public ClassTemplate() {\n\t}",... | [
"0.7391005",
"0.7227207",
"0.6920283",
"0.6918742",
"0.69048846",
"0.6843297",
"0.6736005",
"0.6732639",
"0.66924715",
"0.6676213",
"0.6658539",
"0.6643021",
"0.66346836",
"0.6633064",
"0.6622393",
"0.66106945",
"0.659209",
"0.65846056",
"0.65680736",
"0.6532218",
"0.6513464"... | 0.0 | -1 |
Selects the minimum value from the array a. This method throws IllegalArgumentException if a is null or has zero length. The array a is not changed by this method. | public static <T> T min(Collection<T> c, Comparator<T> comp) {
// Check input for null.
if (c == null || comp == null) {
throw new IllegalArgumentException();
}
// Check if input is empty.
if (c.isEmpty()) {
throw new NoSuchElementException();
}
// Generalize the min method.
Iterator<T> itr = c.iterator();
T min = itr.next();
while (itr.hasNext()) {
// Hold the value for the time being.
T hold = itr.next();
if (comp.compare(hold, min) < 0) {
min = hold;
}
}
return min;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static int min(int[] a) throws IllegalArgumentException {\n if (a == null || a.length == 0) {\n throw new IllegalArgumentException();\n }\n int min = a[0];\n \n if (a.length > 1) {\n for (int i = 1; i < a.length; i++) {\n if (a[i] < min) {\n ... | [
"0.77618605",
"0.75719637",
"0.70086706",
"0.6560083",
"0.6544194",
"0.6535837",
"0.64521956",
"0.64416564",
"0.64118457",
"0.6339111",
"0.6333147",
"0.6277457",
"0.62694436",
"0.6228551",
"0.62263024",
"0.6198467",
"0.6188851",
"0.61825037",
"0.61816835",
"0.6167087",
"0.615... | 0.0 | -1 |
Selects the maximum value from the array a. This method throws IllegalArgumentException if a is null or has zero length. The array a is not changed by this method. | public static <T> T max(Collection<T> c, Comparator<T> comp) {
// Check input for null.
if (c == null || comp == null) {
throw new IllegalArgumentException();
}
// Check input for empty.
if (c.isEmpty()) {
throw new NoSuchElementException();
}
Iterator<T> itr = c.iterator();
T max = itr.next();
while (itr.hasNext()) {
T hold = itr.next();
if (comp.compare(hold, max) > 0) {
max = hold;
}
}
return max;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static int max(int[] a) {\n\t\tint b=a[0];\r\n\t\tfor(int i=0;i<a.length;i++) {\r\n\t\t\tif(a[i]>b) {\r\n\t\t\t\tb=a[i];\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn b;\r\n\t}",
"public static int max(int[] a) throws IllegalArgumentException {\n if (a == null || a.length == 0) {\n throw new IllegalArgum... | [
"0.74916196",
"0.7369747",
"0.73149663",
"0.71056587",
"0.70335525",
"0.6993306",
"0.6527202",
"0.65266716",
"0.6521134",
"0.6476667",
"0.64328325",
"0.6363297",
"0.63445896",
"0.62892425",
"0.6213512",
"0.6192399",
"0.61882293",
"0.6184986",
"0.6177891",
"0.6174242",
"0.6119... | 0.0 | -1 |
Selects the kth minimum value from the array a. This method throws IllegalArgumentException if a is null, has zero length, or if there is no kth minimum value. Note that there is no kth minimum value if k a.length, or if k is larger than the number of distinct values in the array. The array a is not changed by this method. | public static <T> T kmin(Collection<T> c, int k, Comparator<T> comp) {
//Check collectionfor null or empty, comp is null.
if (c == null || comp == null) {
throw new IllegalArgumentException();
}
//Check if collection is empty.
if (c.isEmpty()) {
throw new NoSuchElementException();
}
// Create Arraylist of collection and sort.
List<T> copyList = new ArrayList(c);
java.util.Collections.sort(copyList, comp);
// Check if k < 0 or k > array length.
if (k > copyList.size() || k <= 0) {
throw new NoSuchElementException();
}
// Count the number of unique values, remove duplicates.
int dupCount = 0;
int uniTot = 0;
int origTot = copyList.size();
for (int i = 0; i < copyList.size() - 1; i++) {
while (copyList.size() > 1 && i < copyList.size() - 1 && copyList.get(i) == copyList.get(i + 1)) {
copyList.remove(i);
dupCount++;
}
}
uniTot = origTot - dupCount;
// k is greater than the number of unique values.
if (k > uniTot) {
throw new NoSuchElementException();
}
return copyList.get(k - 1);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static int kmin(int[] a, int k) throws IllegalArgumentException {\n if (ktest(a, k)) {\n throw new IllegalArgumentException();\n }\n int[] array = Arrays.copyOf(a, a.length);\n int increment = 1;\n int element;\n \n Arrays.sort(array);\n element = array[0];\n ... | [
"0.83517826",
"0.7551771",
"0.7149566",
"0.69360334",
"0.66148734",
"0.65577126",
"0.6533464",
"0.6507685",
"0.64425546",
"0.63713217",
"0.63600016",
"0.63462955",
"0.63196266",
"0.6317461",
"0.6301773",
"0.62836295",
"0.62759984",
"0.62743574",
"0.6226743",
"0.62229025",
"0.... | 0.63556176 | 11 |
Selects the kth maximum value from the array a. This method throws IllegalArgumentException if a is null, has zero length, or if there is no kth maximum value. Note that there is no kth maximum value if k a.length, or if k is larger than the number of distinct values in the array. The array a is not changed by this method. | public static <T> T kmax(Collection<T> c, int k, Comparator<T> comp) {
//Check collectionfor null or empty, comp is null.
if (c == null || comp == null) {
throw new IllegalArgumentException();
}
//Check if collection is empty.
if (c.isEmpty()) {
throw new NoSuchElementException();
}
// Create Arraylist of collection and sort.
List<T> copyList = new ArrayList(c);
java.util.Collections.sort(copyList, comp);
// Check if k < 0 or k > array length.
if (k > copyList.size() || k <= 0) {
throw new NoSuchElementException();
}
// Count the number of unique values, remove duplicates.
int dupCount = 0;
int uniTot = 0;
int origTot = copyList.size();
for (int i = 0;i < copyList.size();i++) {
while (copyList.size() > 1 && i < copyList.size() - 1 && copyList.get(i) == copyList.get(i + 1)) {
copyList.remove(i);
dupCount++;
}
}
uniTot = origTot - dupCount;
// k is greater than the number of unique values.
if (k > uniTot) {
throw new NoSuchElementException();
}
return copyList.get(uniTot - k);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static int kmax(int[] a, int k) throws IllegalArgumentException {\n if (ktest(a, k)) {\n throw new IllegalArgumentException();\n }\n int[] array = Arrays.copyOf(a, a.length);\n int element;\n int increment = 1;\n \n Arrays.sort(array);\n element = array[array.... | [
"0.80327123",
"0.70282423",
"0.68296516",
"0.65733016",
"0.63795257",
"0.63691974",
"0.6358627",
"0.62670594",
"0.6198016",
"0.618936",
"0.61764884",
"0.61552596",
"0.6136665",
"0.60544974",
"0.60518044",
"0.5978899",
"0.59439486",
"0.5897347",
"0.58705235",
"0.58655095",
"0.... | 0.6104964 | 13 |
Returns an array containing all the values in a in the range [low..high]; that is, all the values that are greater than or equal to low and less than or equal to high, including duplicate values. The length of the returned array is the same as the number of values in the range [low..high]. If there are no qualifying values, this method returns a zerolength array. Note that low and high do not have to be actual values in a. This method throws an IllegalArgumentException if a is null or has zero length. The array a is not changed by this method. | public static <T> Collection<T> range(Collection<T> c, T low, T high,
Comparator<T> comp) {
// Check for null.
if (c == null || comp == null) {
throw new IllegalArgumentException();
}
// Checks if collection is empty.
if (c.isEmpty()) {
throw new NoSuchElementException();
}
// Make arraylist of original and arraylist for the range
// Set j for number of qualifying values
List<T> copyList = new ArrayList(c);
List<T> range = new ArrayList(c);
int j = 0;
/* New copy so that the values within range listed are first in the array*/
for (int i = 0; i < copyList.size(); i++) {
if ((comp.compare(copyList.get(i), low) >= 0)
&& (comp.compare(copyList.get(i), high) <= 0)) {
range.set(j, copyList.get(i));
j++;
}
}
// No values in the arraylist fall within the range.
if (j == 0) {
throw new NoSuchElementException();
}
// Delete extra values of range.
for (int i = range.size() - 1; i > j - 1; i--) {
range.remove(i);
}
return range;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static int[] range(int[] a, int low, int high) throws IllegalArgumentException {\n if (a == null || a.length == 0) {\n throw new IllegalArgumentException();\n }\n \n int increment = 0;\n \n for (int i : a) {\n if (i >= low && i <= high) {\n increment+... | [
"0.7233186",
"0.6009235",
"0.56813645",
"0.5615104",
"0.5430987",
"0.54206085",
"0.54177314",
"0.53450364",
"0.53366387",
"0.532791",
"0.53268284",
"0.5314805",
"0.53010964",
"0.52832997",
"0.52411157",
"0.517275",
"0.5168968",
"0.5141095",
"0.51357365",
"0.51341206",
"0.5093... | 0.0 | -1 |
Returns the smallest value in a that is greater than or equal to the given key. This method throws an IllegalArgumentException if a is null or has zero length, or if there is no qualifying value. Note that key does not have to be an actual value in a. The array a is not changed by this method. | public static <T> T ceiling(Collection<T> c, T key, Comparator<T> comp) {
// a is null or has a length of 0
if (c == null || comp == null) {
throw new IllegalArgumentException();
}
if (c.isEmpty()) {
throw new NoSuchElementException();
}
T ceiling = null;
Iterator<T> itr = c.iterator();
boolean found = false; //Tells if first possible ceiling found
while (itr.hasNext()) {
T temp = itr.next();
//if haven't found first ceiling, just compare to key.
if (!found && comp.compare(temp, key) >= 0) {
ceiling = temp;
found = true;
}
//if found first ceiling, compare to key and current ceiling value
else if (comp.compare(temp, key) >= 0 && comp.compare(temp, ceiling) <= 0) {
ceiling = temp;
}
}
if (!found) {
throw new NoSuchElementException();
}
return ceiling;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static int floor(int[] a, int key) throws IllegalArgumentException {\n if (a == null || a.length == 0) {\n throw new IllegalArgumentException();\n }\n \n int candidate = Integer.MIN_VALUE;\n boolean happen = false;\n \n for (int i : a) {\n if (i <= key && i... | [
"0.69210666",
"0.6562654",
"0.6521457",
"0.65042424",
"0.6248657",
"0.62360996",
"0.6156042",
"0.59909564",
"0.59523916",
"0.58891785",
"0.5845993",
"0.58312035",
"0.57992893",
"0.5761462",
"0.57548857",
"0.5752696",
"0.57163936",
"0.570965",
"0.5666612",
"0.56005514",
"0.559... | 0.0 | -1 |
Returns the largest value in a that is less than or equal to the given key. This method throws an IllegalArgumentException if a is null or has zero length, or if there is no qualifying value. Note that key does not have to be an actual value in a. The array a is not changed by this method. | public static <T> T floor(Collection<T> c, T key, Comparator<T> comp) {
// a is null or has a length of 0
if (c == null || comp == null) {
throw new IllegalArgumentException();
}
if (c.isEmpty()) {
throw new NoSuchElementException();
}
// Minimum value
Iterator<T> itr = c.iterator();
T floor = itr.next();
if (itr.hasNext()) {
for (T element: c) {
if (comp.compare(element, floor) < 0) {
floor = element;
}
}
}
int change = 0;
// Lowest value equal to or above the key.
for (T element: c) {
if ((comp.compare(element, key) <= 0)
&& (comp.compare(element, floor) >= 0)) {
floor = element;
change++;
}
}
// No qualifying value for ceiling.
if (change == 0) {
throw new NoSuchElementException();
}
return floor;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int searchStrictlyGreater(T key) {\n if ((array.length == 1) ||\n (array[0].compareTo(key) == -1) ||\n (array[array.length - 1].compareTo(key) == 1)) {\n return 0;\n }\n\n int start = 0, end = array.length - 2;\n\n do {\n int mid = star... | [
"0.6608963",
"0.65940356",
"0.6420717",
"0.63737774",
"0.6363791",
"0.6322431",
"0.630686",
"0.6267443",
"0.62583274",
"0.62422633",
"0.59481645",
"0.5928498",
"0.59196496",
"0.58926445",
"0.5822528",
"0.5791181",
"0.5787743",
"0.5724375",
"0.57197833",
"0.56746024",
"0.56715... | 0.0 | -1 |
Gets the chat header. | public short getHeader() {
if (this == CHAT) {
return Outgoing.ChatMessageComposer;
} else if (this == SHOUT) {
return Outgoing.ShoutMessageComposer;
} else if (this == WHISPER) {
return Outgoing.WhisperMessageComposer;
}
return -1;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getHeader();",
"public String getHeader()\r\n\t{\r\n\t\treturn header;\r\n\t}",
"public String getHeader() {\n\t\treturn _header;\n\t}",
"public String getHeader() {\n return header;\n }",
"public String getHeader() {\n return header;\n }",
"public std_msgs.msg.dds.Heade... | [
"0.7115885",
"0.70838654",
"0.7049345",
"0.7040697",
"0.7040697",
"0.70145345",
"0.6954617",
"0.69480217",
"0.6923193",
"0.6919025",
"0.6828769",
"0.67565197",
"0.67357767",
"0.6687672",
"0.6680874",
"0.6645429",
"0.664131",
"0.6628807",
"0.6586816",
"0.65365875",
"0.6525148"... | 0.681994 | 11 |
an identifier for an item Basic empty constructor | public AddItemViewParameters() {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private Item(){}",
"public Item() {}",
"public Item(){}",
"public ItemInfo () {}",
"@SuppressWarnings(\"unused\")\n public Item() {\n }",
"public Item() {\n\t}",
"public Item() {\n\t}",
"public Item() {\n }",
"public Item() {\n }",
"public Item() \r\n\t{\r\n\t\tname = \"AbstractItem\"... | [
"0.7398773",
"0.7398223",
"0.7369483",
"0.73280704",
"0.722633",
"0.7079901",
"0.7079901",
"0.6977137",
"0.6977137",
"0.69473135",
"0.6934519",
"0.68360144",
"0.68259406",
"0.6806602",
"0.6781799",
"0.6759984",
"0.67568034",
"0.67567855",
"0.6684638",
"0.6682281",
"0.6654571"... | 0.0 | -1 |
Constructor for a ViewParameters object for Adding Items | public AddItemViewParameters(String viewID, Long id) {
this.id = id;
this.viewID = viewID;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public AddItemViewParameters() {\n\t}",
"public NewItems() {\n super();\n }",
"ParametersView(){\r\n\t\ttable.setWidget(0, 0,new Label(OpenXDataFacade.getOpenXDataConstants().label_name()));\r\n\t\ttable.setWidget(0, 1,new Label(OpenXDataFacade.getOpenXDataConstants().label_value()));\r\n\t\ttable.se... | [
"0.8200053",
"0.61370003",
"0.6058557",
"0.6018438",
"0.5869737",
"0.5806606",
"0.57680976",
"0.57251453",
"0.5656233",
"0.5649702",
"0.56271535",
"0.56251514",
"0.56050956",
"0.5601799",
"0.56007284",
"0.5581302",
"0.5566501",
"0.55626357",
"0.5542474",
"0.5514264",
"0.54972... | 0.6857638 | 1 |
Created by Vitalii on 21.08.18. | public interface CustomerRepository extends MongoRepository<Customer, String> {
Customer findByFirstName(String firstName);
List<Customer> findByLastName(String lastName);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void perish() {\n \n }",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\... | [
"0.6105517",
"0.59973997",
"0.5951058",
"0.59289193",
"0.5850682",
"0.58443516",
"0.58443516",
"0.5834063",
"0.58309954",
"0.5805833",
"0.578384",
"0.5779991",
"0.5772055",
"0.5761399",
"0.57536405",
"0.5752797",
"0.5749305",
"0.5664639",
"0.5640975",
"0.56241804",
"0.5621397... | 0.0 | -1 |
This function takes a positive integer, n, and returns the corresponding Fibonacci number, fib(N), where fib(0) = 0, fib(1) = 1, and fib(N) = fib(N1) + fib(N2) for all N > 1. for example: if n = 1 the result will be 1, and if n = 3 the result will be 2 because 2 = 1 + 1, and if n = 5 the result will be 5 because 5 = 3 + 2 | public static int fib(int n) {
if (n == 0) {
return 0;
} else if (n == 1) {
return 1;
} else {
return fib(n-1) + fib(n-2);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private int fib(int n) {\n int retVal = 0;\n if (n == 1) {\n retVal = 1;\n } else if (n == 2) {\n retVal = 1;\n } else {\n \n int nextfib = fib(n-2) + fib(n-1);\n retVal = nextfib;\n }\n \n return retVal;\n ... | [
"0.8952555",
"0.89313084",
"0.89166886",
"0.88863224",
"0.8868657",
"0.8853242",
"0.88485706",
"0.8787673",
"0.8752418",
"0.8696998",
"0.86332554",
"0.8610085",
"0.859204",
"0.85852426",
"0.85652566",
"0.855588",
"0.85406595",
"0.8538361",
"0.84628546",
"0.84200525",
"0.83973... | 0.9014081 | 0 |
Authentication.log(req.getCookies()[0].getValue() + " ."); System.out.println("START ADMIN Edit SERVLET IS DONE! (GET)"); | @Override
protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
if (Authentication.isAdminInDbByCookies(req)) {
// Authentication.log(req.getCookies()[0].getValue() + " - redirect to /admin/registration/registration.html");
req.getRequestDispatcher("/admin/registration/registration.html")
.forward(req, resp);
} else {
// Authentication.log(req.getCookies()[0].getValue() + " - redirect to / . Error Authorization.");
resp.sendRedirect("/");
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected void doPost(HttpServletRequest r, HttpServletResponse s) throws ServletException, IOException {\n Cookie ck=new Cookie(\"auth\",\"\"); \n ck.setMaxAge(0);\n s.addCookie(ck); \n RequestDispatcher rd = r.getRequestDispatcher(\"index.jsp\");\n rd.forward(r, s)... | [
"0.6577397",
"0.6488018",
"0.64688945",
"0.64301056",
"0.6311893",
"0.6238824",
"0.61970955",
"0.61845267",
"0.61750066",
"0.6038336",
"0.5989205",
"0.5980924",
"0.5978478",
"0.59776235",
"0.59022117",
"0.58864045",
"0.58811146",
"0.58592504",
"0.5853684",
"0.5836049",
"0.580... | 0.6169179 | 9 |
System.out.println(Utils.getCurrentTime() + " / START ADMIN Edit SERVLET IS DONE! POST"); Authentication.log(req.getCookies()[0].getValue() + " "); | @Override
protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws IOException {
req.setCharacterEncoding("UTF-8");
resp.setContentType("application/json; charset=UTF-8");
JSONObject userJSon = Utils.getJsonFromRequest(req);
JSONObject jsonObjectResponse = new JSONObject();
System.out.println(userJSon);
if (Authentication.isAdminInDbByCookies(req)) {
if (userJSon.getString("command").equals("setTurnNumberForMember")) {
if(Authentication.getRepository().isTurnNumberFree(userJSon.getInt("turnNumber"))){
Member member = Authentication.getRepository().getMemberById(userJSon.getInt("idMember"));
Authentication.getRepository().updateTurnNumberForMember(member, userJSon.getInt("turnNumber"));
jsonObjectResponse.append("status", "200");
jsonObjectResponse.append("message", "Номер жеребъевки установлен");
}else{
jsonObjectResponse.append("status", "400");
jsonObjectResponse.append("message", "Номер уже занят");
}
}
}
resp.getWriter().write(String.valueOf(jsonObjectResponse));
resp.flushBuffer();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected void doPost(HttpServletRequest r, HttpServletResponse s) throws ServletException, IOException {\n Cookie ck=new Cookie(\"auth\",\"\"); \n ck.setMaxAge(0);\n s.addCookie(ck); \n RequestDispatcher rd = r.getRequestDispatcher(\"index.jsp\");\n rd.forward(r, s)... | [
"0.6721027",
"0.65598255",
"0.6554182",
"0.618234",
"0.61306256",
"0.60872155",
"0.6027173",
"0.59085345",
"0.5895349",
"0.5861654",
"0.58506024",
"0.584596",
"0.5830441",
"0.58209485",
"0.5804857",
"0.57756805",
"0.57730716",
"0.5757975",
"0.5747523",
"0.5745708",
"0.5739506... | 0.53197664 | 96 |
Created by lenovo on 2019/11/24. | @Mapper
public interface SkuMapper {
@Select("select * from Sku")
List<SkuParam> getAll();
@Insert(value = {"INSERT INTO Sku (skuName,price,categoryId,brandId,description) VALUES (#{skuName},#{price},#{categoryId},#{brandId},#{description})"})
@Options(useGeneratedKeys=true, keyProperty="skuId")
int insertLine(Sku sku);
// @Insert(value = {"INSERT INTO Sku (categoryId,brandId) VALUES (2,1)"})
// @Options(useGeneratedKeys=true, keyProperty="SkuId")
// int insertLine(Sku sku);
@Delete(value = {
"DELETE from Sku WHERE skuId = #{skuId}"
})
int deleteLine(@Param(value = "skuId") Long skuId);
// @Insert({
// "<script>",
// "INSERT INTO",
// "CategoryAttributeGroup(id,templateId,name,sort,createTime,deleted,updateTime)",
// "<foreach collection='list' item='obj' open='values' separator=',' close=''>",
// " (#{obj.id},#{obj.templateId},#{obj.name},#{obj.sort},#{obj.createTime},#{obj.deleted},#{obj.updateTime})",
// "</foreach>",
// "</script>"
// })
// Integer createCategoryAttributeGroup(List<CategoryAttributeGroup> categoryAttributeGroups);
@Update("UPDATE Sku SET skuName = #{skuName} WHERE skuId = #{skuId}")
int updateLine(@Param("skuId") Long skuId,@Param("skuName")String skuName);
@Select({
"<script>",
"SELECT",
"s.SkuName,c.categoryName,s.categoryId,b.brandName,s.price",
"FROM",
"Sku AS s",
"JOIN",
"Category AS c ON s.categoryId = c.categoryId",
"JOIN",
"Brand AS b ON s.brandId = b.brandId",
"WHERE 1=1",
//范围查询,根据时间
"<if test=\" null != higherSkuParam.startTime and null != higherSkuParam.endTime \">",
"AND s.updateTime >= #{higherSkuParam.startTime}",
"AND s.updateTime <= #{ higherSkuParam.endTime}",
"</if>",
//模糊查询,根据类别
"<if test=\"null != higherSkuParam.categoryName and ''!=higherSkuParam.categoryName\">",
" AND c.categoryName LIKE CONCAT('%', #{higherSkuParam.categoryName}, '%')",
"</if>",
//模糊查询,根据品牌
"<if test=\"null != higherSkuParam.brandName and ''!=higherSkuParam.brandName\">",
" AND b.brandName LIKE CONCAT('%', #{higherSkuParam.brandName}, '%')",
"</if>",
//模糊查询,根据商品名字
"<if test=\"null != higherSkuParam.skuName and ''!=higherSkuParam.skuName\">",
" AND s.skuName LIKE CONCAT('%', #{higherSkuParam.skuName}, '%')",
"</if>",
//根据多个类别查询
"<if test=\" null != higherSkuParam.categoryIds and higherSkuParam.categoryIds.size>0\" >",
"AND s.categoryId IN",
"<foreach collection=\"higherSkuParam.categoryIds\" item=\"data\" index=\"index\" open=\"(\" separator=\",\" close=\")\" >",
" #{data} ",
"</foreach>",
"</if>",
"</script>"
})
List<HigherSkuDTO> higherSelect(@Param("higherSkuParam")HigherSkuParam higherSkuParam);
// "<if test=\" null != higherSkuParam.categoryName and ''!=higherSkuParam.categoryName \" >",
// " AND c.categoryName LIKE \"%#{higherSkuParam.categoryName}%\" ",
// "</if>",
// "<if test=\" null != higherSkuParam.skuName \" >",
// "AND s.skuName LIKE \"%#{higherSkuParam.skuName}%\" ",
// "</if>",
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void perish() {\n \n }",
"private stendhal() {\n\t}",
"private static void cajas() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\r\n\tpubli... | [
"0.57608926",
"0.5674069",
"0.5451703",
"0.54067814",
"0.53571814",
"0.5324442",
"0.5322599",
"0.5322599",
"0.5319341",
"0.5306625",
"0.5266298",
"0.5252017",
"0.5208263",
"0.52068114",
"0.51970905",
"0.51891965",
"0.5182249",
"0.5181757",
"0.51706547",
"0.5166451",
"0.516356... | 0.0 | -1 |
own methods of LoginPage login | public void doLogin() {
System.out.println("loginpage ----dologin");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected void login() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void login() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void login() {\n\r\n\t}",
"@Override\n\tpublic void goToLogin() {\n\t\t\n\t}",
"@Override\n\tprotected void login() {\n\t\tsuper.login();\n\t}",
"public static void Login() \r\n\t{\n\t\t\r\... | [
"0.8071522",
"0.7920992",
"0.77781737",
"0.7647376",
"0.75355715",
"0.7428613",
"0.7419732",
"0.73825747",
"0.73685384",
"0.7354472",
"0.7337283",
"0.7329271",
"0.7295023",
"0.7249549",
"0.7241722",
"0.7192654",
"0.71792126",
"0.71647906",
"0.7112407",
"0.71118695",
"0.711012... | 0.74133015 | 7 |
TODO Autogenerated method stub | @Override
public void onClick(View v) {
FragmentHelper.replaceFragment(R.id.fl_fragment_holder, getFragmentManager(), ShareFansFragment.class);
} | {
"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
protected void getUserList(boolean isRefresh) {
super.getUserList(isRefresh);
DamiInfo.getFollowerList(mLogin.uid, searchHolder.getPage(), searchHolder.searchText, new MyListener(
getActivity(), isRefresh));
} | {
"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 onResume() {
super.onResume();
getShareActivity().setTitleText(R.string.follow);
getShareActivity().setBackListener(null);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.608016... | 0.0 | -1 |
Nothing to do here | protected void handlePurchaseFinished(AmazonPurchaseType purchase)
{
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void perish() {\n \n }",
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n\tprotected void interr()... | [
"0.65027386",
"0.64400053",
"0.6435486",
"0.6430571",
"0.63487476",
"0.63076884",
"0.6240374",
"0.6240374",
"0.62271625",
"0.61729383",
"0.61623496",
"0.61500907",
"0.6111769",
"0.61006016",
"0.60868824",
"0.6081051",
"0.60508543",
"0.60442185",
"0.6023228",
"0.60147023",
"0.... | 0.0 | -1 |
move the cursor to the left until left gap end is hit while also shifting chars to the right | private void left(int pos) {
while (pos < gapLeft) {
gapLeft--;
gapRight--;
buffer[gapRight+1] = buffer[gapLeft];
buffer[gapLeft] = '\0';
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void moveLeft(){\n if(currentText != null) {\n //The saved character index should no longer be restored\n savedCharacterIndex = -1;\n\n //Try to move the cursor\n characterIndex -= 1;\n //If the cursor did not wrap onto a new line then update it'... | [
"0.7420903",
"0.7390789",
"0.7329771",
"0.6772517",
"0.66507256",
"0.6474027",
"0.6419076",
"0.63760585",
"0.61960745",
"0.6192656",
"0.619231",
"0.6170128",
"0.6150303",
"0.6144912",
"0.6100825",
"0.6085334",
"0.60779405",
"0.6031845",
"0.601916",
"0.5977885",
"0.59698725",
... | 0.71013796 | 3 |
move the cursor to the right until right gap end is hit while shifting chars to the left | private void right(int pos) {
while (pos > gapLeft) {
gapLeft++;
gapRight++;
buffer[gapLeft-1] = buffer[gapRight];
buffer[gapRight] = '\0';
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void moveCursorRight();",
"public void moveRight(){\n if(currentText != null) {\n //The saved character index should no longer be restored\n savedCharacterIndex = -1;\n\n //Try to move the cursor\n characterIndex += 1;\n //If the cursor did not... | [
"0.779449",
"0.77263516",
"0.73956174",
"0.7170683",
"0.7025348",
"0.68479335",
"0.66964746",
"0.6630854",
"0.6505961",
"0.65009975",
"0.6465821",
"0.6463899",
"0.6442945",
"0.6399096",
"0.63357276",
"0.6306075",
"0.63010955",
"0.62856686",
"0.6235879",
"0.62115026",
"0.62070... | 0.7178073 | 3 |
move the gap location to the start of the provided position | private void moveTo(int position) {
if (position < gapLeft) {
left(position);
}
else {
right(position);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void positionToStart () {\n currentRow = 0 - currentPiece.getOffset();\n currentColumn = board.columns / 2 - currentPiece.width / 2;\n }",
"public void goToStart() {\n\t\tsetPosition(0);\n\t}",
"public void\nshiftToOrigin()\n{\n\tthis.setLine(0.0, 0.0,\n\t\tthis.getP2().getX() - this.getP1().g... | [
"0.653957",
"0.61929667",
"0.5965378",
"0.58920467",
"0.5883077",
"0.5880848",
"0.5878212",
"0.58548486",
"0.5851386",
"0.5813902",
"0.57955456",
"0.57918733",
"0.57879156",
"0.578641",
"0.5744098",
"0.5689621",
"0.5636573",
"0.5628693",
"0.56166977",
"0.5610482",
"0.55957454... | 0.7679224 | 0 |
Inflate the menu; this adds items to the action bar if it is present. | @Override
public boolean onCreateOptionsMenu(Menu menu) {
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tMenuInflater inflater = getMenuInflater();\n \tinflater.inflate(R.menu.main_activity_actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {... | [
"0.7246102",
"0.7201358",
"0.7194834",
"0.7176498",
"0.71066517",
"0.7039537",
"0.7037961",
"0.70112145",
"0.70094734",
"0.69807225",
"0.6944953",
"0.69389373",
"0.6933199",
"0.6916928",
"0.6916928",
"0.6891486",
"0.68831646",
"0.68754137",
"0.68745375",
"0.68621665",
"0.6862... | 0.0 | -1 |
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) {
switch (item.getItemId()) {
case android.R.id.home:
onBackPressed();
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.79041183",
"0.7805934",
"0.77659106",
"0.7727251",
"0.7631684",
"0.7621701",
"0.75839096",
"0.75300384",
"0.74873656",
"0.7458051",
"0.7458051",
"0.7438486",
"0.742157",
"0.7403794",
"0.7391802",
"0.73870087",
"0.7379108",
"0.7370295",
"0.7362194",
"0.7355759",
"0.73454577... | 0.72597474 | 39 |
Verifies the developer payload of a purchase. | boolean verifyDeveloperPayload(Purchase p) {
String payload = p.getDeveloperPayload();
String messageAfterDecrypt = "not_empty_line";
String password = getString(R.string.check_token);
;
try {
messageAfterDecrypt = AESCrypt.decrypt(password, payload);
//Log.e(TAG, "messageAfterDecrypt " + messageAfterDecrypt);
//Log.e(TAG, "email " + email);
} catch (GeneralSecurityException e) {
e.printStackTrace();
//handle error - could be due to incorrect password or tampered encryptedMsg
}
// if (messageAfterDecrypt.equals(email)){
// return true;
// }
if (Utils.isEmailValid(messageAfterDecrypt)) {
return true;
}
return false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"boolean verifyDeveloperPayload(Purchase p) {\n String payload = p.getDeveloperPayload();\n\n /*\n * TODO: verify that the developer payload of the purchase is correct. It will be\n * the same one that you sent when initiating the purchase.\n *\n * WARNING: Locally gene... | [
"0.77633524",
"0.7717056",
"0.7712862",
"0.77019256",
"0.7629482",
"0.7334401",
"0.7135012",
"0.57475924",
"0.54765177",
"0.54716784",
"0.5441592",
"0.53770256",
"0.5295385",
"0.5277821",
"0.5277821",
"0.52756935",
"0.5275265",
"0.52747554",
"0.5207311",
"0.51871467",
"0.5178... | 0.68576807 | 7 |
"Subscribe to premium" button clicked. Explain to user, then start purchase flow for subscription. | public void onPremiumButtonClicked(String sku) {
if (!mHelper.subscriptionsSupported()) {
complain("Subscriptions not supported on your device yet. Sorry!");
Toast.makeText(this, R.string.subscription_not_supported, Toast.LENGTH_LONG).show();
return;
}
startPurchase(sku);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void becomePremium() {\n\t\tif (this.account >= 100 && this.premium == false) {\n\t\t\tthis.account -= 100;\n\t\t\tthis.premium = true;\n\t\t\tSystem.out.println(\"Premium transaction successful\");\n\n\t\t} else if (this.premium == true) {\n\t\t\tSystem.out.println(\"They are already a premium user!\");\n\... | [
"0.638025",
"0.6375446",
"0.6359336",
"0.6175043",
"0.61503625",
"0.6069663",
"0.60518974",
"0.59832424",
"0.59779716",
"0.5940223",
"0.5904132",
"0.58994174",
"0.58884674",
"0.5874236",
"0.58732116",
"0.58337075",
"0.581741",
"0.57861185",
"0.5781358",
"0.5777813",
"0.577696... | 0.78315544 | 0 |
Received a broadcast notification that the inventory of items has changed | @Override
public void receivedBroadcast() {
Log.d(TAG, "Received broadcast notification. Querying inventory.");
try {
mHelper.queryInventoryAsync(mGotInventoryListener);
} catch (IabHelper.IabAsyncInProgressException e) {
complain("Error querying inventory. Another async operation in progress.");
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void onInventoryChanged();",
"@Override\n\tpublic void onInventoryChanged() {\n\t}",
"@Override\n\tpublic void onInventoryChanged() {\n\t\tsuper.onInventoryChanged();\n\t}",
"@Override\n public void onReceiveItem(InventoryItem itemReceived) {\n inventory.add(itemReceived);\n }",
"public... | [
"0.75090235",
"0.70304346",
"0.68367904",
"0.66785955",
"0.65945077",
"0.6385528",
"0.6311397",
"0.6211138",
"0.59730184",
"0.5886449",
"0.58600694",
"0.58429676",
"0.5797691",
"0.5771104",
"0.5694377",
"0.56935364",
"0.5691021",
"0.5690487",
"0.56854707",
"0.5677443",
"0.566... | 0.6565779 | 5 |
Returns a new instance of this fragment for the given section number. | public static PlaceholderFragment newInstance(int sectionNumber, String title_green, String title_black, String message, int imageId) {
PlaceholderFragment fragment = new PlaceholderFragment();
Bundle args = new Bundle();
args.putInt(ARG_SECTION_NUMBER, sectionNumber);
args.putString(ARG_SECTION_TITLE_GREEN, title_green);
args.putString(ARG_SECTION_TITLE_BLACK, title_black);
args.putString(ARG_SECTION_MESSAGE, message);
args.putInt(ARG_SECTION_IMAGE, imageId);
fragment.setArguments(args);
return fragment;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static MainFragment newInstance(int sectionNumber) {\n MainFragment fragment = new MainFragment();\n Bundle args = new Bundle();\n args.putInt(ARG_SECTION_NUMBER, sectionNumber);\n fragment.setArguments(args);\n return fragment;\n }",
"public s... | [
"0.78378177",
"0.7716026",
"0.7709604",
"0.7697141",
"0.76830727",
"0.7609837",
"0.75962704",
"0.75684774",
"0.75684774",
"0.75684774",
"0.75684774",
"0.75684774",
"0.75684774",
"0.75684774",
"0.75684774",
"0.75684774",
"0.75684774",
"0.75684774",
"0.75684774",
"0.75684774",
... | 0.58187133 | 80 |
getItem is called to instantiate the fragment for the given page. Return a PlaceholderFragment (defined as a static inner class below). get resourceid by index | @Override
public Fragment getItem(int position) {
int imageId = imgs.getResourceId(position, -1);
return PlaceholderFragment.newInstance(position + 1, premium_title_green[position], premium_title_black[position], premium_messages[position], imageId);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@NonNull\n public abstract Fragment getItem(int position);",
"public abstract @NonNull\n Fragment getItem(int position);",
"@Override\n public Fragment getItem(int position) {\n return WebPageFragment.newInstance(position);\n }",
"@Override\n\t\tpublic Fragment getI... | [
"0.70114493",
"0.6913635",
"0.68273306",
"0.6803847",
"0.6778322",
"0.6738602",
"0.6716459",
"0.66962814",
"0.6679142",
"0.6679142",
"0.6679142",
"0.6679142",
"0.6679142",
"0.6679142",
"0.6679142",
"0.6679142",
"0.6679142",
"0.6679142",
"0.6679142",
"0.6679142",
"0.6679142",
... | 0.66825694 | 8 |
Show 3 total pages. | @Override
public int getCount() {
return 3;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\t\tpublic int getCount() {\n\t\t\t// Show 3 total pages.\n\t\t\treturn 3;\n\t\t}",
"@Override\n // This returns the number of pages we have within our view pager\n public int getCount() {\n return 3;\n }",
"int getPagesAmount();",
"long getAmountPage();",
"int ge... | [
"0.73187506",
"0.6635979",
"0.65495735",
"0.60749024",
"0.60535365",
"0.60250705",
"0.59699196",
"0.5968611",
"0.5940594",
"0.5940594",
"0.5940594",
"0.5940594",
"0.5938626",
"0.5930186",
"0.5914707",
"0.5895975",
"0.5858174",
"0.58556",
"0.5817852",
"0.5745203",
"0.5739178",... | 0.0 | -1 |
Set whether the client is enabled. This can react to device online/offline state as well as other considerations. | public static synchronized void setEnabled(boolean enabled) {
ENABLED = enabled;
if (ENABLED) {
/*
* Try immediately to send any enqueued items. Otherwise another
* item must be enqueued before sending is triggered.
*/
OutputBuffer.sendAllScheduled();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setEnabled(boolean value) {\n m_Enabled = value;\n }",
"public void setEnabled(boolean value) {\n this.enabled = value;\n }",
"public void enable() {\r\n m_enabled = true;\r\n }",
"public boolean setEnabled(boolean enable);",
"final public void setEnabled(boolean value) ... | [
"0.7293475",
"0.72485",
"0.70286036",
"0.69507176",
"0.6896474",
"0.6779052",
"0.67536426",
"0.6731144",
"0.6731144",
"0.6723176",
"0.6720934",
"0.670201",
"0.6699232",
"0.6669022",
"0.66678035",
"0.66664124",
"0.66578585",
"0.66578585",
"0.66577315",
"0.66577315",
"0.6657731... | 0.5944745 | 85 |
Submit an event to be enqueued and sent to the Event Platform | public static synchronized void submit(Event event) {
StreamConfig streamConfig = STREAM_CONFIGS.get(event.getStream());
if (streamConfig == null) {
return;
}
if (!SamplingController.isInSample(event)) {
return;
}
addEventMetadata(event);
//
// Temporarily send events immediately in order to investigate discrepancies in
// the numbers of events submitted in this system vs. legacy eventlogging.
//
// https://phabricator.wikimedia.org/T281001
//
// OutputBuffer.schedule(event);
OutputBuffer.sendEventsForStream(streamConfig, Collections.singletonList(event));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void submit(Event event) {\n\t\tthis.eventManager.submit(event);\n\t}",
"@Override\n\tpublic void publishMessage(QPEvent event) {\n\t\tfor(final String endpoint : webhookRegistry.all()) {\n\t\t\tlog.debug(\"POSTing event to {}\", endpoint);\n\t\t\t\n\t\t\ttry {\n\t\t\t\tCloseableHttpAsyncClient httpClient... | [
"0.70192045",
"0.6357763",
"0.61830354",
"0.60607636",
"0.6056932",
"0.5924874",
"0.5920299",
"0.5918575",
"0.5917086",
"0.58473283",
"0.58449036",
"0.58099115",
"0.5790711",
"0.5731101",
"0.57259434",
"0.57037956",
"0.5665263",
"0.56092083",
"0.5606461",
"0.5600482",
"0.5592... | 0.6799165 | 1 |
Supplement the outgoing event with additional metadata, if not already present. These include: dt: ISO 8601 timestamp app_session_id: the current session ID app_install_id: app install ID | static void addEventMetadata(Event event) {
event.setSessionId(AssociationController.getSessionId());
event.setAppInstallId(Prefs.INSTANCE.getAppInstallId());
event.setDt(DateUtil.iso8601DateFormat(new Date()));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public WriteMetadataEvent() {\n }",
"@Override\n public void writeToParcel(Parcel dest, int flags) {\n dest.writeInt(id);\n dest.writeInt(date);\n dest.writeString(event);\n dest.writeString(location);\n dest.writeString(startTime);\n dest.writeString(endTime);\n ... | [
"0.52264535",
"0.5062785",
"0.4938376",
"0.49103796",
"0.47853476",
"0.4773421",
"0.47556144",
"0.47485334",
"0.47434682",
"0.47410858",
"0.47309276",
"0.46732357",
"0.4669621",
"0.46687186",
"0.46130997",
"0.45965275",
"0.45750713",
"0.4571275",
"0.45688945",
"0.45504946",
"... | 0.64941025 | 0 |
Schedule a request to be sent. | static synchronized void schedule(Event event) {
if (ENABLED || QUEUE.size() <= MAX_QUEUE_SIZE) {
QUEUE.add(event);
}
if (ENABLED) {
if (QUEUE.size() >= MAX_QUEUE_SIZE) {
sendAllScheduled();
} else {
//The arrival of a new item interrupts the timer and resets the countdown.
WikipediaApp.getInstance().getMainThreadHandler().removeCallbacks(SEND_RUNNABLE);
WikipediaApp.getInstance().getMainThreadHandler().postDelayed(SEND_RUNNABLE, WAIT_MS);
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void schedule() {\n service.scheduleDelayed(task, schedulingInterval);\n isScheduled = true;\n }",
"@Override\n public void mySchedule(String date) {\n FastJsonRequest request = new FastJsonRequest(SystemUtils.mainUrl + MethodCode.CLASSSCHEDULE + MethodType.MYSCHEDULEV2, RequestMethod.PO... | [
"0.65820706",
"0.65254927",
"0.6394178",
"0.618411",
"0.61272085",
"0.6109445",
"0.5970027",
"0.5929531",
"0.58185923",
"0.5797784",
"0.5777061",
"0.5723928",
"0.56709975",
"0.5656845",
"0.5629954",
"0.5527104",
"0.54956245",
"0.54951274",
"0.54882604",
"0.5484812",
"0.546132... | 0.51686513 | 62 |
If sending is enabled, attempt to send the provided events. Also batch the events ordered by their streams, as the QUEUE can contain events of different streams | private static void send() {
Map<String, ArrayList<Event>> eventsByStream = new HashMap<>();
for (Event event : QUEUE) {
String stream = event.getStream();
if (!eventsByStream.containsKey(stream) || eventsByStream.get(stream) == null) {
eventsByStream.put(stream, new ArrayList<>());
}
eventsByStream.get(stream).add(event);
}
for (String stream : eventsByStream.keySet()) {
if (Prefs.INSTANCE.isEventLoggingEnabled()) {
sendEventsForStream(STREAM_CONFIGS.get(stream), eventsByStream.get(stream));
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n void sendEvents() {\n // Arrange\n final String messageId = UUID.randomUUID().toString();\n final SendOptions options = new SendOptions().setPartitionId(PARTITION_ID);\n final EventHubProducerAsyncClient producer = toClose(builder.buildAsyncProducerClient());\n final L... | [
"0.61648417",
"0.6087815",
"0.5913808",
"0.5833961",
"0.57914805",
"0.5788404",
"0.5627047",
"0.56072813",
"0.55456764",
"0.5540141",
"0.5419516",
"0.541667",
"0.5327851",
"0.5250783",
"0.5238629",
"0.5228517",
"0.52174777",
"0.5171673",
"0.5137563",
"0.5126833",
"0.51221347"... | 0.7656632 | 0 |
Generate a pageview identifier. | static String getPageViewId() {
if (PAGEVIEW_ID == null) {
PAGEVIEW_ID = generateRandomId();
}
return PAGEVIEW_ID;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static int generateViewId() {\n return View.generateViewId();\n }",
"public static int generateViewId() {\n\t\tdo {\n\t\t\tfinal int result = sNextGeneratedId.get();\n\t\t\t// aapt-generated IDs have the high byte nonzero; clamp to the range under that.\n\t\t\tint newValue = result + 1;\n\t\t\ti... | [
"0.80858773",
"0.7419313",
"0.72571903",
"0.7000573",
"0.6718615",
"0.6310105",
"0.62901723",
"0.6265047",
"0.6238603",
"0.62011784",
"0.61904615",
"0.6018164",
"0.5979309",
"0.59449196",
"0.59142923",
"0.5906372",
"0.5903543",
"0.58620226",
"0.5826285",
"0.58207744",
"0.5793... | 0.8128772 | 0 |
Generate a session identifier. | static String getSessionId() {
if (SESSION_ID == null) {
// If there is no runtime value for SESSION_ID, try to load a
// value from persistent store.
SESSION_ID = Prefs.INSTANCE.getEventPlatformSessionId();
if (SESSION_ID == null) {
// If there is no value in the persistent store, generate a new value for
// SESSION_ID, and write the update to the persistent store.
SESSION_ID = generateRandomId();
Prefs.INSTANCE.setEventPlatformSessionId(SESSION_ID);
}
}
return SESSION_ID;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int generateSessionID(){\r\n SecureRandom randsession = new SecureRandom();\r\n return randsession.nextInt(1234567890);\r\n }",
"protected String generateSessionId() {\n String result = null;\n\n SessionIdGenerator sessionIdGenerator = getSessionIdGenerator();\n if (se... | [
"0.79100156",
"0.76930946",
"0.76070315",
"0.74665433",
"0.7451721",
"0.7435462",
"0.7375507",
"0.73078024",
"0.72586393",
"0.7238921",
"0.7136481",
"0.710158",
"0.7082865",
"0.7054333",
"0.7043815",
"0.70297563",
"0.70230275",
"0.70230275",
"0.68169284",
"0.68159676",
"0.680... | 0.66036683 | 40 |
Clear runtime and persisted value for SESSION_ID. | static void beginNewSession() {
SESSION_ID = null;
Prefs.INSTANCE.setEventPlatformSessionId(null);
// A session refresh implies a pageview refresh, so clear runtime value of PAGEVIEW_ID.
PAGEVIEW_ID = null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void unsetSessionID();",
"void clearSession();",
"void clearSession();",
"public void logout(){\r\n\t\tallUser.remove(this.sessionID);\r\n\t\tthis.sessionID = -1;\r\n\t}",
"public Builder clearSessionId() {\n \n sessionId_ = 0;\n onChanged();\n return this;\n }",
"public Builder cl... | [
"0.771529",
"0.7062069",
"0.7062069",
"0.6935856",
"0.690199",
"0.68141145",
"0.68141145",
"0.6720807",
"0.66397625",
"0.6595207",
"0.656341",
"0.648447",
"0.64819235",
"0.646374",
"0.642281",
"0.63153046",
"0.6261957",
"0.62231314",
"0.6202749",
"0.61566377",
"0.6128726",
... | 0.5743684 | 52 |
/ CompletableFuture future; future.whenComplete(); | @RequestMapping(value="/dubbo/say/{name}")
public String sayHello(@PathVariable("name") String name){
int c = count.incrementAndGet();
log.info( "调用次数 = " + c);
String result=remoteUserService.sayHello( c+"");
log.info("result = " + result);
return result;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void whenComplete();",
"CompletableFuture<WebClientServiceResponse> whenComplete();",
"void complete();",
"void complete();",
"CompletableFuture<Void> next();",
"@Override\r\n\t\tpublic void operationComplete(ChannelProgressiveFuture future) {\n }",
"public void operationComplete(Future<Respons... | [
"0.74045676",
"0.73744035",
"0.6949901",
"0.6949901",
"0.68437374",
"0.6823878",
"0.67956114",
"0.67707276",
"0.65823305",
"0.6571284",
"0.65190756",
"0.6498955",
"0.647786",
"0.6415732",
"0.6413228",
"0.64088476",
"0.6403309",
"0.63971037",
"0.6387294",
"0.6320606",
"0.62389... | 0.0 | -1 |
Parses the given date String and returns a java.util.Date object | public static Date parseDate(String formattedDate) {
return parseDate(formattedDate, DEFAULT_DATE_FORMAT);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static Date parseDate(String date) {\n return DateUtil.toDate(date);\n }",
"public static Date parseDate(String date)\n\t{\n\t\treturn parseFormatDate(date, getDateFormat());\n\t}",
"public Date parse (String dateAsString , String dateFormat) throws Exception ;",
"public static Date parseDat... | [
"0.80593234",
"0.791",
"0.7830173",
"0.76954174",
"0.75971216",
"0.74280065",
"0.7374575",
"0.73472464",
"0.7335816",
"0.7332391",
"0.7331709",
"0.73256093",
"0.73214346",
"0.72293454",
"0.71995765",
"0.71751326",
"0.71443933",
"0.71227205",
"0.71116006",
"0.7107871",
"0.7100... | 0.65335524 | 59 |
Parses the given date String and returns a java.util.Date object | public static Date parseDateTime(String formattedDate) {
return parseDate(formattedDate, DEFAULT_DATE_TIME_FORMAT);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static Date parseDate(String date) {\n return DateUtil.toDate(date);\n }",
"public static Date parseDate(String date)\n\t{\n\t\treturn parseFormatDate(date, getDateFormat());\n\t}",
"public Date parse (String dateAsString , String dateFormat) throws Exception ;",
"public static Date parseDat... | [
"0.80593234",
"0.791",
"0.7830173",
"0.76954174",
"0.75971216",
"0.74280065",
"0.7374575",
"0.73472464",
"0.7335816",
"0.7332391",
"0.7331709",
"0.73256093",
"0.73214346",
"0.72293454",
"0.71995765",
"0.71751326",
"0.71443933",
"0.71227205",
"0.71116006",
"0.7107871",
"0.7100... | 0.6100264 | 91 |
Parses the given date String and returns a java.util.Date object | public static Date parseDate(final String formattedDate, final String dateFormat) {
if (formattedDate == null || "".equals(formattedDate)) {
return null;
}
try {
DateFormat formatter = new SimpleDateFormat(dateFormat);
formatter.setLenient(false);
return formatter.parse(formattedDate);
} catch (ParseException e) {
throw new IllegalArgumentException("Could not parse date " + formattedDate + " according to format " + dateFormat, e);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static Date parseDate(String date) {\n return DateUtil.toDate(date);\n }",
"public static Date parseDate(String date)\n\t{\n\t\treturn parseFormatDate(date, getDateFormat());\n\t}",
"public Date parse (String dateAsString , String dateFormat) throws Exception ;",
"public static Date parseDat... | [
"0.8058802",
"0.7908797",
"0.7830613",
"0.7693909",
"0.7598291",
"0.74276334",
"0.7375023",
"0.73460937",
"0.73358274",
"0.73312145",
"0.7330507",
"0.73245037",
"0.7322896",
"0.72278094",
"0.7198544",
"0.71734947",
"0.7142043",
"0.7121392",
"0.7109926",
"0.7105702",
"0.710088... | 0.0 | -1 |
Get the all days in the same week as the given date. | public static List<Date> getAllDatesInWeek(Date dateInWeek) {
List<Date> allWeek = new ArrayList<Date>(7);
allWeek.add(getDateInWeek(dateInWeek, Calendar.MONDAY));
allWeek.add(getDateInWeek(dateInWeek, Calendar.TUESDAY));
allWeek.add(getDateInWeek(dateInWeek, Calendar.WEDNESDAY));
allWeek.add(getDateInWeek(dateInWeek, Calendar.THURSDAY));
allWeek.add(getDateInWeek(dateInWeek, Calendar.FRIDAY));
allWeek.add(getDateInWeek(dateInWeek, Calendar.SATURDAY));
allWeek.add(getDateInWeek(dateInWeek, Calendar.SUNDAY));
return allWeek;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Week(LocalDate date) {\n days = new ArrayList<>();\n LocalDate monday = getStartOfWeek(date);\n days.add(monday);\n for (int i = 1; i < 7; i++) {\n days.add(monday.plusDays(i));\n }\n }",
"public static Date[] getCurrentWeekInDates(){\n\t\t Date FromDate=n... | [
"0.67247504",
"0.6622015",
"0.6616762",
"0.66110533",
"0.650486",
"0.6336867",
"0.62721527",
"0.6202836",
"0.6161338",
"0.60025406",
"0.59424686",
"0.593228",
"0.59199756",
"0.58744526",
"0.58271617",
"0.5737949",
"0.5694747",
"0.5684513",
"0.56294405",
"0.56067705",
"0.55834... | 0.70212024 | 0 |
Parses the given date/time String and returns a java.util.Date object | public static Date parseTime(String formattedTime) {
return parseDate(formattedTime, DEFAULT_TIME_FORMAT);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private LocalDateTime parseDate(String timeStr) throws DateTimeParseException {\n return LocalDateTime.parse(timeStr, formatter);\n }",
"public static Date parseTime(String time)\n\t{\n\t\treturn parseFormatDate(time, getTimeFormat());\n\t}",
"public Date parse (String dateAsString , String dateForma... | [
"0.72596246",
"0.7255489",
"0.722601",
"0.7178132",
"0.7163799",
"0.7053758",
"0.70345867",
"0.7033055",
"0.7019309",
"0.69936115",
"0.69859034",
"0.6976601",
"0.6976055",
"0.6942458",
"0.685341",
"0.6828391",
"0.67344683",
"0.6690023",
"0.6678271",
"0.66749215",
"0.6672395",... | 0.6419137 | 31 |
Parses the given hour/minute String and returns a java.util.Date object | public static Date parseHourMinute(String formattedTime) {
return parseDate(formattedTime, HOUR_MINUTE_FORMAT);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static Date parseDateTime(String val, int hour, int minute) {\n\n\t\tDate d = null;\n\t\tval = val + \" \" + hour + \":\" + minute;\n\t\tif (val != null && !val.equals(\"0\")) {\n\t\t\tSimpleDateFormat format = new SimpleDateFormat(\"dd/MM/yyyy hh:mm\");\n\t\t\ttry {\n\t\t\t\td = format.parse(val);\n\t\t\t}... | [
"0.70300114",
"0.659632",
"0.61919063",
"0.6187425",
"0.6183062",
"0.6166252",
"0.6151427",
"0.60673934",
"0.60291165",
"0.6027041",
"0.6017524",
"0.58680254",
"0.58610356",
"0.5846526",
"0.5826721",
"0.58133036",
"0.577623",
"0.57548094",
"0.57530653",
"0.5752051",
"0.574261... | 0.6869766 | 1 |
Validate a Time (Hour + Minutes) | public static boolean isTimeValid(String argTime, String format) {
DateFormat timeFormat = new SimpleDateFormat(format);
timeFormat.setLenient(false);
try {
timeFormat.parse(argTime);
} catch (ParseException e) {
return false;
}
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private boolean checkValidTime(String inputTime) {\n int hour = Integer.parseInt(inputTime.substring(0,2));\n int minute = Integer.parseInt(inputTime.substring(2,4));\n \n if ((hour >= 0 && hour <= 23) && (minute >= 0 && minute <= 59)) {\n return true;\n } else {\n return false;\n }\n ... | [
"0.8011656",
"0.7886018",
"0.7575459",
"0.7365692",
"0.734791",
"0.69786066",
"0.69724196",
"0.6892564",
"0.6872682",
"0.6823736",
"0.67990065",
"0.6795869",
"0.67899776",
"0.64778024",
"0.64664775",
"0.6427323",
"0.64241064",
"0.64241064",
"0.631447",
"0.63097036",
"0.616036... | 0.60543346 | 24 |
TODO Autogenerated method stub | @Override
public void onBannerClicked(MoPubView arg0) {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.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 onBannerCollapsed(MoPubView arg0) {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.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 onBannerExpanded(MoPubView arg0) {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.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 onBannerFailed(MoPubView arg0, MoPubErrorCode arg1) {
} | {
"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 |
This allows the implementation to fetch the db service ID from DB annotation | void modelType(Class<?> modelType); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getServiceID();",
"java.lang.String getServiceId();",
"String getService_id();",
"String getServiceId();",
"public ID getServiceID() {\n\treturn serviceID;\n }",
"Long getDbId();",
"@Override\n public ServiceID getServiceID() {\n\treturn servID;\n }",
"public int getServiceID()... | [
"0.6914415",
"0.6911271",
"0.6883866",
"0.6878061",
"0.66054523",
"0.64722407",
"0.64449316",
"0.6439221",
"0.6425642",
"0.635075",
"0.6331459",
"0.62984914",
"0.62942064",
"0.62872434",
"0.62713283",
"0.62102246",
"0.62066317",
"0.6200577",
"0.6181303",
"0.6170488",
"0.61617... | 0.0 | -1 |
Created by islam on 16/07/17. | public interface ViewMain {
void showProvince(List<String> data);
void showCity(List<String> data, String params);
void onBtnClick(String kotaasal, String kotatujuan, String weight, String courier);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void perish() {\n \n }",
"public final void mo51373a() {\n }",
"private stendhal() {\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Overri... | [
"0.5973054",
"0.58644456",
"0.5863176",
"0.58327246",
"0.5773075",
"0.5727939",
"0.5723183",
"0.5723183",
"0.5695492",
"0.5638718",
"0.5629558",
"0.5614277",
"0.560897",
"0.5603554",
"0.55881643",
"0.55810905",
"0.5577479",
"0.5577326",
"0.557038",
"0.5567801",
"0.55595636",
... | 0.0 | -1 |
Imports Constructor & Deconstructor | public Content(String directoryRoot) {
JPanel panel = this;
panel.setLayout(new BorderLayout());
contentTableModel = new ContentTableModel(directoryRoot);
contentTableModel.addTableModelListener(this);
contentTable = new JTable(contentTableModel);
contentTableSorter = new TableRowSorter<ContentTableModel>(contentTableModel);
contentTable.setRowSorter(contentTableSorter);
// Note: Fix this so when an item is selected, it uses the Name and not
// contentTableHider.hideColumn("System Type");
contentTable.setAutoResizeMode(JTable.AUTO_RESIZE_ALL_COLUMNS);
contentTable.getColumnModel().getColumn(0).setMaxWidth(25);
contentTable.addMouseListener(new MouseAdapter() {
public void mousePressed(MouseEvent event) {
if(event.getClickCount() == 2) {
JTable table = (JTable) event.getSource();
int row = table.rowAtPoint(event.getPoint());
// int col = table.columnAtPoint(event.getPoint());
// contentTableModel.updatePath(table.getValueAt(row,
// col).toString());
// Note: fix so it catches the column by name not index
contentTableModel.updatePath(table.getValueAt(row, 2).toString(), false);
}
}
});
JScrollPane scrollTable = new JScrollPane(contentTable);
panel.add(scrollTable);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void __sep__Constructors__() {}",
"private LOCFacade() {\r\n\r\n\t}",
"private Instantiation(){}",
"public ImportVo() {\r\n // nothing to do\r\n }",
"private PropertiesLoader() {\r\n\t\t// not instantiable\r\n\t}",
"public Import() {\n this(null, new Name(), null, null, false, false)... | [
"0.6494788",
"0.64462966",
"0.6384971",
"0.6320132",
"0.63007015",
"0.62391806",
"0.62387884",
"0.6182355",
"0.61295885",
"0.611591",
"0.6113473",
"0.61105025",
"0.6107368",
"0.6064495",
"0.5989336",
"0.5982632",
"0.5975876",
"0.5969318",
"0.59684634",
"0.5963862",
"0.5951269... | 0.0 | -1 |
Returns the mean of the 2D array mat | public static double mean(double[][] mat) {
int counter = 0;
double total = 0;
for (int row = 0; row < mat.length; row++){
for (int column = 0; column < mat[0].length; column++){
total += mat[row][column];
}
}
return total/counter;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public MatOfDouble getMean()\r\n {\r\n \r\n MatOfDouble retVal = MatOfDouble.fromNativeAddr(getMean_0(nativeObj));\r\n \r\n return retVal;\r\n }",
"public static double Average(int[][] matrix){\n double total = 0;\n double promedio =0;\n double divisor = 0;... | [
"0.7322773",
"0.6842545",
"0.6752364",
"0.6729308",
"0.6699791",
"0.6678253",
"0.63596123",
"0.63198483",
"0.6292366",
"0.62346286",
"0.6181745",
"0.6166165",
"0.6147872",
"0.61448485",
"0.6138068",
"0.6112639",
"0.6112639",
"0.61049277",
"0.6092421",
"0.6091156",
"0.60824984... | 0.82919097 | 0 |
Returns the median of the 2D array mat | public static double median(double[][] mat) {
int count = 0;
double med = 0;
int size = mat.length * mat[0].length;
double [] arr = new double [size];
for (int row = 0; row < mat.length; row++) {
for (int column = 0; column < mat[0].length; column++) {
arr[count] = mat[row][column];
count = count + 1;
}
}
if (arr.length % 2 != 0) {
int l1 = arr.length/2;
med = arr[l1];
}
else {
int l2 = arr.length/2;
int l3 = l2 + 1;
med = (arr[l2-1] + arr[l3-1]) / 2;
}
return med;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public T median();",
"private static double median(double[] m) {\n\t\tint middle = m.length/2; // subscript of middle element\n\t\tif (m.length%2 == 1) {\n\t\t\t// Odd number of elements -- return the middle one.\n\t\t\treturn m[middle];\n\t\t} else {\n\t\t\t// Even number -- return average of middle two\n\t\t\... | [
"0.68368125",
"0.6726681",
"0.67041516",
"0.6666493",
"0.6583675",
"0.6413305",
"0.6376389",
"0.6344249",
"0.62959266",
"0.6287059",
"0.6285659",
"0.6272891",
"0.6267234",
"0.6259473",
"0.6254984",
"0.6215204",
"0.6195702",
"0.61765116",
"0.6169774",
"0.6130673",
"0.6121545",... | 0.78369635 | 0 |
Returns the mode of the 2D array mat | public static double mode(double[][] mat) {
int value = 0;
int [] x = new int[100];
for (int row=0;row<mat.length;row++){
for (int col = 0;col<mat[0].length;col++){
value = (int)mat[row][col];
x[value]++;
}
}
int big = 0;
int mode = -1;
for (int i = 0; i < 100; i++){
if (x[i] > big){
big = x[i];
mode = i;
}
}
ArrayList<Double> l1 = new ArrayList<Double>();
double maxc = 0;
double maxv = 0;
for (int i = 0;i<l1.size();i++){
double count = 0;
for (int j = 0; j < l1.size();j++){
if (l1.get(j) == l1.get(i)){
count++;
}
if (count > maxc){
maxc = count;
maxv = l1.get(j);
}
}
}
return mode;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public double mode(){\r\n\t\t\r\n\t\t//make a double to return the mode\r\n\t\tdouble mode = 0.0;\r\n\t\t\r\n\t\t//make 2 possible mode doubles\r\n\t\tdouble maybeMode;\r\n\t\t\r\n\t\t//make 2 mode count integers\r\n\t\tint modeCount1= 0;\r\n\t\tint modeCount= 0;\r\n\t\t\r\n\t\t//outer loop to go through the array... | [
"0.61744654",
"0.5918086",
"0.587149",
"0.5778795",
"0.57656336",
"0.5744124",
"0.5705067",
"0.5703641",
"0.5641878",
"0.56414086",
"0.56017613",
"0.55797863",
"0.55021966",
"0.5494107",
"0.5453372",
"0.5448337",
"0.5403695",
"0.5400954",
"0.5400271",
"0.53964484",
"0.5384891... | 0.69894606 | 0 |
Write some code here to test your methods! | public static void main(String[] args) {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void test() {\n\n\t}",
"@Override\r\n\t\t\tpublic void test() {\n\t\t\t}",
"@Override\n public void test() {\n \n }",
"@Override\n\tpublic void test() {\n\t\t\n\t}",
"public void test() {\n\t}",
"private test5() {\r\n\t\r\n\t}",
"public void test(){\n }",
"public void test() {... | [
"0.7378997",
"0.7258302",
"0.70578414",
"0.6978207",
"0.6920755",
"0.6879419",
"0.68365663",
"0.6804099",
"0.6804099",
"0.6802146",
"0.6761128",
"0.6761128",
"0.67413056",
"0.6684006",
"0.6636884",
"0.65446866",
"0.653701",
"0.6530732",
"0.65302247",
"0.6520512",
"0.6510683",... | 0.0 | -1 |
Description of the method addColumn. | public void addColumn(Column column) {
// Start of user code for method addColumn
// End of user code
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public abstract void addColumn(Column c);",
"public void addColumn(String columnName);",
"IColumnBinding addColumn(String spec);",
"IColumnBinding addColumn(SpecialBinding columnType, int width);",
"IColumnBinding addColumn(IColumnBinding baseColumn, EStructuralFeature feature, int width);",
"IColumnBind... | [
"0.8677819",
"0.8555853",
"0.81253237",
"0.7861406",
"0.78356594",
"0.77474177",
"0.7672448",
"0.76142406",
"0.76005113",
"0.7568359",
"0.7482872",
"0.7353109",
"0.7336485",
"0.73363936",
"0.73177344",
"0.7274911",
"0.721509",
"0.7175108",
"0.7152567",
"0.71420324",
"0.705290... | 0.80574566 | 3 |
Description of the method deleteColumn. | public void deleteColumn(Column column) {
// Start of user code for method deleteColumn
// End of user code
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void removeColumn(String columnName);",
"public void onDelete(Statement delete, Connection cx, SimpleFeatureType featureType) throws SQLException {\r\n }",
"handy.storage.api.ColumnCondition<DeleteOperation<T>> where(String column);",
"public void deleteColumn(final byte [] tableName, final byte []... | [
"0.71241957",
"0.6621259",
"0.66140246",
"0.6595064",
"0.6514436",
"0.6495311",
"0.6465854",
"0.6338955",
"0.62795794",
"0.6252096",
"0.61703515",
"0.6112457",
"0.61122835",
"0.6071968",
"0.6049802",
"0.6004235",
"0.5964771",
"0.5958248",
"0.59409714",
"0.58629096",
"0.583013... | 0.7888684 | 0 |
Description of the method addItemCollection. | public void addItemCollection(ItemCollection itemCollection) {
// Start of user code for method addItemCollection
// End of user code
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void add(Collection collection) {\n\t\t\n\t}",
"public void addItem(int itemCollection_id, Item item) {\n\t\t// Start of user code for method addItem\n\t\t// End of user code\n\t}",
"public void addCollection(Collection<E> coll) {\n collectionList.add(coll);\n }",
"void addItem (Item ... | [
"0.7274674",
"0.7227332",
"0.71710527",
"0.69015145",
"0.65398324",
"0.6440696",
"0.63144886",
"0.62893635",
"0.6280491",
"0.6280491",
"0.6254842",
"0.6254664",
"0.62521124",
"0.6211844",
"0.6153628",
"0.61504376",
"0.61396044",
"0.61226404",
"0.61104876",
"0.60563844",
"0.60... | 0.8291784 | 0 |
Description of the method deleteItemCollection. | public void deleteItemCollection(ItemCollection itemCollection) {
// Start of user code for method deleteItemCollection
// End of user code
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void deleteItem(int itemCollection_id, int item_id) {\n\t\t// Start of user code for method deleteItem\n\t\t// End of user code\n\t}",
"@Override\n public void delete(Context context, Item item) throws SQLException, IOException, AuthorizeException {\n //TODO: HIBERNATE CHECK COLLECTION REMOVE ?\... | [
"0.7271369",
"0.6928785",
"0.68039846",
"0.6737721",
"0.6705007",
"0.667197",
"0.665397",
"0.6604901",
"0.65609986",
"0.6550204",
"0.64455175",
"0.6311697",
"0.62021303",
"0.62019825",
"0.6189605",
"0.6174769",
"0.6173517",
"0.61586094",
"0.61457413",
"0.61254686",
"0.6118153... | 0.8038023 | 0 |
Description of the method addItem. | public void addItem(int itemCollection_id, Item item) {
// Start of user code for method addItem
// End of user code
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void addItem (Item toAdd){\n\t\t\tthis.items.add(toAdd);}",
"void add(Item item);",
"@Override\r\n\tpublic void addItem(AbstractItemAPI item) {\n\t\titems.add(item);\r\n\t\t\r\n\t}",
"public void addItem(Item item) {\n items.add(item);\n }",
"public void addItem(Item item) {\n items.add(it... | [
"0.8303469",
"0.8212502",
"0.8006877",
"0.7989325",
"0.7989325",
"0.7956037",
"0.78282315",
"0.7810494",
"0.7764311",
"0.7715689",
"0.7710162",
"0.7683108",
"0.76675206",
"0.76542354",
"0.76295406",
"0.7566629",
"0.7549649",
"0.7513583",
"0.74688303",
"0.74569184",
"0.7452171... | 0.6841715 | 65 |
Description of the method deleteItem. | public void deleteItem(int itemCollection_id, int item_id) {
// Start of user code for method deleteItem
// End of user code
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public DeleteItemOutcome deleteItem(DeleteItemSpec spec);",
"@Override\n\tpublic void deleteItem(Object toDelete) {}",
"public void deleteItem() {\n\t\t\tAsyncCallback<BmUpdateResult> callback = new AsyncCallback<BmUpdateResult>() {\n\t\t\t\t@Override\n\t\t\t\tpublic void onFailure(Throwable caught) {\n\t\t\t\... | [
"0.8009163",
"0.7753249",
"0.76887107",
"0.7676455",
"0.7644226",
"0.75630975",
"0.7562375",
"0.75497675",
"0.749032",
"0.74835557",
"0.7467528",
"0.7444548",
"0.7416013",
"0.7389086",
"0.7341961",
"0.7332009",
"0.73253435",
"0.730438",
"0.72916466",
"0.7186408",
"0.7174044",... | 0.6780016 | 41 |
Description of the method getColumnType. | public String getColumnType(int column_id) {
// Start of user code for method getColumnType
String getColumnType = "";
return getColumnType;
// End of user code
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Column.Type getType();",
"public int getColumnType() {\n return (this.option >> 6) & 3;\n }",
"public Class<?>[] getColumnTypes();",
"RelDataType getColumnType(String sql);",
"public int getColumnType(int position) {\n return columns[position].getType();\n }",
"@Override\r\n\tpubl... | [
"0.7787329",
"0.77425396",
"0.7586266",
"0.7500584",
"0.7408355",
"0.73983204",
"0.72820836",
"0.72468597",
"0.7092824",
"0.7090366",
"0.6982554",
"0.6982554",
"0.6963235",
"0.6927179",
"0.6818836",
"0.68045175",
"0.6697079",
"0.66830397",
"0.6676706",
"0.66293144",
"0.662930... | 0.7364674 | 6 |
Description of the method getStatusColumnLabels. | public HashSet<StatusLabel> getStatusColumnLabels(int column_id) {
// Start of user code for method getStatusColumnLabels
HashSet<StatusLabel> getStatusColumnLabels = new HashSet<StatusLabel>();
return getStatusColumnLabels;
// End of user code
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public List<String> getColumnLabels() {\n return columns;\n }",
"public Vector<String> getColumnLabels() \n\t{\n\t\ttry\n\t\t{\n\t\t\tVector<Vector<String>> rows = TableHelper.getColumnLabelsForTable(\n\t\t\t\t\tthis.getDBTableName()\n\t\t\t\t);\n\t\t\t\n\t\t\tif( rows.size() == 0 )\n\t\... | [
"0.72013986",
"0.67502415",
"0.6656753",
"0.6289951",
"0.5983263",
"0.5971614",
"0.58792627",
"0.58194125",
"0.5803304",
"0.57622254",
"0.57582825",
"0.573018",
"0.5728437",
"0.5728437",
"0.5728153",
"0.5723679",
"0.5718594",
"0.5706687",
"0.56937075",
"0.5677904",
"0.5658244... | 0.7128481 | 1 |
Start of user code (user defined methods for Board) End of user code Returns parentWorkspace. | public Workspace getParentWorkspace() {
return this.parentWorkspace;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n \tpublic File getWorkspace() {\n \t\treturn null;\r\n \t}",
"@Override\r\n\tpublic Workspace getWorkspace() {\n\t\treturn null;\r\n\t}",
"public Workspace getWorkspace() {\n return workspace;\n }",
"public Workspace getWorkspace() {\n return this.workspace;\n }",
"public R... | [
"0.60993886",
"0.6090919",
"0.5835109",
"0.5811085",
"0.56267977",
"0.5550823",
"0.5472616",
"0.5464417",
"0.54614556",
"0.53985137",
"0.5384379",
"0.5369833",
"0.5363021",
"0.5329433",
"0.53165954",
"0.52891505",
"0.52817726",
"0.5246516",
"0.52447504",
"0.52321136",
"0.5223... | 0.659279 | 0 |
Sets a value to attribute parentWorkspace. | public void setParentWorkspace(Workspace newParentWorkspace) {
this.parentWorkspace = newParentWorkspace;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void setParent(IGLProperty parent);",
"public void setParent(String value) {\r\n setAttributeInternal(PARENT, value);\r\n }",
"public void setParentLayer(EObject newValue);",
"public void setParent (com.redsaga.hibnatesample.step2.Board _parent) {\n\t\tthis._parent = _parent;\n\t}",
"public void ... | [
"0.6868202",
"0.6843501",
"0.67417026",
"0.6580567",
"0.6561484",
"0.65523577",
"0.65523505",
"0.6551384",
"0.6539927",
"0.6531213",
"0.6520702",
"0.6518873",
"0.6501619",
"0.64826137",
"0.64675295",
"0.6450455",
"0.64478916",
"0.6443247",
"0.6424951",
"0.6394269",
"0.6389405... | 0.7261844 | 0 |
Sets a value to attribute name. | public void setName(String newName) {
this.name = newName;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setAttributeValue(String name, String value) throws Exception {\n if (!_attributes.containsKey(name)) {\n throw new Exception(name + \" is not a valid attribute name for features in the\" + _layer.getDisplayName() + \" layer\");\n }\n _attributes.setProperty(name, value);\n }",
"public... | [
"0.7882644",
"0.7811422",
"0.75616854",
"0.75552857",
"0.75552857",
"0.7527008",
"0.7444901",
"0.74023825",
"0.7399222",
"0.73652816",
"0.7363674",
"0.7297332",
"0.729377",
"0.72295594",
"0.72279793",
"0.72276443",
"0.7218082",
"0.71754706",
"0.7134421",
"0.7127274",
"0.70904... | 0.0 | -1 |
Sets a value to attribute permission. | public void setPermission(Permission newPermission) {
this.permission = newPermission;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void setPermission(String perm, boolean add);",
"void setPerm(String name,\n Object value);",
"public static void setPermission(String permission) {\n\t\tsetPermission(last[0],last[1], permission);\n\t}",
"public void setPermission(String permission)\r\n {\r\n this.permission = perm... | [
"0.6827849",
"0.67893404",
"0.6589196",
"0.6573097",
"0.65621847",
"0.65544564",
"0.6416563",
"0.63307244",
"0.63088584",
"0.62581843",
"0.6154031",
"0.6088125",
"0.6047017",
"0.5956834",
"0.59284806",
"0.5925885",
"0.5914836",
"0.58695215",
"0.57436925",
"0.5702488",
"0.5698... | 0.63721067 | 7 |
Sets a value to attribute creationDate. | public void setCreationDate(Date newCreationDate) {
this.creationDate = newCreationDate;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setCreationDate(Date value)\n {\n setAttributeInternal(CREATIONDATE, value);\n }",
"public void setCreationDate(Date value) {\n setAttributeInternal(CREATIONDATE, value);\n }",
"public void setCreationDate(Date value) {\n setAttributeInternal(CREATIONDATE, value);\n }",
"... | [
"0.8624276",
"0.8487596",
"0.8487596",
"0.8487596",
"0.8487596",
"0.8487596",
"0.8487596",
"0.8487596",
"0.8487596",
"0.83126634",
"0.82914007",
"0.82378733",
"0.8221079",
"0.8192832",
"0.8095892",
"0.8081475",
"0.80001736",
"0.793136",
"0.7881454",
"0.7861162",
"0.77928865",... | 0.7061685 | 65 |
Sets a value to attribute board_id. | public void setBoard_id(int newBoard_id) {
this.board_id = newBoard_id;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setBoard_id(int Board_id){\n this.Board_id=Board_id;\n }",
"public void setBoard(int[][] board) {\n this.board = board;\n }",
"public void setBoard(Board board) {\n this.board = board;\n }",
"public void setBoard(Board board) {\n this.board = board;\n }",
... | [
"0.728176",
"0.66532964",
"0.6559913",
"0.6559913",
"0.644562",
"0.6306331",
"0.63056415",
"0.62911683",
"0.6276711",
"0.61510044",
"0.6145681",
"0.60898846",
"0.60155493",
"0.60139483",
"0.6011615",
"0.5944357",
"0.5944357",
"0.5944357",
"0.5944357",
"0.5944357",
"0.5944357"... | 0.6036085 | 12 |
TODO Autogenerated method stub | @Override
public void onNothingSelected(AdapterView<?> arg0) {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.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 onNothingSelected(AdapterView<?> arg0) {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.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 |
Updates grid data and refresh grid items. | public void setGridData(ArrayList<Photo> mGridData) {
this.mGridData = mGridData;
notifyDataSetChanged();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void reloadGridsData() {\n \n }",
"private void updateAdapter() {\n iga = new IngredientGridAdapter(getApplicationContext(), ingredientList);\n gridView.setAdapter(iga);\n iga.notifyDataSetChanged();\n }",
"public void updateComponents(){\n adapter... | [
"0.77883905",
"0.70579016",
"0.68671983",
"0.68004996",
"0.67056024",
"0.6591687",
"0.655834",
"0.65033853",
"0.6499551",
"0.6495271",
"0.64850724",
"0.64824104",
"0.64703023",
"0.6426632",
"0.641878",
"0.6359362",
"0.63475114",
"0.6345846",
"0.6344354",
"0.6342783",
"0.63409... | 0.0 | -1 |
this will be called from RFImageActivity | public void addImageToView(String imagePath) {
ImageMeta newImageMeta = new ImageMeta();
newImageMeta.fullImagePath = imagePath;
String thumbnail = getThumbNailImage(imagePath);
String[] tokens = thumbnail.split(saperator);
newImageMeta.thumbnailImagePath = tokens[0];
newImageMeta.thumbnail64 = tokens[1];
newImageMeta.awsPath = null;
fieldImages.add(newImageMeta);
reRenderImageList();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void onImageAvailable(android.media.ImageReader r15) {\n /*\n r14 = this;\n com.android.camera.imageprocessor.FrameProcessor r0 = com.android.camera.imageprocessor.FrameProcessor.this\n java.lang.Object r0 = r0.mAllocationLock\n monitor-... | [
"0.66031927",
"0.65891594",
"0.64500546",
"0.64445585",
"0.6426221",
"0.6419445",
"0.6374339",
"0.6353671",
"0.6330666",
"0.6296851",
"0.62797916",
"0.62538886",
"0.62302285",
"0.6228939",
"0.6213444",
"0.6210674",
"0.6179723",
"0.61598986",
"0.61568594",
"0.61445767",
"0.612... | 0.0 | -1 |
Permite revisar si alguno de los campos para ingresar la ip de RMI se encuentra vacio | public boolean verificarCamposVaciosIPRMI(TextField campoIPRMI1, TextField campoIPRMI2, TextField campoIPRMI3, TextField campoIPRMI4) {
boolean camposLlenos = true;
if (campoIPRMI1.getText().isEmpty() || campoIPRMI2.getText().isEmpty() || campoIPRMI3.getText().isEmpty() || campoIPRMI4.getText().isEmpty()) {
camposLlenos = false;
}
return camposLlenos;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean verificarCamposVaciosIPNode(TextField campoIPNode1, TextField campoIPNode2, TextField campoIPNode3, TextField campoIPNode4, TextField campoPuertoNode) {\n boolean camposLlenos = true;\n if (campoIPNode1.getText().isEmpty() || campoIPNode2.getText().isEmpty() || campoIPNode3.getText().i... | [
"0.6233025",
"0.6173242",
"0.60421175",
"0.60421175",
"0.5998275",
"0.59569037",
"0.5854439",
"0.5841359",
"0.5840606",
"0.5840606",
"0.5840606",
"0.5840606",
"0.56912434",
"0.56912434",
"0.56706214",
"0.56706214",
"0.56152934",
"0.5613416",
"0.5611896",
"0.5575022",
"0.55728... | 0.57969505 | 12 |
Permite revisar si alguno de los campos para ingresar la ip de Node se encuentre vacio | public boolean verificarCamposVaciosIPNode(TextField campoIPNode1, TextField campoIPNode2, TextField campoIPNode3, TextField campoIPNode4, TextField campoPuertoNode) {
boolean camposLlenos = true;
if (campoIPNode1.getText().isEmpty() || campoIPNode2.getText().isEmpty() || campoIPNode3.getText().isEmpty() || campoIPNode4.getText().isEmpty() || campoPuertoNode.getText().isEmpty()) {
camposLlenos = false;
}
return camposLlenos;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void clearInIp() {\n \n inIp_ = 0;\n }",
"private void clearInIp() {\n \n inIp_ = 0;\n }",
"boolean hasIp();",
"boolean hasIp();",
"boolean hasIp();",
"boolean hasIp();",
"private void checkAddress() {\n\t\t// if \"Set Address\" has not been performed then ... | [
"0.6178655",
"0.6178655",
"0.60973144",
"0.60973144",
"0.60973144",
"0.60973144",
"0.59913826",
"0.5897765",
"0.5897765",
"0.5743491",
"0.5740121",
"0.5736344",
"0.5725941",
"0.5724146",
"0.57232016",
"0.57018876",
"0.5689546",
"0.5684303",
"0.56581527",
"0.56346875",
"0.5631... | 0.6691055 | 0 |
Permite revisar que la informacion ingresada en los campos no exceda los 3 caracteres | public boolean verificarLongitudCamposIPRMI(TextField campoIPRMI1, TextField campoIPRMI2, TextField campoIPRMI3, TextField campoIPRMI4) {
boolean camposCorrectos = true;
if (campoIPRMI1.getText().length() > 3 || campoIPRMI2.getText().length() > 3 || campoIPRMI3.getText().length() > 3 || campoIPRMI4.getText().length() > 3) {
camposCorrectos = false;
}
return camposCorrectos;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void validar_campos(){\r\n\t\tfor(int i=0;i<fieldNames.length-1;++i) {\r\n\t\t\tif (jtxt[i].getText().length() > 0){\r\n\t\t\t}else{\r\n\t\t\t\tpermetir_alta = 1;\r\n\t\t\t}\t\r\n\t\t}\r\n\t\tif((CmbPar.getSelectedItem() != null) && (Cmbwp.getSelectedItem() != null) && (CmbComp.getSelectedItem() != null) &&... | [
"0.6945717",
"0.64626014",
"0.6301496",
"0.62744063",
"0.62543225",
"0.62193453",
"0.6208582",
"0.6190504",
"0.61858547",
"0.6152109",
"0.61351883",
"0.6128896",
"0.6098461",
"0.6080736",
"0.60766166",
"0.603876",
"0.6024841",
"0.6015321",
"0.60112005",
"0.59976137",
"0.59915... | 0.0 | -1 |
Permite revisar si alguno de los campos para ingresar la ip de Node excede los 3 caracteres | public boolean verificarLongitudCamposIPNode(TextField campoIPNode1, TextField campoIPNode2, TextField campoIPNode3, TextField campoIPNode4) {
boolean camposCorrectos = true;
if (campoIPNode1.getText().length() > 3 || campoIPNode2.getText().length() > 3 || campoIPNode3.getText().length() > 3 || campoIPNode4.getText().length() > 3) {
camposCorrectos = false;
}
return camposCorrectos;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void remplireListeIp(){\r\n bddIp.add(\"id\");\r\n bddIp.add(\"ip\");\r\n bddIp.add(\"nom\");\r\n bddIp.add(\"latence\");\r\n bddIp.add(\"etat\");\r\n bddIp.add(\"popup\");\r\n bddIp.add(\"mac\");\r\n bddIp.add(\"bdext_perte\");\r\n bddIp.add(\"... | [
"0.6269783",
"0.6222142",
"0.60951686",
"0.60951686",
"0.60951686",
"0.60951686",
"0.60951686",
"0.60951686",
"0.60951686",
"0.60951686",
"0.60646665",
"0.59806645",
"0.59519553",
"0.59519553",
"0.59519553",
"0.59519553",
"0.594004",
"0.5909252",
"0.5909252",
"0.59000117",
"0... | 0.6348147 | 0 |
Initialize your data structure here. | public MyHashMap() {
arr = new int[100000];
//To initialize the value with -1
Arrays.fill(arr,-1);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void initData() {\n }",
"private void initData() {\n\t}",
"private void initData() {\n\n }",
"public void initData() {\n }",
"public void initData() {\n }",
"@Override\n\tpublic void initData() {\n\n\n\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\... | [
"0.79946685",
"0.7973242",
"0.7808862",
"0.77763873",
"0.77763873",
"0.7643394",
"0.76371324",
"0.76371324",
"0.76371324",
"0.76371324",
"0.76371324",
"0.76371324",
"0.75553316",
"0.7543321",
"0.7543321",
"0.75426376",
"0.75426376",
"0.75426376",
"0.7532583",
"0.75228804",
"0... | 0.0 | -1 |
value will always be nonnegative. | public void put(int key, int value) {
newkey = hashfunc(key);
arr[newkey]= value;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public double abs(double value){return value < 0? value*-1: value;}",
"public double hasNegSign(double value) {\n if (value < 0) {\n return value * -1;\n } else {\n return value;\n }\n }",
"@Override\n public double getValue() {\n return 0;\n }",
"@O... | [
"0.70011944",
"0.69003433",
"0.67707586",
"0.66027105",
"0.6586464",
"0.653198",
"0.6514914",
"0.643939",
"0.643648",
"0.6433578",
"0.64307785",
"0.6379716",
"0.63451356",
"0.63385504",
"0.6312588",
"0.6274011",
"0.622011",
"0.6216123",
"0.6196117",
"0.6183464",
"0.6171644",
... | 0.0 | -1 |
Returns the value to which the specified key is mapped, or 1 if this map contains no mapping for the key | public int get(int key) {
newkey = hashfunc(key);
return arr[newkey];
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int get(int key) {\n return hashMap.stream()\n .filter(pair -> pair[0] == key)\n .findAny()\n .map(pair -> pair[1])\n .orElse(-1);\n }",
"public int get(int key) {\n if(!map.containsKey(key)) return -1;\n return map.get(ke... | [
"0.76459706",
"0.7435398",
"0.7300944",
"0.7130443",
"0.6853851",
"0.68358415",
"0.68350554",
"0.6803229",
"0.6754685",
"0.6661285",
"0.6642842",
"0.6615104",
"0.65980434",
"0.647564",
"0.64128166",
"0.63261414",
"0.6324729",
"0.6260748",
"0.6257934",
"0.62374794",
"0.6231240... | 0.5664435 | 75 |
Removes the mapping of the specified value key if this map contains a mapping for the key | public void remove(int key) {
newkey = hashfunc(key);
arr[newkey]= -1;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void remove(Object key, Object value) {\n map.get(key).remove(value);\n }",
"public boolean remove(String key, V value) {\n Collection<V> values = map.get(key);\n\n if (values != null) {\n return values.remove(value);\n }\n\n return false;\n }",
"public void remove(Object key... | [
"0.7669792",
"0.7440138",
"0.7434685",
"0.7231268",
"0.71799254",
"0.71202505",
"0.6888043",
"0.6804768",
"0.6779287",
"0.6738268",
"0.6724534",
"0.6662862",
"0.6639248",
"0.6628914",
"0.65815824",
"0.65797514",
"0.6575589",
"0.6513635",
"0.6500174",
"0.64954704",
"0.6492725"... | 0.0 | -1 |
String of the binary array representing the .obj model | public Model3dMetadata processBinaryData(Model3dBinaryData model3dBinaryData) throws IOException {
String message = model3dBinaryData.getBinaryArrayString();
// Convert the string into a byte array
byte[] backToBytes = Base64.decodeBase64(message);
String test = new String(backToBytes);
System.out.println("The message decoded: " + test.substring(0, 3));
final IOBJParser parser = new OBJParser();
InputStream targetStream = new ByteArrayInputStream(backToBytes);
final OBJModel model = parser.parse(targetStream);
System.out.println(MessageFormat.format(
"OBJ model has {0} vertices, {1} normals, {2} texture coordinates, and {3} objects.",
model.getVertices().size(),
model.getNormals().size(),
model.getTexCoords().size(),
model.getObjects().size()));
Model3dMetadata model3dMetadata = new Model3dMetadata();
model3dMetadata.setBinaryArray(message);
model3dMetadata.setTitle(model3dBinaryData.getTitle());
model3dMetadata.setDescription(model3dBinaryData.getDescription());
model3dMetadata.setNumberOfFaces((long)(model.getNormals().size()));
model3dMetadata.setNumberOfVertices((long)(model.getVertices().size()));
model3dMetadata.setAssetBundleBinaryArray(model3dBinaryData.getAssetBundleBinaryArray());
return model3dMetadata;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String toString() {\n\t\treturn Arrays.toString(data);\n\t}",
"@Override\n public String toString() {\n String result = \"\";\n byte[] data = buffer.data;\n for (int i = 0; i < (buffer.end - buffer.start) / bytes; i++) {\n if (i > 0) result += \", \";\n resul... | [
"0.64253813",
"0.63937247",
"0.6310018",
"0.62705606",
"0.62691885",
"0.6266961",
"0.6262739",
"0.6236606",
"0.6222059",
"0.6182845",
"0.61700696",
"0.61528003",
"0.61495763",
"0.61267555",
"0.61087817",
"0.60796225",
"0.6061921",
"0.6026335",
"0.6013733",
"0.6007847",
"0.600... | 0.0 | -1 |
TODO Autogenerated method stub | public static void main(String[] args) {
arrayExample4 arrayexample4 = new arrayExample4();
int input[] = { 15, 10, 19, 30, 122, 42, 99, -2, 12, 33 };
int ans = arrayexample4.maxNumber(input);
byte ans1 = (byte) arrayexample4.minNumber(input);
System.out.println("Minimum Number is: " + ans1);
System.out.println("Maximum Number is: " + ans);
arrayexample4.listNumbersAsc();
arrayexample4.listNumbersDesc();
arrayexample4.avgNumber(input);
System.out.println("Average minmax:"+ arrayexample4.avgMinMax(input));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.608016... | 0.0 | -1 |
Created by cnbo on 1741. | public interface IWebAuthorService {
AdminDTO getAdminDTO();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void perish() {\n \n }",
"public final void mo51373a() {\n }",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\r\n\tpublic void bicar() {\n... | [
"0.60277534",
"0.59956276",
"0.59462297",
"0.5932903",
"0.59248155",
"0.5893898",
"0.5893898",
"0.58239627",
"0.58214056",
"0.5809517",
"0.57869935",
"0.5757252",
"0.5741674",
"0.5739157",
"0.5713668",
"0.5699615",
"0.5685925",
"0.56802756",
"0.5669666",
"0.56685245",
"0.5668... | 0.0 | -1 |
Returns current value of the sensor. | public SensorValueWeb(int sensorId, long timestamp,
double value, SensorValueState state, Double gradient) {
this.sensorId = sensorId;
this.timestamp = timestamp;
this.value = value;
this.state = state;
this.gradient = gradient;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public double getValue() {\n\t\treturn sensorval;\n\t}",
"@Override\r\n\tpublic Text getCurrentValue() throws IOException, InterruptedException {\n\t\treturn this.value;\r\n\t}",
"public Result getCurrentValue() throws IOException, InterruptedException {\n return value;\n }",
"public float getCurrentValu... | [
"0.84924704",
"0.7442244",
"0.7406158",
"0.73879045",
"0.73742396",
"0.7288273",
"0.72416127",
"0.722366",
"0.72083473",
"0.7189823",
"0.7189823",
"0.7189823",
"0.71692026",
"0.7150131",
"0.7150131",
"0.7150131",
"0.7148379",
"0.714084",
"0.7137793",
"0.71091104",
"0.708543",... | 0.0 | -1 |
////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////for trace purposes display all variables and their value | public void displayVariables(TextArea textArea) {
Enumeration enum1 = variableList.elements() ;
while(enum1.hasMoreElements()) {
RuleVariable temp = (RuleVariable)enum1.nextElement() ;
textArea.appendText("\n" + temp.name + " value = " + temp.value) ;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static void displayVariables() {\n Iterator i = dvm.getVariableNames().iterator();\n Object temp;\n while(i.hasNext()){\n temp = i.next();\n System.out.print(temp + \": \" + dvm.getValue(temp.toString()) + \"\\n\");\n }\n }",
"public void displayValues()... | [
"0.76579076",
"0.70802784",
"0.69276536",
"0.6867682",
"0.6580172",
"0.64711",
"0.6459355",
"0.6434381",
"0.63780487",
"0.6356905",
"0.633795",
"0.62702554",
"0.6269726",
"0.62428904",
"0.6210993",
"0.6188652",
"0.6177139",
"0.6167727",
"0.6167158",
"0.6156252",
"0.614393",
... | 0.0 | -1 |
////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////for trace purposes display all rules in text format | public void displayRules(TextArea textArea) {
textArea.appendText("\n" + name + " Rule Base: " + "\n");
Enumeration enum2 = ruleList.elements() ;
while(enum2.hasMoreElements()) {
Rule temp = (Rule)enum2.nextElement() ;
temp.display(textArea) ;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"String rulesAsText();",
"public static void printRules(Rule[] rules) {\n System.out.println(\"\\nRulebase generated\\n------------------\");\n int i =1;\n for (Rule rule : rules) {\n String cond = \"\";\n for (int j = 0; j < rule.cond.length; j++) {\n con... | [
"0.74102616",
"0.68778807",
"0.68263954",
"0.66535187",
"0.6571331",
"0.64908546",
"0.6469041",
"0.6392463",
"0.63802195",
"0.6305136",
"0.62976956",
"0.62816757",
"0.624716",
"0.6240161",
"0.6228881",
"0.6166707",
"0.6070753",
"0.60315746",
"0.6023995",
"0.60237277",
"0.5986... | 0.5901528 | 21 |
////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////for trace purposes display all rules in the conflict set | public void displayConflictSet(Vector ruleSet) {
textArea1.appendText("\n\n" + " -- Rules in conflict set:\n\n");
Enumeration enum2 = ruleSet.elements() ;
while(enum2.hasMoreElements()) {
Rule temp = (Rule)enum2.nextElement() ;
textArea1.appendText(temp.name + "(" + temp.numAntecedents()+ "), " ) ;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void dumpRules()\n\t{\n\t\tif(chain == null)\n\t\t\treturn;\n\t\t\n\t\tIterator it = chain.keySet().iterator();\n\t\tIterator subIt = null;\n\t\t\n\t\tString key = null;\n\t\twhile(it.hasNext())\n\t\t{\n\t\t\tkey = (String)it.next();\n\t\t\tSystem.out.print(key + \" --> \");\n\t\t\t\n\t\t\tsubIt = (chain.ge... | [
"0.5947917",
"0.5725765",
"0.5623051",
"0.546531",
"0.5423805",
"0.5407179",
"0.5384648",
"0.53486127",
"0.5285151",
"0.5258078",
"0.52526915",
"0.52275914",
"0.5227355",
"0.5212464",
"0.52041525",
"0.51997566",
"0.5186901",
"0.51584244",
"0.5135254",
"0.50725037",
"0.5044325... | 0.70230144 | 0 |
//////////////////////////////////////////////////////////////reset the rule base for another round of inferencing /////////////////////////////////////////////////////////////////////////// by setting all variable values to null | public void reset() {
textArea1.appendText("\n --- Setting all " + name + " variables to null");
textArea1.setForeground(Color.red);
Enumeration enum2 = variableList.elements() ;
while(enum2.hasMoreElements()) {
RuleVariable temp = (RuleVariable)enum2.nextElement() ;
temp.setValue(null) ;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void resetVariables(){\n\t\tthis.queryTriplets.clear();\n\t\tthis.variableList.clear();\n\t\tthis.prefixMap.clear();\n\t}",
"@SuppressWarnings(\"NullAway\")\n\t\tpublic void reset() {\n\t\t\ttrackDoc = null;\n\t\t\tglobalDoc = null;\n\t\t\tpredicted.reset();\n\t\t\tobserved.reset();\n\t\t\tdoc_to_imagePix... | [
"0.725646",
"0.7134044",
"0.6942077",
"0.6908539",
"0.6879159",
"0.6829834",
"0.67895836",
"0.678729",
"0.6787043",
"0.677802",
"0.67639035",
"0.67639035",
"0.67639035",
"0.67639035",
"0.6755843",
"0.6738963",
"0.67344344",
"0.6713165",
"0.67072845",
"0.6702067",
"0.6696301",... | 0.7528968 | 0 |
///////////////////////////////////////////////////////////for all consequent clauses which refer to this goalVar //////////////////////////////////////////////////////////////////try to find goalVar value via a rule being true /////////////////////////////////////////////////////////////if rule is true then pop, assign value, reeval rule //////////////////////////////////////////////////////////////////////////////if rule is false then pop, continue ////////////////////////////////////////////////////if rule is null then we couldnt find a value (same as false?) | public void backwardChain(String goalVarName)
{
RuleVariable goalVar = (RuleVariable)variableList.get(goalVarName);
Enumeration<Clause> goalClauses = goalVar.clauseRefs.elements() ;
while (goalClauses.hasMoreElements()) {
Clause goalClause = (Clause)goalClauses.nextElement() ;
if (goalClause.consequent.booleanValue() == false) continue ;
goalClauseStack.push(goalClause) ;
Rule goalRule = goalClause.getRule();
Boolean ruleTruth = goalRule.backChain() ; // find rule truth value
if (ruleTruth == null) {
textArea1.appendText("\nRule " + goalRule.name + " is null, can't determine truth value.");
} else if (ruleTruth.booleanValue() == true) {
// rule is OK, assign consequent value to variable
goalVar.setValue(goalClause.rhs) ;
goalVar.setRuleName(goalRule.name) ;
goalClauseStack.pop() ; // clear item from subgoal stack
textArea1.appendText("\nRule " + goalRule.name + " is true, setting " + goalVar.name + ": = " + goalVar.value);
if (goalClauseStack.empty() == true) {
textArea1.appendText("\n +++ Found Solution for goal: " + goalVar.name);
break ; // for now, only find first solution, then stop
}
} else {
goalClauseStack.pop() ; // clear item from subgoal stack
textArea1.appendText("\nRule " + goalRule.name + " is false, can't set " + goalVar.name);
}
// displayVariables("Backward Chaining") ; // display variable bindings
} // endwhile
if (goalVar.value == null) {
textArea1.appendText("\n +++ Could Not Find Solution for goal: " + goalVar.name);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private Boolean evaluateBooleanExpression(Expression expr, InMemoryExpressionEvaluator eval)\n {\n try\n {\n Object result = expr.evaluate(eval);\n return (result instanceof InMemoryFailure) ? Boolean.FALSE : (Boolean)result;\n }\n catch (VariableNotSetException... | [
"0.5449585",
"0.54010916",
"0.5335894",
"0.5304723",
"0.5177614",
"0.49937668",
"0.49714634",
"0.49044892",
"0.4862494",
"0.48563737",
"0.48509923",
"0.48439088",
"0.4807297",
"0.4799906",
"0.47450808",
"0.47407547",
"0.47321948",
"0.47294772",
"0.47294214",
"0.47285277",
"0.... | 0.6206946 | 0 |
///////////////////////////////////////////////////////////////////////////////////used for forward chaining only //////////////////////////////////////////////////////////////////determine which rules can fire, return a Vector | public Vector match(boolean test) {
Vector matchList = new Vector() ;
Enumeration enum2 = ruleList.elements() ;
// System.out.println(enum2.toString());
while (enum2.hasMoreElements()) {
Rule testRule = (Rule)enum2.nextElement() ;
if (test) testRule.check() ; // test the rule antecedents
if (testRule.truth == null) continue ;
// fire the rule only once for now
if ((testRule.truth.booleanValue() == true) &&
(testRule.fired == false)) matchList.addElement(testRule) ;
}
displayConflictSet(matchList) ;
return matchList ;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Vector<Rule> StemBase(){\r\n\t\t//Vector <Rule> rule=new Vector <Rule>();\r\n\t\tConceptLattice cp=new ConceptLattice(context);\r\n\t\tApproximationSimple ap=new ApproximationSimple(cp);\r\n\r\n\t\tBasicSet A=new BasicSet();\r\n\t\tBasicSet cnt=new BasicSet();\r\n\t\tBasicSet b=new BasicSet();\r\n\t\tcnt.ad... | [
"0.55253935",
"0.5482301",
"0.5372715",
"0.5309149",
"0.52927285",
"0.5275553",
"0.5227536",
"0.51644",
"0.51531255",
"0.51265293",
"0.5113182",
"0.5050074",
"0.5027279",
"0.50236064",
"0.49610755",
"0.49597722",
"0.49524552",
"0.49503928",
"0.4940974",
"0.49385723",
"0.48907... | 0.5641438 | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.