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
public Node getCursor() Accessor to return the current element of the sequence.
public Node<E> getCursor() { if (isCurrent()) { return cursor; } else { throw new IllegalStateException("There is no current element."); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public E getCurrent() {\n if (isCurrent()) { return cursor.getData(); }\n else { throw new IllegalStateException(\"There is no current element.\"); }\n }", "public java.lang.String getCursor() {\n return instance.getCursor();\n }", "public java.lang.String getCursor() {\...
[ "0.7355417", "0.724263", "0.7053141", "0.7040634", "0.6879424", "0.68635225", "0.6863438", "0.68542016", "0.67273086", "0.67250663", "0.66899633", "0.6667053", "0.66339034", "0.6623944", "0.6604393", "0.65174603", "0.6516047", "0.6501098", "0.64799035", "0.64444095", "0.64327...
0.8770025
0
public Node getHead() Accessor method to retrieve the head of the LinkedList.
public Node<E> getHead() { return head; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Node getHeadNode() {\r\n\t\treturn head;\r\n\t}", "public Node getHead() {\n\t\treturn head;\n\t}", "public Node getHead() {\n\t\treturn head;\n\t}", "public Node getHead() {\r\n return head;\r\n }", "public DoublyLinkedListNode<T> getHead() {\n // DO NOT MODIFY!\n return hea...
[ "0.8903745", "0.8841028", "0.8841028", "0.8809655", "0.878795", "0.87691003", "0.86904454", "0.8593886", "0.85445887", "0.8496157", "0.84755915", "0.8473361", "0.8392055", "0.8313226", "0.8291861", "0.82188255", "0.8175444", "0.814237", "0.8117296", "0.8048755", "0.7945465", ...
0.8422548
12
public E getPrevious() Accessor method to determine the previous element of the sequence
@Override public E getPrevious() { if (isCurrent() && prev != null) { return prev.getData(); } else { throw new IllegalStateException("There is no previous element."); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public E previous() {\r\n current--;\r\n return elem[current];\r\n }", "public ListElement getPrevious()\n\t {\n\t return this.previous;\n\t }", "@Override\r\n\t\tpublic E previous() {\n\t\t\tcaret = caret.prev();\r\n\t\t\tif (caret == null)\r\n\t\t\t\tthrow new NoSuch...
[ "0.8667082", "0.86552864", "0.8632978", "0.85812676", "0.8560761", "0.8541349", "0.84838784", "0.8417958", "0.84130013", "0.8304518", "0.8292725", "0.82912594", "0.82813275", "0.8272203", "0.8263527", "0.8249427", "0.82259077", "0.8172439", "0.8118805", "0.8038528", "0.802800...
0.88169754
0
public E getTail() Accessor method to determine the tail element of the sequence
public E getTail() { if (isCurrent() && tail != null) { return tail.getData(); } else { throw new IllegalStateException("There is no tail element."); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public T getTail() {\n\t\treturn tail.value;\n\t}", "public E getLast(){\n return tail.getPrevious().getElement();\n }", "public Node getTail() {\n\t\treturn tail;\n\t}", "public Node getTail() {\n\t\treturn tail;\n\t}", "public Type show_tail() {\n \t \n \t //just return element in tail\n\t ...
[ "0.8249983", "0.7882666", "0.78310084", "0.78310084", "0.77458924", "0.773727", "0.7727936", "0.76947224", "0.76512635", "0.76442796", "0.7629109", "0.75825685", "0.7576517", "0.7572248", "0.75487846", "0.7447437", "0.744626", "0.73747724", "0.73523206", "0.73434466", "0.7340...
0.85525495
0
public boolean isCurrent() Accessor method to determine whether this sequence has a specified current element that can be retrieved with the getCurrent method
@Override public boolean isCurrent() { return cursor != null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\t\tpublic boolean isCurrent()\r\n\t\t{\n\t\t\treturn true;\r\n\t\t}", "@Override\r\n\tpublic boolean isCurrent() {\n\t\treturn false;\r\n\t}", "public boolean isCurrent( )\r\n {\r\n boolean x; \r\n if(cursor != null)// Student will replace this return statement with their own code:\r\...
[ "0.80549866", "0.7590732", "0.746274", "0.7337515", "0.72308487", "0.6852519", "0.68132293", "0.6804455", "0.6804455", "0.6790753", "0.6740576", "0.67382765", "0.6732382", "0.67247725", "0.67247725", "0.6717976", "0.67156756", "0.66901004", "0.66710436", "0.66375387", "0.6616...
0.7018245
5
Compute the number of nodes in a linked list
@Contract(pure = true) public static <E> int listLength(Node<E> head) { Node<E> cursor; int answer; answer = 0; for (cursor = head; cursor != null; cursor = cursor.getNext()) { answer++; } return answer; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int nodeCounter() {\n\n\t\tDLNode n = head;\n\t\tint nodeCounter = 0;\n\t\twhile (n != null) {\n\t\t\tn = n.next;\n\t\t\tnodeCounter++;\n\t\t}\n\t\treturn nodeCounter;\n\t}", "int node_size()\n {\n Node temp =headnode;\n int count=0;\n while (temp.next!=null)\n {\n ...
[ "0.8353615", "0.8271377", "0.8250552", "0.81113523", "0.8109628", "0.80719084", "0.8028251", "0.8028251", "0.79972136", "0.7977784", "0.79117477", "0.7898312", "0.7887779", "0.7881762", "0.78813916", "0.78766716", "0.78643584", "0.7841331", "0.78185993", "0.78152704", "0.7801...
0.74713045
56
Find a node at a specified position in a linked list.
@Contract(pure = true) public static <E> Node<E> listPosition(Node<E> head, int position) { Node<E> cursor; int i; if (position <= 0) { throw new IllegalArgumentException("The position must be greater than 0."); } cursor = head; for (i = 1; (i < position) && (cursor != null); i++) { cursor = cursor.getNext(); } return cursor; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Node getNode(int position)throws ListExeption;", "public Node<E> findNode(int index){\t\r\n\t\tcheckIndex(index);\r\n\t\tint k = 0;\r\n\t\tNode<E> foundNode = headNode;\r\n\t\twhile(k < index - 1) {\r\n\t\t\tfoundNode = foundNode.link;\r\n\t\t}\r\n\t\t\r\n\t\treturn foundNode;\r\n\t}", "public Node getN...
[ "0.70589674", "0.69397855", "0.68902206", "0.68333465", "0.68169373", "0.6734285", "0.6712102", "0.6671268", "0.6632717", "0.644899", "0.6401705", "0.63997614", "0.62597877", "0.62400377", "0.6233302", "0.6230641", "0.618875", "0.6175082", "0.61669827", "0.61539584", "0.61539...
0.62820804
12
Search for a particular piece of data in a linked list.
@Nullable @Contract(pure = true) public static <E> Node<E> listSearch(Node<E> head, E target) { Node<E> cursor; if (target == null) { // Search for a node in which the data is a null reference. for (cursor = head; cursor != null; cursor = cursor.getNext()) { if (cursor.getData() == null) { return cursor; } } } else { // Search for a node that contains the non-null target. for (cursor = head; cursor != null; cursor = cursor.getNext()) { if (target.equals(cursor.getData())) { return cursor; } } } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean search(E data) {\n if (isEmpty()) return false;\n\n Node<E> current = head;\n do {\n if (current.getData().equals(data)) return true;\n current = current.getNext();\n\n } while (current != null);\n return false;\n\n }", "pu...
[ "0.6860328", "0.6665359", "0.65663934", "0.65642804", "0.6544875", "0.637093", "0.63517374", "0.63492167", "0.63231", "0.6314551", "0.6308203", "0.62859446", "0.6244968", "0.6215868", "0.6198256", "0.6134155", "0.6112891", "0.61074084", "0.6095689", "0.6094263", "0.6093832", ...
0.62067425
14
public void removeCurrent() Modification method to remove the current element from this sequence.
@Override public void removeCurrent() { if (!isCurrent()) { throw new IllegalStateException("There is no current element"); } if (prev == null) { // The current element is referenced by the head head = head.getNext(); cursor = head; } else if (cursor.getNext() == null) { // The current element is the final element prev = null; cursor = null; tail = null; } else { cursor = cursor.getNext(); } size--; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void removeCurrent( )\n {\n // Implemented by student.\n }", "public void removeCurrent( )\r\n {\r\n if(isCurrent() != true){\r\n \t throw new IllegalStateException (\"no current element\");// Implemented by student.\r\n }\r\n else{ \r\n if(precursor != null){\r\n...
[ "0.8527193", "0.8231668", "0.759141", "0.7221969", "0.71878576", "0.7129141", "0.7002001", "0.699472", "0.6951775", "0.69408166", "0.69122136", "0.68203145", "0.6687231", "0.6597706", "0.6580223", "0.6565694", "0.65572375", "0.65535885", "0.65522146", "0.65495384", "0.6456683...
0.8068976
2
public NodeList removeHead() Mutator method that removes the head of the LinkedList. The next item (if there is one) becomes the new head. Otherwise, head becomes a null reference.
public Node<E> removeHead() { Node<E> answer = head; head = head.getNext(); size--; return answer; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void removeHead() {\n\t\t\tif (length != 0)\n\t\t\t{ \n\t\t ElementDPtr save = head.getNext();\n\t\t head = head.getNext();\n\t\t\thead.setPrev(null);\n\t\t\thead.setNext(save.getNext());\n\t\t\tlength -= 1;\n\t\t\tSystem.out.println(tail.getPrev().getValue() + \" removeB \" + length);\n\t\t\t\n\t\...
[ "0.7660654", "0.7511921", "0.74958634", "0.74678594", "0.74108744", "0.7369994", "0.7347293", "0.7300377", "0.72695094", "0.7263725", "0.72336286", "0.7177164", "0.708349", "0.70831203", "0.6983271", "0.6935356", "0.6894654", "0.687998", "0.68503016", "0.6837241", "0.67749983...
0.76561123
1
Modification method to remove the node after this node.
public void removeNodeAfter() { cursor = cursor.getNext().getNext(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void removeNodeAfterThis() {\r\n\t\tif ( link != null ) {\r\n\t\t\tlink = link.link;\r\n\t\t} // end precondition\r\n\t}", "private E removeAfter (Node<E> node)\n { //node is the previous node\n Node<E> temp = node.next;\n if (temp != null) {\n node.next = temp.next;\n ...
[ "0.78863555", "0.7421994", "0.7168065", "0.7142313", "0.6944459", "0.6930446", "0.68574595", "0.6691957", "0.6686817", "0.66606545", "0.6653558", "0.66462314", "0.6612833", "0.65549785", "0.6525689", "0.6497188", "0.6480048", "0.64616793", "0.6452435", "0.64350796", "0.642731...
0.8171301
0
public int size() Accessor method to determine the number of elements in this sequence.
@Override public int size() { return size; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int size() {\n return numOfElements;\n }", "@Override\n\tpublic int size() {\n\t\treturn this.numberOfElements;\n\t}", "public int size() {\n\t\t// DO NOT CHANGE THIS METHOD\n\t\treturn numElements;\n\t}", "public int size() {\n\t\treturn this.elements.size();\n\t}", "public int size()\r\n...
[ "0.864297", "0.8612147", "0.84992474", "0.83349323", "0.83118296", "0.8300594", "0.82992655", "0.82992655", "0.82992655", "0.82992655", "0.82979727", "0.8296279", "0.82949334", "0.82949334", "0.82949334", "0.8293924", "0.82882774", "0.82882774", "0.82882774", "0.8273675", "0....
0.0
-1
public void start() Modification method to set the current element at the front of the sequence.
@Override public void start() { if (size > 0) { cursor = head; prev = null; } else { cursor = null; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void moveToStart() {\r\n\t\tcurr = head;\r\n\t}", "public void start( )\r\n {\r\n if (cursor != head){\r\n \t cursor = head; // Implemented by student.\r\n \t precursor = null;\r\n }\r\n }", "public void beforeFirst() {\n\t\tmoveTo(0);\n\t}", "public void moveFirst() {\n\t\tcurre...
[ "0.753087", "0.7072408", "0.68899685", "0.68359184", "0.6781778", "0.677871", "0.6562409", "0.64954", "0.6386885", "0.6278545", "0.62628883", "0.6243092", "0.62255126", "0.6224187", "0.61983156", "0.6183756", "0.61785245", "0.61780787", "0.61774623", "0.6161496", "0.61602914"...
0.7221507
1
Complete the miniMaxSum function below.
static int birthdayCakeCandles(int[] arr) { int max = 0; int count = 0; for (int i = 0; i < arr.length; i++) { if (max < arr[i]) { max = arr[i]; } } for (int i = 0; i < arr.length; i++) { if (max == arr[i]) { count++; } } return count; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static void miniMaxSum(int[] arr) {\n long minSum=0,maxSum=0;\n int temp=0;\n for(int k=0; k<arr.length-1; k++) {\n for(int i=0; i <arr.length-k-1;i++) {\n if(arr[i]>arr[i+1] ) {\n temp=arr[i];\n arr[i]=arr[i+1];\n ...
[ "0.7528219", "0.7460593", "0.74070317", "0.71231616", "0.7001999", "0.6483421", "0.6264115", "0.6235094", "0.62174714", "0.62136245", "0.6187861", "0.61869985", "0.6103231", "0.6098266", "0.6095363", "0.60777193", "0.60773027", "0.607594", "0.6051254", "0.6042788", "0.6028489...
0.0
-1
/ Write your code here.
static String timeConversion(String s) { StringBuilder sb = new StringBuilder(); boolean isAm = s.contains("AM"); s = s.replace("AM", ""); s = s.replace("PM", ""); String str[] = s.split(":"); int time = Integer.parseInt(str[0]); if(time < 12 && !isAm) { time = time + 12; sb.append(time).append(":"); }else if(time == 12 && isAm) { sb.append("00:"); }else { if (time < 10) sb.append("0").append(time).append(":"); else sb.append(time).append(":"); } sb.append(str[1]).append(":").append(str[2]); return sb.toString(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private stendhal() {\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n public void perish() {\n \n }", "private void kk12() {\n\n\t}", "private static void cajas() {\n\t\t\n\t}", "private void strin() {\n\n\t}", "public void mo38117a(...
[ "0.62553036", "0.6244668", "0.6227059", "0.62127393", "0.6148453", "0.6144767", "0.6132763", "0.60014534", "0.599009", "0.59744835", "0.5971943", "0.59546775", "0.5942677", "0.59396803", "0.5936287", "0.592819", "0.5924718", "0.5910585", "0.59057474", "0.59057474", "0.5902111...
0.0
-1
/ Declare any instance variables here / This is the default constructor. It just creates an empty set. Basically, it creates an empty linked list.
public Set() { list = new LinkedList<Object>(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public LinkedHashSet() {\n this(10);\n }", "private Set() {\n this(\"<Set>\", null, null);\n }", "public ListSet() {\n lists = new TernarySearchTree<>();\n }", "public HeapSet () {\r\n\t\tsuper ();\r\n\t}", "public MyHashSet() {\n nodes = new Node[Max_Size];\n }", ...
[ "0.7876666", "0.75077236", "0.73538816", "0.73478174", "0.7304704", "0.71846676", "0.71803355", "0.717499", "0.71415025", "0.7116324", "0.7097339", "0.70327944", "0.7017478", "0.69961995", "0.69896173", "0.6988226", "0.6918283", "0.6913952", "0.6912551", "0.6881288", "0.68800...
0.8088823
0
/ This is a copy constructor. It creates a new set from an old set
public Set(Set original) throws SetException { this(); addItems(original); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public SetSet deepCopy(){\n\t\tSetSet copy = new SetSet();\n\t\tfor(int i=0;i<size();i++){\n\t\t\tcopy.add(get(i).deepCopy());\n\t\t}\n\t\treturn copy;\n\t}", "@SuppressWarnings(\"unchecked\")\r\n public Object clone() {\r\n try {\r\n OCRSet<E> newSet = (OCRSet<E>) super.clone();\r\n ...
[ "0.7079197", "0.6914836", "0.676406", "0.6690127", "0.66506904", "0.66477174", "0.65151656", "0.6497357", "0.64432245", "0.64119655", "0.6210349", "0.61827844", "0.6109416", "0.61049193", "0.60774946", "0.6069026", "0.60628015", "0.6060177", "0.60388887", "0.6025944", "0.6023...
0.6747838
3
/ Returns the items in the set as a string
public String toString() { if (list.size() < 1) return "There is no element in the Set."; StringBuilder sb = new StringBuilder(); for (Object item : list) { if (sb.length() > 0) sb.append(", ").append("[").append(item.toString()).append("]"); else sb.append("[").append(item.toString()).append("]"); } return sb.toString(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String setToString(Set set) {\n Iterator it = set.iterator();\n StringBuffer sb = new StringBuffer();\n\n while (it.hasNext()) {\n if (sb.length() > 0) {\n sb.append(',');\n }\n\n sb.append(it.next());\n }\n\n return sb.t...
[ "0.77425927", "0.76459485", "0.7297641", "0.72964716", "0.7272559", "0.7112646", "0.70437104", "0.6920729", "0.6874909", "0.681266", "0.67547554", "0.67233115", "0.6717871", "0.6693558", "0.66752744", "0.662751", "0.66253483", "0.66252613", "0.66029555", "0.65771466", "0.6570...
0.7903332
0
/ Returns true if the item is in the set and false otherwise
public boolean member(Object item) { for (Object element : list) if (element.equals(item)) return true; return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean contains(T item) {\n Node n = first;\n //walk through the linked list untill you reach the end\n while(n != null) {\n //see if the item exists in the set, if it does return true\n if(n.value.equals(item))\n return true;\n ...
[ "0.80297583", "0.7844942", "0.77848095", "0.76870084", "0.7579354", "0.7463729", "0.7431051", "0.7331199", "0.7312669", "0.72630113", "0.7207636", "0.7152276", "0.71518487", "0.71375763", "0.7077219", "0.70759183", "0.7070136", "0.7069767", "0.70535284", "0.7053527", "0.70318...
0.6319932
97
/ This method should add an item to the set. It should throw an exception if the item is already in the set. Specifically, you should define a SetException and throw this exception. When you create a new instance of this exception, you should set its value to "Item already in set."
public void addItem(Object item) throws SetException { if (member(item)) throw new SetException("Item already in set."); list.add(item); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addItems(Set newItems) throws SetException {\n\t\tboolean exceptionFlag = false;\n\t\tfor (Object element : newItems.list) {\n\t\t\ttry {\n\t\t\t\taddItem(element);\n\t\t\t} catch (SetException se) {\n\t\t\t\texceptionFlag = true;\n\t\t\t}\n\t\t}\n\t\tif (exceptionFlag)\n\t\t\tthrow new SetException(\"...
[ "0.7168647", "0.68594444", "0.67835855", "0.6781893", "0.6479744", "0.6191728", "0.6177267", "0.61606485", "0.61291265", "0.61222154", "0.60238296", "0.5958571", "0.59389347", "0.593029", "0.59208095", "0.58888817", "0.5804314", "0.57626075", "0.5738447", "0.5733584", "0.5688...
0.7886349
0
/ This method should add all of the items from the newItems set into the original set. It should throw an exception upon discovering that any requested item is already in the set. Specifically, you should define a SetException and throw this exception. When you create a new instance of this exception, you should set its value to "Item already in set."
public void addItems(Set newItems) throws SetException { boolean exceptionFlag = false; for (Object element : newItems.list) { try { addItem(element); } catch (SetException se) { exceptionFlag = true; } } if (exceptionFlag) throw new SetException("Item already in set."); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Set(Set original) throws SetException {\n\t\tthis();\n\t\taddItems(original);\n\t}", "public void addItem(Object item) throws SetException {\n\t\tif (member(item))\n\t\t\tthrow new SetException(\"Item already in set.\");\n\n\t\tlist.add(item);\n\t}", "private void createNewItemsetsFromPreviousOnes() {\n...
[ "0.6762181", "0.63821733", "0.6319047", "0.621418", "0.62014806", "0.61714566", "0.6077671", "0.60752493", "0.6036527", "0.5899676", "0.5883345", "0.58535165", "0.58518654", "0.58467805", "0.5827493", "0.5782015", "0.57217133", "0.5706471", "0.5682981", "0.56693554", "0.56446...
0.8491924
0
/ This method should remove an item from the set. It should throw an exception if the item is not in the set. Specifically, you should define a SetException and throw this exception. When you create a new instance of this exception, you should set its value to "Item not already in set."
public void removeItem(Object item) throws SetException { for (Object element : list) if (element.equals(item)) { list.remove(item); return; } throw new SetException("Item not already in set."); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void removeItems(Set items) throws SetException {\n\t\tfor (Object element : items.list) {\n\t\t\tif (member(element))\n\t\t\t\tremoveItem(element);\n\t\t\telse\n\t\t\t\tthrow new SetException(\"Item not already in set.\");\n\t\t}\n\n\t}", "@Override\r\n\tpublic boolean remove(Object o) {\n\t\treturn set....
[ "0.72159433", "0.6439639", "0.63010025", "0.60457087", "0.6035712", "0.5996854", "0.5992976", "0.5992163", "0.59286654", "0.589194", "0.5866351", "0.58653945", "0.58288383", "0.5820051", "0.578717", "0.5782234", "0.57325804", "0.57255024", "0.5722906", "0.5719469", "0.5713022...
0.78505313
0
/ This method should remove all of the items in the "items" Set from the current set. It should throw an exception upon discovering that any of the specified items is not in the target set. Specifically, you should define a SetException and throw this exception. When you create a new instance of this exception, you should set its value to "Item not already in set."
public void removeItems(Set items) throws SetException { for (Object element : items.list) { if (member(element)) removeItem(element); else throw new SetException("Item not already in set."); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void removeItem(Object item) throws SetException {\n\t\tfor (Object element : list)\n\t\t\tif (element.equals(item)) {\n\t\t\t\tlist.remove(item);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\tthrow new SetException(\"Item not already in set.\");\n\t}", "protected static <T> Set<T> itemSet(T[] items) {\n return...
[ "0.705499", "0.66501755", "0.65425193", "0.634311", "0.62274027", "0.6124687", "0.6059158", "0.6026128", "0.59704214", "0.5920299", "0.58485746", "0.5795337", "0.57705325", "0.56453156", "0.5644906", "0.5637138", "0.562126", "0.5616623", "0.5601791", "0.5594664", "0.5594205",...
0.83165956
0
/ This returns a new set that contains every element in the original set and the set provided by the user
public Set union(Set in_set) throws SetException { Set union = new Set(this); for (Object element : in_set.list) { if (!member(element)) union.addItem(element); } return union; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Set retainAll(final int[] newSet) {\n Set s2 = new Set();\n for (int i = 0; i < size; i++) {\n for (int element : newSet) {\n if (set[i] == element) {\n s2.add(set[i]);\n }\n }\n }\n // for (int i = 0; i <...
[ "0.71643114", "0.7131676", "0.6989841", "0.6884661", "0.6819571", "0.67300045", "0.670694", "0.67056644", "0.6681615", "0.66721016", "0.6576827", "0.6571505", "0.6551273", "0.6493837", "0.647174", "0.646858", "0.645329", "0.6431774", "0.6420952", "0.6411062", "0.64005727", ...
0.66279477
10
/ This returns a new set that contains only those elements in the original set and the set provided by the user
public Set intersection(Set in_set) throws SetException { Set intersection = new Set(); for (Object element : in_set.list) { if (member(element)) intersection.addItem(element); } return intersection; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Set retainAll(final int[] newSet) {\n Set s2 = new Set();\n for (int i = 0; i < size; i++) {\n for (int element : newSet) {\n if (set[i] == element) {\n s2.add(set[i]);\n }\n }\n }\n // for (int i = 0; i <...
[ "0.7605523", "0.7179544", "0.7118574", "0.6894137", "0.6846002", "0.6845569", "0.6828192", "0.6648083", "0.66463333", "0.6573597", "0.6526176", "0.6501278", "0.64582986", "0.64482296", "0.64138854", "0.6412535", "0.64103734", "0.6355024", "0.63374275", "0.6331941", "0.6321518...
0.5852375
59
/ This returns a new set that contains only those elements in the original set or the set provided by the user, but not both.
public Set xor(Set in_set) throws SetException { Set temp = union(in_set); temp.removeItems(intersection(in_set)); return temp; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ZYSet<ElementType> difference(ZYSet<ElementType> otherSet){\n ZYSet<ElementType> result = new ZYArraySet<ElementType>();\n for(ElementType e :this){\n if(!otherSet.contains(e)){\n result.add(e);\n }\n }\n return result;\n }", "public Set setDifference(Set diff){\n Set newSet =...
[ "0.7513469", "0.7347617", "0.70487344", "0.70116764", "0.69786114", "0.68692493", "0.6825123", "0.6812137", "0.6783462", "0.66660494", "0.656143", "0.64737487", "0.6464495", "0.6423871", "0.6400899", "0.63906354", "0.6333413", "0.63276005", "0.61980295", "0.61899304", "0.6167...
0.6828773
6
/ This returns true if the specified set is a proper subset of the target set and false otherwise.
public boolean subset(Set subset) throws SetException { for (Object element : subset.list) if (!member(element)) return false; return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\r\n public void testIsSubset1() {\r\n Assert.assertEquals(false, set1.isSubset(set2));\r\n }", "public boolean properSubset(SetSet second){\n\t\tif(subset(second) && !equals(second)){\n\t\t\treturn true;\n\t\t}\n\t\telse{\n\t\t\treturn false;\n\t\t}\n\t}", "public boolean subset(ZYSet<Elemen...
[ "0.7557888", "0.7199468", "0.7050898", "0.6999334", "0.6946747", "0.68941057", "0.67891175", "0.67860967", "0.6768036", "0.67601264", "0.669067", "0.66671485", "0.6663004", "0.66446173", "0.6565198", "0.6555234", "0.6483957", "0.6474162", "0.6464489", "0.64601743", "0.6380549...
0.71616876
2
/ This should be a test driver. It should perform no user or file I/O whatsoever. Instead, it should be a static test set that convinces us that your Set class works. It should test all of the special cases, all of the boundary cases, and the common cases.
public static void main(String[] argv) throws SetException { String[] professor = new String[] { "Kesden", "Atkeson", "Reddy" }; String[] lecturer = new String[] { "Kesden", "Atkeson", "Joe", "Reddy" }; String[] students = new String[] { "SungPil", "Joe", "Pom" }; // Test for constructor Set professorSet = new Set(); System.out .println("-------------------------------------- Test for constructor"); System.out.println("No data in the Set: " + professorSet.toString()); // Test for addItem for (String prof : professor) professorSet.addItem(prof); System.out .println("-------------------------------------- Test for addItem"); System.out.println("Professors in the Set: " + professorSet.toString()); // Test for copy constructor Set professorCopySet = new Set(professorSet); System.out .println("-------------------------------------- Test for copy constructor"); System.out.println("Professors copy Set: " + professorCopySet.toString()); // Test for addItems with Exception Set lecturerSet = new Set(); for (String lect : lecturer) lecturerSet.addItem(lect); Set teacherSet = new Set(); teacherSet.addItems(professorSet); try { teacherSet.addItems(lecturerSet); } catch (SetException se) { System.out.println(se.toString()); } System.out .println("-------------------------------------- Test for addItems"); System.out.println("Teacher Set: " + teacherSet.toString()); // Test for removeItem teacherSet.removeItem("Joe"); System.out .println("-------------------------------------- Test for removeItem"); System.out.println("Joe left CMU: " + teacherSet.toString()); // Test for removeItems teacherSet.removeItems(professorSet); System.out .println("-------------------------------------- Test for removeItems"); System.out .println("Professor is not teacher: " + teacherSet.toString()); // Test for member System.out .println("-------------------------------------- Test for memeber"); System.out.println("Joe is professor?: " + professorSet.member("Joe")); System.out.println("Joe is lecturer?: " + lecturerSet.member("Joe")); // Test for intersection System.out .println("-------------------------------------- Test for intersection"); Set intersectionSet = professorSet.intersection(lecturerSet); System.out .println("The person who is proferssor as well as lecturer?: " + intersectionSet.toString()); // Test for union System.out .println("-------------------------------------- Test for union"); Set unionSet = professorSet.union(lecturerSet); System.out.println("The person who is proferssor or lecturer?: " + unionSet.toString()); // Test for subset System.out .println("-------------------------------------- Test for subset"); System.out .println("Does the group of lecturer is the subset of the group of professor?: " + professorSet.subset(lecturerSet)); System.out .println("Does the group of professor is the subset of the group of lecturer?: " + lecturerSet.subset(professorSet)); // Test for xor System.out .println("-------------------------------------- Test for xor"); Set xor = professorSet.xor(lecturerSet); System.out .println("The person who is only professor or only lecturer: " + xor.toString()); System.out .println("----------------------------------------------------"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testSetCodeExamples() {\n logger.info(\"Beginning testSetCodeExamples()...\");\n\n // Create some sets\n Set<Integer> emptySet = new Set<>();\n\n Integer[] first = { 1, 2, 3, 4 };\n Set<Integer> firstSet = new Set<>(first);\n\n Integer[] second = { 3...
[ "0.70816326", "0.7003905", "0.69610906", "0.6938427", "0.6932754", "0.69088143", "0.6846565", "0.68335", "0.67967206", "0.6768435", "0.6761258", "0.6751898", "0.6738992", "0.6734609", "0.6711315", "0.6695985", "0.6688035", "0.6667265", "0.6654504", "0.66316164", "0.66113585",...
0.7107942
0
Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: com.userspostscomments.comments
public ObjectFactory() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "SchemaBuilder withFactory(String factoryClassName);", "public interface GraphQLFactory extends EFactory\n{\n /**\n * The singleton instance of the factory.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n GraphQLFactory eINSTANCE = io.github.katmatt.graphql.graphQL.impl.Gra...
[ "0.6134126", "0.5873089", "0.58049744", "0.5748854", "0.5725981", "0.5725981", "0.5725981", "0.5658837", "0.565808", "0.5652211", "0.56351346" ]
0.0
-1
This is the default constructor
public GridMapPanel() { super(); initialize(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Constructor() {\r\n\t\t \r\n\t }", "public Constructor(){\n\t\t\n\t}", "defaultConstructor(){}", "@SuppressWarnings(\"unused\")\n public NoConstructor() {\n // Empty\n }", "public Orbiter() {\n }", "public Pitonyak_09_02() {\r\n }", "public PSRelation()\n {\n }", "p...
[ "0.85315686", "0.8274922", "0.75848484", "0.74773645", "0.7456932", "0.7447545", "0.7443651", "0.7441528", "0.7410326", "0.74039483", "0.7391621", "0.7377517", "0.73672515", "0.7351425", "0.73242426", "0.7324195", "0.73132765", "0.73016304", "0.7279156", "0.7262864", "0.72578...
0.0
-1
This method initializes this
private void initialize() { GridBagConstraints gridBagConstraints21 = new GridBagConstraints(); gridBagConstraints21.gridx = 0; gridBagConstraints21.weightx = 1.0D; gridBagConstraints21.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints21.gridy = 1; GridBagConstraints gridBagConstraints11 = new GridBagConstraints(); gridBagConstraints11.gridx = 0; gridBagConstraints11.insets = new java.awt.Insets(2, 2, 2, 2); gridBagConstraints11.fill = java.awt.GridBagConstraints.BOTH; gridBagConstraints11.weightx = 1.0D; gridBagConstraints11.weighty = 1.0D; gridBagConstraints11.gridy = 2; GridBagConstraints gridBagConstraints = new GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; gridBagConstraints.weightx = 1.0D; gridBagConstraints.insets = new java.awt.Insets(2, 2, 2, 2); gridBagConstraints.gridy = 0; this.setLayout(new GridBagLayout()); setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Manage Grid Map File", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, null, PortalLookAndFeel.getPanelLabelColor())); this.add(getGridMapFilePanel(), gridBagConstraints); this.add(getTablePanel(), gridBagConstraints11); this.add(getControlPanel(), gridBagConstraints21); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override public void init()\n\t\t{\n\t\t}", "public void initialize()\n {\n }", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "public void init() {\n \n }", "@Override\n\t\tpublic void init() {\n\t\t}", "protected void initialize() {\n \t\n }", "@Override\r\n\tpub...
[ "0.8354825", "0.8309513", "0.8283604", "0.8257773", "0.8200911", "0.8199891", "0.8150085", "0.812387", "0.8104957", "0.8103473", "0.8103473", "0.8103473", "0.80656415", "0.8054776", "0.8038111", "0.8030163", "0.8019929", "0.7993678", "0.7993678", "0.7987857", "0.798652", "0...
0.0
-1
This method initializes gridMapFilePanel
private JPanel getGridMapFilePanel() { if (gridMapFilePanel == null) { GridBagConstraints gridBagConstraints3 = new GridBagConstraints(); gridBagConstraints3.gridx = 0; gridBagConstraints3.gridwidth = 3; gridBagConstraints3.insets = new java.awt.Insets(2, 2, 2, 2); gridBagConstraints3.gridy = 1; jLabel1 = new JLabel(); jLabel1.setText("(File will be created if it does not exist)"); jLabel1.setForeground(PortalLookAndFeel.getPanelLabelColor()); jLabel1.setFont(new java.awt.Font("Dialog", java.awt.Font.ITALIC, 12)); GridBagConstraints gridBagConstraints2 = new GridBagConstraints(); gridBagConstraints2.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints2.gridx = 1; gridBagConstraints2.gridy = 0; gridBagConstraints2.weightx = 1.0; gridBagConstraints2.insets = new java.awt.Insets(2, 2, 2, 2); GridBagConstraints gridBagConstraints1 = new GridBagConstraints(); gridBagConstraints1.insets = new java.awt.Insets(2, 2, 2, 2); gridBagConstraints1.gridy = 0; gridBagConstraints1.anchor = java.awt.GridBagConstraints.WEST; gridBagConstraints1.gridx = 0; jLabel = new JLabel(); jLabel.setText("Grid Map File Location"); gridMapFilePanel = new JPanel(); gridMapFilePanel.setLayout(new GridBagLayout()); gridMapFilePanel.add(jLabel, gridBagConstraints1); gridMapFilePanel.add(jLabel1, gridBagConstraints3); gridMapFilePanel.add(getGridmapLocation(), gridBagConstraints2); gridMapFilePanel.add(getBrowseButton(), new GridBagConstraints()); } return gridMapFilePanel; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public GridMapPanel() {\n super();\n initialize();\n }", "private void initialize() {\n GridBagConstraints gridBagConstraints21 = new GridBagConstraints();\n gridBagConstraints21.gridx = 0;\n gridBagConstraints21.weightx = 1.0D;\n gridBagConstraints21.fill = java.awt....
[ "0.7484531", "0.74617034", "0.6599947", "0.6539373", "0.64425075", "0.6293551", "0.62417823", "0.62286276", "0.62275356", "0.61852044", "0.61626023", "0.6151058", "0.6140828", "0.60701644", "0.60654306", "0.6056662", "0.59847635", "0.5976766", "0.5955565", "0.59427756", "0.59...
0.6746825
2
This method initializes gridmapLocation
private JTextField getGridmapLocation() { if (gridmapLocation == null) { gridmapLocation = new JTextField(); } return gridmapLocation; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public GridMapPanel() {\n super();\n initialize();\n }", "@Override\n protected void initLocation() {\n }", "public void initialize() {\n\t\tnumRows = gridConfig.getNumRows();\n\t\tnumCols = gridConfig.getNumCols();\n\t\tgridCellCount = numRows * numCols;\n\t\tcreateMaps();\n\t\tsetCurrS...
[ "0.703963", "0.69899064", "0.694623", "0.6882741", "0.66989803", "0.66762084", "0.6597088", "0.6558859", "0.6519106", "0.647561", "0.6464345", "0.64621294", "0.6401825", "0.6379201", "0.63638926", "0.6362742", "0.6346025", "0.63345534", "0.6315691", "0.63076824", "0.6301466",...
0.6122855
38
This method initializes browseButton
private JButton getBrowseButton() { if (browseButton == null) { browseButton = new JButton(); browseButton.setText("Browse"); browseButton.setIcon(IntroduceLookAndFeel.getBrowseIcon()); browseButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { browse(); } }); } return browseButton; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void browse() {\n btBrowse().push();\n }", "public NewFileChooser_Alejandro() {\n initComponents();\n }", "private void initialize() {\n\t\tframe = new JFrame();\n\t\tframe.getContentPane().setBackground(new Color(244, 164, 96));\n\t\tframe.setBounds(100, 100, 450, 300);\n\t\tframe.s...
[ "0.7165016", "0.71481425", "0.68926156", "0.68370235", "0.66165465", "0.6603635", "0.6595744", "0.658932", "0.6555184", "0.6549129", "0.65436494", "0.6509253", "0.6472737", "0.64432514", "0.64385724", "0.64303976", "0.64128023", "0.64075553", "0.6395137", "0.63876915", "0.638...
0.6940608
2
This method initializes tablePanel
private JPanel getTablePanel() { if (tablePanel == null) { GridBagConstraints gridBagConstraints4 = new GridBagConstraints(); gridBagConstraints4.fill = java.awt.GridBagConstraints.BOTH; gridBagConstraints4.weighty = 1.0; gridBagConstraints4.gridx = 0; gridBagConstraints4.gridy = 0; gridBagConstraints4.insets = new java.awt.Insets(2, 2, 2, 2); gridBagConstraints4.weightx = 1.0; tablePanel = new JPanel(); tablePanel.setLayout(new GridBagLayout()); tablePanel.add(getJScrollPane(), gridBagConstraints4); } return tablePanel; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void initTable() {\n \t\t// init table\n \t\ttable.setCaption(TABLE_CAPTION);\n \t\ttable.setPageLength(10);\n \t\ttable.setSelectable(true);\n \t\ttable.setRowHeaderMode(Table.ROW_HEADER_MODE_INDEX);\n \t\ttable.setColumnCollapsingAllowed(true);\n \t\ttable.setColumnReorderingAllowed(true);\n \t\ttable.se...
[ "0.8074654", "0.78825015", "0.78645694", "0.7833003", "0.77996236", "0.76694614", "0.7621823", "0.76096857", "0.747311", "0.74649143", "0.7464155", "0.7432088", "0.7388698", "0.7365668", "0.72523546", "0.72318125", "0.7207929", "0.719362", "0.71821845", "0.7176413", "0.715958...
0.0
-1
This method initializes jScrollPane
private JScrollPane getJScrollPane() { if (jScrollPane == null) { jScrollPane = new JScrollPane(); jScrollPane.setViewportView(getGridmapTable()); } return jScrollPane; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void initScrollPane() {\n\n MyScrollPane = new JScrollPane(MyTextArea);\n super.addCenter(MyScrollPane);\n\n }", "private void initialize() {\n\t\tthis.setLayout(new BorderLayout());\n\t\tthis.setSize(300, 200);\n\t\tthis.add(getJScrollPane(), java.awt.BorderLayout.CENTER);\n\t}", "public void i...
[ "0.8158612", "0.80634016", "0.78972113", "0.78066516", "0.7778996", "0.75097865", "0.7445952", "0.7438688", "0.74012434", "0.73987013", "0.7282151", "0.72807527", "0.70273954", "0.6921892", "0.68968827", "0.68917334", "0.6870333", "0.6858035", "0.6820447", "0.680897", "0.6790...
0.64038134
68
This method initializes gridmapTable
private JTable getGridmapTable() { if (gridmapTable == null) { gridmapTable = new GridMapTable(); } return gridmapTable; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public GridMapPanel() {\n super();\n initialize();\n }", "public void initTable();", "public void initialize() {\n\t\tnumRows = gridConfig.getNumRows();\n\t\tnumCols = gridConfig.getNumCols();\n\t\tgridCellCount = numRows * numCols;\n\t\tcreateMaps();\n\t\tsetCurrSimulationMap();\n\t\tcellWidt...
[ "0.73483825", "0.7145178", "0.71073335", "0.7081299", "0.7072733", "0.70035017", "0.69747853", "0.6875514", "0.6859175", "0.6837507", "0.68251514", "0.6794683", "0.67591983", "0.6737889", "0.66983163", "0.6681334", "0.6663011", "0.6644181", "0.6642371", "0.6592314", "0.658171...
0.69404197
7
This method initializes controlPanel
private JPanel getControlPanel() { if (controlPanel == null) { GridBagConstraints gridBagConstraints8 = new GridBagConstraints(); gridBagConstraints8.gridx = 0; gridBagConstraints8.gridy = 1; GridBagConstraints gridBagConstraints7 = new GridBagConstraints(); gridBagConstraints7.insets = new java.awt.Insets(5, 5, 5, 5); gridBagConstraints7.gridy = 0; gridBagConstraints7.weightx = 1.0D; gridBagConstraints7.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints7.gridx = 0; controlPanel = new JPanel(); controlPanel.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Add/Remove User(s)", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, null, PortalLookAndFeel.getPanelLabelColor())); controlPanel.setLayout(new GridBagLayout()); controlPanel.add(getUserAddEditPanel(), gridBagConstraints7); controlPanel.add(getUserManagerButtonPanel(), gridBagConstraints8); } return controlPanel; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void initControl() {\n\t\t\r\n\t}", "private void initPanel() {\n\t\tthis.panel = new JPanel();\n\t\tthis.panel.setBounds(5, 5, 130, 20);\n\t\tthis.panel.setLayout(null); \n\n\t}", "@Override\n\tpublic void initializeControls() {\n\t\t\n\t}", "public ControlPanel() {\n\t\tpanelName = null;\n\t}", ...
[ "0.7783259", "0.760784", "0.75384015", "0.75109214", "0.73656225", "0.7306544", "0.7299918", "0.725037", "0.724679", "0.7243452", "0.72171205", "0.71601117", "0.71393263", "0.71323156", "0.7130883", "0.7111903", "0.70991206", "0.7079797", "0.7072", "0.7052554", "0.7048331", ...
0.0
-1
This method initializes userAddEditPanel
private JPanel getUserAddEditPanel() { if (userAddEditPanel == null) { GridBagConstraints gridBagConstraints10 = new GridBagConstraints(); gridBagConstraints10.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints10.gridy = 1; gridBagConstraints10.weightx = 1.0; gridBagConstraints10.anchor = java.awt.GridBagConstraints.WEST; gridBagConstraints10.insets = new java.awt.Insets(2, 2, 2, 2); gridBagConstraints10.gridx = 1; GridBagConstraints gridBagConstraints9 = new GridBagConstraints(); gridBagConstraints9.gridx = 0; gridBagConstraints9.anchor = java.awt.GridBagConstraints.WEST; gridBagConstraints9.insets = new java.awt.Insets(2, 2, 2, 2); gridBagConstraints9.gridy = 1; jLabel3 = new JLabel(); jLabel3.setText("Local User"); GridBagConstraints gridBagConstraints6 = new GridBagConstraints(); gridBagConstraints6.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints6.gridx = 1; gridBagConstraints6.gridy = 0; gridBagConstraints6.weightx = 1.0; gridBagConstraints6.anchor = java.awt.GridBagConstraints.WEST; gridBagConstraints6.insets = new java.awt.Insets(5, 5, 5, 5); GridBagConstraints gridBagConstraints5 = new GridBagConstraints(); gridBagConstraints5.insets = new java.awt.Insets(2, 2, 2, 2); gridBagConstraints5.gridy = 0; gridBagConstraints5.anchor = java.awt.GridBagConstraints.WEST; gridBagConstraints5.gridx = 0; jLabel2 = new JLabel(); jLabel2.setText("Grid Identity"); userAddEditPanel = new JPanel(); userAddEditPanel.setLayout(new GridBagLayout()); userAddEditPanel.add(jLabel2, gridBagConstraints5); userAddEditPanel.add(getGridIdentity(), gridBagConstraints6); userAddEditPanel.add(jLabel3, gridBagConstraints9); userAddEditPanel.add(getLocalUser(), gridBagConstraints10); } return userAddEditPanel; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public adduser() {\n initComponents();\n }", "public AddUser() {\n initComponents();\n }", "public AddUser() {\n initComponents();\n }", "public AddUser() {\n initComponents();\n }", "public ManageUser() {\r\n \t\tinitComponents();\r\n \t\taddActionListener();\r\n \t...
[ "0.7314345", "0.7203753", "0.7203753", "0.7203753", "0.718821", "0.70622426", "0.70307845", "0.6941177", "0.6838387", "0.66603184", "0.6639938", "0.65188414", "0.6501965", "0.6501062", "0.64983517", "0.6489918", "0.6458633", "0.6427091", "0.6413581", "0.6394588", "0.63934124"...
0.7084542
5
This method initializes gridIdentity
private JTextField getGridIdentity() { if (gridIdentity == null) { gridIdentity = new JTextField(); } return gridIdentity; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void initialize() {\n\t\tnumRows = gridConfig.getNumRows();\n\t\tnumCols = gridConfig.getNumCols();\n\t\tgridCellCount = numRows * numCols;\n\t\tcreateMaps();\n\t\tsetCurrSimulationMap();\n\t\tcellWidth = SIZE / numCols;\n\t\tcellHeight = SIZE / numRows;\n\t\tcurrentGrid = new Cell[numRows][numCols];\n\t\tn...
[ "0.68261933", "0.65839726", "0.65535235", "0.6494347", "0.64780176", "0.62690663", "0.6225989", "0.62131566", "0.6190813", "0.614816", "0.6126301", "0.61224467", "0.61091477", "0.6100085", "0.6096203", "0.6071335", "0.5990985", "0.5982325", "0.5975562", "0.5974283", "0.596961...
0.5933512
22
This method initializes userManagerButtonPanel
private JPanel getUserManagerButtonPanel() { if (userManagerButtonPanel == null) { userManagerButtonPanel = new JPanel(); userManagerButtonPanel.add(getAddButton(), null); userManagerButtonPanel.add(getRemoveButton(), null); } return userManagerButtonPanel; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ManageUser() {\r\n \t\tinitComponents();\r\n \t\taddActionListener();\r\n \t}", "private void buttonInit() {\n panel.add(createButton);\n panel.add(editButton);\n panel.add(changeButton);\n createButton.addActionListener(this);\n editButton.addActionListener(this);\n ...
[ "0.724709", "0.6953487", "0.69311893", "0.6756336", "0.66907024", "0.65713966", "0.6475094", "0.6440847", "0.6425394", "0.64086264", "0.6390023", "0.6369917", "0.62779975", "0.62758285", "0.6258285", "0.6226102", "0.6218217", "0.61752975", "0.6170052", "0.61658", "0.6120429",...
0.7153551
1
This method initializes addButton
private JButton getAddButton() { if (addButton == null) { addButton = new JButton(); addButton.setText("Add User"); addButton.setIcon(PortalLookAndFeel.getAddIcon()); addButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { addUser(); } }); } return addButton; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tprotected void initAddButton() {\n addBtn = addButton(\"newBtn\", TwlLocalisationKeys.ADD_BEAT_TYPE_TOOLTIP, new Runnable() {\n\t\t\t\t@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\tnew AddEditBeatTypePanel(true, null, BeatTypesList.this).run(); // adding\n\t\t\t\t}\n\t }); \t\...
[ "0.82540315", "0.8054339", "0.7690575", "0.7664657", "0.7580175", "0.7445938", "0.7415784", "0.73967046", "0.7387091", "0.7339908", "0.7299295", "0.72652954", "0.71802956", "0.7178917", "0.7128357", "0.70968306", "0.7063247", "0.70475936", "0.7044606", "0.6980567", "0.6932895...
0.69825816
19
This method initializes removeButton
private JButton getRemoveButton() { if (removeButton == null) { removeButton = new JButton(); removeButton.setText("Remove User"); removeButton.setIcon(PortalLookAndFeel.getRemoveIcon()); removeButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { removeUser(); } }); } return removeButton; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private JButton createRemoveResourceButton() {\n\n removeResourceBtn = new JButton(\"Remove\");\n removeResourceBtn.setEnabled(false);\n removeResourceBtn.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n\n ...
[ "0.69128686", "0.6905917", "0.6869354", "0.68502766", "0.68497694", "0.6815519", "0.67799747", "0.6773405", "0.66365284", "0.6623426", "0.6615427", "0.65286916", "0.6525604", "0.652008", "0.6502809", "0.6493833", "0.6486487", "0.64167273", "0.6401527", "0.63974726", "0.639709...
0.69123197
1
This method initializes localUser
private JTextField getLocalUser() { if (localUser == null) { localUser = new JTextField(); } return localUser; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void initUser() {\n\t}", "public LocalUserProfile() {\n \tsuper();\n }", "private void initializeCurrentUser() {\n if (enableLoginActivity && mAuth.getCurrentUser() != null) {\n try {\n initializeUser();\n refreshGoogleCalendarToken();\n ...
[ "0.78075683", "0.7016558", "0.6967838", "0.6680589", "0.65418303", "0.64869416", "0.643548", "0.62867856", "0.6271278", "0.62637496", "0.6246939", "0.6240832", "0.62382865", "0.62120557", "0.621072", "0.6181273", "0.6181273", "0.6181273", "0.6179765", "0.60901064", "0.6059284...
0.62826973
8
An interface indicating that a version of this type can be incremented.
public interface IncrementableEntryVersion extends EntryVersion { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void incrementVersion() {\n this.version++;\n }", "public void incrementVersion() {\n this.version += 1;\n }", "public abstract int getVersion();", "public int getVersion() { return 1; }", "public interface Version {\n\n /**\n * Check if this version is a major version.\n ...
[ "0.7192172", "0.710651", "0.64829355", "0.61386275", "0.6051479", "0.5906482", "0.5863527", "0.5861771", "0.58235675", "0.5802572", "0.5719083", "0.5680916", "0.5619415", "0.5611225", "0.56039095", "0.55601937", "0.553429", "0.5512739", "0.5511224", "0.55058366", "0.5500759",...
0.73902404
0
This is called when the connection with the service has been established, giving us the object we can use to interact with the service. We are communicating with the service using a Messenger, so here we get a clientside representation of that from the raw IBinder object.
public void onServiceConnected(ComponentName className, IBinder service) { mService = new Messenger(service); mBound = true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onServiceConnected(ComponentName componentName, IBinder iBinder) {\n selfServiceMethodSolver = (ISelfMethod) iBinder;\n Log.d(\"BindLog\", \"Client - SelfService已Bind成功,并获取了代理\");\n }", "@Override\n public void onServiceConnected(ComponentName cl...
[ "0.6043875", "0.60405433", "0.60112166", "0.60037655", "0.5983691", "0.5983691", "0.59584385", "0.5941655", "0.5885095", "0.58534276", "0.5843976", "0.57801163", "0.5768459", "0.5753814", "0.57155377", "0.57155377", "0.56901544", "0.5687941", "0.5673884", "0.5670125", "0.5657...
0.53319407
57
This is called when the connection with the service has been unexpectedly disconnected that is, its process crashed.
public void onServiceDisconnected(ComponentName className) { mService = null; mBound = false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void signalError() {\n Connection connection = connectionRef.get();\n if (connection != null && connection.isDefunct()) {\n Host host = cluster.metadata.getHost(connection.address);\n // Host might be null in the case the host has been removed, but it means this has\n ...
[ "0.73927796", "0.72792166", "0.69871086", "0.69499457", "0.6916074", "0.6900065", "0.68725854", "0.68693835", "0.6832081", "0.6818481", "0.6780122", "0.67505187", "0.6743434", "0.6742982", "0.6742982", "0.6741712", "0.6741712", "0.6738647", "0.67229235", "0.67076504", "0.6704...
0.64211667
76
Perform action on click
public void onClick(View v) { is_enabled=!is_enabled; if(!is_enabled){ textView_current_Status.setText(R.string.switcher_is_being_enabled_please_wait); //sayHello(); Set_Switch_On(); }else{ textView_current_Status.setText(R.string.switcher_is_currently_disabled); Set_Switch_Off(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void act() \n {\n checkClicked();\n }", "void clickSomewhereElse();", "public void click() {\n\t\tif(this.buttonListener != null) {\n\t\t\tthis.buttonListener.onClicked();\n\t\t}\n\t}", "public void click() {\n\t\tif(toggles) {\n\t\t\tvalue = (value == 0) ? 1 : 0;\t// flip toggle value\n\...
[ "0.74327826", "0.7429781", "0.7413212", "0.7406363", "0.74043095", "0.7403293", "0.7396451", "0.7355459", "0.7336343", "0.72661924", "0.72381246", "0.7232423", "0.7199719", "0.71952486", "0.719487", "0.719487", "0.7177951", "0.7120562", "0.7111742", "0.7111742", "0.7111742", ...
0.0
-1
Inflate the menu; this adds items to the action bar if it is present.
@Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.menu_main, menu); return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tMenuInflater inflater = getMenuInflater();\n \tinflater.inflate(R.menu.main_activity_actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {...
[ "0.7246102", "0.7201358", "0.7194834", "0.7176498", "0.71066517", "0.7039537", "0.7037961", "0.70112145", "0.70094734", "0.69807225", "0.6944953", "0.69389373", "0.6933199", "0.6916928", "0.6916928", "0.6891486", "0.68831646", "0.68754137", "0.68745375", "0.68621665", "0.6862...
0.0
-1
Handle action bar item clicks here. The action bar will automatically handle clicks on the Home/Up button, so long as you specify a parent activity in AndroidManifest.xml.
@Override public boolean onOptionsItemSelected(MenuItem item) { int id = item.getItemId(); //noinspection SimplifiableIfStatement if (id == R.id.action_settings) { Intent intent = new Intent(this, MainSettingsActivity.class); startActivity(intent); return true; } return super.onOptionsItemSelected(item); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean onOptionsItemSelected(MenuItem item) { Handle action bar item clicks here. The action bar will\n // automatically handle clicks on the Home/Up button, so long\n // as you specify a parent activity in AndroidManifest.xml.\n\n //\n // HANDLE BACK BUTTON\n ...
[ "0.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.0
-1
Checks whether a trend is available.
public boolean hasTrend() { return getLatestResults() != null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean hasForecast();", "boolean hasDailyBonus();", "public boolean hasTick();", "public boolean isAvailable() {\n return this.isAcceptingRider && this.currentTrip == null;\n }", "boolean hasRt();", "private boolean CheckAvailableDate(TimePeriod tp)\n\t{\n\t\ttry\n\t\t{\n\t\t\tConnector con = new Co...
[ "0.63743657", "0.5777041", "0.5759324", "0.57549495", "0.5727595", "0.56831944", "0.56353915", "0.5625805", "0.55420136", "0.54585433", "0.5448117", "0.5432588", "0.54262364", "0.54132414", "0.54066455", "0.54066455", "0.54052603", "0.5379836", "0.53792715", "0.53781307", "0....
0.76201576
0
Returns a historical trend graph for display.
public IntegrityHistory getTrend() { RunList<?> tempRuns = job.getBuilds(); return new IntegrityHistory(tempRuns); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "ResponseEntity<List<TieredRatesHistory>> getTieredRatesHistory();", "ResponseEntity<List<TOURatesHistory>> getTouRatesHistory();", "JFreeChart generateHist();", "private void drawChart() throws ParseException {\n Calendar cal = new GregorianCalendar();\n cal.setTime(new Date());\n cal.se...
[ "0.61406076", "0.6062797", "0.59962946", "0.5902829", "0.5805481", "0.5802005", "0.57839066", "0.5598533", "0.5520041", "0.55041796", "0.54684204", "0.5446379", "0.5381592", "0.5375997", "0.53707224", "0.5361091", "0.5349348", "0.5300259", "0.5271773", "0.5271773", "0.5267989...
0.58412015
4
Returns the newest available results.
public IntegrityTestResultAction getLatestResults() { final Run<?, ?> tempLastSuccessfulBuild = job.getLastSuccessfulBuild(); Run<?, ?> tempBuild = job.getLastBuild(); while (tempBuild != null) { IntegrityTestResultAction tempResultAction = tempBuild.getAction(IntegrityTestResultAction.class); if (tempResultAction != null) { return tempResultAction; } else if (tempBuild == tempLastSuccessfulBuild) { return null; } tempBuild = tempBuild.getPreviousBuild(); } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private List<NewsArticle> getMostPopular() {\n LOGGER.log(Level.INFO, \"getMostPopular\");\n return newsService.getMostPopular();\n }", "@Override\r\n\tpublic int searchLatest() {\n\t\tpostDao=new PostDaoImpl(TransactionManager.connection);\r\n\t\treturn postDao.selectLatest();\r\n\t}", "publi...
[ "0.6326326", "0.62288386", "0.62214464", "0.6219519", "0.60352933", "0.59847134", "0.59741014", "0.59386003", "0.58974963", "0.58954227", "0.5856786", "0.5840681", "0.58276486", "0.58175886", "0.5799355", "0.57596445", "0.5756074", "0.5735493", "0.5718541", "0.5688044", "0.56...
0.530149
55
Created by desperado on 17131.
public interface IStartImageRepository { void getStartImage(OnResultListener<WelcomeBean> listener); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "public final void mo51373a() {\n }", "@Override\n\tprotected void interr() {\n\t}", "private stendhal() {\n\t}", "@Override\r\n\tpublic voi...
[ "0.5943355", "0.5904044", "0.58142895", "0.5775901", "0.57430214", "0.5740748", "0.56932", "0.56932", "0.56566316", "0.56345594", "0.56337947", "0.5620432", "0.561084", "0.561084", "0.561084", "0.561084", "0.561084", "0.5596032", "0.55777574", "0.55765414", "0.55749536", "0...
0.0
-1
Construtor da classe Administrador
public Administrador(String nome, String endereco, String email, String telefone, String id_usuario, String senha_usuario) { super(nome, endereco, email, telefone, id_usuario, senha_usuario); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Admin() {\n\n\t}", "public Administrador() {\n //título da tela Administrador\n setTitle(\"Administrador\");\n //Inicializa os componentes da tela\n initComponents();\n //Inicializa o combo box contendo os instrutores cadastrados\n initComboBox();\n //inici...
[ "0.7332603", "0.72781557", "0.7111858", "0.7034074", "0.7016462", "0.7015888", "0.69610065", "0.69358474", "0.6892494", "0.68288773", "0.67894053", "0.6750895", "0.6727164", "0.6724907", "0.6702405", "0.6697379", "0.6687863", "0.6684735", "0.6653249", "0.6653249", "0.6653249"...
0.76565677
0
It has to be a copy of values not reference because we will create many states and don't want to overwrite the same array.
public StateWolfGoatCabbage(StateWolfGoatCabbage state) { sarray = new int[N]; for(int i=0; i<N; i++) this.sarray[i] = state.sarray[i]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private double[] getCustomState() {\n double[] state = new double[this.stateLength];\n\n // *** YOUR CODE HERE **********************************************************************\n\n // *** END OF YOUR CODE ********************************************************************\n\n retu...
[ "0.6470949", "0.6331204", "0.6034437", "0.6025191", "0.6004961", "0.595911", "0.5956207", "0.59454226", "0.5933267", "0.5932019", "0.59120953", "0.5889567", "0.58685625", "0.5838626", "0.5797069", "0.5751852", "0.57462543", "0.57390803", "0.56905895", "0.5664064", "0.56572425...
0.0
-1
Constructs a new totals panel.
public TotalsPanel() { setCards(new JPanel(new CardLayout())); setExpensePanel(new CategoryTotalPanel()); setIncomePanel(new CategoryTotalPanel()); setTransferPanel(new TransferTotalPanel()); // Add panels to cards. getCards().add(getExpensePanel(), EXPENSES.toString()); getCards().add(getIncomePanel(), INCOME.toString()); getCards().add(getTransferPanel(), TRANSFERS.toString()); // Build panel. setFill(GridBagConstraints.BOTH); add(getCards(), 0, 0, 1, 1, 100, 100); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public SubTotal() { \n subTotalFrame = new JFrame(\"Sub Total\"); \n subTotalFrame.getContentPane().setLayout(new BorderLayout(0,0)); \n \n subTotalNorthPanel = new JPanel(); \n subTotalNorthPanel.setLayout(new FlowLayout()); \n subTotalNorthPanel.setBackgroun...
[ "0.6422376", "0.6009218", "0.5991382", "0.5989299", "0.59586686", "0.5910926", "0.5900821", "0.5871697", "0.5862282", "0.5809531", "0.5759482", "0.5719574", "0.57169414", "0.56808084", "0.56112516", "0.56112516", "0.5590875", "0.55810773", "0.558079", "0.5579092", "0.5577094"...
0.7687061
0
This method shows the totals for the specified key.
public void showTotalsFor(TotalReportTypeKeys key) { ((CardLayout)getCards().getLayout()).show(getCards(), key.toString()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void showTotalValue() {\n double totalValue = 0;\n for (Row row : rows) { // Iterate over the ArrayList.\n totalValue += row.getSeatTotal(); // Get the total for the seats from each row and add all th...
[ "0.6065397", "0.585091", "0.5753147", "0.5644256", "0.5566186", "0.5545924", "0.5537843", "0.5509967", "0.5486389", "0.544763", "0.53824335", "0.5380202", "0.5362986", "0.53419775", "0.53267926", "0.5324437", "0.53139174", "0.5281723", "0.5276967", "0.5258869", "0.5255317", ...
0.81257004
0
This method updates the totals for transactions that occurred between the start and end dates inclusive, and that are accepted by the specified filter.
public void updateView(Date start, Date end, TotalFilter filter) { // Clear data. getExpensePanel().clear(); getIncomePanel().clear(); getTransferPanel().clear(); createReportAndDisplayResults(start, end, filter); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private\n void\n createReportAndDisplayResults(Date start, Date end, TotalFilter filter)\n {\n CategoryReport report = CategoryReport.createReport(start, end, filter);\n IncomeExpenseTotal expenses = new IncomeExpenseTotal(EXPENSE_SUMMARY, TOTAL.toString());\n IncomeExpenseTotal income = new IncomeExpe...
[ "0.5817445", "0.5642591", "0.5508006", "0.54126054", "0.5195865", "0.518321", "0.5098247", "0.50016564", "0.49932015", "0.4970992", "0.49489957", "0.494698", "0.49413294", "0.4939549", "0.49110833", "0.49110645", "0.48893875", "0.48227102", "0.48172474", "0.4816976", "0.47979...
0.6588448
0
//////////////////////////////////////////////////////////////////////////// Start of private methods. ////////////////////////////////////////////////////////////////////////////
private void createReportAndDisplayResults(Date start, Date end, TotalFilter filter) { CategoryReport report = CategoryReport.createReport(start, end, filter); IncomeExpenseTotal expenses = new IncomeExpenseTotal(EXPENSE_SUMMARY, TOTAL.toString()); IncomeExpenseTotal income = new IncomeExpenseTotal(INCOME_SUMMARY, TOTAL.toString()); // Add expense totals. for(IncomeExpenseTotal total : report.getExpenses()) { getExpensePanel().getTable().add(total); // Combine all the expense totals into the total. expenses.setAmount(expenses.getAmount() + total.getAmount()); } getExpensePanel().getTable().add(expenses); // Add income totals. for(IncomeExpenseTotal total : report.getIncome()) { getIncomePanel().getTable().add(total); // Combine all the income totals into the total. income.setAmount(income.getAmount() + total.getAmount()); } getIncomePanel().getTable().add(income); // Add transfer totals. for(TransferTotal total : report.getTransfers()) { getTransferPanel().getTable().add(total); } // Display results. getExpensePanel().getTable().display(); getIncomePanel().getTable().display(); getTransferPanel().getTable().display(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private stendhal() {\n\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "private Rek...
[ "0.6419019", "0.6237631", "0.6235287", "0.6168061", "0.61660355", "0.6164294", "0.6021369", "0.6019772", "0.5997159", "0.5929839", "0.5906534", "0.5902628", "0.587966", "0.58571255", "0.581851", "0.5815927", "0.5815927", "0.5808566", "0.5796837", "0.57968307", "0.5787148", ...
0.0
-1
0 not visited, 1 : blue, 1 : red
public boolean isBipartite(int[][] graph) { int[] colors = new int[graph.length]; for (int i = 0; i < graph.length; i++) { if (colors[i] != 0) { continue; } Queue<Integer> queue = new LinkedList<>(); queue.add(i); colors[i] = 1; while (!queue.isEmpty()) { int cur = queue.poll(); int[] neighbors = graph[cur]; for (int neighbor : neighbors) { if (colors[neighbor] == 0) { colors[neighbor] = - colors[cur]; queue.add(neighbor); } else if (colors[neighbor] != - colors[cur]) { return false; } } } } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean getColor(TreeNode node){\n //null node is BLACK because we cannot have a dangling (incomplete) 2-node (RED)\n if (node == null) return BLACK;\n return node.color;\n }", "public int getColor();", "public int getColor();", "private Boolean isRed(Node h){\n\t\tif(h.color =...
[ "0.6865024", "0.68294346", "0.68294346", "0.6622989", "0.65047324", "0.648982", "0.6485383", "0.6420512", "0.63923746", "0.63921916", "0.6390856", "0.63751435", "0.63751435", "0.63613147", "0.6342147", "0.63319165", "0.6321613", "0.62995297", "0.62979054", "0.6294981", "0.629...
0.0
-1
TODO Autogenerated method stub
@Override public IBinder onBind(Intent intent) { return binder; }
{ "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 onCreate() { super.onCreate(); //绑定服务时会调用onCreate方法,此时启动服务 LocalProxy = new SynchronousProxyServer(Parameters.LocalProxyPort); LocalProxy.initial(); LocalProxy.start(); System.out.println("LocalProxy run on " + Parameters.LocalProxyPort); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
TODO Autogenerated method stub
@Override public int onStartCommand(Intent intent, int flags, int startId) { return super.onStartCommand(intent, flags, startId); }
{ "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
Deregisters a ScriptSession from client map if user does so actively. If not done actively a ScriptSession times out in 5min()
public synchronized void deRegister() { // stop the thread running... logger.debug("deregister called - invalidating session"); // remove from registered listeners and then invalidate the ScriptSession clients.remove(wctx.getScriptSession().getId()); wctx.getScriptSession().invalidate(); if (clients.size() == 0) { // might as well stop thread since we have no registered listeners this.active = false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void execute(){\n Long deadLine = Calendar.getInstance().getTimeInMillis() - sessionTimeOut;\n \n for (Map.Entry<String,SecureEntry> entry : secureMap.entrySet()) {\n if (entry.getValue().timestamp > deadLine){\n secureMap.remove(entry.getKe...
[ "0.5919293", "0.5827761", "0.5620178", "0.56035894", "0.5585133", "0.5575152", "0.5542599", "0.5516096", "0.55106884", "0.5479242", "0.547133", "0.5462478", "0.5423541", "0.541418", "0.5407809", "0.5403762", "0.53966016", "0.5350388", "0.5329999", "0.52789557", "0.52789557", ...
0.71414167
0
Register a client in the map.
public synchronized void register(String routerId) { logger.info("Toggle callback for routerid :" + routerId); // todo : handle multiple router ids - store in map and do find for every rouer id on thread execution this.routerId = routerId; clients.put(wctx.getScriptSession().getId(), wctx.getScriptSession()); if ( !this.active ) { this.active = true; new Thread(this).start(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void registerClient(UUID clientID, Client client) {\n if(!registeredClients.containsKey(clientID)) {\n registeredClients.put(clientID, client);\n }\n }", "private void registerClient() throws IOException {\n\t\tString instanceID = UUID.randomUUID().toString();\r\n\t\tString registerNa...
[ "0.7274941", "0.69502884", "0.6722437", "0.66717976", "0.6663585", "0.66195774", "0.65139693", "0.6479687", "0.63358843", "0.633499", "0.62191755", "0.61225104", "0.60749674", "0.60603714", "0.6047114", "0.5966109", "0.595521", "0.59436184", "0.59222543", "0.58452356", "0.582...
0.5439268
37
Loop while active and sleep for NodeCallbackThread.CALLBACK_INTERVALL
public void run() { try { logger.debug("Starting server-side thread"); while (active) { List<Node> nodesFromQuery = null; if (clients.size() > 0) { nodesFromQuery = BeanLocator.getRouterService().findNodesWithNumberOfMessages(routerId); logger.debug("Number of nodesFromQuery for this routerId :" + routerId + " is:" + nodesFromQuery.size()); for (Node node : nodesFromQuery) { // if node exists in map if (this.nodes.get(node.getId()) != null) { logger.debug("Node already in map"); // check if something has been updated on the node - using hashcode logger.debug(this.nodes.get(node.getId()).getNumberOfMessagesHandled().toString()); logger.debug(node.getNumberOfMessagesHandled().toString()); boolean hasNumberOfMessagesChanged = !this.nodes.get(node.getId()).getNumberOfMessagesHandled().equals(node.getNumberOfMessagesHandled()); if (hasNumberOfMessagesChanged) { logger.debug("Fire update event.."); // if something has changed fire update event this.nodes.put(node.getId(), node); fireNodeUpdatedEvent(node); } else { // nothing changed - ignore and log logger.info("Nothing changed on node :" + node.getId()); } } else { // else if node does not exist store the node in the map logger.debug("Storing node in map"); this.nodes.put(node.getId(), node); fireNodeUpdatedEvent(node); } } } else { logger.info("Thread running but no registered clients"); } Thread.sleep(CALLBACK_INTERVALL); } logger.debug("Stopping server-side thread. Clearing nodes and clients."); clients.clear(); nodes.clear(); } catch (InterruptedException ex) { logger.warn("Thread interrupted.", ex); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\t\tpublic void run() {\n\t\t\twhile(bLinked &&!isExit()){\r\n\t\t\t\tLog.d(\"123\", \"set heart beat threadid:\"+Thread.currentThread().getId());\r\n\t\t\t\tjni.talkSetHeartBeat();\r\n\t\t\t\tif(jni.talkGetRegisterState()!=1 ){\r\n\t\t\t\t\tLog.e(\"123\", \"心跳停止了\");\r\n\t\t\t\t\tbLinked = false;\r\n...
[ "0.6519198", "0.63072354", "0.6165909", "0.6165909", "0.6126075", "0.60415643", "0.5976363", "0.5953113", "0.590326", "0.58923286", "0.5880749", "0.5875989", "0.5874027", "0.58658", "0.5853857", "0.5819548", "0.57898176", "0.57706696", "0.57588214", "0.574544", "0.5732557", ...
0.0
-1
For all the browsers on the current page: String currentPage = wctx.getCurrentPage(); logger.debug("currentPage:" + currentPage);
private void fireNodeUpdatedEvent(Node node) { Iterator iterator = clients.keySet().iterator(); while (iterator.hasNext()) { String key = (String) iterator.next(); ScriptSession asession = clients.get(key); Util utilAll = new Util(asession); logger.info("Setting value on :" + node.getId() + " to #" + node.getNumberOfMessagesHandled().toString()); utilAll.setValue(node.getId(), node.getNumberOfMessagesHandled().toString()); Effect effect = new Effect(asession); //, duration: 15 effect.highlight(node.getId(), "{ duration: 2, queue: {position: 'end', scope: '" + node.getId() + "', limit:1}}"); //"{startcolor:'e6e6fa', queue: {position: 'end', scope: 'price', limit:1}}"); // highlight a row // effect.highlight("row_" + node.getId(), "{ duration: 1, queue: {position: 'end', scope: 'row_" + node.getId() + "', limit:1}}"); //"{startcolor:'e6e6fa', queue: {position: 'end', scope: 'price', limit:1}}"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int getCurrentPage();", "public int getCurrentPage();", "public String getCurrentPage(){\n\t\treturn sCurrentPage;\n\t}", "public Integer getCurrentPage();", "public int getCurrentPage() {\n\t\treturn currentPage;\n\t}", "@Override\r\n\t\tpublic int getCurrentpage() throws Exception\r\n\t\t\t{\n\t\t\t\tr...
[ "0.7378799", "0.7274452", "0.71788657", "0.7061071", "0.69694436", "0.6835012", "0.6804461", "0.6744203", "0.6663565", "0.6642212", "0.6640095", "0.64674413", "0.642746", "0.62458533", "0.62270546", "0.61845666", "0.612354", "0.6101013", "0.6085834", "0.6085834", "0.6078223",...
0.0
-1
scanner for user input
public void startUp() { // method that runs the whole program Jet[] defaultList = createDefaultListOfJets(); hangar = new Hangar(defaultList); // hangar object instantiated with new Jet array placed inside while (true) { // while loop instead of a switch... I don't like switches for some reason System.out.println("***Welcome to the JET FLEET***"); System.out.println("**********************************"); System.out.println(); System.out.println("Please choose and enter one of the options below:"); System.out.println("1. List of current JETS in the FLEET"); System.out.println("2. View the fastest JET in the FLEET"); System.out.println("3. View the longest range JET in the FLEET"); System.out.println("4. Add a new JET to the FLEET"); System.out.println("5. Quit"); System.out.println(); System.out.println("**********************************"); System.out.println("**********************************"); int option = kb.nextInt(); // Choose between all 5 options if (option == 1) { System.out.println("======================================"); System.out.println("***Current JET FLEET***"); displayJets(); System.out.println("======================================"); } else if (option == 2) { System.out.println("======================================"); System.out.println("***Fastest JET in JET FLEET***"); Jet fastest = hangar.listFastestJetInFleet(); System.out.println(fastest); System.out.println("======================================"); } else if (option == 3) { System.out.println("======================================"); System.out.println("***Longest range JET in JET FLEET***"); Jet longestRangeJet = hangar.listLongRangeJetInFleet(); System.out.println(longestRangeJet); System.out.println("======================================"); } else if (option == 4) { System.out.println("======================================"); addNewJet(); displayJets(); System.out.println("======================================"); } else if (option == 5) { System.out.println("======================================"); System.out.println("You have successfully quit the program..."); System.out.println("======================================"); break; } } kb.close(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void takeUserInput() {\n\t\t\r\n\t}", "public static String readUserInput() {\n return in.nextLine();\n }", "public void readInput()\n\t{\n\t\tString userInput;\n\t\tChoices choice;\n\t\t\n\t\tdo {\n\t\t\tlog.log(Level.INFO, \"Please give the inputs as:\\n\"\n\t\t\t\t\t+ \"ADDACCOUNT to add th...
[ "0.718728", "0.7185196", "0.7100834", "0.69848335", "0.68845904", "0.6870251", "0.6831043", "0.6789633", "0.6769724", "0.67691725", "0.6760383", "0.6745544", "0.67412674", "0.6737024", "0.67289525", "0.6725882", "0.67213833", "0.6717989", "0.67112607", "0.66859853", "0.668356...
0.0
-1
2. View the fastest jet in the FLEET
public void displayFastestJetInFleet() { for (Jet jet : hangar.getCurrentJets()) { System.out.println(jet.getModelsOfJets()); System.out.println(jet.getMachSpeed()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void displayLongestRangeJetInFleet() {\n\t\tfor (Jet jet : hangar.getCurrentJets()) {\n\n\t\t\tSystem.out.println(jet.getModelsOfJets());\n\t\t\tSystem.out.println(jet.getRangeInMiles());\n\t\t}\n\t}", "void find_it () {\n xt = 210; yt = 105; fact = 50.0;\n if (viewflg != VIEW_FORCES) zoom_slid...
[ "0.6254064", "0.6023006", "0.56518346", "0.56234163", "0.55888474", "0.55239254", "0.5480626", "0.545924", "0.5450601", "0.5405647", "0.53880715", "0.5381773", "0.53813803", "0.53759354", "0.53637373", "0.5357392", "0.5353483", "0.53499717", "0.533174", "0.5306415", "0.528831...
0.73086625
0
3. View the longest range jet in the FLEET
public void displayLongestRangeJetInFleet() { for (Jet jet : hangar.getCurrentJets()) { System.out.println(jet.getModelsOfJets()); System.out.println(jet.getRangeInMiles()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "String getEndRange();", "@Override\r\n\tpublic int getMaxLag() {\n\t\treturn pos;\r\n\t}", "public int getMaxRangeEnd() {\n return maximumViewableRange.getTo();\n }", "private static void solve() {\n\t\tList<Integer> rgtMax= new ArrayList<>();\n\t\tList<Integer> lftMax= new ArrayList<>();\n\t\t\n\t...
[ "0.5647652", "0.5626844", "0.5624225", "0.5614656", "0.5601072", "0.54989386", "0.548592", "0.5438624", "0.54122883", "0.53931206", "0.53463537", "0.5329159", "0.52904826", "0.52646804", "0.52569574", "0.525455", "0.5241645", "0.52194464", "0.5207116", "0.51943797", "0.517801...
0.7622752
0
4. Add a new jet to the FLEET user adds custom jet
public void addNewJet() { System.out.println("Please enter the model of the JET in all CAPS:"); String modelsOfJets = kb.next(); System.out.println("Please enter the speed of the JET in miles per hour (MPH):"); double speedMPH = kb.nextDouble(); System.out.println("Please enter the price of the JET in dollars:"); double priceInDollars = kb.nextDouble(); System.out.println("Please enter the range of the JET in miles:"); double rangeInMiles = kb.nextDouble(); Jet j = new Jet(modelsOfJets, speedMPH, priceInDollars, rangeInMiles); hangar.addNewJetInHangar(j); // adds the jet to the hangar object (that has the jet array) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onNewItem(int id, Face face) {\n //mEyesGraphic = new com.eyegalaxy.eyegalaxydemo.GooglyEyesGraphic(mOverlay);\n }", "@Override\n public void onNewItem(int id, Face face) {\n mEyesGraphic = new FaceTrackerGraphic(mOverlay);\n }", "private void addFeature()\r\n ...
[ "0.58578205", "0.5624817", "0.5285349", "0.5259647", "0.5183371", "0.51780957", "0.51666045", "0.51642746", "0.5149737", "0.51149994", "0.51087075", "0.5088564", "0.50823945", "0.50727993", "0.50659657", "0.50594276", "0.5012752", "0.5010059", "0.50051594", "0.50019544", "0.4...
0.67204565
0
End of Class MyVIewHolder
public CardAdapter(Context context, List<information> informationList){ this.context = context; this.informationList = informationList; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface ViewHolder {\n}", "public ViewHolder(View itemView) {\n super(itemView);\n imageView = itemView.findViewById(R.id.ivSomeImage);\n textView = itemView.findViewById(R.id.tvSomeText);\n }", "public ViewHolder(View itemView) {\n super(itemView);\n...
[ "0.6805689", "0.6753491", "0.66059273", "0.65776557", "0.6576457", "0.64391524", "0.64332014", "0.64087754", "0.63939404", "0.6386379", "0.6380168", "0.63744694", "0.6352057", "0.63418823", "0.6332179", "0.62465423", "0.62263656", "0.618587", "0.6174311", "0.6140521", "0.6131...
0.0
-1
TODO Autogenerated method stub
@Override public String takeOff() { String despegar = "Puede despegar"; return despegar; }
{ "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 String fly() { String volar = "Puede volar"; return volar; }
{ "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 method is called when the application starts
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); //Get the device's screen details Display display = getWindowManager().getDefaultDisplay(); //Load the resolution into a point object Point size = new Point(); display.getSize(size); //Initialize the game view and set it as the view gameEngine = new GameEngine(this, size.x, size.y); //Parameters get a hold of the device's screen data setContentView(gameEngine); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void startup() {\n }", "protected void onFirstTimeLaunched() {\n }", "@Override\n protected void appStart() {\n }", "@Override\n public void firstApplicationStartup()\n {\n System.out.println(\"firstApplicationStartup\");\n \n }", "@Override\n p...
[ "0.76758915", "0.76300937", "0.7586104", "0.756877", "0.75189054", "0.7340913", "0.7317284", "0.73024845", "0.7297052", "0.7297052", "0.72692716", "0.72692716", "0.7226347", "0.7225766", "0.7221683", "0.72134626", "0.7206629", "0.7206629", "0.72026545", "0.7196906", "0.719048...
0.0
-1
This method is executed when the player starts the game
@Override protected void onResume() { super.onResume(); //Execute the game view's resume method gameEngine.resume(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void GameStart()\n\t\t{\n\t\t\tplayers_in_game++;\n\t\t}", "public void startGame() {\r\n this.setupGame();\r\n }", "public void start() {\n ArrayList<String> names = new ArrayList<>();\n game.initialize(names);\n //game.play(this.mainPkmn, this.attack);\n\n }", "public ...
[ "0.82186174", "0.8059768", "0.7855041", "0.7833314", "0.779976", "0.76830363", "0.76672775", "0.7624348", "0.76226753", "0.76226753", "0.76044196", "0.760321", "0.75721174", "0.7565317", "0.75524116", "0.7544332", "0.74954504", "0.74656457", "0.74220055", "0.7398587", "0.7378...
0.0
-1
This method is executed when the player quits the game
@Override protected void onPause() { super.onPause(); //Execute the game view's pause method gameEngine.pause(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static void playerLost() {\n\n\t\tSystem.exit(0); // This code ends the program\n\t}", "public void quitGame() {\r\n System.out.println(\"Thanks for playing!\");\r\n }", "public void quitGame() {\n\t\t\tdisplay(\"Goodbye!\");\n\t\t\tSystem.exit(0);\n\t\t}", "public void endGame() {\n dispose();...
[ "0.7847529", "0.7722903", "0.7657968", "0.76415265", "0.7592804", "0.75811535", "0.75517756", "0.75500447", "0.7535805", "0.7486468", "0.7473171", "0.74439555", "0.7372358", "0.7289383", "0.7274121", "0.72678846", "0.72360134", "0.72066194", "0.71651757", "0.7131462", "0.7129...
0.0
-1
Generate small list of the names of prizes on the fly and return it
public List<String> loadPrizes() { List<String> result = new ArrayList<String>(); result.add(getLocalizedString("defaultValue.prize")); result.add(getLocalizedString("value.prize.iceCream")); result.add(getLocalizedString("value.prize.iPhone5")); result.add(getLocalizedString("value.prize.newShoes")); return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "java.util.List<cn.mxz.protocols.user.mission.BoxP.BoxPro.PrizePro> \n getPrizesList();", "List<Prize> getPrizeList();", "public double getPrizes() {\r\n return prizes;\r\n }", "public String showPrizes()\n {\n return (prizesWon);\n }", "public double getPrize();", "public ja...
[ "0.70435596", "0.68055093", "0.625761", "0.62496954", "0.5791788", "0.5648848", "0.5594748", "0.55656725", "0.5426294", "0.541945", "0.5316158", "0.53106076", "0.5291234", "0.5287904", "0.5205467", "0.52019125", "0.5141374", "0.5117092", "0.51037526", "0.5102836", "0.50839967...
0.7352866
0
Return localized string for a key
private String getLocalizedString(String key) { return new StringResourceModel(key, null).getObject(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String format(String key) {\r\n return getString(key);\r\n }", "@SuppressWarnings(\"deprecation\")\n public String getLocalizedString(String key, Object... parameters) {\n\n // On server, use deprecated I18n.\n if (FMLCommonHandler.instance().getSide() == Side.SERVER)\n return net.minecraf...
[ "0.7229438", "0.7212793", "0.7165303", "0.71210253", "0.7085094", "0.6979059", "0.69750136", "0.6954752", "0.6939445", "0.6870525", "0.6860908", "0.68474853", "0.6836019", "0.68221277", "0.6802117", "0.68019277", "0.6796936", "0.6790361", "0.6787934", "0.67840225", "0.6770698...
0.78514135
0
Initializes the controller class.
@Override public void initialize(URL url, ResourceBundle rb) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void initialize() {\n\t\tcontroller = Controller.getInstance();\n\t}", "public MainController() {\n\t\tcontroller = new Controller(this);\n\t}", "public abstract void initController();", "public Controller() {\n super();\n }", "public Controller() {\n super();\n }", "public Co...
[ "0.8125658", "0.78537387", "0.78320265", "0.776199", "0.776199", "0.76010174", "0.74497247", "0.7437837", "0.7430714", "0.742303", "0.74057597", "0.7341963", "0.7327749", "0.72634363", "0.72230434", "0.7102504", "0.70575505", "0.69873077", "0.69721675", "0.6944077", "0.691256...
0.0
-1
TODO Autogenerated method stub
@Override public Users queryUsers(String account) { return rp.queryUsers(account); }
{ "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 boolean updateUsers(Users u) { return rp.updateUsers(u); }
{ "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
Construct a test case with the given name.
public ActionEditorTest(String name) { super(name); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public TestCase(String name) {\n\t\tsetName(name);\n\t}", "public TestCase(String name) {\n fName= name;\n }", "public PlanillaTest(String name) {\n\t\tsuper(name);\n\t}", "public SampleJUnit(String name) {\r\n\t\tsuper(name);\r\n\t}", "Testcase createTestcase();", "public SwitchLookupTest(S...
[ "0.7341691", "0.7078965", "0.67394155", "0.6575181", "0.6312388", "0.6278655", "0.62716633", "0.62703705", "0.6264195", "0.6253865", "0.6229769", "0.6201996", "0.61946404", "0.61592054", "0.6141757", "0.6111219", "0.6102644", "0.6084561", "0.6083013", "0.60554504", "0.6046685...
0.5443478
58
Run the default test suite.
public static void main(String[] args) { TestHelper.runTests(args, ActionEditorTest.class); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void runTests() {\n\t\tResult result = JUnitCore.runClasses(TestCalculator.class);\n\n\t}", "public static void main(String[] args){\n new Testing().runTests();\r\n \r\n }", "public static void main(String[] args) {\r\n System.out.println(runAllTests());\r\n }", "public sta...
[ "0.74497235", "0.7422603", "0.7335918", "0.73197013", "0.7228151", "0.7169315", "0.7149141", "0.71329623", "0.70980656", "0.7085169", "0.70787746", "0.7004831", "0.7002377", "0.69925153", "0.698882", "0.6969926", "0.6933519", "0.693123", "0.6911753", "0.68925357", "0.6858573"...
0.0
-1
ServerKonstruktor mit Werten zur Initialisierung der Variablen.
public Server(){ this.m_Clients = new TeilnehmerListe(); this.m_Port = 7575; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Server() {\n\t\tinit(new Config());\n\t}", "public Server() {}", "public ServerDef() {}", "protected Server() {\n super(\"Ublu Server\");\n }", "public Server() {\n initComponents();\n }", "public Server() {\n initComponents();\n }", "public ServerA(){}", "privat...
[ "0.7668057", "0.75265896", "0.75023574", "0.7429968", "0.7415227", "0.7415227", "0.72397804", "0.7211941", "0.72013366", "0.7064741", "0.70273733", "0.70073134", "0.7000926", "0.69854295", "0.69590414", "0.68996114", "0.6882455", "0.6861236", "0.68598455", "0.6833105", "0.680...
0.74919623
3
ServerKonstruktor bei dem man die Werte bei der Generierung selbst festlegen kann.
public Server(int port) { this.m_Port = port; this.m_Clients = new TeilnehmerListe(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Server(){\r\n \r\n this.m_Clients = new TeilnehmerListe();\r\n this.m_Port = 7575;\r\n }", "protected Server() {\n super(\"Ublu Server\");\n }", "public Server() {}", "public Server() {\n\t\tinit(new Config());\n\t}", "public ServerDef() {}", "public Server() {\n...
[ "0.6903711", "0.690238", "0.6814286", "0.6772639", "0.67498624", "0.6741554", "0.6741554", "0.66317743", "0.65761733", "0.6574572", "0.65381765", "0.6522001", "0.6514544", "0.65032804", "0.6477024", "0.6469039", "0.6453907", "0.6446159", "0.63791937", "0.63759166", "0.6364001...
0.5916153
90
Test for null values
public static boolean minCharRequirementPassed(String toCheck, int limit) { if (toCheck == null) return false; return toCheck.length() >= limit; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean checkNull();", "boolean isNull();", "public boolean canProcessNull() {\n return false;\n }", "boolean isNullOmittable();", "boolean isNilValue();", "public boolean anyNull () ;", "@Test\n\tvoid testCheckNulls2() {\n\t\tObject[] o = {2,5f,\"Test\",null,\"Test2\"};\n\t\tassertTrue(Data...
[ "0.7478921", "0.7291452", "0.72899616", "0.7170223", "0.7129303", "0.7062016", "0.7050948", "0.69850934", "0.69748974", "0.6962307", "0.6934694", "0.6928363", "0.68926764", "0.6874358", "0.68344617", "0.6833863", "0.6778324", "0.6776327", "0.67321384", "0.67234224", "0.670732...
0.0
-1
TODO Autogenerated method stub
private void initview() { mtvWorkerListTitle=(MyTitleView) findViewById(R.id.worker_list_title); zlvWorkerList=(ZListView) findViewById(R.id.worker_list_zlistview); mtvWorkerListTitle.setOnLeftClickListener(new OnClickListener() { @Override public void onClick(View v) { // TODO Auto-generated method stub finish(); } }); }
{ "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 onClick(View v) { finish(); }
{ "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 onClick(View v) { }
{ "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 method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always regenerated by the Form Editor.
@SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { imunView = new javax.swing.JPanel(); lbTitleImunisasi = new javax.swing.JLabel(); lbImunisasi = new javax.swing.JLabel(); lbNamaDusunI = new javax.swing.JLabel(); lbSasaranI = new javax.swing.JLabel(); lbBulanI = new javax.swing.JLabel(); cbImunisasi = new javax.swing.JComboBox<>(); cbBulanI = new javax.swing.JComboBox<>(); tfNamaDusunI = new javax.swing.JTextField(); tfSasaranI = new javax.swing.JTextField(); jScrollPane1 = new javax.swing.JScrollPane(); tbImunisasi = new javax.swing.JTable(); lbPerolehanI = new javax.swing.JLabel(); tfPerolehanI = new javax.swing.JTextField(); btAddI = new javax.swing.JButton(); btDeleteI = new javax.swing.JButton(); btUpdateI = new javax.swing.JButton(); btExportI = new javax.swing.JButton(); setTitle("Perhitungan Data Imunisasi"); setPreferredSize(new java.awt.Dimension(900, 700)); setResizable(false); imunView.setBackground(new java.awt.Color(142, 68, 173)); lbTitleImunisasi.setFont(new java.awt.Font("Lucida Fax", 1, 18)); // NOI18N lbTitleImunisasi.setForeground(new java.awt.Color(0, 0, 0)); lbTitleImunisasi.setText("Perhitungan PWS Imunisasi"); lbImunisasi.setForeground(new java.awt.Color(0, 0, 0)); lbImunisasi.setText("PWS Imunisasi : "); lbNamaDusunI.setForeground(new java.awt.Color(0, 0, 0)); lbNamaDusunI.setText("Nama Dusun : "); lbSasaranI.setForeground(new java.awt.Color(0, 0, 0)); lbSasaranI.setText("Sasaran : "); lbBulanI.setForeground(new java.awt.Color(0, 0, 0)); lbBulanI.setText("Bulan : "); cbImunisasi.setBackground(new java.awt.Color(255, 255, 255)); cbImunisasi.setForeground(new java.awt.Color(0, 0, 0)); cbImunisasi.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "HBO", "BCG", "Polio 1", "DPT-HB-Hib 1", "POLIO 2", "DPT-HB-Hib 2", "POLIO 3", "DPT-HB-Hib 3", "POLIO 4", "IPV", "Campak", "Campak Lengkap", "DPT-HB-Hib Lanjutan", "Campak Lanjutan" })); cbImunisasi.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { cbImunisasiActionPerformed(evt); } }); cbBulanI.setBackground(new java.awt.Color(255, 255, 255)); cbBulanI.setForeground(new java.awt.Color(0, 0, 0)); cbBulanI.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "1. Januari", "2. Februari", "3. Maret", "4. April", "5. Mei", "6. Juni", "7. Juli", "8. Agustus", "9. September", "10. Oktober", "11. November", "12. Desember" })); tfNamaDusunI.setBackground(new java.awt.Color(255, 255, 255)); tfNamaDusunI.setForeground(new java.awt.Color(0, 0, 0)); tfSasaranI.setBackground(new java.awt.Color(255, 255, 255)); tfSasaranI.setForeground(new java.awt.Color(0, 0, 0)); tbImunisasi.setBackground(new java.awt.Color(255, 255, 255)); tbImunisasi.setForeground(new java.awt.Color(0, 0, 0)); tbImunisasi.setModel(new javax.swing.table.DefaultTableModel( new Object [][] { }, new String [] { "PWS Imunisasi", "Nama Dusun", "Sasaran", "Perolehan", "Bulan", "Persentase" } )); tbImunisasi.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { tbImunisasiMouseClicked(evt); } }); jScrollPane1.setViewportView(tbImunisasi); lbPerolehanI.setForeground(new java.awt.Color(0, 0, 0)); lbPerolehanI.setText("Perolehan : "); tfPerolehanI.setBackground(new java.awt.Color(255, 255, 255)); tfPerolehanI.setForeground(new java.awt.Color(0, 0, 0)); btAddI.setForeground(new java.awt.Color(0, 0, 0)); btAddI.setText("Add"); btAddI.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btAddIActionPerformed(evt); } }); btDeleteI.setForeground(new java.awt.Color(0, 0, 0)); btDeleteI.setText("Delete"); btDeleteI.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btDeleteIActionPerformed(evt); } }); btUpdateI.setForeground(new java.awt.Color(0, 0, 0)); btUpdateI.setText("Update"); btUpdateI.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btUpdateIActionPerformed(evt); } }); btExportI.setForeground(new java.awt.Color(0, 0, 0)); btExportI.setText("Export to .xlsx"); btExportI.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btExportIActionPerformed(evt); } }); javax.swing.GroupLayout imunViewLayout = new javax.swing.GroupLayout(imunView); imunView.setLayout(imunViewLayout); imunViewLayout.setHorizontalGroup( imunViewLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(imunViewLayout.createSequentialGroup() .addGroup(imunViewLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(imunViewLayout.createSequentialGroup() .addGap(305, 305, 305) .addComponent(lbTitleImunisasi)) .addGroup(imunViewLayout.createSequentialGroup() .addGap(73, 73, 73) .addGroup(imunViewLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(lbImunisasi) .addComponent(lbNamaDusunI, javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(lbBulanI, javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(lbPerolehanI, javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(lbSasaranI, javax.swing.GroupLayout.Alignment.TRAILING)) .addGap(18, 18, 18) .addGroup(imunViewLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(cbBulanI, javax.swing.GroupLayout.Alignment.TRAILING, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(cbImunisasi, 0, 282, Short.MAX_VALUE) .addComponent(tfNamaDusunI) .addComponent(tfSasaranI) .addComponent(tfPerolehanI)) .addGap(56, 56, 56) .addGroup(imunViewLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(btDeleteI, javax.swing.GroupLayout.DEFAULT_SIZE, 90, Short.MAX_VALUE) .addComponent(btAddI, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addGap(18, 18, 18) .addGroup(imunViewLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(btExportI, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(btUpdateI, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))) .addGroup(imunViewLayout.createSequentialGroup() .addGap(73, 73, 73) .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 710, javax.swing.GroupLayout.PREFERRED_SIZE))) .addContainerGap(14, Short.MAX_VALUE)) ); imunViewLayout.setVerticalGroup( imunViewLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(imunViewLayout.createSequentialGroup() .addContainerGap() .addComponent(lbTitleImunisasi) .addGap(38, 38, 38) .addGroup(imunViewLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(lbImunisasi, javax.swing.GroupLayout.PREFERRED_SIZE, 16, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(cbImunisasi, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(18, 18, 18) .addGroup(imunViewLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(lbNamaDusunI) .addComponent(tfNamaDusunI, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(18, 18, 18) .addGroup(imunViewLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(lbSasaranI) .addComponent(tfSasaranI, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(18, 18, 18) .addGroup(imunViewLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(imunViewLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(lbPerolehanI) .addComponent(tfPerolehanI, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, imunViewLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(btUpdateI) .addComponent(btAddI))) .addGap(18, 18, 18) .addGroup(imunViewLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(cbBulanI, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(btDeleteI) .addComponent(btExportI) .addComponent(lbBulanI, javax.swing.GroupLayout.PREFERRED_SIZE, 16, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(18, 18, 18) .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 271, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap(162, Short.MAX_VALUE)) ); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(imunView, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(imunView, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) ); pack(); setLocationRelativeTo(null); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Form() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public frmRectangulo() {\n initComponents();\n }", "public form() {\n ...
[ "0.7318948", "0.7290426", "0.7290426", "0.7290426", "0.7284922", "0.7247965", "0.7213206", "0.72080696", "0.7195916", "0.7189941", "0.71835536", "0.71579427", "0.7147217", "0.70927703", "0.7080282", "0.7055882", "0.6987108", "0.69770193", "0.6954159", "0.69529283", "0.6944756...
0.0
-1
GENFIRST:event_btExportIActionPerformed TODO add your handling code here:
private void btExportIActionPerformed(java.awt.event.ActionEvent evt) { try{ JFileChooser jFile=new JFileChooser(); jFile.showSaveDialog(this); File saveFile=jFile.getSelectedFile(); if(saveFile!=null){ saveFile=new File(saveFile.toString()+".xlsx"); Workbook wbi=new XSSFWorkbook(); Sheet sheet=wbi.createSheet("Rekap data Imunisasi"); Row rowCol=sheet.createRow(0); for(int i=0;i<tbImunisasi.getColumnCount();i++){ Cell sel=rowCol.createCell(i); sel.setCellValue(tbImunisasi.getColumnName(i)); } for(int j=0;j<tbImunisasi.getRowCount();j++){ Row rowImun=sheet.createRow(j+1); for(int k=0;k<tbImunisasi.getColumnCount();k++){ Cell sel=rowImun.createCell(k); if(tbImunisasi.getValueAt(j,k)!=null){ sel.setCellValue(tbImunisasi.getValueAt(j, k).toString()); } } } FileOutputStream output=new FileOutputStream(new File(saveFile.toString())); wbi.write(output); wbi.close(); output.close(); openFile(saveFile.toString()); }else{ JOptionPane.showMessageDialog(null, "Terjadi Error saat proses arsip"); } }catch(FileNotFoundException e){ System.out.println(e); }catch (IOException io){ System.out.println(io); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void handleExport(ActionEvent actionEvent) {\n\t}", "@Override\r\n\tpublic void exportar(ActionEvent actionEvent) {\n\t\t\r\n\t}", "public void actionExport_actionPerformed(ActionEvent e) throws Exception {\n\t\t\n\t\tFile tempFile;\n\t\t\t\t\n\t\tKDTable table = getTableForCommon();\n\t\tif(table != nu...
[ "0.75422597", "0.7453283", "0.71334136", "0.709279", "0.6830355", "0.68254024", "0.67624724", "0.67526764", "0.674112", "0.66527396", "0.6637254", "0.66359186", "0.65959585", "0.65655303", "0.65609765", "0.6499", "0.6475491", "0.6461681", "0.6458157", "0.6457821", "0.64302534...
0.6735839
9
Creates new form ViewFrame
public ViewFrame(Model m1, Model m2, Controller controller) { initComponents(); this.m1 = m1; this.m2 = m2; m1.registerView(this); m2.registerView(this); this.controller = controller; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Frame createFrame();", "public void buildFrame();", "public void createframe(String cid) {\n\t\tviewframe = new JFrame();\n\t\tviewconsumer(cid);\n\t\tviewframe.setTitle(\"Search result\");\n\t\tviewframe.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);\n\t\tviewframe.setLayout(new BorderLayout()); \n\t\tvie...
[ "0.72266614", "0.6835155", "0.6815978", "0.67571086", "0.65994054", "0.6596537", "0.65936464", "0.65576065", "0.6509558", "0.649826", "0.64834887", "0.64834887", "0.64834887", "0.64834887", "0.64834887", "0.64834887", "0.64834887", "0.64605945", "0.64148355", "0.6396999", "0....
0.0
-1
This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always regenerated by the Form Editor.
@SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jLabel1 = new javax.swing.JLabel(); input = new javax.swing.JTextField(); jLabel2 = new javax.swing.JLabel(); output = new javax.swing.JTextField(); jButton1 = new javax.swing.JButton(); jButton2 = new javax.swing.JButton(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); jLabel1.setText("Input"); jLabel2.setText("Output"); output.setEnabled(false); jButton1.setText("Pig Latin"); jButton1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton1ActionPerformed(evt); } }); jButton2.setText("Flame"); jButton2.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton2ActionPerformed(evt); } }); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addContainerGap() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel1) .addComponent(jLabel2)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(output) .addComponent(input, javax.swing.GroupLayout.DEFAULT_SIZE, 193, Short.MAX_VALUE))) .addGroup(layout.createSequentialGroup() .addComponent(jButton1) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 89, Short.MAX_VALUE) .addComponent(jButton2))) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addContainerGap() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel1) .addComponent(input, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(18, 18, 18) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel2) .addComponent(output, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(18, 18, 18) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jButton1) .addComponent(jButton2)) .addContainerGap(27, Short.MAX_VALUE)) ); pack(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Form() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public frmRectangulo() {\n initComponents();\n }", "public form() {\n ...
[ "0.73206544", "0.7291311", "0.7291311", "0.7291311", "0.7286492", "0.7249181", "0.7213362", "0.72085494", "0.71965617", "0.7190475", "0.7184897", "0.7159234", "0.71483016", "0.7094075", "0.7081491", "0.70579433", "0.6987627", "0.69776064", "0.69552463", "0.69549114", "0.69453...
0.0
-1
//GENEND:initComponents This is called if the Pig Latin button is pressed
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed controller.processModel(m1, input.getText()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public CountAlphabetFromSentenceGUI() {\n initComponents();\n }", "private void langBtnActionPerformed(ActionEvent evt) {\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n ...
[ "0.67507714", "0.64939225", "0.64593047", "0.60893375", "0.6038265", "0.6007739", "0.6002293", "0.59192926", "0.5894213", "0.5848226", "0.5841562", "0.58235556", "0.5820451", "0.5811484", "0.5807548", "0.58066833", "0.57775986", "0.57627106", "0.57609123", "0.5753036", "0.575...
0.0
-1
GENLAST:event_jButton1ActionPerformed This is called if the Flame button is pressed
private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed controller.processModel(m2, input.getText()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void jfanoActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) ...
[ "0.7079451", "0.69760346", "0.69760346", "0.69760346", "0.69628406", "0.68813026", "0.68182516", "0.6811713", "0.6764948", "0.6739769", "0.6735392", "0.67193145", "0.6630108", "0.66281974", "0.6620152", "0.6605359", "0.65934706", "0.65934247", "0.6580076", "0.65691626", "0.65...
0.0
-1
This needs to be filled in
public void updateView(String message) { output.setText(message); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public final void mo51373a() {\n }", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", ...
[ "0.6106548", "0.60132706", "0.59267443", "0.5915692", "0.5915692", "0.5915692", "0.5915692", "0.5915692", "0.5915692", "0.5915692", "0.5902639", "0.58933514", "0.5823457", "0.58219254", "0.58195955", "0.5819419", "0.5799894", "0.57992995", "0.5756471", "0.57434374", "0.574343...
0.0
-1
Constructor with an upper limit of Integer.MAX_VALUE 1 tweets.
public Listener() { count = 0; error = false; maxCount = Integer.MAX_VALUE - 1; tweets = new LinkedList<Status>(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Listener(int max) {\r\n count = 0;\r\n maxCount = max;\r\n tweets = new LinkedList<Status>();\r\n }", "public Twitter() {\n\t\t\tuserMap = new HashMap<>();\n\t\t\tmaxFeed = 10;\n\t\t}", "public Twitter() {\n size = 0;\n users = new ArrayList<>();\n }", "public ...
[ "0.7227919", "0.67469454", "0.6399139", "0.6199372", "0.6156819", "0.60895157", "0.59744036", "0.5771964", "0.5626552", "0.5594951", "0.5549857", "0.5541675", "0.55289406", "0.5473575", "0.5461315", "0.546093", "0.5456815", "0.5451883", "0.5444894", "0.54379505", "0.5395478",...
0.6240434
3
Constructor with a given upper limit.
public Listener(int max) { count = 0; maxCount = max; tweets = new LinkedList<Status>(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setUpperBound(final int upperBound) {\r\n this.upperBound = upperBound;\r\n }", "Currencies(final int lowerLimit, final int upperLimit) {\n this.min = lowerLimit;\n this.max = upperLimit;\n }", "public void setUpperBound(String upper) {\n upperBound = upper;\n }...
[ "0.70730746", "0.6796924", "0.66041017", "0.65696144", "0.65400684", "0.65326864", "0.6434864", "0.64243114", "0.6380563", "0.62049294", "0.6139611", "0.60692406", "0.60400116", "0.6015286", "0.6006367", "0.6003683", "0.5964208", "0.59286076", "0.59175545", "0.5842879", "0.58...
0.0
-1